conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
import * as moment from 'jalali-moment';
=======
import * as momentNs from 'moment';
>>>>>>>
import * as momentNs from 'jalali-moment'; |
<<<<<<<
import {Moment} from 'jalali-moment';
=======
import {locale, Moment} from 'moment';
>>>>>>>
import {locale, Moment} from 'jalali-moment'; |
<<<<<<<
it('should check if min date validation is working', () => {
page.minDateValidationPickerInput.clear();
expect(page.minDateValidationMsg.isPresent()).toBe(false);
page.minDateValidationPickerInput.sendKeys('11-04-2017');
page.datePickerInput.sendKeys('10-04-2017');
expect(page.minDateValidationMsg.getText()).toEqual('minDate invalid');
page.minDateValidationPickerInput.clear();
page.minDateValidationPickerInput.sendKeys('10-04-2017');
expect(page.minDateValidationMsg.isPresent()).toBe(false);
});
=======
it('should check if enable/diable is working', () => {
expect(page.datePickerInput.getAttribute('disabled')).toBe(null);
page.pickerDisabledRadio.click();
expect(page.datePickerInput.getAttribute('disabled')).toEqual('true');
page.pickerEnabledRadio.click();
expect(page.datePickerInput.getAttribute('disabled')).toBe(null);
});
>>>>>>>
it('should check if enable/diable is working', () => {
expect(page.datePickerInput.getAttribute('disabled')).toBe(null);
page.pickerDisabledRadio.click();
expect(page.datePickerInput.getAttribute('disabled')).toEqual('true');
page.pickerEnabledRadio.click();
expect(page.datePickerInput.getAttribute('disabled')).toBe(null);
});
it('should check if min date validation is working', () => {
page.minDateValidationPickerInput.clear();
expect(page.minDateValidationMsg.isPresent()).toBe(false);
page.minDateValidationPickerInput.sendKeys('11-04-2017');
page.datePickerInput.sendKeys('10-04-2017');
expect(page.minDateValidationMsg.getText()).toEqual('minDate invalid');
page.minDateValidationPickerInput.clear();
page.minDateValidationPickerInput.sendKeys('10-04-2017');
expect(page.minDateValidationMsg.isPresent()).toBe(false);
}); |
<<<<<<<
import * as moment from 'jalali-moment';
=======
import * as moment from 'moment';
import {Moment} from 'moment';
>>>>>>>
import * as moment from 'jalali-moment';
import {Moment} from 'moment';
<<<<<<<
import {ECalendarSystem} from '../common/types/calendar-type-enum';
=======
import {IDay} from './day.model';
>>>>>>>
import {ECalendarSystem} from '../common/types/calendar-type-enum';
import {IDay} from './day.model'; |
<<<<<<<
import { Location } from "./location.model";
class PhoneNumber {
value: string;
confirmed: boolean;
}
=======
>>>>>>>
import { Location } from "./location.model";
<<<<<<<
yearOfBirth: number;
=======
yearOfBirth: number;
phoneNumberString: string;
phoneNumbers: Array<string>;
>>>>>>>
yearOfBirth: number;
phoneNumberString: string;
phoneNumbers: Array<string>;
<<<<<<<
location: Location;
phoneNumbers: Array<PhoneNumber>;
=======
gpsLocation: {
latitude: number,
longitude: number
}
>>>>>>>
location: Location;
<<<<<<<
this.dataCollectorId = o.id;
=======
this.dataCollectorId = '9bab0577-2d7e-4c6f-a8dc-41491740d4c3';
>>>>>>>
this.dataCollectorId = o.id;
<<<<<<<
this.yearOfBirth = o.age;
=======
this.yearOfBirth = o.yearOfBirth;
this.phoneNumberString = o.phoneNumberString;
this.phoneNumbers = o.phoneNumbers;
>>>>>>>
this.yearOfBirth = o.yearOfBirth;
this.phoneNumberString = o.phoneNumberString;
this.phoneNumbers = o.phoneNumbers;
<<<<<<<
this.location = o.location;
this.phoneNumbers = o.phoneNumbers;
=======
this.gpsLocation = {
longitude: o.longitude,
latitude: o.latitude
}
>>>>>>>
this.location = {
longitude: o.longitude,
latitude: o.latitude
} |
<<<<<<<
import { ProjectService, UtilityService } from './shared/services';
=======
import { Routes, RouterModule } from '@angular/router';
import { CoreModule } from './core/core.module';
>>>>>>>
import { CoreModule } from './core/core.module';
<<<<<<<
providers: [
ProjectService,
UtilityService
],
=======
providers: [],
>>>>>>>
providers: [], |
<<<<<<<
import { EndTraining } from '../Training/EndTraining';
import { BeginTraining } from '../Training/BeginTraining';
=======
import * as L from 'leaflet';
>>>>>>>
import { EndTraining } from '../Training/EndTraining';
import { BeginTraining } from '../Training/BeginTraining';
import * as L from 'leaflet';
<<<<<<<
=======
this.queryCoordinator = new QueryCoordinator();
this.commandCoordinator = new CommandCoordinator();
this.route.params.subscribe(params => {
this.getDataCollector();
});
>>>>>>>
this.queryCoordinator = new QueryCoordinator();
this.commandCoordinator = new CommandCoordinator();
this.route.params.subscribe(params => {
this.getDataCollector();
});
<<<<<<<
this.queryCoordinator = new QueryCoordinator();
this.commandCoordinator = new CommandCoordinator();
this.route.params.subscribe(params => {
this.getDataCollector();
});
=======
>>>>>>>
<<<<<<<
this.initVillage();
this.initTrainingMode();
=======
this.initVillage();
this.renderMap();
>>>>>>>
this.initVillage();
this.renderMap(); |
<<<<<<<
import { PopTokenGenerator } from "../crypto/PopTokenGenerator";
=======
import { StringUtils } from "../utils/StringUtils";
import { RequestThumbprint } from "../network/RequestThumbprint";
import { NetworkResponse } from "../network/NetworkManager";
import { SilentFlowRequest } from "../request/SilentFlowRequest";
import { ClientConfigurationError } from "../error/ClientConfigurationError";
import { ClientAuthError } from "../error/ClientAuthError";
>>>>>>>
import { PopTokenGenerator } from "../crypto/PopTokenGenerator";
import { StringUtils } from "../utils/StringUtils";
import { RequestThumbprint } from "../network/RequestThumbprint";
import { NetworkResponse } from "../network/NetworkManager";
import { SilentFlowRequest } from "../request/SilentFlowRequest";
import { ClientConfigurationError } from "../error/ClientConfigurationError";
import { ClientAuthError } from "../error/ClientAuthError";
<<<<<<<
const requestBody = await this.createTokenRequestBody(request);
=======
const requestBody = this.createTokenRequestBody(request);
>>>>>>>
const requestBody = await this.createTokenRequestBody(request);
<<<<<<<
if (request.authenticationScheme === AuthenticationScheme.POP) {
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);
parameterBuilder.addPopToken(await popTokenGenerator.generateCnf(request.resourceRequestMethod, request.resourceRequestUri));
}
=======
if (!StringUtils.isEmpty(request.claims) || this.config.authOptions.clientCapabilities && this.config.authOptions.clientCapabilities.length > 0) {
parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
}
>>>>>>>
if (request.authenticationScheme === AuthenticationScheme.POP) {
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);
parameterBuilder.addPopToken(await popTokenGenerator.generateCnf(request.resourceRequestMethod, request.resourceRequestUri));
}
if (!StringUtils.isEmpty(request.claims) || this.config.authOptions.clientCapabilities && this.config.authOptions.clientCapabilities.length > 0) {
parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
} |
<<<<<<<
toBenchmark: true,
timeout: 30000,
=======
>>>>>>>
timeout: 30000,
<<<<<<<
toBenchmark?: boolean
timeout?: number
=======
>>>>>>>
timeout?: number |
<<<<<<<
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
=======
setCoordinates({ start: e.startCoordinates, end: e.endCoordinates })
setKeyboardHeight(e.endCoordinates.height)
>>>>>>>
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
setKeyboardHeight(e.endCoordinates.height)
<<<<<<<
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
=======
setCoordinates({ start: e.startCoordinates, end: e.endCoordinates })
setKeyboardHeight(0)
>>>>>>>
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
setKeyboardHeight(0) |
<<<<<<<
import SearchBarIOS from './SearchBarIOS';
=======
import TabBarIOS from './TabBarIOS';
import TabBarItemIOS from './TabBarItemIOS';
>>>>>>>
import SearchBarIOS from './SearchBarIOS';
import TabBarIOS from './TabBarIOS';
import TabBarItemIOS from './TabBarItemIOS';
<<<<<<<
export { addNavigateHandlers, Scene, LeftBarIOS, RightBarIOS, BarButtonIOS, SearchBarIOS, SharedElementAndroid };
=======
export { NavigationStack, Scene, LeftBarIOS, RightBarIOS, BarButtonIOS, TabBarIOS, TabBarItemIOS, SharedElementAndroid };
>>>>>>>
export { NavigationStack, Scene, LeftBarIOS, RightBarIOS, BarButtonIOS, SearchBarIOS, TabBarIOS, TabBarItemIOS, SharedElementAndroid }; |
<<<<<<<
import 'babel-polyfill'
jest.mock('../lib/sitemap-item')
describe.skip('sitemap', () => {
let sm
=======
import 'babel-polyfill';
import {
Sitemap,
createSitemap,
EnumChangefreq,
EnumYesNo,
ISitemapItemOptionsLoose,
} from '../index';
import * as testUtil from './util';
jest.mock('../lib/sitemap-item');
describe('sitemap', () => {
let sm;
>>>>>>>
import 'babel-polyfill';
jest.mock('../lib/sitemap-item');
describe.skip('sitemap', () => {
let sm;
<<<<<<<
=======
describe('normalizeURL', () => {
it('turns strings into full urls', () => {
expect(Sitemap.normalizeURL('http://example.com')).toHaveProperty(
'url',
'http://example.com/'
);
});
it('prepends paths with the provided hostname', () => {
expect(Sitemap.normalizeURL('/', 'http://example.com')).toHaveProperty(
'url',
'http://example.com/'
);
});
it('turns img prop provided as string into array of object', () => {
const url = {
url: 'http://example.com',
img: 'http://example.com/img',
};
expect(Sitemap.normalizeURL(url).img[0]).toHaveProperty(
'url',
'http://example.com/img'
);
});
it('turns img prop provided as object into array of object', () => {
const url = {
url: 'http://example.com',
img: { url: 'http://example.com/img', title: 'some thing' },
};
expect(Sitemap.normalizeURL(url).img[0]).toHaveProperty(
'url',
'http://example.com/img'
);
expect(Sitemap.normalizeURL(url).img[0]).toHaveProperty(
'title',
'some thing'
);
});
it('turns img prop provided as array of strings into array of object', () => {
const url = {
url: 'http://example.com',
img: ['http://example.com/img', '/img2'],
};
expect(
Sitemap.normalizeURL(url, 'http://example.com/').img[0]
).toHaveProperty('url', 'http://example.com/img');
expect(
Sitemap.normalizeURL(url, 'http://example.com/').img[1]
).toHaveProperty('url', 'http://example.com/img2');
});
it('handles a valid img prop without transformation', () => {
const url = {
url: 'http://example.com',
img: [
{
url: 'http://test.com/img2.jpg',
caption: 'Another image',
title: 'The Title of Image Two',
geoLocation: 'London, United Kingdom',
license: 'https://creativecommons.org/licenses/by/4.0/',
},
],
};
const normal = Sitemap.normalizeURL(url, 'http://example.com/').img[0];
expect(normal).toHaveProperty('url', 'http://test.com/img2.jpg');
expect(normal).toHaveProperty('caption', 'Another image');
expect(normal).toHaveProperty('title', 'The Title of Image Two');
expect(normal).toHaveProperty('geoLocation', 'London, United Kingdom');
expect(normal).toHaveProperty(
'license',
'https://creativecommons.org/licenses/by/4.0/'
);
});
it('ensures img is always an array', () => {
const url = {
url: 'http://example.com',
};
expect(Array.isArray(Sitemap.normalizeURL(url).img)).toBeTruthy();
});
it('ensures links is always an array', () => {
expect(
Array.isArray(Sitemap.normalizeURL('http://example.com').links)
).toBeTruthy();
});
it('prepends provided hostname to links', () => {
const url = {
url: 'http://example.com',
links: [{ url: '/lang', lang: 'en-us' }],
};
expect(
Sitemap.normalizeURL(url, 'http://example.com').links[0]
).toHaveProperty('url', 'http://example.com/lang');
});
describe('video', () => {
it('is ensured to be an array', () => {
expect(
Array.isArray(Sitemap.normalizeURL('http://example.com').video)
).toBeTruthy();
const url = {
url: 'http://example.com',
video: { thumbnail_loc: 'foo', title: '', description: '' },
};
expect(Sitemap.normalizeURL(url).video[0]).toHaveProperty(
'thumbnail_loc',
'foo'
);
});
it('turns boolean-like props into yes/no', () => {
const url = {
url: 'http://example.com',
video: [
{
thumbnail_loc: 'foo',
title: '',
description: '',
family_friendly: false,
live: false,
requires_subscription: false,
},
{
thumbnail_loc: 'foo',
title: '',
description: '',
family_friendly: true,
live: true,
requires_subscription: true,
},
{
thumbnail_loc: 'foo',
title: '',
description: '',
family_friendly: EnumYesNo.yes,
live: EnumYesNo.yes,
requires_subscription: EnumYesNo.yes,
},
{
thumbnail_loc: 'foo',
title: '',
description: '',
family_friendly: EnumYesNo.no,
live: EnumYesNo.no,
requires_subscription: EnumYesNo.no,
},
],
};
const smv = Sitemap.normalizeURL(url).video;
expect(smv[0]).toHaveProperty('family_friendly', 'no');
expect(smv[0]).toHaveProperty('live', 'no');
expect(smv[0]).toHaveProperty('requires_subscription', 'no');
expect(smv[1]).toHaveProperty('family_friendly', 'yes');
expect(smv[1]).toHaveProperty('live', 'yes');
expect(smv[1]).toHaveProperty('requires_subscription', 'yes');
expect(smv[2]).toHaveProperty('family_friendly', 'yes');
expect(smv[2]).toHaveProperty('live', 'yes');
expect(smv[2]).toHaveProperty('requires_subscription', 'yes');
expect(smv[3]).toHaveProperty('family_friendly', 'no');
expect(smv[3]).toHaveProperty('live', 'no');
expect(smv[3]).toHaveProperty('requires_subscription', 'no');
});
it('ensures tag is always an array', () => {
let url: ISitemapItemOptionsLoose = {
url: 'http://example.com',
video: { thumbnail_loc: 'foo', title: '', description: '' },
};
expect(Sitemap.normalizeURL(url).video[0]).toHaveProperty('tag', []);
url = {
url: 'http://example.com',
video: [
{
thumbnail_loc: 'foo',
title: '',
description: '',
tag: 'fizz',
},
{
thumbnail_loc: 'foo',
title: '',
description: '',
tag: ['bazz'],
},
],
};
expect(Sitemap.normalizeURL(url).video[0]).toHaveProperty('tag', [
'fizz',
]);
expect(Sitemap.normalizeURL(url).video[1]).toHaveProperty('tag', [
'bazz',
]);
});
it('ensures rating is always a number', () => {
const url = {
url: 'http://example.com',
video: [
{
thumbnail_loc: 'foo',
title: '',
description: '',
rating: '5',
},
{
thumbnail_loc: 'foo',
title: '',
description: '',
rating: 4,
},
],
};
expect(Sitemap.normalizeURL(url).video[0]).toHaveProperty('rating', 5);
expect(Sitemap.normalizeURL(url).video[1]).toHaveProperty('rating', 4);
});
});
describe('lastmod', () => {
it('treats legacy ISO option like lastmod', () => {
expect(
Sitemap.normalizeURL({
url: 'http://example.com',
lastmodISO: '2019-01-01',
})
).toHaveProperty('lastmod', '2019-01-01T00:00:00.000Z');
});
it('turns all last mod strings into ISO timestamps', () => {
expect(
Sitemap.normalizeURL({
url: 'http://example.com',
lastmod: '2019-01-01',
})
).toHaveProperty('lastmod', '2019-01-01T00:00:00.000Z');
expect(
Sitemap.normalizeURL({
url: 'http://example.com',
lastmod: '2019-01-01T00:00:00.000Z',
})
).toHaveProperty('lastmod', '2019-01-01T00:00:00.000Z');
});
it('supports reading off file mtime', () => {
const { cacheFile, stat } = testUtil.createCache();
const dt = new Date(stat.mtime);
const lastmod = dt.toISOString();
const smcfg = Sitemap.normalizeURL({
url: 'http://example.com',
lastmodfile: cacheFile,
changefreq: EnumChangefreq.ALWAYS,
priority: 0.9,
});
testUtil.unlinkCache();
expect(smcfg).toHaveProperty('lastmod', lastmod);
});
});
});
>>>>>>> |
<<<<<<<
export interface SitemapNewsItem {
=======
/**
* https://support.google.com/webmasters/answer/74288?hl=en&ref_topic=4581190
*/
export interface NewsItem {
>>>>>>>
/**
* https://support.google.com/webmasters/answer/74288?hl=en&ref_topic=4581190
*/
export interface SitemapNewsItem {
<<<<<<<
interface SitemapVideoItemBase {
=======
interface VideoItemBase {
/**
* A URL pointing to the video thumbnail image file
* @example "https://rtv3-img-roosterteeth.akamaized.net/store/0e841100-289b-4184-ae30-b6a16736960a.jpg/sm/thumb3.jpg"
*/
>>>>>>>
interface SitemapVideoItemBase {
/**
* A URL pointing to the video thumbnail image file
* @example "https://rtv3-img-roosterteeth.akamaized.net/store/0e841100-289b-4184-ae30-b6a16736960a.jpg/sm/thumb3.jpg"
*/
<<<<<<<
export interface SitemapVideoItem extends SitemapVideoItemBase {
=======
/**
* Sitemap video. <https://support.google.com/webmasters/answer/80471?hl=en&ref_topic=4581190>
*/
export interface VideoItem extends VideoItemBase {
/**
* An arbitrary string tag describing the video. Tags are generally very short descriptions of key concepts associated
* with a video or piece of content.
* @example ['Baking']
*/
>>>>>>>
/**
* Sitemap video. <https://support.google.com/webmasters/answer/80471?hl=en&ref_topic=4581190>
*/
export interface SitemapVideoItem extends SitemapVideoItemBase {
/**
* An arbitrary string tag describing the video. Tags are generally very short descriptions of key concepts associated
* with a video or piece of content.
* @example ['Baking']
*/
<<<<<<<
export interface SitemapVideoItemLoose extends SitemapVideoItemBase {
=======
/**
* Sitemap video. <https://support.google.com/webmasters/answer/80471?hl=en&ref_topic=4581190>
*/
export interface VideoItemLoose extends VideoItemBase {
/**
* An arbitrary string tag describing the video. Tags are generally very short descriptions of key concepts associated
* with a video or piece of content.
* @example ['Baking']
*/
>>>>>>>
/**
* Sitemap video. <https://support.google.com/webmasters/answer/80471?hl=en&ref_topic=4581190>
*/
export interface SitemapVideoItemLoose extends SitemapVideoItemBase {
/**
* An arbitrary string tag describing the video. Tags are generally very short descriptions of key concepts associated
* with a video or piece of content.
* @example ['Baking']
*/
<<<<<<<
export interface SitemapLinkItem {
=======
/**
* https://support.google.com/webmasters/answer/189077
*/
export interface LinkItem {
/**
* @example 'en'
*/
>>>>>>>
/**
* https://support.google.com/webmasters/answer/189077
*/
export interface SitemapLinkItem {
/**
* @example 'en'
*/ |
<<<<<<<
=======
this.layers = []
this.layers.push(new Heatmap(this))
this.layers.push(new Cluster(this, () => {
return this.roleMap.cluster.displayName;
}))
this.layers.push(new Circle(this, this.palette))
this.layers.push(new Choropleth(this, this.palette));
mapboxgl.config.API_URL = this.settings.api.apiUrl;
// Override the line string tool with our lasso draw tool
MapboxDraw.modes.draw_line_string = LassoDraw.create(this.filter);
this.draw = new MapboxDraw({
displayControlsDefault: false,
// defaultMode: 'lasso',
controls: {
'polygon': true,
'line_string': true // Lasso is overriding the 'line_string' mode
},
});
this.map.addControl(new mapboxgl.NavigationControl());
this.map.addControl(this.draw, 'top-left');
this.map.addControl(this.autoZoomControl);
>>>>>>>
this.layers = []
this.layers.push(new Heatmap(this))
this.layers.push(new Cluster(this, () => {
return this.roleMap.cluster.displayName;
}))
this.layers.push(new Circle(this, this.palette))
this.layers.push(new Choropleth(this, this.palette));
mapboxgl.config.API_URL = this.settings.api.apiUrl;
<<<<<<<
private manageControlElements() {
if (this.settings.api.mapboxControls) {
if (!this.controlsPopulated) {
this.map.addControl(this.navigationControl);
this.map.addControl(this.draw, 'top-left');
this.map.addControl(this.autoZoomControl);
this.controlsPopulated = true;
}
} else {
if (this.controlsPopulated) {
this.map.removeControl(this.navigationControl);
this.map.removeControl(this.draw);
this.map.removeControl(this.autoZoomControl);
this.controlsPopulated = false;
}
}
}
private visibilityChanged(oldSettings, newSettings) {
return oldSettings && newSettings && (
oldSettings.choropleth.show != newSettings.choropleth.show ||
oldSettings.circle.show != newSettings.circle.show ||
oldSettings.cluster.show != newSettings.cluster.show ||
oldSettings.heatmap.show != newSettings.heatmap.show)
}
private static getTooltipData(value: any): VisualTooltipDataItem[] {
if (!value) {
return []
}
// Flatten the multiple properties or multiple datapoints
return [].concat.apply([], value.map(properties => {
// This mapping is needed to copy the value with the toString
// call as otherwise some caching logic causes to be the same
// tooltip displayed for all datapoints.
return properties.map(prop => {
return {
displayName: prop.key,
value: prop.value.toString(),
}
});
}))
}
=======
>>>>>>>
private manageControlElements() {
if (this.settings.api.mapboxControls) {
if (!this.controlsPopulated) {
this.map.addControl(this.navigationControl);
this.map.addControl(this.draw, 'top-left');
this.map.addControl(this.autoZoomControl);
this.controlsPopulated = true;
}
} else {
if (this.controlsPopulated) {
this.map.removeControl(this.navigationControl);
this.map.removeControl(this.draw);
this.map.removeControl(this.autoZoomControl);
this.controlsPopulated = false;
}
}
} |
<<<<<<<
this.layers.map( layer => {
layer.applySettings(settings, this.roleMap, this.colorMap);
=======
this.layers.map(layer => {
layer.applySettings(settings, this.roleMap);
>>>>>>>
this.layers.map(layer => {
layer.applySettings(settings, this.roleMap, this.colorMap);
<<<<<<<
this.layers.map( layer => {
if (layer.handleZoom(this.settings)) {
layer.applySettings(this.settings, this.roleMap, this.colorMap);
}
=======
this.layers.map(layer => {
layer.handleZoom(this.settings);
layer.applySettings(this.settings, this.roleMap);
>>>>>>>
this.layers.map(layer => {
if (layer.handleZoom(this.settings)) {
layer.applySettings(this.settings, this.roleMap, this.colorMap);
}
<<<<<<<
try {
this.dataPoints = [];
const cat = dataView.categorical.categories[0];
let categories = {};
features.map( feature => {
const value = feature.properties[this.roleMap.color.displayName];
if (!categories[value]) {
categories[value] = true;
}
});
// this.dataPoints = this.fillDataPointsLikeInExample(cat);
this.dataPoints = this.fillDataPointsOwn(categories, cat);
} catch (err) {
console.log("Error: ", err);
}
let datasources : Map<any, boolean> = new Map<any, boolean>()
this.layers.map( layer => {
=======
let datasources: Map<any, boolean> = new Map<any, boolean>()
this.layers.map(layer => {
>>>>>>>
let datasources: Map<any, boolean> = new Map<any, boolean>()
this.layers.map(layer => {
<<<<<<<
// TODO has to do this async as choropleth datasource may not yet be added
// and bounds are not filled
// this.bounds = turf.bbox(turf.helpers.featureCollection(features));
// this.bounds = this.layers.choropleth.getBounds(this.settings, this.bounds);
// if (this.bounds && this.bounds.length > 0 && this.bounds[0] == null) {
// this.bounds = null
// }
=======
>>>>>>>
<<<<<<<
=======
>>>>>>> |
<<<<<<<
applySettings(settings: MapboxSettings, roleMap) {
=======
applySettings(settings:MapboxSettings, roleMap: RoleMap) {
>>>>>>>
applySettings(settings:MapboxSettings, roleMap: RoleMap) {
<<<<<<<
let fillClassCount = mapboxUtils.getClassCount(fillColorLimits);
let choroColorSettings = [choroSettings.minColor, choroSettings.midColor, choroSettings.maxColor];
if (!choroSettings.diverging) {
choroColorSettings = [choroSettings.minColor, choroSettings.maxColor]
}
let isGradient = mapboxUtils.shouldUseGradient(roleMap.color);
let getColorStop = this.getColorStopPicker(isGradient, choroColorSettings, fillColorLimits, fillClassCount)
// We use the old property function syntax here because the data-join technique is faster to parse still than expressions with this method
const defaultColor = 'rgba(0,0,0,0)';
const property = choroSettings.getCurrentVectorProperty()
let colors = { type: "categorical", property, default: defaultColor, stops: [] };
let sizes: any = roleMap.size ? { type: "categorical", property, default: 0, stops: [] } : choroSettings.height * Choropleth.HeightMultiplier
let outlineColors = { type: "categorical", property, default: defaultColor, stops: [] };
let filter = ['in', property];
const choroplethData = this.source.getData(map, settings);
let existingStops = {};
let validStops = true;
for (let row of choroplethData) {
const location = row[roleMap.location.displayName];
let outlineColor: any = getColorStop(row[roleMap.color.displayName]);
let color: any = getColorStop(row[roleMap.color.displayName]);
if (!location || !color || !outlineColor) {
// Stop value cannot be undefined or null; don't add this row to the stops
continue;
}
=======
const choroColorSettings = [choroSettings.minColor, choroSettings.medColor, choroSettings.maxColor];
>>>>>>>
let choroColorSettings = [choroSettings.minColor, choroSettings.midColor, choroSettings.maxColor];
if (!choroSettings.diverging) {
choroColorSettings = [choroSettings.minColor, choroSettings.maxColor]
} |
<<<<<<<
=======
const layerVisibilityChanged = this.visibilityChanged(oldSettings, this.settings);
>>>>>>>
const layerVisibilityChanged = this.visibilityChanged(oldSettings, this.settings);
<<<<<<<
// If the map is loaded and style has not changed in this update
// then we should update right now.
if (this.map.loaded() && !styleChanged) {
onUpdate(this.map, this.getFeatures(), this.settings, false, this.color, this.host);
=======
// If the map style has not changed in this update we should update.
if (!styleChanged) {
onUpdate(this.map, this.getFeatures(), this.settings, dataChanged || layerVisibilityChanged, this.category);
>>>>>>>
// If the map is loaded and style has not changed in this update
// then we should update right now.
if (this.map.loaded() && !styleChanged) {
onUpdate(this.map, this.getFeatures(), this.settings, dataChanged || layerVisibilityChanged, this.color, this.host); |
<<<<<<<
private static ID = 'choropleth';
=======
private static ID = 'choropleth'
private static OutlineID = 'choropleth-outline'
>>>>>>>
private static ID = 'choropleth'
private static OutlineID = 'choropleth-outline'
<<<<<<<
if (existingStops[location]) {
// Duplicate stop found. In case there are many rows, Mapbox generates so many errors on the
// console, that it can make the entire Power BI plugin unresponsive. This is why we validate
// the stops here, and won't let invalid stops to be passed to Mapbox.
validStops = false;
break;
}
existingStops[location] = true;
colors.stops.push([location, color.toString()]);
filter.push(location);
outlineColors.stops.push([location, outlineColor.toString()]);
}
if (validStops) {
map.setPaintProperty(Choropleth.ID, 'fill-color', colors);
map.setPaintProperty(Choropleth.ID, 'fill-outline-color', 'rgba(0,0,0,0.05)');
map.setFilter(Choropleth.ID, filter);
map.setLayerZoomRange(Choropleth.ID, choroSettings.minZoom, choroSettings.maxZoom);
} else {
// Default color should represent error to the user, that's all we have for now
map.setPaintProperty(Choropleth.ID, 'fill-color', defaultColor);
}
=======
colors.stops.push([row[roleMap.location.displayName], color.toString()]);
filter.push(row[roleMap.location.displayName]);
outlineColors.stops.push([row[roleMap.location.displayName], outlineColor.toString()]);
});
map.setPaintProperty(Choropleth.ID, 'fill-color', colors);
map.setPaintProperty(Choropleth.ID, 'fill-outline-color', 'rgba(0,0,0,0.05)');
map.setPaintProperty(Choropleth.ID, 'fill-opacity', settings.choropleth.opacity / 100);
map.setPaintProperty(Choropleth.OutlineID, 'line-color', settings.choropleth.outlineColor);
map.setPaintProperty(Choropleth.OutlineID, 'line-width', settings.choropleth.outlineWidth);
map.setPaintProperty(Choropleth.OutlineID, 'line-opacity', settings.choropleth.outlineOpacity / 100);
map.setFilter(Choropleth.ID, filter);
map.setLayerZoomRange(Choropleth.ID, choroSettings.minZoom, choroSettings.maxZoom);
>>>>>>>
if (existingStops[location]) {
// Duplicate stop found. In case there are many rows, Mapbox generates so many errors on the
// console, that it can make the entire Power BI plugin unresponsive. This is why we validate
// the stops here, and won't let invalid stops to be passed to Mapbox.
validStops = false;
break;
}
existingStops[location] = true;
colors.stops.push([location, color.toString()]);
filter.push(location);
outlineColors.stops.push([location, outlineColor.toString()]);
}
if (validStops) {
map.setPaintProperty(Choropleth.ID, 'fill-color', colors);
map.setFilter(Choropleth.ID, filter);
} else {
// Default color should represent error to the user, that's all we have for now
map.setPaintProperty(Choropleth.ID, 'fill-color', defaultColor);
}
map.setPaintProperty(Choropleth.ID, 'fill-outline-color', 'rgba(0,0,0,0.05)');
map.setPaintProperty(Choropleth.ID, 'fill-opacity', settings.choropleth.opacity / 100);
map.setPaintProperty(Choropleth.OutlineID, 'line-color', settings.choropleth.outlineColor);
map.setPaintProperty(Choropleth.OutlineID, 'line-width', settings.choropleth.outlineWidth);
map.setPaintProperty(Choropleth.OutlineID, 'line-opacity', settings.choropleth.outlineOpacity / 100);
map.setLayerZoomRange(Choropleth.ID, choroSettings.minZoom, choroSettings.maxZoom); |
<<<<<<<
function onUpdate(map, features, settings, zoom, category, updatedHandler: Function) {
try {
if (!map.getSource('data')) {
return;
}
=======
return colors;
}
function onUpdate(map, features, settings, zoom, category, host) {
if (!map.getSource('data')) {
return;
}
if (features.clusterData ) {
let source : any = map.getSource('clusterData');
source.setData( turf.helpers.featureCollection(features.clusterData) );
}
if (features.rawData) {
let source : any = map.getSource('data');
source.setData( turf.helpers.featureCollection(features.rawData) );
}
map.setLayoutProperty('circle', 'visibility', settings.circle.show ? 'visible' : 'none');
map.setLayoutProperty('cluster', 'visibility', settings.cluster.show ? 'visible' : 'none');
map.setLayoutProperty('cluster-label', 'visibility', settings.cluster.show ? 'visible' : 'none');
map.setLayoutProperty('heatmap', 'visibility', settings.heatmap.show ? 'visible' : 'none');
if (map.getLayer('choropleth-layer')) {
map.setLayoutProperty('choropleth-layer', 'visibility', settings.choropleth.display() ? 'visible' : 'none');
}
if (settings.choropleth.display()) {
>>>>>>>
return colors;
}
function onUpdate(map, features, settings, zoom, category, host: IVisualHost, updatedHandler: Function) {
try {
if (!map.getSource('data')) {
return;
}
<<<<<<<
const choroplethLayer = mapboxUtils.decorateLayer({
id: 'choropleth-layer',
type: "fill",
source: 'choropleth-source',
"source-layer": settings.choropleth.sourceLayer
=======
if (limits.min && limits.max) {
let colorStops = chroma.scale([settings.choropleth.minColor,settings.choropleth.maxColor]).domain([limits.min, limits.max]);
let colors = ['match', ['get', settings.choropleth.vectorProperty]];
let outlineColors = ['match', ['get', settings.choropleth.vectorProperty]];
features.choroplethData.map( row => {
const color = colorStops(row.properties.colorValue);
var outlineColor : any = colorStops(row.properties.colorValue)
outlineColor = outlineColor.darken(2);
colors.push(row.properties.location);
colors.push(color.toString());
outlineColors.push(row.properties.location);
outlineColors.push(outlineColor.toString());
>>>>>>>
const choroplethLayer = mapboxUtils.decorateLayer({
id: 'choropleth-layer',
type: "fill",
source: 'choropleth-source',
"source-layer": settings.choropleth.sourceLayer
<<<<<<<
=======
if (settings.heatmap.show) {
map.setLayerZoomRange('heatmap', settings.heatmap.minZoom, settings.heatmap.maxZoom);
map.setPaintProperty('heatmap', 'heatmap-radius', settings.heatmap.radius);
map.setPaintProperty('heatmap', 'heatmap-weight', settings.heatmap.weight);
map.setPaintProperty('heatmap', 'heatmap-intensity', settings.heatmap.intensity);
map.setPaintProperty('heatmap', 'heatmap-opacity', settings.heatmap.opacity / 100);
map.setPaintProperty('heatmap', 'heatmap-color', [ "interpolate", ["linear"], ["heatmap-density"],
0, "rgba(0, 0, 255, 0)",
0.1, "royalblue",
0.3, "cyan",
0.5, "lime",
0.7, "yellow",
1, settings.heatmap.color]);
}
if (zoom) {
zoomToData(map, features)
}
return true;
>>>>>>>
<<<<<<<
private category: any;
private updatedHandler: Function = () => {}
=======
private color: any;
>>>>>>>
private color: any;
private updatedHandler: Function = () => {}
<<<<<<<
onUpdate(this.map, this.getFeatures(), this.settings, false, this.category, this.updatedHandler)
=======
onUpdate(this.map, this.getFeatures(), this.settings, false, this.color, this.host)
>>>>>>>
onUpdate(this.map, this.getFeatures(), this.settings, false, this.color, this.host, this.updatedHandler)
<<<<<<<
onUpdate(this.map, this.getFeatures(), this.settings, true, this.category, this.updatedHandler)
=======
onUpdate(this.map, this.getFeatures(), this.settings, true, this.color, this.host)
>>>>>>>
onUpdate(this.map, this.getFeatures(), this.settings, true, this.color, this.host, this.updatedHandler)
<<<<<<<
setTimeout(() => {
onUpdate(this.map, this.getFeatures(), this.settings, false, this.category, this.updatedHandler)
}, 400)
=======
onUpdate(this.map, this.getFeatures(), this.settings, false, this.color, this.host)
>>>>>>>
setTimeout(() => {
onUpdate(this.map, this.getFeatures(), this.settings, false, this.color, this.host, this.updatedHandler)
}, 400)
<<<<<<<
else if (this.settings.choropleth.show && (!roles.location || !roles.category)) {
setError(this.errorDiv, 'Location, Color fields required for choropleth visualizations.');
=======
else if (this.settings.choropleth.show && (!roles.location || !roles.color)) {
this.errorDiv.innerText = 'Location, Color fields required for choropleth visualizations.'
>>>>>>>
else if (this.settings.choropleth.show && (!roles.location || !roles.color)) {
setError(this.errorDiv, 'Location, Color fields required for choropleth visualizations.');
<<<<<<<
if (this.map.loaded() && !styleChanged) {
onUpdate(this.map, this.getFeatures(), this.settings, false, this.category, this.updatedHandler);
=======
if (!styleChanged) {
onUpdate(this.map, this.getFeatures(), this.settings, dataChanged || layerVisibilityChanged, this.color, this.host);
>>>>>>>
if (!styleChanged) {
onUpdate(this.map, this.getFeatures(), this.settings, dataChanged || layerVisibilityChanged, this.color, this.host, this.updatedHandler); |
<<<<<<<
public apiUrl: string = "https://api.mapbox.com"
=======
public geocoder: boolean = true;
>>>>>>>
public apiUrl: string = "https://api.mapbox.com"
public geocoder: boolean = true; |
<<<<<<<
@Input()
opens: string;
@Input()
drops: string;
=======
@Input()
firstMonthDayClass: string;
@Input()
lastMonthDayClass: string;
@Input()
emptyWeekRowClass: string;
@Input()
firstDayOfNextMonthClass: string;
@Input()
lastDayOfPreviousMonthClass: string;
>>>>>>>
@Input()
opens: string;
@Input()
drops: string;
firstMonthDayClass: string;
@Input()
lastMonthDayClass: string;
@Input()
emptyWeekRowClass: string;
@Input()
firstDayOfNextMonthClass: string;
@Input()
lastDayOfPreviousMonthClass: string; |
<<<<<<<
const onMouseEvent = (e: MouseEvent) => {
for (let key in this.instances) {
const connection: DeviceConnection = this.instances[key];
=======
const supportsPassive = Util.supportsPassive();
const onMouseEvent = (e: MouseEvent | TouchEvent) => {
Object.values(this.instances).forEach((connection: DeviceConnection) => {
>>>>>>>
const supportsPassive = Util.supportsPassive();
const onMouseEvent = (e: MouseEvent | TouchEvent) => {
for (let key in this.instances) {
const connection: DeviceConnection = this.instances[key]; |
<<<<<<<
=======
const bindingDBStack = new BindingDBStack(app, "BindingDbStack", {
database: baseline.Baseline_BindingDB.BindingDBDatabaseInstance,
accessSecurityGroup: baseline.Baseline_BindingDB.DbAccessSg,
databaseSecret: baseline.Baseline_BindingDB.DbSecret,
DataLake: coreDataLake
});
>>>>>>> |
<<<<<<<
case 'persistState':
if (tabId) {
chrome.extension
.getBackgroundPage()
.window.console.log('message received in background');
// if msg tabId provided, send persistState command to content-script
chrome.tabs.sendMessage(Number(tabId), msg);
}
=======
// todo: Create this case for throttle edit, and need to do a post to the window
case 'throttleEdit':
if (tabId) {
chrome.tabs.sendMessage(Number(tabId), msg);
}
// window.postMessage({action: 'throttleChange'}, throttler);
break;
>>>>>>>
case 'persistState':
if (tabId) {
chrome.extension
.getBackgroundPage()
.window.console.log('message received in background');
// if msg tabId provided, send persistState command to content-script
chrome.tabs.sendMessage(Number(tabId), msg);
}
break;
// todo: Create this case for throttle edit, and need to do a post to the window
case 'throttleEdit':
if (tabId) {
chrome.tabs.sendMessage(Number(tabId), msg);
}
// window.postMessage({action: 'throttleChange'}, throttler);
break;
<<<<<<<
// console.log('we here recording');
=======
>>>>>>> |
<<<<<<<
case 'persistState':
window.postMessage(msg, '*');
break;
=======
case 'throttleEdit':
window.postMessage(msg, '*');
break;
>>>>>>>
case 'persistState':
window.postMessage(msg, '*');
break;
case 'throttleEdit':
window.postMessage(msg, '*');
break; |
<<<<<<<
export { Configuration } from "./config/Configuration";
export { InteractionType, BrowserCacheLocation, WrapperSKU } from "./utils/BrowserConstants";
=======
export { Configuration, BrowserAuthOptions, CacheOptions, BrowserSystemOptions } from "./config/Configuration";
export { InteractionType, BrowserCacheLocation } from "./utils/BrowserConstants";
>>>>>>>
export { Configuration, BrowserAuthOptions, CacheOptions, BrowserSystemOptions } from "./config/Configuration";
export { InteractionType, BrowserCacheLocation, WrapperSKU } from "./utils/BrowserConstants"; |
<<<<<<<
import { binding, given, when, then } from "cucumber-tsflow";
import Callback = cucumber.CallbackStepDefinition;
=======
import { binding, given, when, then } from 'cucumber-tsflow';
import { CallbackStepDefinition } from 'cucumber';
>>>>>>>
import { binding, given, when, then } from "cucumber-tsflow";
import { CallbackStepDefinition } from 'cucumber'; |
<<<<<<<
// Simple check for whether our target app uses Recoil
if (window[`$recoilDebugStates`]) {
isRecoil = true;
}
=======
if (
memoizedState &&
(tag === 0 || tag === 1 || tag === 2 || tag === 10) &&
isRecoil === true
) {
if (memoizedState.queue) {
// Hooks states are stored as a linked list using memoizedState.next,
// so we must traverse through the list and get the states.
// We then store them along with the corresponding memoizedState.queue,
// which includes the dispatch() function we use to change their state.
const hooksStates = traverseRecoilHooks(memoizedState);
hooksStates.forEach((state, i) => {
hooksIndex = componentActionsRecord.saveNew(
state.state,
state.component
);
componentData.hooksIndex = hooksIndex;
if (newState && newState.hooksState) {
newState.push(state.state);
} else if (newState) {
newState = [state.state];
} else {
newState.push(state.state);
}
componentFound = true;
});
}
}
>>>>>>>
<<<<<<<
=======
>>>>>>> |
<<<<<<<
let fiberRoot = null;
=======
let isRecoil = false;
>>>>>>>
let fiberRoot = null;
let isRecoil = false;
<<<<<<<
/**
* @method sendSnapshot
* @param snap The current snapshot
* @param mode The current mode (i.e. jumping, time-traveling, locked, or paused)
* @return Nothing.
*
* Middleware: Gets a copy of the current snap.tree and posts a recordSnap message to the window
*/
function sendSnapshot(snap: Snapshot, mode: Mode): void {
// Don't send messages while jumping or while paused
if (mode.jumping || mode.paused) return;
=======
export default (snap: Snapshot, mode: Mode): (() => void) => {
let fiberRoot = null;
function sendSnapshot(): void {
// Don't send messages while jumping or while paused
if (mode.jumping || mode.paused) return;
>>>>>>>
/**
* @method sendSnapshot
* @param snap The current snapshot
* @param mode The current mode (i.e. jumping, time-traveling, locked, or paused)
* @return Nothing.
*
* Middleware: Gets a copy of the current snap.tree and posts a recordSnap message to the window
*/
function sendSnapshot(snap: Snapshot, mode: Mode): void {
// Don't send messages while jumping or while paused
if (mode.jumping || mode.paused) return;
<<<<<<<
return hooksStates;
}
=======
// This runs after every Fiber commit. It creates a new snapshot
function createTree(
currentFiber: Fiber,
tree: Tree = new Tree('root', 'root'),
fromSibling = false
) {
// Base case: child or sibling pointed to null
if (!currentFiber) return null;
if (!tree) return tree;
// These have the newest state. We update state and then
// called updateSnapshotTree()
const {
sibling,
stateNode,
child,
memoizedState,
memoizedProps,
elementType,
tag,
actualDuration,
actualStartTime,
selfBaseDuration,
treeBaseDuration,
} = currentFiber;
if (elementType?.name && isRecoil) {
console.log('Name here', elementType?.name)
// console.log('Here is the state', memoizedState);
let pointer = memoizedState;
while (pointer !== null && pointer !== undefined && pointer.next !== null ){
pointer = pointer.next;
}
// console.log('traverse the memoizedState 1', pointer.memoizedState);
// // 2nd
// console.log('traverse the memoizedState 2', pointer.memoizedState[1]?.[0]);
if (pointer?.memoizedState[1]?.[0].current) {
let atomName = pointer.memoizedState[1]?.[0].current.keys().next().value;
console.log('atom', pointer.memoizedState[1]?.[0].current.keys().next().value);
allAtomsRelationship.push([atomName, elementType?.name, 1])
}
if (pointer?.memoizedState[1]?.[0].key) {
let atomName = pointer.memoizedState[1]?.[0].key;
console.log('atom', pointer.memoizedState[1]?.[0].key);
allAtomsRelationship.push([atomName, elementType?.name, 1])
}
}
let newState: any | { hooksState?: any[] } = {};
let componentData: {
hooksState?: any[];
hooksIndex?: number;
index?: number;
actualDuration?: number;
actualStartTime?: number;
selfBaseDuration?: number;
treeBaseDuration?: number;
} = {};
let componentFound = false;
>>>>>>>
return hooksStates;
}
<<<<<<<
/**
* @method createTree
* @param currentFiber A Fiber object
* @param tree A Tree object, default initialized to an instance given 'root' and 'root'
* @param fromSibling A boolean, default initialized to false
* @return An instance of a Tree object
* This is a recursive function that runs after every Fiber commit using the following logic:
* 1. Traverse from FiberRootNode
* 2. Create an instance of custom Tree class
* 3. Build a new state snapshot
*/
function createTree(
currentFiber: Fiber,
tree: Tree = new Tree('root', 'root'),
fromSibling = false
) {
// Base case: child or sibling pointed to null
if (!currentFiber) return null;
if (!tree) return tree;
// These have the newest state. We update state and then
// called updateSnapshotTree()
const {
sibling,
stateNode,
child,
memoizedState,
memoizedProps,
elementType,
tag,
actualDuration,
actualStartTime,
selfBaseDuration,
treeBaseDuration,
} = currentFiber;
let newState: any | { hooksState?: any[] } = {};
let componentData: {
hooksState?: any[];
hooksIndex?: number;
index?: number;
actualDuration?: number;
actualStartTime?: number;
selfBaseDuration?: number;
treeBaseDuration?: number;
} = {};
let componentFound = false;
// Check if node is a stateful setState component
if (stateNode && stateNode.state && (tag === 0 || tag === 1 || tag === 2)) {
// Save component's state and setState() function to our record for future
// time-travel state changing. Add record index to snapshot so we can retrieve.
componentData.index = componentActionsRecord.saveNew(
stateNode.state,
stateNode
);
newState = stateNode.state;
componentFound = true;
}
=======
let hooksIndex;
>>>>>>>
/**
* @method createTree
* @param currentFiber A Fiber object
* @param tree A Tree object, default initialized to an instance given 'root' and 'root'
* @param fromSibling A boolean, default initialized to false
* @return An instance of a Tree object
* This is a recursive function that runs after every Fiber commit using the following logic:
* 1. Traverse from FiberRootNode
* 2. Create an instance of custom Tree class
* 3. Build a new state snapshot
*/
// This runs after every Fiber commit. It creates a new snapshot
function createTree(
currentFiber: Fiber,
tree: Tree = new Tree('root', 'root'),
fromSibling = false
) {
// Base case: child or sibling pointed to null
if (!currentFiber) return null;
if (!tree) return tree;
// These have the newest state. We update state and then
// called updateSnapshotTree()
const {
sibling,
stateNode,
child,
memoizedState,
memoizedProps,
elementType,
tag,
actualDuration,
actualStartTime,
selfBaseDuration,
treeBaseDuration,
} = currentFiber;
if (elementType?.name && isRecoil) {
console.log('Name here', elementType?.name)
// console.log('Here is the state', memoizedState);
let pointer = memoizedState;
while (pointer !== null && pointer !== undefined && pointer.next !== null) {
pointer = pointer.next;
}
// console.log('traverse the memoizedState 1', pointer.memoizedState);
// // 2nd
// console.log('traverse the memoizedState 2', pointer.memoizedState[1]?.[0]);
if (pointer?.memoizedState[1]?.[0].current) {
const atomName = pointer.memoizedState[1]?.[0].current.keys().next().value;
console.log('atom', pointer.memoizedState[1]?.[0].current.keys().next().value);
allAtomsRelationship.push([atomName, elementType?.name, 1]);
}
if (pointer?.memoizedState[1]?.[0].key) {
const atomName = pointer.memoizedState[1]?.[0].key;
console.log('atom', pointer.memoizedState[1]?.[0].key);
allAtomsRelationship.push([atomName, elementType?.name, 1]);
}
}
let newState: any | { hooksState?: any[] } = {};
let componentData: {
hooksState?: any[];
hooksIndex?: number;
index?: number;
actualDuration?: number;
actualStartTime?: number;
selfBaseDuration?: number;
treeBaseDuration?: number;
} = {};
let componentFound = false;
// Check if node is a stateful setState component
if (stateNode && stateNode.state && (tag === 0 || tag === 1 || tag === 2)) {
// Save component's state and setState() function to our record for future
// time-travel state changing. Add record index to snapshot so we can retrieve.
componentData.index = componentActionsRecord.saveNew(
stateNode.state,
stateNode
);
newState = stateNode.state;
componentFound = true;
}
<<<<<<<
// Recurse on children
if (child && !circularComponentTable.has(child)) {
// If this node had state we appended to the children array,
// so attach children to the newly appended child.
// Otherwise, attach children to this same node.
circularComponentTable.add(child);
createTree(child, newNode);
}
// Recurse on siblings
if (sibling && !circularComponentTable.has(sibling)) {
circularComponentTable.add(sibling);
createTree(sibling, newNode, true);
=======
function updateSnapShotTree(): void {
if (fiberRoot) {
const { current } = fiberRoot;
circularComponentTable.clear();
snap.tree = createTree(current);
}
sendSnapshot();
>>>>>>>
// Recurse on children
if (child && !circularComponentTable.has(child)) {
// If this node had state we appended to the children array,
// so attach children to the newly appended child.
// Otherwise, attach children to this same node.
circularComponentTable.add(child);
createTree(child, newNode);
}
// Recurse on siblings
if (sibling && !circularComponentTable.has(sibling)) {
circularComponentTable.add(sibling);
createTree(sibling, newNode, true); |
<<<<<<<
//console.log('MEMOIZED PROPS ------>', memoizedProps);
// console.log('MEMOIZEDSTATE QUEUE------>', memoizedState.queue);
// console.log('HOOK STATE ------->', hooksStates);
=======
>>>>>>>
<<<<<<<
//console.log('1st ATOM ARRAY', atomArray);
=======
// console.log('1st ATOM ARRAY', atomArray);
>>>>>>>
// console.log('1st ATOM ARRAY', atomArray);
<<<<<<<
// console.log('MEMOIZED PROPS ------>', memoizedProps);
// console.log('MEMOIZEDSTATE QUEUE------>', memoizedState.queue);
// console.log('HOOK STATE ------->', hooksStates);
=======
>>>>>>>
<<<<<<<
//console.log('Regular Hooks');
=======
>>>>>>>
<<<<<<<
// console.log('Fiber', fiberRoot.current);
// console.log('SNAP.TREE->', snap.tree);
=======
>>>>>>> |
<<<<<<<
migrations: [InitMigration1558328532490],
}
=======
migrations: [InitMigration1558328532490, AddSince1558491231870],
})
return connectionOptions
>>>>>>>
migrations: [InitMigration1558328532490, AddSince1558491231870],
} |
<<<<<<<
import SignMessageController from 'controllers/sign-message'
=======
import CustomizedAssetsController from './customized-assets'
>>>>>>>
import SignMessageController from 'controllers/sign-message'
import CustomizedAssetsController from './customized-assets'
<<<<<<<
private signAndVerifyController = new SignMessageController()
=======
private customizedAssetsController = new CustomizedAssetsController()
>>>>>>>
private signAndVerifyController = new SignMessageController()
private customizedAssetsController = new CustomizedAssetsController() |
<<<<<<<
import SkipDataAndType from './settings/skip-data-and-type'
import FeeMode from 'models/fee-mode'
=======
>>>>>>>
import FeeMode from 'models/fee-mode' |
<<<<<<<
import { AddTypeHashToOutput1572852964749 } from './migrations/1572852964749-AddTypeHashToOutput'
import { AddDepositOutPointToOutput1573305225465 } from './migrations/1573305225465-AddDepositOutPointToOutput'
=======
import { AddInputIndexToInput1573461100330 } from './migrations/1573461100330-AddInputIndexToInput'
>>>>>>>
import { AddTypeHashToOutput1572852964749 } from './migrations/1572852964749-AddTypeHashToOutput'
import { AddDepositOutPointToOutput1573305225465 } from './migrations/1573305225465-AddDepositOutPointToOutput'
import { AddInputIndexToInput1573461100330 } from './migrations/1573461100330-AddInputIndexToInput'
<<<<<<<
AddOutputIndex1572226722928,
AddTypeHashToOutput1572852964749,
AddDepositOutPointToOutput1573305225465,
=======
AddOutputIndex1572226722928,
AddInputIndexToInput1573461100330,
>>>>>>>
AddOutputIndex1572226722928,
AddTypeHashToOutput1572852964749,
AddDepositOutPointToOutput1573305225465,
AddInputIndexToInput1573461100330, |
<<<<<<<
| 'migrate-acp'
// Hardware Wallet
| 'detect-device'
| 'get-device-ckb-app-version'
| 'get-device-firmware-version'
| 'get-device-public-key'
| 'connect-device'
| 'create-hardware-wallet'
// offline-signature
| 'export-transaction-as-json'
| 'sign-transaction-only'
| 'broadcast-transaction-only'
| 'sign-and-export-transaction'
=======
| 'migrate-acp'
| 'check-migrate-acp'
>>>>>>>
| 'migrate-acp'
| 'check-migrate-acp'
// Hardware Wallet
| 'detect-device'
| 'get-device-ckb-app-version'
| 'get-device-firmware-version'
| 'get-device-public-key'
| 'connect-device'
| 'create-hardware-wallet'
// offline-signature
| 'export-transaction-as-json'
| 'sign-transaction-only'
| 'broadcast-transaction-only'
| 'sign-and-export-transaction' |
<<<<<<<
import {
createWallet,
importWallet,
exportWallet,
setNetwork,
sendCapacity,
TransferItem,
} from '../../services/UILayer'
import { Network } from '../../contexts/Chain'
import { defaultNetworks } from '../../contexts/Settings'
import { saveNetworks, loadNetworks } from '../../utils/localStorage'
import { Routes, CapacityUnit, Message } from '../../utils/const'
import { verifyAddress } from '../../utils/validators'
=======
import { CapacityUnit } from '../../utils/const'
import actionCreators from './actionCreators'
import MainActions from './actions'
import initState from './state'
>>>>>>>
import { CapacityUnit } from '../../utils/const'
import actionCreators from './actionCreators'
import MainActions from './actions'
import initState from './state'
<<<<<<<
export const actionCreators = {
createWallet: (wallet: typeof initState.tempWallet) => {
createWallet(wallet)
return {
type: MainActions.CreateWallet,
}
},
importWallet: (wallet: typeof initState.tempWallet) => {
importWallet(wallet)
return {
type: MainActions.ImportWallet,
}
},
exportWallet: () => {
exportWallet()
return {
type: MainActions.ExportWallet,
}
},
setNetwork: (network: Network) => {
setNetwork(network)
return {
type: MainActions.SetNetwork,
payload: network,
}
},
saveNetworks: (idx: number, networks: Network[], editorNetwork: Network, navTo: (path: string) => void) => {
if (!editorNetwork.name) {
return {
type: MainActions.ErrorMessage,
payload: {
networks: Message.NameIsRequired,
},
}
}
if (editorNetwork.name.length > 28) {
return {
type: MainActions.ErrorMessage,
payload: {
networks: Message.NameShouldBeLessThanOrEqualTo28Characters,
},
}
}
if (!editorNetwork.remote) {
return {
type: MainActions.ErrorMessage,
payload: {
networks: Message.URLIsRequired,
},
}
}
const ns = [...networks]
if (idx === -1) {
// create
if (ns.map(n => n.name).indexOf(editorNetwork.name) > -1) {
// exist
return {
type: MainActions.ErrorMessage,
payload: {
networks: Message.NetworkNameExist,
},
}
}
ns.push(editorNetwork)
} else {
// edit
ns[idx] = editorNetwork
}
// temp solution, better to remove
saveNetworks(ns)
window.dispatchEvent(new Event('NetworksUpdate'))
navTo(Routes.SettingsNetworks)
return {
type: MainActions.SaveNetworks,
payload: ns,
}
},
deleteNetwork: (name: string) => {
if (name === Testnet) {
return {
type: MainActions.ErrorMessage,
payload: {
networks: `${Testnet} is unremovable`,
},
}
}
const networks = loadNetworks()
const newNetworks = networks.filter((n: Network) => n.name !== name)
saveNetworks(newNetworks)
window.dispatchEvent(new Event('NetworksUpdate'))
return {
type: MainActions.SetDialog,
payload: {
open: false,
},
}
},
submitTransfer: (items: TransferItem[]) => {
// TODO: verification
const errorAction = {
type: MainActions.ErrorMessage,
payload: {
transfer: Message.AtLeastOneAddressNeeded as string,
},
}
if (!items.length || !items[0].address) {
return errorAction
}
const invalid = items.some(
(item): boolean => {
if (!verifyAddress(item.address)) {
errorAction.payload.transfer = Message.InvalidAddress
return true
}
if (+item.capacity < 0) {
errorAction.payload.transfer = Message.InvalidCapacity
return true
}
return false
},
)
if (invalid) {
return errorAction
}
return {
type: MainActions.SetDialog,
payload: {
open: true,
items,
},
}
},
confirmTransfer: ({ items, password }: { items: TransferItem[]; password: string }) => {
const response = sendCapacity(items, password)
if (response && response[0]) {
if (response[0].status) {
return {
type: MainActions.UpdateTransfer,
payload: {
submitting: false,
},
}
}
return {
type: MainActions.ErrorMessage,
payload: {
transfer: response[0].msg,
},
}
}
throw new Error('No Response')
},
}
=======
>>>>>>> |
<<<<<<<
import i18n from '../utils/i18n'
import { verifyPasswordComplexity } from '../utils/validators'
=======
import { Keychain } from './hd'
>>>>>>>
import i18n from '../utils/i18n'
import { verifyPasswordComplexity } from '../utils/validators'
import { Keychain } from './hd' |
<<<<<<<
import RpcService from 'services/rpc-service'
import SyncedBlockNumber from 'models/synced-block-number'
import SyncStateSubject from 'models/subjects/sync-state-subject'
import NodeService from 'services/node'
import Method from '@nervosnetwork/ckb-sdk-rpc/lib/method'
import { CurrentNetworkIDSubject } from 'models/subjects/networks'
import { debounceTime } from 'rxjs/operators'
const MAX_TIP_BLOCK_DELAY = 180000
const TEN_MINS = 600000
export enum SyncStatus {
SyncNotStart,
SyncPending,
Syncing,
SyncCompleted,
}
interface SyncState {
nodeUrl: string,
timestamp: number,
indexerTipNumber: number,
cacheTipNumber: number,
bestKnownBlockNumber: number,
bestKnownBlockTimestamp: number,
indexRate: number | undefined,
cacheRate: number | undefined,
estimate: number | undefined,
status: SyncStatus
}
=======
import NetworksService from 'services/networks'
import RpcService from 'services/rpc-service'
import { ConnectionStatus, getLatestConnectionStatus } from 'models/subjects/node'
import SyncController from './sync'
const BUFFER_BLOCK_NUMBER = 10
const MAX_TIP_BLOCK_DELAY = 180000
export enum SyncStatus {
SyncNotStart,
SyncPending,
Syncing,
SyncCompleted,
}
>>>>>>>
import { debounceTime } from 'rxjs/operators'
import SyncedBlockNumber from 'models/synced-block-number'
import SyncStateSubject from 'models/subjects/sync-state-subject'
import NodeService from 'services/node'
import Method from '@nervosnetwork/ckb-sdk-rpc/lib/method'
import { CurrentNetworkIDSubject } from 'models/subjects/networks'
import RpcService from 'services/rpc-service'
const TEN_MINS = 600000
const MAX_TIP_BLOCK_DELAY = 180000
export enum SyncStatus {
SyncNotStart,
SyncPending,
Syncing,
SyncCompleted,
}
interface SyncState {
nodeUrl: string,
timestamp: number,
indexerTipNumber: number,
cacheTipNumber: number,
bestKnownBlockNumber: number,
bestKnownBlockTimestamp: number,
indexRate: number | undefined,
cacheRate: number | undefined,
estimate: number | undefined,
status: SyncStatus
} |
<<<<<<<
absences(period?: String): Promise<Absences>
infos(period?: String): Promise<Infos>
=======
homeworks(from?: Date, to?: Date): Promise<Array<Homework>>
>>>>>>>
absences(period?: String): Promise<Absences>
infos(period?: String): Promise<Infos>
homeworks(from?: Date, to?: Date): Promise<Array<Homework>>
<<<<<<<
}
export interface Absences
{
absences: [],
}
export interface Infos
{
infos: [],
=======
}
export interface PronoteHomeworks
{
homeworks: Array<PronoteHomework>, // ListeCahierDeTextes
resources: PronoteHomeworksResources, // ListeRessourcesPedagogiques
numericalResources: Array<PronoteObject> // ListeRessourcesNumeriques
}
export interface PronoteHomework extends PronoteObject
{
lesson: PronoteObject, // cours
locked: boolean, // verrouille
groups: Array<PronoteObject>, // listeGroupes
subject: PronoteObject, // Matiere
color: string, // CouleurFond
teachers: Array<PronoteObject>, // listeProfesseurs
from: Date, // Date
to: Date, // DateFin
content: Array<PronoteHomeworkContent>, // listeContenus
skills: Array<PronoteObject> // listeElementsProgrammeCDT
}
export interface PronoteHomeworkContent extends PronoteObject
{
description: string, // descriptif
category: PronoteObject, // categorie
path: number, // parcoursEducatif
files: Array<PronoteObject>, // ListePieceJointe
training: Array<PronoteObject> // training.V.ListeExecutionsQCM
}
export interface PronoteHomeworksResources
{
resources: Array<PronoteObject>, // listeRessources
subjects: Array<PronoteObject> // listeMatieres
>>>>>>>
}
export interface Absences
{
absences: [],
}
export interface Infos
{
infos: [],
}
export interface PronoteHomeworks
{
homeworks: Array<PronoteHomework>, // ListeCahierDeTextes
resources: PronoteHomeworksResources, // ListeRessourcesPedagogiques
numericalResources: Array<PronoteObject> // ListeRessourcesNumeriques
}
export interface PronoteHomework extends PronoteObject
{
lesson: PronoteObject, // cours
locked: boolean, // verrouille
groups: Array<PronoteObject>, // listeGroupes
subject: PronoteObject, // Matiere
color: string, // CouleurFond
teachers: Array<PronoteObject>, // listeProfesseurs
from: Date, // Date
to: Date, // DateFin
content: Array<PronoteHomeworkContent>, // listeContenus
skills: Array<PronoteObject> // listeElementsProgrammeCDT
}
export interface PronoteHomeworkContent extends PronoteObject
{
description: string, // descriptif
category: PronoteObject, // categorie
path: number, // parcoursEducatif
files: Array<PronoteObject>, // ListePieceJointe
training: Array<PronoteObject> // training.V.ListeExecutionsQCM
}
export interface PronoteHomeworksResources
{
resources: Array<PronoteObject>, // listeRessources
subjects: Array<PronoteObject> // listeMatieres |
<<<<<<<
}
/*
* @example
*
* given: lazy-page/en => lazy-page
*
*/
export function getScopeFromLang(lang: string): string {
const split = lang.split('/');
split.pop();
return split.join('/');
}
/*
* @example
*
* given: lazy-page/en => en
*
*/
export function getLangFromScope(lang: string): string {
const split = lang.split('/');
return split.pop();
}
/*
* @example
*
* given: path-to-happiness => pathToHappiness
* given: path_to_happiness => pathToHappiness
* given: path-to_happiness => pathToHappiness
*
*/
export function camelizeScope(str) {
return str
.replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => (index == 0 ? word.toLowerCase() : word.toUpperCase()))
.replace(/\s+|_|-|\//g, '');
=======
}
export function isBrowser() {
return typeof window !== 'undefined';
>>>>>>>
}
/*
* @example
*
* given: lazy-page/en => lazy-page
*
*/
export function getScopeFromLang(lang: string): string {
const split = lang.split('/');
split.pop();
return split.join('/');
}
/*
* @example
*
* given: lazy-page/en => en
*
*/
export function getLangFromScope(lang: string): string {
const split = lang.split('/');
return split.pop();
}
/*
* @example
*
* given: path-to-happiness => pathToHappiness
* given: path_to_happiness => pathToHappiness
* given: path-to_happiness => pathToHappiness
*
*/
export function camelizeScope(str) {
return str
.replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => (index == 0 ? word.toLowerCase() : word.toUpperCase()))
.replace(/\s+|_|-|\//g, '');
}
export function isBrowser() {
return typeof window !== 'undefined'; |
<<<<<<<
import { ProductsCacheService } from '../shared/products-cache.service';
=======
import { PagerService } from '../../core/pager/pager.service';
>>>>>>>
import { ProductsCacheService } from '../shared/products-cache.service';
import { PagerService } from '../../core/pager/pager.service';
<<<<<<<
constructor(
private productService: ProductService,
private productsCacheService: ProductsCacheService
) {}
=======
constructor(private productService: ProductService, private pagerService: PagerService) { }
>>>>>>>
constructor(
private productService: ProductService,
private productsCacheService: ProductsCacheService,
private pagerService: PagerService
) {} |
<<<<<<<
BrowserAnimationsModule,
=======
CoreModule.forRoot(),
>>>>>>>
BrowserAnimationsModule,
CoreModule.forRoot(), |
<<<<<<<
import { AdminGuard } from './admin.guard';
=======
import { CheckoutComponent } from './checkout/checkout.component';
>>>>>>>
import { AdminGuard } from './admin.guard';
import { CheckoutComponent } from './checkout/checkout.component';
<<<<<<<
{ path: 'admin/add', component: AddEditComponent, canActivate: [AdminGuard] },
{ path: 'admin/edit/:id', component: AddEditComponent, canActivate: [AdminGuard] },
{ path: '**', component: PageNotFoundComponent }
=======
{ path: 'checkout', component: CheckoutComponent },
{ path: '**', component: PageNotFoundComponent}
>>>>>>>
{ path: 'admin/add', component: AddEditComponent, canActivate: [AdminGuard] },
{ path: 'admin/edit/:id', component: AddEditComponent, canActivate: [AdminGuard] },
{ path: '**', component: PageNotFoundComponent },
{ path: 'checkout', component: CheckoutComponent } |
<<<<<<<
import { AddEditComponent } from './add-edit/add-edit.component';
=======
import { CheckoutComponent } from './checkout/checkout.component';
import { AddressComponent as CheckoutAddressComponent } from './checkout/address/address.component';
import { ShippingComponent as CheckoutShippingComponent } from './checkout/shipping/shipping.component';
import { PaymentComponent as CheckoutPaymentComponent } from './checkout/payment/payment.component';
import { ReviewComponent as CheckoutReviewComponent } from './checkout/review/review.component';
import { FooterComponent as CheckoutFooterComponent } from './checkout/footer/footer.component';
import { SidebarComponent as CheckoutSidebarComponent } from './checkout/sidebar/sidebar.component';
>>>>>>>
import { AddEditComponent } from './add-edit/add-edit.component';
import { CheckoutComponent } from './checkout/checkout.component';
import { AddressComponent as CheckoutAddressComponent } from './checkout/address/address.component';
import { ShippingComponent as CheckoutShippingComponent } from './checkout/shipping/shipping.component';
import { PaymentComponent as CheckoutPaymentComponent } from './checkout/payment/payment.component';
import { ReviewComponent as CheckoutReviewComponent } from './checkout/review/review.component';
import { FooterComponent as CheckoutFooterComponent } from './checkout/footer/footer.component';
import { SidebarComponent as CheckoutSidebarComponent } from './checkout/sidebar/sidebar.component';
<<<<<<<
SortPipe,
AddEditComponent
=======
SortPipe,
CheckoutComponent,
CheckoutAddressComponent,
CheckoutShippingComponent,
CheckoutPaymentComponent,
CheckoutReviewComponent,
CheckoutFooterComponent,
CheckoutSidebarComponent
>>>>>>>
SortPipe,
AddEditComponent,
CheckoutComponent,
CheckoutAddressComponent,
CheckoutShippingComponent,
CheckoutPaymentComponent,
CheckoutReviewComponent,
CheckoutFooterComponent,
CheckoutSidebarComponent
<<<<<<<
SortPipe,
AdminGuard,
AuthService
=======
OrderService,
CheckoutService,
SortPipe
>>>>>>>
SortPipe,
AdminGuard,
AuthService,
OrderService,
CheckoutService,
SortPipe |
<<<<<<<
import { PagerService } from '../../pager/pager.service';
import { SortPipe } from '../../sort.pipe';
=======
import { ProductsCacheService } from '../shared/products-cache.service';
import { PagerService } from '../../core/pager/pager.service';
>>>>>>>
import { PagerService } from '../../pager/pager.service';
import { SortPipe } from '../../sort.pipe';
import { ProductsCacheService } from '../shared/products-cache.service';
<<<<<<<
constructor(private productService: ProductService, private pagerService: PagerService, private sortPipe: SortPipe) { }
=======
constructor(
private productService: ProductService,
private productsCacheService: ProductsCacheService,
private pagerService: PagerService
) {}
>>>>>>>
constructor(
private productService: ProductService,
private productsCacheService: ProductsCacheService,
private pagerService: PagerService,
private sortPipe: SortPipe
) {} |
<<<<<<<
import { Data, SetupFunction } from './component'
import { currentVue } from './runtimeContext'
=======
import { Data, SetupFunction, SetupContext } from './component'
>>>>>>>
import { Data, SetupFunction } from './component'
<<<<<<<
export default plugin
export { createElement as h } from './createElement'
export { getCurrentInstance } from './runtimeContext'
=======
export default VueCompositionAPI
export { nextTick } from './nextTick'
export { default as createElement } from './createElement'
export { SetupContext }
>>>>>>>
export default VueCompositionAPI
export { nextTick } from './nextTick'
export { createElement as h } from './createElement'
export { getCurrentInstance } from './runtimeContext' |
<<<<<<<
const keyType = 'str';
const expReturn = { data: '12345' };
=======
const keyType = "str";
const expReturn = { data: "12345" };
const reverse = false;
const showPayer = false;
>>>>>>>
const keyType = 'str';
const expReturn = { data: '12345' };
const reverse = false;
const showPayer = false;
<<<<<<<
const keyType = '';
const expReturn = { data: '12345' };
=======
const keyType = "";
const reverse = false;
const showPayer = false;
const expReturn = { data: "12345" };
>>>>>>>
const keyType = '';
const reverse = false;
const showPayer = false;
const expReturn = { data: '12345' }; |
<<<<<<<
// Validate cache location and initialize storage
if (!this.cacheLocations[this.pConfig.cache.cacheLocation]) {
throw MSALError.ConfigurationError.createInvalidCacheLocationConfigError(
this.pConfig.cache.cacheLocation,
"unavailable",
config.auth.state
);
}
//cache keys msal
=======
// cache keys msal - typescript throws an error if any value other than "localStorage" or "sessionStorage" is passed
>>>>>>>
// Validate cache location and initialize storage
// if (!this.cacheLocations[this.pConfig.cache.cacheLocation]) {
// throw MSALError.ConfigurationError.createInvalidCacheLocationConfigError(
// this.pConfig.cache.cacheLocation,
// "unavailable",
// config.auth.state
// );
// }
//cache keys msal
// cache keys msal - typescript throws an error if any value other than "localStorage" or "sessionStorage" is passed
<<<<<<<
if(this.pErrorReceivedCallback) {
this.pErrorReceivedCallback(
MSALError.ClientAuthError.createLoginInProgressError(
Constants.idToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin, this.pConfig.cache.storeAuthStateInCookie))
)
=======
if (this.pTokenReceivedCallback) {
this.pTokenReceivedCallback(
ErrorDescription.loginProgressError,
null,
ErrorCodes.loginProgressError,
Constants.idToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin))
>>>>>>>
if(this.pErrorReceivedCallback) {
this.pErrorReceivedCallback(
MSALError.ClientAuthError.createLoginInProgressError(
Constants.idToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin))
)
<<<<<<<
try {
this.validateInputScope(scopes, Constants.idToken);
} catch (error) {
if(error instanceof MSALError.ConfigurationError) {
// Expected error from validation function
this.pErrorReceivedCallback(error);
} else {
// Unexpected error
this.pErrorReceivedCallback(
MSALError.AuthError.createUnexpectedError(
error.toString(),
Constants.idToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin, this.pConfig.cache.storeAuthStateInCookie))
)
);
=======
const notValidScope = this.validateInputScope(scopes);
if (notValidScope && !Utils.isEmpty(notValidScope)) {
if (this.pTokenReceivedCallback) {
this.pTokenReceivedCallback(
ErrorDescription.inputScopesError,
null,
ErrorCodes.inputScopesError,
Constants.idToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin))
);
return;
>>>>>>>
try {
this.validateInputScope(scopes, Constants.idToken);
} catch (error) {
if(error instanceof MSALError.ConfigurationError) {
// Expected error from validation function
this.pErrorReceivedCallback(error);
} else {
// Unexpected error
this.pErrorReceivedCallback(
MSALError.AuthError.createUnexpectedError(
error.toString(),
Constants.idToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin))
)
);
<<<<<<<
// validate the scopes
if (scopes) {
try {
// TODO: is this always accessToken?
this.validateInputScope(scopes, Constants.accessToken);
} catch (error) {
if(error instanceof MSALError.ConfigurationError) {
// Expected error from validation function
this.pErrorReceivedCallback(error);
} else {
// Unexpected error
this.pErrorReceivedCallback(
// TODO: is this always accessToken?
MSALError.AuthError.createUnexpectedError(
error.toString(),
Constants.accessToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin, this.pConfig.cache.storeAuthStateInCookie))
)
);
}
=======
// validate scopes
const notValidScope = this.validateInputScope(scopes);
// error out if the scopes are not valid
if (notValidScope && !Utils.isEmpty(notValidScope)) {
if (this.pTokenReceivedCallback) {
this.pTokenReceivedCallback(
ErrorDescription.inputScopesError,
null,
ErrorCodes.inputScopesError,
Constants.accessToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin))
);
>>>>>>>
// validate the scopes
if (scopes) {
try {
// TODO: is this always accessToken?
this.validateInputScope(scopes, Constants.accessToken);
} catch (error) {
if(error instanceof MSALError.ConfigurationError) {
// Expected error from validation function
this.pErrorReceivedCallback(error);
} else {
// Unexpected error
this.pErrorReceivedCallback(
// TODO: is this always accessToken?
MSALError.AuthError.createUnexpectedError(
error.toString(),
Constants.accessToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin))
)
);
}
<<<<<<<
// TODO: is it always access token?
let e = MSALError.InteractionRequiredAuthError.createLoginRequiredAuthError(
Constants.accessToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin, this.pConfig.cache.storeAuthStateInCookie))
);
this.pConfig.system.logger.info(e.errorCode + ": " + e.message);
if (this.pErrorReceivedCallback) {
this.pErrorReceivedCallback(e);
=======
if (this.pTokenReceivedCallback) {
this.pConfig.system.logger.info("User login is required");
this.pTokenReceivedCallback(
ErrorDescription.userLoginError,
null,
ErrorCodes.userLoginError,
Constants.accessToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin))
);
return;
>>>>>>>
// TODO: is it always access token?
let e = MSALError.InteractionRequiredAuthError.createLoginRequiredAuthError(
Constants.accessToken,
this.getUserState(this.pCacheStorage.getItem(Constants.stateLogin))
);
this.pConfig.system.logger.info(e.errorCode + ": " + e.message);
if (this.pErrorReceivedCallback) {
this.pErrorReceivedCallback(e); |
<<<<<<<
Rounds: Array<Models.Round>;
Positions: Array<string>;
PlayerStats: Array<Models.PlayerStats>;
private _countdown: number;
get Countdown(): number {
return this._countdown;
}
set Countdown(value: number) {
this._countdown = value;
this.OnPropertyChanged("Countdown");
}
=======
Rounds: Fayde.Collections.ObservableCollection<Models.Round> = new Fayde.Collections.ObservableCollection<Models.Round>();
Positions: string[] = [];
PlayerStats: Models.PlayerStats[] = [];
>>>>>>>
Rounds: Fayde.Collections.ObservableCollection<Models.Round> = new Fayde.Collections.ObservableCollection<Models.Round>();
Positions: string[] = [];
PlayerStats: Models.PlayerStats[] = [];
private _countdown: number;
get Countdown(): number {
return this._countdown;
}
set Countdown(value: number) {
this._countdown = value;
this.OnPropertyChanged("Countdown");
}
<<<<<<<
=======
constructor() {
super();
this.Load();
}
>>>>>>>
constructor() {
super();
this.Load();
} |
<<<<<<<
import * as Enums from "../../enums";
=======
import * as Objects from "../..";
>>>>>>>
import * as Enums from "../../enums";
import * as Objects from "../..";
<<<<<<<
en: Enums.TestImport_Enum;
optEnum: Nullable<Enums.TestImport_Enum>;
enumArray: Array<Enums.TestImport_Enum>;
optEnumArray: Array<Nullable<Enums.TestImport_Enum>> | null;
=======
object: Objects.TestImport_Object;
optObject: Objects.TestImport_Object | null;
objectArray: Array<Objects.TestImport_Object>;
optObjectArray: Array<Objects.TestImport_Object | null> | null;
>>>>>>>
object: Objects.TestImport_Object;
optObject: Objects.TestImport_Object | null;
objectArray: Array<Objects.TestImport_Object>;
optObjectArray: Array<Objects.TestImport_Object | null> | null;
en: Enums.TestImport_Enum;
optEnum: Nullable<Enums.TestImport_Enum>;
enumArray: Array<Enums.TestImport_Enum>;
optEnumArray: Array<Nullable<Enums.TestImport_Enum>> | null;
<<<<<<<
writer.writeString("en");
writer.writeInt32(input.en);
writer.writeString("optEnum");
writer.writeNullableInt32(input.optEnum);
writer.writeString("enumArray");
writer.writeArray(input.enumArray, (writer: Write, item: Enums.TestImport_Enum): void => {
writer.writeInt32(item);
});
writer.writeString("optEnumArray");
writer.writeNullableArray(input.optEnumArray, (writer: Write, item: Nullable<Enums.TestImport_Enum>): void => {
writer.writeNullableInt32(item);
});
=======
writer.writeString("object");
Objects.TestImport_Object.write(writer, input.object);
writer.writeString("optObject");
if (input.optObject) {
Objects.TestImport_Object.write(writer, input.optObject);
} else {
writer.writeNil();
}
writer.writeString("objectArray");
writer.writeArray(input.objectArray, (writer: Write, item: Objects.TestImport_Object): void => {
Objects.TestImport_Object.write(writer, item);
});
writer.writeString("optObjectArray");
writer.writeNullableArray(input.optObjectArray, (writer: Write, item: Objects.TestImport_Object | null): void => {
if (item) {
Objects.TestImport_Object.write(writer, item);
} else {
writer.writeNil();
}
});
>>>>>>>
writer.writeString("object");
Objects.TestImport_Object.write(writer, input.object);
writer.writeString("optObject");
if (input.optObject) {
Objects.TestImport_Object.write(writer, input.optObject);
} else {
writer.writeNil();
}
writer.writeString("objectArray");
writer.writeArray(input.objectArray, (writer: Write, item: Objects.TestImport_Object): void => {
Objects.TestImport_Object.write(writer, item);
});
writer.writeString("optObjectArray");
writer.writeNullableArray(input.optObjectArray, (writer: Write, item: Objects.TestImport_Object | null): void => {
if (item) {
Objects.TestImport_Object.write(writer, item);
} else {
writer.writeNil();
}
});
writer.writeString("en");
writer.writeInt32(input.en);
writer.writeString("optEnum");
writer.writeNullableInt32(input.optEnum);
writer.writeString("enumArray");
writer.writeArray(input.enumArray, (writer: Write, item: Enums.TestImport_Enum): void => {
writer.writeInt32(item);
});
writer.writeString("optEnumArray");
writer.writeNullableArray(input.optEnumArray, (writer: Write, item: Nullable<Enums.TestImport_Enum>): void => {
writer.writeNullableInt32(item);
}); |
<<<<<<<
import { Uri } from "../";
import { buildAndDeployApi, testEnvUp, testEnvDown } from "./helpers";
=======
import { Web3ApiClient, UriRedirect } from "../";
import {
buildAndDeployApi,
initTestEnvironment,
stopTestEnvironment
} from "@web3api/test-env-js";
>>>>>>>
import {
createWeb3ApiClient
} from "../";
import {
buildAndDeployApi,
initTestEnvironment,
stopTestEnvironment
} from "@web3api/test-env-js";
<<<<<<<
import { clientTestEnv } from "@web3api/client-test-env";
import axios from "axios";
import {
createWeb3ApiClient,
Web3ApiClientParams,
} from "../createWeb3ApiClient";
=======
>>>>>>>
<<<<<<<
// Stand up the test env
await testEnvUp();
// fetch providers from dev server
const {
data: { ipfs },
} = await axios.get("http://localhost:4040/providers");
if (!ipfs || ipfs.length === 0) {
throw Error("Dev server must be running at port 4040");
}
// re-deploy ENS
const { data } = await axios.get("http://localhost:4040/deploy-ens");
ipfsProvider = ipfs;
=======
const { ipfs, data, redirects: testRedirects } = await initTestEnvironment();
ipfsProvider = ipfs;
>>>>>>>
const { ipfs, ethereum, data } = await initTestEnvironment();
ipfsProvider = ipfs;
ethProvider = ethereum;
<<<<<<<
clientParams = {
...clientTestEnv,
ens: {
from: "w3://ens/ens.web3api.eth",
address: data.ensAddress,
},
};
}, 50000);
=======
redirects = testRedirects;
});
>>>>>>>
});
<<<<<<<
const client = await createWeb3ApiClient(clientParams);
const ensUri = new Uri(`ens/${api.ensDomain}`);
const ipfsUri = new Uri(`ipfs/${api.ipfsCid}`);
=======
const ensUri = `ens/${api.ensDomain}`;
const ipfsUri = `ipfs/${api.ipfsCid}`;
>>>>>>>
const client = await createWeb3ApiClient({
ethereum: ethProvider,
ipfs: ipfsProvider,
ens: ensAddress
});
const ensUri = `ens/${api.ensDomain}`;
const ipfsUri = `ipfs/${api.ipfsCid}`; |
<<<<<<<
import * as Enums from "../enums";
=======
import * as Objects from "..";
>>>>>>>
import * as Enums from "../enums";
import * as Objects from "..";
<<<<<<<
var _str: string = "";
var _strSet: boolean = false;
var _optStr: string | null = null;
var _en: Enums.CustomEnum = 0;
var _enSet: boolean = false;
var _optEnum: Nullable<Enums.CustomEnum> = new Nullable<Enums.CustomEnum>();
var _enumArray: Array<Enums.CustomEnum> = [];
var _enumArraySet: boolean = false;
var _optEnumArray: Array<Nullable<Enums.CustomEnum>> | null = null;
=======
var _arg: string = "";
var _argSet: bool = false;
>>>>>>>
var _str: string = "";
var _strSet: boolean = false;
var _optStr: string | null = null;
var _en: Enums.CustomEnum = 0;
var _enSet: boolean = false;
var _optEnum: Nullable<Enums.CustomEnum> = new Nullable<Enums.CustomEnum>();
var _enumArray: Array<Enums.CustomEnum> = [];
var _enumArraySet: boolean = false;
var _optEnumArray: Array<Nullable<Enums.CustomEnum>> | null = null;
<<<<<<<
if (!_strSet) {
throw Error("Missing required argument \"str: String\"");
}
if (!_enSet) {
throw Error("Missing required argument \"en: CustomEnum\"");
}
if (!_enumArraySet) {
throw Error("Missing required argument \"enumArray: [CustomEnum]\"");
=======
if (!_argSet) {
throw new Error("Missing required argument: 'arg: String'");
>>>>>>>
if (!_strSet) {
throw new Error("Missing required argument 'str: String\'");
}
if (!_enSet) {
throw new Error("Missing required argument 'en: CustomEnum'");
}
if (!_enumArraySet) {
throw new Error("Missing required argument 'enumArray: [CustomEnum]'"); |
<<<<<<<
.command("add", "Create a new access key associated with your account", (yargs: yargs.Argv) => accessKeyAdd("add", yargs))
.command("list", "List the access keys associated with your account", (yargs: yargs.Argv) => accessKeyList("list", yargs))
.command("ls", "List the access keys associated with your account", (yargs: yargs.Argv) => accessKeyList("ls", yargs))
=======
>>>>>>>
.command("add", "Create a new access key associated with your account", (yargs: yargs.Argv) => accessKeyAdd("add", yargs)) |
<<<<<<<
import { AcquisitionStatus } from "code-push/script/acquisition-sdk";
import { AccessKey, Account, AccountManager, App, CollaboratorMap, CollaboratorProperties, Deployment, DeploymentMetrics, Package, PackageInfo, Permissions, UpdateMetrics } from "code-push";
=======
import { AccessKey, Account, App, CollaboratorMap, CollaboratorProperties, Deployment, DeploymentMetrics, Headers, Package, UpdateMetrics } from "code-push/script/types";
>>>>>>>
import { AccessKey, Account, App, CollaboratorMap, CollaboratorProperties, Deployment, DeploymentMetrics, Headers, Package, PackageInfo, UpdateMetrics } from "code-push/script/types";
<<<<<<<
var rollout: number = getRolloutValue(command.rollout);
var isMandatory: boolean = getIsMandatoryValue(command.mandatory);
var packageInfo: PackageInfo = {
description: command.description,
isMandatory: isMandatory,
rollout: rollout
};
return sdk.promotePackage(command.appName, command.sourceDeploymentName, command.destDeploymentName, packageInfo)
=======
return sdk.promote(command.appName, command.sourceDeploymentName, command.destDeploymentName)
>>>>>>>
var rollout: number = getRolloutValue(command.rollout);
var isMandatory: boolean = getIsMandatoryValue(command.mandatory);
var packageInfo: PackageInfo = {
description: command.description,
isMandatory: isMandatory,
rollout: rollout
};
return sdk.promote(command.appName, command.sourceDeploymentName, command.destDeploymentName, packageInfo)
<<<<<<<
} else if (semver.valid(command.appStoreVersion) === null) {
throw new Error("Please use a semver-compliant app store version, for example \"1.0.3\".");
} else if (command.rollout){
validateRollout(command.rollout);
}
}
function patch(command: cli.IPatchCommand): Promise<void> {
var rollout: number = getRolloutValue(command.rollout);
var isMandatory: boolean = getIsMandatoryValue(command.mandatory);
var packageInfo: PackageInfo = {
label: command.label,
description: command.description,
isMandatory: isMandatory,
rollout: rollout
};
return sdk.patchRelease(command.appName, command.deploymentName, packageInfo)
.then((): void => {
log(`Successfully updated the ${ command.label ? command.label : "latest" } release of "${command.deploymentName}" deployment of "${command.appName}" app.`);
});
}
export var release = (command: cli.IReleaseCommand): Promise<void> => {
validateReleaseOptions(command);
=======
}
>>>>>>>
} else if (semver.valid(command.appStoreVersion) === null) {
throw new Error("Please use a semver-compliant app store version, for example \"1.0.3\".");
} else if (command.rollout){
validateRollout(command.rollout);
}
}
function patch(command: cli.IPatchCommand): Promise<void> {
var rollout: number = getRolloutValue(command.rollout);
var isMandatory: boolean = getIsMandatoryValue(command.mandatory);
var packageInfo: PackageInfo = {
label: command.label,
description: command.description,
isMandatory: isMandatory,
rollout: rollout
};
return sdk.patchRelease(command.appName, command.deploymentName, packageInfo)
.then((): void => {
log(`Successfully updated the ${ command.label ? command.label : "latest" } release of "${command.deploymentName}" deployment of "${command.appName}" app.`);
});
}
export var release = (command: cli.IReleaseCommand): Promise<void> => {
validateReleaseOptions(command);
<<<<<<<
return sdk.releasePackage(command.appName, command.deploymentName, file.path, command.description, command.appStoreVersion, rollout, command.mandatory, uploadProgress)
=======
return sdk.release(command.appName, command.deploymentName, file.path, command.appStoreVersion, command.description, command.mandatory, uploadProgress)
>>>>>>>
return sdk.release(command.appName, command.deploymentName, file.path, command.appStoreVersion, command.description, rollout, command.mandatory, uploadProgress) |
<<<<<<<
interface ILegacyLoginConnectionInfo {
=======
const ACTIVE_METRICS_KEY: string = "Active";
const DOWNLOADED_METRICS_KEY: string = "Downloaded";
interface IStandardLoginConnectionInfo {
>>>>>>>
const ACTIVE_METRICS_KEY: string = "Active";
const DOWNLOADED_METRICS_KEY: string = "Downloaded";
interface ILegacyLoginConnectionInfo {
<<<<<<<
function deserializeConnectionInfo(): ILegacyLoginConnectionInfo|ILoginConnectionInfo {
var savedConnection: string;
=======
function deserializeConnectionInfo(): IStandardLoginConnectionInfo|IAccessKeyLoginConnectionInfo {
>>>>>>>
function deserializeConnectionInfo(): ILegacyLoginConnectionInfo|ILoginConnectionInfo {
<<<<<<<
var connectionInfo: ILegacyLoginConnectionInfo|ILoginConnectionInfo = tryJSON(savedConnection);
return connectionInfo;
=======
}
function notifyAlreadyLoggedIn(): Promise<void> {
return Q.fcall(() => { throw new Error("You are already logged in from this machine."); });
>>>>>>>
<<<<<<<
case cli.CommandType.deploymentHistory:
return deploymentHistory(<cli.IDeploymentHistoryCommand>command);
case cli.CommandType.login:
return login(<cli.ILoginCommand>command);
case cli.CommandType.logout:
return logout(<cli.ILogoutCommand>command);
=======
>>>>>>>
case cli.CommandType.login:
return login(<cli.ILoginCommand>command);
case cli.CommandType.logout:
return logout(<cli.ILogoutCommand>command); |
<<<<<<<
import {CMakeServerClient,
ProgressMessage,
MessageMessage,
HelloMessage,
HandshakeMessage,
ConfigureMessage,
createCooke,
CMakeCacheEntry,
GlobalSettings,
CodeModelMessage,
CodeModelTarget,
CodeModelConfiguration
} from './server-client'
=======
import {CompilationDatabase} from './compdb';
import {ExecuteOptions, ExecutionResult, CompilationInfo, CMakeToolsAPI} from './api';
>>>>>>>
import {CMakeServerClient,
ProgressMessage,
MessageMessage,
HelloMessage,
HandshakeMessage,
ConfigureMessage,
createCooke,
CMakeCacheEntry,
GlobalSettings,
CodeModelMessage,
CodeModelTarget,
CodeModelConfiguration
} from './server-client'
import {CompilationDatabase} from './compdb';
import {ExecuteOptions, ExecutionResult, CompilationInfo, CMakeToolsAPI} from './api';
<<<<<<<
interface ExecuteOptions {
silent: boolean;
environment: Object;
collectOutput?: boolean;
};
=======
>>>>>>>
<<<<<<<
interface ExecutionResult {
retc: number;
stdout: Maybe<string>;
stderr: Maybe<string>;
}
=======
>>>>>>>
<<<<<<<
private _serverClient: Maybe<CMakeServerClient> = null;
public get serverClient(): Maybe<CMakeServerClient> {
return this._serverClient;
}
public async shutdownServerClient() {
if (this.serverClient) {
await this.serverClient.shutdown();;
this._serverClient = null;
}
}
private _globalSettings: Maybe<GlobalSettings>;
public get globalSettings() : Maybe<GlobalSettings> {
return this._globalSettings;
}
public async restartServerClient(): Promise<CMakeServerClient> {
if (this.serverClient) {
await this.shutdownServerClient();
}
return this._setupServerClient().then(cl => this._serverClient = cl);
}
private async _setupServerClient(): Promise<CMakeServerClient> {
console.assert(!this.serverClient, '_setupServerClient called while client is already running');
const tmpdir = path.join(vscode.workspace.rootPath, '.vscode');
await util.ensureDirectory(tmpdir);
return new Promise<CMakeServerClient>((resolve, reject) => {
const client = new CMakeServerClient({
tmpdir,
cmakePath: this.config.cmakePath,
onCrash: async (retc, signal) => {
vscode.window.showErrorMessage(`cmake-server crashed with exit code ${retc} (${signal})`);
},
onDirty: async () => {
this._needsReconfigure = true;
},
onHello: async (m: HelloMessage) => {
const generator = await this.pickGenerator(this.config.preferredGenerators);
if (!generator) {
vscode.window.showErrorMessage('Unable to determine CMake Generator to use');
throw new Error('No generator!');
}
let src_dir = this.sourceDir;
// Work-around: CMake Server checks that CMAKE_HOME_DIRECTORY
// in the cmake cache is the same as what we provide when we
// set up the connection. Because CMake may normalize the
// path differently than we would, we should make sure that
// we pass the value that is specified in the cache exactly
// to avoid causing CMake server to spuriously fail.
if (await async.exists(this.cachePath)) {
const cache = await CMakeCache.fromPath(this.cachePath);
const home = cache.get('CMAKE_HOME_DIRECTORY');
if (home && util.normalizePath(home.as<string>()) == util.normalizePath(src_dir)) {
src_dir = home.as<string>();
}
}
const hs: HandshakeMessage = {
type: 'handshake',
buildDirectory: this.binaryDir,
sourceDirectory: src_dir,
extraGenerator: this.config.toolset,
generator: generator,
protocolVersion: m.supportedProtocolVersions[0]
};
const res = await client.sendRequest(hs);
this._globalSettings = await client.getGlobalSettings();
resolve(client);
},
onMessage: async (m: MessageMessage) => {
if (m.title) {
this._channel.appendLine(`-- [${m.title}]: ${m.message}`);
} else {
this._channel.appendLine(`-- ${m.message}`)
}
},
onProgress: async (p: ProgressMessage) => {
this.statusMessage = p.progressMessage;
this.buildProgress = (p.progressCurrent - p.progressMinimum) / (p.progressMaximum - p.progressMinimum);
},
environment: Object.assign(
this.config.environment,
this.currentEnvironmentVariables,
)
});
});
}
public activeEnvironments : string[] = [];
=======
public activeEnvironments: string[] = [];
>>>>>>>
private _serverClient: Maybe<CMakeServerClient> = null;
public get serverClient(): Maybe<CMakeServerClient> {
return this._serverClient;
}
public async shutdownServerClient() {
if (this.serverClient) {
await this.serverClient.shutdown();;
this._serverClient = null;
}
}
private _globalSettings: Maybe<GlobalSettings>;
public get globalSettings() : Maybe<GlobalSettings> {
return this._globalSettings;
}
public async restartServerClient(): Promise<CMakeServerClient> {
if (this.serverClient) {
await this.shutdownServerClient();
}
return this._setupServerClient().then(cl => this._serverClient = cl);
}
private async _setupServerClient(): Promise<CMakeServerClient> {
console.assert(!this.serverClient, '_setupServerClient called while client is already running');
const tmpdir = path.join(vscode.workspace.rootPath, '.vscode');
await util.ensureDirectory(tmpdir);
return new Promise<CMakeServerClient>((resolve, reject) => {
const client = new CMakeServerClient({
tmpdir,
cmakePath: this.config.cmakePath,
onCrash: async (retc, signal) => {
vscode.window.showErrorMessage(`cmake-server crashed with exit code ${retc} (${signal})`);
},
onDirty: async () => {
this._needsReconfigure = true;
},
onHello: async (m: HelloMessage) => {
const generator = await this.pickGenerator(this.config.preferredGenerators);
if (!generator) {
vscode.window.showErrorMessage('Unable to determine CMake Generator to use');
throw new Error('No generator!');
}
let src_dir = this.sourceDir;
// Work-around: CMake Server checks that CMAKE_HOME_DIRECTORY
// in the cmake cache is the same as what we provide when we
// set up the connection. Because CMake may normalize the
// path differently than we would, we should make sure that
// we pass the value that is specified in the cache exactly
// to avoid causing CMake server to spuriously fail.
if (await async.exists(this.cachePath)) {
const cache = await CMakeCache.fromPath(this.cachePath);
const home = cache.get('CMAKE_HOME_DIRECTORY');
if (home && util.normalizePath(home.as<string>()) == util.normalizePath(src_dir)) {
src_dir = home.as<string>();
}
}
const hs: HandshakeMessage = {
type: 'handshake',
buildDirectory: this.binaryDir,
sourceDirectory: src_dir,
extraGenerator: this.config.toolset,
generator: generator,
protocolVersion: m.supportedProtocolVersions[0]
};
const res = await client.sendRequest(hs);
this._globalSettings = await client.getGlobalSettings();
resolve(client);
},
onMessage: async (m: MessageMessage) => {
if (m.title) {
this._channel.appendLine(`-- [${m.title}]: ${m.message}`);
} else {
this._channel.appendLine(`-- ${m.message}`)
}
},
onProgress: async (p: ProgressMessage) => {
this.statusMessage = p.progressMessage;
this.buildProgress = (p.progressCurrent - p.progressMinimum) / (p.progressMaximum - p.progressMinimum);
},
environment: Object.assign(
this.config.environment,
this.currentEnvironmentVariables,
)
});
});
}
public activeEnvironments : string[] = [];
<<<<<<<
public execute(args: string[],
options: ExecuteOptions = {
silent: false,
environment: {},
collectOutput: false
},
=======
public execute(program: string,
args: string[],
options: ExecuteOptions = {silent: false, environment: {}},
>>>>>>>
public execute(program: string,
args: string[],
options: ExecuteOptions = {
silent: false,
environment: {},
collectOutput: false
},
<<<<<<<
console.info('Execute cmake with arguments:', args);
let stdout = '';
let stderr = '';
const pipe = proc.spawn(this.config.cmakePath, args, {
=======
const pipe = proc.spawn(program, args, {
>>>>>>>
let stdout = '';
let stderr = '';
const pipe = proc.spawn(program, args, {
<<<<<<<
console.log('cmake [stdout]: ' + line);
if (options.collectOutput) {
stdout += line + '\n';
}
=======
console.log(program + ' [stdout]: ' + line);
>>>>>>>
console.log(program + ' [stdout]: ' + line);
if (options.collectOutput) {
stdout += line + '\n';
}
<<<<<<<
console.log('cmake [stderr]: ' + line);
if (options.collectOutput) {
stderr += line + '\n';
}
=======
console.log(program + ' [stderr]: ' + line);
>>>>>>>
if (options.collectOutput) {
stderr += line + '\n';
}
console.log(program + ' [stderr]: ' + line);
<<<<<<<
if (this.serverClient) {
const configure_message: ConfigureMessage = {
type: 'configure',
cacheArguments: extra_args,
};
const configure_result = await this.serverClient.sendRequest(configure_message);
const compute_result = await this.serverClient.sendRequest({type: 'compute'});
this._needsReconfigure = false;
this._refreshCodeModel().catch(CMakeTools._printUnhandledException);
this._refreshCacheContent().catch(CMakeTools._printUnhandledException);
return 0;
} else {
return this._legacyConfigure(extra_args, init_cache_path, settings_args);
}
}
private async _legacyConfigure(
extra_args: string[],
init_cache_path: string,
settings_args: string[]
): Promise<number> {
if (this.isBusy) {
vscode.window.showErrorMessage('A CMake task is already running. Stop it before trying to configure.');
return -1;
}
const result = await this.execute(
=======
const result = await this.executeCMakeCommand(
>>>>>>>
if (this.serverClient) {
const configure_message: ConfigureMessage = {
type: 'configure',
cacheArguments: extra_args,
};
const configure_result = await this.serverClient.sendRequest(configure_message);
const compute_result = await this.serverClient.sendRequest({type: 'compute'});
this._needsReconfigure = false;
this._refreshCodeModel().catch(CMakeTools._printUnhandledException);
this._refreshCacheContent().catch(CMakeTools._printUnhandledException);
return 0;
} else {
return this._legacyConfigure(extra_args, init_cache_path, settings_args);
}
}
private async _legacyConfigure(
extra_args: string[],
init_cache_path: string,
settings_args: string[]
): Promise<number> {
if (this.isBusy) {
vscode.window.showErrorMessage('A CMake task is already running. Stop it before trying to configure.');
return -1;
}
const result = await this.executeCMakeCommand( |
<<<<<<<
'use strict';
import * as proc from 'child_process';
import * as fs from 'fs';
export function doAsync<T>(fn: Function, ...args: any[]): Promise<T> {
return new Promise<T>((resolve, reject) => {
fn(...args, resolve);
});
}
export function exists(filepath: string): Promise<boolean> {
return doAsync<Boolean>(fs.exists, filepath);
}
export function unlink(filepath: string): Promise<void> {
return doAsync<void>(fs.unlink, filepath);
}
export function readFile(filepath: string) {
return new Promise<Buffer>((resolve, reject) => {
fs.readFile(filepath, (err: NodeJS.ErrnoException, data: Buffer) => {
if (err)
reject(err);
else
resolve(data);
});
});
}
export function stat(path: string): Promise<fs.Stats> {
return new Promise<fs.Stats>((resolve, reject) => {
fs.stat(path, (err: NodeJS.ErrnoException, stats: fs.Stats) => {
if (err)
reject(err);
else
resolve(stats);
});
});
}
export interface IExecutionResult {
retc: Number;
stdout: string;
stderr: string;
}
export function execute(command: string, args: string[], options?: proc.SpawnOptions): Promise<IExecutionResult> {
return new Promise<IExecutionResult>((resolve, reject) => {
const child = proc.spawn(command, args, options);
child.on('error', (err) => {
reject(err);
});
let stdout_acc = '';
let stderr_acc = '';
child.stdout.on('data', (data: Uint8Array) => {
stdout_acc += data.toString();
});
child.stderr.on('data', (data: Uint8Array) => {
stderr_acc += data.toString();
});
child.on('exit', (retc) => {
resolve({retc: retc, stdout: stdout_acc, stderr: stderr_acc});
});
});
}
export interface ITask<T> {
(): T;
}
/**
* A helper to prevent accumulation of sequential async tasks.
*
* Imagine a mail man with the sole task of delivering letters. As soon as
* a letter submitted for delivery, he drives to the destination, delivers it
* and returns to his base. Imagine that during the trip, N more letters were submitted.
* When the mail man returns, he picks those N letters and delivers them all in a
* single trip. Even though N+1 submissions occurred, only 2 deliveries were made.
*
* The throttler implements this via the queue() method, by providing it a task
* factory. Following the example:
*
* var throttler = new Throttler();
* var letters = [];
*
* function letterReceived(l) {
* letters.push(l);
* throttler.queue(() => { return makeTheTrip(); });
* }
*/
export class Throttler<T> {
private activePromise: Promise<T>;
private queuedPromise: Promise<T>;
private queuedPromiseFactory: ITask<Promise<T>>;
constructor() {
this.activePromise = null!;
this.queuedPromise = null!;
this.queuedPromiseFactory = null!;
}
public queue(promiseFactory: ITask<Promise<T>>): Promise<T> {
if (this.activePromise) {
this.queuedPromiseFactory = promiseFactory;
if (!this.queuedPromise) {
var onComplete = () => {
this.queuedPromise = null!;
var result = this.queue(this.queuedPromiseFactory);
this.queuedPromiseFactory = null!;
return result;
};
this.queuedPromise = new Promise<T>((resolve, reject) => {
this.activePromise.then(onComplete, onComplete).then(resolve);
});
}
return new Promise<T>((resolve, reject) => {
this.queuedPromise.then(resolve, reject);
});
}
this.activePromise = promiseFactory();
return new Promise<T>((resolve, reject) => {
this.activePromise.then((result: T) => {
this.activePromise = null!;
resolve(result);
}, (err: any) => {
this.activePromise = null!;
reject(err);
});
});
}
=======
'use strict';
import * as proc from 'child_process';
import * as fs from 'fs';
export function doAsync<Result, Param, ErrorType>(
fn: (param: Param, callback: (error: NodeJS.ErrnoException, res: Result) => void) => void,
p: Param
): Promise<Result> {
return new Promise<Result>((resolve, reject) => {
fn(p, (err, res) => {
if (err) {
reject(err);
} else {
resolve(res);
}
});
});
}
export function doVoidAsync<Result, Param, ErrorType>(
fn: (param: Param, callback: (error: NodeJS.ErrnoException) => void) => void,
p: Param
): Promise<Result> {
return new Promise<Result>((resolve, reject) => {
fn(p, (er) => {
if (er) {
reject(er);
} else {
resolve();
}
});
});
}
export function doNoErrorAsync<Result, Param>(
fn: (param: Param, callback: (result: Result) => void) => void,
p: Param
): Promise<Result> {
return new Promise<Result>((resolve) => {
fn(p, (res) => {
resolve(res);
});
});
}
export function exists(filepath: string): Promise<boolean> {
return doNoErrorAsync(fs.exists, filepath);
}
export function isDirectory(filepath: string): Promise<boolean> {
return doAsync(fs.stat, filepath).then(stat => {
return stat.isDirectory();
});
}
export function unlink(filepath: string): Promise<void> {
return doVoidAsync(fs.unlink, filepath);
}
export function readFile(filepath: string) {
return new Promise<Buffer>((resolve, reject) => {
fs.readFile(filepath, (err: NodeJS.ErrnoException, data: Buffer) => {
if (err)
reject(err);
else
resolve(data);
});
});
}
export function stat(path: string): Promise<fs.Stats> {
return new Promise<fs.Stats>((resolve, reject) => {
fs.stat(path, (err: NodeJS.ErrnoException, stats: fs.Stats) => {
if (err)
reject(err);
else
resolve(stats);
});
});
}
export interface IExecutionResult {
retc: Number;
stdout: string;
stderr: string;
}
export function execute(command: string, args: string[], options?: proc.SpawnOptions): Promise<IExecutionResult> {
return new Promise<IExecutionResult>((resolve, reject) => {
const child = proc.spawn(command, args, options);
child.on('error', (err) => {
reject(err);
});
let stdout_acc = '';
let stderr_acc = '';
child.stdout.on('data', (data: Uint8Array) => {
stdout_acc += data.toString();
});
child.stderr.on('data', (data: Uint8Array) => {
stderr_acc += data.toString();
})
child.on('exit', (retc) => {
resolve({retc: retc, stdout: stdout_acc, stderr: stderr_acc});
});
});
>>>>>>>
'use strict';
import * as proc from 'child_process';
import * as fs from 'fs';
export function doAsync<Result, Param, ErrorType>(
fn: (param: Param, callback: (error: NodeJS.ErrnoException, res: Result) => void) => void,
p: Param
): Promise<Result> {
return new Promise<Result>((resolve, reject) => {
fn(p, (err, res) => {
if (err) {
reject(err);
} else {
resolve(res);
}
});
});
}
export function doVoidAsync<Result, Param, ErrorType>(
fn: (param: Param, callback: (error: NodeJS.ErrnoException) => void) => void,
p: Param
): Promise<Result> {
return new Promise<Result>((resolve, reject) => {
fn(p, (er) => {
if (er) {
reject(er);
} else {
resolve();
}
});
});
}
export function doNoErrorAsync<Result, Param>(
fn: (param: Param, callback: (result: Result) => void) => void,
p: Param
): Promise<Result> {
return new Promise<Result>((resolve) => {
fn(p, (res) => {
resolve(res);
});
});
}
export function exists(filepath: string): Promise<boolean> {
return doNoErrorAsync(fs.exists, filepath);
}
export function isDirectory(filepath: string): Promise<boolean> {
return doAsync(fs.stat, filepath).then(stat => {
return stat.isDirectory();
});
}
export function unlink(filepath: string): Promise<void> {
return doVoidAsync(fs.unlink, filepath);
}
export function readFile(filepath: string) {
return new Promise<Buffer>((resolve, reject) => {
fs.readFile(filepath, (err: NodeJS.ErrnoException, data: Buffer) => {
if (err)
reject(err);
else
resolve(data);
});
});
}
export function stat(path: string): Promise<fs.Stats> {
return new Promise<fs.Stats>((resolve, reject) => {
fs.stat(path, (err: NodeJS.ErrnoException, stats: fs.Stats) => {
if (err)
reject(err);
else
resolve(stats);
});
});
}
export interface IExecutionResult {
retc: Number;
stdout: string;
stderr: string;
}
export function execute(command: string, args: string[], options?: proc.SpawnOptions): Promise<IExecutionResult> {
return new Promise<IExecutionResult>((resolve, reject) => {
const child = proc.spawn(command, args, options);
child.on('error', (err) => {
reject(err);
});
let stdout_acc = '';
let stderr_acc = '';
child.stdout.on('data', (data: Uint8Array) => {
stdout_acc += data.toString();
});
child.stderr.on('data', (data: Uint8Array) => {
stderr_acc += data.toString();
});
child.on('exit', (retc) => {
resolve({retc: retc, stdout: stdout_acc, stderr: stderr_acc});
});
});
}
export interface ITask<T> {
(): T;
}
/**
* A helper to prevent accumulation of sequential async tasks.
*
* Imagine a mail man with the sole task of delivering letters. As soon as
* a letter submitted for delivery, he drives to the destination, delivers it
* and returns to his base. Imagine that during the trip, N more letters were submitted.
* When the mail man returns, he picks those N letters and delivers them all in a
* single trip. Even though N+1 submissions occurred, only 2 deliveries were made.
*
* The throttler implements this via the queue() method, by providing it a task
* factory. Following the example:
*
* var throttler = new Throttler();
* var letters = [];
*
* function letterReceived(l) {
* letters.push(l);
* throttler.queue(() => { return makeTheTrip(); });
* }
*/
export class Throttler<T> {
private activePromise: Promise<T>;
private queuedPromise: Promise<T>;
private queuedPromiseFactory: ITask<Promise<T>>;
constructor() {
this.activePromise = null!;
this.queuedPromise = null!;
this.queuedPromiseFactory = null!;
}
public queue(promiseFactory: ITask<Promise<T>>): Promise<T> {
if (this.activePromise) {
this.queuedPromiseFactory = promiseFactory;
if (!this.queuedPromise) {
var onComplete = () => {
this.queuedPromise = null!;
var result = this.queue(this.queuedPromiseFactory);
this.queuedPromiseFactory = null!;
return result;
};
this.queuedPromise = new Promise<T>((resolve, reject) => {
this.activePromise.then(onComplete, onComplete).then(resolve);
});
}
return new Promise<T>((resolve, reject) => {
this.queuedPromise.then(resolve, reject);
});
}
this.activePromise = promiseFactory();
return new Promise<T>((resolve, reject) => {
this.activePromise.then((result: T) => {
this.activePromise = null!;
resolve(result);
}, (err: any) => {
this.activePromise = null!;
reject(err);
});
});
} |
<<<<<<<
private _extCacheContent: ExtCache;
private _extCachePath = path.join(vscode.workspace.rootPath, '.vscode', '.cmaketools.json');
=======
private _targets: string[];
>>>>>>>
private _extCacheContent: ExtCache;
private _extCachePath = path.join(vscode.workspace.rootPath, '.vscode', '.cmaketools.json');
private _targets: string[]; |
<<<<<<<
* Platform arguments for VS Generators.
* Currently, there is a mismatch only between x86 and win32.
* For example, VS kits x86 and amd64_x86 will generate -A win32
=======
* Gets the environment variables set by a shell script.
* @param kit The kit to get the environment variables for
*/
export async function getShellScriptEnvironment(kit: Kit): Promise<Map<string, string>|undefined> {
console.assert(kit.environmentSetupScript);
const filename = Math.random().toString() + (process.platform == 'win32' ? '.bat' : '.sh');
const script_filename = `vs-cmt-${filename}`;
const environment_filename = script_filename + '.env';
const script_path = path.join(paths.tmpDir, script_filename);
const environment_path = path.join(paths.tmpDir, environment_filename); // path of temp file in which the script writes the env vars to
let script = '';
let run_command = '';
if (process.platform == 'win32') { // windows
script += `call "${kit.environmentSetupScript}"\r\n`; // call the user batch script
script += `set >> ${environment_path}`; // write env vars to temp file
run_command = `call ${script_path}`;
} else { // non-windows
script += `source "${kit.environmentSetupScript}"\n`; // run the user shell script
script +=`printenv >> ${environment_path}`; // write env vars to temp file
run_command = `/bin/bash -c "source ${script_path}"`; // run script in bash to enable bash-builtin commands like 'source'
}
try {
await fs.unlink(environment_path); // delete the temp file if it exists
} catch (error) {}
await fs.writeFile(script_path, script); // write batch file
const res = await proc.execute(run_command, [], null, {shell: true, silent: true}).result; // run script
await fs.unlink(script_path); // delete script file
const output = (res.stdout) ? res.stdout + (res.stderr || '') : res.stderr;
let env = '';
try {
/* When the script failed, envpath would not exist */
env = await fs.readFile(environment_path, {encoding: 'utf8'});
await fs.unlink(environment_path);
} catch (error) { log.error(error); }
if (!env || env === '') {
console.log(`Error running ${kit.environmentSetupScript} with:`, output);
return;
}
// split and trim env vars
const vars
= env.split('\n').map(l => l.trim()).filter(l => l.length !== 0).reduce<Map<string, string>>((acc, line) => {
const match = /(\w+)=?(.*)/.exec(line);
if (match) {
acc.set(match[1], match[2]);
} else {
log.error(localize('error.parsing.environment', 'Error parsing environment variable: {0}', line));
}
return acc;
}, new Map());
log.debug(localize('ok.running', 'OK running {0}, env vars: {1}', kit.environmentSetupScript, JSON.stringify([...vars])));
return vars;
}
/**
* Platform arguments for VS Generators
>>>>>>>
* Gets the environment variables set by a shell script.
* @param kit The kit to get the environment variables for
*/
export async function getShellScriptEnvironment(kit: Kit): Promise<Map<string, string>|undefined> {
console.assert(kit.environmentSetupScript);
const filename = Math.random().toString() + (process.platform == 'win32' ? '.bat' : '.sh');
const script_filename = `vs-cmt-${filename}`;
const environment_filename = script_filename + '.env';
const script_path = path.join(paths.tmpDir, script_filename);
const environment_path = path.join(paths.tmpDir, environment_filename); // path of temp file in which the script writes the env vars to
let script = '';
let run_command = '';
if (process.platform == 'win32') { // windows
script += `call "${kit.environmentSetupScript}"\r\n`; // call the user batch script
script += `set >> ${environment_path}`; // write env vars to temp file
run_command = `call ${script_path}`;
} else { // non-windows
script += `source "${kit.environmentSetupScript}"\n`; // run the user shell script
script +=`printenv >> ${environment_path}`; // write env vars to temp file
run_command = `/bin/bash -c "source ${script_path}"`; // run script in bash to enable bash-builtin commands like 'source'
}
try {
await fs.unlink(environment_path); // delete the temp file if it exists
} catch (error) {}
await fs.writeFile(script_path, script); // write batch file
const res = await proc.execute(run_command, [], null, {shell: true, silent: true}).result; // run script
await fs.unlink(script_path); // delete script file
const output = (res.stdout) ? res.stdout + (res.stderr || '') : res.stderr;
let env = '';
try {
/* When the script failed, envpath would not exist */
env = await fs.readFile(environment_path, {encoding: 'utf8'});
await fs.unlink(environment_path);
} catch (error) { log.error(error); }
if (!env || env === '') {
console.log(`Error running ${kit.environmentSetupScript} with:`, output);
return;
}
// split and trim env vars
const vars
= env.split('\n').map(l => l.trim()).filter(l => l.length !== 0).reduce<Map<string, string>>((acc, line) => {
const match = /(\w+)=?(.*)/.exec(line);
if (match) {
acc.set(match[1], match[2]);
} else {
log.error(localize('error.parsing.environment', 'Error parsing environment variable: {0}', line));
}
return acc;
}, new Map());
log.debug(localize('ok.running', 'OK running {0}, env vars: {1}', kit.environmentSetupScript, JSON.stringify([...vars])));
return vars;
}
/**
* Platform arguments for VS Generators
* Currently, there is a mismatch only between x86 and win32.
* For example, VS kits x86 and amd64_x86 will generate -A win32 |
<<<<<<<
log.debug(localize('disposing.extension', 'Disposing CMakeTools extension'));
=======
log.debug('Disposing CMakeTools extension');
telemetry.deactivate();
>>>>>>>
log.debug(localize('disposing.extension', 'Disposing CMakeTools extension'));
telemetry.deactivate();
<<<<<<<
private getPreferredGenerators(): CMakeGenerator[] {
// User can override generator with a setting
const user_generator = this.workspaceContext.config.generator;
if (user_generator) {
log.debug(localize('using.generator.for.user.configuration', 'Using generator from user configuration: {0}', user_generator));
return [{
name: user_generator,
platform: this.workspaceContext.config.platform || undefined,
toolset: this.workspaceContext.config.toolset || undefined,
}];
}
const user_preferred = this.workspaceContext.config.preferredGenerators.map(g => ({name: g}));
return user_preferred;
}
=======
>>>>>>>
<<<<<<<
log.debug(localize('second.phase.init', 'Starting CMakeTools second-phase init'));
// First, start up Rollbar
await rollbar.requestPermissions(this.extensionContext);
=======
log.debug('Starting CMakeTools second-phase init');
>>>>>>>
log.debug(localize('second.phase.init', 'Starting CMakeTools second-phase init'));
<<<<<<<
log.debug(localize('injecting.new.kit', 'Injecting new Kit into CMake driver'));
const drv = await this._cmakeDriver;
=======
log.debug('Injecting new Kit into CMake driver');
const drv = await this._cmakeDriver; // Use only an existing driver, do not create one
>>>>>>>
log.debug(localize('injecting.new.kit', 'Injecting new Kit into CMake driver'));
const drv = await this._cmakeDriver; // Use only an existing driver, do not create one
<<<<<<<
vscode.window.showErrorMessage(localize('bad.executable', 'Bad CMake executable "{0}". Is it installed or settings contain the correct path (cmake.cmakePath)?', cmake.path));
=======
vscode.window.showErrorMessage(`Bad CMake executable "${
cmake.path}". Is it installed or settings contain the correct path (cmake.cmakePath)?`);
telemetry.logEvent('CMakeExecutableNotFound');
>>>>>>>
vscode.window.showErrorMessage(localize('bad.executable', 'Bad CMake executable "{0}". Is it installed or settings contain the correct path (cmake.cmakePath)?', cmake.path));
telemetry.logEvent('CMakeExecutableNotFound');
<<<<<<<
log.debug(localize('initialization.complete', 'CMakeTools instance initialization complete.'));
=======
telemetry.activate();
log.debug('CMakeTools instance initialization complete.');
>>>>>>>
telemetry.activate();
log.debug(localize('initialization.complete', 'CMakeTools instance initialization complete.')); |
<<<<<<<
async acquireToken(request: AuthorizationCodeRequest, authCodePayload?: AuthorizationCodePayload): Promise<AuthenticationResult> {
=======
async acquireToken(request: AuthorizationCodeRequest, cachedNonce?: string, cachedState?: string): Promise<AuthenticationResult | null> {
>>>>>>>
async acquireToken(request: AuthorizationCodeRequest, authCodePayload?: AuthorizationCodePayload): Promise<AuthenticationResult | null> {
<<<<<<<
return {
...serverParams,
// Code param is optional in ServerAuthorizationCodeResponse but required in AuthorizationCodePaylod
code: serverParams.code
};
=======
// throw when there is no auth code in the response
if (!serverParams.code) {
throw ClientAuthError.createNoAuthCodeInServerResponseError();
}
return serverParams.code;
>>>>>>>
// throw when there is no auth code in the response
if (!serverParams.code) {
throw ClientAuthError.createNoAuthCodeInServerResponseError();
}
return {
...serverParams,
// Code param is optional in ServerAuthorizationCodeResponse but required in AuthorizationCodePaylod
code: serverParams.code
}; |
<<<<<<<
import {TreeModule} from 'angular-tree-component';
import {EventSchemaPreviewComponent} from './schema-editor/event-schema-preview/event-schema-preview.component';
import {EventPropertyRowComponent} from "./schema-editor/event-property-row/event-property-row.component";
import {PropertySelectorService} from "../services/property-selector.service";
import {StaticColorPickerComponent} from "./static-properties/static-color-picker/static-color-picker.component";
import {ColorPickerModule} from "ngx-color-picker";
import {PipelineElementRuntimeInfoComponent} from "./new-adapter/component/runtime-info/pipeline-element-runtime-info.component";
import {xsService} from "../NS/XS.service";
import {MatSliderModule} from "@angular/material/slider";
import { QuillModule } from 'ngx-quill'
import {MatChipsModule} from "@angular/material/chips";
import {StaticCodeInputComponent} from "./static-properties/static-code-input/static-code-input.component";
import { CodemirrorModule } from '@ctrl/ngx-codemirror';
=======
import { MatChipsModule } from '@angular/material/chips';
import { MatSliderModule } from '@angular/material/slider';
import { TreeModule } from 'angular-tree-component';
import { ColorPickerModule } from 'ngx-color-picker';
import { QuillModule } from 'ngx-quill';
import { xsService } from '../NS/XS.service';
import { PropertySelectorService } from '../services/property-selector.service';
import { EditEventPropertyComponent } from './dialog/edit-event-property/edit-event-property.component';
import { UnitTransformationComponent } from './dialog/unit-transformation/unit-transformation.component';
import { PipelineElementRuntimeInfoComponent } from './new-adapter/component/runtime-info/pipeline-element-runtime-info.component';
import { EventPropertyRowComponent } from './schema-editor/event-property-row/event-property-row.component';
import { EventSchemaPreviewComponent } from './schema-editor/event-schema-preview/event-schema-preview.component';
import { StaticColorPickerComponent } from './static-properties/static-color-picker/static-color-picker.component';
>>>>>>>
import {StaticCodeInputComponent} from "./static-properties/static-code-input/static-code-input.component";
import { CodemirrorModule } from '@ctrl/ngx-codemirror';
import { MatChipsModule } from '@angular/material/chips';
import { MatSliderModule } from '@angular/material/slider';
import { TreeModule } from 'angular-tree-component';
import { ColorPickerModule } from 'ngx-color-picker';
import { QuillModule } from 'ngx-quill';
import { xsService } from '../NS/XS.service';
import { PropertySelectorService } from '../services/property-selector.service';
import { EditEventPropertyComponent } from './dialog/edit-event-property/edit-event-property.component';
import { UnitTransformationComponent } from './dialog/unit-transformation/unit-transformation.component';
import { PipelineElementRuntimeInfoComponent } from './new-adapter/component/runtime-info/pipeline-element-runtime-info.component';
import { EventPropertyRowComponent } from './schema-editor/event-property-row/event-property-row.component';
import { EventSchemaPreviewComponent } from './schema-editor/event-schema-preview/event-schema-preview.component';
import { StaticColorPickerComponent } from './static-properties/static-color-picker/static-color-picker.component';
<<<<<<<
StaticCodeInputComponent,
PipelineElementRuntimeInfoComponent
=======
PipelineElementRuntimeInfoComponent,
UnitTransformationComponent
>>>>>>>
StaticCodeInputComponent,
PipelineElementRuntimeInfoComponent,
UnitTransformationComponent |
<<<<<<<
// Generated using typescript-generator version 2.24.612 on 2020-09-20 21:03:26.
=======
// Generated using typescript-generator version 2.27.744 on 2021-01-19 20:45:10.
>>>>>>>
// Generated using typescript-generator version 2.27.744 on 2021-01-19 20:45:10.
<<<<<<<
export class PipelineElementTopicInfo {
currentOffset: number;
latestOffset: number;
offsetAtPipelineStart: number;
topicName: string;
static fromData(data: PipelineElementTopicInfo, target?: PipelineElementTopicInfo): PipelineElementTopicInfo {
if (!data) {
return data;
}
const instance = target || new PipelineElementTopicInfo();
instance.topicName = data.topicName;
instance.currentOffset = data.currentOffset;
instance.latestOffset = data.latestOffset;
instance.offsetAtPipelineStart = data.offsetAtPipelineStart;
return instance;
}
}
=======
export class PipelineElementTemplate {
_id: string;
_rev: string;
basePipelineElementAppId: string;
templateConfigs: { [index: string]: PipelineElementTemplateConfig };
templateDescription: string;
templateName: string;
static fromData(data: PipelineElementTemplate, target?: PipelineElementTemplate): PipelineElementTemplate {
if (!data) {
return data;
}
const instance = target || new PipelineElementTemplate();
instance.templateName = data.templateName;
instance.templateDescription = data.templateDescription;
instance.basePipelineElementAppId = data.basePipelineElementAppId;
instance.templateConfigs = __getCopyObjectFn(PipelineElementTemplateConfig.fromData)(data.templateConfigs);
instance._id = data._id;
instance._rev = data._rev;
return instance;
}
}
export class PipelineElementTemplateConfig {
displayed: boolean;
editable: boolean;
value: any;
static fromData(data: PipelineElementTemplateConfig, target?: PipelineElementTemplateConfig): PipelineElementTemplateConfig {
if (!data) {
return data;
}
const instance = target || new PipelineElementTemplateConfig();
instance.editable = data.editable;
instance.displayed = data.displayed;
instance.value = data.value;
return instance;
}
}
>>>>>>>
export class PipelineElementTemplate {
_id: string;
_rev: string;
basePipelineElementAppId: string;
templateConfigs: { [index: string]: PipelineElementTemplateConfig };
templateDescription: string;
templateName: string;
static fromData(data: PipelineElementTemplate, target?: PipelineElementTemplate): PipelineElementTemplate {
if (!data) {
return data;
}
const instance = target || new PipelineElementTemplate();
instance.templateName = data.templateName;
instance.templateDescription = data.templateDescription;
instance.basePipelineElementAppId = data.basePipelineElementAppId;
instance.templateConfigs = __getCopyObjectFn(PipelineElementTemplateConfig.fromData)(data.templateConfigs);
instance._id = data._id;
instance._rev = data._rev;
return instance;
}
}
export class PipelineElementTemplateConfig {
displayed: boolean;
editable: boolean;
value: any;
static fromData(data: PipelineElementTemplateConfig, target?: PipelineElementTemplateConfig): PipelineElementTemplateConfig {
if (!data) {
return data;
}
const instance = target || new PipelineElementTemplateConfig();
instance.editable = data.editable;
instance.displayed = data.displayed;
instance.value = data.value;
return instance;
}
}
export class PipelineElementTopicInfo {
currentOffset: number;
latestOffset: number;
offsetAtPipelineStart: number;
topicName: string;
static fromData(data: PipelineElementTopicInfo, target?: PipelineElementTopicInfo): PipelineElementTopicInfo {
if (!data) {
return data;
}
const instance = target || new PipelineElementTopicInfo();
instance.topicName = data.topicName;
instance.currentOffset = data.currentOffset;
instance.latestOffset = data.latestOffset;
instance.offsetAtPipelineStart = data.offsetAtPipelineStart;
return instance;
}
} |
<<<<<<<
import { PipelineLogsComponent } from '../pipeline-logs/pipeline-logs.component';
=======
import {NewComponent} from '../connect/new/new.component';
>>>>>>>
import {PipelineLogsComponent} from '../pipeline-logs/pipeline-logs.component';
import {NewComponent} from '../connect/new/new.component';
<<<<<<<
})
.state('streampipes.pipelinelogs', {
url: '/pipelinelogs',
views: {
'spMain@streampipes': {
component: PipelineLogsComponent
}
}
=======
})
.state('streampipes.connect', {
url: '/connect',
views: {
'spMain@streampipes': {
component: NewComponent
}
}
>>>>>>>
})
.state('streampipes.pipelinelogs', {
url: '/pipelinelogs',
views: {
'spMain@streampipes': {
component: PipelineLogsComponent
}
}
})
.state('streampipes.connect', {
url: '/connect',
views: {
'spMain@streampipes': {
component: NewComponent
}
} |
<<<<<<<
isPublished: data.isPublished,
name: data.name,
publicationDate:
data.publicationDate !== "" ? data.publicationDate : null,
seo: {
description: data.seoDescription,
title: data.seoTitle
},
slug: data.slug,
visibleInListings: data.visibleInListings
=======
input: {
attributes: data.attributes.map(attribute => ({
id: attribute.id,
values: attribute.value[0] === "" ? [] : attribute.value
})),
basePrice: decimal(data.basePrice),
category: data.category,
chargeTaxes: data.chargeTaxes,
collections: data.collections,
descriptionJson: JSON.stringify(data.description),
isPublished: data.isPublished,
name: data.name,
publicationDate:
data.publicationDate !== "" ? data.publicationDate : null,
seo: {
description: data.seoDescription,
title: data.seoTitle
},
taxCode: data.changeTaxCode ? data.taxCode : null,
visibleInListings: data.visibleInListings
}
>>>>>>>
input: {
attributes: data.attributes.map(attribute => ({
id: attribute.id,
values: attribute.value[0] === "" ? [] : attribute.value
})),
basePrice: decimal(data.basePrice),
category: data.category,
chargeTaxes: data.chargeTaxes,
collections: data.collections,
descriptionJson: JSON.stringify(data.description),
isPublished: data.isPublished,
name: data.name,
publicationDate:
data.publicationDate !== "" ? data.publicationDate : null,
seo: {
description: data.seoDescription,
title: data.seoTitle
},
slug: data.slug,
taxCode: data.changeTaxCode ? data.taxCode : null,
visibleInListings: data.visibleInListings
} |
<<<<<<<
import {BBox} from '../../../util/BBox.js';
import {StyleList} from '../../common/CssStyles.js';
=======
import {BBox} from '../BBox.js';
import {StyleList} from '../../../util/StyleList.js';
>>>>>>>
import {BBox} from '../../../util/BBox.js';
import {StyleList} from '../../../util/StyleList.js'; |
<<<<<<<
const responseScopes = ScopeSet.fromString(serverTokenResponse.scope, this.clientId);
UnifiedCacheManager.saveCacheRecord(this.cacheStorage, cacheRecord, this.clientId, responseScopes);
=======
const responseScopes = ScopeSet.fromString(serverTokenResponse.scope);
this.uCacheManager.saveCacheRecord(cacheRecord, responseScopes);
>>>>>>>
const responseScopes = ScopeSet.fromString(serverTokenResponse.scope);
UnifiedCacheManager.saveCacheRecord(this.cacheStorage, cacheRecord, this.clientId, responseScopes); |
<<<<<<<
import {StyleList as CssStyleList} from './common/CssStyles.js';
=======
import {FontCache} from './svg/FontCache.js';
>>>>>>>
import {StyleList as CssStyleList} from './common/CssStyles.js';
import {FontCache} from './svg/FontCache.js';
<<<<<<<
* The default styles for SVG
*/
public static commonStyles: CssStyleList = {
'mjx-container[jax="SVG"] > svg': {
'overflow': 'visible'
},
'mjx-container[jax="SVG"] > svg a': {
fill: 'blue', stroke: 'blue'
}
};
/**
* Used to store the CHTMLWrapper factory,
* the FontData object, and the CssStyles object.
=======
* The ID for the SVG element that stores the cached font paths
*/
public static FONTCACHEID = 'MJX-SVG-global-cache';
/**
* The ID for the stylesheet element for the styles for the SVG output
*/
public static STYLESHEETID = 'MJX-SVG-styles';
/**
* Stores the CHTMLWrapper factory
>>>>>>>
* The default styles for SVG
*/
public static commonStyles: CssStyleList = {
'mjx-container[jax="SVG"] > svg': {
'overflow': 'visible'
},
'mjx-container[jax="SVG"] > svg a': {
fill: 'blue', stroke: 'blue'
}
};
/**
* The ID for the SVG element that stores the cached font paths
*/
public static FONTCACHEID = 'MJX-SVG-global-cache';
/**
* The ID for the stylesheet element for the styles for the SVG output
*/
public static STYLESHEETID = 'MJX-SVG-styles';
/**
* Stores the CHTMLWrapper factory |
<<<<<<<
align: 'top', // placement of magnified expression
backgroundColor: 'Blue', // color for background of selected sub-expression
backgroundOpacity: .2, // opacity for background of selected sub-expression
braille: true, // switch on Braille output
flame: false, // color collapsible sub-expressions
foregroundColor: 'Black', // color to use for text of selected sub-expression
foregroundOpacity: 1, // opacity for text of selected sub-expression
highlight: 'None', // type of highlighting for collapsible sub-expressions
hover: false, // show collapsible sub-expression on mouse hovering
infoPrefix: false, // show speech prefixes on mouse hovering
infoRole: false, // show semantic role on mouse hovering
infoType: false, // show semantic type on mouse hovering
keyMagnifier: false, // switch on magnification via key exploration
magnification: 'None', // type of magnification
magnify: '400%', // percentage of magnification of zoomed expressions
mouseMagnifier: false, // switch on magnification via mouse hovering
speech: true, // switch on speech output
speechRules: 'mathspeak-default', // speech rules as domain-style pair
subtitles: true, // show speech as a subtitle
treeColoring: false, // tree color expression
viewBraille: false // display Braille output as subtitles
=======
align: 'top',
backgroundColor: 'Blue',
backgroundOpacity: .2,
braille: false,
flame: false,
foregroundColor: 'Black',
foregroundOpacity: 1,
highlight: 'None',
hover: false,
infoPrefix: false,
infoRole: false,
infoType: false,
keyMagnifier: false,
magnification: 'None',
magnify: '400%',
mouseMagnifier: false,
speech: true,
speechRules: 'mathspeak-default',
subtitles: true,
treeColoring: false,
viewBraille: false
>>>>>>>
align: 'top', // placement of magnified expression
backgroundColor: 'Blue', // color for background of selected sub-expression
backgroundOpacity: .2, // opacity for background of selected sub-expression
braille: false, // switch on Braille output
flame: false, // color collapsible sub-expressions
foregroundColor: 'Black', // color to use for text of selected sub-expression
foregroundOpacity: 1, // opacity for text of selected sub-expression
highlight: 'None', // type of highlighting for collapsible sub-expressions
hover: false, // show collapsible sub-expression on mouse hovering
infoPrefix: false, // show speech prefixes on mouse hovering
infoRole: false, // show semantic role on mouse hovering
infoType: false, // show semantic type on mouse hovering
keyMagnifier: false, // switch on magnification via key exploration
magnification: 'None', // type of magnification
magnify: '400%', // percentage of magnification of zoomed expressions
mouseMagnifier: false, // switch on magnification via mouse hovering
speech: true, // switch on speech output
speechRules: 'mathspeak-default', // speech rules as domain-style pair
subtitles: true, // show speech as a subtitle
treeColoring: false, // tree color expression
viewBraille: false // display Braille output as subtitles |
<<<<<<<
import { CacheRecord } from "../cache/entities/CacheRecord";
import { IdTokenEntity } from "../cache/entities/IdTokenEntity";
import { CacheHelper } from "../cache/utils/CacheHelper";
import { AccessTokenEntity } from "../cache/entities/AccessTokenEntity";
import { RefreshTokenEntity } from "../cache/entities/RefreshTokenEntity";
=======
import { IdTokenEntity } from "../unifiedCache/entities/IdTokenEntity";
import { CacheHelper } from "../unifiedCache/utils/CacheHelper";
import { AccessTokenEntity } from "../unifiedCache/entities/AccessTokenEntity";
import { RefreshTokenEntity } from "../unifiedCache/entities/RefreshTokenEntity";
>>>>>>>
import { IdTokenEntity } from "../cache/entities/IdTokenEntity";
import { CacheHelper } from "../cache/utils/CacheHelper";
import { AccessTokenEntity } from "../cache/entities/AccessTokenEntity";
import { RefreshTokenEntity } from "../cache/entities/RefreshTokenEntity";
<<<<<<<
if (!expirationSec) {
expirationSec = 0;
}
return (expirationSec > offsetCurrentTimeSec);
=======
return (expirationSec && offsetCurrentTimeSec < expirationSec);
>>>>>>>
if (!expirationSec) {
expirationSec = 0;
}
return (offsetCurrentTimeSec < expirationSec); |
<<<<<<<
import {BBox} from '../../../util/BBox.js';
import {StyleList} from '../../common/CssStyles.js';
=======
import {BBox} from '../BBox.js';
import {StyleList} from '../../../util/StyleList.js';
>>>>>>>
import {BBox} from '../../../util/BBox.js';
import {StyleList} from '../../../util/StyleList.js'; |
<<<<<<<
import {MmlNode, TextNode, AbstractMmlNode, AttributeList} from '../../core/MmlTree/MmlNode.js';
import {MmlMo} from '../../core/MmlTree/MmlNodes/mo.js';
=======
import {MmlNode, TextNode, AbstractMmlNode, AttributeList, indentAttributes} from '../../core/MmlTree/MmlNode.js';
>>>>>>>
import {MmlNode, TextNode, AbstractMmlNode, AttributeList, indentAttributes} from '../../core/MmlTree/MmlNode.js';
import {MmlMo} from '../../core/MmlTree/MmlNodes/mo.js'; |
<<<<<<<
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
this.bbox.h = h / 2 + a;
this.bbox.d = h / 2 - a;
this.bbox.w = W.concat(cLines).reduce((a, b) => a + b) +
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
return this.bbox;
=======
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]);
bbox.h = h / 2 + a;
bbox.d = h / 2 - a;
bbox.w = W.concat(cLines).reduce((a, b) => a + b) +
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]);
>>>>>>>
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
bbox.h = h / 2 + a;
bbox.d = h / 2 - a;
bbox.w = W.concat(cLines).reduce((a, b) => a + b) +
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0'); |
<<<<<<<
import { Constants, SSOTypes, PromptState, BlacklistedEQParams, InteractionType } from "./Constants";
=======
import { Constants, SSOTypes, PromptState, BlacklistedEQParams, InteractionErrorType } from "./Constants";
>>>>>>>
import { Constants, SSOTypes, PromptState, BlacklistedEQParams, InteractionType } from "./Constants";
<<<<<<<
@resolveTokenOnlyIfOutOfIframe
acquireTokenSilent(request: AuthenticationParameters): Promise<AuthResponse> {
=======
acquireTokenPopup(request: AuthenticationParameters): Promise<AuthResponse> {
if (!request) {
throw ClientConfigurationError.createEmptyRequestError();
}
>>>>>>>
@resolveTokenOnlyIfOutOfIframe
acquireTokenSilent(request: AuthenticationParameters): Promise<AuthResponse> {
if (!request) {
throw ClientConfigurationError.createEmptyRequestError();
}
<<<<<<<
//#region Iframe Management
=======
//#region Silent Flow
/**
* Use this function to obtain a token before every call to the API / resource provider
*
* MSAL return's a cached token when available
* Or it send's a request to the STS to obtain a new token using a hidden iframe.
*
* @param {@link AuthenticationParameters}
*
* To renew idToken, please pass clientId as the only scope in the Authentication Parameters
* @returns {Promise.<AuthResponse>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} object
*
*/
@resolveTokenOnlyIfOutOfIframe
acquireTokenSilent(request: AuthenticationParameters): Promise<AuthResponse> {
if (!request) {
throw ClientConfigurationError.createEmptyRequestError();
}
return new Promise<AuthResponse>((resolve, reject) => {
// Validate and filter scopes (the validate function will throw if validation fails)
this.validateInputScope(request.scopes, true);
const scope = request.scopes.join(" ").toLowerCase();
// if the developer passes an account give him the priority
const account: Account = request.account || this.getAccount();
// extract if there is an adalIdToken stashed in the cache
const adalIdToken = this.cacheStorage.getItem(Constants.adalIdToken);
//if there is no account logged in and no login_hint/sid is passed in the request
if (!account && !(request.sid || request.loginHint) && Utils.isEmpty(adalIdToken) ) {
this.logger.info("User login is required");
return reject(ClientAuthError.createUserLoginRequiredError());
}
const responseType = this.getTokenType(account, request.scopes, true);
let serverAuthenticationRequest = new ServerRequestParameters(
AuthorityFactory.CreateInstance(request.authority, this.config.auth.validateAuthority),
this.clientId,
request.scopes,
responseType,
this.getRedirectUri(),
request && request.state
);
// populate QueryParameters (sid/login_hint/domain_hint) and any other extraQueryParameters set by the developer
if (Utils.isSSOParam(request) || account) {
serverAuthenticationRequest = this.populateQueryParams(account, request, serverAuthenticationRequest);
}
//if user didn't pass login_hint/sid and adal's idtoken is present, extract the login_hint from the adalIdToken
else if (!account && !Utils.isEmpty(adalIdToken)) {
// if adalIdToken exists, extract the SSO info from the same
const adalIdTokenObject = Utils.extractIdToken(adalIdToken);
this.logger.verbose("ADAL's idToken exists. Extracting login information from ADAL's idToken ");
serverAuthenticationRequest = this.populateQueryParams(account, null, serverAuthenticationRequest, adalIdTokenObject);
}
let userContainedClaims = request.claimsRequest || serverAuthenticationRequest.claimsValue;
let authErr: AuthError;
let cacheResultResponse;
if (!userContainedClaims && !request.forceRefresh) {
try {
cacheResultResponse = this.getCachedToken(serverAuthenticationRequest, account);
} catch (e) {
authErr = e;
}
}
// resolve/reject based on cacheResult
if (cacheResultResponse) {
this.logger.info("Token is already in cache for scope:" + scope);
resolve(cacheResultResponse);
return null;
}
else if (authErr) {
this.logger.infoPii(authErr.errorCode + ":" + authErr.errorMessage);
reject(authErr);
return null;
}
// else proceed with login
else {
if (userContainedClaims) {
this.logger.verbose("Skipped cache lookup since claims were given.");
} else if (request.forceRefresh) {
this.logger.verbose("Skipped cache lookup since request.forceRefresh option was set to true");
} else {
this.logger.verbose("Token is not in cache for scope:" + scope);
}
// Cache result can return null if cache is empty. In that case, set authority to default value if no authority is passed to the api.
if (!serverAuthenticationRequest.authorityInstance) {
serverAuthenticationRequest.authorityInstance = request.authority ? AuthorityFactory.CreateInstance(request.authority, this.config.auth.validateAuthority) : this.authorityInstance;
}
// cache miss
return serverAuthenticationRequest.authorityInstance.resolveEndpointsAsync()
.then(() => {
// refresh attempt with iframe
// Already renewing for this scope, callback when we get the token.
if (window.activeRenewals[scope]) {
this.logger.verbose("Renew token for scope: " + scope + " is in progress. Registering callback");
// Active renewals contains the state for each renewal.
this.registerCallback(window.activeRenewals[scope], scope, resolve, reject);
}
else {
if (request.scopes && request.scopes.indexOf(this.clientId) > -1 && request.scopes.length === 1) {
// App uses idToken to send to api endpoints
// Default scope is tracked as clientId to store this token
this.logger.verbose("renewing idToken");
this.renewIdToken(request.scopes, resolve, reject, account, serverAuthenticationRequest);
} else {
// renew access token
this.logger.verbose("renewing accesstoken");
this.renewToken(request.scopes, resolve, reject, account, serverAuthenticationRequest);
}
}
}).catch((err) => {
this.logger.warning("could not resolve endpoints");
reject(ClientAuthError.createEndpointResolutionError(err.toString()));
return null;
});
}
});
}
>>>>>>>
//#region Iframe Management
<<<<<<<
=======
*/
private isInteractionRequired(errorString: string) : boolean {
const errorTypes = [InteractionErrorType.INTERACTION, InteractionErrorType.CONSENT, InteractionErrorType.LOGIN];
return errorString && errorTypes.indexOf(errorString) > -1;
}
/**
* @hidden
>>>>>>>
<<<<<<<
if (InteractionRequiredAuthError.isInteractionRequiredError(hashParams[Constants.error]) ||
InteractionRequiredAuthError.isInteractionRequiredError(hashParams[Constants.errorDescription])) {
=======
const {
[Constants.error]: hashErr,
[Constants.errorDescription]: hashErrDesc
} = hashParams;
if ((this.isInteractionRequired(hashErr)) || (this.isInteractionRequired(hashErrDesc))) {
>>>>>>>
const {
[Constants.error]: hashErr,
[Constants.errorDescription]: hashErrDesc
} = hashParams;
if (InteractionRequiredAuthError.isInteractionRequiredError(hashErr) ||
InteractionRequiredAuthError.isInteractionRequiredError(hashErrDesc)) { |
<<<<<<<
import { IPublicClientApplication } from "./IPublicClientApplication";
=======
import { DeviceCodeRequest } from "../request/DeviceCodeRequest";
import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest";
>>>>>>>
import { IPublicClientApplication } from "./IPublicClientApplication";
import { DeviceCodeRequest } from "../request/DeviceCodeRequest";
import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest"; |
<<<<<<<
import {CHTMLmaction} from './Wrappers/maction.js';
=======
import {CHTMLmglyph} from './Wrappers/mglyph.js';
>>>>>>>
import {CHTMLmaction} from './Wrappers/maction.js';
import {CHTMLmglyph} from './Wrappers/mglyph.js';
<<<<<<<
[CHTMLmaction.kind]: CHTMLmaction,
=======
[CHTMLmglyph.kind]: CHTMLmglyph,
>>>>>>>
[CHTMLmaction.kind]: CHTMLmaction,
[CHTMLmglyph.kind]: CHTMLmglyph, |
<<<<<<<
* Variant locations in the Math Alphabnumerics block:
* [upper-alpha, lower-alpha, upper-Greek, lower-Greek, numbers]
*/
public static VariantSmp: {[name: string]: SmpData} = {
bold: [0x1D400, 0x1D41A, 0x1D6A8, 0x1D6C2, 0x1D7CE],
italic: [0x1D434, 0x1D44E, 0x1D6E2, 0x1D6FC],
'bold-italic': [0x1D468, 0x1D482, 0x1D71C, 0x1D736],
script: [0x1D49C, 0x1D4B6],
'bold-script': [0x1D4D0, 0x1D4EA],
fraktur: [0x1D504, 0x1D51E],
'double-struck': [0x1D538, 0x1D552, , , 0x1D7D8],
'bold-fraktur': [0x1D56C, 0x1D586],
'sans-serif': [0x1D5A0, 0x1D5BA, , , 0x1D7E2],
'bold-sans-serif': [0x1D5D4, 0x1D5EE, 0x1D756, 0x1D770, 0x1D7EC],
'sans-serif-italic': [0x1D608, 0x1D622],
'sans-serif-bold-italic': [0x1D63C, 0x1D656, 0x1D790, 0x1D7AA],
'monospace': [0x1D670, 0x1D68A, , , 0x1D7F6]
};
/**
* Character ranges to remap into Math Alphanumerics
*/
public static SmpRanges = [
[0, 0x41, 0x5A], // Upper-case alpha
[1, 0x61, 0x7A], // Lower-case alpha
[2, 0x391, 0x3A9], // Upper-case Greek
[3, 0x3B1, 0x3C9], // Lower-case Greek
[4, 0x30, 0x39] // Numbers
];
/**
* Characters to map back top other Unicode positions
* (holes in the Math Alphanumeric ranges)
*/
public static SmpRemap: SmpMap = {
0x1D455: 0x210E, // PLANCK CONSTANT
0x1D49D: 0x212C, // SCRIPT CAPITAL B
0x1D4A0: 0x2130, // SCRIPT CAPITAL E
0x1D4A1: 0x2131, // SCRIPT CAPITAL F
0x1D4A3: 0x210B, // SCRIPT CAPITAL H
0x1D4A4: 0x2110, // SCRIPT CAPITAL I
0x1D4A7: 0x2112, // SCRIPT CAPITAL L
0x1D4A8: 0x2133, // SCRIPT CAPITAL M
0x1D4AD: 0x211B, // SCRIPT CAPITAL R
0x1D4BA: 0x212F, // SCRIPT SMALL E
0x1D4BC: 0x210A, // SCRIPT SMALL G
0x1D4C4: 0x2134, // SCRIPT SMALL O
0x1D506: 0x212D, // BLACK-LETTER CAPITAL C
0x1D50B: 0x210C, // BLACK-LETTER CAPITAL H
0x1D50C: 0x2111, // BLACK-LETTER CAPITAL I
0x1D515: 0x211C, // BLACK-LETTER CAPITAL R
0x1D51D: 0x2128, // BLACK-LETTER CAPITAL Z
0x1D53A: 0x2102, // DOUBLE-STRUCK CAPITAL C
0x1D53F: 0x210D, // DOUBLE-STRUCK CAPITAL H
0x1D545: 0x2115, // DOUBLE-STRUCK CAPITAL N
0x1D547: 0x2119, // DOUBLE-STRUCK CAPITAL P
0x1D548: 0x211A, // DOUBLE-STRUCK CAPITAL Q
0x1D549: 0x211D, // DOUBLE-STRUCK CAPITAL R
0x1D551: 0x2124, // DOUBLE-STRUCK CAPITAL Z
};
/**
* Greek upper-case variants
*/
public static SmpRemapGreekU: SmpMap = {
0x2207: 0x19, // nabla
0x03F4: 0x11 // theta symbol
};
/**
* Greek lower-case variants
*/
public static SmpRemapGreekL: SmpMap = {
0x3D1: 0x1B, // theta symbol
0x3D5: 0x1D, // phi symbol
0x3D6: 0x1F, // omega symbol
0x3F0: 0x1C, // kappa symbol
0x3F1: 0x1E, // rho symbol
0x3F5: 0x1A, // lunate epsilon symbol
0x2202: 0x19 // partial differential
};
/**
=======
* The default prefix for explicit font-family settings
*/
protected static defaultCssFamilyPrefix = '';
/**
>>>>>>>
* The default prefix for explicit font-family settings
*/
protected static defaultCssFamilyPrefix = '';
/**
* Variant locations in the Math Alphabnumerics block:
* [upper-alpha, lower-alpha, upper-Greek, lower-Greek, numbers]
*/
public static VariantSmp: {[name: string]: SmpData} = {
bold: [0x1D400, 0x1D41A, 0x1D6A8, 0x1D6C2, 0x1D7CE],
italic: [0x1D434, 0x1D44E, 0x1D6E2, 0x1D6FC],
'bold-italic': [0x1D468, 0x1D482, 0x1D71C, 0x1D736],
script: [0x1D49C, 0x1D4B6],
'bold-script': [0x1D4D0, 0x1D4EA],
fraktur: [0x1D504, 0x1D51E],
'double-struck': [0x1D538, 0x1D552, , , 0x1D7D8],
'bold-fraktur': [0x1D56C, 0x1D586],
'sans-serif': [0x1D5A0, 0x1D5BA, , , 0x1D7E2],
'bold-sans-serif': [0x1D5D4, 0x1D5EE, 0x1D756, 0x1D770, 0x1D7EC],
'sans-serif-italic': [0x1D608, 0x1D622],
'sans-serif-bold-italic': [0x1D63C, 0x1D656, 0x1D790, 0x1D7AA],
'monospace': [0x1D670, 0x1D68A, , , 0x1D7F6]
};
/**
* Character ranges to remap into Math Alphanumerics
*/
public static SmpRanges = [
[0, 0x41, 0x5A], // Upper-case alpha
[1, 0x61, 0x7A], // Lower-case alpha
[2, 0x391, 0x3A9], // Upper-case Greek
[3, 0x3B1, 0x3C9], // Lower-case Greek
[4, 0x30, 0x39] // Numbers
];
/**
* Characters to map back top other Unicode positions
* (holes in the Math Alphanumeric ranges)
*/
public static SmpRemap: SmpMap = {
0x1D455: 0x210E, // PLANCK CONSTANT
0x1D49D: 0x212C, // SCRIPT CAPITAL B
0x1D4A0: 0x2130, // SCRIPT CAPITAL E
0x1D4A1: 0x2131, // SCRIPT CAPITAL F
0x1D4A3: 0x210B, // SCRIPT CAPITAL H
0x1D4A4: 0x2110, // SCRIPT CAPITAL I
0x1D4A7: 0x2112, // SCRIPT CAPITAL L
0x1D4A8: 0x2133, // SCRIPT CAPITAL M
0x1D4AD: 0x211B, // SCRIPT CAPITAL R
0x1D4BA: 0x212F, // SCRIPT SMALL E
0x1D4BC: 0x210A, // SCRIPT SMALL G
0x1D4C4: 0x2134, // SCRIPT SMALL O
0x1D506: 0x212D, // BLACK-LETTER CAPITAL C
0x1D50B: 0x210C, // BLACK-LETTER CAPITAL H
0x1D50C: 0x2111, // BLACK-LETTER CAPITAL I
0x1D515: 0x211C, // BLACK-LETTER CAPITAL R
0x1D51D: 0x2128, // BLACK-LETTER CAPITAL Z
0x1D53A: 0x2102, // DOUBLE-STRUCK CAPITAL C
0x1D53F: 0x210D, // DOUBLE-STRUCK CAPITAL H
0x1D545: 0x2115, // DOUBLE-STRUCK CAPITAL N
0x1D547: 0x2119, // DOUBLE-STRUCK CAPITAL P
0x1D548: 0x211A, // DOUBLE-STRUCK CAPITAL Q
0x1D549: 0x211D, // DOUBLE-STRUCK CAPITAL R
0x1D551: 0x2124, // DOUBLE-STRUCK CAPITAL Z
};
/**
* Greek upper-case variants
*/
public static SmpRemapGreekU: SmpMap = {
0x2207: 0x19, // nabla
0x03F4: 0x11 // theta symbol
};
/**
* Greek lower-case variants
*/
public static SmpRemapGreekL: SmpMap = {
0x3D1: 0x1B, // theta symbol
0x3D5: 0x1D, // phi symbol
0x3D6: 0x1F, // omega symbol
0x3F0: 0x1C, // kappa symbol
0x3F1: 0x1E, // rho symbol
0x3F5: 0x1A, // lunate epsilon symbol
0x2202: 0x19 // partial differential
};
/** |
<<<<<<<
import { B2cAuthority } from "../authority/B2cAuthority";
=======
import { UnifiedCacheManager } from "../unifiedCache/UnifiedCacheManager";
>>>>>>>
import { B2cAuthority } from "../authority/B2cAuthority";
import { UnifiedCacheManager } from "../unifiedCache/UnifiedCacheManager"; |
<<<<<<<
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]);
bbox.h = h / 2 + a;
bbox.d = h / 2 - a;
bbox.w = W.concat(cLines).reduce((a, b) => a + b) +
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1]);
=======
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
this.bbox.h = h / 2 + a;
this.bbox.d = h / 2 - a;
this.bbox.w = W.concat(cLines).reduce((a, b) => a + b) +
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
return this.bbox;
>>>>>>>
rSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0');
bbox.h = h / 2 + a;
bbox.d = h / 2 - a;
bbox.w = W.concat(cLines).reduce((a, b) => a + b) +
cSpace.map(x => parseFloat(x)).reduce((a, b) => a + b) + 2 * parseFloat(fSpace[1] || '0'); |
<<<<<<<
const expr = document.getText(Range.create(startPosition, position));
if (!expr.trim().endsWith('=')) {
=======
const text = document.getText(Range.create(startPosition, position));
if (!text.trimRight().endsWith('=')) {
>>>>>>>
const expr = document.getText(Range.create(startPosition, position));
if (!expr.trimRight().endsWith('=')) {
<<<<<<<
const newText = expr.endsWith(' ') ? result : ' ' + result;
=======
const newText: string = text.endsWith(' =') ? ' ' + result : result;
>>>>>>>
const newText = expr.endsWith(' =') ? ' ' + result : result;
<<<<<<<
documentation: expr.slice(skip).trimLeft() + newText,
=======
documentation: '`' + text.slice(skip).trimLeft() + newText + '`',
>>>>>>>
documentation: '`' + expr.slice(skip).trimLeft() + newText + '`', |
<<<<<<<
@Component({
selector: 'inline-editor',
template: `<div>
<div id="inlineEditWrapper">
<a [ngClass]="{'editable-empty': isEmpty }" (click)="edit(value)" [hidden]="editing && !disabled">{{ showText() }}</a>
<div class="inlineEditForm form-inline" [hidden]="!editing || disabled">
<div class="form-group">
<div #container></div>
<span>
<button id="inline-editor-button-save" class="btn btn-xs btn-primary" (click)="onSubmit(value)">
<span class="fa fa-check"></span>
</button>
<button class="btn btn-xs btn-danger" (click)="cancel(value)">
<span class="fa fa-remove"></span>
</button>
</span>
</div>
</div>
</div>
</div>`,
styles: [`a {
text-decoration: none;
color: #428bca;
border-bottom: dashed 1px #428bca;
cursor: pointer;
line-height: 2;
margin-right: 5px;
margin-left: 5px;
=======
const INLINE_EDITOR_TEMPLATE = `
<div id="inlineEditWrapper">
<div [ngSwitch]="type">
<template [ngSwitchCase]="'password'">
<a [ngClass]="{'editable-empty': isEmpty }" (click)="edit(value)" [hidden]="editing"> ****** </a>
</template>
<template [ngSwitchCase]="'select'">
<a [ngClass]="{'editable-empty': isEmpty }"
(click)="edit(value)" [hidden]="editing"> {{optionSelected()}} </a>
</template>
<template ngSwitchDefault>
<a [ngClass]="{'editable-empty': isEmpty }" (click)="edit(value)" [hidden]="editing">{{ showText() }}</a>
</template>
</div>
<!-- inline edit form -->
<div class="inlineEditForm form-inline" [hidden]="!editing">
<div class="form-group">
<!-- inline edit control -->
<p [ngSwitch]="type">
<template [ngSwitchCase]="'text'">
<input #inlineEditControl class="form-control" [(ngModel)]="value" [required]="required"
[disabled]="disabled" [name]="name" [placeholder]="placeholder" [size]="size"/>
</template>
<template [ngSwitchCase]="'textarea'">
<textarea [rows]="rows" [cols]="cols" #inlineEditControl class="form-control" [(ngModel)]="value"
[required]="required" [placeholder]="placeholder" [disabled]="disabled" ></textarea>
</template>
<template [ngSwitchCase]="'range'">
<input #inlineEditControl class="form-control" [(ngModel)]="value" [required]="required"
type="range" [disabled]="disabled" [max]="max" [min]="min" [name]="name"/>
</template>
<template [ngSwitchCase]="'select'">
<select #inlineEditControl class="form-control" [(ngModel)]="value">
<template ngFor let-item [ngForOf]="options.data">
<optgroup *ngIf="item.children" label="{{item[options.text]}}">
<option *ngFor="let child of item.children" value="{{child[options.value]}}">
{{child[options.text]}}
</option>
</optgroup>
<option *ngIf="!item.children" value="{{item[options.value]}}">{{item[options.text]}}</option>
</template>
</select>
</template>
<template ngSwitchDefault>
<input [type]="type" #inlineEditControl class="form-control" [(ngModel)]="value"
[required]="required" [placeholder]="placeholder" [disabled]="disabled" [name]="name"
[size]="size"/>
</template>
<span class="inline-editor-button-group">
<button id="inline-editor-button-save" class="btn btn-xs btn-primary"
(click)="onSubmit(value)"><span class="fa fa-check"></span></button>
<button class="btn btn-xs btn-danger" (click)="cancel(value)"><span class="fa fa-remove"></span> </button>
</span>
</p>
</div>
</div>
</div>`;
const INLINE_EDITOR_CSS = `
a {
text-decoration: none;
color: #428bca;
border-bottom: dashed 1px #428bca;
cursor: pointer;
line-height: 2;
margin-right: 5px;
margin-left: 5px;
>>>>>>>
@Component({
selector: 'inline-editor',
template: `<div>
<div id="inlineEditWrapper">
<a [ngClass]="{'editable-empty': isEmpty }" (click)="edit(value)" [hidden]="editing && !disabled">{{ showText() }}</a>
<div class="inlineEditForm form-inline" [hidden]="!editing || disabled">
<div class="form-group">
<div #container></div>
<span class="inline-editor-button-group">
<button id="inline-editor-button-save" class="btn btn-xs btn-primary"
(click)="onSubmit(value)"><span class="fa fa-check"></span></button>
<button class="btn btn-xs btn-danger" (click)="cancel(value)"><span class="fa fa-remove"></span> </button>
</span>
</div>
</div>
</div>
</div>`,
styles: [`a {
text-decoration: none;
color: #428bca;
border-bottom: dashed 1px #428bca;
cursor: pointer;
line-height: 2;
margin-right: 5px;
margin-left: 5px;
<<<<<<<
.editInvalid {
color: #a94442;
margin-bottom: 0;
=======
.inline-editor-button-group{
display:inline-block;
}
.editInvalid{
color: #a94442;
margin-bottom: 0;
>>>>>>>
.inline-editor-button-group{
display:inline-block;
}
.editInvalid{
color: #a94442;
margin-bottom: 0;
<<<<<<<
//select's attribute
@Input() public options: SelectOptions;
//@Output() public selected:EventEmitter<any> = new EventEmitter();
=======
// select's attribute
@Input()
set options(options) {
if (options['data'] === undefined) {
this._options = {};
this._options['data'] = options;
this._options['value'] = 'value';
this._options['text'] = 'text';
} else {
this._options = options;
}
}
get options() { return this._options; }
// @Output() public selected:EventEmitter<any> = new EventEmitter();
>>>>>>>
// select's attribute
@Input()
set options(options) {
if (options['data'] === undefined) {
this._options = {};
this._options['data'] = options;
this._options['value'] = 'value';
this._options['text'] = 'text';
} else {
this._options = options;
}
}
get options() { return this._options; }
// @Output() public selected:EventEmitter<any> = new EventEmitter();
<<<<<<<
public editing: boolean = false;
public isEmpty: boolean = false;
=======
private editing: boolean = false;
private isEmpty: boolean = false;
private _options;
>>>>>>>
private editing: boolean = false;
public isEmpty: boolean = false;
private _options;
<<<<<<<
if (this.type === 'select' && this.options['data'] === undefined) {
this.options = {
data: this.options as any,
value: 'value',
text: 'text'
};
}
=======
>>>>>>>
<<<<<<<
cancel(value: any): void {
this._value = this.preValue;
=======
cancel(value: any) {
this.value = this.preValue;
>>>>>>>
cancel(value: any): void {
this.value = this.preValue;
<<<<<<<
public showText(): any {
return this.inputInstance.getPlaceholder();
=======
private showText() {
return (this.isEmpty) ? this.empty : this.value;
}
private optionSelected() {
let dataLength = this._options['data'].length;
let i = 0;
while (dataLength > i) {
let element = this._options['data'][i];
if (element[this._options['value']] === this['value']) {
return element[this._options['text']];
}
if (element.hasOwnProperty('children')) {
let childrenLength = element.children.length;
let j = 0;
while (childrenLength > j) {
let children = element.children[j];
if (children[this._options['value']] === this['value']) {
return children[this._options['text']];
}
j++;
}
}
i++;
}
return this.empty;
>>>>>>>
public showText(): any {
return this.inputInstance.getPlaceholder(); |
<<<<<<<
menuToggle?: boolean | string;
=======
jsonSampleExpandLevel?: number | string | 'all';
>>>>>>>
menuToggle?: boolean | string;
jsonSampleExpandLevel?: number | string | 'all';
<<<<<<<
menuToggle: boolean;
=======
jsonSampleExpandLevel: number;
enumSkipQuotes: boolean;
>>>>>>>
menuToggle: boolean;
jsonSampleExpandLevel: number;
enumSkipQuotes: boolean;
<<<<<<<
this.menuToggle = argValueToBoolean(raw.menuToggle);
=======
this.jsonSampleExpandLevel = RedocNormalizedOptions.normalizeJsonSampleExpandLevel(
raw.jsonSampleExpandLevel,
);
this.enumSkipQuotes = argValueToBoolean(raw.enumSkipQuotes);
>>>>>>>
this.menuToggle = argValueToBoolean(raw.menuToggle);
this.jsonSampleExpandLevel = RedocNormalizedOptions.normalizeJsonSampleExpandLevel(
raw.jsonSampleExpandLevel,
);
this.enumSkipQuotes = argValueToBoolean(raw.enumSkipQuotes); |
<<<<<<<
isInitial: boolean;
=======
>>>>>>>
isInitial: boolean; |
<<<<<<<
// Initialize authority or use default, and perform discovery endpoint check.
const acquireTokenAuthority = (request && request.authority) ? AuthorityFactory.createInstance(request.authority, this.networkClient) : this.defaultAuthorityInstance;
if (!acquireTokenAuthority.discoveryComplete()) {
try {
await acquireTokenAuthority.resolveEndpointsAsync();
} catch (e) {
throw ClientAuthError.createEndpointDiscoveryIncompleteError(e);
}
}
// Get account object for this request.
=======
>>>>>>>
// Get account object for this request.
<<<<<<<
const expiration = Number(cachedTokenItem.value.expiresOnSec);
const offsetCurrentTime = TimeUtils.now() + this.clientConfig.systemOptions.tokenRenewalOffsetSeconds;
// Check if refresh is forced, or if tokens are expired. If neither are true, return a token response with the found token entry.
if (!request.forceRefresh && expiration && expiration > offsetCurrentTime) {
=======
const expirationSec = Number(cachedTokenItem.value.expiresOnSec);
const offsetCurrentTimeSec = TimeUtils.nowSeconds() + this.clientConfig.systemOptions.tokenRenewalOffsetSeconds;
if (!request.forceRefresh && expirationSec && expirationSec > offsetCurrentTimeSec) {
>>>>>>>
const expirationSec = Number(cachedTokenItem.value.expiresOnSec);
const offsetCurrentTimeSec = TimeUtils.nowSeconds() + this.clientConfig.systemOptions.tokenRenewalOffsetSeconds;
// Check if refresh is forced, or if tokens are expired. If neither are true, return a token response with the found token entry.
if (!request.forceRefresh && expirationSec && expirationSec > offsetCurrentTimeSec) {
<<<<<<<
// Only populate id token if it exists in cache item.
if (!StringUtils.isEmpty(cachedTokenItem.value.idToken)) {
const idTokenObject = new IdToken(cachedTokenItem.value.idToken, this.cryptoObj);
tokenResponse = ResponseHandler.setResponseIdToken(tokenResponse, idTokenObject);
}
return tokenResponse;
=======
return StringUtils.isEmpty(cachedTokenItem.value.idToken) ? defaultTokenResponse :
ResponseHandler.setResponseIdToken(defaultTokenResponse, new IdToken(cachedTokenItem.value.idToken, this.cryptoObj));
>>>>>>>
// Only populate id token if it exists in cache item.
return StringUtils.isEmpty(cachedTokenItem.value.idToken) ? defaultTokenResponse :
ResponseHandler.setResponseIdToken(defaultTokenResponse, new IdToken(cachedTokenItem.value.idToken, this.cryptoObj));
<<<<<<<
// Filter cache items based on available scopes.
const filteredCacheItems: Array<AccessTokenCacheItem> = [];
for (let i = 0; i < tokenCacheItems.length; i++) {
const cacheItem = tokenCacheItems[i];
=======
const filteredCacheItems: Array<AccessTokenCacheItem> = tokenCacheItems.filter(cacheItem => {
>>>>>>>
// Filter cache items based on available scopes.
const filteredCacheItems: Array<AccessTokenCacheItem> = tokenCacheItems.filter(cacheItem => {
<<<<<<<
} else {
// If cache items are empty, throw error.
throw ClientAuthError.createNoTokensFoundError(requestScopes.printScopes());
}
=======
}
throw ClientAuthError.createNoTokensFoundError(requestScopes.printScopes());
>>>>>>>
}
// If cache items are empty, throw error.
throw ClientAuthError.createNoTokensFoundError(requestScopes.printScopes()); |
<<<<<<<
import { Datasource } from "api/DatasourcesApi";
import { Plugin } from "api/PluginApi";
import { PLUGIN_PACKAGE_DBS } from "constants/QueryEditorConstants";
=======
import { RestAction } from "entities/Action";
import { isDynamicValue } from "utils/DynamicBindingUtils";
>>>>>>>
import { Datasource } from "api/DatasourcesApi";
import { Plugin } from "api/PluginApi";
import { PLUGIN_PACKAGE_DBS } from "constants/QueryEditorConstants";
import { RestAction } from "entities/Action";
import { isDynamicValue } from "utils/DynamicBindingUtils"; |
<<<<<<<
import { UserAgentApplication } from "../src/index";
import { Constants, ErrorCodes, ErrorDescription } from "../src/Constants";
import { Authority } from "../src/Authority";
import { AuthenticationRequestParameters } from "../src/AuthenticationRequestParameters";
import { AuthorityFactory } from "../src/AuthorityFactory";
import { buildConfiguration } from "../src/Configuration";
import { AuthenticationParameters } from "../src/Request";
=======
import {UserAgentApplication, AuthError, ClientConfigurationError, ClientAuthError} from '../src/index';
import { Constants, ErrorCodes, ErrorDescription} from '../src/Constants';
import {Authority} from "../src/Authority";
import {AuthenticationRequestParameters} from "../src/AuthenticationRequestParameters";
import {AuthorityFactory} from "../src/AuthorityFactory";
>>>>>>>
import {UserAgentApplication, AuthError, ClientConfigurationError, ClientAuthError} from "../src/index";
import { Constants, ErrorCodes, ErrorDescription } from "../src/Constants";
import { Authority } from "../src/Authority";
import { AuthenticationRequestParameters } from "../src/AuthenticationRequestParameters";
import { AuthorityFactory } from "../src/AuthorityFactory";
import { buildConfiguration } from "../src/Configuration";
import { AuthenticationParameters } from "../src/Request";
<<<<<<<
msal.userLoginInProgress = true;
var errDesc = '', token = '', err = '', tokenType = '';
var callback = function (valErrDesc:string, valToken:string, valErr:string, valTokenType:string) {
errDesc = valErrDesc;
token = valToken;
err = valErr;
tokenType = valTokenType;
};
msal.tokenReceivedCallback = callback;
msal.loginRedirect();
expect(errDesc).toBe(ErrorDescription.loginProgressError);
expect(err).toBe(ErrorCodes.loginProgressError);
expect(token).toBe(null);
expect(tokenType).toBe(Constants.idToken);
msal.userLoginInProgress = false;
=======
msal._loginInProgress = true;
var authErr: AuthError;
try {
msal.loginRedirect();
} catch (e) {
authErr = e;
}
expect(authErr).toEqual(jasmine.any(ClientAuthError));
msal._loginInProgress = false;
>>>>>>>
msal._loginInProgress = true;
var authErr: AuthError;
try {
msal.loginRedirect();
} catch (e) {
authErr = e;
}
expect(authErr).toEqual(jasmine.any(ClientAuthError));
msal._loginInProgress = false;
<<<<<<<
var errDesc = '', token = '', err = '', tokenType = '';
var callback = function (valErrDesc: string, valToken: string, valErr: string, valTokenType: string) {
errDesc = valErrDesc;
token = valToken;
err = valErr;
tokenType = valTokenType;
};
msal.tokenReceivedCallback = callback;
let request: AuthenticationParameters = {scopes: []};
msal.loginRedirect(request);
expect(errDesc).toBe(ErrorDescription.inputScopesError);
expect(err).toBe(ErrorCodes.inputScopesError);
expect(token).toBe(null);
expect(tokenType).toBe(Constants.idToken);
=======
var authErr: AuthError;
try {
msal.loginRedirect([]);
} catch (e) {
authErr = e;
}
expect(authErr).toEqual(jasmine.any(ClientConfigurationError));
>>>>>>>
var authErr: AuthError;
const request: AuthenticationParameters = {scopes: []};
try {
msal.loginRedirect(request);
} catch (e) {
authErr = e;
}
expect(authErr).toEqual(jasmine.any(ClientConfigurationError));
<<<<<<<
msal.tokenReceivedCallback = callback;
let request: AuthenticationParameters = {scopes: [msal.clientId,'123']};
msal.loginRedirect(request);
expect(errDesc).toBe(ErrorDescription.inputScopesError);
expect(err).toBe(ErrorCodes.inputScopesError);
expect(token).toBe(null);
expect(tokenType).toBe(Constants.idToken);
=======
var authErr = AuthError;
msal._tokenReceivedCallback = callback;
try {
msal.loginRedirect([msal.clientId,'123']);
} catch (e) {
authErr = e;
}
expect(authErr).toEqual(jasmine.any(ClientConfigurationError));
// expect(errDesc).toBe(ErrorDescription.inputScopesError);
// expect(err).toBe(ErrorCodes.inputScopesError);
// expect(token).toBe(null);
// expect(tokenType).toBe(Constants.idToken);
});
it('tests if error is not thrown if null scope is passed when scopesRequired is false', function () {
var scopes;
var err: AuthError;
try {
msal.validateInputScope(scopes, false);
} catch (e) {
err = e;
}
expect(err).toEqual(undefined);
});
it('tests if error is thrown when null scopes are passed', function () {
var scopes;
var err: AuthError;
try {
msal.validateInputScope(scopes, true);
} catch (e) {
err = e;
}
expect(err).toEqual(jasmine.any(ClientConfigurationError));
>>>>>>>
var authErr = AuthError;
msal._tokenReceivedCallback = callback;
let request: AuthenticationParameters = {scopes: [msal.clientId,'123']};
try {
msal.loginRedirect(request);
} catch (e) {
authErr = e;
}
expect(authErr).toEqual(jasmine.any(ClientConfigurationError));
// expect(errDesc).toBe(ErrorDescription.inputScopesError);
// expect(err).toBe(ErrorCodes.inputScopesError);
// expect(token).toBe(null);
// expect(tokenType).toBe(Constants.idToken);
});
it('tests if error is not thrown if null scope is passed when scopesRequired is false', function () {
var scopes;
var err: AuthError;
try {
msal.validateInputScope(scopes, false);
} catch (e) {
err = e;
}
expect(err).toEqual(undefined);
});
it('tests if error is thrown when null scopes are passed', function () {
var scopes;
var err: AuthError;
try {
msal.validateInputScope(scopes, true);
} catch (e) {
err = e;
}
expect(err).toEqual(jasmine.any(ClientConfigurationError));
<<<<<<<
it('tests if you get the state back in tokenReceived callback, if state is a number', function () {
spyOn(msal, 'getUserState').and.returnValue("1234");
msal.userLoginInProgress = true;
var errDesc = '', token = '', err = '', tokenType = '', state= '' ;
var callback = function (valErrDesc:string, valToken:string, valErr:string, valTokenType:string, valState: string) {
errDesc = valErrDesc;
token = valToken;
err = valErr;
tokenType = valTokenType;
state= valState;
};
msal.tokenReceivedCallback = callback;
msal.loginRedirect();
expect(errDesc).toBe(ErrorDescription.loginProgressError);
expect(err).toBe(ErrorCodes.loginProgressError);
expect(token).toBe(null);
expect(tokenType).toBe(Constants.idToken);
expect(state).toBe('1234');
msal.userLoginInProgress = false;
});
it('tests if you get the state back in tokenReceived callback, if state is a url', function () {
spyOn(msal, 'getUserState').and.returnValue("https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow?name=value&name2=value2");
msal.userLoginInProgress = true;
var errDesc = '', token = '', err = '', tokenType = '', state= '' ;
var callback = function (valErrDesc:string, valToken:string, valErr:string, valTokenType:string, valState: string) {
errDesc = valErrDesc;
token = valToken;
err = valErr;
tokenType = valTokenType;
state = valState;
};
msal.tokenReceivedCallback = callback;
msal.loginRedirect();
expect(errDesc).toBe(ErrorDescription.loginProgressError);
expect(err).toBe(ErrorCodes.loginProgressError);
expect(token).toBe(null);
expect(tokenType).toBe(Constants.idToken);
expect(state).toBe('https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow?name=value&name2=value2');
msal.userLoginInProgress = false;
});
=======
// We no longer return state as a part of the error, so these tests need to be updated
// it('tests if you get the state back in tokenReceived callback, if state is a number', function () {
// spyOn(msal, 'getUserState').and.returnValue("1234");
// msal._loginInProgress = true;
// var errDesc = '', token = '', err = '', tokenType = '', state= '' ;
// var callback = function (valErrDesc:string, valToken:string, valErr:string, valTokenType:string, valState: string) {
// errDesc = valErrDesc;
// token = valToken;
// err = valErr;
// tokenType = valTokenType;
// state= valState;
// };
// msal._tokenReceivedCallback = callback;
// msal.loginRedirect();
// expect(errDesc).toBe(ErrorDescription.loginProgressError);
// expect(err).toBe(ErrorCodes.loginProgressError);
// expect(token).toBe(null);
// expect(tokenType).toBe(Constants.idToken);
// expect(state).toBe('1234');
// msal._loginInProgress = false;
// });
// it('tests if you get the state back in tokenReceived callback, if state is a url', function () {
// spyOn(msal, 'getUserState').and.returnValue("https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow?name=value&name2=value2");
// msal._loginInProgress = true;
// var errDesc = '', token = '', err = '', tokenType = '', state= '' ;
// var callback = function (valErrDesc:string, valToken:string, valErr:string, valTokenType:string, valState: string) {
// errDesc = valErrDesc;
// token = valToken;
// err = valErr;
// tokenType = valTokenType;
// state= valState;
// };
// msal._tokenReceivedCallback = callback;
// msal.loginRedirect();
// expect(errDesc).toBe(ErrorDescription.loginProgressError);
// expect(err).toBe(ErrorCodes.loginProgressError);
// expect(token).toBe(null);
// expect(tokenType).toBe(Constants.idToken);
// expect(state).toBe('https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow?name=value&name2=value2');
// msal._loginInProgress = false;
// });
>>>>>>>
// We no longer return state as a part of the error, so these tests need to be updated
// it('tests if you get the state back in tokenReceived callback, if state is a number', function () {
// spyOn(msal, 'getUserState').and.returnValue("1234");
// msal._loginInProgress = true;
// var errDesc = '', token = '', err = '', tokenType = '', state= '' ;
// var callback = function (valErrDesc:string, valToken:string, valErr:string, valTokenType:string, valState: string) {
// errDesc = valErrDesc;
// token = valToken;
// err = valErr;
// tokenType = valTokenType;
// state= valState;
// };
// msal._tokenReceivedCallback = callback;
// msal.loginRedirect();
// expect(errDesc).toBe(ErrorDescription.loginProgressError);
// expect(err).toBe(ErrorCodes.loginProgressError);
// expect(token).toBe(null);
// expect(tokenType).toBe(Constants.idToken);
// expect(state).toBe('1234');
// msal._loginInProgress = false;
// });
// it('tests if you get the state back in tokenReceived callback, if state is a url', function () {
// spyOn(msal, 'getUserState').and.returnValue("https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow?name=value&name2=value2");
// msal._loginInProgress = true;
// var errDesc = '', token = '', err = '', tokenType = '', state= '' ;
// var callback = function (valErrDesc:string, valToken:string, valErr:string, valTokenType:string, valState: string) {
// errDesc = valErrDesc;
// token = valToken;
// err = valErr;
// tokenType = valTokenType;
// state= valState;
// };
// msal._tokenReceivedCallback = callback;
// msal.loginRedirect();
// expect(errDesc).toBe(ErrorDescription.loginProgressError);
// expect(err).toBe(ErrorCodes.loginProgressError);
// expect(token).toBe(null);
// expect(tokenType).toBe(Constants.idToken);
// expect(state).toBe('https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow?name=value&name2=value2');
// msal._loginInProgress = false;
// });
<<<<<<<
expect(msal.config.cache.cacheLocation).toBe('sessionStorage');
=======
expect(msal._cacheLocation).toBe('sessionStorage');
});
/**
it('tests cacheLocation functionality malformed strings throw error', function () {
var msalInstance = msal;
var mockIdToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjbGllbnRpZDEyMyIsIm5hbWUiOiJKb2huIERvZSIsInVwbiI6ImpvaG5AZW1haWwuY29tIiwibm9uY2UiOiIxMjM0In0.bpIBG3n1w7Cv3i_JHRGji6Zuc9F5H8jbDV5q3oj0gcw';
msal = new UserAgentApplication("0813e1d1-ad72-46a9-8665-399bba48c201", null, function (errorDesc, token, error, tokenType) {
expect(document.cookie).toBe('');
expect(errorDesc).toBe("Cache Location is not valid.");
expect(token).toBe(mockIdToken);
expect(tokenType).toBe(Constants.idToken);
}, { cacheLocation: 'lclStrge' });
>>>>>>>
expect(msal.config.cache.cacheLocation).toBe('sessionStorage'); |
<<<<<<<
import broidSchemas from "broid-schemas";
import { Logger } from "broid-utils";
import { EventEmitter } from "events";
import { Router } from "express";
=======
import broidSchemas from "@broid/schemas";
import { Logger } from "@broid/utils";
>>>>>>>
import broidSchemas from "@broid/schemas";
import { Logger } from "@broid/utils";
import { EventEmitter } from "events";
import { Router } from "express"; |
<<<<<<<
protected async _overrideDeployTransactionConfig(deployTransaction: UnsignedTransaction):
Promise<UnsignedTransaction> {
=======
private async _overrideDeployTransactionConfig(deployTransaction: utils.UnsignedTransaction):
Promise<utils.UnsignedTransaction> {
>>>>>>>
protected async _overrideDeployTransactionConfig(deployTransaction: utils.UnsignedTransaction):
Promise<utils.UnsignedTransaction> {
<<<<<<<
protected async _postValidateTransaction(contract: CompiledContract, transaction: TransactionResponse, transactionReceipt: TransactionReceipt):
Promise<void> {
=======
private async _postValidateTransaction(contract: CompiledContract, transaction: providers.TransactionResponse, transactionReceipt: providers.TransactionReceipt):
Promise<void> {
>>>>>>>
protected async _postValidateTransaction(contract: CompiledContract, transaction: providers.TransactionResponse, transactionReceipt: providers.TransactionReceipt):
Promise<void> {
<<<<<<<
protected async _logAction(deployerType: string, nameOrLabel: string, transactionHash: string, status: number, gasPrice: string, gasUsed: string, result: string, solcVersion: string, verification: boolean):
Promise<void> {
=======
private async _logAction(deployerType: string, nameOrLabel: string, transactionHash: string, status: number, gasPrice: string, gasUsed: string, result: string, solcVersion: string, verification: boolean):
Promise<void> {
>>>>>>>
protected async _logAction(deployerType: string, nameOrLabel: string, transactionHash: string, status: number, gasPrice: string, gasUsed: string, result: string, solcVersion: string, verification: boolean):
Promise<void> { |
<<<<<<<
Chanel: undefined;
=======
Chrome: undefined;
Snapchat: undefined;
Reflectly: undefined;
>>>>>>>
Chanel: undefined;
Chrome: undefined;
Snapchat: undefined;
Reflectly: undefined; |
<<<<<<<
const cacheRecord = new CacheRecord();
cacheRecord.account = UnifiedCacheManager.getAccount(this.cacheStorage, CacheHelper.generateAccountCacheKey(request.account));
=======
const cachedAccount = this.unifiedCacheManager.getAccount(CacheHelper.generateAccountCacheKey(request.account));
>>>>>>>
const cachedAccount = UnifiedCacheManager.getAccount(this.cacheStorage, CacheHelper.generateAccountCacheKey(request.account));
<<<<<<<
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheStorage, this.cryptoUtils, this.logger);
=======
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.unifiedCacheManager, this.cryptoUtils, this.logger);
>>>>>>>
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheStorage, this.cryptoUtils, this.logger);
<<<<<<<
const credentialCache: CredentialCache = UnifiedCacheManager.getCredentialsFilteredBy(this.cacheStorage, accessTokenFilter);
const accessTokens = Object.values(credentialCache);
=======
const credentialCache: CredentialCache = this.unifiedCacheManager.getCredentialsFilteredBy(accessTokenFilter);
const accessTokens = Object.values(credentialCache.accessTokens);
>>>>>>>
const credentialCache: CredentialCache = UnifiedCacheManager.getCredentialsFilteredBy(this.cacheStorage, accessTokenFilter);
const accessTokens = Object.values(credentialCache.accessTokens); |
<<<<<<<
private _digestCache: DigestCache;
public fetch(url: string, options: FetchOptions = {}): Promise<Response> {
=======
public fetch(url: string, options: any = {}): Promise<Response> {
>>>>>>>
public fetch(url: string, options: FetchOptions = {}): Promise<Response> { |
<<<<<<<
class MyItem extends Item {
public Title: string;
public Value: string;
}
export const thing = function (show: (s) => void) {
sp.web.lists.getByTitle("Config3").get().then((g) => show(g.Title));
sp.web.lists.getByTitle("Config3").get().then((g: any) => show(g.Title));
sp.web.lists.getByTitle("Config3").get().then((g: { Title: string }) => show(g.Title));
sp.web.lists.getByTitle("Config3").getAs<any, { Title: string }>().then(g => show(g.Title));
sp.web.lists.getByTitle("Config3").items.getById(2).getAs(ODataEntity(MyItem)).then(d => show(d.Title));
sp.web.lists.getByTitle("Config3").items.getAs(ODataEntityArray(MyItem)).then(d => {
d.forEach(i => {
show("Title: " + i.Title);
// also i is a full REST item
i.select("Title", "Value").get().then(show);
});
});
};
/**
* Enables use of the import pnp from syntax
*/
export default {
=======
// creating this class instead of directly assigning to default fixes issue #116
let Def = {
>>>>>>>
class MyItem extends Item {
public Title: string;
public Value: string;
}
export const thing = function (show: (s) => void) {
sp.web.lists.getByTitle("Config3").get().then((g) => show(g.Title));
sp.web.lists.getByTitle("Config3").get().then((g: any) => show(g.Title));
sp.web.lists.getByTitle("Config3").get().then((g: { Title: string }) => show(g.Title));
sp.web.lists.getByTitle("Config3").getAs<any, { Title: string }>().then(g => show(g.Title));
sp.web.lists.getByTitle("Config3").items.getById(2).getAs(ODataEntity(MyItem)).then(d => show(d.Title));
sp.web.lists.getByTitle("Config3").items.getAs(ODataEntityArray(MyItem)).then(d => {
d.forEach(i => {
show("Title: " + i.Title);
// also i is a full REST item
i.select("Title", "Value").get().then(show);
});
});
};
/**
* Enables use of the import pnp from syntax
*/
// creating this class instead of directly assigning to default fixes issue #116
let Def = {
<<<<<<<
}
=======
};
/**
* Enables use of the import pnp from syntax
*/
export default Def;
>>>>>>>
};
/**
* Enables use of the import pnp from syntax
*/
export default Def; |
<<<<<<<
=======
/**
* Gets or sets a description of the content type.
*/
public get description(): Queryable {
return new Queryable(this, "description");
}
/**
* Gets or sets a value that specifies the name of a custom display form template
* to use for list items that have been assigned the content type.
*/
public get displayFormTemplateName(): Queryable {
return new Queryable(this, "displayFormTemplateName");
}
/**
* Gets or sets a value that specifies the URL of a custom display form
* to use for list items that have been assigned the content type.
*/
public get displayFormUrl(): Queryable {
return new Queryable(this, "displayFormUrl");
}
/**
* Gets or sets a value that specifies the file path to the document template
* used for a new list item that has been assigned the content type.
*/
public get documentTemplate(): Queryable {
return new Queryable(this, "documentTemplate");
}
/**
* Gets a value that specifies the URL of the document template assigned to the content type.
*/
public get documentTemplateUrl(): Queryable {
return new Queryable(this, "documentTemplateUrl");
}
/**
* Gets or sets a value that specifies the name of a custom edit form template
* to use for list items that have been assigned the content type.
*/
public get editFormTemplateName(): Queryable {
return new Queryable(this, "editFormTemplateName");
}
/**
* Gets or sets a value that specifies the URL of a custom edit form
* to use for list items that have been assigned the content type.
*/
public get editFormUrl(): Queryable {
return new Queryable(this, "editFormUrl");
}
/**
* Gets or sets a value that specifies the content type group for the content type.
*/
public get group(): Queryable {
return new Queryable(this, "group");
}
/**
* Gets or sets a value that specifies whether the content type is unavailable
* for creation or usage directly from a user interface.
*/
public get hidden(): Queryable {
return new Queryable(this, "hidden");
}
/**
* Gets or sets the JSLink for the content type custom form template.
* NOTE!
* The JSLink property is not supported on Survey or Events lists.
* A SharePoint calendar is an Events list.
*/
public get jsLink(): Queryable {
return new Queryable(this, "jsLink");
}
/**
* Gets a value that specifies the name of the content type.
*/
public get name(): Queryable {
return new Queryable(this, "name");
}
/**
* Gets a value that specifies new form template name of the content type.
*/
public get newFormTemplateName(): Queryable {
return new Queryable(this, "newFormTemplateName");
}
/**
* Gets a value that specifies new form url of the content type.
*/
public get newFormUrl(): Queryable {
return new Queryable(this, "newFormUrl");
}
/**
* Gets or sets a value that specifies whether changes
* to the content type properties are denied.
*/
public get readOnly(): Queryable {
return new Queryable(this, "readOnly");
}
/**
* Gets a value that specifies the XML Schema representing the content type.
*/
public get schemaXml(): Queryable {
return new Queryable(this, "schemaXml");
}
/**
* Gets a value that specifies a server-relative path to the content type scope of the content type.
*/
public get scope(): Queryable {
return new Queryable(this, "scope");
}
/**
* Gets or sets whether the content type can be modified.
*/
public get sealed(): Queryable {
return new Queryable(this, "sealed");
}
/**
* A string representation of the value of the Id.
*/
public get stringId(): Queryable {
return new Queryable(this, "stringId");
}
}
export interface ContentTypeAddResult {
data: any;
>>>>>>>
}
export interface ContentTypeAddResult {
data: any; |
<<<<<<<
!!isOptimized && rollupPluginTerser(),
],
onwarn: ((warning, warn) => {
if (warning.code === 'UNRESOLVED_IMPORT') {
logError(`'${warning.source}' is imported by '${warning.importer}', but could not be resolved.`);
if (isNodeBuiltin(warning.source)) {
console.log(chalk.dim(` '${warning.source}' is a Node.js builtin module that won't exist on the web. You can find modern, web-ready packages at ${chalk.underline('https://www.pika.dev')}`));
} else {
console.log(chalk.dim(` Make sure that the package is installed and that the file exists.`));
}
return;
=======
!!isBabel && rollupPluginBabel({
compact: false,
babelrc: false,
presets: [[babelPresetEnv, { modules: false, targets: hasBrowserlistConfig ? undefined : ">0.75%, not ie 11, not op_mini all" }]],
}),
!!isOptimized && rollupPluginTerser(),
],
onwarn: ((warning, warn) => {
if (warning.code === 'UNRESOLVED_IMPORT') {
logError(`'${warning.source}' is imported by '${warning.importer}', but could not be resolved.`);
if (isNodeBuiltin(warning.source)) {
console.log(chalk.dim(` '${warning.source}' is a Node.js builtin module that won't exist on the web. You can find modern, web-ready packages at ${chalk.underline('https://www.pika.dev')}`));
} else {
console.log(chalk.dim(` Make sure that the package is installed and that the file exists.`));
>>>>>>>
!!isOptimized && rollupPluginTerser(),
],
onwarn: ((warning, warn) => {
if (warning.code === 'UNRESOLVED_IMPORT') {
logError(`'${warning.source}' is imported by '${warning.importer}', but could not be resolved.`);
if (isNodeBuiltin(warning.source)) {
console.log(chalk.dim(` '${warning.source}' is a Node.js builtin module that won't exist on the web. You can find modern, web-ready packages at ${chalk.underline('https://www.pika.dev')}`));
} else {
console.log(chalk.dim(` Make sure that the package is installed and that the file exists.`));
}
return;
<<<<<<<
const {help, sourceMap, optimize = false, strict = false, clean = false, dest = 'web_modules', remoteUrl = 'https://cdn.pika.dev', remotePackage: remotePackages = []} = yargs(args);
const destLoc = path.resolve(cwd, dest);
=======
const {help, sourceMap, babel = false, optimize = false, strict = false, clean = false, dest = 'web_modules', remoteUrl = 'https://cdn.pika.dev', remotePackage: remotePackages = []} = yargs(args);
const destLoc = path.join(cwd, dest);
>>>>>>>
const {help, sourceMap, babel = false, optimize = false, strict = false, clean = false, dest = 'web_modules', remoteUrl = 'https://cdn.pika.dev', remotePackage: remotePackages = []} = yargs(args);
const destLoc = path.resolve(cwd, dest); |
<<<<<<<
import {NotificationEnum, SuggestedActionTypeEnum} from 'parabol-client/types/graphql'
import {SubscriptionChannel} from 'parabol-client/types/constEnums'
=======
import sendSegmentEvent from '../../utils/sendSegmentEvent'
>>>>>>>
import {NotificationEnum, SuggestedActionTypeEnum} from 'parabol-client/types/graphql'
import {SubscriptionChannel} from 'parabol-client/types/constEnums'
import sendSegmentEvent from '../../utils/sendSegmentEvent' |
<<<<<<<
const makeRetroTemplates = (teamId: string, orgId: string, templateObj: TemplateObject) => {
const phaseItems: RetrospectivePrompt[] = []
=======
const makeRetroTemplates = (teamId: string, templateObj = templateBase) => {
const reflectPrompts: RetrospectivePrompt[] = []
>>>>>>>
const makeRetroTemplates = (teamId: string, orgId: string, templateObj: TemplateObject) => {
const reflectPrompts: RetrospectivePrompt[] = [] |
<<<<<<<
import { B2cAuthority } from "../authority/B2cAuthority";
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest";
import { RequestParameterBuilder } from "../server/RequestParameterBuilder";
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest";
import { RefreshTokenRequest } from "../request/RefreshTokenRequest";
=======
import { AuthorityType } from "../authority/AuthorityType";
>>>>>>>
import { B2cAuthority } from "../authority/B2cAuthority";
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest";
import { RequestParameterBuilder } from "../server/RequestParameterBuilder";
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest";
import { RefreshTokenRequest } from "../request/RefreshTokenRequest";
import { AuthorityType } from "../authority/AuthorityType";
<<<<<<<
// Initialize authority or use default, and perform discovery endpoint check.
const acquireTokenAuthority = (codeRequest && codeRequest.authority) ? AuthorityFactory.createInstance(codeRequest.authority, this.networkClient) : this.defaultAuthority;
if (!acquireTokenAuthority.discoveryComplete()) {
try {
await acquireTokenAuthority.resolveEndpointsAsync();
} catch (e) {
throw ClientAuthError.createEndpointDiscoveryIncompleteError(e);
=======
// Get request from cache
const tokenRequest: TokenExchangeParameters = this.getCachedRequest(codeResponse.userRequestState);
// Initialize authority or use default, and perform discovery endpoint check.
const acquireTokenAuthority = (tokenRequest && tokenRequest.authority) ? AuthorityFactory.createInstance(tokenRequest.authority, this.networkClient) : this.defaultAuthority;
// This is temporary. Remove when ADFS is supported for browser
if(acquireTokenAuthority.authorityType == AuthorityType.Adfs){
throw ClientAuthError.createInvalidAuthorityTypeError(acquireTokenAuthority.canonicalAuthority);
}
if (!acquireTokenAuthority.discoveryComplete()) {
try {
await acquireTokenAuthority.resolveEndpointsAsync();
} catch (e) {
throw ClientAuthError.createEndpointDiscoveryIncompleteError(e);
}
>>>>>>>
// Initialize authority or use default, and perform discovery endpoint check.
const acquireTokenAuthority = (codeRequest && codeRequest.authority) ? AuthorityFactory.createInstance(codeRequest.authority, this.networkClient) : this.defaultAuthority;
if (!acquireTokenAuthority.discoveryComplete()) {
try {
await acquireTokenAuthority.resolveEndpointsAsync();
} catch (e) {
throw ClientAuthError.createEndpointDiscoveryIncompleteError(e);
<<<<<<<
// Initialize authority or use default, and perform discovery endpoint check.
const acquireTokenAuthority = request.authority ? AuthorityFactory.createInstance(request.authority, this.networkClient) : this.defaultAuthority;
if (!acquireTokenAuthority.discoveryComplete()) {
try {
await acquireTokenAuthority.resolveEndpointsAsync();
} catch (e) {
throw ClientAuthError.createEndpointDiscoveryIncompleteError(e);
=======
// Initialize authority or use default, and perform discovery endpoint check.
const acquireTokenAuthority = request.authority ? AuthorityFactory.createInstance(request.authority, this.networkClient) : this.defaultAuthority;
// This is temporary. Remove when ADFS is supported for browser
if(acquireTokenAuthority.authorityType == AuthorityType.Adfs){
throw ClientAuthError.createInvalidAuthorityTypeError(acquireTokenAuthority.canonicalAuthority);
}
if (!acquireTokenAuthority.discoveryComplete()) {
try {
await acquireTokenAuthority.resolveEndpointsAsync();
} catch (e) {
throw ClientAuthError.createEndpointDiscoveryIncompleteError(e);
}
>>>>>>>
// Initialize authority or use default, and perform discovery endpoint check.
const acquireTokenAuthority = request.authority ? AuthorityFactory.createInstance(request.authority, this.networkClient) : this.defaultAuthority;
// This is temporary. Remove when ADFS is supported for browser
if(acquireTokenAuthority.authorityType == AuthorityType.Adfs){
throw ClientAuthError.createInvalidAuthorityTypeError(acquireTokenAuthority.canonicalAuthority);
}
if (!acquireTokenAuthority.discoveryComplete()) {
try {
await acquireTokenAuthority.resolveEndpointsAsync();
} catch (e) {
throw ClientAuthError.createEndpointDiscoveryIncompleteError(e); |
<<<<<<<
UpdatePokerTemplateDimensionScalePayload,
UpdatePokerTemplateScaleValuePayload,
UpdateUserProfilePayload
=======
UpdateUserProfilePayload,
PersistJiraSearchQuerySuccess
>>>>>>>
UpdatePokerTemplateDimensionScalePayload,
UpdatePokerTemplateScaleValuePayload,
UpdateUserProfilePayload,
PersistJiraSearchQuerySuccess |
<<<<<<<
import dragEstimatingTask from './mutations/dragEstimatingTask'
=======
import editCommenting from './mutations/editCommenting'
>>>>>>>
import dragEstimatingTask from './mutations/dragEstimatingTask'
import editCommenting from './mutations/editCommenting'
<<<<<<<
endDraggingReflection,
endSprintPoker,
=======
editCommenting,
>>>>>>>
editCommenting,
endSprintPoker, |
<<<<<<<
/**
* Move a scale value to an index
*/
movePokerTemplateScaleValue: MovePokerTemplateScaleValuePayload;
=======
/**
* Set the jira field that the poker dimension should map to
*/
updateJiraDimensionField: UpdateJiraDimensionFieldPayload;
>>>>>>>
/**
* Move a scale value to an index
*/
movePokerTemplateScaleValue: MovePokerTemplateScaleValuePayload;
/**
* Set the jira field that the poker dimension should map to
*/
updateJiraDimensionField: UpdateJiraDimensionFieldPayload;
<<<<<<<
export interface IMovePokerTemplateScaleValueOnMutationArguments {
scaleId: string;
/**
* The label of the moving scale value
*/
label: string;
/**
* The index position where the scale value is moving to
*/
index: number;
}
=======
export interface IUpdateJiraDimensionFieldOnMutationArguments {
dimensionId: string;
/**
* The jira field name that we should push estimates to
*/
fieldName: string;
/**
* The cloudId the field lives on
*/
cloudId: string;
/**
* The meeting the update happend in. If present, can return a meeting object with updated serviceField
*/
meetingId: string;
}
>>>>>>>
export interface IMovePokerTemplateScaleValueOnMutationArguments {
scaleId: string;
/**
* The label of the moving scale value
*/
label: string;
/**
* The index position where the scale value is moving to
*/
index: number;
}
export interface IUpdateJiraDimensionFieldOnMutationArguments {
dimensionId: string;
/**
* The jira field name that we should push estimates to
*/
fieldName: string;
/**
* The cloudId the field lives on
*/
cloudId: string;
/**
* The meeting the update happend in. If present, can return a meeting object with updated serviceField
*/
meetingId: string;
}
<<<<<<<
/**
* Return object for MovePokerTemplateScaleValuePayload
*/
export type MovePokerTemplateScaleValuePayload =
| IErrorPayload
| IMovePokerTemplateScaleValueSuccess;
export interface IMovePokerTemplateScaleValueSuccess {
__typename: 'MovePokerTemplateScaleValueSuccess';
/**
* The scale after values are moved
*/
scale: ITemplateScale;
}
=======
/**
* Return object for UpdateJiraDimensionFieldPayload
*/
export type UpdateJiraDimensionFieldPayload =
| IErrorPayload
| IUpdateJiraDimensionFieldSuccess;
export interface IUpdateJiraDimensionFieldSuccess {
__typename: 'UpdateJiraDimensionFieldSuccess';
teamId: string;
meetingId: string | null;
team: ITeam;
/**
* The poker meeting the field was updated from
*/
meeting: IPokerMeeting | null;
}
>>>>>>>
/**
* Return object for MovePokerTemplateScaleValuePayload
*/
export type MovePokerTemplateScaleValuePayload =
| IErrorPayload
| IMovePokerTemplateScaleValueSuccess;
export interface IMovePokerTemplateScaleValueSuccess {
__typename: 'MovePokerTemplateScaleValueSuccess';
/**
* The scale after values are moved
*/
scale: ITemplateScale;
}
/**
* Return object for UpdateJiraDimensionFieldPayload
*/
export type UpdateJiraDimensionFieldPayload =
| IErrorPayload
| IUpdateJiraDimensionFieldSuccess;
export interface IUpdateJiraDimensionFieldSuccess {
__typename: 'UpdateJiraDimensionFieldSuccess';
teamId: string;
meetingId: string | null;
team: ITeam;
/**
* The poker meeting the field was updated from
*/
meeting: IPokerMeeting | null;
}
<<<<<<<
| IPersistJiraSearchQuerySuccess
| IMovePokerTemplateScaleValueSuccess;
=======
| IPersistJiraSearchQuerySuccess
| IUpdateJiraDimensionFieldSuccess;
>>>>>>>
| IPersistJiraSearchQuerySuccess
| IMovePokerTemplateScaleValueSuccess
| IUpdateJiraDimensionFieldSuccess; |
Subsets and Splits