conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
const restoreOptions = { acceptTextOnly: true, encoding: 'utf-8' };
resolveBackupPromise = this.textFileService.resolveTextContent(restoreResource, restoreOptions).then(backup => {
// The first line of a backup text file is the file name
return backup.value.lines.slice(1).join('\n');
}, error => content.value);
=======
resolveBackupPromise = this.textFileService.resolveTextContent(restoreResource, BACKUP_FILE_RESOLVE_OPTIONS).then(backup => backup.value, error => content.value);
>>>>>>>
resolveBackupPromise = this.textFileService.resolveTextContent(restoreResource, BACKUP_FILE_RESOLVE_OPTIONS).then(backup => {
// The first line of a backup text file is the file name
return backup.value.lines.slice(1).join('\n');
}, error => content.value); |
<<<<<<<
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem';
import { CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands';
=======
import { ContextKeyExpr, IContext } from 'vs/platform/contextkey/common/contextkey';
import { NormalizedKeybindingItem } from 'vs/platform/keybinding/common/normalizedKeybindingItem';
>>>>>>>
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
import { ContextKeyExpr, IContext } from 'vs/platform/contextkey/common/contextkey';
import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem';
import { CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands';
<<<<<<<
public resolve(context: any, currentChord: string, keypress: string): IResolveResult {
let lookupMap: ResolvedKeybindingItem[] = null;
=======
public resolve(context: IContext, currentChord: string, keypress: string): IResolveResult {
let lookupMap: NormalizedKeybindingItem[] = null;
>>>>>>>
public resolve(context: IContext, currentChord: string, keypress: string): IResolveResult {
let lookupMap: ResolvedKeybindingItem[] = null;
<<<<<<<
private _findCommand(context: any, matches: ResolvedKeybindingItem[]): ResolvedKeybindingItem {
=======
private _findCommand(context: IContext, matches: NormalizedKeybindingItem[]): NormalizedKeybindingItem {
>>>>>>>
private _findCommand(context: IContext, matches: ResolvedKeybindingItem[]): ResolvedKeybindingItem { |
<<<<<<<
import {isEmptyElement} from 'vs/languages/html/common/htmlEmptyTagsShared';
=======
import nls = require('vs/nls');
var emptyElements:string[] = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
export function isEmptyElement(e: string) : boolean {
return arrays.binarySearch(emptyElements, e,(s1: string, s2: string) => s1.localeCompare(s2)) >= 0;
}
>>>>>>>
import nls = require('vs/nls');
import {isEmptyElement} from 'vs/languages/html/common/htmlEmptyTagsShared'; |
<<<<<<<
return this.backupFileService.hasBackup(this.resource).then(backupExists => {
let resolveBackupPromise: TPromise<string | IRawText>;
=======
return this.backupFileService.loadBackupResource(this.resource).then(backupResource => {
let resolveBackupPromise: TPromise<IRawText>;
>>>>>>>
return this.backupFileService.loadBackupResource(this.resource).then(backupResource => {
let resolveBackupPromise: TPromise<string | IRawText>;
<<<<<<<
if (backupExists) {
const restoreResource = this.backupFileService.getBackupResource(this.resource);
resolveBackupPromise = this.textFileService.resolveTextContent(restoreResource, BACKUP_FILE_RESOLVE_OPTIONS).then(backup => {
// The first line of a backup text file is the file name
return backup.value.lines.slice(1).join('\n');
}, error => content.value);
=======
if (backupResource) {
resolveBackupPromise = this.textFileService.resolveTextContent(backupResource, BACKUP_FILE_RESOLVE_OPTIONS).then(backup => backup.value, error => content.value);
>>>>>>>
if (backupResource) {
resolveBackupPromise = this.textFileService.resolveTextContent(backupResource, BACKUP_FILE_RESOLVE_OPTIONS).then(backup => {
// The first line of a backup text file is the file name
return backup.value.lines.slice(1).join('\n');
}, error => content.value); |
<<<<<<<
let createTestKeybindingService: (items: ResolvedKeybindingItem[], contextValue?: any) => TestKeybindingService = null;
let currentContextValue: any = null;
=======
let createTestKeybindingService: (items: NormalizedKeybindingItem[], contextValue?: any) => TestKeybindingService = null;
let currentContextValue: IContext = null;
>>>>>>>
let createTestKeybindingService: (items: ResolvedKeybindingItem[], contextValue?: any) => TestKeybindingService = null;
let currentContextValue: IContext = null;
<<<<<<<
currentContextValue = {};
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
=======
currentContextValue = createContext({});
shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_X));
>>>>>>>
currentContextValue = createContext({});
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
<<<<<<<
currentContextValue = {};
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
=======
currentContextValue = createContext({});
let shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_K));
>>>>>>>
currentContextValue = createContext({});
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
<<<<<<<
};
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
=======
});
shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_K));
>>>>>>>
});
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
<<<<<<<
};
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
=======
});
shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_X));
>>>>>>>
});
shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_X);
<<<<<<<
currentContextValue = {};
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K);
=======
currentContextValue = createContext({});
let shouldPreventDefault = kbService.dispatch(new SimpleKeybinding(KeyMod.CtrlCmd | KeyCode.KEY_K));
>>>>>>>
currentContextValue = createContext({});
let shouldPreventDefault = kbService.testDispatch(KeyMod.CtrlCmd | KeyCode.KEY_K); |
<<<<<<<
private onConfigurationUpdated(config: IConfiguration): void {
let newMenuBarVisibility = config && config.window && config.window.menuBarVisibility;
if (newMenuBarVisibility !== this.currentMenuBarVisibility) {
this.currentMenuBarVisibility = newMenuBarVisibility;
this.setMenuBarVisibility(newMenuBarVisibility);
}
};
=======
private setCommonHTTPHeaders(): void {
getCommonHTTPHeaders().done(headers => {
if (!this._win) {
return;
}
const urls = ['https://marketplace.visualstudio.com/*', 'https://*.vsassets.io/*'];
this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details, cb) => {
cb({ cancel: false, requestHeaders: objects.assign(details.requestHeaders, headers) });
});
});
}
>>>>>>>
private onConfigurationUpdated(config: IConfiguration): void {
let newMenuBarVisibility = config && config.window && config.window.menuBarVisibility;
if (newMenuBarVisibility !== this.currentMenuBarVisibility) {
this.currentMenuBarVisibility = newMenuBarVisibility;
this.setMenuBarVisibility(newMenuBarVisibility);
}
};
private setCommonHTTPHeaders(): void {
getCommonHTTPHeaders().done(headers => {
if (!this._win) {
return;
}
const urls = ['https://marketplace.visualstudio.com/*', 'https://*.vsassets.io/*'];
this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details, cb) => {
cb({ cancel: false, requestHeaders: objects.assign(details.requestHeaders, headers) });
});
});
} |
<<<<<<<
'var ignoredCtrlCmdKeys = [67 /* c */];',
'var ignoredShiftKeys = [9 /* tab */];',
=======
'var ignoredCtrlCmdKeys = [65 /* a */, 67 /* c */];',
>>>>>>>
'var ignoredCtrlCmdKeys = [65 /* a */, 67 /* c */];',
'var ignoredShiftKeys = [9 /* tab */];', |
<<<<<<<
super(lifecycleService, contextService, configurationService, telemetryService, editorGroupService, editorService, fileService, untitledEditorService, instantiationService, backupService);
=======
super(lifecycleService, contextService, configurationService, telemetryService, editorGroupService, fileService, untitledEditorService, instantiationService);
>>>>>>>
super(lifecycleService, contextService, configurationService, telemetryService, editorGroupService, fileService, untitledEditorService, instantiationService, backupService); |
<<<<<<<
import {EventType} from 'vs/editor/common/editorCommon';
=======
import {EventType, IModeSupportChangedEvent, IConfigurationChangedEvent} from 'vs/editor/common/editorCommon';
import {SuggestRegistry} from 'vs/editor/common/modes';
>>>>>>>
import {EventType, IConfigurationChangedEvent} from 'vs/editor/common/editorCommon';
import {SuggestRegistry} from 'vs/editor/common/modes'; |
<<<<<<<
// SCM Service
serviceCollection.set(ISCMService, this.instantiationService.createInstance(SCMService));
// Backup Model Service
serviceCollection.set(IBackupModelService, this.instantiationService.createInstance(BackupModelService));
=======
>>>>>>>
// SCM Service
serviceCollection.set(ISCMService, this.instantiationService.createInstance(SCMService)); |
<<<<<<<
public userRoles(user: User): string[] | null {
return [user.role] || null;
=======
public userRoles(user: NetlifyIdentityWidget.User): string[] | null {
return user.app_metadata.roles;
>>>>>>>
public userRoles(user: User): string[] | null {
return user.app_metadata.roles; |
<<<<<<<
picker.onDidAccept(() => {
const ctx = "LookupProvider:onAccept";
// NOTE: unfortunate hack
if (getStage() === "test") {
return;
}
this.onDidAccept(picker, opts).catch((err) => {
Logger.error({
ctx,
err: new DendronError({
friendly:
"something went wrong. please submit a bug report to https://github.com/dendronhq/dendron/issues/new?assignees=&labels=&template=bug_report.md&title= with the output of `Dendron: Open Log`",
payload: err,
}),
});
});
=======
const _this = this;
picker.onDidAccept(async () => {
const ctx = "LookupProvider:onAccept";
this.onDidAccept(picker, opts).catch((err) => {
Logger.error({
ctx,
err: new DendronError({
friendly:
"something went wrong. please submit a bug report to https://github.com/dendronhq/dendron/issues/new?assignees=&labels=&template=bug_report.md&title= with the output of `Dendron: Open Log`",
payload: err,
}),
});
});
>>>>>>>
const _this = this;
picker.onDidAccept(() => {
const ctx = "LookupProvider:onAccept";
// NOTE: unfortunate hack
if (getStage() === "test") {
return;
}
this.onDidAccept(picker, opts).catch((err) => {
Logger.error({
ctx,
err: new DendronError({
friendly:
"something went wrong. please submit a bug report to https://github.com/dendronhq/dendron/issues/new?assignees=&labels=&template=bug_report.md&title= with the output of `Dendron: Open Log`",
payload: err,
}),
});
}); |
<<<<<<<
export const WRAPPED_NFT_FACTORY_ADDRESS_MAINNET = '0x861d83016128d40f234852c1d25d59b1aadaf7ff'
export const WRAPPED_NFT_FACTORY_ADDRESS_RINKEBY = '0x94c71c87244b862cfd64d36af468309e4804ec09'
export const WRAPPED_NFT_LIQUIDATION_PROXY_ADDRESS_MAINNET = '0x393c3c6e6B46ADFF50B363c84a8CA5429B6385A9'
export const WRAPPED_NFT_LIQUIDATION_PROXY_ADDRESS_RINKEBY = '0xaa775Eb452353aB17f7cf182915667c2598D43d3'
export const UNISWAP_FACTORY_ADDRESS_MAINNET = '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95'
export const UNISWAP_FACTORY_ADDRESS_RINKEBY = '0xf5D915570BC477f9B8D6C0E980aA81757A3AaC36'
export const DEFAULT_WRAPPED_NFT_LIQUIDATION_UNISWAP_SLIPPAGE_IN_BASIS_POINTS = 1000
=======
export const CHEEZE_WIZARDS_GUILD_ADDRESS = WyvernProtocol.NULL_ADDRESS // TODO: Update this address once Dapper has deployed their mainnet contracts
export const CHEEZE_WIZARDS_GUILD_RINKEBY_ADDRESS = '0x095731b672b76b00A0b5cb9D8258CD3F6E976cB2'
export const CHEEZE_WIZARDS_BASIC_TOURNAMENT_ADDRESS = WyvernProtocol.NULL_ADDRESS // TODO: Update this address once Dapper has deployed their mainnet contracts
export const CHEEZE_WIZARDS_BASIC_TOURNAMENT_RINKEBY_ADDRESS = '0x8852f5F7d1BB867AAf8fdBB0851Aa431d1df5ca1'
export const DECENTRALAND_ESTATE_ADDRESS = '0x959e104e1a4db6317fa58f8295f586e1a978c297'
export const STATIC_CALL_TX_ORIGIN_ADDRESS = '0xbff6ade67e3717101dd8d0a7f3de1bf6623a2ba8'
export const STATIC_CALL_TX_ORIGIN_RINKEBY_ADDRESS = '0xe291abab95677bc652a44f973a8e06d48464e11c'
export const STATIC_CALL_CHEEZE_WIZARDS_ADDRESS = WyvernProtocol.NULL_ADDRESS // TODO: Deploy this address once Dapper has deployed their mainnet contracts
export const STATIC_CALL_CHEEZE_WIZARDS_RINKEBY_ADDRESS = '0x8a640bdf8886dd6ca1fad9f22382b50deeacde08'
export const STATIC_CALL_DECENTRALAND_ESTATES_ADDRESS = '0x93c3cd7ba04556d2e3d7b8106ce0f83e24a87a7e'
>>>>>>>
export const WRAPPED_NFT_FACTORY_ADDRESS_MAINNET = '0x861d83016128d40f234852c1d25d59b1aadaf7ff'
export const WRAPPED_NFT_FACTORY_ADDRESS_RINKEBY = '0x94c71c87244b862cfd64d36af468309e4804ec09'
export const WRAPPED_NFT_LIQUIDATION_PROXY_ADDRESS_MAINNET = '0x393c3c6e6B46ADFF50B363c84a8CA5429B6385A9'
export const WRAPPED_NFT_LIQUIDATION_PROXY_ADDRESS_RINKEBY = '0xaa775Eb452353aB17f7cf182915667c2598D43d3'
export const UNISWAP_FACTORY_ADDRESS_MAINNET = '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95'
export const UNISWAP_FACTORY_ADDRESS_RINKEBY = '0xf5D915570BC477f9B8D6C0E980aA81757A3AaC36'
export const DEFAULT_WRAPPED_NFT_LIQUIDATION_UNISWAP_SLIPPAGE_IN_BASIS_POINTS = 1000
export const CHEEZE_WIZARDS_GUILD_ADDRESS = WyvernProtocol.NULL_ADDRESS // TODO: Update this address once Dapper has deployed their mainnet contracts
export const CHEEZE_WIZARDS_GUILD_RINKEBY_ADDRESS = '0x095731b672b76b00A0b5cb9D8258CD3F6E976cB2'
export const CHEEZE_WIZARDS_BASIC_TOURNAMENT_ADDRESS = WyvernProtocol.NULL_ADDRESS // TODO: Update this address once Dapper has deployed their mainnet contracts
export const CHEEZE_WIZARDS_BASIC_TOURNAMENT_RINKEBY_ADDRESS = '0x8852f5F7d1BB867AAf8fdBB0851Aa431d1df5ca1'
export const DECENTRALAND_ESTATE_ADDRESS = '0x959e104e1a4db6317fa58f8295f586e1a978c297'
export const STATIC_CALL_TX_ORIGIN_ADDRESS = '0xbff6ade67e3717101dd8d0a7f3de1bf6623a2ba8'
export const STATIC_CALL_TX_ORIGIN_RINKEBY_ADDRESS = '0xe291abab95677bc652a44f973a8e06d48464e11c'
export const STATIC_CALL_CHEEZE_WIZARDS_ADDRESS = WyvernProtocol.NULL_ADDRESS // TODO: Deploy this address once Dapper has deployed their mainnet contracts
export const STATIC_CALL_CHEEZE_WIZARDS_RINKEBY_ADDRESS = '0x8a640bdf8886dd6ca1fad9f22382b50deeacde08'
export const STATIC_CALL_DECENTRALAND_ESTATES_ADDRESS = '0x93c3cd7ba04556d2e3d7b8106ce0f83e24a87a7e' |
<<<<<<<
=======
@Input()
set shareButton(value: string | number) {
this._provider = Helper.getEnumValue(value, ShareProvider);
if (typeof this._provider === 'undefined') {
throw new Error('[shareButton] attribute must be set to one of the values (numeric or string) of ShareProvider enum');
}
}
get provider() {
return this._provider;
}
>>>>>>> |
<<<<<<<
public score: Score | null
=======
public readonly goingBack: boolean
>>>>>>>
public score: Score | null
public readonly goingBack: boolean |
<<<<<<<
type: 'cacheClear'
}
| {
=======
type: 'setViewport'
options: DeviceMetrics
}
| {
>>>>>>>
type: 'cacheClear'
}
| {
type: 'setViewport'
options: DeviceMetrics
}
| { |
<<<<<<<
import { Client, Cookie, PdfOptions, BoxModel, Viewport } from './types'
=======
import { Client, Cookie, DeviceMetrics, PdfOptions } from './types'
import * as CDP from 'chrome-remote-interface'
>>>>>>>
import { Client, Cookie, DeviceMetrics, PdfOptions, BoxModel, Viewport } from './types'
import * as CDP from 'chrome-remote-interface' |
<<<<<<<
writeToFile,
isS3Configured,
uploadToS3,
=======
setFileInput,
>>>>>>>
setFileInput,
writeToFile,
isS3Configured,
uploadToS3, |
<<<<<<<
viewport(options: DeviceMetrics): Chromeless<T> {
this.queue.enqueue({type: 'viewport', options})
return this
=======
setHtml(html: string): Chromeless<T> {
this.queue.enqueue({type: 'setHtml', html})
return this
}
viewport(width: number, height: number): Chromeless<T> {
throw new Error('Not implemented yet')
>>>>>>>
viewport(options: DeviceMetrics): Chromeless<T> {
this.queue.enqueue({type: 'viewport', options})
return this
}
setHtml(html: string): Chromeless<T> {
this.queue.enqueue({type: 'setHtml', html})
return this |
<<<<<<<
type: 'cacheClear'
}
| {
=======
type: 'setUserAgent'
useragent: string
}
| {
>>>>>>>
type: 'cacheClear'
}
| {
type: 'setUserAgent'
useragent: string
}
| { |
<<<<<<<
import { injectable, inject } from 'inversify';
=======
import { injectable, inject, multiInject, unmanaged } from 'inversify';
import { KeyCode, Accelerator } from './keys';
>>>>>>>
import { injectable, inject, unmanaged } from 'inversify';
import { KeyCode, Accelerator } from './keys';
<<<<<<<
export const KeybindingContributionProvider = Symbol("KeybindingContributionProvider");
=======
@injectable()
export abstract class KeybindingContext implements Context<Keybinding> {
static NOOP_CONTEXT: Context<Keybinding> = {
id: 'noop.keybinding.context',
isEnabled(arg?: Keybinding): boolean {
return true;
}
}
static DEFAULT_CONTEXT: Context<Keybinding> = {
id: 'default.keybinding.context',
isEnabled(arg?: Keybinding): boolean {
return false;
}
}
constructor( @unmanaged() public readonly id: string) {
}
abstract isEnabled(arg?: Keybinding): boolean;
}
@injectable()
export class KeybindingContextRegistry {
contexts: { [id: string]: KeybindingContext };
contextHierarchy: { [id: string]: KeybindingContext };
constructor( @multiInject(KeybindingContext) contexts: KeybindingContext[]) {
this.contexts = {};
this.contexts[KeybindingContext.NOOP_CONTEXT.id] = KeybindingContext.NOOP_CONTEXT;
this.contexts[KeybindingContext.DEFAULT_CONTEXT.id] = KeybindingContext.DEFAULT_CONTEXT;
contexts.forEach(context => this.registerContext(context));
}
/**
* Registers the keybinding context arguments into the application. Fails when an already registered
* context is being registered.
*
* @param context the keybinding contexts to register into the application.
*/
registerContext(...context: KeybindingContext[]) {
if (context.length > 0) {
context.forEach(context => {
const { id } = context;
if (this.contexts[id]) {
throw new Error(`A keybinding context with ID ${id} is already registered.`);
}
this.contexts[id] = context;
})
}
}
getContext(contextId: string): KeybindingContext | undefined {
return this.contexts[contextId];
}
}
>>>>>>>
@injectable()
export abstract class KeybindingContext implements Context<Keybinding> {
static NOOP_CONTEXT: Context<Keybinding> = {
id: 'noop.keybinding.context',
isEnabled(arg?: Keybinding): boolean {
return true;
}
}
static DEFAULT_CONTEXT: Context<Keybinding> = {
id: 'default.keybinding.context',
isEnabled(arg?: Keybinding): boolean {
return false;
}
}
constructor( @unmanaged() public readonly id: string) {
}
abstract isEnabled(arg?: Keybinding): boolean;
}
export const KeybindingContextProvider = Symbol("KeybindingContextProvider");
@injectable()
export class KeybindingContextRegistry {
contexts: { [id: string]: KeybindingContext };
contextHierarchy: { [id: string]: KeybindingContext };
constructor( @inject(KeybindingContextProvider) private contributedContexts: () => KeybindingContext[]) {
this.contexts = {};
this.contexts[KeybindingContext.NOOP_CONTEXT.id] = KeybindingContext.NOOP_CONTEXT;
this.contexts[KeybindingContext.DEFAULT_CONTEXT.id] = KeybindingContext.DEFAULT_CONTEXT;
}
initialize() {
this.contributedContexts().forEach(context => this.registerContext(context));
}
/**
* Registers the keybinding context arguments into the application. Fails when an already registered
* context is being registered.
*
* @param context the keybinding contexts to register into the application.
*/
registerContext(...context: KeybindingContext[]) {
if (context.length > 0) {
context.forEach(context => {
const { id } = context;
if (this.contexts[id]) {
throw new Error(`A keybinding context with ID ${id} is already registered.`);
}
this.contexts[id] = context;
})
}
}
getContext(contextId: string): KeybindingContext | undefined {
return this.contexts[contextId];
}
}
export const KeybindingContributionProvider = Symbol("KeybindingContributionProvider");
<<<<<<<
constructor( @inject(KeybindingContributionProvider) protected contributions: () => KeybindingContribution[],
@inject(CommandRegistry) protected commandRegistry: CommandRegistry) {
}
initialize() {
for (let contribution of this.contributions()) {
=======
constructor(
@inject(CommandRegistry) protected commandRegistry: CommandRegistry,
@inject(KeybindingContextRegistry) protected contextRegistry: KeybindingContextRegistry,
@multiInject(KeybindingContribution) protected contributions: KeybindingContribution[]) {
this.keybindings = {};
this.commands = {};
for (let contribution of contributions) {
>>>>>>>
constructor(
@inject(CommandRegistry) protected commandRegistry: CommandRegistry,
@inject(KeybindingContextRegistry) protected contextRegistry: KeybindingContextRegistry,
@inject(KeybindingContributionProvider) protected contributions: () => KeybindingContribution[], ) {
this.keybindings = {};
this.commands = {};
new KeyEventEmitter(commandRegistry, this);
}
initialize() {
for (let contribution of this.contributions()) { |
<<<<<<<
return {status: 400, customHeaders: new Map(), content: ''};
=======
await page.close();
return {status: 400, content: ''};
>>>>>>>
await page.close();
return {status: 400, customHeaders: new Map(), content: ''};
<<<<<<<
return {status: 403, customHeaders: new Map(), content: ''};
=======
await page.close();
return {status: 403, content: ''};
>>>>>>>
await page.close();
return {status: 403, customHeaders: new Map(), content: ''}; |
<<<<<<<
import study from './ui/study'
=======
import about from './ui/about'
>>>>>>>
import study from './ui/study'
import about from './ui/about' |
<<<<<<<
export * from "./IProductVariantsAttributes";
export * from "./IImage";
=======
export * from "./IProductVariantsAttributes";
export * from "./ITaxedMoney";
>>>>>>>
export * from "./IProductVariantsAttributes";
export * from "./IImage";
export * from "./ITaxedMoney"; |
<<<<<<<
export * from "./Attribute";
export * from "./Label";
export * from "./InputLabel";
export * from "./DropdownSelect";
=======
export * from "./Attribute";
export * from "./PlaceholderImage";
>>>>>>>
export * from "./Attribute";
export * from "./Label";
export * from "./InputLabel";
export * from "./DropdownSelect";
export * from "./PlaceholderImage"; |
<<<<<<<
QUnit.test('valueOr', assert => {
assert.strictEqual(Maybe.just(10).valueOr(20), 10);
assert.strictEqual(Maybe.nothing<number>().valueOr(20), 20);
});
=======
QUnit.test('sequence', assert => {
assert.ok(Maybe.sequence({
ten: Maybe.just(10),
twenty: Maybe.just(20)
}).caseOf({
just: s => s['ten'] === 10 && s['twenty'] === 20,
nothing: () => false
}));
assert.ok(Maybe.sequence<string|number>({
num: Maybe.just(10),
str: Maybe.just('union types')
}).caseOf({
just: x => x['num'] === 10 && x['str'] === 'union types',
nothing: () => false
}));
assert.ok(Maybe.sequence<any>({
num: Maybe.just(10),
str: Maybe.just('dynamic types')
}).caseOf({
just: (x: any) => x.num === 10 && x.str === 'dynamic types',
nothing: () => false
}));
assert.ok(Maybe.all<any>({
num: Maybe.just(10),
str: Maybe.just('alias')
}).caseOf({
just: (x: any) => x.num === 10 && x.str === 'alias',
nothing: () => false
}));
assert.ok(Maybe.sequence({
ten: Maybe.just(10),
twenty: Maybe.nothing()
}).caseOf({
just: () => false,
nothing: () => true
}));
});
>>>>>>>
QUnit.test('valueOr', assert => {
assert.strictEqual(Maybe.just(10).valueOr(20), 10);
assert.strictEqual(Maybe.nothing<number>().valueOr(20), 20);
});
QUnit.test('sequence', assert => {
assert.ok(Maybe.sequence({
ten: Maybe.just(10),
twenty: Maybe.just(20)
}).caseOf({
just: s => s['ten'] === 10 && s['twenty'] === 20,
nothing: () => false
}));
assert.ok(Maybe.sequence<string|number>({
num: Maybe.just(10),
str: Maybe.just('union types')
}).caseOf({
just: x => x['num'] === 10 && x['str'] === 'union types',
nothing: () => false
}));
assert.ok(Maybe.sequence<any>({
num: Maybe.just(10),
str: Maybe.just('dynamic types')
}).caseOf({
just: (x: any) => x.num === 10 && x.str === 'dynamic types',
nothing: () => false
}));
assert.ok(Maybe.all<any>({
num: Maybe.just(10),
str: Maybe.just('alias')
}).caseOf({
just: (x: any) => x.num === 10 && x.str === 'alias',
nothing: () => false
}));
assert.ok(Maybe.sequence({
ten: Maybe.just(10),
twenty: Maybe.nothing()
}).caseOf({
just: () => false,
nothing: () => true
}));
}); |
<<<<<<<
container: HTMLElement;
=======
content?: React.ReactNode | ((key: OptionsObject['key']) => React.ReactNode);
>>>>>>>
container: HTMLElement;
content?: React.ReactNode | ((key: OptionsObject['key']) => React.ReactNode); |
<<<<<<<
m('li.list_item.nav', {
key: 'theme',
oncreate: helper.ontapY(utils.f(router.set, '/settings/theme'))
}, `${i18n('theming')}`),
m('li.list_item.nav', {
=======
h('li.list_item.nav', {
>>>>>>>
h('li.list_item.nav', {
key: 'theme',
oncreate: helper.ontapY(utils.f(router.set, '/settings/theme'))
}, `${i18n('theming')}`),
h('li.list_item.nav', {
<<<<<<<
}, i18n('board')),
m('li.list_item.nav', {
=======
}, `${i18n('theming')} (${i18n('board')})`),
h('li.list_item.nav', {
>>>>>>>
}, i18n('board')),
h('li.list_item.nav', {
<<<<<<<
}, i18n('pieces')),
m('li.list_item.nav', {
=======
}, `${i18n('theming')} (${i18n('pieces')})`),
h('li.list_item.nav', {
>>>>>>>
}, i18n('pieces')),
h('li.list_item.nav', {
<<<<<<<
m('li.list_item', {
=======
h('li.list_item.settingsChoicesInline', {
key: 'backgroundTheme'
}, [
h('label', 'Background'),
h('fieldset', [
h('div.nice-radio', formWidgets.renderRadio(
'Dark',
'bgTheme',
'dark',
settings.general.theme.background() === 'dark',
e => utils.autoredraw(() => {
settings.general.theme.background((e.target as HTMLInputElement).value);
layout.onBackgroundChange((e.target as HTMLInputElement).value);
})
)),
h('div.nice-radio', formWidgets.renderRadio(
'Light',
'bgTheme',
'light',
settings.general.theme.background() === 'light',
e => utils.autoredraw(() => {
settings.general.theme.background((e.target as HTMLInputElement).value);
layout.onBackgroundChange((e.target as HTMLInputElement).value);
})
))])
]),
h('li.list_item', {
>>>>>>>
h('li.list_item', { |
<<<<<<<
workflow_step?: {
workflow_step_edit_id: string;
workflow_id: string;
step_id: string;
};
}
/**
* A Slack view_submission Workflow Step event
*
* This describes the additional JSON-encoded body details for a step's view_submission event
*/
export interface ViewWorkflowStepSubmitAction extends ViewSubmitAction {
trigger_id: string;
response_urls: [];
workflow_step: {
workflow_step_edit_id: string;
workflow_id: string;
step_id: string;
};
}
/**
* A Slack view_closed Workflow Step event
*
* This describes the additional JSON-encoded body details for a step's view_closed event
*/
export interface ViewWorkflowStepClosedAction extends ViewClosedAction {
workflow_step: {
workflow_step_edit_id: string;
workflow_id: string;
step_id: string;
};
=======
workflow_step?: {
workflow_step_edit_id: string;
workflow_id: string;
step_id: string;
};
>>>>>>>
}
/**
* A Slack view_submission Workflow Step event
*
* This describes the additional JSON-encoded body details for a step's view_submission event
*/
export interface ViewWorkflowStepSubmitAction extends ViewSubmitAction {
trigger_id: string;
response_urls: [];
workflow_step: {
workflow_step_edit_id: string;
workflow_id: string;
step_id: string;
};
}
/**
* A Slack view_closed Workflow Step event
*
* This describes the additional JSON-encoded body details for a step's view_closed event
*/
export interface ViewWorkflowStepClosedAction extends ViewClosedAction {
workflow_step: {
workflow_step_edit_id: string;
workflow_id: string;
step_id: string;
}; |
<<<<<<<
import { Override, wrapToResolveOnFirstCall } from '../test-helpers';
=======
import { Override, delay, wrapToResolveOnFirstCall, createFakeLogger } from '../test-helpers';
>>>>>>>
import { Override, wrapToResolveOnFirstCall, createFakeLogger } from '../test-helpers';
<<<<<<<
import { SlashCommand } from '../types/command';
import { SlackEvent, AppMentionEvent, BotMessageEvent } from '../types/events';
=======
import { SlashCommand } from '../types/command/index';
import { SlackEvent, AppMentionEvent, BotMessageEvent } from '../types/events/base-events';
import { WebClient } from '@slack/web-api';
import { Logger } from '@slack/logger';
>>>>>>>
import { SlashCommand } from '../types/command';
import { SlackEvent, AppMentionEvent, BotMessageEvent } from '../types/events';
import { WebClient } from '@slack/web-api';
import { Logger } from '@slack/logger';
<<<<<<<
await onlyCommands({
=======
onlyCommands({
logger,
client,
>>>>>>>
await onlyCommands({
logger,
client,
<<<<<<<
await onlyCommands({
=======
onlyCommands({
logger,
client,
>>>>>>>
await onlyCommands({
logger,
client,
<<<<<<<
await onlyEvents({ next: fakeNext, context: {}, ...args });
=======
onlyEvents({
logger,
client,
next: fakeNext,
context: {},
...args,
});
>>>>>>>
await onlyEvents({
logger,
client,
next: fakeNext,
context: {},
...args,
});
<<<<<<<
await onlyEvents({
=======
onlyEvents({
logger,
client,
>>>>>>>
await onlyEvents({
logger,
client, |
<<<<<<<
import { ErrorResponse } from '../../http'
=======
import { build as makeTree, ops as treeOps, path as treePath, TreeWrapper, Tree } from '../shared/tree'
>>>>>>>
import { ErrorResponse } from '../../http'
import { build as makeTree, ops as treeOps, path as treePath, TreeWrapper, Tree } from '../shared/tree'
<<<<<<<
private onXhrError = (res: ErrorResponse) => {
this.vm.loading = false
redraw()
handleXhrError(res)
=======
private sendMoveRequest = (move: chess.MoveRequest, userMove = false) => {
chess.move(move)
.then(({ situation, path}) => {
const node = {
id: situation.nodeId,
ply: situation.ply,
fen: situation.fen,
uci: situation.uciMoves[0],
children: [],
dests: situation.dests,
check: situation.check,
end: situation.end,
player: situation.player,
san: situation.pgnMoves[0],
pgnMoves: situation.pgnMoves
}
if (path === undefined) {
console.error('Cannot addNode, missing path', node)
return
}
const newPath = this.tree.addNode(node, path)
if (!newPath) {
console.error('Cannot addNode', node, path)
return
}
if (userMove) this.vm.moveValidationPending = true
this.jump(newPath, !userMove)
redraw()
const playedByColor = this.node.ply % 2 === 1 ? 'white' : 'black'
if (playedByColor === this.data.puzzle.color) {
const progress = moveTest(
this.vm.mode, this.node, this.path, this.initialPath, this.nodeList,
this.data.puzzle
)
if (progress) this.applyProgress(progress)
}
})
.catch(err => console.error('send move error', move, err))
>>>>>>>
private sendMoveRequest = (move: chess.MoveRequest, userMove = false) => {
chess.move(move)
.then(({ situation, path}) => {
const node = {
id: situation.nodeId,
ply: situation.ply,
fen: situation.fen,
uci: situation.uciMoves[0],
children: [],
dests: situation.dests,
check: situation.check,
end: situation.end,
player: situation.player,
san: situation.pgnMoves[0],
pgnMoves: situation.pgnMoves
}
if (path === undefined) {
console.error('Cannot addNode, missing path', node)
return
}
const newPath = this.tree.addNode(node, path)
if (!newPath) {
console.error('Cannot addNode', node, path)
return
}
if (userMove) this.vm.moveValidationPending = true
this.jump(newPath, !userMove)
redraw()
const playedByColor = this.node.ply % 2 === 1 ? 'white' : 'black'
if (playedByColor === this.data.puzzle.color) {
const progress = moveTest(
this.vm.mode, this.node, this.path, this.initialPath, this.nodeList,
this.data.puzzle
)
if (progress) this.applyProgress(progress)
}
})
.catch(err => console.error('send move error', move, err)) |
<<<<<<<
import { ChatPostMessageArguments } from '@slack/web-api';
// TODO: remove the following pragma after TSLint to ESLint transformation is complete
/* tslint:disable:completed-docs */
=======
import bodyParser = require("body-parser");
import { ChatPostMessageArguments } from '@slack/client';
>>>>>>>
import { ChatPostMessageArguments } from '@slack/web-api';
<<<<<<<
// TODO: make this a conditional on whether the event has channel context
say: SayFn;
=======
say: HasChannelContext<EventType>;
>>>>>>>
say: WhenEventHasChannelContext<EventFromType<EventType>, SayFn>;
<<<<<<<
ack: ActionAckFn<ActionType>;
// TODO: make this conditional on whether the action has a response_url
respond: RespondFn;
// TODO: make this a conditional on whether the action has channel context (all but dialogs, i think)
say: SayFn;
=======
say: SayFn;
ack: ActionAckFromType<ActionType>;
respond: ResponseFn;
>>>>>>>
// all action types except dialog submission have a channel context
say: ActionType extends Exclude<SlackAction, DialogSubmitAction> ? SayFn : never;
respond: RespondFn;
ack: ActionAckFn<ActionType>;
<<<<<<<
// ack: Ack<Message>;
respond: RespondFn;
say: SayFn;
=======
say: SayFn;
ack: (message: string | { [key: string]: any } | undefined) => void;
respond: ResponseFn;
>>>>>>>
say: SayFn;
respond: RespondFn;
ack: AckFn<string | RespondArguments>;
<<<<<<<
ack: OptionsAckFn<Within>;
=======
ack: (options:
{ options: Option[] } |
{ option_groups: { label: string; options: Option[] }[] }) => void;
>>>>>>>
ack: OptionsAckFn<Within>;
<<<<<<<
=======
// TODO: Before release, we need to modify ChatPostMessageArguments to make channel optional
export interface ResponseArguments extends ChatPostMessageArguments {
response_type?: 'ephemeral' | 'in_channel';
replace_original?: boolean;
delete_original?: boolean;
}
// TODO: should this any be unknown type?
>>>>>>>
<<<<<<<
}
// The say() utility function binds the message to the same channel as the incoming message that triggered the
// listener. Therefore, specifying the `channel` argument is not required.
type SayArguments = {
[Arg in keyof ChatPostMessageArguments]: Arg extends 'channel' ?
(ChatPostMessageArguments[Arg] | undefined) : ChatPostMessageArguments[Arg];
};
export interface SayFn {
(message: string | SayArguments): void;
}
// TODO: figure out if this is a precise enough definition
type RespondArguments = ChatPostMessageArguments & {
/** Response URLs can be used to send ephemeral messages or in-channel messages using this argument */
response_type?: 'in_channel' | 'ephemeral';
};
export interface RespondFn {
(message: string | RespondArguments): void;
}
// TODO: this probably also needs to be a generic with a type parameter describing the shape of the response expected.
export interface AckFn<Response> {
(response?: Response): void;
=======
}
export interface SayFn {
(message: string | { text: string; [key: string]: any }): void;
}
export interface ResponseFn {
(payload: ResponseArguments): void;
>>>>>>>
}
// The say() utility function binds the message to the same channel as the incoming message that triggered the
// listener. Therefore, specifying the `channel` argument is not required.
type SayArguments = {
[Arg in keyof ChatPostMessageArguments]: Arg extends 'channel' ?
(ChatPostMessageArguments[Arg] | undefined) : ChatPostMessageArguments[Arg];
};
export interface SayFn {
(message: string | SayArguments): void;
}
type RespondArguments = SayArguments & {
/** Response URLs can be used to send ephemeral messages or in-channel messages using this argument */
response_type?: 'in_channel' | 'ephemeral';
replace_original?: boolean;
delete_original?: boolean;
};
export interface RespondFn {
(message: string | RespondArguments): void;
}
export interface AckFn<Response> {
(response?: Response): void; |
<<<<<<<
it('should fail without a token for single team authorization, authorize callback, nor oauth installer', async () => {
=======
it('should succeed with an orgAuthorize callback', async () => {
// Arrange
const authorizeCallback = sinon.fake();
const App = await importApp(); // eslint-disable-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match
// Act
const app = new App({ orgAuthorize: authorizeCallback, signingSecret: '' });
// Assert
assert(authorizeCallback.notCalled, 'Should not call the orgAuthorize callback on instantiation');
assert.instanceOf(app, App);
});
it('should succeed with an authorize and orgAuthorize callback', async () => {
// Arrange
const authorizeCallback = sinon.fake();
const orgAuthorizeCallback = sinon.fake();
const App = await importApp(); // eslint-disable-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match
// Act
const app = new App({ orgAuthorize: orgAuthorizeCallback, authorize: authorizeCallback, signingSecret: '' });
// Assert
assert(authorizeCallback.notCalled, 'Should not call the authorize callback on instantiation');
assert(orgAuthorizeCallback.notCalled, 'Should not call the orgAuthorize callback on instantiation');
assert.instanceOf(app, App);
});
it('should fail without a token for single team authorization or authorize callback or oauth installer', async () => {
>>>>>>>
it('should succeed with an orgAuthorize callback', async () => {
// Arrange
const authorizeCallback = sinon.fake();
const App = await importApp(); // eslint-disable-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match
// Act
const app = new App({ orgAuthorize: authorizeCallback, signingSecret: '' });
// Assert
assert(authorizeCallback.notCalled, 'Should not call the orgAuthorize callback on instantiation');
assert.instanceOf(app, App);
});
it('should succeed with an authorize and orgAuthorize callback', async () => {
// Arrange
const authorizeCallback = sinon.fake();
const orgAuthorizeCallback = sinon.fake();
const App = await importApp(); // eslint-disable-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match
// Act
const app = new App({ orgAuthorize: orgAuthorizeCallback, authorize: authorizeCallback, signingSecret: '' });
// Assert
assert(authorizeCallback.notCalled, 'Should not call the authorize callback on instantiation');
assert(orgAuthorizeCallback.notCalled, 'Should not call the orgAuthorize callback on instantiation');
assert.instanceOf(app, App);
});
it('should fail without a token for single team authorization, authorize callback, nor oauth installer', async () => { |
<<<<<<<
import I18n from 'tinymce/core/api/util/I18n';
=======
import { Editor } from 'tinymce/core/api/Editor';
import I18n from '../../../../../../core/main/ts/api/util/I18n';
import { UiFactoryBackstageProviders } from '../../backstage/Backstage';
>>>>>>>
import I18n from 'tinymce/core/api/util/I18n';
import { Editor } from 'tinymce/core/api/Editor';
import { UiFactoryBackstageProviders } from '../../backstage/Backstage'; |
<<<<<<<
import { Pipeline, Log } from '@ephox/agar';
import { UnitTest } from '@ephox/bedrock-client';
=======
import { Log, Pipeline } from '@ephox/agar';
import { UnitTest } from '@ephox/bedrock';
>>>>>>>
import { Log, Pipeline } from '@ephox/agar';
import { UnitTest } from '@ephox/bedrock-client';
<<<<<<<
import Editor from 'tinymce/core/api/Editor';
=======
>>>>>>>
import Editor from 'tinymce/core/api/Editor';
<<<<<<<
UnitTest.asynctest('tinymce.plugins.paste.browser.ImagePasteTest', (success, failure) => {
const suite = LegacyUnit.createSuite<Editor>();
=======
// Test cases for TINY-4523 - image url/anchor link paste smartpaste/pasteAsText interactions
// Pasting an image anchor link (<a href=”….jpg”>):
// | | smart_paste: true | smart_paste: false |
// |Paste as text turned off | paste image link -> anchor link | paste image link -> anchor link |
// |Paste as text turned on | paste image link -> text | paste image link -> text |
//
// Pasting an image URL (“https…….jpg”):
// | | smart_paste: true | smart_paste: false |
// |Paste as text turned off | paste image URL -> image | paste image URL -> text |
// |Paste as text turned on | paste image URL -> text | paste image URL -> text |
UnitTest.asynctest('tinymce.plugins.paste.browser.SmartPasteTest', (success, failure) => {
const suite = LegacyUnit.createSuite();
>>>>>>>
// Test cases for TINY-4523 - image url/anchor link paste smartpaste/pasteAsText interactions
// Pasting an image anchor link (<a href=”….jpg”>):
// | | smart_paste: true | smart_paste: false |
// |Paste as text turned off | paste image link -> anchor link | paste image link -> anchor link |
// |Paste as text turned on | paste image link -> text | paste image link -> text |
//
// Pasting an image URL (“https…….jpg”):
// | | smart_paste: true | smart_paste: false |
// |Paste as text turned off | paste image URL -> image | paste image URL -> text |
// |Paste as text turned on | paste image URL -> text | paste image URL -> text |
UnitTest.asynctest('tinymce.plugins.paste.browser.SmartPasteTest', (success, failure) => {
const suite = LegacyUnit.createSuite<Editor>(); |
<<<<<<<
import { AddEventsBehaviour, AlloyComponent, AlloyEvents, AlloyTriggers, Behaviour, EventFormat, FormField as AlloyFormField, Keying, NativeEvents, Replacing, Representing, SimulatedEvent, SketchSpec, SystemEvents, Tabstopping, } from '@ephox/alloy';
=======
import { AddEventsBehaviour, AlloyComponent, AlloyEvents, AlloyTriggers, Behaviour, EventFormat, FormField as AlloyFormField, Keying, NativeEvents, Replacing, Representing, SimulatedEvent, SketchSpec, SugarEvent, SystemEvents, Tabstopping, } from '@ephox/alloy';
>>>>>>>
import { AddEventsBehaviour, AlloyComponent, AlloyEvents, AlloyTriggers, Behaviour, EventFormat, FormField as AlloyFormField, Keying, NativeEvents, Replacing, Representing, SimulatedEvent, SketchSpec, SystemEvents, Tabstopping } from '@ephox/alloy';
<<<<<<<
import { Attr, Class, Element, EventArgs, Focus, Html, SelectorFind } from '@ephox/sugar';
import I18n from 'tinymce/core/api/util/I18n';
=======
import { Attr, Class, Element, Focus, Html, SelectorFind } from '@ephox/sugar';
import I18n from 'tinymce/core/api/util/I18n';
>>>>>>>
import { Attr, Class, Element, EventArgs, Focus, Html, SelectorFind } from '@ephox/sugar';
import I18n from 'tinymce/core/api/util/I18n';
<<<<<<<
AlloyEvents.run<EventArgs>(NativeEvents.mouseover(), runOnItem((comp, tgt) => {
=======
AlloyEvents.run<SugarEvent>(NativeEvents.mouseover(), runOnItem((comp, se, tgt) => {
>>>>>>>
AlloyEvents.run<EventArgs>(NativeEvents.mouseover(), runOnItem((comp, se, tgt) => {
<<<<<<<
AlloyEvents.run<EventArgs>(SystemEvents.tapOrClick(), runOnItem((comp, tgt, itemValue) => {
=======
AlloyEvents.run<SugarEvent>(SystemEvents.tapOrClick(), runOnItem((comp, se, tgt, itemValue) => {
se.stop();
>>>>>>>
AlloyEvents.run<EventArgs>(SystemEvents.tapOrClick(), runOnItem((comp, se, tgt, itemValue) => {
se.stop(); |
<<<<<<<
const init = (dragApi: BlockerDragApi<TouchEvent>): AlloyEvents.AlloyEventRecord => {
return AlloyEvents.derive([
// When the user taps on the blocker, something has probably gone slightly
// wrong, so we'll just drop for safety. The blocker should really only
// be there when their finger is already down and not released, so a 'tap'
AlloyEvents.run(NativeEvents.touchstart(), dragApi.forceDrop),
=======
const init = (dragApi: BlockerDragApi): AlloyEvents.AlloyEventRecord => AlloyEvents.derive([
// When the user taps on the blocker, something has probably gone slightly
// wrong, so we'll just drop for safety. The blocker should really only
// be there when their finger is already down and not released, so a 'tap'
AlloyEvents.run(NativeEvents.touchstart(), dragApi.forceDrop),
>>>>>>>
const init = (dragApi: BlockerDragApi<TouchEvent>): AlloyEvents.AlloyEventRecord => AlloyEvents.derive([
// When the user taps on the blocker, something has probably gone slightly
// wrong, so we'll just drop for safety. The blocker should really only
// be there when their finger is already down and not released, so a 'tap'
AlloyEvents.run(NativeEvents.touchstart(), dragApi.forceDrop), |
<<<<<<<
list: all as Array<AlloyBehaviour<any, any>>,
data: Obj.map(validated, (optBlobThunk: () => Option<BehaviourConfigAndState<any, () => BehaviourStateInitialiser<any>>>) => {
=======
list: all as AlloyBehaviour<any,any>[],
data: Obj.map(validated, (optBlobThunk) => {
>>>>>>>
list: all as Array<AlloyBehaviour<any, any>>,
data: Obj.map(validated, (optBlobThunk) => { |
<<<<<<<
UnitTest.asynctest('browser.tinymce.plugins.textpattern.TextPatternPluginTest', (success, failure) => {
=======
UnitTest.asynctest('browser.tinymce.plugins.textpattern.TextPatternPluginTest', (success, failure) => {
>>>>>>>
UnitTest.asynctest('browser.tinymce.plugins.textpattern.TextPatternPluginTest', (success, failure) => {
<<<<<<<
tinyApis.sAssertContent('<p>** </p>')
]),
Log.stepsAsStep('TBA', 'TextPattern: Italic format on single word using space', [
tinyApis.sSetContent('<p>*a *</p>'),
=======
tinyApis.sAssertContent('<p>**</p>')
])),
Logger.t('Italic format on single word using space 1', GeneralSteps.sequence([
tinyApis.sSetContent('<p>*a * </p>'),
>>>>>>>
tinyApis.sAssertContent('<p>**</p>')
]),
Log.stepsAsStep('TBA', 'TextPattern: Italic format on single word using space 1', [
tinyApis.sSetContent('<p>*a * </p>'),
<<<<<<<
]),
Log.stepsAsStep('TBA', 'TextPattern: Italic format on single word using space', [
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '*a*'),
tinyApis.sAssertContentStructure(Utils.inlineStructHelper('em', 'a'))
]),
Log.stepsAsStep('TBA', 'TextPattern: Bold format on single word using space', [
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '**a**'),
=======
])),
Logger.t('Italic format on single word using space 2', GeneralSteps.sequence([
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '*a*\u00a0'),
tinyApis.sAssertContentStructure(Utils.inlineStructHelper('em', 'a')),
tinyApis.sAssertSelection([0, 1], 1, [0, 1], 1)
])),
Logger.t('Bold format on single word using space', GeneralSteps.sequence([
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '**a**\u00a0'),
>>>>>>>
]),
Log.stepsAsStep('TBA', 'TextPattern: Italic format on single word using space 2', [
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '*a*\u00a0'),
tinyApis.sAssertContentStructure(Utils.inlineStructHelper('em', 'a')),
tinyApis.sAssertSelection([0, 1], 1, [0, 1], 1)
]),
Log.stepsAsStep('TBA', 'TextPattern: Bold format on single word using space', [
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '**a**\u00a0'),
<<<<<<<
]),
Log.stepsAsStep('TBA', 'TextPattern: Bold/italic format on single word using space', [
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '***a***'),
=======
])),
Logger.t('Bold/italic format on single word using space', GeneralSteps.sequence([
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '***a***\u00a0'),
>>>>>>>
]),
Log.stepsAsStep('TBA', 'TextPattern: Bold/italic format on single word using space', [
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '***a***\u00a0'),
<<<<<<<
]),
Log.stepsAsStep('TBA', 'TextPattern: Bold format on multiple words using space', [
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '**a b**'),
=======
])),
Logger.t('Bold format on multiple words using space', GeneralSteps.sequence([
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '**a b**\u00a0'),
>>>>>>>
]),
Log.stepsAsStep('TBA', 'TextPattern: Bold format on multiple words using space', [
Utils.sSetContentAndPressSpace(tinyApis, tinyActions, '**a b**\u00a0'), |
<<<<<<<
import { UnitTest } from '@ephox/bedrock-client';
=======
import { UnitTest } from '@ephox/bedrock';
import { document } from '@ephox/dom-globals';
>>>>>>>
import { UnitTest } from '@ephox/bedrock-client';
import { document } from '@ephox/dom-globals'; |
<<<<<<<
const getOffset = <I extends SelectionAnchor>(component: AlloyComponent, origin: OriginAdt, anchorInfo: I): Option<SugarPosition> => {
const win = Traverse.defaultView(anchorInfo.root).dom();
=======
const getOffset = <I extends SelectionAnchor | NodeAnchor>(component: AlloyComponent, origin: OriginAdt, anchorInfo: I): Option<SugarPosition> => {
const win = Traverse.defaultView(anchorInfo.root()).dom();
>>>>>>>
const getOffset = <I extends SelectionAnchor | NodeAnchor>(component: AlloyComponent, origin: OriginAdt, anchorInfo: I): Option<SugarPosition> => {
const win = Traverse.defaultView(anchorInfo.root).dom(); |
<<<<<<<
UnitTest.test('stylecontainer is shadow root for shadow root', () => {
withShadowElement((sr) => {
Assert.eq('Should be shadow root', sr, ShadowDom.getStyleContainer(sr), tElement);
=======
if (ShadowDom.isSupported()) {
UnitTest.test('stylecontainer is shadow root for shadow root', () => {
withShadowElement((sr) => {
Assert.eq('Should be shadow root', sr, ShadowDom.getStyleContainer(sr), tElement());
});
>>>>>>>
UnitTest.test('stylecontainer is shadow root for shadow root', () => {
withShadowElement((sr) => {
Assert.eq('Should be shadow root', sr, ShadowDom.getStyleContainer(sr), tElement());
<<<<<<<
UnitTest.test('contentcontainer is shadow root for shadow root', () => {
withShadowElement((sr) => {
Assert.eq('Should be shadow root', sr, ShadowDom.getContentContainer(sr), tElement);
=======
if (ShadowDom.isSupported()) {
UnitTest.test('contentcontainer is shadow root for shadow root', () => {
withShadowElement((sr) => {
Assert.eq('Should be shadow root', sr, ShadowDom.getContentContainer(sr), tElement());
});
>>>>>>>
UnitTest.test('contentcontainer is shadow root for shadow root', () => {
withShadowElement((sr) => {
Assert.eq('Should be shadow root', sr, ShadowDom.getContentContainer(sr), tElement());
<<<<<<<
UnitTest.test('getShadowHost', () => {
withShadowElement((sr, inner, sh) => {
Assert.eq('Should be shadow host', sh, ShadowDom.getShadowHost(sr), tElement);
});
});
UnitTest.test('isOpenShadowRoot / isClosedShadowRoot', () => {
withShadowElementInMode('open', (sr) => {
Assert.eq('open shadow root is open', true, ShadowDom.isOpenShadowRoot(sr));
Assert.eq('open shadow root is not closed', false, ShadowDom.isClosedShadowRoot(sr));
});
withShadowElementInMode('closed', (sr) => {
Assert.eq('closed shadow root is not open', false, ShadowDom.isOpenShadowRoot(sr));
Assert.eq('closed shadow root is closed', true, ShadowDom.isClosedShadowRoot(sr));
});
});
const checkOriginalEventTarget = (mode: 'open' | 'closed', success: UnitTest.SuccessCallback, failure: UnitTest.FailureCallback): void => {
const { innerDiv, shadowHost } = setupShadowRoot(mode);
const input = (desc: string, parent: Element<DomElement>) => {
const i = Element.fromTag('input');
Attr.setAll(i, { 'type': 'text', 'data-description': desc });
Insert.append(parent, i);
return i;
};
const i1 = input('i2', Body.body());
const i2 = input('i2', innerDiv);
i1.dom().click();
const unbinder = DomEvent.bind(Body.body(), 'click', (evt) => {
try {
const expected = mode === 'open' ? i2 : shadowHost;
Assert.eq('Check event target', expected, evt.target(), tElement);
unbinder.unbind();
Remove.remove(i1);
Remove.remove(shadowHost);
success();
} catch (e) {
failure(e);
}
});
i2.dom().click();
};
UnitTest.asynctest('getOriginalEventTarget on a closed shadow root', (success, failure) => {
if (!ShadowDom.isSupported()) {
return success();
}
checkOriginalEventTarget('closed', success, failure);
});
UnitTest.asynctest('getOriginalEventTarget on an open shadow root', (success, failure) => {
if (!ShadowDom.isSupported()) {
return success();
}
checkOriginalEventTarget('open', success, failure);
});
UnitTest.test('isOpenShadowHost on open shadow host', () => {
withShadowElementInMode('open', (shadowRoot, innerDiv, shadowHost) => () => {
Assert.eq('The open shadow host is an open shadow host', true, ShadowDom.isOpenShadowHost(shadowHost));
Assert.eq('The innerDiv is not an open shadow host', false, ShadowDom.isOpenShadowHost(innerDiv));
});
});
UnitTest.test('isOpenShadowHost on closed shadow host', () => {
withShadowElementInMode('closed', (shadowRoot, innerDiv, shadowHost) => () => {
Assert.eq('The closed shadow host is an open shadow host', false, ShadowDom.isOpenShadowHost(shadowHost));
Assert.eq('The innerDiv is not an open shadow host', false, ShadowDom.isOpenShadowHost(innerDiv));
=======
if (ShadowDom.isSupported()) {
UnitTest.test('getShadowHost', () => {
withShadowElement((sr, inner, sh) => {
Assert.eq('Should be shadow host', sh, ShadowDom.getShadowHost(sr), tElement());
});
>>>>>>>
UnitTest.test('getShadowHost', () => {
withShadowElement((sr, inner, sh) => {
Assert.eq('Should be shadow host', sh, ShadowDom.getShadowHost(sr), tElement());
});
});
UnitTest.test('isOpenShadowRoot / isClosedShadowRoot', () => {
withShadowElementInMode('open', (sr) => {
Assert.eq('open shadow root is open', true, ShadowDom.isOpenShadowRoot(sr));
Assert.eq('open shadow root is not closed', false, ShadowDom.isClosedShadowRoot(sr));
});
withShadowElementInMode('closed', (sr) => {
Assert.eq('closed shadow root is not open', false, ShadowDom.isOpenShadowRoot(sr));
Assert.eq('closed shadow root is closed', true, ShadowDom.isClosedShadowRoot(sr));
});
});
const checkOriginalEventTarget = (mode: 'open' | 'closed', success: UnitTest.SuccessCallback, failure: UnitTest.FailureCallback): void => {
const { innerDiv, shadowHost } = setupShadowRoot(mode);
const input = (desc: string, parent: Element<DomElement>) => {
const i = Element.fromTag('input');
Attr.setAll(i, { 'type': 'text', 'data-description': desc });
Insert.append(parent, i);
return i;
};
const i1 = input('i2', Body.body());
const i2 = input('i2', innerDiv);
i1.dom().click();
const unbinder = DomEvent.bind(Body.body(), 'click', (evt) => {
try {
const expected = mode === 'open' ? i2 : shadowHost;
Assert.eq('Check event target', expected, evt.target(), tElement);
unbinder.unbind();
Remove.remove(i1);
Remove.remove(shadowHost);
success();
} catch (e) {
failure(e);
}
});
i2.dom().click();
};
UnitTest.asynctest('getOriginalEventTarget on a closed shadow root', (success, failure) => {
if (!ShadowDom.isSupported()) {
return success();
}
checkOriginalEventTarget('closed', success, failure);
});
UnitTest.asynctest('getOriginalEventTarget on an open shadow root', (success, failure) => {
if (!ShadowDom.isSupported()) {
return success();
}
checkOriginalEventTarget('open', success, failure);
});
UnitTest.test('isOpenShadowHost on open shadow host', () => {
withShadowElementInMode('open', (shadowRoot, innerDiv, shadowHost) => () => {
Assert.eq('The open shadow host is an open shadow host', true, ShadowDom.isOpenShadowHost(shadowHost));
Assert.eq('The innerDiv is not an open shadow host', false, ShadowDom.isOpenShadowHost(innerDiv));
});
});
UnitTest.test('isOpenShadowHost on closed shadow host', () => {
withShadowElementInMode('closed', (shadowRoot, innerDiv, shadowHost) => () => {
Assert.eq('The closed shadow host is an open shadow host', false, ShadowDom.isOpenShadowHost(shadowHost));
Assert.eq('The innerDiv is not an open shadow host', false, ShadowDom.isOpenShadowHost(innerDiv)); |
<<<<<<<
const setSize = (name: string, normalizeCss: CssNormalizer) => (image: HTMLElement, name: string, value: string) => {
if (image.style[name]) {
image.style[name] = Utils.addPixelSuffix(value);
normalizeStyle(image, normalizeCss);
} else {
setAttrib(image, name, value);
}
=======
const setSize = (name: string, normalizeCss: CssNormalizer) => {
return (image: HTMLElement, name: string, value: string) => {
if (image.style[name]) {
image.style[name] = Utils.addPixelSuffix(value);
normalizeStyle(image, normalizeCss);
} else {
updateAttrib(image, name, value);
}
};
>>>>>>>
const setSize = (name: string, normalizeCss: CssNormalizer) => (image: HTMLElement, name: string, value: string) => {
if (image.style[name]) {
image.style[name] = Utils.addPixelSuffix(value);
normalizeStyle(image, normalizeCss);
} else {
updateAttrib(image, name, value);
} |
<<<<<<<
maximized?: boolean;
=======
disabled?: boolean;
>>>>>>>
maximized?: boolean;
disabled?: boolean;
<<<<<<<
placeholder?: Option<string>;
maximized: boolean;
=======
placeholder: Option<string>;
disabled: boolean;
>>>>>>>
maximized: boolean;
placeholder: Option<string>;
disabled: boolean;
<<<<<<<
FieldSchema.optionString('placeholder'),
FieldSchema.defaultedBoolean('maximized', false)
=======
FieldSchema.optionString('placeholder'),
FieldSchema.defaultedBoolean('disabled', false)
>>>>>>>
FieldSchema.optionString('placeholder'),
FieldSchema.defaultedBoolean('maximized', false),
FieldSchema.defaultedBoolean('disabled', false) |
<<<<<<<
import CameraControlWrapper from '@/script/modules/three/CameraControlWrapper';
import GizmoWrapper from '@/script/modules/three/GizmoWrapper';
=======
import CameraControls from 'camera-controls';
import { Controls } from '@/script/modules/Controls';
>>>>>>>
import CameraControlWrapper from '@/script/modules/three/CameraControlWrapper';
import GizmoWrapper from '@/script/modules/three/GizmoWrapper';
import { Controls } from '@/script/modules/Controls';
import { MathUtils } from 'three/src/math/MathUtils';
<<<<<<<
public cameraControls = new CameraControlWrapper(this.camera, this.renderer.domElement);
private control: GizmoWrapper = new GizmoWrapper(this.camera, this.renderer.domElement);
public worldSpace = WORLDSPACE.local;
=======
private cameraControls = new CameraControls(this.camera, this.renderer.domElement);
private controls = new Controls();
private transformControl: TransformControls = new TransformControls(this.camera, this.renderer.domElement);
public worldSpace = WORLD_SPACE.local;
>>>>>>>
public cameraControls = new CameraControlWrapper(this.camera, this.renderer.domElement);
private gizmoControls: GizmoWrapper = new GizmoWrapper(this.camera, this.renderer.domElement);
private controls = new Controls();
public worldSpace = WORLD_SPACE.local;
<<<<<<<
=======
public RegisterEvents() {
const scope = this;
this.renderer.domElement.onmousedown = function (event: any) {
switch (event.which) {
case 1: // Left mouse
break;
case 2: // middle mouse
break;
case 3: // right mouse
scope.controls.EnableFreecamMovement();
scope.highlightingEnabled = false;
break;
default:
// alert('You have a strange Mouse!');
break;
}
};
window.addEventListener('resize', this.onWindowResize.bind(this), false);
this.renderer.domElement.addEventListener('mousemove', this.onMouseMove.bind(this));
this.renderer.domElement.addEventListener('mouseup', this.onMouseUp.bind(this));
this.renderer.domElement.addEventListener('mousedown', this.onMouseDown.bind(this));
this.transformControl.addEventListener('change', this.onControlChanged.bind(this));
this.transformControl.addEventListener('mouseUp', this.onControlMouseUp.bind(this));
this.transformControl.addEventListener('mouseDown', this.onControlMouseDown.bind(this));
this.transformControl.addEventListener('dragging-changed', (event) => {
this.cameraControls.enabled = !event.value;
});
signals.objectChanged.connect(this.Render.bind(this)); // Object changed? Render!
}
public CreateGizmo() {
this.transformControl.setSpace(WORLD_SPACE.local as string);
this.scene.add(this.transformControl);
this.HideGizmo();
// this.Render();
}
>>>>>>>
<<<<<<<
public onSelectGameObject(gameObject: GameObject) {
this.control.Select(gameObject);
=======
public AttachGizmoTo(gameObject: GameObject) {
this.transformControl.attach(gameObject);
// this.Render();
>>>>>>>
public onSelectGameObject(gameObject: GameObject) {
this.gizmoControls.Select(gameObject);
<<<<<<<
if (!this.control.visible && editor.selectedGameObjects.length !== 0) {
=======
if (this.transformControl.visible === false) {
>>>>>>>
if (!this.gizmoControls.visible && editor.selectedGameObjects.length !== 0) {
<<<<<<<
=======
public UpdateCameraTransform(transform: IJSONLinearTransform) {
const linearTransform = LinearTransform.setFromTable(transform);
const distance = 10;
const target = new Vec3(
linearTransform.trans.x + (linearTransform.forward.x * -1 * distance),
linearTransform.trans.y + (linearTransform.forward.y * -1 * distance),
linearTransform.trans.z + (linearTransform.forward.z * -1 * distance)
);
this.cameraControls.setLookAt(linearTransform.trans.x, linearTransform.trans.y, linearTransform.trans.z, target.x, target.y, target.z, false);
this.Render();
}
>>>>>>> |
<<<<<<<
import { isSplitToolbar, useFixedContainer, fixedContainerElement } from '../api/Settings';
=======
import { getToolbarDrawer, ToolbarDrawer } from '../api/Settings';
>>>>>>>
import { ModeRenderInfo, RenderArgs, RenderUiComponents, RenderUiConfig } from '../Render';
import OuterContainer from '../ui/general/OuterContainer';
import { identifyMenus } from '../ui/menus/menubar/Integration';
import { identifyButtons } from '../ui/toolbar/Integration';
import { inline as loadInlineSkin } from './../ui/skin/Loader';
<<<<<<<
=======
const splitSetting = getToolbarDrawer(editor);
const split = splitSetting === ToolbarDrawer.sliding || splitSetting === ToolbarDrawer.floating;
const floating = splitSetting === ToolbarDrawer.floating;
>>>>>>>
<<<<<<<
// Positioning and Docking
if (!useFixedToolbarContainer) {
setChromePosition(toolbar);
=======
const isDocked = Css.getRaw(floatContainer.element(), 'position').is('fixed');
if (!isDocked) {
// We need to update the toolbar location if the window has resized while the toolbar is position absolute
// Not sure if we should always set this, or if it's worth checking against the current position
const offset = split ? toolbar.fold(() => 0, (tbar) => {
// If we have an overflow toolbar, we need to offset the positioning by the height of the overflow toolbar
return tbar.components().length > 1 ? Height.get(tbar.components()[1].element()) : 0;
}) : 0;
Css.setAll(floatContainer.element(), calcPosition(offset));
>>>>>>>
// Positioning and Docking
if (!useFixedToolbarContainer) {
setChromePosition(toolbar);
<<<<<<<
updateChromeUi();
=======
setPosition();
Docking.refresh(floatContainer);
if (floating) {
const toolbar = OuterContainer.getToolbar(uiComponents.outerContainer);
toolbar.each((tb) => {
const overflow = SplitToolbar.getOverflow(tb);
overflow.each((overf) => {
Class.remove(overf.element(), 'tox-toolbar__overflow--closed');
});
});
}
>>>>>>>
updateChromeUi();
Docking.refresh(floatContainer);
if (floating) {
const toolbar = OuterContainer.getToolbar(uiComponents.outerContainer);
toolbar.each((tb) => {
const overflow = SplitToolbar.getOverflow(tb);
overflow.each((overf) => {
Class.remove(overf.element(), 'tox-toolbar__overflow--closed');
});
});
} |
<<<<<<<
import * as EditorSettings from 'tinymce/core/EditorSettings';
import Theme from 'tinymce/themes/silver/Theme';
import { UnitTest } from '@ephox/bedrock-client';
=======
>>>>>>> |
<<<<<<<
import DOMUtils from 'tinymce/core/api/dom/DOMUtils';
import * as Size from './Size';
=======
import Writer from 'tinymce/core/api/html/Writer';
>>>>>>>
import Writer from 'tinymce/core/api/html/Writer';
<<<<<<<
start(name, attrs, empty) {
switch (name) {
case 'video':
case 'object':
case 'embed':
case 'img':
case 'iframe':
if (data.height !== undefined && data.width !== undefined) {
setAttributes(attrs, {
width: data.width,
height: data.height
});
}
break;
}
if (updateAll) {
=======
start (name, attrs, empty) {
if (isEphoxEmbed.get()) {
// Don't make any changes to children of an EME embed
} else if (Obj.has(attrs.map, 'data-ephox-embed-iri')) {
isEphoxEmbed.set(true);
updateEphoxEmbed(data, attrs);
} else {
>>>>>>>
start(name, attrs, empty) {
if (isEphoxEmbed.get()) {
// Don't make any changes to children of an EME embed
} else if (Obj.has(attrs.map, 'data-ephox-embed-iri')) {
isEphoxEmbed.set(true);
updateEphoxEmbed(data, attrs);
} else {
<<<<<<<
end(name) {
if (name === 'video' && updateAll) {
for (let index = 0; index < 2; index++) {
if (data[sources[index]]) {
const attrs: any = [];
attrs.map = {};
if (sourceCount < index) {
setAttributes(attrs, {
src: data[sources[index]],
type: data[sources[index] + 'mime']
});
writer.start('source', attrs, true);
=======
end (name) {
if (!isEphoxEmbed.get()) {
if (name === 'video' && updateAll) {
for (let index = 0; index < 2; index++) {
if (data[sources[index]]) {
const attrs: any = [];
attrs.map = {};
if (sourceCount < index) {
setAttributes(attrs, {
src: data[sources[index]],
type: data[sources[index] + 'mime']
});
writer.start('source', attrs, true);
}
>>>>>>>
end(name) {
if (!isEphoxEmbed.get()) {
if (name === 'video' && updateAll) {
for (let index = 0; index < 2; index++) {
if (data[sources[index]]) {
const attrs: any = [];
attrs.map = {};
if (sourceCount < index) {
setAttributes(attrs, {
src: data[sources[index]],
type: data[sources[index] + 'mime']
});
writer.start('source', attrs, true);
}
<<<<<<<
const isEphoxEmbed = function (html: string): boolean {
const fragment = DOM.createFragment(html);
return DOM.getAttrib(fragment.firstChild, 'data-ephox-embed-iri') !== '';
};
const updateEphoxEmbed = function (html: string, data: Partial<MediaData>): string {
const fragment = DOM.createFragment(html);
const div = fragment.firstChild as HTMLElement;
Size.setMaxWidth(div, data.width);
Size.setMaxHeight(div, data.height);
return normalizeHtml(div.outerHTML);
};
const updateHtml = function (html: string, data: Partial<MediaData>, updateAll?: boolean) {
return isEphoxEmbed(html) ? updateEphoxEmbed(html, data) : updateHtmlSax(html, data, updateAll);
};
export {
=======
export default {
>>>>>>>
export { |
<<<<<<<
const calculateDelta = <E extends Event>(mode: DragModeDeltas<E, T>, nu: T): Option<T> => {
const result = previous.map((old) => {
return mode.getDelta(old, nu);
});
=======
const calculateDelta = (mode: DragModeDeltas<T>, nu: T): Option<T> => {
const result = previous.map((old) => mode.getDelta(old, nu));
>>>>>>>
const calculateDelta = <E extends Event>(mode: DragModeDeltas<E, T>, nu: T): Option<T> => {
const result = previous.map((old) => mode.getDelta(old, nu));
<<<<<<<
const update = <E extends Event>(mode: DragModeDeltas<E, T>, dragEvent: EventArgs<E>): Option<T> => {
return mode.getData(dragEvent).bind((nuData) => {
return calculateDelta(mode, nuData);
});
};
=======
const update = (mode: DragModeDeltas<T>, dragEvent: EventArgs): Option<T> => mode.getData(dragEvent).bind((nuData) => calculateDelta(mode, nuData));
>>>>>>>
const update = <E extends Event>(mode: DragModeDeltas<E, T>, dragEvent: EventArgs<E>): Option<T> =>
mode.getData(dragEvent).bind((nuData) => calculateDelta(mode, nuData)); |
<<<<<<<
const repeatUntil = function <T, U>(label: string, repeatStep: Step<T, T>, successStep: Step<T, U>, numAttempts: number) {
return Step.raw((value: T, next: NextFn<U>, die: DieFn, logs: TestLogs) => {
const again = function (num: number) {
if (num <= 0) {
die(label + '\nRan out of attempts', logs);
} else {
repeatStep.runStep(value, function () {
// Any fancy setting of log here? Or ignore previous attempts?
successStep.runStep(value, next, function () {
again(num - 1);
}, logs);
}, die, logs);
}
};
=======
const repeatUntil = <T, U>(label: string, repeatStep: Step<T, T>, successStep: Step<T, U>, numAttempts: number) => Step.raw((value: T, next: NextFn<U>, die: DieFn, logs: TestLogs) => {
const again = (num: number) => {
if (num <= 0) {
die(label + '\nRan out of attempts', logs);
} else {
repeatStep(value, () => {
// Any fancy setting of log here? Or ignore previous attempts?
successStep(value, next, () => {
again(num - 1);
}, logs);
}, die, logs);
}
};
>>>>>>>
const repeatUntil = <T, U>(label: string, repeatStep: Step<T, T>, successStep: Step<T, U>, numAttempts: number) => Step.raw((value: T, next: NextFn<U>, die: DieFn, logs: TestLogs) => {
const again = (num: number) => {
if (num <= 0) {
die(label + '\nRan out of attempts', logs);
} else {
repeatStep.runStep(value, () => {
// Any fancy setting of log here? Or ignore previous attempts?
successStep.runStep(value, next, () => {
again(num - 1);
}, logs);
}, die, logs);
}
}; |
<<<<<<<
text: 'Remove color',
icon: getIcon('remove'),
=======
text: 'Remove',
icon: 'color-swatch-remove-color',
>>>>>>>
text: 'Remove color',
icon: 'color-swatch-remove-color',
<<<<<<<
text: 'Custom color',
icon: getIcon('custom'),
=======
text: 'Custom',
icon: 'color-picker',
>>>>>>>
text: 'Custom color',
icon: 'color-picker', |
<<<<<<<
=======
import { HTMLTableCellElement, Range } from '@ephox/dom-globals';
>>>>>>> |
<<<<<<<
const lazyThrobber = () => lazyOuterContainer.bind((container) => {
return OuterContainer.getThrobber(container);
}).getOrDie('Could not find throbber element');
=======
const lazyToolbar = () => lazyOuterContainer.bind((container) => {
return OuterContainer.getToolbar(container);
}).getOrDie('Could not find more toolbar element');
>>>>>>>
const lazyToolbar = () => lazyOuterContainer.bind((container) => {
return OuterContainer.getToolbar(container);
}).getOrDie('Could not find more toolbar element');
const lazyThrobber = () => lazyOuterContainer.bind((container) => {
return OuterContainer.getThrobber(container);
}).getOrDie('Could not find throbber element'); |
<<<<<<<
=======
import RangeUtils from 'tinymce/core/api/dom/RangeUtils';
import Tools from 'tinymce/core/api/util/Tools';
import * as Settings from '../api/Settings';
import * as Utils from './Utils';
>>>>>>>
import Tools from 'tinymce/core/api/util/Tools';
import * as Settings from '../api/Settings';
import * as Utils from './Utils'; |
<<<<<<<
import { Fun, Option } from '@ephox/katamari';
import { EventArgs } from '@ephox/sugar';
=======
import { Option } from '@ephox/katamari';
>>>>>>>
import { Option } from '@ephox/katamari';
import { EventArgs } from '@ephox/sugar';
<<<<<<<
const handlers = (dragConfig: MouseDraggingConfig, dragState: DraggingState): AlloyEvents.AlloyEventRecord => {
const updateStartState = (comp: AlloyComponent) => {
dragState.setStartData(DragUtils.calcStartData(dragConfig, comp));
};
return AlloyEvents.derive([
AlloyEvents.run(SystemEvents.windowScroll(), (comp) => {
// Only update if we have some start data
dragState.getStartData().each(() => updateStartState(comp));
}),
AlloyEvents.run<EventArgs<MouseEvent>>(NativeEvents.mousedown(), (component, simulatedEvent) => {
const raw = simulatedEvent.event().raw();
=======
const events = (dragConfig: MouseDraggingConfig, dragState: DraggingState<SugarPosition>, updateStartState: (comp: AlloyComponent) => void) => {
return [
AlloyEvents.run<SugarEvent>(NativeEvents.mousedown(), (component, simulatedEvent) => {
const raw = simulatedEvent.event().raw() as MouseEvent;
>>>>>>>
const events = (dragConfig: MouseDraggingConfig, dragState: DraggingState, updateStartState: (comp: AlloyComponent) => void) => {
return [
AlloyEvents.run<EventArgs<MouseEvent>>(NativeEvents.mousedown(), (component, simulatedEvent) => {
const raw = simulatedEvent.event().raw(); |
<<<<<<<
import { AlloyComponent } from '../../api/component/ComponentApi';
import { SimulatedEvent } from '../../events/SimulatedEvent';
import { SpecSchemaStruct } from '../../spec/SpecSchema';
import { Arr } from '@ephox/katamari';
=======
>>>>>>>
import { Arr } from '@ephox/katamari';
<<<<<<<
const partRedirects = (events, detail, part) => {
return Arr.map(events, (evt) => {
return redirectToPart(evt, detail, part);
})
}
const runOnAttached = runOnSourceName(SystemEvents.attachedToDom()) as RunOnSourceName;
const runOnDetached = runOnSourceName(SystemEvents.detachedFromDom()) as RunOnSourceName;
const runOnInit = runOnSourceName(SystemEvents.systemInit()) as RunOnSourceName;
const runOnExecute = runOnName(SystemEvents.execute()) as RunOnSourceName;
=======
const runOnAttached = runOnSourceName(SystemEvents.attachedToDom());
const runOnDetached = runOnSourceName(SystemEvents.detachedFromDom());
const runOnInit = runOnSourceName(SystemEvents.systemInit());
const runOnExecute = runOnName(SystemEvents.execute());
>>>>>>>
const runOnAttached = runOnSourceName(SystemEvents.attachedToDom());
const runOnDetached = runOnSourceName(SystemEvents.detachedFromDom());
const runOnInit = runOnSourceName(SystemEvents.systemInit());
const runOnExecute = runOnName(SystemEvents.execute());
const partRedirects = function (events, detail, part) {
return Arr.map(events, (evt) => {
return redirectToPart(evt, detail, part);
})
} |
<<<<<<<
text: () => string;
level: () => Option<'info' | 'warn' | 'error' | 'success'>;
icon: () => Option<string>;
onAction: () => Function;
progress: () => Boolean;
iconProvider: () => IconProvider;
translationProvider: () => (text: Untranslated) => TranslatedString;
=======
text: string;
level: Option<'info' | 'warn' | 'error' | 'success'>;
icon: Option<string>;
onAction: Function;
progress: Boolean;
iconProvider: IconProvider;
>>>>>>>
text: string;
level: Option<'info' | 'warn' | 'error' | 'success'>;
icon: Option<string>;
onAction: Function;
progress: Boolean;
iconProvider: IconProvider;
translationProvider: (text: Untranslated) => TranslatedString;
<<<<<<<
innerHtml: detail.translationProvider()(detail.text())
=======
innerHtml: detail.text
>>>>>>>
innerHtml: detail.translationProvider(detail.text) |
<<<<<<<
import { PlatformDetection } from '@ephox/sand';
=======
import { LazyPlatformDetection } from '@ephox/sand';
>>>>>>>
import { LazyPlatformDetection, PlatformDetection } from '@ephox/sand';
<<<<<<<
=======
import { UiFactoryBackstage } from 'tinymce/themes/silver/backstage/Backstage';
import ItemResponse from '../item/ItemResponse';
>>>>>>>
<<<<<<<
const detection = PlatformDetection.detect();
const isTouch = detection.deviceType.isTouch();
=======
const lazyDetection = LazyPlatformDetection.detect();
>>>>>>>
const isiOS = PlatformDetection.detect().deviceType.isiOS;
const isTouch = LazyPlatformDetection.detect().deviceType.isTouch;
<<<<<<<
editor.on('init', () => {
// Hide the context menu when scrolling or resizing
editor.on('ResizeEditor ScrollContent ScrollWindow longpresscancel', hideContextMenu);
editor.on(isTouch ? 'longpress' : 'contextmenu', (e) => {
// longpress is a TinyMCE-generated event, so the touchstart event data is wrapped.
const isLongpress = e.type === 'longpress';
// Prevent the default if we should never use native
if (Settings.shouldNeverUseNative(editor)) {
e.preventDefault();
}
=======
const showContextMenu = (e) => {
// Prevent the default if we should never use native
if (Settings.shouldNeverUseNative(editor)) {
e.preventDefault();
}
>>>>>>>
const showContextMenu = (e) => {
const isLongpress = e.type === 'longpress';
// Prevent the default if we should never use native
if (Settings.shouldNeverUseNative(editor)) {
e.preventDefault();
}
<<<<<<<
// For longpress, editor.selection hasn't updated yet at this point, so need to do it manually
// Without this longpress causes drag-n-drop duplication of code on Android
if (isLongpress) {
editor.selection.setCursorLocation(e.target, 0);
}
const show = (_editor: Editor, e: EditorEvent<PointerEvent>, items, backstage: UiFactoryBackstage, contextmenu: AlloyComponent, nuAnchorSpec) => {
NestedMenus.build(items, ItemResponse.CLOSE_ON_EXECUTE, backstage, false).map((menuData) => {
e.preventDefault();
// show the context menu, with items set to close on click
InlineView.showMenuAt(contextmenu, nuAnchorSpec, {
menu: {
markers: MenuParts.markers('normal')
},
data: menuData
});
});
};
// Different browsers trigger the context menu from keyboards differently, so need to check both the button and target here.
// Unless it's a touchevent, in which case we don't care.
// Chrome: button = 0 & target = the selection range node
// Firefox: button = 0 & target = body
// IE/Edge: button = 2 & target = body
// Safari: N/A (Mac's don't expose a contextmenu keyboard shortcut)
const isTriggeredByKeyboardEvent = !isLongpress && (e.button !== 2 || e.target === editor.getBody());
const anchorSpec = isTriggeredByKeyboardEvent ? getNodeAnchor(editor) : getPointAnchor(editor, e);
=======
// Different browsers trigger the context menu from keyboards differently, so need to check both the button and target here
// Chrome: button = 0 & target = the selection range node
// Firefox: button = 0 & target = body
// IE/Edge: button = 2 & target = body
// Safari: N/A (Mac's don't expose a contextmenu keyboard shortcut)
const isTriggeredByKeyboardEvent = e.button !== 2 || e.target === editor.getBody();
const anchorSpec = isTriggeredByKeyboardEvent ? getNodeAnchor(editor) : getPointAnchor(editor, e);
>>>>>>>
// For longpress, editor.selection hasn't updated yet at this point, so need to do it manually
// Without this longpress causes drag-n-drop duplication of code on Android
if (isLongpress) {
editor.selection.setCursorLocation(e.target, 0);
}
const show = (_editor: Editor, e: EditorEvent<PointerEvent>, items, backstage: UiFactoryBackstage, contextmenu: AlloyComponent, nuAnchorSpec) => {
NestedMenus.build(items, ItemResponse.CLOSE_ON_EXECUTE, backstage, false).map((menuData) => {
e.preventDefault();
// show the context menu, with items set to close on click
InlineView.showMenuAt(contextmenu, nuAnchorSpec, {
menu: {
markers: MenuParts.markers('normal')
},
data: menuData
});
});
};
// Different browsers trigger the context menu from keyboards differently, so need to check both the button and target here.
// Unless it's a touchevent, in which case we don't care.
// Chrome: button = 0 & target = the selection range node
// Firefox: button = 0 & target = body
// IE/Edge: button = 2 & target = body
// Safari: N/A (Mac's don't expose a contextmenu keyboard shortcut)
const isTriggeredByKeyboardEvent = !isLongpress && (e.button !== 2 || e.target === editor.getBody());
const anchorSpec = isTriggeredByKeyboardEvent ? getNodeAnchor(editor) : getPointAnchor(editor, e); |
<<<<<<<
editor.shortcuts.add('alt+F9', 'focus menubar', function () {
OuterContainer.focusMenubar(outerContainer);
});
=======
lazyOuterContainer = Option.some(outerContainer);
>>>>>>>
lazyOuterContainer = Option.some(outerContainer);
editor.shortcuts.add('alt+F9', 'focus menubar', function () {
OuterContainer.focusMenubar(outerContainer);
}); |
<<<<<<<
import { UnitTest } from '@ephox/bedrock-client';
import { document } from '@ephox/dom-globals';
=======
>>>>>>>
import { UnitTest } from '@ephox/bedrock-client'; |
<<<<<<<
import { Assertions, Chain, Pipeline, Guard, Log } from '@ephox/agar';
import { UnitTest } from '@ephox/bedrock-client';
=======
import { Assertions, Chain, Guard, Log, Pipeline } from '@ephox/agar';
import { UnitTest } from '@ephox/bedrock';
>>>>>>>
import { Assertions, Chain, Guard, Log, Pipeline } from '@ephox/agar';
import { UnitTest } from '@ephox/bedrock-client'; |
<<<<<<<
import { Cell, Fun } from '@ephox/katamari';
import { PlatformDetection } from '@ephox/sand';
import { EventArgs, Position } from '@ephox/sugar';
=======
import { Cell, Fun } from '@ephox/katamari';
>>>>>>>
import { Cell, Fun } from '@ephox/katamari';
import { EventArgs, Position } from '@ephox/sugar';
<<<<<<<
import { AlloyComponent } from '../../api/component/ComponentApi';
import { OptionalDomSchema } from '../../api/component/SpecTypes';
=======
import { AlloyComponent } from '../../api/component/ComponentApi';
>>>>>>>
import { AlloyComponent } from '../../api/component/ComponentApi';
import { OptionalDomSchema } from '../../api/component/SpecTypes';
<<<<<<<
import { NativeSimulatedEvent } from '../../events/SimulatedEvent';
import * as PartType from '../../parts/PartType';
import { EdgeActions, SliderDetail } from '../../ui/types/SliderTypes';
const platform = PlatformDetection.detect();
const isTouch = platform.deviceType.isTouch();
=======
import { NativeSimulatedEvent } from '../../events/SimulatedEvent';
import * as PartType from '../../parts/PartType';
import { SliderDetail } from '../../ui/types/SliderTypes';
>>>>>>>
import { NativeSimulatedEvent } from '../../events/SimulatedEvent';
import * as PartType from '../../parts/PartType';
import { EdgeActions, SliderDetail } from '../../ui/types/SliderTypes';
<<<<<<<
const touchEvents = AlloyEvents.derive([
AlloyEvents.run(NativeEvents.touchstart(), setValueFrom),
AlloyEvents.run(NativeEvents.touchmove(), setValueFrom)
]);
const mouseEvents = AlloyEvents.derive([
AlloyEvents.run(NativeEvents.mousedown(), setValueFrom),
AlloyEvents.run<EventArgs>(NativeEvents.mousemove(), (spectrum, se) => {
if (detail.mouseIsDown.get()) { setValueFrom(spectrum, se); }
})
]);
=======
>>>>>>> |
<<<<<<<
//transform可能已经被删除
const boundingTransform = this.getBoundingTransform();
if(boundingTransform){
boundingTransform.unregisterObserver(this);
}
super.uninitialize();
=======
if (this.boneTexture) {
this.boneTexture.release();
this.boneTexture.dispose();
}
this.getBoundingTransform().unregisterObserver(this);
>>>>>>>
if (this.boneTexture) {
this.boneTexture.release();
this.boneTexture.dispose();
}
//transform可能已经被删除
const boundingTransform = this.getBoundingTransform();
if(boundingTransform){
boundingTransform.unregisterObserver(this);
}
super.uninitialize(); |
<<<<<<<
const control = function <T, U, V>(chain: Chain<T, U>, guard: ChainGuard<T, U, V>) {
return on(function (input: T, next: NextFn<V>, die: DieFn, logs: TestLogs) {
guard(chain.runChain, input, function (v: V, newLogs: TestLogs) {
=======
const control = <T, U, V>(chain: Chain<T, U>, guard: ChainGuard<T, U, V>): Chain<T, V> =>
on((input: T, next: NextFn<Wrap<V>>, die: DieFn, logs: TestLogs) => {
guard(chain.runChain, wrap(input), (v: Wrap<V>, newLogs: TestLogs) => {
>>>>>>>
const control = <T, U, V>(chain: Chain<T, U>, guard: ChainGuard<T, U, V>): Chain<T, V> =>
on((input: T, next: NextFn<V>, die: DieFn, logs: TestLogs) => {
guard(chain.runChain, input, (v: V, newLogs: TestLogs) => {
<<<<<<<
const mapper = function <T, U>(fx: (value: T) => U) {
return on(function (input: T, next: NextFn<U>, die: DieFn, logs: TestLogs) {
next(fx(input), logs);
=======
const mapper = <T, U>(fx: (value: T) => U): Chain<T, U> =>
on((input: T, next: NextFn<Wrap<U>>, die: DieFn, logs: TestLogs) => {
next(wrap(fx(input)), logs);
>>>>>>>
const mapper = <T, U>(fx: (value: T) => U): Chain<T, U> =>
on((input: T, next: NextFn<U>, die: DieFn, logs: TestLogs) => {
next(fx(input), logs);
<<<<<<<
const binder = function <T, U, E>(fx: (input: T) => Result<U, E>) {
return on(function (input: T, next: NextFn<U>, die: DieFn, logs: TestLogs) {
fx(input).fold(function (err) {
=======
const binder = <T, U, E>(fx: (input: T) => Result<U, E>): Chain<T, U> =>
on((input: T, next: NextFn<Wrap<U>>, die: DieFn, logs: TestLogs) => {
fx(input).fold((err) => {
>>>>>>>
const binder = <T, U, E>(fx: (input: T) => Result<U, E>): Chain<T, U> =>
on((input: T, next: NextFn<U>, die: DieFn, logs: TestLogs) => {
fx(input).fold((err) => {
<<<<<<<
}, function (v) {
next(v, logs);
=======
}, (v) => {
next(wrap(v), logs);
>>>>>>>
}, (v) => {
next(v, logs);
<<<<<<<
const op = function <T>(fx: (value: T) => void): Chain<T, T> {
return on(function (input: T, next: NextFn<T>, die: DieFn, logs: TestLogs) {
=======
const op = <T>(fx: (value: T) => void): Chain<T, T> =>
on((input: T, next: NextFn<Wrap<T>>, die: DieFn, logs: TestLogs) => {
>>>>>>>
const op = <T>(fx: (value: T) => void): Chain<T, T> =>
on((input: T, next: NextFn<T>, die: DieFn, logs: TestLogs) => {
<<<<<<<
const fromParent = function <T, U>(parent: Chain<T, U>, chains: Chain<U, any>[]) {
return on(function (cvalue: T, cnext: NextFn<U>, cdie: DieFn, clogs: TestLogs) {
Pipeline.async(cvalue, [Step.raw(parent.runChain)], function (value: U, parentLogs: TestLogs) {
const cs = Arr.map(chains, function (c) {
return Step.raw(function (_, next, die, logs) {
=======
const fromParent = <T, U>(parent: Chain<T, U>, chains: Chain<U, any>[]): Chain<T, U> =>
on((cvalue: T, cnext: NextFn<Wrap<U>>, cdie: DieFn, clogs: TestLogs) => {
Pipeline.async(wrap(cvalue), [Step.raw(parent.runChain)], (value: Wrap<U>, parentLogs: TestLogs) => {
const cs = Arr.map(chains, (c) =>
Step.raw((_, next, die, logs) => {
>>>>>>>
const fromParent = <T, U, V>(parent: Chain<T, U>, chains: Chain<U, V>[]): Chain<T, U> =>
on((cvalue: T, cnext: NextFn<U>, cdie: DieFn, clogs: TestLogs) => {
Pipeline.async(cvalue, [Step.raw(parent.runChain)], function (value: U, parentLogs: TestLogs) {
const cs = Arr.map(chains, (c) =>
Step.raw(function (_, next, die, logs) {
<<<<<<<
Pipeline.async(cvalue, cs, function (_, finalLogs) {
=======
Pipeline.async(wrap(cvalue), cs, (_, finalLogs) => {
>>>>>>>
Pipeline.async(cvalue, cs, (_, finalLogs) => {
<<<<<<<
const log = function <T>(message: string) {
return on(function (input: T, next: NextFn<T>, die: DieFn, logs: TestLogs) {
=======
const log = <T>(message: string): Chain<T, T> =>
on((input: T, next: NextFn<Wrap<T>>, die: DieFn, logs: TestLogs) => {
>>>>>>>
const log = <T>(message: string): Chain<T, T> =>
on((input: T, next: NextFn<T>, die: DieFn, logs: TestLogs) => { |
<<<<<<<
import { Sidebar } from '../sidebar/Sidebar';
import { renderMoreToolbar, renderToolbarGroup } from '../toolbar/CommonToolbar';
=======
import * as Sidebar from '../sidebar/Sidebar';
import { renderToolbar, renderToolbarGroup } from '../toolbar/CommonToolbar';
>>>>>>>
import * as Sidebar from '../sidebar/Sidebar';
import { renderMoreToolbar, renderToolbarGroup } from '../toolbar/CommonToolbar'; |
<<<<<<<
import { Annotator } from 'tinymce/core/api/Annotator';
=======
import { HTMLElement, Document, Window } from '@ephox/dom-globals';
>>>>>>>
import { Annotator } from 'tinymce/core/api/Annotator';
import { HTMLElement, Document, Window } from '@ephox/dom-globals'; |
<<<<<<<
import { HexColour, RgbaColour } from '@ephox/acid';
import { Menu, Toolbar } from '@ephox/bridge';
import { Cell, Option, Strings } from '@ephox/katamari';
=======
import { Menu, Toolbar, Types } from '@ephox/bridge';
import { Cell, Option } from '@ephox/katamari';
>>>>>>>
import { HexColour, RgbaColour } from '@ephox/acid';
import { Menu, Toolbar, Types } from '@ephox/bridge';
import { Cell, Option, Strings } from '@ephox/katamari'; |
<<<<<<<
import { AlloyComponent, Attachment, Docking, Boxes, SplitFloatingToolbar } from '@ephox/alloy';
import { Option, Cell } from '@ephox/katamari';
import { Css, Element, Height } from '@ephox/sugar';
=======
import { AlloyComponent, Attachment, Docking } from '@ephox/alloy';
import { Option } from '@ephox/katamari';
import { Body, Css, Element, Height, Location, Width } from '@ephox/sugar';
>>>>>>>
import { AlloyComponent, Attachment, Boxes, Docking, SplitFloatingToolbar } from '@ephox/alloy';
import { Cell, Option } from '@ephox/katamari';
import { Body, Css, Element, Height, Width } from '@ephox/sugar';
<<<<<<<
import { getToolbarDrawer, getUiContainer, isStickyToolbar, ToolbarDrawer, useFixedContainer, isToolbarLocationTop } from '../api/Settings';
=======
import { getMaxWidthSetting, getToolbarDrawer, getUiContainer, isStickyToolbar, ToolbarDrawer, useFixedContainer } from '../api/Settings';
>>>>>>>
import Delay from 'tinymce/core/api/util/Delay';
import { getMaxWidthSetting, getToolbarDrawer, getUiContainer, isStickyToolbar, isToolbarLocationTop, ToolbarDrawer, useFixedContainer } from '../api/Settings';
<<<<<<<
const prevTargetHeight = Cell(Height.get(targetElm));
const visible = Cell(false);
=======
const editorMaxWidthOpt = getMaxWidthSetting(editor).or(EditorSize.getWidth(editor));
>>>>>>>
const editorMaxWidthOpt = getMaxWidthSetting(editor).or(EditorSize.getWidth(editor));
const prevTargetHeight = Cell(Height.get(targetElm));
const visible = Cell(false); |
<<<<<<<
=======
layouts?: {
onLtr: (elem: Element) => AnchorLayout[];
onRtl: (elem: Element) => AnchorLayout[];
};
>>>>>>>
<<<<<<<
=======
layouts: () => {
onLtr: () => (elem: Element) => AnchorLayout[];
onRtl: () => (elem: Element) => AnchorLayout[];
};
>>>>>>>
<<<<<<<
export interface MakeshiftAnchorSpec extends CommonAnchorSpec, HasLayoutAnchorSpec {
=======
export interface MakeshiftAnchorSpec extends CommonAnchorSpec {
>>>>>>>
export interface MakeshiftAnchorSpec extends CommonAnchorSpec {
<<<<<<<
=======
layouts?: {
onLtr: (elem: Element) => AnchorLayout[];
onRtl: (elem: Element) => AnchorLayout[];
};
>>>>>>>
<<<<<<<
=======
layouts?: () => Option<{
onLtr: () => (elem: Element) => AnchorLayout[];
onRtl: () => (elem: Element) => AnchorLayout[];
}>;
>>>>>>> |
<<<<<<<
const failed = function (label, expected, step: Step<any, any>) {
return Step.raw(function (value, next, die, initLogs) {
step.runStep(value, function (v, newLogs) {
=======
const failed = (label, expected, step: Step<any, any>) =>
Step.raw((value, next, die, initLogs) => {
step(value, (v, newLogs) => {
>>>>>>>
const failed = (label, expected, step: Step<any, any>) =>
Step.raw((value, next, die, initLogs) => {
step.runStep(value, (v, newLogs) => {
<<<<<<<
const passed = function (label, expected, step: Step<any, any>) {
return Step.raw((value, next, die, initLogs) => {
step.runStep(value, function (v, newLogs) {
const exp = expected === preserved ? value : expected;
=======
const passed = (label, expected, step: Step<any, any>) =>
Step.raw((value, next, die, initLogs) => {
step(value, (v, newLogs) => {
const exp = expected === sPreserved ? value : expected;
>>>>>>>
const passed = (label, expected, step: Step<any, any>) =>
Step.raw((value, next, die, initLogs) => {
step.runStep(value, (v, newLogs) => {
const exp = expected === sPreserved ? value : expected;
<<<<<<<
const testStepFail = function (expected, step: Step<any, any>) {
return Step.raw(function (value, next, die, initLogs) {
step.runStep(value, function (v, newLogs) {
=======
const testStepFail = (expected, step: Step<any, any>) =>
Step.raw((value, next, die, initLogs) => {
step(value, (v, newLogs) => {
>>>>>>>
const testStepFail = (expected, step: Step<any, any>) =>
Step.raw((value, next, die, initLogs) => {
step.runStep(value, (v, newLogs) => {
<<<<<<<
const testStepFailPprintError = function (expectedExpectedValue, expectedActualValue, step: Step<any, any>) {
return Step.raw(function (value, next, die, initLogs) {
step.runStep(value, function (v, newLogs) {
=======
const testStepFailPprintError = (expectedExpectedValue, expectedActualValue, step: Step<any, any>) =>
Step.raw((value, next, die, initLogs) => {
step(value, (v, newLogs) => {
>>>>>>>
const testStepFailPprintError = (expectedExpectedValue, expectedActualValue, step: Step<any, any>) =>
Step.raw((value, next, die, initLogs) => {
step.runStep(value, (v, newLogs) => { |
<<<<<<<
private readonly _defaultMaterial: Material = egret3d.DefaultMaterials.MESH_BASIC.clone().setDepth(false, false); // TODO copy shader
private readonly _renderState: WebGLRenderState = paper.GameObject.globalGameObject.getOrAddComponent(WebGLRenderState);
=======
private readonly _copyMaterial: Material = new Material(egret3d.DefaultShaders.COPY);//TODO全局唯一?
private readonly _webglSystem = paper.SystemManager.getInstance().getSystem(web.WebGLRenderSystem); //TODO
private readonly _webglState = paper.GameObject.globalGameObject.getOrAddComponent(WebGLRenderState);
>>>>>>>
private readonly _copyMaterial: Material = new Material(egret3d.DefaultShaders.COPY);//TODO全局唯一?
private readonly _renderState: WebGLRenderState = paper.GameObject.globalGameObject.getOrAddComponent(WebGLRenderState);
<<<<<<<
renderState.updateViewport(postProcessingCamera.viewport, dest);
renderState.clearBuffer(gltf.BufferBit.DEPTH_BUFFER_BIT | gltf.BufferBit.COLOR_BUFFER_BIT, egret3d.Color.WHITE);
renderState.draw(postProcessingCamera, this._drawCall);
=======
public blit(src: Texture, mat: Material | null = null, dest: BaseRenderTarget | null = null) {
if (!mat) {
mat = this._copyMaterial;
mat.setTexture(src);
}
const camera = this._camera;
const webglSystem = this._webglSystem;
const webglState = this._webglState;
webglSystem._viewport(camera.viewport, dest);
webglState.clearBuffer(gltf.BufferBit.DEPTH_BUFFER_BIT | gltf.BufferBit.COLOR_BUFFER_BIT, egret3d.Color.WHITE);
webglSystem._draw(camera.context, this._drawCall, mat);
const webgl = WebGLCapabilities.webgl;
webgl.bindFramebuffer(webgl.FRAMEBUFFER, null);
>>>>>>>
if (dest) {
renderState.updateRenderTarget(dest);
}
renderState.updateViewport(postProcessingCamera.viewport, dest);
renderState.clearBuffer(gltf.BufferBit.DEPTH_BUFFER_BIT | gltf.BufferBit.COLOR_BUFFER_BIT, egret3d.Color.WHITE);
renderState.draw(postProcessingCamera, this._drawCall);
renderState.updateRenderTarget(backupRenderTarget); |
<<<<<<<
import { Arr } from '@ephox/katamari';
=======
import * as DomEvent from 'ephox/sugar/api/events/DomEvent';
import * as Remove from 'ephox/sugar/api/dom/Remove';
import * as Attr from 'ephox/sugar/api/properties/Attr';
>>>>>>>
import * as DomEvent from 'ephox/sugar/api/events/DomEvent';
import * as Remove from 'ephox/sugar/api/dom/Remove';
import * as Attr from 'ephox/sugar/api/properties/Attr';
import { Arr } from '@ephox/katamari';
<<<<<<<
}
if (ShadowDom.isSupported()) {
UnitTest.test('withShadowElement gives us open and closed roots', () => {
const roots: Array<Element<ShadowRoot>> = [];
withShadowElement((sr) => {
roots.push(sr);
});
Assert.eq('open then closed', [ 'open', 'closed' ], Arr.map(roots, (r) => (r.dom() as any).mode ));
});
}
=======
});
>>>>>>>
});
if (ShadowDom.isSupported()) {
UnitTest.test('withShadowElement gives us open and closed roots', () => {
const roots: Array<Element<ShadowRoot>> = [];
withShadowElement((sr) => {
roots.push(sr);
});
Assert.eq('open then closed', [ 'open', 'closed' ], Arr.map(roots, (r) => (r.dom() as any).mode ));
});
} |
<<<<<<<
import { ApproxStructure } from '@ephox/agar';
import { Unicode } from '@ephox/katamari';
=======
import { ApproxStructure, StructAssert } from '@ephox/agar';
>>>>>>>
import { ApproxStructure, StructAssert } from '@ephox/agar';
import { Unicode } from '@ephox/katamari';
<<<<<<<
const sAssertNbspStruct = ApproxStructure.build(function (s, str) {
return s.element('body', {
children: [
s.element('p', {
children: [
s.text(str.is('a')),
s.text(str.is(Unicode.nbsp)),
s.text(str.is(Unicode.nbsp)),
s.text(str.is('b'))
]
})
]
});
});
=======
const sAssertSpanStruct = sAssertStruct(ApproxStructure.build((s, str) => {
return [
s.text(str.is('a')),
s.element('span', {
children: [
s.text(str.is('\u00a0')),
]
}),
s.element('span', {
children: [
s.text(str.is('\u00a0')),
]
}),
s.text(str.is('b'))
];
}));
const sAssertNbspStruct = sAssertStruct(ApproxStructure.build((s, str) => {
return [
s.text(str.is('a')),
s.text(str.is('\u00a0')),
s.text(str.is('\u00a0')),
s.text(str.is('b'))
];
}));
>>>>>>>
const sAssertSpanStruct = sAssertStruct(ApproxStructure.build((s, str) => {
return [
s.text(str.is('a')),
s.element('span', {
children: [
s.text(str.is(Unicode.nbsp)),
]
}),
s.element('span', {
children: [
s.text(str.is(Unicode.nbsp)),
]
}),
s.text(str.is('b'))
];
}));
const sAssertNbspStruct = sAssertStruct(ApproxStructure.build((s, str) => {
return [
s.text(str.is('a')),
s.text(str.is(Unicode.nbsp)),
s.text(str.is(Unicode.nbsp)),
s.text(str.is('b'))
];
})); |
<<<<<<<
asyncOperation.runStep(lastLink, function (x, newLogs) {
callAsync(function () { nextStep(x, newLogs); });
=======
asyncOperation(lastLink, (x, newLogs) => {
callAsync(() => { nextStep(x, newLogs); });
>>>>>>>
asyncOperation.runStep(lastLink, (x, newLogs) => {
callAsync(() => { nextStep(x, newLogs); }); |
<<<<<<<
return get(win).fold(
() => {
const doc = Element.fromDom(win.document);
const html = win.document.documentElement;
const scroll = Scroll.get(doc);
// Don't use window.innerWidth/innerHeight here, as we don't want to include scrollbars
// since the right/bottom position is based on the edge of the scrollbar not the window
const width = html.clientWidth;
const height = html.clientHeight;
return bounds(scroll.left(), scroll.top(), width, height);
},
(visualViewport) => bounds(visualViewport.pageLeft, visualViewport.pageTop, visualViewport.width, visualViewport.height)
);
};
const bind = (name: string, callback: EventHandler, _win?: Window) => {
return get(_win).map((visualViewport) => {
const handler = (e: Event) => fromRawEvent(e);
visualViewport.addEventListener(name, handler);
return {
unbind: () => visualViewport.removeEventListener(name, handler)
};
}).getOrThunk(() => {
return {
unbind: Fun.noop
};
});
=======
const doc = win.document;
const scroll = Scroll.get(Element.fromDom(doc));
/* tslint:disable-next-line:no-string-literal */
const visualViewport = win['visualViewport'];
if (visualViewport !== undefined) {
// iOS doesn't update the pageTop/pageLeft when element.scrollIntoView() is called, so we need to fallback to the
// scroll position which will always be less than the page top/left values when page top/left are accurate/correct.
return bounds(Math.max(visualViewport.pageLeft, scroll.left()), Math.max(visualViewport.pageTop, scroll.top()), visualViewport.width, visualViewport.height);
} else {
const html = doc.documentElement;
// Don't use window.innerWidth/innerHeight here, as we don't want to include scrollbars
// since the right/bottom position is based on the edge of the scrollbar not the window
const width = html.clientWidth;
const height = html.clientHeight;
return bounds(scroll.left(), scroll.top(), width, height);
}
>>>>>>>
const doc = win.document;
const scroll = Scroll.get(Element.fromDom(doc));
return get(win).fold(
() => {
const html = win.document.documentElement;
// Don't use window.innerWidth/innerHeight here, as we don't want to include scrollbars
// since the right/bottom position is based on the edge of the scrollbar not the window
const width = html.clientWidth;
const height = html.clientHeight;
return bounds(scroll.left(), scroll.top(), width, height);
},
(visualViewport) => {
// iOS doesn't update the pageTop/pageLeft when element.scrollIntoView() is called, so we need to fallback to the
// scroll position which will always be less than the page top/left values when page top/left are accurate/correct.
return bounds(Math.max(visualViewport.pageLeft, scroll.left()), Math.max(visualViewport.pageTop, scroll.top()), visualViewport.width, visualViewport.height);
}
);
};
const bind = (name: string, callback: EventHandler, _win?: Window) => {
return get(_win).map((visualViewport) => {
const handler = (e: Event) => fromRawEvent(e);
visualViewport.addEventListener(name, handler);
return {
unbind: () => visualViewport.removeEventListener(name, handler)
};
}).getOrThunk(() => {
return {
unbind: Fun.noop
};
}); |
<<<<<<<
import { Arr, Fun } from '@ephox/katamari';
import { Compare, Insert, Replication, SelectorFind, SugarElement, SugarFragment, SugarNode, Traverse } from '@ephox/sugar';
=======
import { HTMLLIElement, HTMLOListElement, HTMLTableCellElement, HTMLTableElement, Node, Range } from '@ephox/dom-globals';
import { Arr, Fun, Obj, Option, Strings } from '@ephox/katamari';
import { Compare, Css, Element, Fragment, Insert, Node as SugarNode, Replication, SelectorFind, Traverse } from '@ephox/sugar';
>>>>>>>
import { Arr, Fun, Obj, Optional, Strings } from '@ephox/katamari';
import { Compare, Css, Insert, Replication, SelectorFind, SugarElement, SugarFragment, SugarNode, Traverse } from '@ephox/sugar';
<<<<<<<
SugarElement.fromTag('li'),
SugarElement.fromTag(SugarNode.name(listCont))
=======
Element.fromTag('li'),
listElm
>>>>>>>
SugarElement.fromTag('li'),
listElm
<<<<<<<
const getWrapElements = function (rootNode, rng) {
const commonAnchorContainer = SugarElement.fromDom(rng.commonAncestorContainer);
=======
const getWrapElements = (rootNode: Element<Node>, rng: Range) => {
const commonAnchorContainer = Element.fromDom(rng.commonAncestorContainer);
>>>>>>>
const getWrapElements = (rootNode: SugarElement<Node>, rng: Range) => {
const commonAnchorContainer = SugarElement.fromDom(rng.commonAncestorContainer);
<<<<<<<
return SimpleTableModel.subsection(fullTableModel, firstCell, lastCell).map(function (sectionedTableModel) {
return SugarFragment.fromElements([ SimpleTableModel.toDom(sectionedTableModel) ]);
});
=======
return SimpleTableModel.subsection(fullTableModel, firstCell, lastCell).map((sectionedTableModel) =>
Fragment.fromElements([ SimpleTableModel.toDom(sectionedTableModel) ])
);
>>>>>>>
return SimpleTableModel.subsection(fullTableModel, firstCell, lastCell).map((sectionedTableModel) =>
SugarFragment.fromElements([ SimpleTableModel.toDom(sectionedTableModel) ])
); |
<<<<<<<
import { fireListEvent } from '../api/Events';
import { ListAction } from '../core/ListAction';
=======
import { createTextBlock } from '../core/TextBlock';
>>>>>>>
import { createTextBlock } from '../core/TextBlock';
import { fireListEvent } from '../api/Events';
import { ListAction } from '../core/ListAction'; |
<<<<<<<
import * as GradientActions from '../common/GradientActions';
=======
import { SliderDetail } from '../../ui/types/SliderTypes';
import * as SliderActions from './SliderActions';
>>>>>>>
import { SliderDetail } from '../../ui/types/SliderTypes';
import * as GradientActions from '../common/GradientActions';
<<<<<<<
overrides (detail) {
const moveToX = function (spectrum, simulatedEvent) {
const spectrumBounds = spectrum.element().dom().getBoundingClientRect();
GradientActions.setXFromEvent(spectrum, detail, spectrumBounds, simulatedEvent);
=======
overrides (detail: SliderDetail) {
const moveToX = (spectrum: AlloyComponent, simulatedEvent: NativeSimulatedEvent) => {
const domElem = spectrum.element().dom() as HTMLElement;
const spectrumBounds: ClientRect = domElem.getBoundingClientRect();
SliderActions.setXFromEvent(spectrum, detail, spectrumBounds, simulatedEvent);
>>>>>>>
overrides (detail: SliderDetail) {
const moveToX = (spectrum: AlloyComponent, simulatedEvent: NativeSimulatedEvent) => {
const domElem = spectrum.element().dom() as HTMLElement;
const spectrumBounds: ClientRect = domElem.getBoundingClientRect();
GradientActions.setXFromEvent(spectrum, detail, spectrumBounds, simulatedEvent);
<<<<<<<
AlloyEvents.run(NativeEvents.mousedown(), moveTo),
AlloyEvents.run(NativeEvents.mousemove(), function (spectrum, se) {
if (detail.mouseIsDown().get()) { moveTo(spectrum, se); }
=======
AlloyEvents.run(NativeEvents.mousedown(), moveToX),
AlloyEvents.run<SugarEvent>(NativeEvents.mousemove(), (spectrum, se) => {
if (detail.mouseIsDown().get()) { moveToX(spectrum, se); }
>>>>>>>
AlloyEvents.run(NativeEvents.mousedown(), moveTo),
AlloyEvents.run<SugarEvent>(NativeEvents.mousemove(), (spectrum, se) => {
if (detail.mouseIsDown().get()) { moveTo(spectrum, se); } |
<<<<<<<
const getNewRoute = (comp: AlloyComponent, transConfig: TransitioningConfig, transState: Stateless, destination: string): TransitionRoute => {
return {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
start: Attr.get(comp.element(), transConfig.stateAttr)!,
destination
};
};
=======
const getNewRoute = (comp: AlloyComponent, transConfig: TransitioningConfig, transState: Stateless, destination: string): TransitionRoute => ({
start: Attr.get(comp.element(), transConfig.stateAttr),
destination
});
>>>>>>>
const getNewRoute = (comp: AlloyComponent, transConfig: TransitioningConfig, transState: Stateless, destination: string): TransitionRoute => ({
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
start: Attr.get(comp.element(), transConfig.stateAttr)!,
destination
}); |
<<<<<<<
async function computeImage(
container: cloud.Container,
repository: aws.ecr.Repository | undefined): Promise<ImageOptions> {
=======
async function computeImage(container: cloud.Container): Promise<ImageOptions> {
const environment: { name: string, value: string }[] = ecsEnvironmentFromMap(container.environment);
>>>>>>>
async function computeImage(
container: cloud.Container,
repository: aws.ecr.Repository | undefined): Promise<ImageOptions> {
const environment: { name: string, value: string }[] = ecsEnvironmentFromMap(container.environment); |
<<<<<<<
=======
import { document, window } from '@ephox/dom-globals';
import { Cleaner } from '../../module/ephox/alloy/test/Cleaner';
>>>>>>>
import { Cleaner } from '../../module/ephox/alloy/test/Cleaner';
<<<<<<<
const page = Element.fromHtml(
`<div class="gui-events-test-container">
<input class="test-input" />
<div class="test-contenteditable" contenteditable="true"></div>
<div class="test-inner-div">
<span class="focusable-span" tabindex="-1" style="width: 200px; height: 200px; border: 1px solid blue; display: inline-block;"></span>
<button class="test-button">Button</button>
</div>
</div>`
=======
const cleanup = Cleaner();
const page = DomRender.renderToDom(
DomDefinition.nu({
uid: 'test-uid-1',
tag: 'div',
classes: [ 'gui-events-test-container' ],
defChildren: [
{
uid: 'test-uid-1a',
tag: 'input',
classes: [ 'test-input' ]
},
{
uid: 'test-uid-a-editor',
tag: 'div',
attributes: {
contenteditable: 'true'
},
classes: [ 'test-contenteditable' ]
},
{
uid: 'test-uid-1b',
tag: 'div',
classes: [ 'test-inner-div' ],
defChildren: [
{
uid: 'test-uid-1b-a',
tag: 'span',
classes: [ 'focusable-span' ],
attributes: {
tabindex: '-1'
},
styles: {
width: '200px',
height: '200px',
border: '1px solid blue',
display: 'inline-block'
}
},
{
uid: 'test-uid-1b-b',
tag: 'button',
classes: [ 'test-button' ],
innerHtml: 'Button'
}
]
}
]
})
>>>>>>>
const cleanup = Cleaner();
const page = Element.fromHtml(
`<div class="gui-events-test-container">
<input class="test-input" />
<div class="test-contenteditable" contenteditable="true"></div>
<div class="test-inner-div">
<span class="focusable-span" tabindex="-1" style="width: 200px; height: 200px; border: 1px solid blue; display: inline-block;"></span>
<button class="test-button">Button</button>
</div>
</div>` |
<<<<<<<
import Settings from '../api/Settings';
=======
import { Fun, Arr } from '@ephox/katamari';
>>>>>>>
import { Fun, Arr } from '@ephox/katamari';
import Settings from '../api/Settings'; |
<<<<<<<
import { Css, DomEvent, SugarElement, SugarPosition, SugarShadowDom } from '@ephox/sugar';
=======
import { Event } from '@ephox/dom-globals';
import { Css, DomEvent, Element, Position, ShadowDom } from '@ephox/sugar';
>>>>>>>
import { Css, DomEvent, SugarElement, SugarPosition, SugarShadowDom } from '@ephox/sugar';
<<<<<<<
if (outer.left !== contentWindow.innerWidth || outer.top !== contentWindow.innerHeight) {
lastWindowDimensions.set(SugarPosition(contentWindow.innerWidth, contentWindow.innerHeight));
Events.fireResizeContent(editor, e);
=======
if (outer.left() !== contentWindow.innerWidth || outer.top() !== contentWindow.innerHeight) {
lastWindowDimensions.set(Position(contentWindow.innerWidth, contentWindow.innerHeight));
Events.fireResizeContent(editor);
>>>>>>>
if (outer.left !== contentWindow.innerWidth || outer.top !== contentWindow.innerHeight) {
lastWindowDimensions.set(SugarPosition(contentWindow.innerWidth, contentWindow.innerHeight));
Events.fireResizeContent(editor);
<<<<<<<
if (inner.left !== docEle.offsetWidth || inner.top !== docEle.offsetHeight) {
lastDocumentDimensions.set(SugarPosition(docEle.offsetWidth, docEle.offsetHeight));
Events.fireResizeContent(editor, e);
=======
if (inner.left() !== docEle.offsetWidth || inner.top() !== docEle.offsetHeight) {
lastDocumentDimensions.set(Position(docEle.offsetWidth, docEle.offsetHeight));
Events.fireResizeContent(editor);
>>>>>>>
if (inner.left !== docEle.offsetWidth || inner.top !== docEle.offsetHeight) {
lastDocumentDimensions.set(SugarPosition(docEle.offsetWidth, docEle.offsetHeight));
Events.fireResizeContent(editor);
<<<<<<<
if (isiOS12 === true) {
Css.setAll(socket.element, {
=======
if (isiOS12) {
Css.setAll(socket.element(), {
>>>>>>>
if (isiOS12) {
Css.setAll(socket.element, {
<<<<<<<
editor.addCommand('ToggleSidebar', (ui: boolean, value: string) => {
OuterContainer.toggleSidebar(outerContainer, value);
=======
editor.addCommand('ToggleSidebar', (_ui: boolean, value: string) => {
OuterContainer.toggleSidebar(uiComponents.outerContainer, value);
>>>>>>>
editor.addCommand('ToggleSidebar', (_ui: boolean, value: string) => {
OuterContainer.toggleSidebar(outerContainer, value); |
<<<<<<<
const padding = key === Keys.space() ? '\u00a0' : '';
const extraOffset = padding === '' ? 0 : 1;
return Logger.t(`Set content and press ${key}`, GeneralSteps.sequence([
tinyApis.sSetContent('<p>' + content + padding + '</p>'),
=======
return GeneralSteps.sequence([
tinyApis.sSetContent('<p>' + content + '</p>'),
>>>>>>>
return Logger.t(`Set content and press ${key}`, GeneralSteps.sequence([
tinyApis.sSetContent('<p>' + content + '</p>'), |
<<<<<<<
import { SelectComponent } from './select/select.component';
=======
import { RadioComponent } from './radio/radio.component';
import { DatepickerComponent } from './datepicker/datepicker.component';
import { SliderComponent } from './slider/slider.component';
import { SlidetoggleComponent } from './slidetoggle/slidetoggle.component';
>>>>>>>
import { SelectComponent } from './select/select.component';
import { RadioComponent } from './radio/radio.component';
import { DatepickerComponent } from './datepicker/datepicker.component';
import { SliderComponent } from './slider/slider.component';
import { SlidetoggleComponent } from './slidetoggle/slidetoggle.component';
<<<<<<<
{ path: 'select', component: SelectComponent },
=======
{ path: 'radio', component: RadioComponent },
{ path: 'datepicker', component: DatepickerComponent },
{ path: 'slider', component: SliderComponent },
{ path: 'slide-toggle', component: SlidetoggleComponent },
>>>>>>>
{ path: 'select', component: SelectComponent },
{ path: 'radio', component: RadioComponent },
{ path: 'datepicker', component: DatepickerComponent },
{ path: 'slider', component: SliderComponent },
{ path: 'slide-toggle', component: SlidetoggleComponent }, |
<<<<<<<
import { ListComponent } from './list/list.component';
=======
import { StepperComponent } from './stepper/stepper.component';
import { ExpansionPanelComponent } from './expansion-panel/expansion-panel.component';
>>>>>>>
import { ListComponent } from './list/list.component';
import { StepperComponent } from './stepper/stepper.component';
import { ExpansionPanelComponent } from './expansion-panel/expansion-panel.component';
<<<<<<<
{ path: 'list', component: ListComponent },
=======
{ path: 'stepper', component: StepperComponent},
{ path: 'expansion', component: ExpansionPanelComponent},
{ path: '', redirectTo: '/buttons', pathMatch: 'full'}
>>>>>>>
{ path: 'list', component: ListComponent },
{ path: 'stepper', component: StepperComponent},
{ path: 'expansion', component: ExpansionPanelComponent},
{ path: '', redirectTo: '/buttons', pathMatch: 'full'} |
<<<<<<<
{
"name": "Filtering",
"icon": "filter_list",
"link": "tables/filter",
"open" : false,
},
{
"name": "Pagination",
"icon": "last_page",
"link": "pagination-table",
"open" : false,
},
{
"name": "Sorting",
"icon": "sort_by_alpha",
"link": "sorting-table",
"open" : false,
},
{
"name": "HTTP",
"icon": "http",
"link": "retrive-http-table",
"open" : false,
},
{
"name": "All Features",
=======
// {
// "name": "Filtering",
// "icon": "filter_list",
// "link": "tables/filter",
// "open" : false,
// },
// {
// "name": "Pagination",
// "icon": "last_page",
// "link": "pagination-table",
// "open" : false,
// },
// {
// "name": "Sorting",
// "icon": "sort_by_alpha",
// "link": "sorting-table",
// "open" : false,
// },
// {
// "name": "HTTP",
// "icon": "http",
// "link": "retrive-http-table",
// "open" : false,
// },
{
"name": "Feature",
>>>>>>>
{
"name": "Filtering",
"icon": "filter_list",
"link": "tables/filter",
"open" : false,
},
{
"name": "Pagination",
"icon": "last_page",
"link": "pagination-table",
"open" : false,
},
{
"name": "Sorting",
"icon": "sort_by_alpha",
"link": "sorting-table",
"open" : false,
},
{
"name": "HTTP",
"icon": "http",
"link": "retrive-http-table",
"open" : false,
},
// {
// "name": "Filtering",
// "icon": "filter_list",
// "link": "tables/filter",
// "open" : false,
// },
// {
// "name": "Pagination",
// "icon": "last_page",
// "link": "pagination-table",
// "open" : false,
// },
// {
// "name": "Sorting",
// "icon": "sort_by_alpha",
// "link": "sorting-table",
// "open" : false,
// },
// {
// "name": "HTTP",
// "icon": "http",
// "link": "retrive-http-table",
// "open" : false,
// },
{
"name": "All Features", |
<<<<<<<
let data = params.data;
if (this.options.uploadToStorage) {
const docPath = r.collection.doc(id).path;
data = this.parseDataAndUpload(docPath, data);
}
=======
const currentUserEmail = await this.getCurrentUserEmail();
>>>>>>>
const currentUserEmail = await this.getCurrentUserEmail();
let data = params.data;
if (this.options.uploadToStorage) {
const docPath = r.collection.doc(id).path;
data = this.parseDataAndUpload(docPath, data);
}
<<<<<<<
private parseDataAndUpload(docPath: string, data: any) {
if (!data) {
return data;
}
Object.keys(data).map(k => {
const val = data[k];
const hasRawFile = !!val && val.hasOwnProperty('rawFile');
if (!hasRawFile) {
return;
}
this.fireWrapper.storage().ref(docPath).put(val.rawFile);
delete data[k].rawFile;
// const hasRawFileArray = !!val && Array.isArray(val) && !!val.length && val[0].hasOwnProperty('rawFile');
return hasRawFile;
})
return data;
}
=======
private async getCurrentUserEmail() {
const user = await this.rm.getUserLogin();
if (user) {
return user.email;
} else {
return 'annonymous user';
}
}
>>>>>>>
private async getCurrentUserEmail() {
const user = await this.rm.getUserLogin();
if (user) {
return user.email;
} else {
return 'annonymous user';
}
}
private parseDataAndUpload(docPath: string, data: any) {
if (!data) {
return data;
}
Object.keys(data).map(k => {
const val = data[k];
const hasRawFile = !!val && val.hasOwnProperty('rawFile');
if (!hasRawFile) {
return;
}
this.fireWrapper.storage().ref(docPath).put(val.rawFile);
delete data[k].rawFile;
// const hasRawFileArray = !!val && Array.isArray(val) && !!val.length && val[0].hasOwnProperty('rawFile');
return hasRawFile;
})
return data;
} |
<<<<<<<
const audioPath = resolveAudioFilePath(options.audioFile);
TNS_Player_Log('audioPath', audioPath);
if (!this._player) {
TNS_Player_Log('android mediaPlayer is not initialized, creating new instance');
this._player = new android.media.MediaPlayer();
}
// request audio focus, this will setup the onAudioFocusChangeListener
if (!options.audioMixing) {
this._mAudioFocusGranted = this._requestAudioFocus();
}
=======
this._options = options;
>>>>>>>
if (!this._player) {
this._player = new android.media.MediaPlayer();
}
// request audio focus, this will setup the onAudioFocusChangeListener
if (!options.audioMixing) {
this._mAudioFocusGranted = this._requestAudioFocus();
} |
<<<<<<<
import * as settingsHelper from './settingsHelper';
=======
import * as utils from './helpers';
import * as ta from './testAgent';
>>>>>>>
import * as settingsHelper from './settingsHelper';
import * as utils from './helpers';
import * as ta from './testAgent';
<<<<<<<
//Modify settings file to enable configurations and data collectors.
var settingsFile = this.dtaTestConfig.settingsFile;
try {
settingsFile = await settingsHelper.updateSettingsFileAsRequired(this.dtaTestConfig.settingsFile, this.dtaTestConfig.runInParallel, this.dtaTestConfig.tiaConfig, false);
} catch (error) {
tl.warning(tl.loc('ErrorWhileUpdatingSettings'));
tl.debug(error);
}
this.addToProcessEnvVars(envVars, 'testcasefilter', this.dtaTestConfig.testcaseFilter);
this.addToProcessEnvVars(envVars, 'runsettings', settingsFile);
this.addToProcessEnvVars(envVars, 'testdroplocation', this.dtaTestConfig.testDropLocation);
this.addToProcessEnvVars(envVars, 'testrunparams', this.dtaTestConfig.overrideTestrunParameters);
this.setEnvironmentVariableToString(envVars, 'codecoverageenabled', this.dtaTestConfig.codeCoverageEnabled);
this.addToProcessEnvVars(envVars, 'buildconfig', this.dtaTestConfig.buildConfig);
this.addToProcessEnvVars(envVars, 'buildplatform', this.dtaTestConfig.buildPlatform);
this.addToProcessEnvVars(envVars, 'testconfigurationmapping', this.dtaTestConfig.testConfigurationMapping);
this.addToProcessEnvVars(envVars, 'testruntitle', this.dtaTestConfig.testRunTitle);
this.addToProcessEnvVars(envVars, 'testselection', this.dtaTestConfig.testSelection);
this.addToProcessEnvVars(envVars, 'tcmtestrun', this.dtaTestConfig.onDemandTestRunId);
this.setEnvironmentVariableToString(envVars, 'testplan', this.dtaTestConfig.testplan);
if (!this.isNullOrUndefined(this.dtaTestConfig.testSuites)) {
this.addToProcessEnvVars(envVars, 'testsuites', this.dtaTestConfig.testSuites.join(','));
=======
utils.Helper.addToProcessEnvVars(envVars, 'testcasefilter', this.dtaTestConfig.testcaseFilter);
utils.Helper.addToProcessEnvVars(envVars, 'runsettings', this.dtaTestConfig.runSettingsFile);
utils.Helper.addToProcessEnvVars(envVars, 'testdroplocation', this.dtaTestConfig.testDropLocation);
utils.Helper.addToProcessEnvVars(envVars, 'testrunparams', this.dtaTestConfig.overrideTestrunParameters);
utils.Helper.setEnvironmentVariableToString(envVars, 'codecoverageenabled', this.dtaTestConfig.codeCoverageEnabled);
utils.Helper.addToProcessEnvVars(envVars, 'buildconfig', this.dtaTestConfig.buildConfig);
utils.Helper.addToProcessEnvVars(envVars, 'buildplatform', this.dtaTestConfig.buildPlatform);
utils.Helper.addToProcessEnvVars(envVars, 'testconfigurationmapping', this.dtaTestConfig.testConfigurationMapping);
utils.Helper.addToProcessEnvVars(envVars, 'testruntitle', this.dtaTestConfig.testRunTitle);
utils.Helper.addToProcessEnvVars(envVars, 'testselection', this.dtaTestConfig.testSelection);
utils.Helper.addToProcessEnvVars(envVars, 'tcmtestrun', this.dtaTestConfig.onDemandTestRunId);
utils.Helper.setEnvironmentVariableToString(envVars, 'testplan', this.dtaTestConfig.testplan);
if (!utils.Helper.isNullOrUndefined(this.dtaTestConfig.testSuites)) {
utils.Helper.addToProcessEnvVars(envVars, 'testsuites', this.dtaTestConfig.testSuites.join(','));
>>>>>>>
//Modify settings file to enable configurations and data collectors.
var settingsFile = this.dtaTestConfig.settingsFile;
try {
settingsFile = await settingsHelper.updateSettingsFileAsRequired(this.dtaTestConfig.settingsFile, this.dtaTestConfig.runInParallel, this.dtaTestConfig.tiaConfig, false);
} catch (error) {
tl.warning(tl.loc('ErrorWhileUpdatingSettings'));
tl.debug(error);
}
utils.Helper.addToProcessEnvVars(envVars, 'testcasefilter', this.dtaTestConfig.testcaseFilter);
utils.Helper.addToProcessEnvVars(envVars, 'runsettings', settingsFile);
utils.Helper.addToProcessEnvVars(envVars, 'testdroplocation', this.dtaTestConfig.testDropLocation);
utils.Helper.addToProcessEnvVars(envVars, 'testrunparams', this.dtaTestConfig.overrideTestrunParameters);
utils.Helper.setEnvironmentVariableToString(envVars, 'codecoverageenabled', this.dtaTestConfig.codeCoverageEnabled);
utils.Helper.addToProcessEnvVars(envVars, 'buildconfig', this.dtaTestConfig.buildConfig);
utils.Helper.addToProcessEnvVars(envVars, 'buildplatform', this.dtaTestConfig.buildPlatform);
utils.Helper.addToProcessEnvVars(envVars, 'testconfigurationmapping', this.dtaTestConfig.testConfigurationMapping);
utils.Helper.addToProcessEnvVars(envVars, 'testruntitle', this.dtaTestConfig.testRunTitle);
utils.Helper.addToProcessEnvVars(envVars, 'testselection', this.dtaTestConfig.testSelection);
utils.Helper.addToProcessEnvVars(envVars, 'tcmtestrun', this.dtaTestConfig.onDemandTestRunId);
utils.Helper.setEnvironmentVariableToString(envVars, 'testplan', this.dtaTestConfig.testplan);
if (!utils.Helper.isNullOrUndefined(this.dtaTestConfig.testSuites)) {
utils.Helper.addToProcessEnvVars(envVars, 'testsuites', this.dtaTestConfig.testSuites.join(','));
<<<<<<<
private addToProcessEnvVars(envVars: { [key: string]: string; }, name: string, value: string) {
if (!this.isNullEmptyOrUndefined(value)) {
envVars[name] = value;
}
}
private setEnvironmentVariableToString(envVars: { [key: string]: string; }, name: string, value: any) {
if (!this.isNullEmptyOrUndefined(value)) {
envVars[name] = value.toString();
}
}
private isNullEmptyOrUndefined(obj) {
return obj === null || obj === '' || obj === undefined;
}
private isNullOrUndefined(obj) {
return obj === null || obj === '' || obj === undefined;
}
private getDtaInstanceId(): number {
const taskInstanceIdString = tl.getVariable('DTA_INSTANCE_ID');
let taskInstanceId: number = 1;
if (taskInstanceIdString) {
const instanceId: number = Number(taskInstanceIdString);
if (!isNaN(instanceId)) {
taskInstanceId = instanceId + 1;
}
}
tl.setVariable('DTA_INSTANCE_ID', taskInstanceId.toString());
return taskInstanceId;
}
private async cleanUp(temporarySettingsFile: string) {
//cleanup the runsettings file
if (temporarySettingsFile && this.dtaTestConfig.settingsFile != temporarySettingsFile) {
try {
tl.rmRF(temporarySettingsFile, true);
} catch (error) {
//Ignore.
}
}
}
private dtaHostLogFilePath: string;
=======
>>>>>>>
private async cleanUp(temporarySettingsFile: string) {
//cleanup the runsettings file
if (temporarySettingsFile && this.dtaTestConfig.settingsFile != temporarySettingsFile) {
try {
tl.rmRF(temporarySettingsFile, true);
} catch (error) {
//Ignore.
}
} |
<<<<<<<
import kubectlutility = require("utility-common/kubectlutility");
import path = require('path');
import tl = require('vsts-task-lib/task');
import yaml = require('js-yaml');
import { IExecSyncResult } from 'vsts-task-lib/toolrunner';
=======
import * as utils from "./../utilities";
import { IExecSyncResult } from 'vsts-task-lib/toolrunner';
>>>>>>>
import kubectlutility = require("utility-common/kubectlutility");
import path = require('path');
import tl = require('vsts-task-lib/task');
import yaml = require('js-yaml');
import * as utils from "./../utilities";
import { IExecSyncResult } from 'vsts-task-lib/toolrunner';
<<<<<<<
var deploymentStrategy = tl.getInput(TASK_INPUT_DEPLOYMENT_STRATEGY);
let result;
if (deploymentStrategy && deploymentStrategy.toUpperCase() === CANARY_DEPLOYMENT_STRATEGY){
var canaryDeploymentOutput = canaryDeployment(files, kubectl);
result = canaryDeploymentOutput.result;
files = canaryDeploymentOutput.newFilePaths;
}else {
result = kubectl.apply(files);
}
KubernetesObjectUtility.checkForErrors([result]);
=======
let result = kubectl.apply(files);
utils.checkForErrors([result]);
let rolloutStatusResults = [];
>>>>>>>
var deploymentStrategy = tl.getInput(TASK_INPUT_DEPLOYMENT_STRATEGY);
let result;
if (deploymentStrategy && deploymentStrategy.toUpperCase() === CANARY_DEPLOYMENT_STRATEGY){
var canaryDeploymentOutput = canaryDeployment(files, kubectl);
result = canaryDeploymentOutput.result;
files = canaryDeploymentOutput.newFilePaths;
}else {
result = kubectl.apply(files);
}
utils.checkForErrors([result]);
let rolloutStatusResults = [];
<<<<<<<
KubernetesObjectUtility.checkForErrors(rolloutStatusResults);
=======
utils.checkForErrors(rolloutStatusResults);
>>>>>>>
utils.checkForErrors(rolloutStatusResults);
<<<<<<<
if (resource.type.toUpperCase() != KubernetesObjectUtility.KubernetesWorkload.Pod.toUpperCase()){
annotateChildPods(kubectl, resource.type, resource.name, allPods)
=======
if (resource.type.indexOf("pods") == -1)
utils.annotateChildPods(kubectl, resource.type, resource.name, allPods)
>>>>>>>
if (resource.type.toUpperCase() != KubernetesObjectUtility.KubernetesWorkload.Pod.toUpperCase()){
annotateChildPods(kubectl, resource.type, resource.name, allPods)
<<<<<<<
KubernetesObjectUtility.checkForErrors(annotateResults, true);
}
function canaryDeployment(filePaths: string[], kubectl: Kubectl) {
var newObjectsList = [];
var percentage = parseInt(tl.getInput(TASK_INPUT_CANARY_PERCENTAGE));
filePaths.forEach((filePath: string) => {
var fileContents = fs.readFileSync(filePath);
yaml.safeLoadAll(fileContents, function (inputObject) {
var name = inputObject.metadata.name;
var kind = inputObject.kind;
if (canaryDeploymentHelper.isDeploymentEntity(kind)){
var existing_canary_object = canaryDeploymentHelper.fetchCanaryResource(kubectl, kind, name);
if (!!existing_canary_object){
throw new Error("Canary deployment already exists. Rejecting this deployment");
}
var canaryReplicaCount = canaryDeploymentHelper.calculateReplicaCountForCanary(inputObject, percentage);
// Get stable object
var stable_object = canaryDeploymentHelper.fetchResource(kubectl, kind, name);
if (!stable_object ){
// If stable object not found, create canary deployment.
var newCanaryObject = canaryDeploymentHelper.getNewCanaryResource(inputObject, canaryReplicaCount);
newObjectsList.push(newCanaryObject);
} else {
// If canary object not found, create canary and baseline object.
var newCanaryObject = canaryDeploymentHelper.getNewCanaryResource(inputObject, canaryReplicaCount);
var newBaselineObject = canaryDeploymentHelper.getNewBaselineResource(stable_object, canaryReplicaCount);
newObjectsList.push(newCanaryObject);
newObjectsList.push(newBaselineObject);
}
} else {
// Updating non deployment entity as it is.
newObjectsList.push(inputObject);
}});
});
return canaryDeploymentHelper.applyResource(kubectl, newObjectsList);;
=======
utils.checkForErrors(annotateResults, true);
>>>>>>>
utils.checkForErrors(annotateResults, true);
}
function canaryDeployment(filePaths: string[], kubectl: Kubectl) {
var newObjectsList = [];
var percentage = parseInt(tl.getInput(TASK_INPUT_CANARY_PERCENTAGE));
filePaths.forEach((filePath: string) => {
var fileContents = fs.readFileSync(filePath);
yaml.safeLoadAll(fileContents, function (inputObject) {
var name = inputObject.metadata.name;
var kind = inputObject.kind;
if (canaryDeploymentHelper.isDeploymentEntity(kind)){
var existing_canary_object = canaryDeploymentHelper.fetchCanaryResource(kubectl, kind, name);
if (!!existing_canary_object){
throw new Error("Canary deployment already exists. Rejecting this deployment");
}
var canaryReplicaCount = canaryDeploymentHelper.calculateReplicaCountForCanary(inputObject, percentage);
// Get stable object
var stable_object = canaryDeploymentHelper.fetchResource(kubectl, kind, name);
if (!stable_object ){
// If stable object not found, create canary deployment.
var newCanaryObject = canaryDeploymentHelper.getNewCanaryResource(inputObject, canaryReplicaCount);
newObjectsList.push(newCanaryObject);
} else {
// If canary object not found, create canary and baseline object.
var newCanaryObject = canaryDeploymentHelper.getNewCanaryResource(inputObject, canaryReplicaCount);
var newBaselineObject = canaryDeploymentHelper.getNewBaselineResource(stable_object, canaryReplicaCount);
newObjectsList.push(newCanaryObject);
newObjectsList.push(newBaselineObject);
}
} else {
// Updating non deployment entity as it is.
newObjectsList.push(inputObject);
}});
});
return canaryDeploymentHelper.applyResource(kubectl, newObjectsList);;
<<<<<<<
function annotateChildPods(kubectl: Kubectl, resourceType, resourceName, allPods): IExecSyncResult[] {
let commandExecutionResults = [];
var owner = resourceName;
if (resourceType.indexOf("deployment") > -1) {
owner = kubectl.getNewReplicaSet(resourceName);
}
if (!!allPods && !!allPods["items"] && allPods["items"].length > 0) {
allPods["items"].forEach((pod) => {
let owners = pod["metadata"]["ownerReferences"];
if (!!owners) {
owners.forEach(ownerRef => {
if (ownerRef["name"] == owner) {
commandExecutionResults.push(kubectl.annotate("pod", pod["metadata"]["name"], annotationsToAdd(), true));
}
});
}
});
}
return commandExecutionResults;
}
async function getKubectl(): Promise<string> {
try {
return Promise.resolve(tl.which("kubectl", true));
} catch (ex) {
return kubectlutility.downloadKubectl(await kubectlutility.getStableKubectlVersion());
}
}
function annotationsToAdd(): string[] {
return [
`azure-pipelines/execution=${tl.getVariable("Build.BuildNumber")}`,
`azure-pipelines/pipeline="${tl.getVariable("Build.DefinitionName")}"`,
`azure-pipelines/executionuri=${tl.getVariable("System.TeamFoundationCollectionUri")}_build/results?buildId=${tl.getVariable("Build.BuildId")}`,
`azure-pipelines/project=${tl.getVariable("System.TeamProject")}`,
`azure-pipelines/org=${tl.getVariable("System.CollectionId")}`
];
}
var recognizedWorkloadTypes: string[] = ["deployment", "replicaset", "daemonset", "pod", "statefulset"];
var recognizedWorkloadTypesWithRolloutStatus: string[] = ["deployment", "daemonset", "statefulset"];
=======
var recognizedWorkloadTypes = ["deployment", "replicaset", "daemonset", "pod", "statefulset"];
>>>>>>>
var recognizedWorkloadTypes: string[] = ["deployment", "replicaset", "daemonset", "pod", "statefulset"];
var recognizedWorkloadTypesWithRolloutStatus: string[] = ["deployment", "daemonset", "statefulset"]; |
<<<<<<<
import './elements/svg/svg.test.js';
=======
import './elements/svg/rectangle.test.js';
>>>>>>>
import './elements/svg/svg.test.js';
import './elements/svg/rectangle.test.js'; |
<<<<<<<
gb.arg(inputTasks);
gb = sqGradle.applyEnabledSonarQubeArguments(gb);
=======
gb.arg(tl.getDelimitedInput('tasks', ' ', true));
>>>>>>>
gb.arg(inputTasks);
gb = sqGradle.applyEnabledSonarQubeArguments(gb);
gb.arg(tl.getDelimitedInput('tasks', ' ', true)); |
<<<<<<<
var result = "";
=======
var telemetry = {
registryType: registryType,
command: action !== "Run a Docker command" ? action : tl.getInput("customCommand", true)
};
console.log("##vso[telemetry.publish area=%s;feature=%s]%s",
"TaskEndpointId",
"DockerV0",
JSON.stringify(telemetry));
>>>>>>>
var result = "";
var telemetry = {
registryType: registryType,
command: action !== "Run a Docker command" ? action : tl.getInput("customCommand", true)
};
console.log("##vso[telemetry.publish area=%s;feature=%s]%s",
"TaskEndpointId",
"DockerV0",
JSON.stringify(telemetry)); |
<<<<<<<
import codeAnalysis = require('./CodeAnalysis/mavencodeanalysis');
=======
>>>>>>>
<<<<<<<
var isSonarQubeEnabled:boolean = false;
var summaryFile: string = null;
var reportDirectory: string = null;
var reportPOMFile: string = null;
var execFileJacoco: string = null;
var ccReportTask: string = null;
=======
let buildOutput: BuildOutput = new BuildOutput(tl.getVariable('build.sourcesDirectory'), BuildEngine.Maven);
var codeAnalysisOrchestrator:CodeAnalysisOrchestrator = new CodeAnalysisOrchestrator(
[new CheckstyleTool(buildOutput, 'checkstyleAnalysisEnabled'),
new PmdTool(buildOutput, 'pmdAnalysisEnabled')]);
>>>>>>>
var isSonarQubeEnabled:boolean = false;
var summaryFile: string = null;
var reportDirectory: string = null;
var reportPOMFile: string = null;
var execFileJacoco: string = null;
var ccReportTask: string = null;
let buildOutput: BuildOutput = new BuildOutput(tl.getVariable('build.sourcesDirectory'), BuildEngine.Maven);
var codeAnalysisOrchestrator:CodeAnalysisOrchestrator = new CodeAnalysisOrchestrator(
[new CheckstyleTool(buildOutput, 'checkstyleAnalysisEnabled'),
new PmdTool(buildOutput, 'pmdAnalysisEnabled')]);
<<<<<<<
// 2. Apply any goals for static code analysis tools selected by the user.
mvnRun = sqMaven.applySonarQubeArgs(mvnRun, execFileJacoco);
mvnRun = codeAnalysis.applyEnabledCodeAnalysisGoals(mvnRun);
=======
// 2. Apply any goals for static code analysis tools selected by the user.
mvnRun = sqMaven.applySonarQubeArgs(mvnRun, execFileJacoco);
mvnRun = codeAnalysisOrchestrator.configureBuild(mvnRun);
>>>>>>>
// 2. Apply any goals for static code analysis tools selected by the user.
mvnRun = sqMaven.applySonarQubeArgs(mvnRun, execFileJacoco);
mvnRun = codeAnalysisOrchestrator.configureBuild(mvnRun);
<<<<<<<
// Otherwise, start uploading relevant build summaries.
return sqMaven.processSonarQubeIntegration()
.then(() => {
return codeAnalysis.uploadCodeAnalysisBuildSummaryIfEnabled();
});
})
.fail(function (err) {
console.error(err.message);
// Looks like: "Code analysis failed."
console.error(tl.loc('codeAnalysis_ToolFailed', 'Code'));
codeAnalysisFailed = true;
})
.then(function () {
// 5. Always publish test results even if tests fail, causing this task to fail.
if (publishJUnitResults == 'true') {
publishJUnitTestResults(testResultsFiles);
}
publishCodeCoverage(isCodeCoverageOpted);
=======
// Otherwise, start uploading relevant build summaries.
tl.debug('Processing code analysis results');
return sqMaven.processSonarQubeIntegration()
.then(() => {
return codeAnalysisOrchestrator.publishCodeAnalysisResults();
});
})
.fail(function (err) {
console.error(err.message);
// Looks like: "Code analysis failed."
console.error(tl.loc('codeAnalysis_ToolFailed', 'Code'));
codeAnalysisFailed = true;
})
.then(function () {
// 5. Always publish test results even if tests fail, causing this task to fail.
if (publishJUnitResults == 'true') {
publishJUnitTestResults(testResultsFiles);
}
publishCodeCoverage(isCodeCoverageOpted);
>>>>>>>
// Otherwise, start uploading relevant build summaries.
tl.debug('Processing code analysis results');
return sqMaven.processSonarQubeIntegration()
.then(() => {
return codeAnalysisOrchestrator.publishCodeAnalysisResults();
});
})
.fail(function (err) {
console.error(err.message);
// Looks like: "Code analysis failed."
console.error(tl.loc('codeAnalysis_ToolFailed', 'Code'));
codeAnalysisFailed = true;
})
.then(function () {
// 5. Always publish test results even if tests fail, causing this task to fail.
if (publishJUnitResults == 'true') {
publishJUnitTestResults(testResultsFiles);
}
publishCodeCoverage(isCodeCoverageOpted); |
<<<<<<<
import {IDerivation, IDerivationState, trackDerivedFunction, clearObserving, shouldCompute, CaughtException} from "./derivation";
import {IObservable} from "./observable";
=======
import {IDerivation, IDerivationState, trackDerivedFunction, clearObserving, shouldCompute} from "./derivation";
import {IObservable, startBatch, endBatch} from "./observable";
>>>>>>>
import {IDerivation, IDerivationState, trackDerivedFunction, clearObserving, shouldCompute, CaughtException} from "./derivation";
import {IObservable, startBatch, endBatch} from "./observable"; |
<<<<<<<
addHiddenFinalProp
=======
addHiddenFinalProp,
addHiddenProp,
invariant,
deprecated
>>>>>>>
addHiddenFinalProp
<<<<<<<
export interface IObservableArray<T> extends Array<T> {
=======
// Detects bug in safari 9.1.1 (or iOS 9 safari mobile). See #364
const safariPrototypeSetterInheritanceBug = (() => {
let v = false
const p = {}
Object.defineProperty(p, "0", {
set: () => {
v = true
}
})
Object.create(p)["0"] = 1
return v === false
})()
export interface IObservableArray<T = any> extends Array<T> {
>>>>>>>
export interface IObservableArray<T = any> extends Array<T> {
<<<<<<<
},
=======
}
move(fromIndex: number, toIndex: number): void {
deprecated("observableArray.move is deprecated, use .slice() & .replace() instead")
function checkIndex(index: number) {
if (index < 0) {
throw new Error(`[mobx.array] Index out of bounds: ${index} is negative`)
}
const length = this.$mobx.values.length
if (index >= length) {
throw new Error(
`[mobx.array] Index out of bounds: ${index} is not smaller than ${length}`
)
}
}
checkIndex.call(this, fromIndex)
checkIndex.call(this, toIndex)
if (fromIndex === toIndex) {
return
}
const oldItems = this.$mobx.values
let newItems: T[]
if (fromIndex < toIndex) {
newItems = [
...oldItems.slice(0, fromIndex),
...oldItems.slice(fromIndex + 1, toIndex + 1),
oldItems[fromIndex],
...oldItems.slice(toIndex + 1)
]
} else {
// toIndex < fromIndex
newItems = [
...oldItems.slice(0, toIndex),
oldItems[fromIndex],
...oldItems.slice(toIndex, fromIndex),
...oldItems.slice(fromIndex + 1)
]
}
this.replace(newItems)
}
>>>>>>>
},
<<<<<<<
=======
declareIterator(ObservableArray.prototype, function() {
;(this.$mobx as ObservableArrayAdministration<any>).atom.reportObserved()
const self = this
let nextIndex = 0
return makeIterable({
next() {
return nextIndex < self.length
? { value: self[nextIndex++], done: false }
: { done: true, value: undefined }
}
})
})
Object.defineProperty(ObservableArray.prototype, "length", {
enumerable: false,
configurable: true,
get: function(): number {
return this.$mobx.getArrayLength()
},
set: function(newLength: number) {
this.$mobx.setArrayLength(newLength)
}
})
if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
addHiddenProp(
ObservableArray.prototype,
typeof Symbol !== "undefined" ? Symbol.toStringTag : "@@toStringTag" as any,
"Array"
)
}
// Internet Explorer on desktop doesn't support this.....
// So, let's don't do this to avoid different semantics
// See #1395
// addHiddenProp(
// ObservableArray.prototype,
// typeof Symbol !== "undefined" ? Symbol.isConcatSpreadable as any : "@@isConcatSpreadable",
// {
// enumerable: false,
// configurable: true,
// value: true
// }
// )
/**
* Wrap function from prototype
*/
;[
"every",
"filter",
"forEach",
"indexOf",
"join",
"lastIndexOf",
"map",
"reduce",
"reduceRight",
"slice",
"some",
"toString",
"toLocaleString"
].forEach(funcName => {
const baseFunc = Array.prototype[funcName]
invariant(
typeof baseFunc === "function",
`Base function not defined on Array prototype: '${funcName}'`
)
addHiddenProp(ObservableArray.prototype, funcName, function() {
return baseFunc.apply(this.peek(), arguments)
})
})
/**
* We don't want those to show up in `for (const key in ar)` ...
*/
makeNonEnumerable(ObservableArray.prototype, [
"constructor",
"intercept",
"observe",
"clear",
"concat",
"get",
"replace",
"toJS",
"toJSON",
"peek",
"find",
"findIndex",
"splice",
"spliceWithArray",
"push",
"pop",
"set",
"shift",
"unshift",
"reverse",
"sort",
"remove",
"move",
"toString",
"toLocaleString"
])
// See #364
const ENTRY_0 = createArrayEntryDescriptor(0)
function createArrayEntryDescriptor(index: number) {
return {
enumerable: false,
configurable: false,
get: function() {
return this.get(index)
},
set: function(value) {
this.set(index, value)
}
}
}
function createArrayBufferItem(index: number) {
Object.defineProperty(ObservableArray.prototype, "" + index, createArrayEntryDescriptor(index))
}
export function reserveArrayBuffer(max: number) {
for (let index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max; index++)
createArrayBufferItem(index)
OBSERVABLE_ARRAY_BUFFER_SIZE = max
}
reserveArrayBuffer(1000)
>>>>>>> |
<<<<<<<
private _keys: IObservableArray<string> = <any> new ObservableArray(null, ValueMode.Reference, ".keys()");
=======
private _keys: IObservableArray<string> = <any> new ObservableArray(null, ValueMode.Reference, false, {
name: ".keys()",
object: this
});
>>>>>>>
private _keys: IObservableArray<string> = <any> new ObservableArray(null, ValueMode.Reference, false, ".keys()"); |
<<<<<<<
// TODO: just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54
export class ObservableMap<K, V>
=======
export class ObservableMap<K = any, V = any>
>>>>>>>
// TODO: just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54
export class ObservableMap<K = any, V = any>
<<<<<<<
return makeIterable<V>(
{
next() {
return nextIndex < self._keys.length
? { value: self.get(self._keys[nextIndex++]), done: false }
: { done: true }
}
} as any
)
=======
return makeIterable({
next() {
return nextIndex < self._keys.length
? { value: self.get(self._keys[nextIndex++]), done: false }
: { value: undefined as any, done: true }
}
})
>>>>>>>
return makeIterable<V>(
{
next() {
return nextIndex < self._keys.length
? { value: self.get(self._keys[nextIndex++]), done: false }
: { done: true }
}
} as any
) |
<<<<<<<
import {isComputingView, transaction, runAfterTransaction, IObservable} from './dnode';
import {Lambda, IObservableArray, IObservableValue, IArrayChange, IArraySplice, IObjectChange} from './interfaces';
import {isPlainObject, once, deepEquals} from './utils';
import {DerivedValue, ObservableValue} from './dnode';
=======
import {isComputingView, transaction, untracked} from './dnode';
import {Lambda, IObservableArray, IObservableValue, IContextInfoStruct, IContextInfo, IArrayChange, IArraySplice, IObjectChange} from './interfaces';
import {isPlainObject, once} from './utils';
import {ObservableValue} from './observablevalue';
import {ObservableView, throwingViewSetter} from './observableview';
>>>>>>>
import {isComputingView, transaction, runAfterTransaction, IObservable, untracked} from './dnode';
import {Lambda, IObservableArray, IObservableValue, IArrayChange, IArraySplice, IObjectChange} from './interfaces';
import {isPlainObject, once, deepEquals} from './utils';
import {DerivedValue, ObservableValue} from './dnode';
<<<<<<<
=======
import {DataNode, runAfterTransaction} from './dnode';
import {getDNode} from './extras';
>>>>>>>
<<<<<<<
return !!value.$mobservable || value instanceof ObservableValue || value instanceof DerivedValue;
=======
if (property !== undefined) {
if (value instanceof ObservableMap || value instanceof ObservableArray)
throw new Error("[mobservable.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");
else if (value.$mobservable instanceof ObservableObject) {
const o = <ObservableObject>value.$mobservable;
return o.values && !!o.values[property];
}
return false;
}
return !!value.$mobservable || value instanceof DataNode;
>>>>>>>
if (property !== undefined) {
if (value instanceof ObservableMap || value instanceof ObservableArray)
throw new Error("[mobservable.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");
else if (value.$mobservable instanceof ObservableObject) {
const o = <ObservableObject>value.$mobservable;
return o.values && !!o.values[property];
}
return false;
}
return !!value.$mobservable || value instanceof ObservableValue || value instanceof DerivedValue; |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.