conflict_resolution
stringlengths
27
16k
<<<<<<< Init(drawTo: IDisplayContext): void { if (!this.Params) { this.Params = { playbackRate: 1, reverse: false, startPosition: 0, endPosition: null, loop: true, loopStart: 0, loopEnd: 0, retrigger: false, //Don't retrigger attack if already playing volume: 11, track: '../Assets/ImpulseResponses/teufelsberg01.wav', trackName: 'TEUFELSBERG', user: 'BGXA', }; } else { ======= Init(sketch?: any): void { this.BlockName = "SoundCloud"; if (this.Params) { >>>>>>> Init(drawTo: IDisplayContext): void { this.BlockName = "SoundCloud"; if (this.Params) {
<<<<<<< import IDisplayContext = etch.drawing.IDisplayContext; ======= import {IPowerSource} from './IPowerSource'; >>>>>>> import IDisplayContext = etch.drawing.IDisplayContext; import {IPowerSource} from './IPowerSource';
<<<<<<< import Source = require("../Source"); import AudioChain = require("../../Core/Audio/Connections/AudioChain"); import ISketchContext = Fayde.Drawing.ISketchContext; ======= import {IAudioChain} from '../../Core/Audio/Connections/IAudioChain'; import {IBlock} from '../IBlock'; import {Logic} from './Logic/Logic'; import {Power} from './Power'; import {Source} from '../Source'; >>>>>>> import {IAudioChain} from '../../Core/Audio/Connections/IAudioChain'; import {IBlock} from '../IBlock'; import {Logic} from './Logic/Logic'; import {Power} from './Power'; import {Source} from '../Source'; import ISketchContext = Fayde.Drawing.ISketchContext;
<<<<<<< super.Init(drawTo); ======= this.BlockName = "Momentary Power"; super.Init(sketch); >>>>>>> Init(drawTo: IDisplayContext): void { super.Init(drawTo); this.BlockName = "Momentary Power"; super.Init(sketch); <<<<<<< this.DrawSprite("momentary switch"); ======= (<MainScene>this.Sketch).BlockSprites.Draw(this.Position,true,"momentary power"); >>>>>>> this.DrawSprite("momentary power");
<<<<<<< Init(drawTo: IDisplayContext): void { if (!this.Params) { this.Params = { gain: 1, monitor: true, }; } ======= Init(sketch?: any): void { this.BlockName = "Microphone"; this.Defaults = { gain: 1, monitor: true }; this.PopulateParams(); >>>>>>> Init(drawTo: IDisplayContext): void { this.BlockName = "Microphone"; this.Defaults = { gain: 1, monitor: true }; this.PopulateParams();
<<<<<<< import Soundcloud = require("../Sources/Soundcloud"); ======= import BlocksSketch = require("../../BlocksSketch"); >>>>>>> import BlocksSketch = require("../../BlocksSketch"); import Soundcloud = require("../Sources/Soundcloud");
<<<<<<< export class Recorder extends SamplerBase { ======= import IApp = require("../../IApp"); declare var App: IApp; class Recorder extends SamplerBase { >>>>>>> declare var App: IApp; export class Recorder extends SamplerBase {
<<<<<<< import {AnimationsLayer} from './UI/AnimationsLayer'; import {Audio} from './Core/Audio/Audio'; import {ColorThemes} from './UI/ColorThemes'; import {CommandManager} from './Core/Commands/CommandManager'; import {Commands} from './Commands'; import {CommandHandlerFactory} from './Core/Resources/CommandHandlerFactory'; import {CommandsInputManager} from './Core/Inputs/CommandsInputManager'; import {Config} from './Config'; import {CreateBlockCommandHandler} from './CommandHandlers/CreateBlockCommandHandler'; import {DeleteBlockCommandHandler} from './CommandHandlers/DeleteBlockCommandHandler'; import {DisplayList} from './DisplayList'; import {DisplayObjectCollection} from './DisplayObjectCollection'; import {DragFileInputManager} from './Core/Inputs/DragFileInputManager'; import {Effect} from './Blocks/Effect'; import {FocusManager} from './Core/Inputs/FocusManager'; import {FocusManagerEventArgs} from './Core/Inputs/FocusManagerEventArgs'; import {Grid} from './Grid'; import {IApp} from './IApp'; import {IBlock} from './Blocks/IBlock'; import {IEffect} from './Blocks/IEffect'; import {IncrementNumberCommandHandler} from './CommandHandlers/IncrementNumberCommandHandler'; import {ISource} from './Blocks/ISource'; import {InputManager} from './Core/Inputs/InputManager'; import {KeyboardInputManager as KeyboardInput} from './Core/Inputs/KeyboardInputManager'; import {LoadCommandHandler} from './CommandHandlers/LoadCommandHandler'; import {MainScene} from './MainScene'; import {Metrics} from './AppMetrics'; import {MoveBlockCommandHandler} from './CommandHandlers/MoveBlockCommandHandler'; import {OperationManager} from './Core/Operations/OperationManager'; import {PointerInputManager} from './Core/Inputs/PointerInputManager'; import {ResourceManager} from './Core/Resources/ResourceManager'; import {TypingManager} from './Core/Inputs/TypingManager'; import {Particle} from './Particle'; import {PooledFactoryResource} from './Core/Resources/PooledFactoryResource'; import {RedoCommandHandler} from './CommandHandlers/RedoCommandHandler'; import {SaveAsCommandHandler} from './CommandHandlers/SaveAsCommandHandler'; import {SaveCommandHandler} from './CommandHandlers/SaveCommandHandler'; import {SaveFile} from './SaveFile'; import {Serializer} from './Serializer'; import SketchSession = Fayde.Drawing.SketchSession; //TODO: es6 modules import {Source} from './Blocks/Source'; import {Splash} from './Splash'; import {UndoCommandHandler} from './CommandHandlers/UndoCommandHandler'; ======= import AnimationsLayer = require("./UI/AnimationsLayer"); import {Audio} from './Core/Audio/Audio'; import ColorThemes = require("./UI/ColorThemes"); import CommandHandlerFactory = require("./Core/Resources/CommandHandlerFactory"); import CommandManager = require("./Core/Commands/CommandManager"); import Commands = require("./Commands"); import CommandsInputManager = require("./Core/Inputs/CommandsInputManager"); import Config = require("./Config"); import CreateBlockCommandHandler = require("./CommandHandlers/CreateBlockCommandHandler"); import DeleteBlockCommandHandler = require("./CommandHandlers/DeleteBlockCommandHandler"); import DisplayList = require("./DisplayList"); import DisplayObjectCollection = require("./DisplayObjectCollection"); import DragFileInputManager = require("./Core/Inputs/DragFileInputManager"); import Effect = require("./Blocks/Effect"); import FocusManager = require("./Core/Inputs/FocusManager"); import FocusManagerEventArgs = require("./Core/Inputs/FocusManagerEventArgs"); import GA = require("./GA"); import Grid = require("./Grid"); import IApp = require("./IApp"); import IBlock = require("./Blocks/IBlock"); import IEffect = require("./Blocks/IEffect"); import InputManager = require("./Core/Inputs/InputManager"); import ISource = require("./Blocks/ISource"); import KeyboardInput = require("./Core/Inputs/KeyboardInputManager"); import LoadCommandHandler = require("./CommandHandlers/LoadCommandHandler"); import MainScene = require("./MainScene"); import Metrics = require("./AppMetrics"); import MoveBlockCommandHandler = require("./CommandHandlers/MoveBlockCommandHandler"); import ObservableCollection = Fayde.Collections.ObservableCollection; import OperationManager = require("./Core/Operations/OperationManager"); import Particle = require("./Particle"); import PointerInputManager = require("./Core/Inputs/PointerInputManager"); import PooledFactoryResource = require("./Core/Resources/PooledFactoryResource"); import RedoCommandHandler = require("./CommandHandlers/RedoCommandHandler"); import ResourceManager = require("./Core/Resources/ResourceManager"); import SaveAsCommandHandler = require("./CommandHandlers/SaveAsCommandHandler"); import SaveCommandHandler = require("./CommandHandlers/SaveCommandHandler"); import SaveFile = require("./SaveFile"); import Serializer = require("./Serializer"); import SketchSession = Fayde.Drawing.SketchSession; import Source = require("./Blocks/Source"); import Splash = require("./Splash"); import TypingManager = require("./Core/Inputs/TypingManager"); import UndoCommandHandler = require("./CommandHandlers/UndoCommandHandler"); >>>>>>> import {AnimationsLayer} from './UI/AnimationsLayer'; import {Audio} from './Core/Audio/Audio'; import {ColorThemes} from './UI/ColorThemes'; import {CommandManager} from './Core/Commands/CommandManager'; import {Commands} from './Commands'; import {CommandHandlerFactory} from './Core/Resources/CommandHandlerFactory'; import {CommandsInputManager} from './Core/Inputs/CommandsInputManager'; import {Config} from './Config'; import {CreateBlockCommandHandler} from './CommandHandlers/CreateBlockCommandHandler'; import {DeleteBlockCommandHandler} from './CommandHandlers/DeleteBlockCommandHandler'; import {DisplayList} from './DisplayList'; import {DisplayObjectCollection} from './DisplayObjectCollection'; import {DragFileInputManager} from './Core/Inputs/DragFileInputManager'; import {Effect} from './Blocks/Effect'; import {FocusManager} from './Core/Inputs/FocusManager'; import {FocusManagerEventArgs} from './Core/Inputs/FocusManagerEventArgs'; import {GA} from './GA'; import {Grid} from './Grid'; import {IApp} from './IApp'; import {IBlock} from './Blocks/IBlock'; import {IEffect} from './Blocks/IEffect'; import {IncrementNumberCommandHandler} from './CommandHandlers/IncrementNumberCommandHandler'; import {ISource} from './Blocks/ISource'; import {InputManager} from './Core/Inputs/InputManager'; import {KeyboardInputManager as KeyboardInput} from './Core/Inputs/KeyboardInputManager'; import {LoadCommandHandler} from './CommandHandlers/LoadCommandHandler'; import {MainScene} from './MainScene'; import {Metrics} from './AppMetrics'; import {MoveBlockCommandHandler} from './CommandHandlers/MoveBlockCommandHandler'; import {OperationManager} from './Core/Operations/OperationManager'; import {PointerInputManager} from './Core/Inputs/PointerInputManager'; import {ResourceManager} from './Core/Resources/ResourceManager'; import {TypingManager} from './Core/Inputs/TypingManager'; import {Particle} from './Particle'; import {PooledFactoryResource} from './Core/Resources/PooledFactoryResource'; import {RedoCommandHandler} from './CommandHandlers/RedoCommandHandler'; import {SaveAsCommandHandler} from './CommandHandlers/SaveAsCommandHandler'; import {SaveCommandHandler} from './CommandHandlers/SaveCommandHandler'; import {SaveFile} from './SaveFile'; import {Serializer} from './Serializer'; import SketchSession = Fayde.Drawing.SketchSession; //TODO: es6 modules import {Source} from './Blocks/Source'; import {Splash} from './Splash'; import {UndoCommandHandler} from './CommandHandlers/UndoCommandHandler'; <<<<<<< ======= interface Window{ App: IApp; } >>>>>>> interface Window{ App: IApp; }
<<<<<<< import AudioChain = require("../Core/Audio/Connections/AudioChain"); import DisplayObject = require("../DisplayObject"); import Grid = require("../Grid"); import IBlock = require("./IBlock"); import IDisplayObject = require("../IDisplayObject"); import MainScene = require("../MainScene"); import ObservableCollection = Fayde.Collections.ObservableCollection; import ParametersPanel = require("../UI/OptionsPanel"); import Particle = require("../Particle"); import PreEffect = require("./Effects/PreEffect"); import Size = minerva.Size; import ISketchContext = Fayde.Drawing.ISketchContext; class Block extends DisplayObject implements IBlock { ======= import {AudioChain} from '../Core/Audio/Connections/AudioChain'; import {DisplayObject} from '../DisplayObject'; import {Grid} from '../Grid'; import {IApp} from '../IApp'; import {IAudioChain} from '../Core/Audio/Connections/IAudioChain'; import {IBlock} from './IBlock'; import {MainScene} from '../MainScene'; import ObservableCollection = Fayde.Collections.ObservableCollection; //TODO: es6 modules import {OptionsPanel as ParametersPanel} from '../UI/OptionsPanel'; import {Particle} from '../Particle'; import {PreEffect} from './Effects/PreEffect'; import Size = minerva.Size; //TODO: es6 modules declare var App: IApp; export class Block extends DisplayObject implements IBlock { >>>>>>> import {AudioChain} from '../Core/Audio/Connections/AudioChain'; import {DisplayObject} from '../DisplayObject'; import {Grid} from '../Grid'; import {IApp} from '../IApp'; import {IAudioChain} from '../Core/Audio/Connections/IAudioChain'; import {IBlock} from './IBlock'; import {MainScene} from '../MainScene'; import ObservableCollection = Fayde.Collections.ObservableCollection; import {OptionsPanel as ParametersPanel} from '../UI/OptionsPanel'; import {Particle} from '../Particle'; import {PreEffect} from './Effects/PreEffect'; import Size = minerva.Size; import ISketchContext = Fayde.Drawing.ISketchContext; declare var App: IApp; export class Block extends DisplayObject implements IBlock {
<<<<<<< import Grid = require("../../Grid"); import MainScene = require("../../MainScene"); import Source = require("../Source"); import SamplerBase = require("./SamplerBase"); import ISketchContext = Fayde.Drawing.ISketchContext; ======= import {IApp} from '../../IApp'; import {MainScene} from '../../MainScene'; import {SamplerBase} from './SamplerBase'; import {Source} from '../Source'; >>>>>>> import {IApp} from '../../IApp'; import {MainScene} from '../../MainScene'; import {SamplerBase} from './SamplerBase'; import {Source} from '../Source'; import ISketchContext = Fayde.Drawing.ISketchContext;
<<<<<<< public InitJson; ======= private _Timer: Fayde.ClockTimer; private _LastVisualTick: number = new Date(0).getTime(); >>>>>>> public InitJson; private _Timer: Fayde.ClockTimer; private _LastVisualTick: number = new Date(0).getTime(); <<<<<<< var psTween = new TWEEN.Tween({x:panel.Scale}); psTween.to({ x: destination }, t); psTween.onUpdate(function() { panel.Scale = this.x; console.log(this.x); }); psTween.easing( TWEEN.Easing.Quintic.InOut ); psTween.start(); ======= var psTween = new TWEEN.Tween({x:panel.Scale}) .to( {x: destination}, t) .easing(TWEEN.Easing.Quintic.InOut) .onUpdate((obj) => { panel.Scale = obj; }); psTween.start(this._LastVisualTick); >>>>>>> var psTween = new TWEEN.Tween({x:panel.Scale}); psTween.to({ x: destination }, t); psTween.onUpdate(function() { panel.Scale = this.x; console.log(this.x); }); psTween.easing( TWEEN.Easing.Quintic.InOut ); psTween.start();
<<<<<<< import PostEffect = require("../PostEffect"); import Grid = require("../../../Grid"); import MainScene = require("../../../MainScene"); import ISketchContext = Fayde.Drawing.ISketchContext; ======= import {MainScene} from '../../../MainScene'; import {PostEffect} from '../PostEffect'; >>>>>>> import {MainScene} from '../../../MainScene'; import {PostEffect} from '../PostEffect'; import ISketchContext = Fayde.Drawing.ISketchContext;
<<<<<<< .forEach((index) => { // reuse one of the invalid/old elements, or create a new element const element = invalidElements.pop() || this.createAndAddElement() this.configureElement(this._layout, element, index) this.getAndApplyElementPosition(this._layout, element, index) element.classList.remove(this.repositioningClassName) this._elements.set(index, element) }) ======= .forEach((index) => { // reuse one of the invalid/old elements, or create a new element const element = invalidElements.pop() || this.createAndAddElement() this.configureElement(this._layout, element, index) this.positionElement(this._layout, element, index) element.classList.remove(this.repositioningClassName) assert(() => index >= 0) this._elements.set(index, element) }) >>>>>>> .forEach((index) => { // reuse one of the invalid/old elements, or create a new element const element = invalidElements.pop() || this.createAndAddElement() this.configureElement(this._layout, element, index) this.getAndApplyElementPosition(this._layout, element, index) element.classList.remove(this.repositioningClassName) assert(() => index >= 0) this._elements.set(index, element) }) <<<<<<< const newPosition = this.getElementPosition(layout, index) const currentPosition = this._positions.get(element) if (!currentPosition) { throw Error("missing position for element: " + element) } if (newPosition[0] == currentPosition[0] && newPosition[1] == currentPosition[1]) { return } const size: NumberTuple = [element.offsetWidth, element.offsetHeight] const improvedPositions = this.getImprovedPositions(currentPosition, newPosition, size) if (typeof improvedPositions !== 'undefined') { const improvedStartPosition = improvedPositions[0] if (typeof improvedStartPosition !== 'undefined') { this.applyElementPosition(element, improvedStartPosition, index) } } element.getBoundingClientRect() ======= assert(() => index >= 0) >>>>>>> assert(() => index >= 0) const newPosition = this.getElementPosition(layout, index) const currentPosition = this._positions.get(element) if (!currentPosition) { throw Error("missing position for element: " + element) } if (newPosition[0] == currentPosition[0] && newPosition[1] == currentPosition[1]) { return } const size: NumberTuple = [element.offsetWidth, element.offsetHeight] const improvedPositions = this.getImprovedPositions(currentPosition, newPosition, size) if (typeof improvedPositions !== 'undefined') { const improvedStartPosition = improvedPositions[0] if (typeof improvedStartPosition !== 'undefined') { this.applyElementPosition(element, improvedStartPosition, index) } } element.getBoundingClientRect() <<<<<<< const finalIndices = this.currentIndices ======= const newIndices = sort(this.currentIndices) >>>>>>> const finalIndices = sort(this.currentIndices)
<<<<<<< }, contentTypeHeader); // authentication (petstore_auth) required // oauth required if (configuration.accessToken) { fetchOptions.headers = Object.assign({ "Authorization": "Bearer " + configuration.accessToken, }, contentTypeHeader); } ======= }, contentTypeHeader, fetchOptions.headers); >>>>>>> }, contentTypeHeader, fetchOptions.headers); // authentication (petstore_auth) required // oauth required if (configuration.accessToken) { fetchOptions.headers = Object.assign({ "Authorization": "Bearer " + configuration.accessToken, }, contentTypeHeader); }
<<<<<<< export {default as Dropdown} from "../vue/dropdown.vue"; export {default as File} from "../vue/file.vue"; ======= export {default as Dropdown} from "../vue/dropdown.vue"; export {default as MatrixDropdown} from "../vue/matrixdropdown.vue"; export {default as Errors} from "../vue/errors.vue"; >>>>>>> export {default as Dropdown} from "../vue/dropdown.vue"; export {default as File} from "../vue/file.vue"; export {default as MatrixDropdown} from "../vue/matrixdropdown.vue"; export {default as Errors} from "../vue/errors.vue";
<<<<<<< ======= import { assign } from "lodash"; import { AdaptiveElement } from "../../src/action-bar"; >>>>>>> import { AdaptiveElement } from "../../src/action-bar"; <<<<<<< model.canGrow = true; var manager = new ResponsibilityManager(<any>container, <any>model, 5); ======= model.canGrowValue = true; var manager = new ResponsibilityManager(<any>container, model, 5); >>>>>>> model.canGrowValue = true; var manager = new ResponsibilityManager(<any>container, model, 5); <<<<<<< model.canGrow = true; var manager = new ResponsibilityManager(<any>container, <any>model, 5); ======= model.canGrowValue = true; var manager = new ResponsibilityManager(<any>container, model, 5); >>>>>>> model.canGrowValue = true; var manager = new ResponsibilityManager(<any>container, model, 5); <<<<<<< assert.ok(model.canGrow, "process grew container"); }); QUnit.test( "Check on element when last item with bigger of equal size than dots item's", function (assert) { var container = new SimpleContainer({ offsetWidth: 5, scrollWidth: 11 }); var model = new TestModel(); var manager = new ResponsibilityManager(<any>container, <any>model, 5); manager.getComputedStyle = () => { return { boxSizing: "content-box" }; }; manager.getItemSizes = () => { return [5]; }; manager.process(); assert.equal(model.visibleElementsCount, 1); } ); ======= assert.ok(model.canGrowValue, "process grew container"); }); >>>>>>> assert.ok(model.canGrowValue, "process grew container"); }); QUnit.test( "Check on element when last item with bigger of equal size than dots item's", function (assert) { var container = new SimpleContainer({ offsetWidth: 5, scrollWidth: 11 }); var model = new TestModel(); var manager = new ResponsibilityManager(<any>container, <any>model, 5); manager.getComputedStyle = () => { return { boxSizing: "content-box" }; }; manager.getItemSizes = () => { return [5]; }; manager.process(); assert.equal(model.visibleElementsCount, 1); } );
<<<<<<< import { IActionBarItem } from "../../../base"; import { ObjectWrapper } from "../../../utils/objectwrapper"; ======= >>>>>>> import { IActionBarItem } from "../../../action-bar"; <<<<<<< export class AdaptiveElement { ======= export interface IActionBarItem { /** * Unique string id */ id: string; /** * Set this property to false to make the toolbar item invisible. */ visible?: any; /** * Toolbar item title */ title?: any; /** * Toolbar item tooltip */ tooltip?: any; /** * Set this property to false to disable the toolbar item. */ enabled?: any; /** * Set this property to false to hide the toolbar item title. */ showTitle?: any; /** * A callback that calls on toolbar item click. */ action?: (context?: any) => void; /** * Toolbar item css class */ css?: any; /** * Toolbar inner element css class */ innerCss?: any; /** * Toolbar item data object. Used as data for custom template or component rendering */ data?: any; popupModel?: any; //TODO: temp, use data insted isActive?: any; //TODO: temp needSeparator?: any; //TODO: temp /** * Toolbar item template name */ template?: string; /** * Toolbar item component name */ component?: any; /** * Toolbar item icon name */ iconName?: string; /** * Toolbar item child items. Can be used as contianer for options */ items?: any; } /** * The toolbar item description. */ export abstract class AdaptiveElement { >>>>>>> export abstract class AdaptiveElement {
<<<<<<< import { JsonObject } from "../src/jsonobject"; import { FlowPanelModel } from "../src/flowpanel"; ======= import { JsonObject, JsonUnknownPropertyError } from "../src/jsonobject"; import { QuestionPanelDynamicModel } from "../src/question_paneldynamic"; >>>>>>> import { JsonObject, JsonUnknownPropertyError } from "../src/jsonobject"; import { QuestionPanelDynamicModel } from "../src/question_paneldynamic"; import { FlowPanelModel } from "../src/flowpanel";
<<<<<<< export {default as MultipleText} from "../vue/multipletext.vue"; export {default as Dropdown} from "../vue/dropdown.vue"; ======= export {default as MultipleText} from "../vue/multipletext.vue"; export {default as Matrix} from "../vue/matrix.vue"; >>>>>>> export {default as MultipleText} from "../vue/multipletext.vue"; export {default as Matrix} from "../vue/matrix.vue"; export {default as Dropdown} from "../vue/dropdown.vue";
<<<<<<< ======= import { QuestionFactory } from "../src/questionfactory"; import { settings } from "../src/settings"; >>>>>>> import { settings } from "../src/settings";
<<<<<<< export {default as OtherChoice} from '../vue/otherChoice.vue'; export {default as Comment} from '../vue/comment.vue'; ======= export {default as OtherChoice} from '../vue/otherChoice.vue'; export {default as Rating} from "../vue/rating.vue"; >>>>>>> export {default as OtherChoice} from '../vue/otherChoice.vue'; export {default as Rating} from "../vue/rating.vue"; export {default as Comment} from '../vue/comment.vue';
<<<<<<< // common export * from '../basetests'; export * from '../choicesRestfulltests'; export * from '../conditionstests'; export * from '../jsonobjecttests'; export * from '../surveyLocalizationTests'; export * from '../surveyquestiontests'; export * from '../surveyserializationtests'; export * from '../surveytests'; export * from '../paneltests'; export * from '../surveytriggertests'; export * from '../surveyvalidatortests'; export * from '../textPreprocessorTests'; ======= export {Survey} from "../../src/knockout/kosurvey"; export {QuestionMatrixDynamic} from "../../src/knockout/koquestion_matrixdynamic"; export {QuestionRating} from "../../src/knockout/koquestion_rating"; export {QuestionComment} from "../../src/knockout/koquestion_comment"; >>>>>>> // common export * from '../basetests'; export * from '../choicesRestfulltests'; export * from '../conditionstests'; export * from '../jsonobjecttests'; export * from '../surveyLocalizationTests'; export * from '../surveyquestiontests'; export * from '../surveyserializationtests'; export * from '../surveytests'; export * from '../paneltests'; export * from '../surveytriggertests'; export * from '../surveyvalidatortests'; export * from '../textPreprocessorTests'; export {Survey} from "../../src/knockout/kosurvey"; export {QuestionMatrixDynamic} from "../../src/knockout/koquestion_matrixdynamic"; export {QuestionRating} from "../../src/knockout/koquestion_rating"; export {QuestionComment} from "../../src/knockout/koquestion_comment";
<<<<<<< if (element === document.body) { return <any>window; } ======= >>>>>>>
<<<<<<< import { SchemaDirectiveVisitor } from 'graphql-tools'; import { ModuleSessionInfo } from '../src/module-session-info'; ======= import { SchemaDirectiveVisitor, makeExecutableSchema } from 'graphql-tools'; >>>>>>> import { SchemaDirectiveVisitor, makeExecutableSchema } from 'graphql-tools'; import { ModuleSessionInfo } from '../src/module-session-info'; <<<<<<< describe('Providers Scope', async () => { it('should construct session scope on each network request', async () => { let counter = 0; @Injectable({ scope: ProviderScope.Session, }) class ProviderA { constructor() { counter++; } test(injector: Injector) { return (this === injector.get(ProviderA)); } } const { schema, context } = new GraphQLModule({ typeDefs: gql` type Query{ test: Boolean } `, resolvers: { Query: { test: (root: never, args: never, { injector }: ModuleContext) => injector.get(ProviderA).test(injector), }, }, providers: [ ProviderA, ], }); expect(counter).toBe(0); const result1 = await execute({ schema, document: gql` query { test } `, contextValue: await context({ req: {} }), }); expect(result1.data['test']).toBe(true); expect(counter).toBe(1); const result2 = await execute({ schema, document: gql` query { test } `, contextValue: await context({ req: {} }), }); expect(result2.data['test']).toBe(true); expect(counter).toBe(2); }); it('should construct request scope on each injector request independently from network request', async () => { let counter = 0; @Injectable({ scope: ProviderScope.Request, }) class ProviderA { constructor() { counter++; } } const { context, injector } = new GraphQLModule({ providers: [ProviderA ]}); expect(counter).toBe(0); await context({ mustBe: 0 }); expect(counter).toBe(0); injector.get(ProviderA); expect(counter).toBe(1); injector.get(ProviderA); expect(counter).toBe(2); }); it('should inject network request with moduleSessionInfo in session and request scope providers', async () => { const testRequest = { foo: 'BAR', }; @Injectable({ scope: ProviderScope.Session, }) class ProviderA { constructor(private moduleInfo: ModuleSessionInfo) {} test() { return this.moduleInfo.request.foo; } } @Injectable({ scope: ProviderScope.Request, }) class ProviderB { constructor(private moduleInfo: ModuleSessionInfo) {} test() { return this.moduleInfo.request.foo; } } const { schema, context } = new GraphQLModule({ typeDefs: gql` type Query{ testA: String testB: String } `, resolvers: { Query: { testA: (root: never, args: never, { injector }: ModuleContext) => injector.get(ProviderA).test(), testB: (root: never, args: never, { injector }: ModuleContext) => injector.get(ProviderB).test(), }, }, providers: [ ProviderA, ProviderB, ], }); const result = await execute({ schema, document: gql` query { testA testB } `, contextValue: await context(testRequest), }); expect(result.errors).toBeFalsy(); expect(result.data['testA']).toBe('BAR'); expect(result.data['testB']).toBe('BAR'); }); }); ======= describe('Extra Schemas', async () => { it('should handle extraSchemas together with local ones', async () => { const extraSchema = makeExecutableSchema({ typeDefs: gql` type Query { foo: String } `, resolvers: { Query: { foo: () => 'FOO', }, }, }); const { schema, context } = new GraphQLModule({ typeDefs: gql` type Query { bar: String } `, resolvers: { Query : { bar: () => 'BAR', }, }, extraSchemas: [ extraSchema, ], }); const contextValue = await context({ req: {} }); const result = await execute({ schema, document: gql`query { foo bar }`, contextValue, }); expect(result.data['foo']).toBe('FOO'); expect(result.data['bar']).toBe('BAR'); }); }); >>>>>>> describe('Providers Scope', async () => { it('should construct session scope on each network request', async () => { let counter = 0; @Injectable({ scope: ProviderScope.Session, }) class ProviderA { constructor() { counter++; } test(injector: Injector) { return (this === injector.get(ProviderA)); } } const { schema, context } = new GraphQLModule({ typeDefs: gql` type Query{ test: Boolean } `, resolvers: { Query: { test: (root: never, args: never, { injector }: ModuleContext) => injector.get(ProviderA).test(injector), }, }, providers: [ ProviderA, ], }); expect(counter).toBe(0); const result1 = await execute({ schema, document: gql` query { test } `, contextValue: await context({ req: {} }), }); expect(result1.data['test']).toBe(true); expect(counter).toBe(1); const result2 = await execute({ schema, document: gql` query { test } `, contextValue: await context({ req: {} }), }); expect(result2.data['test']).toBe(true); expect(counter).toBe(2); }); it('should construct request scope on each injector request independently from network request', async () => { let counter = 0; @Injectable({ scope: ProviderScope.Request, }) class ProviderA { constructor() { counter++; } } const { context, injector } = new GraphQLModule({ providers: [ProviderA] }); expect(counter).toBe(0); await context({ mustBe: 0 }); expect(counter).toBe(0); injector.get(ProviderA); expect(counter).toBe(1); injector.get(ProviderA); expect(counter).toBe(2); }); it('should inject network request with moduleSessionInfo in session and request scope providers', async () => { const testRequest = { foo: 'BAR', }; @Injectable({ scope: ProviderScope.Session, }) class ProviderA { constructor(private moduleInfo: ModuleSessionInfo) { } test() { return this.moduleInfo.request.foo; } } @Injectable({ scope: ProviderScope.Request, }) class ProviderB { constructor(private moduleInfo: ModuleSessionInfo) { } test() { return this.moduleInfo.request.foo; } } const { schema, context } = new GraphQLModule({ typeDefs: gql` type Query{ testA: String testB: String } `, resolvers: { Query: { testA: (root: never, args: never, { injector }: ModuleContext) => injector.get(ProviderA).test(), testB: (root: never, args: never, { injector }: ModuleContext) => injector.get(ProviderB).test(), }, }, providers: [ ProviderA, ProviderB, ], }); const result = await execute({ schema, document: gql` query { testA testB } `, contextValue: await context(testRequest), }); expect(result.errors).toBeFalsy(); expect(result.data['testA']).toBe('BAR'); expect(result.data['testB']).toBe('BAR'); }); }); describe('Extra Schemas', async () => { it('should handle extraSchemas together with local ones', async () => { const extraSchema = makeExecutableSchema({ typeDefs: gql` type Query { foo: String } `, resolvers: { Query: { foo: () => 'FOO', }, }, }); const { schema, context } = new GraphQLModule({ typeDefs: gql` type Query { bar: String } `, resolvers: { Query: { bar: () => 'BAR', }, }, extraSchemas: [ extraSchema, ], }); const contextValue = await context({ req: {} }); const result = await execute({ schema, document: gql`query { foo bar }`, contextValue, }); expect(result.data['foo']).toBe('FOO'); expect(result.data['bar']).toBe('BAR'); }); });
<<<<<<< type MockResponse<T> = { res: EventEmitter, } & T; const createMockSession = <T>(customProps?: T): MockResponse<T> => { ======= type MockSession<T> = { res: EventEmitter } & T; const createMockSession = <T>(customProps?: T): MockSession<T> => { >>>>>>> type MockSession<T> = { res: EventEmitter } & T; const createMockSession = <T>(customProps?: T): MockSession<T> => { <<<<<<< it('should not have _onceFinishListeners on response object', async (done) => { let counter = 0; @Injectable({ scope: ProviderScope.Session, }) class FooProvider implements OnResponse { onResponse() { counter++; } getCounter() { return counter; } } const module = new GraphQLModule({ typeDefs: gql` type Query { foo: Int ======= it('should not have _onceFinishListeners on response object', async (done) => { let counter = 0; @Injectable({ scope: ProviderScope.Session, }) class FooProvider implements OnResponse { onResponse() { counter++; >>>>>>> it('should not have _onceFinishListeners on response object', async (done) => { let counter = 0; @Injectable({ scope: ProviderScope.Session, }) class FooProvider implements OnResponse { onResponse() { counter++; } getCounter() { return counter; } } const module = new GraphQLModule({ typeDefs: gql` type Query { foo: Int <<<<<<< mockRequest.res.once('finish', () => { setTimeout(() => { // tslint:disable-next-line: no-console console.log('resolved'); // tslint:disable-next-line: no-console console.time('GC'); (global.gc as any)(true); // tslint:disable-next-line: no-console console.timeEnd('GC'); resolve(); }, 60000); }); mockRequest.res.emit('finish'); expect(data.aLoadLength).toBe(1000); expect(data.bLoadLength).toBe(1000); expect(data.abLoadLength).toBe(1000); expect(data.baLoadLength).toBe(1000); // tslint:disable-next-line: no-console console.log(counter); })).then(() => { done(); }).catch(done.fail); ======= // Result expect(data.foo).toBe(0); // Before onResponse expect(counter).toBe(0); session.res.emit('finish'); // After onResponse expect(counter).toBe(1); // Check if the listener is triggered again session.res.emit('finish'); expect(counter).toBe(1); setTimeout(() => { try { // Response object must be cleared expect(session.res['_onceFinishListeners']).toBeUndefined(); expect(module.injector.hasSessionInjector(session)).toBeFalsy(); expect(module['_sessionContext$Map'].has(session)).toBeFalsy(); done(); } catch (e) { done.fail(e); } }, 1000); >>>>>>> mockRequest.res.once('finish', () => { setTimeout(() => { // tslint:disable-next-line: no-console console.log('resolved'); // tslint:disable-next-line: no-console console.time('GC'); (global.gc as any)(true); // tslint:disable-next-line: no-console console.timeEnd('GC'); resolve(); }, 1000); }); mockRequest.res.emit('finish'); expect(data.aLoadLength).toBe(1000); expect(data.bLoadLength).toBe(1000); expect(data.abLoadLength).toBe(1000); expect(data.baLoadLength).toBe(1000); // tslint:disable-next-line: no-console console.log(counter); })).then(() => { done(); }).catch(done.fail);
<<<<<<< import { IResolvers, makeExecutableSchema, SchemaDirectiveVisitor, mergeSchemas } from 'graphql-tools'; ======= import { IResolvers, makeExecutableSchema, SchemaDirectiveVisitor, ILogger, mergeSchemas } from 'graphql-tools'; >>>>>>> import { IResolvers, makeExecutableSchema, SchemaDirectiveVisitor, ILogger, mergeSchemas } from 'graphql-tools'; <<<<<<< ======= get resolvers(): IResolvers { if (typeof this._cache.resolvers === 'undefined') { this.buildSchemaAndInjector(this.modulesMap); } return this._cache.resolvers; } get schemaDirectives(): ISchemaDirectives { if (typeof this._cache.schemaDirectives === 'undefined') { this.buildSchemaAndInjector(this.modulesMap); } return this._cache.schemaDirectives; } get selfExtraSchemas(): GraphQLSchema[] { let extraSchemas = new Array<GraphQLSchema>(); const extraSchemasDefinitions = this._options.extraSchemas; if (extraSchemasDefinitions) { if (typeof extraSchemasDefinitions === 'function') { extraSchemas = extraSchemasDefinitions(this); } else { extraSchemas = extraSchemasDefinitions; } } return extraSchemas; } /** * Build a GraphQL `context` object based on a network request. * It iterates over all modules by their dependency-based order, and executes * `contextBuilder` method. * It also in charge of injecting a reference to the application `Injector` to * the `context`. * The network request is passed to each `contextBuilder` method, and the return * value of each `contextBuilder` is merged into a unified `context` object. * * This method should be in use with your GraphQL manager, such as Apollo-Server. * * @param request - the network request from `connect`, `express`, etc... */ context = (request: Request) => this.contextBuilder(request); >>>>>>> get selfExtraSchemas(): GraphQLSchema[] { let extraSchemas = new Array<GraphQLSchema>(); const extraSchemasDefinitions = this._options.extraSchemas; if (extraSchemasDefinitions) { if (typeof extraSchemasDefinitions === 'function') { extraSchemas = extraSchemasDefinitions(this); } else { extraSchemas = extraSchemasDefinitions; } } return extraSchemas; } <<<<<<< private addSessionInjectorToSelfResolversContext() { const resolvers = this.selfResolvers; // tslint:disable-next-line:forin for (const type in resolvers) { const typeResolvers = resolvers[type]; // tslint:disable-next-line:forin for (const prop in resolvers[type]) { const resolver = typeResolvers[prop]; if (typeof resolver === 'function') { if (prop !== '__resolveType') { typeResolvers[prop] = async (root: any, args: any, appContext: any, info: any) => { const { networkRequest } = appContext; const moduleContext = await this.context(networkRequest); return resolver.call(typeResolvers, root, args, moduleContext, info); }; } else { typeResolvers[prop] = async (root: any, appContext: any, info: any) => { const { networkRequest } = appContext; const moduleContext = await this.context(networkRequest); return resolver.call(typeResolvers, root, moduleContext as any, info); }; } } } } return resolvers; } private addSessionInjectorToSelfResolversCompositionContext() { const resolversComposition = this.selfResolversComposition; // tslint:disable-next-line:forin for (const path in resolversComposition) { const compositionArr = asArray(resolversComposition[path]); resolversComposition[path] = [ (next: any) => async (root: any, args: any, appContext: any, info: any) => { const { networkRequest } = appContext; const moduleContext = await this.context(networkRequest); return next(root, args, moduleContext, info); }, ...compositionArr, ]; } return resolversComposition; } ======= get selfLogger(): ILogger { let logger: ILogger; const loggerDefinitions = this._options.logger; if (loggerDefinitions) { if (typeof logger === 'function') { logger = (loggerDefinitions as any)(this); } else { logger = loggerDefinitions as ILogger; } } return logger; } >>>>>>> private addSessionInjectorToSelfResolversContext() { const resolvers = this.selfResolvers; // tslint:disable-next-line:forin for (const type in resolvers) { const typeResolvers = resolvers[type]; // tslint:disable-next-line:forin for (const prop in resolvers[type]) { const resolver = typeResolvers[prop]; if (typeof resolver === 'function') { if (prop !== '__resolveType') { typeResolvers[prop] = async (root: any, args: any, appContext: any, info: any) => { const { networkRequest } = appContext; const moduleContext = await this.context(networkRequest); return resolver.call(typeResolvers, root, args, moduleContext, info); }; } else { typeResolvers[prop] = async (root: any, appContext: any, info: any) => { const { networkRequest } = appContext; const moduleContext = await this.context(networkRequest); return resolver.call(typeResolvers, root, moduleContext as any, info); }; } } } } return resolvers; } private addSessionInjectorToSelfResolversCompositionContext() { const resolversComposition = this.selfResolversComposition; // tslint:disable-next-line:forin for (const path in resolversComposition) { const compositionArr = asArray(resolversComposition[path]); resolversComposition[path] = [ (next: any) => async (root: any, args: any, appContext: any, info: any) => { const { networkRequest } = appContext; const moduleContext = await this.context(networkRequest); return next(root, args, moduleContext, info); }, ...compositionArr, ]; } return resolversComposition; } get selfLogger(): ILogger { let logger: ILogger; const loggerDefinitions = this._options.logger; if (loggerDefinitions) { if (typeof logger === 'function') { logger = (loggerDefinitions as any)(this); } else { logger = loggerDefinitions as ILogger; } } return logger; } <<<<<<< ======= const importsSchemaDirectives = new Set<ISchemaDirectives>(); const importsExtraSchemas = new Set<GraphQLSchema>(); >>>>>>> <<<<<<< const { injector, schema, contextBuilder } = module._cache; ======= const injector = module._cache.injector; const resolvers = module._cache.resolvers; const typeDefs = module._cache.typeDefs; const contextBuilder = module._cache.contextBuilder; const schemaDirectives = module._cache.schemaDirectives; const extraSchemas = module._cache.extraSchemas; >>>>>>> const { injector, schema, contextBuilder } = module._cache; <<<<<<< if (schema) { importsSchemas.add(schema); ======= importsResolvers.add(resolvers); if (typeDefs && typeDefs.length) { if (Array.isArray(typeDefs)) { for (const typeDef of typeDefs) { importsTypeDefs.add(typeDef); } } else { importsTypeDefs.add(typeDefs); } >>>>>>> if (schema) { importsSchemas.add(schema); <<<<<<< ======= importsSchemaDirectives.add(schemaDirectives); for (const extraSchema of extraSchemas) { importsExtraSchemas.add(extraSchema); } >>>>>>> <<<<<<< /** * Build a GraphQL `context` object based on a network request. * It iterates over all modules by their dependency-based order, and executes * `contextBuilder` method. * It also in charge of injecting a reference to the application `Injector` to * the `context`. * The network request is passed to each `contextBuilder` method, and the return * value of each `contextBuilder` is merged into a unified `context` object. * * This method should be in use with your GraphQL manager, such as Apollo-Server. * * @param request - the network request from `connect`, `express`, etc... */ get context(): (networkRequest: Request) => Promise<ModuleContext<Context>> { if (!this._cache.contextBuilder) { this.buildSchemaAndInjector(this.modulesMap); } return this._cache.contextBuilder.bind(this); } get modulesMap() { if (!this._cache.modulesMap) { let modulesMap = this.createInitialModulesMap(); modulesMap = this.checkAndFixModulesMap(modulesMap); this._cache.modulesMap = modulesMap; ======= get modulesMap() { if (!this._cache.modulesMap) { let modulesMap = this.createInitialModulesMap(); modulesMap = this.checkAndFixModulesMap(modulesMap); this._cache.modulesMap = modulesMap; >>>>>>> /** * Build a GraphQL `context` object based on a network request. * It iterates over all modules by their dependency-based order, and executes * `contextBuilder` method. * It also in charge of injecting a reference to the application `Injector` to * the `context`. * The network request is passed to each `contextBuilder` method, and the return * value of each `contextBuilder` is merged into a unified `context` object. * * This method should be in use with your GraphQL manager, such as Apollo-Server. * * @param request - the network request from `connect`, `express`, etc... */ get context(): (networkRequest: Request) => Promise<ModuleContext<Context>> { if (!this._cache.contextBuilder) { this.buildSchemaAndInjector(this.modulesMap); } return this._cache.contextBuilder.bind(this); } get modulesMap() { if (!this._cache.modulesMap) { let modulesMap = this.createInitialModulesMap(); modulesMap = this.checkAndFixModulesMap(modulesMap); this._cache.modulesMap = modulesMap; <<<<<<< for (const provider of module.selfProviders) { providersSet.add(provider); } resolversCompositionSet.add(module.selfResolversComposition); schemaDirectivesSet.add(module.selfSchemaDirectives); } const name = [...nameSet].join('+'); const typeDefs = [...typeDefsSet]; const resolvers = mergeResolvers([...resolversSet]); const context = [...contextBuilderSet].reduce( (accContextBuilder, currentContextBuilder) => { return async (networkRequest, currentContext, injector) => { const accContext = await accContextBuilder(networkRequest, currentContext, injector); const moduleContext = typeof currentContextBuilder === 'function' ? await currentContextBuilder(networkRequest, currentContext, injector) : (currentContextBuilder || {}); return { ...accContext as any, ...moduleContext as any, }; }; }, ); const imports = [...importsSet]; const providers = [...providersSet]; const resolversComposition = deepmerge.all([...resolversCompositionSet]); const schemaDirectives = deepmerge.all([...schemaDirectivesSet]) as ISchemaDirectives; return new GraphQLModule<Config, Request, Context>({ name, typeDefs, resolvers, context, imports, providers, resolversComposition, schemaDirectives, }); } } ======= for (const provider of module.selfProviders) { providersSet.add(provider); } resolversCompositionSet.add(module.selfResolversComposition); schemaDirectivesSet.add(module.selfSchemaDirectives); for (const extraSchema of module.selfExtraSchemas) { extraSchemasSet.add(extraSchema); } loggerSet.add(module.selfLogger); } const name = [...nameSet].join('+'); const typeDefs = [...typeDefsSet]; const resolvers = mergeResolvers([...resolversSet]); const contextBuilder = [...contextBuilderSet].reduce( (accContextBuilder, currentContextBuilder) => { return async (networkRequest, currentContext, injector) => { const accContext = await accContextBuilder(networkRequest, currentContext, injector); const moduleContext = currentContextBuilder ? await currentContextBuilder(networkRequest, currentContext, injector) : {}; return Object.assign({}, accContext, moduleContext); }; }, ); const imports = [...importsSet]; const providers = [...providersSet]; const resolversComposition = deepmerge.all([...resolversCompositionSet]); const schemaDirectives = deepmerge.all([...schemaDirectivesSet]) as ISchemaDirectives; const logger = { log(message: string) { for (const logger of loggerSet) { logger.log(message); } }, }; const extraSchemas = [...extraSchemasSet]; return new GraphQLModule<Config, Request, Context>({ name, typeDefs, resolvers, contextBuilder, imports, providers, resolversComposition, schemaDirectives, extraSchemas, logger, }); } } >>>>>>> for (const provider of module.selfProviders) { providersSet.add(provider); } resolversCompositionSet.add(module.selfResolversComposition); schemaDirectivesSet.add(module.selfSchemaDirectives); for (const extraSchema of module.selfExtraSchemas) { extraSchemasSet.add(extraSchema); } loggerSet.add(module.selfLogger); } const name = [...nameSet].join('+'); const typeDefs = [...typeDefsSet]; const resolvers = mergeResolvers([...resolversSet]); const context = [...contextBuilderSet].reduce( (accContextBuilder, currentContextBuilder) => { return async (networkRequest, currentContext, injector) => { const accContext = await accContextBuilder(networkRequest, currentContext, injector); const moduleContext = typeof currentContextBuilder === 'function' ? await currentContextBuilder(networkRequest, currentContext, injector) : (currentContextBuilder || {}); return { ...accContext as any, ...moduleContext as any, }; }; }, ); const imports = [...importsSet]; const providers = [...providersSet]; const resolversComposition = deepmerge.all([...resolversCompositionSet]); const schemaDirectives = deepmerge.all([...schemaDirectivesSet]) as ISchemaDirectives; const logger = { log(message: string) { for (const logger of loggerSet) { logger.log(message); } }, }; const extraSchemas = [...extraSchemasSet]; return new GraphQLModule<Config, Request, Context>({ name, typeDefs, resolvers, context, imports, providers, resolversComposition, schemaDirectives, extraSchemas, logger, }); } }
<<<<<<< import { DependencyModuleNotFoundError, SchemaNotValidError, DependencyModuleUndefinedError, TypeDefNotFoundError } from './errors'; import deepmerge = require('deepmerge'); import { ModuleSessionInfo } from './module-session-info'; import { asArray } from './utils'; import { ModuleContext } from './types'; ======= import { DependencyModuleNotFoundError, SchemaNotValidError, DependencyModuleUndefinedError, TypeDefNotFoundError, ModuleConfigRequiredError } from './errors'; import * as deepmerge from 'deepmerge'; import { addInjectorToResolversContext, addInjectorToResolversCompositionContext, asArray } from './utils'; >>>>>>> import { DependencyModuleNotFoundError, SchemaNotValidError, DependencyModuleUndefinedError, TypeDefNotFoundError, ModuleConfigRequiredError } from './errors'; import * as deepmerge from 'deepmerge'; import { ModuleSessionInfo } from './module-session-info'; import { asArray } from './utils'; import { ModuleContext } from './types'; <<<<<<< return this._cache.typeDefs; ======= const selfTypeDefs = this.selfTypeDefs; if (selfTypeDefs) { typeDefsSet.add(selfTypeDefs); } this._cache.typeDefs = mergeGraphQLSchemas([...typeDefsSet], { useSchemaDefinition: false, }); } get resolvers(): IResolvers<any, ModuleContext<Context>> { if (typeof this._cache.resolvers === 'undefined') { this.buildSchemaAndInjector(this.modulesMap); } return this._cache.resolvers; } get schemaDirectives(): ISchemaDirectives { if (typeof this._cache.schemaDirectives === 'undefined') { this.buildSchemaAndInjector(this.modulesMap); } return this._cache.schemaDirectives; >>>>>>> return this._cache.typeDefs; <<<<<<< ======= if ('middleware' in this._options) { const middlewareResult = this._options.middleware(this._cache); this._cache = Object.assign(this._cache, middlewareResult); } >>>>>>> if ('middleware' in this._options) { const middlewareResult = this._options.middleware(this._cache); this._cache = Object.assign(this._cache, middlewareResult); } <<<<<<< static mergeModules<Config = any, Request = any, Context = any>(modules: Array<GraphQLModule<any, Request, any>>, modulesMap?: ModulesMap<Request>): GraphQLModule<Config, Request, Context> { const nameSet = new Set<string>(); const typeDefsSet = new Set<DocumentNode>(); const resolversSet = new Set<IResolvers>(); const contextBuilderSet = new Set<BuildContextFn<Config, Request, Context>>(); ======= static mergeModules<Config = any, Request = any, Context = any>( modules: Array<GraphQLModule<any, Request, any>>, warnCircularImports = false, modulesMap?: ModulesMap<Request>): GraphQLModule<Config, Request, Context> { const nameSet = new Set(); const typeDefsSet = new Set(); const resolversSet = new Set<IResolvers<any, any>>(); const contextBuilderSet = new Set<BuildContextFn<Request, any>>(); >>>>>>> static mergeModules<Config = any, Request = any, Context = any>( modules: Array<GraphQLModule<any, Request, any>>, warnCircularImports = false, modulesMap?: ModulesMap<Request>): GraphQLModule<Config, Request, Context> { const nameSet = new Set(); const typeDefsSet = new Set(); const resolversSet = new Set<IResolvers<any, any>>(); const contextBuilderSet = new Set<BuildContextFn<any, Request, any>>(); <<<<<<< directiveResolvers, extraSchemas, ======= >>>>>>> directiveResolvers,
<<<<<<< const keyCode = this.inputService.rawValue.charCodeAt(this.inputService.rawValue.length - 1); const rawValueLength = this.inputService.rawValue.length; const rawValueSelectionEnd = this.inputService.inputSelection.selectionEnd; const storedRawValueLength = this.inputService.storedRawValue.length; ======= if (this.isReadOnly()) { return; } let keyCode = this.inputService.rawValue.charCodeAt(this.inputService.rawValue.length - 1); let rawValueLength = this.inputService.rawValue.length; let rawValueSelectionEnd = this.inputService.inputSelection.selectionEnd; let storedRawValueLength = this.inputService.storedRawValue.length; >>>>>>> if (this.isReadOnly()) { return; } const keyCode = this.inputService.rawValue.charCodeAt(this.inputService.rawValue.length - 1); const rawValueLength = this.inputService.rawValue.length; const rawValueSelectionEnd = this.inputService.inputSelection.selectionEnd; const storedRawValueLength = this.inputService.storedRawValue.length; <<<<<<< const keyCode = event.which || event.charCode || event.keyCode; ======= if (this.isReadOnly()) { return; } let keyCode = event.which || event.charCode || event.keyCode; >>>>>>> if (this.isReadOnly()) { return; } const keyCode = event.which || event.charCode || event.keyCode; <<<<<<< const keyCode = event.which || event.charCode || event.keyCode; ======= if (this.isReadOnly()) { return; } let keyCode = event.which || event.charCode || event.keyCode; >>>>>>> if (this.isReadOnly()) { return; } const keyCode = event.which || event.charCode || event.keyCode;
<<<<<<< import { HighlightPipe } from './classes/highlight.pipe'; import { AnsiColorizePipe } from './classes/ansi-colorize.pipe'; import { RunScriptsDirective } from './classes/run-scripts.directive'; ======= import {PreviewPipe} from "./classes/preview.pipe"; >>>>>>> import { HighlightPipe } from './classes/highlight.pipe'; import { AnsiColorizePipe } from './classes/ansi-colorize.pipe'; import { RunScriptsDirective } from './classes/run-scripts.directive'; import {PreviewPipe} from "./classes/preview.pipe"; <<<<<<< CardComponent, HighlightPipe, AnsiColorizePipe, RunScriptsDirective ======= CardComponent, PreviewPipe >>>>>>> CardComponent, HighlightPipe, AnsiColorizePipe, RunScriptsDirective, PreviewPipe
<<<<<<< import { Base64ImageComponent } from './base64-image/base64-image.component'; import { CustomMarkdownComponent } from './custom-markdown/custom-markdown.component'; ======= import { PlotlyComponent } from './plotly/plotly.component'; >>>>>>> import { PlotlyComponent } from './plotly/plotly.component'; import { Base64ImageComponent } from './base64-image/base64-image.component'; import { CustomMarkdownComponent } from './custom-markdown/custom-markdown.component'; <<<<<<< VDOMComponent, Base64ImageComponent, CustomMarkdownComponent ======= PlotlyComponent, VDOMComponent >>>>>>> VDOMComponent, Base64ImageComponent, CustomMarkdownComponent, PlotlyComponent
<<<<<<< import { SnackbarComponent } from './snackbar/snackbar.component'; ======= import { Base64ImageComponent } from './base64-image/base64-image.component'; import { CustomMarkdownComponent } from './custom-markdown/custom-markdown.component'; >>>>>>> import { SnackbarComponent } from './snackbar/snackbar.component'; import { Base64ImageComponent } from './base64-image/base64-image.component'; import { CustomMarkdownComponent } from './custom-markdown/custom-markdown.component'; <<<<<<< PlotlyComponent, VDOMComponent, SnackbarComponent ======= VDOMComponent, Base64ImageComponent, CustomMarkdownComponent, PlotlyComponent >>>>>>> VDOMComponent, Base64ImageComponent, CustomMarkdownComponent, PlotlyComponent, SnackbarComponent
<<<<<<< /** * Copyright 2017 Plexus Interop Deutsche Bank AG * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { SubsctiptionsRegistry } from '../services/SubsctiptionsRegistry'; import { AppActions } from '../services/app.actions'; ======= import { SubscriptionsRegistry } from '../services/ui/SubscriptionsRegistry'; import { AppActions } from '../services/ui/app.actions'; >>>>>>> /** * Copyright 2017 Plexus Interop Deutsche Bank AG * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { SubscriptionsRegistry } from '../services/ui/SubscriptionsRegistry'; import { AppActions } from '../services/ui/app.actions';
<<<<<<< /** * Copyright 2017 Plexus Interop Deutsche Bank AG * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { AppActions } from './services/app.actions'; ======= import { AppActions } from './services/ui/app.actions'; >>>>>>> /** * Copyright 2017 Plexus Interop Deutsche Bank AG * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { AppActions } from './services/ui/app.actions'; <<<<<<< import { State } from './services/reducers'; ======= import { State } from './services/ui/root-reducers'; >>>>>>> import { State } from './services/ui/root-reducers';
<<<<<<< import { AppConnectedActionParams, PlexusConnectedActionParams, StudioState } from '../model'; ======= import { PlexusConnectedActionParams, StudioState, ConsumedMethodState } from "../model"; >>>>>>> import { AppConnectedActionParams, PlexusConnectedActionParams, StudioState, ConsumedMethodState } from '../model';
<<<<<<< export { default as createContentModelGroup } from "./createContentModelGroup"; export { default as createAccessToken } from "./createAccessToken"; ======= export { default as createContentModelGroup } from "./createContentModelGroup"; export { default as createEnvironmentAlias } from "./createEnvironmentAlias"; >>>>>>> export { default as createContentModelGroup } from "./createContentModelGroup"; export { default as createEnvironmentAlias } from "./createEnvironmentAlias"; export { default as createAccessToken } from "./createAccessToken";
<<<<<<< import { HandlerContextPlugin } from "@webiny/handler/types"; import { HandlerContextDb } from "@webiny/handler-db/types"; import { I18NLocale } from "@webiny/api-i18n/types"; ======= import { ContextPlugin } from "@webiny/handler/types"; import { DbContext } from "@webiny/handler-db/types"; >>>>>>> import { ContextPlugin } from "@webiny/handler/types"; import { DbContext } from "@webiny/handler-db/types"; import { I18NLocale } from "@webiny/api-i18n/types";
<<<<<<< private examineTag(local: INodeVars[], decl: ts.ClassDeclaration, tag: string, attrs: Attribute[], location: StartTagLocationInfo) { ======= private examineTag(local: INodeVars[], decl: ts.DeclarationStatement, tag: string, attrs: Attribute[], line: number) { >>>>>>> private examineTag(local: INodeVars[], decl: ts.DeclarationStatement, tag: string, attrs: Attribute[], location: StartTagLocationInfo) { <<<<<<< let chain = this.flattenAccessChain(source.sourceExpression); let type = this.resolveAccessChainToType(local, decl, chain, attrLoc.line, attrLoc.col + attrExpStr.length + 1); ======= let chain = this.flattenAccessChain(source.sourceExpression); let type = this.resolveAccessChainToType(local, decl, chain, line); >>>>>>> let chain = this.flattenAccessChain(source.sourceExpression); let type = this.resolveAccessChainToType(local, decl, chain, attrLoc.line, attrLoc.col + attrExpStr.length + 1); <<<<<<< let chain = this.flattenAccessChain(access); this.resolveAccessChainToType(local, decl, chain, attrLoc.line, attrLoc.col); } catch (ignore) { } ======= let chain = this.flattenAccessChain(access); this.resolveAccessChainToType(local, decl, chain, line); } catch (error) { if (this.throws) throw error } >>>>>>> let chain = this.flattenAccessChain(access); this.resolveAccessChainToType(local, decl, chain, attrLoc.line, attrLoc.col); } catch (error) { if (this.throws) throw error } <<<<<<< private resolveAccessChainToType(local: INodeVars[], decl: ts.ClassDeclaration, chain: any[], line: number, column:number): string | ts.ClassDeclaration { if(chain == null || chain.length == 0) ======= private resolveAccessChainToType(local: INodeVars[], decl: ts.DeclarationStatement, chain: any[], line: number): string | ts.DeclarationStatement { if (chain == null || chain.length == 0) >>>>>>> private resolveAccessChainToType(local: INodeVars[], decl: ts.DeclarationStatement, chain: any[], line: number, column:number): string | ts.DeclarationStatement { if (chain == null || chain.length == 0) <<<<<<< if (typeDecl) return this.resolveAccessChainToType(null, typeDecl, chain.slice(1), line, column); return null; ======= if (typeDecl) return this.resolveAccessChainToType(null, typeDecl, chain.slice(1), line); return null; >>>>>>> if (typeDecl) return this.resolveAccessChainToType(null, typeDecl, chain.slice(1), line, column); return null; <<<<<<< private reportAccessMemberIssue(member: string, decl: ts.ClassDeclaration, line: number, column:number) { ======= private reportAccessMemberIssue(member: string, decl: ts.DeclarationStatement, line: number) { >>>>>>> private reportAccessMemberIssue(member: string, decl: ts.DeclarationStatement, line: number, column:number) {
<<<<<<< ======= this._attachmentService.loadStateForProject(projectId), this._tagService.loadStateForProject(projectId), >>>>>>> this._tagService.loadStateForProject(projectId),
<<<<<<< import {unique} from '../../../util/unique'; ======= import {T} from '../../../t.const'; >>>>>>> import {unique} from '../../../util/unique'; import {T} from '../../../t.const';
<<<<<<< private _value; private _msValue; ======= @HostListener('input', ['$event.target.value']) _onInput(value: string) { const msVal = this._stringToMs.transform(value); this._value = this._msToString.transform(msVal, this.isAllowSeconds, true); this._onChangeCallback(msVal); } >>>>>>> <<<<<<< this._msValue = this._stringToMs.transform(this._elementRef.nativeElement.value); this._value = this._msToString.transform(this._msValue, false, true); ======= const msVal = this._stringToMs.transform(this._elementRef.nativeElement.value); this._value = this._msToString.transform(msVal, this.isAllowSeconds, true); >>>>>>> this._msValue = this._stringToMs.transform(this._elementRef.nativeElement.value); this._value = this._msToString.transform(this._msValue, this.isAllowSeconds, true);
<<<<<<< import { DialogMigrateComponent } from './dialog-migrate/dialog-migrate.component'; ======= import { JiraIssueState } from '../../issue/jira/jira-issue/store/jira-issue.reducer'; import { GitIssueState } from '../../issue/git/git-issue/store/git-issue.reducer'; >>>>>>> import { DialogMigrateComponent } from './dialog-migrate/dialog-migrate.component'; import { JiraIssueState } from '../../issue/jira/jira-issue/store/jira-issue.reducer'; import { GitIssueState } from '../../issue/git/git-issue/store/git-issue.reducer';
<<<<<<< import {HueValue} from 'angular-material-css-vars'; ======= import {Tag} from '../tag/tag.model'; >>>>>>> import {HueValue} from 'angular-material-css-vars'; import {Tag} from '../tag/tag.model'; <<<<<<< ======= taskTag?: EntityState<Tag>; issue?: IssueStateMap; >>>>>>> taskTag?: EntityState<Tag>;
<<<<<<< this.worldService.currentWorld$.subscribe(world => { this.currentWorld = world; this.selectWorld(); }); this.worldService.worlds$.subscribe(worlds => { this.worlds = worlds; this.selectWorld(); }) } selectWorld(){ if(this.worlds && this.currentWorld){ this.selectedWorld = this.worlds.filter(world => world.id == this.currentWorld.id)[0] } ======= this.worldService.currentWorld$.subscribe(world => this.currentWorld = world); this.loadImages(); this.selectedImage = "http://via.placeholder.com/200x200"; >>>>>>> this.worldService.currentWorld$.subscribe(world => { this.currentWorld = world; this.selectWorld(); }); this.worldService.worlds$.subscribe(worlds => { this.worlds = worlds; this.selectWorld(); }) this.loadImages(); this.selectedImage = "http://via.placeholder.com/200x200"; } selectWorld(){ if(this.worlds && this.currentWorld){ this.selectedWorld = this.worlds.filter(world => world.id == this.currentWorld.id)[0] } <<<<<<< if (this.title && this.gold && this.xp && this.story && this.selectedWorld && (this.tasks.length != 0)) { ======= if (this.title && this.gold && this.xp && this.story && this.selectedImage && this.currentWorld && (this.tasks.length != 0)) { >>>>>>> if (this.title && this.gold && this.xp && this.story && this.selectedImage && this.selectedWorld && (this.tasks.length != 0)) { <<<<<<< world: this.selectedWorld, ======= image: this.selectedImage, world: this.currentWorld >>>>>>> world: this.selectedWorld, image: this.selectedImage <<<<<<< this.dialog.open(GamemasterAddFreeTaskComponent, { data: [this.selectedWorld, this.tasks] }) ======= this.dialog.open(GamemasterAddFreeTaskComponent, {data: [this.currentWorld, this.tasks]}) >>>>>>> this.dialog.open(GamemasterAddFreeTaskComponent, { data: [this.selectedWorld, this.tasks] }) <<<<<<< this.dialog.open(GamemasterSuggestTasksComponent, { data: [this.selectedWorld, this.tasks] }).afterClosed().subscribe(result => { ======= this.dialog.open(GamemasterSuggestTasksComponent, {data: [this.currentWorld, this.tasks]}).afterClosed().subscribe(result => { >>>>>>> this.dialog.open(GamemasterSuggestTasksComponent, { data: [this.selectedWorld, this.tasks] }).afterClosed().subscribe(result => {
<<<<<<< import { ErrorResponse, Response } from "@webiny/graphql"; import { GraphQLFieldResolver } from "@webiny/graphql/types"; import { FormBuilderSettingsCRUD } from "../../types"; ======= import { ErrorResponse, Response } from "@webiny/handler-graphql/responses"; import { GraphQLFieldResolver } from "@webiny/handler-graphql/types"; >>>>>>> import { ErrorResponse, Response } from "@webiny/handler-graphql/responses"; import { GraphQLFieldResolver } from "@webiny/handler-graphql/types"; import { FormBuilderSettingsCRUD } from "../../types";
<<<<<<< import {Subscriber} from 'rxjs/Subscriber'; import { Subject } from 'rxjs'; ======= import {tap} from 'rxjs/operators'; import * as moment from 'moment'; >>>>>>> import { Subject } from 'rxjs'; import {tap} from 'rxjs/operators'; import * as moment from 'moment';
<<<<<<< import AlertTriggerConditionThresholdComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-threshold.component'; import AlertTriggerConditionThresholdRangeComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-threshold-range.component'; import AlertTriggerConditionStringComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-string.component'; import AlertTriggerConditionCompareComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-compare.component'; import AlertTriggerMetricsSimpleConditionComponent from '../components/alerts/alert/triggers/trigger-metrics-simple-condition.component'; import AlertTriggerMetricsAggregationComponent from '../components/alerts/alert/triggers/trigger-metrics-aggregation.component'; ======= import AlertTriggerConditionThresholdComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-threshold.component'; import AlertTriggerConditionThresholdRangeComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-threshold-range.component'; import AlertTriggerConditionStringComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-string.component'; import AlertTriggerConditionCompareComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-compare.component'; import AlertTriggerMetricsSimpleConditionComponent from '../components/alerts/alert/triggers/trigger-metrics-simple-condition.component'; import AlertTriggerMetricsAggregationComponent from '../components/alerts/alert/triggers/trigger-metrics-aggregation.component'; import AlertTriggerMissingDataComponent from '../components/alerts/alert/triggers/trigger-missing-data.component'; >>>>>>> import AlertTriggerConditionThresholdComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-threshold.component'; import AlertTriggerConditionThresholdRangeComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-threshold-range.component'; import AlertTriggerConditionStringComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-string.component'; import AlertTriggerConditionCompareComponent from '../components/alerts/alert/triggers/conditions/trigger-condition-compare.component'; import AlertTriggerMetricsSimpleConditionComponent from '../components/alerts/alert/triggers/trigger-metrics-simple-condition.component'; import AlertTriggerMetricsAggregationComponent from '../components/alerts/alert/triggers/trigger-metrics-aggregation.component'; import AlertTriggerMissingDataComponent from '../components/alerts/alert/triggers/trigger-missing-data.component'; <<<<<<< // Newsletter import NewsletterSubscriptionComponent from '../components/newsletter-subcription/newsletter-subscription.component'; ======= // User-Autocomplete import UserAutocompleteComponent from '../components/user-autocomplete/user-autocomplete.component'; import UserAutocompleteController from '../components/user-autocomplete/user-autocomplete.controller'; (<any>window).jQuery = jQuery; import angular = require('angular'); import ngInfiniteScroll = require('ng-infinite-scroll'); >>>>>>> // Newsletter import NewsletterSubscriptionComponent from '../components/newsletter-subcription/newsletter-subscription.component'; // User-Autocomplete import UserAutocompleteComponent from '../components/user-autocomplete/user-autocomplete.component'; import UserAutocompleteController from '../components/user-autocomplete/user-autocomplete.controller';
<<<<<<< 'picture': application.picture, 'background': application.background ======= 'picture': application.picture, 'disable_membership_notifications': application.disable_membership_notifications, >>>>>>> 'picture': application.picture, 'disable_membership_notifications': application.disable_membership_notifications, 'background': application.background
<<<<<<< import * as remark from "remark"; ======= import * as _ from 'lodash'; >>>>>>> import * as _ from 'lodash'; import * as remark from "remark"; <<<<<<< let ast = remark.parse(initialValue); let content = ""; let sectionOpen = false; this.three_columns = true; var sectionValue = ""; for (let c = 0; c < ast.children.length; c++) { const child = ast.children[c]; if (child.type !== 'heading' || child.depth < 2 || child.depth > 2) { continue; } if (sectionOpen) { sectionValue += "</section>"; } let id = child.children[0].value.replace(new RegExp(' ', 'g'), '').toLowerCase(); sectionValue += "<section id='" + id + "'>"; sectionOpen = true; ast.children.splice(c, 0, { type: 'html', value: sectionValue }); c++; sectionValue = ""; } if (sectionOpen) { ast.children.splice(ast.children.length - 1, 0, { type: 'html', value: sectionValue }); } content = remark.stringify(ast); ======= >>>>>>> let ast = remark.parse(initialValue); let content = ""; let sectionOpen = false; this.three_columns = true; var sectionValue = ""; for (let c = 0; c < ast.children.length; c++) { const child = ast.children[c]; if (child.type !== 'heading' || child.depth < 2 || child.depth > 2) { continue; } if (sectionOpen) { sectionValue += "</section>"; } let id = child.children[0].value.replace(new RegExp(' ', 'g'), '').toLowerCase(); sectionValue += "<section id='" + id + "'>"; sectionOpen = true; ast.children.splice(c, 0, { type: 'html', value: sectionValue }); c++; sectionValue = ""; } if (sectionOpen) { ast.children.splice(ast.children.length - 1, 0, { type: 'html', value: sectionValue }); } content = remark.stringify(ast); <<<<<<< initialValue: content, ======= initialValue: _.replace( _.replace(initialValue, '(#', '(' + this.$location.absUrl() + '#'), 'href="#', 'href="'+ this.$location.absUrl() + '#' ), >>>>>>> initialValue: _.replace( _.replace(content, '(#', '(' + this.$location.absUrl() + '#'), 'href="#', 'href="'+ this.$location.absUrl() + '#' ),
<<<<<<< ======= this.$onInit = () => { this.headersAsList(this.log.clientRequest); this.headersAsList(this.log.proxyRequest); this.headersAsList(this.log.clientResponse); this.headersAsList(this.log.proxyResponse); }; this.headersAsList = (obj) => { if (obj) { obj.headersAsList = []; for (const k in obj.headers) { if (obj.headers.hasOwnProperty(k)) { for (const v in obj.headers[k]) { obj.headersAsList.push([k, obj.headers[k][v]]) } } } } }; this.getMimeType = function(log) { >>>>>>> this.$onInit = () => { this.headersAsList(this.log.clientRequest); this.headersAsList(this.log.proxyRequest); this.headersAsList(this.log.clientResponse); this.headersAsList(this.log.proxyResponse); }; this.headersAsList = (obj) => { if (obj) { obj.headersAsList = []; for (const k in obj.headers) { if (obj.headers.hasOwnProperty(k)) { for (const v in obj.headers[k]) { obj.headersAsList.push([k, obj.headers[k][v]]) } } } } };
<<<<<<< this.importApiSpecification('API'); }; this.importWSDL = () => { this.importApiSpecification('WSDL'); }; this.importApiSpecification = (format) => { ======= this.error = null; >>>>>>> this.importApiSpecification('API'); }; this.importWSDL = () => { this.importApiSpecification('WSDL'); }; this.importApiSpecification = (format) => { this.error = null;
<<<<<<< import * as moment from 'moment'; let defaultStatus = ['ACCEPTED', 'PENDING', 'PAUSED']; ======= import {IScope} from "angular"; >>>>>>> import {IScope} from "angular"; import * as moment from 'moment'; let defaultStatus = ['ACCEPTED', 'PENDING', 'PAUSED']; <<<<<<< private $state: StateService, private $timeout: ng.ITimeoutService ======= private $state: StateService, public $rootScope: IScope, >>>>>>> private $state: StateService, public $rootScope: IScope, private $timeout: ng.ITimeoutService
<<<<<<< renderPredefinedValues?: (params: { form: FormChildrenFunctionParams }) => React.ReactNode; graphql?: { queryField?: string; }; ======= renderPredefinedValues?: (params: { form: FormChildrenFunctionParams; getBind: (index?: number) => any; }) => React.ReactNode; >>>>>>> renderPredefinedValues?: (params: { form: FormChildrenFunctionParams; getBind: (index?: number) => any; }) => React.ReactNode; graphql?: { queryField?: string; }; <<<<<<< contentModel: CmsEditorContentModel; ======= locale: string; >>>>>>> locale: string; contentModel: CmsEditorContentModel;
<<<<<<< 'background': api.background, ======= 'picture_url': api.picture_url, >>>>>>> 'picture_url': api.picture_url, 'background': api.background,
<<<<<<< PortalConfigService.save().then( () => { NotificationService.show("Configuration saved"); this.formSettings.$setPristine(); ======= PortalConfigService.save(this.settings).then( (response) => { _.merge(Constants, response.data); NotificationService.show("Configuration saved !"); >>>>>>> PortalConfigService.save(this.settings).then( (response) => { _.merge(Constants, response.data); NotificationService.show("Configuration saved !"); this.formSettings.$setPristine(); <<<<<<< PortalConfigService.get().then((response) => { this.Constants = response.data; this.formSettings.$setPristine(); }); ======= this.settings = _.cloneDeep(Constants); >>>>>>> this.settings = _.cloneDeep(Constants); this.formSettings.$setPristine();
<<<<<<< this.$state.reload(); ======= this.$scope.formEndpoint.$setPristine(); this.endpoint = _.cloneDeep(this.initialEndpoint); this.$scope.duplicateEndpointNames = false; >>>>>>> this.$scope.duplicateEndpointNames = false; this.$state.reload(); <<<<<<< ======= checkEndpointNameUniqueness() { this.$scope.duplicateEndpointNames = this.ApiService.isEndpointNameAlreadyUsed(this.api, this.endpoint.name, this.creation); } addHTTPHeader() { this.endpoint.headers.push({name: '', value: ''}); } removeHTTPHeader(idx) { if (this.endpoint.headers !== undefined) { this.endpoint.headers.splice(idx, 1); this.$scope.formEndpoint.$setDirty(); } } >>>>>>> checkEndpointNameUniqueness() { this.$scope.duplicateEndpointNames = this.ApiService.isEndpointNameAlreadyUsed(this.api, this.endpoint.name, this.creation); }
<<<<<<< import { AssessmentsComponent } from './assessments/assessments.component'; ======= import { OrganizationComponent } from './organization/organization.component'; >>>>>>> import { AssessmentsComponent } from './assessments/assessments.component'; import { OrganizationComponent } from './organization/organization.component'; <<<<<<< declarations: [AppComponent, NavbarComponent, DashboardComponent, AssessmentsComponent], ======= declarations: [AppComponent, NavbarComponent, DashboardComponent, OrganizationComponent], >>>>>>> declarations: [AppComponent, NavbarComponent, DashboardComponent, OrganizationComponent, AssessmentsComponent],
<<<<<<< import { Clip, Composition, Effect, Layer, Project } from '../../Entity' import { EffectPluginMissingException } from '../../Exceptions' ======= import { mockClip, mockComposition, mockEffect, mockLayer, mockProject } from '../../../spec/mocks' import { Clip, Effect, Project } from '../../Entity' import { EffectPluginMissingException } from '../../exceptions' >>>>>>> import { mockClip, mockComposition, mockEffect, mockLayer, mockProject } from '../../../spec/mocks' import { Clip, Project } from '../../Entity' import { EffectPluginMissingException } from '../../exceptions'
<<<<<<< create(snapshot): any ======= create(snapshot: any, environment?: any): any >>>>>>> create(snapshot: any): any <<<<<<< abstract create(snapshot): any abstract is(thing): boolean ======= abstract create(snapshot: any, environment?: any): any abstract is(thing: any): boolean >>>>>>> abstract create(snapshot: any): any abstract is(thing: any): boolean <<<<<<< create(snapshot) { ======= create(snapshot: any, environment?: any) { >>>>>>> create(snapshot: any) { <<<<<<< abstract createNewInstance() abstract finalizeNewInstance(target: any) abstract applySnapshot(node: Node, target, snapshot) abstract getChildNodes(node: Node, target): [string, Node][] abstract getChildNode(node: Node, target, key): Node | null abstract serialize(node: Node, target): any abstract applyPatchLocally(node: Node, target, subpath: string, patch: IJsonPatch): void ======= abstract createNewInstance(): any abstract finalizeNewInstance(target: any): any abstract applySnapshot(node: Node, target: any, snapshot: any): any abstract getChildNodes(node: Node, target: any): [string, Node][] abstract getChildNode(node: Node, target: any, key: any): Node | null abstract willChange(node: Node, change: any): Object | null abstract didChange(node: Node, change: any): void abstract serialize(node: Node, target: any): any abstract applyPatchLocally(node: Node, target: any, subpath: string, patch: IJsonPatch): void >>>>>>> abstract createNewInstance(): any abstract finalizeNewInstance(target: any): void abstract applySnapshot(node: Node, target: any, snapshot: any): void abstract getChildNodes(node: Node, target: any): [string, Node][] abstract getChildNode(node: Node, target: any, key: string): Node | null abstract serialize(node: Node, target: any): any abstract applyPatchLocally(node: Node, target: any, subpath: string, patch: IJsonPatch): void
<<<<<<< mobxShallow, IChildNodesMap, convertChildNodesToArray ======= mobxShallow, IAnyType >>>>>>> mobxShallow, IChildNodesMap, convertChildNodesToArray, IAnyType <<<<<<< export class ArrayType<S, T> extends ComplexType<S[], IObservableArray<T>> { ======= export function arrayToString(this: IObservableArray<any> & IStateTreeNode) { return `${getStateTreeNode(this)}(${this.length} items)` } export class ArrayType<C, S, T> extends ComplexType<C[], S[], IObservableArray<T>> { >>>>>>> export class ArrayType<C, S, T> extends ComplexType<C[], S[], IObservableArray<T>> {
<<<<<<< export class ArrayType<S, T> extends ComplexType<S[], IObservableArray<T>> { ======= export function arrayToString(this: IObservableArray<any>) { return `${getMSTAdministration(this)}(${this.length} items)` } export class ArrayType<T> extends ComplexType<T[], IObservableArray<T>> { >>>>>>> export function arrayToString(this: IObservableArray<any>) { return `${getMSTAdministration(this)}(${this.length} items)` } export class ArrayType<S, T> extends ComplexType<S[], IObservableArray<T>> {
<<<<<<< }), addRow: action(function(){ this.rows.push(Row.create()) }), ======= }, addRow() { this.rows.push(Row()) }, >>>>>>> }, addRow() { this.rows.push(Row.create()) },
<<<<<<< readonly snapshotSubscribers: ((snapshot) => void)[] = [] ======= private interceptDisposer: IDisposer readonly snapshotSubscribers: ((snapshot: any) => void)[] = [] >>>>>>> readonly snapshotSubscribers: ((snapshot: any) => void)[] = [] <<<<<<< constructor(initialState: any, factory: IFactory<any, any>) { ======= constructor(initialState: any, environment: any, factory: IFactory<any, any>) { >>>>>>> constructor(initialState: any, factory: IFactory<any, any>) { <<<<<<< ======= this.interceptDisposer = intercept(this.target, ((c: any) => this.type.willChange(this, c)) as any) observe(this.target, (c) => this.type.didChange(this, c)) >>>>>>>
<<<<<<< computed, getAtom, intercept, IObjectWillChange, IObservableObject, ======= computed, extendObservable, getAtom, intercept, IObjectWillChange, >>>>>>> computed, intercept, getAtom, IObjectWillChange, IObservableObject, <<<<<<< IAnyType, IChildNodesMap, IComplexType, IContext, ======= IAnyStateTreeNode, IAnyType, IChildNodesMap, IComplexType, IContext, >>>>>>> IAnyType, IChildNodesMap, IComplexType, IContext,
<<<<<<< import { IMiddlewareEventType, runWithActionContext, getActionContext, getNextActionId, fail, argsToArray } from "../internal" // based on: https://github.com/mobxjs/mobx-utils/blob/master/src/async-action.ts ======= /* All contents of this file are deprecated. The term `process` has been replaced with `flow` to avoid conflicts with the global `process` object. Refer to `flow.ts` for any further changes to this implementation. */ const DEPRECATION_MESSAGE = "See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information. " + "Note that the middleware event types starting with `process` now start with `flow`." >>>>>>> import { IMiddlewareEventType, runWithActionContext, getActionContext, getNextActionId, fail, argsToArray, deprecated, flow, createFlowSpawner } from "../internal" // based on: https://github.com/mobxjs/mobx-utils/blob/master/src/async-action.ts /* All contents of this file are deprecated. The term `process` has been replaced with `flow` to avoid conflicts with the global `process` object. Refer to `flow.ts` for any further changes to this implementation. */ const DEPRECATION_MESSAGE = "See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information. " + "Note that the middleware event types starting with `process` now start with `flow`." <<<<<<< const spawner = function processSpawner(this: any) { // Implementation based on https://github.com/tj/co/blob/master/index.js const runId = getNextActionId() const baseContext = getActionContext() const args = arguments function wrap(fn: any, type: IMiddlewareEventType, arg: any) { fn.$mst_middleware = (spawner as any).$mst_middleware // pick up any middleware attached to the process runWithActionContext( { name, type, id: runId, args: [arg], tree: baseContext.tree, context: baseContext.context, parentId: baseContext.id, rootId: baseContext.rootId }, fn ) } return new Promise(function(resolve, reject) { let gen: any const init = function asyncActionInit() { gen = generator.apply(null, arguments) onFulfilled(undefined) // kick off the process } ;(init as any).$mst_middleware = (spawner as any).$mst_middleware runWithActionContext( { name, type: "process_spawn", id: runId, args: argsToArray(args), tree: baseContext.tree, context: baseContext.context, parentId: baseContext.id, rootId: baseContext.rootId }, init ) function onFulfilled(res: any) { let ret try { // prettier-ignore wrap((r: any) => { ret = gen.next(r) }, "process_resume", res) } catch (e) { // prettier-ignore setImmediate(() => { wrap((r: any) => { reject(e) }, "process_throw", e) }) return } next(ret) return } function onRejected(err: any) { let ret try { // prettier-ignore wrap((r: any) => { ret = gen.throw(r) }, "process_resume_error", err) // or yieldError? } catch (e) { // prettier-ignore setImmediate(() => { wrap((r: any) => { reject(e) }, "process_throw", e) }) return } next(ret) } function next(ret: any) { if (ret.done) { // prettier-ignore setImmediate(() => { wrap((r: any) => { resolve(r) }, "process_return", ret.value) }) return } // TODO: support more type of values? See https://github.com/tj/co/blob/249bbdc72da24ae44076afd716349d2089b31c4c/index.js#L100 if (!ret.value || typeof ret.value.then !== "function") fail("Only promises can be yielded to `async`, got: " + ret) return ret.value.then(onFulfilled, onRejected) } }) } return spawner } ======= deprecated( "process", "`createProcessSpawner()` has been renamed to `createFlowSpawner()`. " + DEPRECATION_MESSAGE ) return createFlowSpawner(name, generator) } import { deprecated } from "../utils" import { flow, createFlowSpawner } from "./flow" >>>>>>> deprecated( "process", "`createProcessSpawner()` has been renamed to `createFlowSpawner()`. " + DEPRECATION_MESSAGE ) return createFlowSpawner(name, generator) }
<<<<<<< import { createNode, getStateTreeNode, isStateTreeNode, IStateTreeNode, Node } from "../../core" import { Type, IType } from "../type" import { TypeFlags, isReferenceType, isType } from "../type-flags" import { IContext, IValidationResult, typeCheckSuccess, typeCheckFailure } from "../type-checker" import { fail } from "../../utils" import { action } from "mobx" ======= import { getStateTreeNode, isStateTreeNode, INode, createNode, Type, IType, TypeFlags, isType, IContext, IValidationResult, typeCheckSuccess, typeCheckFailure, fail } from "../../internal" >>>>>>> import { getStateTreeNode, isStateTreeNode, INode, createNode, Type, IType, TypeFlags, isType, IContext, IValidationResult, typeCheckSuccess, typeCheckFailure, fail } from "../../internal" import { IStateTreeNode } from "../../index" <<<<<<< getValue(node: Node) { if (!node.isAlive) return undefined ======= getValue(node: INode) { >>>>>>> getValue(node: INode) { if (!node.isAlive) return undefined <<<<<<< @action reconcile(current: Node, newValue: any): Node { ======= reconcile(current: INode, newValue: any): INode { >>>>>>> reconcile(current: INode, newValue: any): INode { <<<<<<< return new ReferenceType(subType, options) ======= return new ReferenceType(subType) } export function isReferenceType(type: any): type is ReferenceType<any> { return (type.flags & TypeFlags.Reference) > 0 >>>>>>> return new ReferenceType(subType, options) } export function isReferenceType(type: any): type is ReferenceType<any> { return (type.flags & TypeFlags.Reference) > 0
<<<<<<< // If called too early in es5 environment, this won't throw, but return undefined // see "it should apply deep patches to maps" test for example const definition = this.definition() if (typeof definition !== "object") fail("Late type definition should return object") this._subType = definition ======= this._subType = this.definition() if (!this.subType) { fail("Failed to determine subtype, make sure types.late returns a type definition.") } >>>>>>> // If called too early in es5 environment, this won't throw, but return undefined // see "it should apply deep patches to maps" test for example const definition = this.definition() if (typeof definition !== "object") fail("Failed to determine subtype, make sure types.late returns a type definition.") this._subType = definition
<<<<<<< ======= props: { [key: string]: IFactory<any, any> } = {} baseModel: any initializers: ((target: any) => void)[] = [] finalizers: ((target: any) => void)[] = [] >>>>>>> <<<<<<< /** * The original object definition */ baseModel: any modelConstructor: new () => any /** * Parsed description of all properties */ private props: { [key: string]: Property } = {} constructor(name: string, baseModel) { ======= constructor(name: string, baseModel: any) { >>>>>>> /** * The original object definition */ baseModel: any modelConstructor: new () => any /** * Parsed description of all properties */ private props: { [key: string]: Property } = {} constructor(name: string, baseModel: Object) { <<<<<<< finalizeNewInstance(instance) { intercept(instance, this.willChange as any /* wait for typing fix in mobx */) observe(instance, this.didChange) this.forAllProps(prop => prop.initialize(instance)) } willChange = (change: IObjectWillChange): IObjectWillChange | null => { return this.props[change.name].willChange(change) } didChange = (change: IObjectChange) => { this.props[change.name].didChange(change) ======= finalizeNewInstance(instance: any) { this.finalizers.forEach(f => f(instance)) // TODO: Object.seal(instance) // don't allow new props to be added! >>>>>>> finalizeNewInstance(instance: IObjectInstance) { intercept(instance, this.willChange as any /* wait for typing fix in mobx */) observe(instance, this.didChange) this.forAllProps(prop => prop.initialize(instance)) } willChange = (change: IObjectWillChange): IObjectWillChange | null => { return this.props[change.name].willChange(change) } didChange = (change: IObjectChange) => { this.props[change.name].didChange(change) <<<<<<< this.props[key] = new ComputedProperty(key, descriptor.get!, descriptor.set) ======= const computedDescriptor = {} // yikes Object.defineProperty(computedDescriptor, key, descriptor) addInitializer((t: any) => extendShallowObservable(t, computedDescriptor)) >>>>>>> this.props[key] = new ComputedProperty(key, descriptor.get!, descriptor.set) <<<<<<< this.props[key] = new ValueProperty(key, createDefaultValueFactory(primitiveFactory, value)) ======= this.props[key] = primitiveFactory // MWE: optimization, create one single extendObservale addInitializer((t: any) => extendShallowObservable(t, { [key] : value })) >>>>>>> this.props[key] = new ValueProperty(key, createDefaultValueFactory(primitiveFactory, value)) <<<<<<< this.props[key] = new ValueProperty(key, value) ======= this.props[key] = value addInitializer((t: any) => extendShallowObservable(t, { [key]: null })) addFinalizer((t: any) => t[key] = value()) >>>>>>> this.props[key] = new ValueProperty(key, value) <<<<<<< this.props[key] = new TransformedProperty(key, value.setter, value.getter) ======= addInitializer((t: any) => extendShallowObservable(t, createReferenceProps(key, value))) >>>>>>> this.props[key] = new TransformedProperty(key, value.setter, value.getter) <<<<<<< this.props[key] = new ActionProperty(key, value) ======= addInitializer((t: any) => createActionWrapper(t, key, value)) >>>>>>> this.props[key] = new ActionProperty(key, value) <<<<<<< // TODO: threat as action // addInitializer(t => createNonActionWrapper(t, key, value)) ======= addInitializer((t: any) => createNonActionWrapper(t, key, value)) >>>>>>> // TODO: threat as action // addInitializer(t => createNonActionWrapper(t, key, value)) <<<<<<< // TODO: node or instance? serialize(node: Node, instance): any { const res = {} this.forAllProps(prop => prop.serialize(instance, res)) ======= willChange(node: any, change: IObjectWillChange): Object | null { const {newValue} = change const oldValue = change.object[change.name] if (newValue === oldValue) return null maybeNode(oldValue, adm => adm.setParent(null)) change.newValue = node.prepareChild(change.name, newValue) return change } didChange(node: Node, change: IObjectChange): void { switch (change.type) { case "update": return void node.emitPatch({ op: "replace", path: "/" + escapeJsonPath(change.name), value: valueToSnapshot(change.newValue) }, node) case "add": return void node.emitPatch({ op: "add", path: "/" + escapeJsonPath(change.name), value: valueToSnapshot(change.newValue) }, node) } } serialize(node: Node, instance: any): any { const res:{[index: string]: any} = {} for (let key in this.props) { const value = instance[key] if (!isSerializable(value)) console.warn(`Encountered unserialize value '${value}' in ${node.path}/${key}`) res[key] = valueToSnapshot(value) } >>>>>>> // TODO: node or instance? serialize(node: Node, instance: any): any { const res = {} this.forAllProps(prop => prop.serialize(instance, res)) <<<<<<< // TODO: remove node arg @action applySnapshot(node: Node, target, snapshot): void { // TODO typecheck? ======= @action applySnapshot(node: Node, target: any, snapshot: any): void { >>>>>>> // TODO: remove node arg @action applySnapshot(node: Node, target: any, snapshot: any): void { // TODO typecheck? <<<<<<< // MWE: somehow get & { toJSON(): S } in here...? export function createModelFactory<S extends Object, T extends S>(baseModel: IBaseModelDefinition<S, T>): IFactory<S, T & { toJSON(): any }> export function createModelFactory<S extends Object, T extends S>(name: string, baseModel: IBaseModelDefinition<S, T>): IFactory<S, T & { toJSON(): any }> export function createModelFactory(arg1, arg2?) { let name = typeof arg1 === "string" ? arg1 : "AnonymousModel" ======= export function createModelFactory<S extends Object, T extends S>(baseModel: IBaseModelDefinition<S, T>): IFactory<S, T> export function createModelFactory<S extends Object, T extends S>(name: string, baseModel: IBaseModelDefinition<S, T>): IFactory<S, T> export function createModelFactory(arg1: any, arg2?: any) { let name = typeof arg1 === "string" ? arg1 : "unnamed-object-factory" >>>>>>> // MWE: somehow get & { toJSON(): S } in here...? export function createModelFactory<S extends Object, T extends S>(baseModel: IBaseModelDefinition<S, T>): IFactory<S, T & { toJSON(): any }> export function createModelFactory<S extends Object, T extends S>(name: string, baseModel: IBaseModelDefinition<S, T>): IFactory<S, T & { toJSON(): any }> export function createModelFactory(arg1: any, arg2?: any) { let name = typeof arg1 === "string" ? arg1 : "AnonymousModel"
<<<<<<< import { GraphQLContextPlugin } from "@webiny/graphql/types"; import authenticate from "./authentication/authenticate"; ======= import { GraphQLContext, GraphQLContextPlugin, GraphQLMiddlewarePlugin, GraphQLSchemaPlugin } from "@webiny/graphql/types"; import { shield } from "graphql-shield"; import authenticateJwt from "./authentication/authenticateJwt"; >>>>>>> import { GraphQLContext, GraphQLContextPlugin, GraphQLSchemaPlugin } from "@webiny/graphql/types"; import authenticateJwt from "./authentication/authenticateJwt";
<<<<<<< import { reaction, computed, action } from "mobx" ======= import { reaction, observable, computed, action, getAtom } from "mobx" >>>>>>> import { reaction, computed, action } from "mobx" <<<<<<< resolveNodeByPathParts, convertChildNodesToArray, ModelType, invalidateComputed ======= resolveNodeByPathParts, convertChildNodesToArray, ModelType >>>>>>> resolveNodeByPathParts, convertChildNodesToArray, ModelType, invalidateComputed <<<<<<< export interface IChildNodesMap { [key: string]: INode } ======= export interface IChildNodesMap { [key: string]: INode } const snapshotReactionOptions = { onError(e: any) { throw e } } >>>>>>> export interface IChildNodesMap { [key: string]: INode } const snapshotReactionOptions = { onError(e: any) { throw e } } <<<<<<< this._finalizeNewInstance(this, this._childNodes) ======= this._finalizeNewInstance!(this, this._childNodes) >>>>>>> this._finalizeNewInstance!(this, this._childNodes) <<<<<<< // NOTE: we need to touch snapshot, because non-observable // "observableInstanceCreated" field was touched invalidateComputed(this, "snapshot") ======= // NOTE: we need to touch snapshot, because non-observable // "observableInstanceCreated" field was touched const snapshotAtom = getAtom(this, "snapshot") as any snapshotAtom.trackAndCompute() >>>>>>> // NOTE: we need to touch snapshot, because non-observable // "observableInstanceCreated" field was touched invalidateComputed(this, "snapshot") <<<<<<< this.finalizeCreation() ======= this.finalizeCreation() this._childNodes = null this._initialSnapshot = null this._createNewInstance = null this._finalizeNewInstance = null >>>>>>> this.finalizeCreation() this._childNodes = null this._initialSnapshot = null this._createNewInstance = null this._finalizeNewInstance = null <<<<<<< get identifier(): string | null { // identifier can not be changed during lifecycle of a node // so we safely can read it from initial snapshot return this.identifierAttribute ? this._initialSnapshot[this.identifierAttribute] : null } ======= >>>>>>> <<<<<<< if (childNode && childNode.parent) childNode.parent.assertAlive() if (childNode && childNode.parent && childNode.parent._autoUnbox) return childNode.value ======= if (childNode && childNode.parent && childNode.parent._autoUnbox) return childNode.value >>>>>>> if (childNode && childNode.parent) childNode.parent.assertAlive() if (childNode && childNode.parent && childNode.parent._autoUnbox) return childNode.value <<<<<<< if (this.disposers) this.disposers.splice(0).forEach(f => f()) ======= if (this._disposers) { this._disposers.splice(0).forEach(f => f()) } >>>>>>> if (this._disposers) { this._disposers.forEach(f => f()) this._disposers = null } <<<<<<< if (this.patchSubscribers) this.patchSubscribers.splice(0) if (this.snapshotSubscribers) this.snapshotSubscribers.splice(0) ======= if (this._patchSubscribers) this._patchSubscribers.splice(0) if (this._snapshotSubscribers) this._snapshotSubscribers.splice(0) >>>>>>> if (this._patchSubscribers) this._patchSubscribers = null if (this._snapshotSubscribers) this._snapshotSubscribers = null <<<<<<< this._parent = null invalidateComputed(this, "path") ======= this.parent = null // This is quite a hack, once interceptable objects / arrays / maps are extracted from mobx, // we could express this in a much nicer way // TODO: should be possible to obtain id's still... Object.defineProperty(this.storedValue, "$mobx", { get() { fail( `This object has died and is no longer part of a state tree. It cannot be used anymore. The object (of type '${self .type .name}') used to live at '${oldPath}'. It is possible to access the last snapshot of this object using 'getSnapshot', or to create a fresh copy using 'clone'. If you want to remove an object from the tree without killing it, use 'detach' instead.` ) } }) >>>>>>> this.parent = null invalidateComputed(this, "path") <<<<<<< if (!this.snapshotSubscribers) this.snapshotSubscribers = [] return registerEventHandler(this.snapshotSubscribers, onChange) ======= if (!this._snapshotSubscribers) this._snapshotSubscribers = [] return registerEventHandler(this._snapshotSubscribers, onChange) >>>>>>> if (!this._snapshotSubscribers) this._snapshotSubscribers = [] return registerEventHandler(this._snapshotSubscribers, onChange) <<<<<<< if (this.snapshotSubscribers) this.snapshotSubscribers.forEach((f: Function) => f(snapshot)) ======= if (this._snapshotSubscribers) this._snapshotSubscribers.forEach((f: Function) => f(snapshot)) >>>>>>> if (this._snapshotSubscribers) this._snapshotSubscribers.forEach((f: Function) => f(snapshot)) <<<<<<< if (!this.patchSubscribers) this.patchSubscribers = [] return registerEventHandler(this.patchSubscribers, handler) ======= if (!this._patchSubscribers) this._patchSubscribers = [] return registerEventHandler(this._patchSubscribers, handler) >>>>>>> if (!this._patchSubscribers) this._patchSubscribers = [] return registerEventHandler(this._patchSubscribers, handler) <<<<<<< if (this.patchSubscribers && this.patchSubscribers.length) { ======= if (this._patchSubscribers && this._patchSubscribers.length) { >>>>>>> const patchSubscribers = this._patchSubscribers if (patchSubscribers && patchSubscribers.length) { <<<<<<< if (!this.disposers) this.disposers = [disposer] else this.disposers.unshift(disposer) ======= if (!this._disposers) this._disposers = [disposer] else this._disposers.unshift(disposer) >>>>>>> if (!this._disposers) this._disposers = [disposer] else this._disposers.unshift(disposer)
<<<<<<< ======= /** * Middleware can be used to intercept any action is invoked on the subtree where it is attached. * If a tree is protected (by default), this means that any mutation of the tree will pass through your middleware. * * For more details, see the [middleware docs](docs/middleware.md) * * @export * @param {IStateTreeNode} target * @param {(action: IRawActionCall, next: (call: IRawActionCall) => any) => any} middleware * @returns {IDisposer} */ export function addMiddleware( target: IStateTreeNode, middleware: (action: IMiddleWareEvent, next: (call: IMiddleWareEvent) => any) => any ): IDisposer { const node = getStateTreeNode(target) // warn if node is unprotected if (process.env.NODE_ENV !== "production") { if (!node.isProtectionEnabled) console.warn( "It is recommended to protect the state tree before attaching action middleware, as otherwise it cannot be guaranteed that all changes are passed through middleware. See `protect`" ) } return node.addMiddleWare(middleware) } >>>>>>> <<<<<<< let disposer: IDisposer | null = null function resume() { if (disposer) return disposer = onPatch( subject, patch => { recorder.patches.push(patch) }, true ) } ======= // check all arguments if (process.env.NODE_ENV !== "production") { if (!isStateTreeNode(subject)) fail( "expected first argument to be a mobx-state-tree node, got " + subject + " instead" ) } >>>>>>> // check all arguments if (process.env.NODE_ENV !== "production") { if (!isStateTreeNode(subject)) fail( "expected first argument to be a mobx-state-tree node, got " + subject + " instead" ) } let disposer: IDisposer | null = null function resume() { if (disposer) return disposer = onPatch( subject, patch => { recorder.patches.push(patch) }, true ) } <<<<<<< export function getParent<T>(target: IStateTreeNode, depth = 1): T & IStateTreeNode { if (depth < 0) fail(`Invalid depth: ${depth}, should be >= 1`) ======= export function getParent<T>(target: IStateTreeNode, depth = 1): T & IStateTreeNode { // check all arguments if (process.env.NODE_ENV !== "production") { if (!isStateTreeNode(target)) fail("expected first argument to be a mobx-state-tree node, got " + target + " instead") if (typeof depth !== "number") fail("expected second argument to be a number, got " + depth + " instead") if (depth < 0) fail(`Invalid depth: ${depth}, should be >= 1`) } >>>>>>> export function getParent<T>(target: IStateTreeNode, depth = 1): T & IStateTreeNode { // check all arguments if (process.env.NODE_ENV !== "production") { if (!isStateTreeNode(target)) fail("expected first argument to be a mobx-state-tree node, got " + target + " instead") if (typeof depth !== "number") fail("expected second argument to be a number, got " + depth + " instead") if (depth < 0) fail(`Invalid depth: ${depth}, should be >= 1`) }
<<<<<<< fail, ======= extendKeepGetter, fail, identity, >>>>>>> extendKeepGetter, fail,
<<<<<<< this.mediaStarted = true; if (!this.media.paused) { this.media.pause(); } if (!this.element.parentElement.classList.contains('op-ads--active')) { this.element.parentElement.classList.add('op-ads--active'); } ======= this.element.parentElement.classList.add('op-ads--active'); if (!this.media.paused) { this.media.pause(); } >>>>>>> if (!this.element.parentElement.classList.contains('op-ads--active')) { this.element.parentElement.classList.add('op-ads--active'); } if (!this.media.paused) { this.media.pause(); }
<<<<<<< let twitchhighlighterTreeView: TwitchHighlighterDataProvider; ======= let twitchhighlighterStatusBar: vscode.StatusBarItem; let isConnected: boolean = false; >>>>>>> let twitchhighlighterTreeView: TwitchHighlighterDataProvider; let twitchhighlighterStatusBar: vscode.StatusBarItem; let isConnected: boolean = false;
<<<<<<< private static instance: SwaggerService; private controllerMap: IController[] = []; private data: ISwagger; ======= private static instance : SwaggerService; private controllerMap : any = []; private definitionsMap : {[key: string]: ISwaggerDefinition} = {}; private data : ISwagger; >>>>>>> private static instance: SwaggerService; private controllerMap: IController[] = []; private definitionsMap : {[key: string]: ISwaggerDefinition} = {}; private data: ISwagger; <<<<<<< public setDefinitions(definitions: { [key: string]: ISwaggerDefinition }): void { this.data.definitions = _.merge(this.data.definitions, definitions); ======= public setDefinitions ( models : {[key: string]: ISwaggerBuildDefinitionModel} ) : void { let definitions : {[key: string]: ISwaggerDefinition} = {}; for ( let modelIndex in models ) { let model : ISwaggerBuildDefinitionModel = models[ modelIndex ]; let newDefinition : ISwaggerDefinition = { type : SwaggerDefinitionConstant.Model.Type.OBJECT , properties : {} , required : [] }; for ( let propertyIndex in model.properties ) { let property : ISwaggerBuildDefinitionModelProperty = model.properties[ propertyIndex ]; let newProperty : ISwaggerDefinitionProperty = { type : property.type }; if ( property.model ) { if ( _.isEqual( SwaggerDefinitionConstant.Model.Property.Type.ARRAY , property.type ) ) { newProperty.items = <ISwaggerDefinitionPropertyItems>{ $ref : this.buildRef( property.model ) } } else { newProperty.$ref = this.buildRef( property.model ); } } if ( property.format ) { newProperty.format = property.format; } if ( property.required ) { newDefinition.required.push( propertyIndex ); } newDefinition.properties[ propertyIndex ] = newProperty; } definitions[ modelIndex ] = newDefinition; } this.data.definitions = definitions; >>>>>>> public setDefinitions ( models : {[key: string]: ISwaggerBuildDefinitionModel} ) : void { let definitions : {[key: string]: ISwaggerDefinition} = {}; for ( let modelIndex in models ) { let model : ISwaggerBuildDefinitionModel = models[ modelIndex ]; let newDefinition : ISwaggerDefinition = { type : SwaggerDefinitionConstant.Model.Type.OBJECT , properties : {} , required : [] }; for ( let propertyIndex in model.properties ) { let property : ISwaggerBuildDefinitionModelProperty = model.properties[ propertyIndex ]; let newProperty : ISwaggerDefinitionProperty = { type : property.type }; if ( property.model ) { if ( _.isEqual( SwaggerDefinitionConstant.Model.Property.Type.ARRAY , property.type ) ) { newProperty.items = <ISwaggerDefinitionPropertyItems>{ $ref : this.buildRef( property.model ) } } else { newProperty.$ref = this.buildRef( property.model ); } } if ( property.format ) { newProperty.format = property.format; } if ( property.required ) { newDefinition.required.push( propertyIndex ); } newDefinition.properties[ propertyIndex ] = newProperty; } definitions[ modelIndex ] = newDefinition; } this.data.definitions = _.merge(this.data.definitions, definitions);
<<<<<<< import { Http, Response<% if (authenticationType !== 'oauth2') { %>, Headers<% } %> } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import { SERVER_API_URL } from '../../app.constants'; ======= import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Rx'; >>>>>>> import { HttpClient, HttpResponse<% if (authenticationType !== 'oauth2') { %>, HttpHeaders<% } %> } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; import { SERVER_API_URL } from '../../app.constants'; <<<<<<< constructor( private http: Http ) {} <%_ if (authenticationType !== 'oauth2') { _%> ======= constructor(private http: HttpClient) {} >>>>>>> constructor( private http: HttpClient ) {} <%_ if (authenticationType !== 'oauth2') { _%> <<<<<<< return this.http.post(SERVER_API_URL + 'api/logout', {}).map((response: Response) => { ======= return this.http.post('api/logout', {}, { observe: 'response' }).map((response: HttpResponse<any>) => { >>>>>>> return this.http.post(SERVER_API_URL + 'api/logout', {}, { observe: 'response' }).map((response: HttpResponse<any>) => {
<<<<<<< this.eventManager.broadcast({ name: '<%= entityInstance %>ListModification', content: 'Deleted an <%= entityInstance %>' }); this.router.navigate([{ outlets: { popup: null }}]); ======= this.eventManager.broadcast({ name: '<%= entityInstance %>ListModification', content: 'Deleted an <%= entityInstance %>'}); this.router.navigate([{ outlets: { popup: null }}], { replaceUrl: true }); >>>>>>> this.eventManager.broadcast({ name: '<%= entityInstance %>ListModification', content: 'Deleted an <%= entityInstance %>' }); this.router.navigate([{ outlets: { popup: null }}], { replaceUrl: true });
<<<<<<< import { Http, Response, URLSearchParams } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import { SERVER_API_URL } from '../../app.constants'; ======= import { HttpClient, HttpParams } from '@angular/common/http'; import { Observable } from 'rxjs/Rx'; >>>>>>> import { HttpClient, HttpParams } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; import { SERVER_API_URL } from '../../app.constants'; <<<<<<< const params: URLSearchParams = new URLSearchParams(); params.set('key', key); return this.http.get(SERVER_API_URL + '<%- apiUaaPath %>api/activate', { search: params }).map((res: Response) => res); ======= return this.http.get(<% if (authenticationType === 'uaa') { %>'<%= uaaBaseName.toLowerCase() %>/api/activate'<%} else { %>'api/activate'<% } %>, { params: new HttpParams().set('key', key) }); >>>>>>> return this.http.get(SERVER_API_URL + '<%- apiUaaPath %>api/activate', { params: new HttpParams().set('key', key) });
<<<<<<< import { Http, Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; ======= import { HttpClient, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Rx'; >>>>>>> import { HttpClient, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; <<<<<<< <%_ } _%> import { ResponseWrapper } from '../model/response-wrapper.model'; ======= >>>>>>> <%_ } _%> import { ResponseWrapper } from '../model/response-wrapper.model'; <<<<<<< constructor(private http: Http) { } <%_ if (authenticationType !== 'oauth2') { _%> ======= constructor(private http: HttpClient) { } >>>>>>> constructor(private http: HttpClient) { } <%_ if (authenticationType !== 'oauth2') { _%> <<<<<<< <% } %> query(req?: any): Observable<ResponseWrapper> { ======= query(req?: any): Observable<HttpResponse<User[]>> { >>>>>>> <% } %> query(req?: any): Observable<HttpResponse<User[]>> { <<<<<<< <%_ if (databaseType === 'sql' || databaseType === 'mongodb' || databaseType === 'couchbase') { _%> return this.http.get(SERVER_API_URL + '<%- apiUaaPath %>api/users/authorities').map((res: Response) => { const json = res.json(); return <string[]> json; }); ======= <%_ if (databaseType === 'sql' || databaseType === 'mongodb') { _%> return this.http.get<string[]>('<% if (authenticationType === 'uaa') { %><%= uaaBaseName.toLowerCase() %>/<% } %>api/users/authorities'); >>>>>>> <%_ if (databaseType === 'sql' || databaseType === 'mongodb' || databaseType === 'couchbase') { _%> return this.http.get<string[]>(SERVER_API_URL + '<%- apiUaaPath %>api/users/authorities'); <<<<<<< <% } %> private convertResponse(res: Response): ResponseWrapper { const jsonResponse = res.json(); return new ResponseWrapper(res.headers, jsonResponse, res.status); } ======= >>>>>>> <% } %>
<<<<<<< create(label, seed, scan, password) { return this.apiService.postWalletCreate(label ? label : 'undefined', seed, scan ? scan : 100, password) ======= create(label, seed, scan) { seed = seed.replace(/\r?\n|\r/g, ' ').replace(/ +/g, ' ').trim(); return this.apiService.postWalletCreate(label ? label : 'undefined', seed, scan ? scan : 100) >>>>>>> create(label, seed, scan, password) { seed = seed.replace(/\r?\n|\r/g, ' ').replace(/ +/g, ' ').trim(); return this.apiService.postWalletCreate(label ? label : 'undefined', seed, scan ? scan : 100, password)
<<<<<<< import { SendFormAdvancedComponent } from './components/pages/send-skycoin/send-form-advanced/send-form-advanced.component'; ======= import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { AppTranslateLoader } from './app.translate-loader'; >>>>>>> import { SendFormAdvancedComponent } from './components/pages/send-skycoin/send-form-advanced/send-form-advanced.component'; import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { AppTranslateLoader } from './app.translate-loader';
<<<<<<< private preparingToEdit = false; private editSubscription: ISubscription; private confirmSubscription: ISubscription; ======= >>>>>>> private editSubscription: ISubscription; private confirmSubscription: ISubscription;
<<<<<<< import { SeedWordDialogComponent } from './components/layout/seed-word-dialog/seed-word-dialog.component'; ======= import { MultipleDestinationsDialogComponent } from './components/layout/multiple-destinations-dialog/multiple-destinations-dialog.component'; >>>>>>> import { SeedWordDialogComponent } from './components/layout/seed-word-dialog/seed-word-dialog.component'; import { MultipleDestinationsDialogComponent } from './components/layout/multiple-destinations-dialog/multiple-destinations-dialog.component'; <<<<<<< SeedWordDialogComponent, ======= MultipleDestinationsDialogComponent, >>>>>>> SeedWordDialogComponent, MultipleDestinationsDialogComponent, <<<<<<< SeedWordDialogComponent, ======= MultipleDestinationsDialogComponent, >>>>>>> SeedWordDialogComponent, MultipleDestinationsDialogComponent,
<<<<<<< import { catchError, map } from 'rxjs/operators'; ======= import { AppService } from './app.service'; import { AppConfig } from '../app.config'; >>>>>>> import { catchError, map } from 'rxjs/operators'; import { AppService } from './app.service'; import { AppConfig } from '../app.config'; <<<<<<< verifyAddress(address: string) { return this.apiService.post('address/verify', { address }, {}, true) .pipe(map(() => true), catchError(() => Observable.of(false))); } private addSignatures(index: number, txInputs: any[], txSignatures: string[], txInnerHash: string): Observable<any> { let chain: Observable<any>; if (index > 0) { chain = this.addSignatures(index - 1, txInputs, txSignatures, txInnerHash).first(); } else { chain = Observable.of(1); } chain = chain.flatMap(() => { const msgToSign = CipherExtras.AddSHA256(txInnerHash, txInputs[index].hash); return this.hwWalletService.signMessage(txInputs[index].address_index, msgToSign, index + 1, txInputs.length) .map(response => { txSignatures.push(response.rawResponse); }); }); ======= getWalletUnspentOutputs(wallet: Wallet): Observable<Output[]> { const addresses = wallet.addresses.map(a => a.address).join(','); >>>>>>> verifyAddress(address: string) { return this.apiService.post('address/verify', { address }, {}, true) .pipe(map(() => true), catchError(() => Observable.of(false))); } getWalletUnspentOutputs(wallet: Wallet): Observable<Output[]> { const addresses = wallet.addresses.map(a => a.address).join(',');
<<<<<<< import { ExchangeComponent } from './components/pages/exchange/exchange.component'; import { ExchangeService } from './services/exchange.service'; import { ExchangeCreateComponent } from './components/pages/exchange/exchange-create/exchange-create.component'; import { ExchangeStatusComponent } from './components/pages/exchange/exchange-status/exchange-status.component'; ======= import { HwWalletService } from './services/hw-wallet.service'; import { HwOptionsDialogComponent } from './components/layout/hardware-wallet/hw-options-dialog/hw-options-dialog.component'; import { HwWipeDialogComponent } from './components/layout/hardware-wallet/hw-wipe-dialog/hw-wipe-dialog.component'; import { HwAddedDialogComponent } from './components/layout/hardware-wallet/hw-added-dialog/hw-added-dialog.component'; import { HwGenerateSeedDialogComponent } from './components/layout/hardware-wallet/hw-generate-seed-dialog/hw-generate-seed-dialog.component'; import { HwBackupDialogComponent } from './components/layout/hardware-wallet/hw-backup-dialog/hw-backup-dialog.component'; import { ConfirmationComponent } from './components/layout/confirmation/confirmation.component'; import { HwMessageComponent } from './components/layout/hardware-wallet/hw-message/hw-message.component'; import { HwPinDialogComponent } from './components/layout/hardware-wallet/hw-pin-dialog/hw-pin-dialog.component'; import { HwChangePinDialogComponent } from './components/layout/hardware-wallet/hw-change-pin-dialog/hw-change-pin-dialog.component'; import { HwPinHelpDialogComponent } from './components/layout/hardware-wallet/hw-pin-help-dialog/hw-pin-help-dialog.component'; import { HwRestoreSeedDialogComponent } from './components/layout/hardware-wallet/hw-restore-seed-dialog/hw-restore-seed-dialog.component'; import { HwSeedWordDialogComponent } from './components/layout/hardware-wallet/hw-seed-word-dialog/hw-seed-word-dialog.component'; import { Bip39WordListService } from './services/bip39-word-list.service'; import { HwDialogBaseComponent } from './components/layout/hardware-wallet/hw-dialog-base.component'; >>>>>>> import { ExchangeComponent } from './components/pages/exchange/exchange.component'; import { ExchangeService } from './services/exchange.service'; import { ExchangeCreateComponent } from './components/pages/exchange/exchange-create/exchange-create.component'; import { ExchangeStatusComponent } from './components/pages/exchange/exchange-status/exchange-status.component'; import { HwWalletService } from './services/hw-wallet.service'; import { HwOptionsDialogComponent } from './components/layout/hardware-wallet/hw-options-dialog/hw-options-dialog.component'; import { HwWipeDialogComponent } from './components/layout/hardware-wallet/hw-wipe-dialog/hw-wipe-dialog.component'; import { HwAddedDialogComponent } from './components/layout/hardware-wallet/hw-added-dialog/hw-added-dialog.component'; import { HwGenerateSeedDialogComponent } from './components/layout/hardware-wallet/hw-generate-seed-dialog/hw-generate-seed-dialog.component'; import { HwBackupDialogComponent } from './components/layout/hardware-wallet/hw-backup-dialog/hw-backup-dialog.component'; import { ConfirmationComponent } from './components/layout/confirmation/confirmation.component'; import { HwMessageComponent } from './components/layout/hardware-wallet/hw-message/hw-message.component'; import { HwPinDialogComponent } from './components/layout/hardware-wallet/hw-pin-dialog/hw-pin-dialog.component'; import { HwChangePinDialogComponent } from './components/layout/hardware-wallet/hw-change-pin-dialog/hw-change-pin-dialog.component'; import { HwPinHelpDialogComponent } from './components/layout/hardware-wallet/hw-pin-help-dialog/hw-pin-help-dialog.component'; import { HwRestoreSeedDialogComponent } from './components/layout/hardware-wallet/hw-restore-seed-dialog/hw-restore-seed-dialog.component'; import { HwSeedWordDialogComponent } from './components/layout/hardware-wallet/hw-seed-word-dialog/hw-seed-word-dialog.component'; import { Bip39WordListService } from './services/bip39-word-list.service'; import { HwDialogBaseComponent } from './components/layout/hardware-wallet/hw-dialog-base.component'; <<<<<<< ExchangeComponent, ExchangeCreateComponent, ExchangeStatusComponent, ======= HwOptionsDialogComponent, HwWipeDialogComponent, HwAddedDialogComponent, HwGenerateSeedDialogComponent, HwBackupDialogComponent, ConfirmationComponent, HwMessageComponent, HwPinDialogComponent, HwChangePinDialogComponent, HwPinHelpDialogComponent, HwRestoreSeedDialogComponent, HwSeedWordDialogComponent, HwDialogBaseComponent, >>>>>>> ExchangeComponent, ExchangeCreateComponent, ExchangeStatusComponent, HwOptionsDialogComponent, HwWipeDialogComponent, HwAddedDialogComponent, HwGenerateSeedDialogComponent, HwBackupDialogComponent, ConfirmationComponent, HwMessageComponent, HwPinDialogComponent, HwChangePinDialogComponent, HwPinHelpDialogComponent, HwRestoreSeedDialogComponent, HwSeedWordDialogComponent, HwDialogBaseComponent,
<<<<<<< import { QrCodeComponent } from '../../../layout/qr-code/qr-code.component'; ======= import { PasswordDialogComponent } from '../../../layout/password-dialog/password-dialog.component'; >>>>>>> import { QrCodeComponent } from '../../../layout/qr-code/qr-code.component'; import { PasswordDialogComponent } from '../../../layout/password-dialog/password-dialog.component';
<<<<<<< import { MsgBarService } from '../../../../services/msg-bar.service'; ======= import { ISubscription } from 'rxjs/Subscription'; import { Observable } from 'rxjs/Observable'; >>>>>>> import { MsgBarService } from '../../../../services/msg-bar.service'; import { ISubscription } from 'rxjs/Subscription'; import { Observable } from 'rxjs/Observable'; <<<<<<< this.msgBarService.hide(); ======= this.snackbar.dismiss(); this.closeCheckDeviceSubscription(); >>>>>>> this.msgBarService.hide(); this.closeCheckDeviceSubscription();
<<<<<<< import { HwWalletPinService } from './services/hw-wallet-pin.service'; import { HwWalletSeedWordService } from './services/hw-wallet-seed-word.service'; ======= import { LanguageService } from './services/language.service'; import { openChangeLanguageModal } from './utils'; >>>>>>> import { HwWalletPinService } from './services/hw-wallet-pin.service'; import { HwWalletSeedWordService } from './services/hw-wallet-seed-word.service'; import { LanguageService } from './services/language.service'; import { openChangeLanguageModal } from './utils'; <<<<<<< translateService.setDefaultLang('en'); translateService.use('en'); hwWalletPinService.requestPinComponent = HwPinDialogComponent; hwWalletSeedWordService.requestWordComponent = HwSeedWordDialogComponent; ======= hwWalletService.requestPinComponent = HwPinDialogComponent; hwWalletService.requestWordComponent = HwSeedWordDialogComponent; >>>>>>> hwWalletPinService.requestPinComponent = HwPinDialogComponent; hwWalletSeedWordService.requestWordComponent = HwSeedWordDialogComponent;
<<<<<<< this.processingSubscription = this.walletService.createTransaction( this.form.value.wallet, (this.form.value.wallet as Wallet).addresses.map(address => address.address), null, [{ address: this.form.value.address, coins: this.form.value.amount, }], { type: 'auto', mode: 'share', share_factor: '0.5', }, null, passwordDialog ? passwordDialog.password : null, this.previewTx, ).subscribe(transaction => { ======= let createTxRequest: Observable<PreviewTransaction>; if (!this.form.value.wallet.isHardware) { createTxRequest = this.walletService.createTransaction( this.form.value.wallet, null, null, [{ address: this.form.value.address, coins: this.selectedCurrency === DoubleButtonActive.LeftButton ? this.form.value.amount : this.value.toString(), }], { type: 'auto', mode: 'share', share_factor: '0.5', }, null, passwordDialog ? passwordDialog.password : null, ); } else { createTxRequest = this.walletService.createHwTransaction( this.form.value.wallet, this.form.value.address, new BigNumber(this.form.value.amount), ); } this.processingSubscription = createTxRequest.subscribe(transaction => { >>>>>>> this.processingSubscription = this.walletService.createTransaction( this.form.value.wallet, (this.form.value.wallet as Wallet).addresses.map(address => address.address), null, [{ address: this.form.value.address, coins: this.selectedCurrency === DoubleButtonActive.LeftButton ? this.form.value.amount : this.value.toString(), }], { type: 'auto', mode: 'share', share_factor: '0.5', }, null, passwordDialog ? passwordDialog.password : null, this.previewTx, ).subscribe(transaction => {
<<<<<<< import { parseResponseMessage } from '../../../../utils/index'; import { TranslateService } from '@ngx-translate/core'; ======= import { parseResponseMessage } from '../../../../utils/errors'; >>>>>>> import { parseResponseMessage } from '../../../../utils/errors'; import { TranslateService } from '@ngx-translate/core';
<<<<<<< import {Vector3} from '../math/Vector3' import {Color} from './../math/Color' import {Face3} from './Face3' import {Vector2} from '../math/Vector2' import {Vector4} from '../math/Vector4' import {Box3} from './../math/Box3' import {Sphere} from './../math/Sphere' import {Matrix4} from '../math/Matrix4' import {BufferGeometry} from './BufferGeometry' import {Matrix} from '../math/Matrix3' // import {Mesh} from '../objects/Mesh' //TODO uncomment Bone when ready // import {Bone} from '../objects/Bone' //TODO uncomment all Animation references once implemented // import {AnimationClip} from './../animation/AnimationClip' import {EventDispatcher} from './EventDispatcher' import {Matrix3} from '../math/Matrix3' import {Object3D} from './Object3D' import * as _Math from '../math/Math' import {Event} from './Event' ======= import {Vector3} from '../math/Vector3' import {Color} from './../math/Color' import {Face3} from './Face3' import {Vector2} from '../math/Vector2' import {Vector4} from '../math/Vector4' import {Box3} from './../math/Box3' import {Sphere} from './../math/Sphere' import {Matrix4} from '../math/Matrix4' import {BufferGeometry} from './BufferGeometry' import {Matrix} from '../math/Matrix3' import {Mesh} from '../objects/Mesh' import {Bone} from '../objects/Bone' import {AnimationClip} from './../animation/AnimationClip' import {EventDispatcher} from './EventDispatcher' import {Matrix3} from '../math/Matrix3.js' import {Object3D} from './Object3D.js' import * as _Math from '../math/Math' import {Event} from './Event' >>>>>>> import {Vector3} from '../math/Vector3' import {Color} from './../math/Color' import {Face3} from './Face3' import {Vector2} from '../math/Vector2' import {Vector4} from '../math/Vector4' import {Box3} from './../math/Box3' import {Sphere} from './../math/Sphere' import {Matrix4} from '../math/Matrix4' import {BufferGeometry} from './BufferGeometry' import {Matrix} from '../math/Matrix3' // import {Mesh} from '../objects/Mesh' //TODO uncomment Bone when ready // import {Bone} from '../objects/Bone' //TODO uncomment all Animation references once implemented // import {AnimationClip} from './../animation/AnimationClip' import {EventDispatcher} from './EventDispatcher' import {Matrix3} from '../math/Matrix3' import {Object3D} from './Object3D' import * as _Math from '../math/Math' import {Event} from './Event' <<<<<<< //TODO uncomment when Bone is ready // bones: Bone[] // animation: AnimationClip // animations: AnimationClip[] ======= bones: Bone[] animation: AnimationClip animations: AnimationClip[] >>>>>>> //TODO uncomment when Bone is ready // bones: Bone[] // animation: AnimationClip // animations: AnimationClip[] <<<<<<< id: i32 ======= id: number >>>>>>> id: i32 <<<<<<< // morphTargets: MorphTarget[] ======= morphTargets: MorphTarget[] >>>>>>> // morphTargets: MorphTarget[] <<<<<<< // morphNormals: MorphNormals[] ======= morphNormals: MorphNormals[] >>>>>>> // morphNormals: MorphNormals[] <<<<<<< lineDistances: f32[] ======= lineDistances: number[] >>>>>>> lineDistances: f32[] <<<<<<< verticesNeedUpdate: bool ======= verticesNeedUpdate: boolean >>>>>>> verticesNeedUpdate: bool <<<<<<< elementsNeedUpdate: bool ======= elementsNeedUpdate: boolean >>>>>>> elementsNeedUpdate: bool <<<<<<< uvsNeedUpdate: bool ======= uvsNeedUpdate: boolean >>>>>>> uvsNeedUpdate: bool <<<<<<< normalsNeedUpdate: bool ======= normalsNeedUpdate: boolean >>>>>>> normalsNeedUpdate: bool <<<<<<< colorsNeedUpdate: bool ======= colorsNeedUpdate: boolean >>>>>>> colorsNeedUpdate: bool <<<<<<< this.boundingBox = new Box3() this.boundingSphere = new Sphere() ======= this.boundingBox = null this.boundingSphere = null >>>>>>> // this.boundingBox = null // this.boundingSphere = null <<<<<<< rotateX(angle: f32): Geometry { ======= rotateX(angle: number): Geometry { >>>>>>> rotateX(angle: f32): Geometry { <<<<<<< var m1: Matrix4 = new Matrix4() ======= var m1 = new Matrix4() >>>>>>> var m1: Matrix4 = new Matrix4() <<<<<<< rotateZ(angle: f32): Geometry { ======= rotateZ(angle: number): Geometry { >>>>>>> rotateZ(angle: f32): Geometry { <<<<<<< var offset: Vector3 = new Vector3() ======= var offset = new Vector3() >>>>>>> var offset: Vector3 = new Vector3() <<<<<<< var v: i32, vl: i32, f: i32, fl: i32, face: Face3, vertices: Vector3[] ======= var v, vl, f, fl, face, vertices: Vector3[] >>>>>>> var v: i32, vl: i32, f: i32, fl: i32, face: Face3, vertices: Vector3[] <<<<<<< var vertexNormals: Vector3[] = face.vertexNormals ======= var vertexNormals = face.vertexNormals >>>>>>> var vertexNormals: Vector3[] = face.vertexNormals <<<<<<< // for (f = 0, fl = this.faces.length; f < fl; f++) { // faceNormal = new Vector3() // vertexNormals = [new Vector3(), new Vector3(), new Vector3()] ======= tmpGeo.vertices = this.morphTargets[i].vertices >>>>>>> // for (f = 0, fl = this.faces.length; f < fl; f++) { // faceNormal = new Vector3() // vertexNormals = [new Vector3(), new Vector3(), new Vector3()] <<<<<<< // var morphNormals: MorphNormals = this.morphNormals[i] ======= tmpGeo.computeFaceNormals() tmpGeo.computeVertexNormals() >>>>>>> // var morphNormals: MorphNormals = this.morphNormals[i] <<<<<<< for (var i = 0, il = vertices2.length; i < il; i++) { var vertex: Vector3 = vertices2[i] var vertexCopy: Vector3 = vertex.clone() if (matrix !== undefined) vertexCopy.applyMatrix4(matrix) ======= for (var i = 0, il = vertices2.length; i < il; i++) { var vertex = vertices2[i] var vertexCopy = vertex.clone() if (matrix !== undefined) vertexCopy.applyMatrix4(matrix) >>>>>>> for (var i = 0, il = vertices2.length; i < il; i++) { var vertex: Vector3 = vertices2[i] var vertexCopy: Vector3 = vertex.clone() if (matrix !== undefined) vertexCopy.applyMatrix4(matrix) <<<<<<< for (i = 0, il = faces2.length; i < il; i++) { var face: Face3 = faces2[i], faceCopy: Face3, normal: Vector3, color: Color, faceVertexNormals: Vector3[] = face.vertexNormals, faceVertexColors: Color[] = face.vertexColors faceCopy = new Face3(face.a + vertexOffset, face.b + vertexOffset, face.c + vertexOffset) faceCopy.normal.copy(face.normal) ======= for (i = 0, il = faces2.length; i < il; i++) { var face = faces2[i], faceCopy, normal, color, faceVertexNormals = face.vertexNormals, faceVertexColors = face.vertexColors faceCopy = new Face3(face.a + vertexOffset, face.b + vertexOffset, face.c + vertexOffset) faceCopy.normal.copy(face.normal) >>>>>>> for (i = 0, il = faces2.length; i < il; i++) { var face: Face3 = faces2[i], faceCopy: Face3, normal: Vector3, color: Color, faceVertexNormals: Vector3[] = face.vertexNormals, faceVertexColors: Color[] = face.vertexColors faceCopy = new Face3(face.a + vertexOffset, face.b + vertexOffset, face.c + vertexOffset) faceCopy.normal.copy(face.normal) <<<<<<< //TODO: uncomment when Mesh is ready // mergeMesh(mesh: Mesh): void { // // if ( ! ( mesh && mesh.isMesh ) ) { ======= mergeMesh(mesh: Mesh): void { // if ( ! ( mesh && mesh.isMesh ) ) { >>>>>>> //TODO: uncomment when Mesh is ready // mergeMesh(mesh: Mesh): void { // // if ( ! ( mesh && mesh.isMesh ) ) { <<<<<<< for (i = faceIndicesToRemove.length - 1; i >= 0; i--) { var idx = faceIndicesToRemove[i] this.faces.splice(idx, 1) ======= for (i = faceIndicesToRemove.length - 1; i >= 0; i--) { var idx = faceIndicesToRemove[i] this.faces.splice(idx, 1) >>>>>>> for (i = faceIndicesToRemove.length - 1; i >= 0; i--) { var idx = faceIndicesToRemove[i] this.faces.splice(idx, 1) <<<<<<< for (var i = 0; i < length; i++) { faces[i].id = i ======= for (var i = 0; i < length; i++) { faces[i]._id = i >>>>>>> for (var i = 0; i < length; i++) { faces[i].id = i <<<<<<< for (var i = 0; i < length; i++) { var id = faces[i].id ======= for (var i = 0; i < length; i++) { var id = faces[i]._id >>>>>>> for (var i = 0; i < length; i++) { var id = faces[i].id <<<<<<< var faces = [] var normals: Vector3[] = [] var normalsHash: Map<string, f32> = new Map() var colors: string[] = [] var colorsHash: Map<string, f32> = new Map() var uvs: Vector2[] = [] var uvsHash: Map<String, f32> = new Map() for (var i = 0; i < this.faces.length; i++) { var face = this.faces[i] var hasMaterial = true var hasFaceUv = false // deprecated var hasFaceVertexUv = this.faceVertexUvs[0][i] !== undefined var hasFaceNormal = face.normal.length() > 0 var hasFaceVertexNormal = face.vertexNormals.length > 0 var hasFaceColor = face.color.r !== 1 || face.color.g !== 1 || face.color.b !== 1 var hasFaceVertexColor = face.vertexColors.length > 0 var faceType = 0 faceType = setBit(faceType, 0, false) // isQuad faceType = setBit(faceType, 1, hasMaterial) faceType = setBit(faceType, 2, hasFaceUv) faceType = setBit(faceType, 3, hasFaceVertexUv) faceType = setBit(faceType, 4, hasFaceNormal) faceType = setBit(faceType, 5, hasFaceVertexNormal) faceType = setBit(faceType, 6, hasFaceColor) faceType = setBit(faceType, 7, hasFaceVertexColor) faces.push(faceType) faces.push(face.a) faces.push(face.b) faces.push(face.c) faces.push(face.materialIndex) if (hasFaceVertexUv) { var faceVertexUvs = this.faceVertexUvs[0][i] faces.push(getUvIndex(faceVertexUvs[0])) faces.push(getUvIndex(faceVertexUvs[1])) faces.push(getUvIndex(faceVertexUvs[2])) ======= var faces = [] var normals: Vector3[] = [] var normalsHash: Map<string, number> = new Map() var colors: string[] = [] var colorsHash: Map<string, number> = new Map() var uvs: Vector2[] = [] var uvsHash: Map<String, number> = new Map() for (var i = 0; i < this.faces.length; i++) { var face = this.faces[i] var hasMaterial = true var hasFaceUv = false // deprecated var hasFaceVertexUv = this.faceVertexUvs[0][i] !== undefined var hasFaceNormal = face.normal.length() > 0 var hasFaceVertexNormal = face.vertexNormals.length > 0 var hasFaceColor = face.color.r !== 1 || face.color.g !== 1 || face.color.b !== 1 var hasFaceVertexColor = face.vertexColors.length > 0 var faceType = 0 faceType = setBit(faceType, 0, false) // isQuad faceType = setBit(faceType, 1, hasMaterial) faceType = setBit(faceType, 2, hasFaceUv) faceType = setBit(faceType, 3, hasFaceVertexUv) faceType = setBit(faceType, 4, hasFaceNormal) faceType = setBit(faceType, 5, hasFaceVertexNormal) faceType = setBit(faceType, 6, hasFaceColor) faceType = setBit(faceType, 7, hasFaceVertexColor) faces.push(faceType) faces.push(face.a) faces.push(face.b) faces.push(face.c) faces.push(face.materialIndex) if (hasFaceVertexUv) { var faceVertexUvs = this.faceVertexUvs[0][i] faces.push(getUvIndex(faceVertexUvs[0])) faces.push(getUvIndex(faceVertexUvs[1])) faces.push(getUvIndex(faceVertexUvs[2])) >>>>>>> var faces = [] var normals: Vector3[] = [] var normalsHash: Map<string, f32> = new Map() var colors: string[] = [] var colorsHash: Map<string, f32> = new Map() var uvs: Vector2[] = [] var uvsHash: Map<String, f32> = new Map() for (var i = 0; i < this.faces.length; i++) { var face = this.faces[i] var hasMaterial = true var hasFaceUv = false // deprecated var hasFaceVertexUv = this.faceVertexUvs[0][i] !== undefined var hasFaceNormal = face.normal.length() > 0 var hasFaceVertexNormal = face.vertexNormals.length > 0 var hasFaceColor = face.color.r !== 1 || face.color.g !== 1 || face.color.b !== 1 var hasFaceVertexColor = face.vertexColors.length > 0 var faceType = 0 faceType = setBit(faceType, 0, false) // isQuad faceType = setBit(faceType, 1, hasMaterial) faceType = setBit(faceType, 2, hasFaceUv) faceType = setBit(faceType, 3, hasFaceVertexUv) faceType = setBit(faceType, 4, hasFaceNormal) faceType = setBit(faceType, 5, hasFaceVertexNormal) faceType = setBit(faceType, 6, hasFaceColor) faceType = setBit(faceType, 7, hasFaceVertexColor) faces.push(faceType) faces.push(face.a) faces.push(face.b) faces.push(face.c) faces.push(face.materialIndex) if (hasFaceVertexUv) { var faceVertexUvs = this.faceVertexUvs[0][i] faces.push(getUvIndex(faceVertexUvs[0])) faces.push(getUvIndex(faceVertexUvs[1])) faces.push(getUvIndex(faceVertexUvs[2])) <<<<<<< function setBit(value: f32, position: f32, enabled: boolean) { return enabled ? value | (1 << position) : value & ~(1 << position) ======= function setBit(value: number, position: number, enabled: boolean) { return enabled ? value | (1 << position) : value & ~(1 << position) >>>>>>> function setBit(value: f32, position: f32, enabled: boolean) { return enabled ? value | (1 << position) : value & ~(1 << position) <<<<<<< colorsHash.set(hash, colors.length) colors.push(color.getHex().toString()) ======= colorsHash.set(hash, colors.length) colors.push(color.getHex()) >>>>>>> colorsHash.set(hash, colors.length) colors.push(color.getHex().toString()) // colors.push(color.getHex()) <<<<<<< copy(source: Geometry): this { var i: i32, il: i32, j: i32, jl: i32, k: i32, kl: i32 ======= copy(source: Geometry): this { var i, il, j, jl, k, kl >>>>>>> copy(source: Geometry): this { var i: i32, il: i32, j: i32, jl: i32, k: i32, kl: i32 <<<<<<< this.vertices = [] this.colors = [] this.faces = [] this.faceVertexUvs = [[]] // this.morphTargets = [] // this.morphNormals = [] this.skinWeights = [] this.skinIndices = [] this.lineDistances = [] //bouding Box & Sphere are allocated in the constructor // this.boundingBox = null // this.boundingSphere = null ======= this.vertices = [] this.colors = [] this.faces = [] this.faceVertexUvs = [[]] this.morphTargets = [] this.morphNormals = [] this.skinWeights = [] this.skinIndices = [] this.lineDistances = [] this.boundingBox = null this.boundingSphere = null >>>>>>> this.vertices = [] this.colors = [] this.faces = [] this.faceVertexUvs = [[]] // this.morphTargets = [] // this.morphNormals = [] this.skinWeights = [] this.skinIndices = [] this.lineDistances = [] //bouding Box & Sphere are allocated in the constructor // this.boundingBox = null // this.boundingSphere = null <<<<<<< for (j = 0, jl = faceVertexUvs.length; j < jl; j++) { var uvs = faceVertexUvs[j], uvsCopy = [] for (k = 0, kl = uvs.length; k < kl; k++) { var uv = uvs[k] ======= for (j = 0, jl = faceVertexUvs.length; j < jl; j++) { var uvs = faceVertexUvs[j], uvsCopy = [] for (k = 0, kl = uvs.length; k < kl; k++) { var uv = uvs[k] >>>>>>> for (j = 0, jl = faceVertexUvs.length; j < jl; j++) { var uvs = faceVertexUvs[j], uvsCopy = [] for (k = 0, kl = uvs.length; k < kl; k++) { var uv = uvs[k] <<<<<<< ======= disposeEvent = new Event('dispose', null, null) >>>>>>> disposeEvent = new Event('dispose', null, null)
<<<<<<< // // if (colors !== undefined) { // // this.colors.push(new Color().fromArray(colors, i)) // // } // // } ======= // if (colors !== undefined) { // scope.colors.push(new Color().fromArray(colors, i)) // } // } /// WRONG should be i32s // function addFace(a: f32, b: f32, c: f32, materialIndex: f32) { // var vertexColors = // colors === undefined ? [] : [scope.colors[a].clone(), scope.colors[b].clone(), scope.colors[c].clone()] // var vertexNormals = // normals === undefined // ? [] // : [ // new Vector3().fromArray(normals, a * 3), // new Vector3().fromArray(normals, b * 3), // new Vector3().fromArray(normals, c * 3), // ] // var face = new Face3(a, b, c, vertexNormals, vertexColors, materialIndex) // scope.faces.push(face) // if (uvs !== undefined) { // scope.faceVertexUvs[0].push([ // new Vector2().fromArray(uvs, a * 2), // new Vector2().fromArray(uvs, b * 2), // new Vector2().fromArray(uvs, c * 2), // ]) // } // if (uvs2 !== undefined) { // scope.faceVertexUvs[1].push([ // new Vector2().fromArray(uvs2, a * 2), // new Vector2().fromArray(uvs2, b * 2), // new Vector2().fromArray(uvs2, c * 2), // ]) // } // } // var groups = geometry.groups // if (groups.length > 0) { // for (var i = 0; i < groups.length; i++) { // var group = groups[i] >>>>>>> // // if (colors !== undefined) { // // this.colors.push(new Color().fromArray(colors, i)) // // } // // } /// WRONG should be i32s // function addFace(a: f32, b: f32, c: f32, materialIndex: f32) { // var vertexColors = // colors === undefined ? [] : [scope.colors[a].clone(), scope.colors[b].clone(), scope.colors[c].clone()] // var vertexNormals = // normals === undefined // ? [] // : [ // new Vector3().fromArray(normals, a * 3), // new Vector3().fromArray(normals, b * 3), // new Vector3().fromArray(normals, c * 3), // ] // var face = new Face3(a, b, c, vertexNormals, vertexColors, materialIndex) // scope.faces.push(face) // if (uvs !== undefined) { // scope.faceVertexUvs[0].push([ // new Vector2().fromArray(uvs, a * 2), // new Vector2().fromArray(uvs, b * 2), // new Vector2().fromArray(uvs, c * 2), // ]) // } // if (uvs2 !== undefined) { // scope.faceVertexUvs[1].push([ // new Vector2().fromArray(uvs2, a * 2), // new Vector2().fromArray(uvs2, b * 2), // new Vector2().fromArray(uvs2, c * 2), // ]) // } // } // var groups = geometry.groups // if (groups.length > 0) { // for (var i = 0; i < groups.length; i++) { // var group = groups[i]
<<<<<<< expect<f32>(c.r).toBe(0) expect<f32>(c.g).toBe(0) expect<f32>(c.b).toBe(0) ======= expect(c.r).toBe(0) expect(c.g).toBe(0) expect(c.b).toBe(0) >>>>>>> expect(c.r).toBe(0) expect(c.g).toBe(0) expect(c.b).toBe(0) <<<<<<< expect<f32>(c.r).toBe(1) expect<f32>(c.g).toBe(1) expect<f32>(c.b).toBe(1) ======= expect(c.r).toBe(1) expect(c.g).toBe(1) expect(c.b).toBe(1) >>>>>>> expect(c.r).toBe(1) expect(c.g).toBe(1) expect(c.b).toBe(1) <<<<<<< // expect<f32>(hsl.h).toBe(0) // expect<f32>(hsl.s).toBe(0) // expect<f32>(hsl.l).toBe(0) ======= // expect(hsl.h).toBe(0) // expect(hsl.s).toBe(0) // expect(hsl.l).toBe(0) >>>>>>> // expect(hsl.h).toBe(0) // expect(hsl.s).toBe(0) // expect(hsl.l).toBe(0) <<<<<<< // // expect<f32>(hsl.h).toBe(0.75) // // expect<f32>(hsl.s).toBe(1.0) // // expect<f32>(hsl.l).toBe(0.25) ======= // // expect(hsl.h).toBe(0.75) // // expect(hsl.s).toBe(1.0) // // expect(hsl.l).toBe(0.25) >>>>>>> // // expect(hsl.h).toBe(0.75) // // expect(hsl.s).toBe(1.0) // // expect(hsl.l).toBe(0.25) <<<<<<< function checkColor(c: Color, r: f32, g: f32, b: f32): void { expect<f32>(c.r).toBe(r) expect<f32>(c.g).toBe(g) expect<f32>(c.b).toBe(b) ======= function checkColor(c: Color, r: f64, g: f64, b: f64): void { expect(c.r).toBe(r) expect(c.g).toBe(g) expect(c.b).toBe(b) >>>>>>> function checkColor(c: Color, r: f32, g: f32, b: f32): void { expect(c.r).toBe(r) expect(c.g).toBe(g) expect(c.b).toBe(b)
<<<<<<< import XSAnime from './Xsanime'; import AnimeRush from './AnimeRush'; import TioAnime from './TioAnime'; ======= import Anime8 from './Anime8'; >>>>>>> import XSAnime from './Xsanime'; import AnimeRush from './AnimeRush'; import TioAnime from './TioAnime'; import Anime8 from './Anime8'; <<<<<<< export type TaiyakiSourceTypes= 'Vidstreaming' | 'FourAnime' | 'AnimeOwl' | 'KimAnime' | 'XSAnime' | 'AnimeRush' | 'TioAnime'; ======= export type TaiyakiSourceTypes= 'Vidstreaming' | 'FourAnime' | 'AnimeOwl' | 'KimAnime' | 'Anime8'; >>>>>>> export type TaiyakiSourceTypes= 'Vidstreaming' | 'FourAnime' | 'AnimeOwl' | 'KimAnime' | 'XSAnime' | 'AnimeRush' | 'Anime8' | 'TioAnime'; <<<<<<< new AnimeRush(), new TioAnime(), // new XSAnime(), ======= new Anime8(), >>>>>>> new AnimeRush(), new TioAnime(), // new XSAnime(), new Anime8(), <<<<<<< ['XSAnime', new XSAnime()], ['AnimeRush', new AnimeRush()], ['TioAnime', new TioAnime()], ======= ['Anime8', new Anime8()], >>>>>>> ['Anime8', new Anime8()], <<<<<<< XSAnime, TioAnime, ======= Anime8, >>>>>>> Anime8,
<<<<<<< return copyPasteConnection.startGet(globals.MESSAGE_VERSION); ======= if (remoteProxyInstance) { log.warn('Existing proxying session, terminating'); remoteProxyInstance.stop(); remoteProxyInstance = null; } return copyPasteConnection.startGet(globals.effectiveMessageVersion()); >>>>>>> return copyPasteConnection.startGet(globals.effectiveMessageVersion());
<<<<<<< }, ready: function() { this.openingAnchor = ''; this.ui = ui_context.ui; this.model = ui_context.model; }, domReady: function() { this.translateElements(); }, observe: { 'model.globalSettings.language': 'translateElements' ======= }, computed: { 'opened': '$.faqPanel.opened' >>>>>>> }, ready: function() { this.openingAnchor = ''; this.ui = ui_context.ui; this.model = ui_context.model; }, domReady: function() { this.translateElements(); }, observe: { 'model.globalSettings.language': 'translateElements' }, computed: { 'opened': '$.faqPanel.opened'
<<<<<<< import Constants = require('./constants'); ======= import translator_module = require('./translator'); import _ = require('lodash'); >>>>>>> import Constants = require('./constants'); import translator_module = require('./translator'); import _ = require('lodash'); <<<<<<< export var SHARE_FAILED_MSG :string = 'Unable to share access with '; export var GET_FAILED_MSG :string = 'Unable to get access from '; ======= // userId is included as an optional parameter because we will eventually // want to use it to get an accurate network. For now, it is ignored and // serves to remind us of where we still need to add the info public getNetwork = (networkName :string, userId?:string) :Network => { return _.find(this.onlineNetworks, { name: networkName }); } public removeNetwork = (networkName :string) => { _.remove(this.onlineNetworks, { name: networkName }); } public getUser = (network :Network, userId :string) :User => { if (network.roster[userId]) { return network.roster[userId]; } return null; } public updateGlobalSettings = (settings :Object) => { _.merge(this.globalSettings, settings, (a :any, b :any) => { if (_.isArray(a) && _.isArray(b)) { return b; } return undefined; }); } } // Singleton model for data bindings. export var model = new Model(); >>>>>>> //export var SHARE_FAILED_MSG :string = 'Unable to share access with '; //export var GET_FAILED_MSG :string = 'Unable to get access from '; // userId is included as an optional parameter because we will eventually // want to use it to get an accurate network. For now, it is ignored and // serves to remind us of where we still need to add the info public getNetwork = (networkName :string, userId?:string) :Network => { return _.find(this.onlineNetworks, { name: networkName }); } public removeNetwork = (networkName :string) => { _.remove(this.onlineNetworks, { name: networkName }); } public getUser = (network :Network, userId :string) :User => { if (network.roster[userId]) { return network.roster[userId]; } return null; } public updateGlobalSettings = (settings :Object) => { _.merge(this.globalSettings, settings, (a :any, b :any) => { if (_.isArray(a) && _.isArray(b)) { return b; } return undefined; }); } } // Singleton model for data bindings. export var model = new Model(); <<<<<<< ======= public disconnectedWhileProxying = false; public i18n_t :Function = translator_module.i18n_t; public i18n_setLng :Function = translator_module.i18n_setLng; >>>>>>> public i18n_t :Function = translator_module.i18n_t; public i18n_setLng :Function = translator_module.i18n_setLng; <<<<<<< core.getInitialState(); ======= core.getFullState() .then(this.updateInitialState); >>>>>>> core.getFullState() .then(this.updateInitialState); <<<<<<< // Attach handlers for UPDATES received from core. // TODO: Implement the rest of the fine-grained state updates. // (We begin with the simplest, total state update, above.) core.onUpdate(uproxy_core_api.Update.INITIAL_STATE, (state :uproxy_core_api.InitialState) => { console.log('Received uproxy_core_api.Update.INITIAL_STATE:', state); model.networkNames = state.networkNames; // TODO: Do not allow reassignment of globalSettings. Instead // write a 'syncGlobalSettings' function that iterates through // the values in state[globalSettings] and assigns the // individual values to model.globalSettings. This is required // because Polymer elements bound to globalSettings' values can // only react to updates to globalSettings and not reassignments. model.globalSettings = state.globalSettings; this.copyPasteState = state.copyPasteState; this.copyPasteGettingMessage = state.copyPasteGettingMessage; this.copyPasteSharingMessage = state.copyPasteSharingMessage; this.copyPastePendingEndpoint = state.copyPastePendingEndpoint; if (this.copyPasteState.localGettingFromRemote !== social.GettingState.NONE || this.copyPasteState.localSharingWithRemote !== social.SharingState.NONE) { this.view = ui_constants.View.COPYPASTE; } this.browserApi.fulfillLaunched(); if (state['onlineNetwork'] === null) { return; } if (model.onlineNetwork === null) { model.onlineNetwork = { name: state['onlineNetwork'].name, userId: state['onlineNetwork'].profile.userId, userName: state['onlineNetwork'].profile.name, imageData: state['onlineNetwork'].profile.imageData, roster: {}, hasContacts: false }; } if (this.view === ui_constants.View.COPYPASTE) { console.error( 'User cannot be online while having a copy-paste connection'); } this.view = ui_constants.View.ROSTER; for (var userId in state['onlineNetwork'].roster) { this.syncUser(state['onlineNetwork'].roster[userId]); } this.updateSharingStatusBar_(); }); ======= core.onUpdate(uproxy_core_api.Update.INITIAL_STATE_DEPRECATED_0_8_10, this.updateInitialState); >>>>>>> core.onUpdate(uproxy_core_api.Update.INITIAL_STATE_DEPRECATED_0_8_10, this.updateInitialState); <<<<<<< if (this.isGivingAccess()) { this.browserApi.setIcon(Constants.SHARING_ICON); } else if (model.onlineNetwork) { this.browserApi.setIcon(Constants.DEFAULT_ICON); } else { this.setOfflineIcon(); } ======= this.updateIcon_(); >>>>>>> this.updateIcon_(); <<<<<<< this.browserApi.setIcon(Constants.ERROR_ICON); this.bringUproxyToFront(); this.core.disconnectedWhileProxying = true; ======= this.disconnectedWhileProxying = true; this.updateIcon_(); this.bringUproxyToFront(); >>>>>>> this.bringUproxyToFront(); this.core.disconnectedWhileProxying = true; this.updateIcon_(); <<<<<<< if (this.isGivingAccess()) { this.browserApi.setIcon(Constants.GETTING_SHARING_ICON); } else { this.browserApi.setIcon(Constants.GETTING_ICON); } ======= this.updateIcon_(true); >>>>>>> this.updateIcon_(true); <<<<<<< if (this.isGettingAccess()) { this.browserApi.setIcon(Constants.GETTING_SHARING_ICON); } else { this.browserApi.setIcon(Constants.SHARING_ICON); ======= this.updateIcon_(null, true); } private updateIcon_ = (isGetting?:boolean, isGiving?:boolean) => { if (isGetting === null || typeof isGetting === 'undefined') { isGetting = this.isGettingAccess(); } if (isGiving === null || typeof isGiving === 'undefined') { isGiving = this.isGivingAccess(); } if (this.disconnectedWhileProxying) { this.browserApi.setIcon(ERROR_ICON); } else if (isGetting && isGiving) { this.browserApi.setIcon(GETTING_SHARING_ICON); } else if (isGetting) { this.browserApi.setIcon(GETTING_ICON); } else if (isGiving) { this.browserApi.setIcon(SHARING_ICON); } else if (model.onlineNetworks.length > 0) { this.browserApi.setIcon(DEFAULT_ICON); } else { this.browserApi.setIcon(LOGGED_OUT_ICON); >>>>>>> this.updateIcon_(null, true); } private updateIcon_ = (isGetting?:boolean, isGiving?:boolean) => { if (isGetting === null || typeof isGetting === 'undefined') { isGetting = this.isGettingAccess(); } if (isGiving === null || typeof isGiving === 'undefined') { isGiving = this.isGivingAccess(); } if (this.core.disconnectedWhileProxying) { this.browserApi.setIcon(ERROR_ICON); } else if (isGetting && isGiving) { this.browserApi.setIcon(GETTING_SHARING_ICON); } else if (isGetting) { this.browserApi.setIcon(GETTING_ICON); } else if (isGiving) { this.browserApi.setIcon(SHARING_ICON); } else if (model.onlineNetworks.length > 0) { this.browserApi.setIcon(DEFAULT_ICON); } else { this.browserApi.setIcon(LOGGED_OUT_ICON); <<<<<<< if (this.isGettingAccess()) { this.browserApi.setIcon(Constants.GETTING_ICON); } else if (model.onlineNetwork) { this.browserApi.setIcon(Constants.DEFAULT_ICON); } else { this.setOfflineIcon(); } } public setOfflineIcon = () => { this.browserApi.setIcon(Constants.LOGGED_OUT_ICON); ======= this.updateIcon_(null, false); >>>>>>> this.updateIcon_(null, false);
<<<<<<< core.getInitialState(); ======= var ready :browser_connector.Payload = { cmd: 'emit', type: uproxy_core_api.Command.GET_INITIAL_STATE, promiseId: 0 } this.send(ready); this.emit('core_connect'); >>>>>>> core.getInitialState(); this.emit('core_connect'); <<<<<<< // When extension is loaded initially, this is called but // ui might not be loaded yet. if (typeof core.ui !== 'undefined') { core.ui.view = uProxy.View.SPLASH; } ======= >>>>>>> // When extension is loaded initially, this is called but // ui might not be loaded yet. if (typeof core.ui !== 'undefined') { core.ui.view = uProxy.View.SPLASH; } <<<<<<< "19": "icons/19_" + Constants.LOGGED_OUT_ICON, "38": "icons/38_" + Constants.LOGGED_OUT_ICON ======= "19": "icons/19_" + user_interface.LOGGED_OUT_ICON, "38": "icons/38_" + user_interface.LOGGED_OUT_ICON >>>>>>> "19": "icons/19_" + Constants.LOGGED_OUT_ICON, "38": "icons/38_" + Constants.LOGGED_OUT_ICON <<<<<<< // When disconnected from the app, we should show the browser specific page // that shows the "app missing" message. core.ui.view = uProxy.View.BROWSER_ERROR; ======= >>>>>>> <<<<<<< // Ensure that proxying has stopped and update this.status. // TODO: display a notification to the user when we have a good way to // check if they are currently getting or giving access. core.ui.stopGettingInUiAndConfig(true); ======= >>>>>>> <<<<<<< if (!alreadyHooked) { console.log('UI onUpdate for', JSON.stringify(payload)); this.send(payload, true); } ======= // This log floods the console during testing. Uncomment for debugging. // console.log('UI onUpdate for', JSON.stringify(payload)); this.send(payload, true); >>>>>>> if (!alreadyHooked) { // This log floods the console during testing. Uncomment for debugging. // console.log('UI onUpdate for', JSON.stringify(payload)); this.send(payload, true); }
<<<<<<< = {description : 'My Computer', stunServers : this.DEFAULT_STUN_SERVERS_.slice(0), newToUproxy : true}; ======= = {description : '', stunServers : this.DEFAULT_STUN_SERVERS_.slice(0)}; >>>>>>> = {description : '', stunServers : this.DEFAULT_STUN_SERVERS_.slice(0), newToUproxy : true}; <<<<<<< this.globalSettings.description = newSettings.description; this.globalSettings.newToUproxy = newSettings.newToUproxy; ======= if (newSettings.description != this.globalSettings.description) { this.globalSettings.description = newSettings.description; // Resend instance info to update description for logged in networks. for (var networkName in Social.networks) { for (var userId in Social.networks[networkName]) { Social.networks[networkName][userId].resendInstanceHandshakes(); } } } >>>>>>> if (newSettings.description != this.globalSettings.description) { this.globalSettings.description = newSettings.description; // Resend instance info to update description for logged in networks. for (var networkName in Social.networks) { for (var userId in Social.networks[networkName]) { Social.networks[networkName][userId].resendInstanceHandshakes(); } } } if(newSettings.newToUproxy != this.globalSettings.newToUproxy) { this.globalSettings.newToUproxy = newSettings.newToUproxy; }
<<<<<<< var checkConnectivityIntervalId: number; ======= var checkConnectivityIntervalId : number; >>>>>>> var checkConnectivityIntervalId : number; <<<<<<< checkConnectivityIntervalId = setInterval(this.browserApi.checkConnectivity, 5 * 60 * 1000); ======= clearInterval(checkConnectivityIntervalId); >>>>>>> clearInterval(checkConnectivityIntervalId); <<<<<<< ======= public onConnectedToCellularWhileSharing = () => { this.showNotification('You are now sharing data through your cellular ' + 'network which may incur charges.'); } >>>>>>>
<<<<<<< // If we were getting access from some other instance // turn down the connection. if (this.instanceGettingAccessFrom_ && this.instanceGettingAccessFrom_ != instanceId) { this.core.stop(this.getInstancePath_(this.instanceGettingAccessFrom_)); } ======= >>>>>>> // If we were getting access from some other instance // turn down the connection. if (this.instanceGettingAccessFrom_ && this.instanceGettingAccessFrom_ != instanceId) { this.core.stop(this.getInstancePath_(this.instanceGettingAccessFrom_)); } <<<<<<< }).catch((e :Error) => { // this is only an error if we are still trying to get access from the // instance if (this.instanceTryingToGetAccessFrom !== instanceId) { return; } var userName = this.mapInstanceIdToUser_[instanceId].name; this.toastMessage = this.i18n_t('unableToGetFrom', { name: name }); this.instanceTryingToGetAccessFrom = null; this.unableToGet = true; this.bringUproxyToFront(); return Promise.reject(e); ======= >>>>>>>