commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
15c51c740ef4d1511677aefb7081aab930b70701 | learnbase/src/main/webapp/ts/main.ts | learnbase/src/main/webapp/ts/main.ts | console.log("tester");
window.onload = function userLogin() : void {
fetch('/userlogin').then(response => response.text()).then((pageContent) => {
const loginSection = document.getElementById('user-page-content') as HTMLDivElement;
loginSection.innerHTML = pageContent;
});
}
fucntion pageChanger() {
co... | console.log("tester");
window.onload = function userLogin() : void {
fetch('/userlogin').then(response => response.text()).then((pageContent) => {
const loginSection = document.getElementById('user-page-content') as HTMLDivElement;
loginSection.innerHTML = pageContent;
});
}
fucntion pageChanger() {
co... | Fix typo in pageChanger function | Fix typo in pageChanger function
| TypeScript | apache-2.0 | googleinterns/learnbase,googleinterns/learnbase,googleinterns/learnbase,googleinterns/learnbase,googleinterns/learnbase | ---
+++
@@ -12,6 +12,6 @@
if (navBar.className === "topnav") {
navBar.classname += " responsive";
} else {
- x.className = "topnav";
+ navBar.className = "topnav";
}
} |
09c7bfae6275ea4161d359ac523c85b80c036345 | src/testing/permissions-restrict.directive.stub.ts | src/testing/permissions-restrict.directive.stub.ts | import { Directive, EventEmitter, Input, Output, TemplateRef, ViewContainerRef } from '@angular/core';
@Directive({
selector: '[ngxPermissionsOnly],[ngxPermissionsExcept]',
})
export class NgxPermissionsRestrictStubDirective {
@Input() ngxPermissionsOnly: string | string[];
@Input() ngxPermissionsOnlyThe... | import { Directive, EventEmitter, Input, Output, TemplateRef, ViewContainerRef } from '@angular/core';
@Directive({
selector: '[ngxPermissionsOnly],[ngxPermissionsExcept]',
})
export class NgxPermissionsRestrictStubDirective {
@Input() ngxPermissionsOnly: string | string[];
@Input() ngxPermissionsOnlyThe... | Change name to more proper in testing restrict directive | Change name to more proper in testing restrict directive
| TypeScript | mit | AlexKhymenko/ngx-permissions,AlexKhymenko/ngx-permissions,AlexKhymenko/ngx-permissions | ---
+++
@@ -26,11 +26,11 @@
ngOnInit(): void {
this.viewContainer.clear();
- this.viewContainer.createEmbeddedView(this.getAuthorizedTemplate());
+ this.viewContainer.createEmbeddedView(this.getUnAuthorizedTemplate());
}
- private getAuthorizedTemplate() {
+ private getUnA... |
150b61ad6ca0cee6b567f74499ee9e3cec32d550 | src/app/components/editor/editor.component.ts | src/app/components/editor/editor.component.ts | import {AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild} from '@angular/core';
import {EditorConfig} from '../../models/models';
declare const monaco: any;
declare const require: any;
@Component({
selector: 'app-editor',
template: `<div #view class="monaco-editor" style="height: 85vh;"></div... | import {AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild} from '@angular/core';
import {EditorConfig} from '../../models/models';
declare const monaco: any;
declare const require: any;
@Component({
selector: 'app-editor',
template: `<div #view class="monaco-editor" style="height: 85vh;"></div... | Revert ":hammer: Remove unused function" | Revert ":hammer: Remove unused function"
This reverts commit b9e7cbe4eef8017f0d8d883890ce6018bba364b0.
| TypeScript | mit | tadashi-aikawa/gemini-viewer,tadashi-aikawa/gemini-viewer,tadashi-aikawa/gemini-viewer | ---
+++
@@ -47,4 +47,8 @@
updateView() {
this.editor.layout();
}
+
+ getValue(): string {
+ return this.editor.getValue();
+ }
} |
be3ef4da4c52765e00a5ca8be0071416e620c773 | src/app/services/actor.service.spec.ts | src/app/services/actor.service.spec.ts | import { Http, RequestOptions, RequestMethod, ResponseOptions, Response } from '@angular/http';
import { MockBackend } from '@angular/http/testing';
import { ActorService } from './actor.service';
import { Actor } from '../models';
describe('Service: Actor', () => {
const endpointRegex: RegExp = /\/api\/person$/;
... | import { inject, TestBed } from '@angular/core/testing';
import {
Http,
RequestMethod,
ResponseOptions,
Response,
ConnectionBackend,
BaseRequestOptions
} from '@angular/http';
import { MockBackend } from '@angular/http/testing';
import { ActorService } from './actor.service';
import { Actor } from '../mode... | Switch service testing to TestBed | Switch service testing to TestBed
| TypeScript | isc | textbook/known-for-web,textbook/known-for-web,textbook/known-for-web | ---
+++
@@ -1,4 +1,12 @@
-import { Http, RequestOptions, RequestMethod, ResponseOptions, Response } from '@angular/http';
+import { inject, TestBed } from '@angular/core/testing';
+import {
+ Http,
+ RequestMethod,
+ ResponseOptions,
+ Response,
+ ConnectionBackend,
+ BaseRequestOptions
+} from '@angular/http';... |
3b36b54b96397caec5b1e9013f386b082bef62d7 | src/app/domotics/domotics.component.ts | src/app/domotics/domotics.component.ts | import { Component, OnInit } from '@angular/core';
import { ConfigService } from '../_services/config.service';
import { timer } from 'rxjs';
import { OpenhabService } from '../_services/openhab.service';
@Component({
selector: 'app-domotics',
templateUrl: './domotics.component.html',
styleUrls: ['./domoti... | import { Component, OnInit } from '@angular/core';
import { ConfigService } from '../_services/config.service';
import { timer } from 'rxjs';
import { OpenhabService } from '../_services/openhab.service';
@Component({
selector: 'app-domotics',
templateUrl: './domotics.component.html',
styleUrls: ['./domoti... | Sort domotics devices by label/name | Sort domotics devices by label/name
| TypeScript | mit | yktoo/infopi,yktoo/infopi,yktoo/infopi,yktoo/infopi | ---
+++
@@ -23,7 +23,11 @@
this.openhab.getItems(this.config.configuration.domotics.showGroup)
.subscribe(
data => {
- this.items = data;
+ this.items = data
+ .sort((a, b) =>
+ (a.label || a... |
a955a107a87c47338dc8b4a1fd5d4fafb7a98dc1 | src/components/Search/SearchFields.tsx | src/components/Search/SearchFields.tsx | import * as React from 'react';
import { TextField, Select, Checkbox } from '@shopify/polaris';
interface Props {
readonly value: string;
readonly onChange: (value: string) => void;
}
interface SortTypeProps extends Props {
readonly options: string[];
}
interface CheckBoxProps {
readonly onChang... | import * as React from 'react';
import { TextField, Select, Checkbox } from '@shopify/polaris';
interface Props {
readonly value: string;
readonly onChange: (value: string) => void;
}
interface SortTypeProps extends Props {
readonly options: string[];
}
interface CheckBoxProps {
readonly onChang... | Fix issue where SortTypeField wasn't displaying changes to its value. | Fix issue where SortTypeField wasn't displaying changes to its value.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -43,7 +43,7 @@
);
};
-const SortTypeField = ({ options, onChange }: SortTypeProps) => {
+const SortTypeField = ({ value, options, onChange }: SortTypeProps) => {
return (
<Select
label="Sort By"
@@ -51,6 +51,7 @@
label: option,
value: option
}))}
+ value={... |
43ee699af27b3c8e6d39b8f23cf227a70b67d1a2 | client/Commands/components/Toolbar.tsx | client/Commands/components/Toolbar.tsx | import * as React from "react";
import { Button } from "../../Components/Button";
import { Command } from "../Command";
interface ToolbarProps {
encounterCommands: Command [];
combatantCommands: Command [];
}
interface ToolbarState {
displayWide: boolean;
}
export class Toolbar extends React.Component<To... | import * as React from "react";
import { Button } from "../../Components/Button";
import { Command } from "../Command";
interface ToolbarProps {
encounterCommands: Command[];
combatantCommands: Command[];
}
interface ToolbarState {
displayWide: boolean;
widthStyle: string;
}
export class Toolbar exte... | Apply manual width to scrollframe div | Apply manual width to scrollframe div
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -3,20 +3,28 @@
import { Command } from "../Command";
interface ToolbarProps {
- encounterCommands: Command [];
- combatantCommands: Command [];
+ encounterCommands: Command[];
+ combatantCommands: Command[];
}
interface ToolbarState {
displayWide: boolean;
+ widthStyle: string;
... |
38374f73a189a19812253487ac463b08943a5aad | client/src/app/models/project.model.ts | client/src/app/models/project.model.ts | import { ProjectWizardData } from './project-wizard-data.model';
export class Project {
public projectName: string;
public freelancer: string;
public client: string;
public startDate: number;
public endDate: number;
public budget: number;
public billingMethod: string;
public paymentType: string;
publ... | import { ProjectWizardData } from './project-wizard-data.model';
export class Project {
public projectName: string;
public freelancer: string;
public client: string;
public startDate: number;
public endDate: number;
public budget: number;
public billingMethod: string;
public paymentType: string;
publ... | Fix front-end to set non-zero value for hoursPerWeek | Fix front-end to set non-zero value for hoursPerWeek
| TypeScript | apache-2.0 | IBMZissou/dbh17-zissou,IBMZissou/dbh17-zissou,IBMZissou/dbh17-zissou,IBMZissou/dbh17-zissou,IBMZissou/dbh17-zissou | ---
+++
@@ -36,7 +36,7 @@
deliverables: '',
jobRequirements: [],
location: '',
- hoursPerWeek: 0
+ hoursPerWeek: 40
};
}
} |
b9d4ef00c3c36cb1668c668dcffc235dd1a2a95e | app/core/services/api-file.service.ts | app/core/services/api-file.service.ts | import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { File } from '../../shared/file';
import { ApiTimeoutService } from './api-timeout.service';
@Injectable()
export class ApiFileService {
constru... | import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { File } from '../../shared/file';
import { ApiTimeoutService } from './api-timeout.service';
import { ApiErrorService } from './api-error.service';
... | Set the ApiFileService to use the ApiErrorService | Set the ApiFileService to use the ApiErrorService
| TypeScript | apache-2.0 | FAANG/faang-portal-frontend,FAANG/faang-portal-frontend,FAANG/faang-portal-frontend | ---
+++
@@ -5,6 +5,7 @@
import { File } from '../../shared/file';
import { ApiTimeoutService } from './api-timeout.service';
+import { ApiErrorService } from './api-error.service';
@Injectable()
export class ApiFileService {
@@ -12,15 +13,17 @@
constructor(
private http: Http,
private apiTimeoutS... |
26870fa2e9d99603ccc266a8b62184699ecbd0c8 | src/rules/_basic_rule_config.ts | src/rules/_basic_rule_config.ts | export abstract class BasicRuleConfig {
/** Is the rule enabled? */
public enabled?: boolean = true;
/** List of patterns to exclude */
public exclude?: string[] = [];
} | export abstract class BasicRuleConfig {
/** Is the rule enabled? */
public enabled?: boolean = true;
/** List of patterns to exclude */
public exclude?: string[] = [];
/** An explanation for why the rule is enforced */
public reason?: string = "";
} | Add reason attribute to rule config | Add reason attribute to rule config
| TypeScript | mit | larshp/abaplint,larshp/abaplint,larshp/abaplint,larshp/abapOpenChecksJS,larshp/abaplint,larshp/abapOpenChecksJS,larshp/abapOpenChecksJS | ---
+++
@@ -3,4 +3,6 @@
public enabled?: boolean = true;
/** List of patterns to exclude */
public exclude?: string[] = [];
+ /** An explanation for why the rule is enforced */
+ public reason?: string = "";
} |
807e07409731749378fc2af19381c2d59c4af150 | src/services/setting.service.ts | src/services/setting.service.ts | import { Injectable } from '@angular/core';
import * as fs from 'fs';
let settingPath = '';
export function setSettingPath(path: string) {
settingPath = path;
}
interface Setting {
tokens: string[];
hide_buttons: boolean;
}
@Injectable()
export class SettingService {
setting: Setting;
get tokens... | import { Injectable } from '@angular/core';
import * as fs from 'fs';
let settingPath = '';
export function setSettingPath(path: string) {
settingPath = path;
}
interface Setting {
tokens: string[];
hide_buttons: boolean;
}
@Injectable()
export class SettingService {
setting: Setting;
get tokens... | Use undefined to check setting existence | Use undefined to check setting existence
| TypeScript | mit | mazun/SlackStream,mazun/SlackStream,mazun/ASlack-Stream,mazun/ASlack-Stream,mazun/SlackStream,mazun/ASlack-Stream,mazun/ASlack-Stream,mazun/SlackStream | ---
+++
@@ -31,8 +31,8 @@
this.setting = {} as Setting;
}
- if (!this.setting.tokens) { this.setting.tokens = ['']; }
- if (!this.setting.hide_buttons) { this.setting.hide_buttons = false; }
+ if (this.setting.tokens === undefined) { this.setting.tokens = ['']; }
+ ... |
ef481d8edce24412eee6430d6564461a9025ce46 | src/definition.ts | src/definition.ts | import * as vscode from 'vscode';
import { Index } from './index';
export class DefinitionProvider implements vscode.DefinitionProvider {
constructor(private index: Index) { }
provideDefinition(document: vscode.TextDocument, position: vscode.Position): vscode.Location {
let reference = this.index.queryReferen... | import * as vscode from 'vscode';
import { Index } from './index';
import { IndexLocator } from './index/index-locator';
export class DefinitionProvider implements vscode.DefinitionProvider {
constructor(private indexLocator: IndexLocator) { }
provideDefinition(document: vscode.TextDocument, position: vscode.Posi... | Use IndexLocator instead of Index | DefinitionProvider: Use IndexLocator instead of Index
| TypeScript | mpl-2.0 | hashicorp/vscode-terraform,mauve/vscode-terraform,hashicorp/vscode-terraform,mauve/vscode-terraform,mauve/vscode-terraform,hashicorp/vscode-terraform,mauve/vscode-terraform | ---
+++
@@ -1,15 +1,16 @@
import * as vscode from 'vscode';
import { Index } from './index';
+import { IndexLocator } from './index/index-locator';
export class DefinitionProvider implements vscode.DefinitionProvider {
- constructor(private index: Index) { }
+ constructor(private indexLocator: IndexLocator) { ... |
532ae3cb91b229531b851f1ef23fd8f669ff4d8d | ui/src/constants.ts | ui/src/constants.ts | export const NAVBAR_HEIGHT = 56;
export const SIDEBAR_WIDTH = 500;
| export const NAVBAR_HEIGHT = 56;
export const SIDEBAR_WIDTH = 400;
| Set sidebar width to 400px | Set sidebar width to 400px
| TypeScript | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web | ---
+++
@@ -1,2 +1,2 @@
export const NAVBAR_HEIGHT = 56;
-export const SIDEBAR_WIDTH = 500;
+export const SIDEBAR_WIDTH = 400; |
3e8c3c0c307bde48722f9ccd30c813d25b3f10db | app/app.component.ts | app/app.component.ts | import { Component } from '@angular/core';
export class Hero {
id: number;
name: string;
}
@Component({
selector: 'my-app',
template: '<h1>{{title}}</h1><h2>{{hero.name}} details!</h2>'
})
export class AppComponent {
title = 'Tour of Heroes';
hero : Hero = {
id: 1,
name: 'winds... | import { Component } from '@angular/core';
export class Hero {
id: number;
name: string;
}
@Component({
selector: 'my-app',
template:`
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<input value="{{hero.name}}" place... | Change the quotes around the template to back-ticks | Change the quotes around the template to back-ticks
| TypeScript | mit | ffacon/quickstart-ng2,ffacon/quickstart-ng2,ffacon/quickstart-ng2 | ---
+++
@@ -7,7 +7,15 @@
@Component({
selector: 'my-app',
- template: '<h1>{{title}}</h1><h2>{{hero.name}} details!</h2>'
+ template:`
+ <h1>{{title}}</h1>
+ <h2>{{hero.name}} details!</h2>
+ <div><label>id: </label>{{hero.id}}</div>
+ <div>
+ <label>name: </label>
+ <input value="{{hero.name}... |
aad32876fcaea679ccd813de583bd5d0e5c6e7d8 | types/shelljs-exec-proxy/shelljs-exec-proxy-tests.ts | types/shelljs-exec-proxy/shelljs-exec-proxy-tests.ts | import * as shell from 'shelljs-exec-proxy';
shell.git.status(); // $ExpectType ExecOutputReturnValue
shell.git.add('.'); // $ExpectType ExecOutputReturnValue
shell.git.commit('-am', 'Fixed issue #1'); // $ExpectType ExecOutputReturnValue
shell.git.push('origin', 'master'); // $ExpectType ExecOutputReturnValue
shell.... | import * as shell from 'shelljs-exec-proxy';
shell.git.status(); // $ExpectType ExecOutputReturnValue
shell.git.add('.'); // $ExpectType ExecOutputReturnValue
shell.git.commit('-am', 'Fixed issue #1'); // $ExpectType ExecOutputReturnValue
shell.git.push('origin', 'master'); // $ExpectType ExecOutputReturnValue
shell.... | Fix expected return type error | Fix expected return type error
| TypeScript | mit | georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,mcliment/DefinitelyTyped,markogresak/DefinitelyTyped,dsebastien/DefinitelyTyped | ---
+++
@@ -5,5 +5,5 @@
shell.git.commit('-am', 'Fixed issue #1'); // $ExpectType ExecOutputReturnValue
shell.git.push('origin', 'master'); // $ExpectType ExecOutputReturnValue
-shell.cd('string'); // $ExpectType void
+shell.cd('string'); // $ExpectType ShellString
shell.cd(123); // $ExpectError |
5469ff61d2b35a19f1089632aecd11b6481da674 | src/xrm-mock/encoding/encoding.mock.ts | src/xrm-mock/encoding/encoding.mock.ts | export class EncodingMock implements Xrm.Encoding {
public xmlAttributeEncode(arg: string): string {
throw new Error("Not implemented");
}
public xmlEncode(arg: string): string {
throw new Error("Not implemented");
}
}
| export class EncodingMock implements Xrm.Encoding {
public xmlAttributeEncode(arg: string): string {
throw new Error("Not implemented");
}
public xmlEncode(arg: string): string {
throw new Error("Not implemented");
}
public htmlAttributeEncode(arg: string): string {
throw new Error("Not implement... | Add missing functions in Xrm.Encoding | Add missing functions in Xrm.Encoding
| TypeScript | mit | camelCaseDave/xrm-mock,camelCaseDave/xrm-mock | ---
+++
@@ -5,4 +5,16 @@
public xmlEncode(arg: string): string {
throw new Error("Not implemented");
}
+
+ public htmlAttributeEncode(arg: string): string {
+ throw new Error("Not implemented");
+ }
+
+ public htmlDecode(arg: string): string {
+ throw new Error("Not implemented");
+ }
+
+ public... |
ed341ef2a5ee045c839d722b6562297b802ba130 | src/client/index.ts | src/client/index.ts | import { setup } from '@cycle/run'
import { makeHTTPDriver } from '@cycle/http'
import { makeDOMDriver } from '@cycle/dom'
import { makeHistoryDriver } from '@cycle/history'
import { timeDriver } from '@cycle/time'
import switchPath from 'switch-path'
import ClientRoutes from './routes'
import Main from './main'
// r... | import { setup } from '@cycle/run'
import { makeHTTPDriver } from '@cycle/http'
import { makeDOMDriver } from '@cycle/dom'
import { makeHistoryDriver } from '@cycle/history'
import { timeDriver } from '@cycle/time'
import ClientRoutes from './routes'
import Main from './main'
// register ServiceWorker
require('offlin... | Remove unused import, make History driver restartable | Remove unused import, make History driver restartable
| TypeScript | mit | wyqydsyq/unicycle,wyqydsyq/unicycle | ---
+++
@@ -3,7 +3,6 @@
import { makeDOMDriver } from '@cycle/dom'
import { makeHistoryDriver } from '@cycle/history'
import { timeDriver } from '@cycle/time'
-import switchPath from 'switch-path'
import ClientRoutes from './routes'
import Main from './main'
@@ -17,7 +16,7 @@
const getDrivers = () => ({
DO... |
bfc5394cff33130efbdea50ccf03f697db154dc8 | src/components/random-number.tsx | src/components/random-number.tsx | import { Component, Prop, State, Listen } from '@stencil/core';
@Component({
tag: 'random-number'
})
export class RandomNumber {
@State() randomNumber: number;
@Prop() min: number;
@Prop() max: number;
componentDidLoad() {
this.randomNumber = Math.floor(Math.random()*(this.max- this.min+... | import { Component, Prop, State, Listen } from '@stencil/core';
@Component({
tag: 'random-number'
})
export class RandomNumber {
@State() randomNumber: number;
@Prop() min: number;
@Prop() max: number;
componentDidLoad() {
this.randomNumber = Math.floor(Math.random()*(this.max- this.min+... | Remove styling form random number | Remove styling form random number
| TypeScript | mit | TheNerdicCoder/stencil-demo,TheNerdicCoder/stencil-demo,TheNerdicCoder/stencil-demo | ---
+++
@@ -21,9 +21,7 @@
render() {
return (
- <p>
- {this.randomNumber}
- </p>
+ this.randomNumber
);
}
} |
25f452da764fe289f745f712f29daf525e4ec2b5 | test/helpers.ts | test/helpers.ts | import { GitProcess, IGitResult } from '../lib'
// NOTE: bump these versions to the latest stable releases
export const gitVersion = '2.26.0'
export const gitLfsVersion = '2.7.2'
const temp = require('temp').track()
export async function initialize(repositoryName: string): Promise<string> {
const testRepoPath = te... | import { GitProcess, IGitResult } from '../lib'
// NOTE: bump these versions to the latest stable releases
export const gitVersion = '2.26.'
export const gitLfsVersion = '2.7.2'
const temp = require('temp').track()
export async function initialize(repositoryName: string): Promise<string> {
const testRepoPath = tem... | Make git version on test less restrictive | Make git version on test less restrictive
| TypeScript | mit | desktop/dugite,desktop/dugite,desktop/dugite | ---
+++
@@ -1,7 +1,7 @@
import { GitProcess, IGitResult } from '../lib'
// NOTE: bump these versions to the latest stable releases
-export const gitVersion = '2.26.0'
+export const gitVersion = '2.26.'
export const gitLfsVersion = '2.7.2'
const temp = require('temp').track() |
9ce86e4d0c16dda7b4db1d6e81cf4f5dc863341d | src/tests/compiler/literal/regularExpressionLiteralTests.ts | src/tests/compiler/literal/regularExpressionLiteralTests.ts | import {expect} from "chai";
import {VariableStatement, RegularExpressionLiteral} from "./../../../compiler";
import {getInfoFromText} from "./../testHelpers";
function getInfoFromTextWithInitializer(text: string) {
const obj = getInfoFromText<VariableStatement>(text);
const initializer = obj.firstChild.getDe... | import {expect} from "chai";
import {VariableStatement, RegularExpressionLiteral} from "./../../../compiler";
import {getInfoFromText} from "./../testHelpers";
function getInfoFromTextWithInitializer(text: string) {
const obj = getInfoFromText<VariableStatement>(text);
const initializer = obj.firstChild.getDe... | Fix linux only failing test. | Fix linux only failing test.
| TypeScript | mit | dsherret/ts-simple-ast | ---
+++
@@ -18,11 +18,11 @@
}
it("should get the correct literal text when there are flags", () => {
- doTest("const t = /testing/gi", "testing", "gi");
+ doTest("const t = /testing/gi;", "testing", "gi");
});
it("should get the correct literal text when t... |
481e648d592d529ad2e1850cd000a5e6ae876d6b | packages/userscript/source/index.ts | packages/userscript/source/index.ts | import devSavegame from "./fixtures/savegame";
import devSettings from "./fixtures/settings";
import { Options } from "./options/Options";
import { SettingsStorage } from "./options/SettingsStorage";
import { cinfo } from "./tools/Log";
import { isNil } from "./tools/Maybe";
import { SavegameLoader } from "./tools/Save... | import devSavegame from "./fixtures/savegame";
import devSettings from "./fixtures/settings";
import { Options } from "./options/Options";
import { SettingsStorage } from "./options/SettingsStorage";
import { cinfo } from "./tools/Log";
import { isNil } from "./tools/Maybe";
import { SavegameLoader } from "./tools/Save... | Use legacy settings, if available | feat: Use legacy settings, if available
| TypeScript | mit | oliversalzburg/cbc-kitten-scientists,oliversalzburg/cbc-kitten-scientists,oliversalzburg/cbc-kitten-scientists | ---
+++
@@ -29,6 +29,9 @@
if (!isNil(devSettings)) {
const options = Options.parseLegacyOptions(devSettings);
userScript.injectOptions(options);
+ } else if (!isNil(legacySettings)) {
+ const options = Options.parseLegacyOptions(legacySettings);
+ userScript.injectOptions(options);
}
userS... |
e45faa86d33f295a34e389c8da27b69fc7d9dc2c | app/src/ui/banners/banner.tsx | app/src/ui/banners/banner.tsx | import * as React from 'react'
import { Octicon, OcticonSymbol } from '../octicons'
interface IBannerProps {
readonly id?: string
readonly timeout?: number
readonly dismissable?: boolean
readonly onDismissed: () => void
}
export class Banner extends React.Component<IBannerProps, {}> {
private timeoutId: Nod... | import * as React from 'react'
import { Octicon, OcticonSymbol } from '../octicons'
interface IBannerProps {
readonly id?: string
readonly timeout?: number
readonly dismissable?: boolean
readonly onDismissed: () => void
}
export class Banner extends React.Component<IBannerProps, {}> {
private timeoutId: num... | Use the Window setTimeout instead of the Node setTimeout | Use the Window setTimeout instead of the Node setTimeout
Co-Authored-By: Rafael Oleza <2cf5b502deae2e387c60721eb8244c243cb5c4e1@users.noreply.github.com>
| TypeScript | mit | desktop/desktop,kactus-io/kactus,desktop/desktop,shiftkey/desktop,j-f1/forked-desktop,artivilla/desktop,artivilla/desktop,say25/desktop,j-f1/forked-desktop,artivilla/desktop,kactus-io/kactus,say25/desktop,j-f1/forked-desktop,kactus-io/kactus,shiftkey/desktop,desktop/desktop,shiftkey/desktop,artivilla/desktop,desktop/de... | ---
+++
@@ -9,7 +9,7 @@
}
export class Banner extends React.Component<IBannerProps, {}> {
- private timeoutId: NodeJS.Timer | null = null
+ private timeoutId: number | null = null
public render() {
return (
@@ -37,7 +37,7 @@
public componentDidMount = () => {
if (this.props.timeout !== undef... |
344d472f70b9fc3976852baa03381278ab3c6981 | spec/api/APIv2.spec.ts | spec/api/APIv2.spec.ts | /// <reference path="../../typings/jasmine/jasmine.d.ts" />
/// <reference path="../../typings/when/when.d.ts" />
import * as when from "when";
import {APIv2, IAPINavIm} from "../../src/API";
describe("APIv2", () => {
var apiV2: APIv2;
beforeEach(() => {
apiV2 = new APIv2("clientId")
});
it... | /// <reference path="../../typings/jasmine/jasmine.d.ts" />
/// <reference path="../../typings/when/when.d.ts" />
import * as when from "when";
import {APIv2, IAPINavIm, IAPIImOr} from "../../src/API";
describe("APIv2", () => {
var apiV2: APIv2;
beforeEach(() => {
apiV2 = new APIv2("clientId")
}... | Test that API im or is called correctly. | Test that API im or is called correctly.
| TypeScript | mit | mapillary/mapillary-js,mapillary/mapillary-js | ---
+++
@@ -3,7 +3,7 @@
import * as when from "when";
-import {APIv2, IAPINavIm} from "../../src/API";
+import {APIv2, IAPINavIm, IAPIImOr} from "../../src/API";
describe("APIv2", () => {
var apiV2: APIv2;
@@ -16,7 +16,18 @@
expect(apiV2).toBeDefined();
});
- it("calls h", (done) => {
... |
114ebb69497a5a6fdc004334c1b81d6006a3a3ac | app/components/resources/state/resources-view-state.ts | app/components/resources/state/resources-view-state.ts | import {IdaiFieldDocument} from 'idai-components-2/idai-field-model';
import {NavigationPathInternal} from './navigation-path-internal';
/**
* @author Thomas Kleinke
*/
export interface ResourcesViewState {
mainTypeDocument?: IdaiFieldDocument;
types?: string[]; // query types in overview
q: string; //... | import {IdaiFieldDocument} from 'idai-components-2/idai-field-model';
import {NavigationPathInternal} from './navigation-path-internal';
/**
* @author Thomas Kleinke
*/
export interface ResourcesViewState {
mainTypeDocument?: IdaiFieldDocument;
types?: string[]; // query types in overview
q: string; //... | Check layerIds for wrong type | Check layerIds for wrong type
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -30,7 +30,10 @@
public static complete(viewState: ResourcesViewState) {
- if (!viewState.layerIds) viewState.layerIds = {};
+ if (!viewState.layerIds || Array.isArray(viewState.layerIds)) {
+ viewState.layerIds = {};
+ }
+
viewState.navigationPaths = {};
... |
dab981de5a27e1fc81946ec1cdfa5f042763f40c | src/Parsing/Outline/OutlineParserArgs.ts | src/Parsing/Outline/OutlineParserArgs.ts | import { OutlineSyntaxNode } from '../../SyntaxNodes/OutlineSyntaxNode'
import { HeadingLeveler } from './HeadingLeveler'
import { UpConfig } from '../../UpConfig'
export interface OutlineParserArgs {
text: string
headingLeveler: HeadingLeveler
config: UpConfig
then: (resultNodes: OutlineSyntaxNode[], lengthP... | import { OutlineSyntaxNode } from '../../SyntaxNodes/OutlineSyntaxNode'
import { LineConsumer } from './LineConsumer'
import { HeadingLeveler } from './HeadingLeveler'
import { UpConfig } from '../../UpConfig'
export interface OutlineParserArgs {
consumer: LineConsumer
headingLeveler: HeadingLeveler
config: UpC... | Make outline parsers accept LineConsumers | [Broken] Make outline parsers accept LineConsumers
| TypeScript | mit | start/up,start/up | ---
+++
@@ -1,10 +1,11 @@
import { OutlineSyntaxNode } from '../../SyntaxNodes/OutlineSyntaxNode'
+import { LineConsumer } from './LineConsumer'
import { HeadingLeveler } from './HeadingLeveler'
import { UpConfig } from '../../UpConfig'
export interface OutlineParserArgs {
- text: string
+ consumer: LineCon... |
ac1caa79abc2be43881b248e2292ed5385843e8e | src/utils/returnHit.ts | src/utils/returnHit.ts | import axios from 'axios';
import { API_URL } from '../constants';
import { stringToDomElement } from './parsing';
export const sendReturnHitRequest = async (hitId: string) => {
try {
const response = await axios.get(
`${API_URL}/mturk/return?hitId=${hitId}&inPipeline=false`
);
const rawHt... | import axios from 'axios';
import { API_URL } from '../constants';
import { stringToDomElement } from './parsing';
export const sendReturnHitRequest = async (hitId: string) => {
try {
const response = await axios.get(
`${API_URL}/mturk/return?hitId=${hitId}&inPipeline=false`
);
const rawHt... | Fix issue of returning the last HIT in a queue displaying an error. | Fix issue of returning the last HIT in a queue displaying an error.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -18,7 +18,13 @@
const validateHitReturn = (html: string): HitReturnStatus => {
const table = stringToDomElement(html);
- const alertBox = table.querySelector('#alertboxHeader')
+ const noAssignedHitsContainer = table.querySelector('td.error_title');
+
+ if (!!noAssignedHitsContainer) {
+ return... |
2bad14b0ade7fd94ef549401e609b3167bb1aa5c | src/models/helpers/sbg-expression-lib.ts | src/models/helpers/sbg-expression-lib.ts | export const sbgHelperLibrary = `
var setMetadata = function(file, metadata) {
if (!('metadata' in file))
file['metadata'] = metadata;
else {
for (var key in metadata) {
file['metadata'][key] = metadata[key];
}
}
return file
};
var inheritMetadata = function(o1, o2) ... | export const sbgHelperLibrary = `
var setMetadata = function(file, metadata) {
if (!('metadata' in file)) {
file['metadata'] = {}
}
for (var key in metadata) {
file['metadata'][key] = metadata[key];
}
return file
};
var inheritMetadata = function(o1, o2) {
var commonMetadata = {... | Fix inheriting metadata in array outputs | Fix inheriting metadata in array outputs
| TypeScript | apache-2.0 | rabix/cwl-ts,rabix/cwl-ts,rabix/cwl-ts | ---
+++
@@ -1,11 +1,10 @@
export const sbgHelperLibrary = `
var setMetadata = function(file, metadata) {
- if (!('metadata' in file))
- file['metadata'] = metadata;
- else {
- for (var key in metadata) {
- file['metadata'][key] = metadata[key];
- }
+ if (!('metadata' in file... |
9aa4bb66f2cb494b53b0021c1ef7ae3ae0224e1c | src/ts/view/counter.ts | src/ts/view/counter.ts | namespace YJMCNT {
/**
* CounterView
*/
export class CounterView extends Core.View {
counter:Counter;
constructor() {
super();
this.counter = new Counter();
this.counter.addObserver(this);
}
render() {
var counter... | namespace YJMCNT {
/**
* CounterView
*/
export class CounterView extends Core.View {
counter:Counter;
constructor() {
super();
this.counter = new Counter();
this.counter.addObserver(this);
}
render() {
var counter... | Add count down button (not work) | Add count down button (not work)
| TypeScript | mit | yajamon/chrome-ext-counter,yajamon/chrome-ext-counter,yajamon/chrome-ext-counter | ---
+++
@@ -20,8 +20,13 @@
countUpButton.innerHTML = "Up";
countUpButton.classList.add("countUp");
+ var countDownButton:HTMLButtonElement = document.createElement("button");
+ countDownButton.innerHTML = "Down";
+ countDownButton.classList.add(... |
49b792d1ad98a51d5930df48cda8e5734c5781ec | ui/src/app/runtime/model/runtime-app.ts | ui/src/app/runtime/model/runtime-app.ts | import { RuntimeAppInstance } from './runtime-app-instance';
import { Page } from '../../shared/model';
/**
* Runtime application model that corresponds to AppStatusResource from SCDF server.
*
* @author Ilayaperumal Gopinathan
*/
export class RuntimeApp {
public deploymentId: string;
public state: string;
... | import { RuntimeAppInstance } from './runtime-app-instance';
import { Page } from '../../shared/model';
/**
* Runtime application model that corresponds to AppStatusResource from SCDF server.
*
* @author Ilayaperumal Gopinathan
*/
export class RuntimeApp {
public deploymentId: string;
public state: string;
... | Update runtime app model parsing | Update runtime app model parsing
| TypeScript | apache-2.0 | BoykoAlex/spring-cloud-dataflow-ui,cppwfs/spring-cloud-dataflow-ui,cppwfs/spring-cloud-dataflow-ui,BoykoAlex/spring-cloud-dataflow-ui,spring-cloud/spring-cloud-dataflow-ui,spring-cloud/spring-cloud-dataflow-ui,cppwfs/spring-cloud-dataflow-ui,cppwfs/spring-cloud-dataflow-ui,spring-cloud/spring-cloud-dataflow-ui,spring-c... | ---
+++
@@ -25,7 +25,7 @@
public static fromJSON(input): RuntimeApp {
let instances = [];
- if (input.instances._embedded.appInstanceStatusResourceList) {
+ if (!!input.instances && !!input.instances._embedded && !!input.instances._embedded.appInstanceStatusResourceList) {
instances = input.ins... |
fe984c25c2ae2ea8d21e5fc65dd89ac93c6494b7 | front/components/store/reducers/index.ts | front/components/store/reducers/index.ts | import * as Actions from '../actions/types';
import ActionType = Actions.ActionType;
export default function reduce(state: AppState = { containers: [], hosts: [] }, action: ActionType): AppState {
switch (action.type) {
case 'add-container':
return Object.assign(
{},
... | import * as Actions from '../actions/types';
import ActionType = Actions.ActionType;
export default function reduce(state: AppState = { containers: [], hosts: [] }, action: ActionType): AppState {
switch (action.type) {
case 'add-container':
return Object.assign(
{},
... | Update entity if already exists in store | Update entity if already exists in store
| TypeScript | mit | paypac/node-concierge,paypac/node-concierge,the-concierge/concierge,the-concierge/concierge,paypac/node-concierge,paypac/node-concierge,the-concierge/concierge | ---
+++
@@ -7,27 +7,51 @@
return Object.assign(
{},
state,
- { containers: [...state.containers, action.container] }
- )
+ { containers: addEntity(state.containers, action.container) }
+ );
+
case 'add-host':
... |
ae18815f96933a7fcf98dda9ac7ea0de2ef22cba | src/app/core/error-handler/app-error-handler.service.ts | src/app/core/error-handler/app-error-handler.service.ts | import { Injectable, ErrorHandler } from '@angular/core';
import { HttpErrorResponse } from '@angular/common/http';
import { environment } from '@env/environment';
import { NotificationService } from '../notifications/notification.service';
import { NotificationStyles } from '../notifications/notification-styles';
/**... | import { Injectable, ErrorHandler } from '@angular/core';
import { HttpErrorResponse } from '@angular/common/http';
import { environment } from '@env/environment';
import { NotificationService } from '../notifications/notification.service';
/** Application-wide error handler that adds a UI notification to the error ha... | Remove non existing import NotificationStyles | fix: Remove non existing import NotificationStyles
Remove a non existing import in the error handler service for NotificationStyles.
Can cause an error when typescript compiling the application. | TypeScript | mit | tomastrajan/angular-ngrx-material-starter,tomastrajan/angular-ngrx-material-starter,tomastrajan/angular-ngrx-material-starter,tomastrajan/angular-ngrx-material-starter | ---
+++
@@ -2,7 +2,6 @@
import { HttpErrorResponse } from '@angular/common/http';
import { environment } from '@env/environment';
import { NotificationService } from '../notifications/notification.service';
-import { NotificationStyles } from '../notifications/notification-styles';
/** Application-wide error ha... |
4264ecfadc997194d47df4724f922f242c044b20 | test/test-no-metadata.ts | test/test-no-metadata.ts | import {assert} from 'chai';
import * as mm from '../src';
import * as path from 'path';
const t = assert;
it("should reject files that can't be parsed", async () => {
const filePath = path.join(__dirname, 'samples', __filename);
// Run with default options
try {
await mm.parseFile(filePath);
assert.f... | import {assert} from 'chai';
import * as mm from '../src';
import * as path from 'path';
it("should reject files that can't be parsed", async () => {
const filePath = path.join(__dirname, 'samples', __filename);
// Run with default options
try {
await mm.parseFile(filePath);
assert.fail('Should reject ... | Remove unused import & fix lint error | Remove unused import & fix lint error
| TypeScript | mit | Borewit/music-metadata,Borewit/music-metadata | ---
+++
@@ -1,8 +1,6 @@
import {assert} from 'chai';
import * as mm from '../src';
import * as path from 'path';
-
-const t = assert;
it("should reject files that can't be parsed", async () => {
@@ -12,7 +10,7 @@
try {
await mm.parseFile(filePath);
assert.fail('Should reject a file which cannot b... |
f254b169fd0c6d2682d68a4cc4b6a00332ba38ef | polygerrit-ui/app/styles/gr-icon-styles.ts | polygerrit-ui/app/styles/gr-icon-styles.ts | /**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {css} from 'lit';
export const iconStyles = css`
iron-icon {
display: inline-block;
vertical-align: top;
width: 20px;
height: 20px;
}
/* expected to be used in a 20px line-height inline context */
iro... | /**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {css} from 'lit';
export const iconStyles = css`
iron-icon {
display: inline-block;
vertical-align: top;
width: 20px;
height: 20px;
}
/* expected to be used in a 20px line-height inline context */
iro... | Make the icon-font-family for icons be a CSS var. | Make the icon-font-family for icons be a CSS var.
This is necessary for our internal tool as it uses a different
font-family.
Release-Notes: skip
Change-Id: I65c404387804a246539c41ef9d01f0208176db48
| TypeScript | apache-2.0 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | ---
+++
@@ -22,7 +22,7 @@
.material-icon {
color: var(--deemphasized-text-color);
- font-family: 'Material Symbols Outlined';
+ font-family: var(--icon-font-family, 'Material Symbols Outlined');
font-weight: normal;
font-style: normal;
font-size: 20px; |
b9c64ef470c645c045f6390438c4e6c27554aef1 | ts/editor/loadAce.ts | ts/editor/loadAce.ts | import * as fs from 'fs';
let path = 'node_modules/ace-builds/src-noconflict/ace.js';
try {
fs.accessSync(path);
} catch (e) {
// rethrow if no min
fs.accessSync(path = 'node_modules/ace-builds/src-min-noconflict/ace.js');
}
const script = document.createElement('script');
script.src = path;
document.bod... | import * as fs from 'fs';
let path = 'node_modules/ace-builds/src-noconflict/ace.js';
try {
fs.accessSync(path);
} catch (e) {
path = 'node_modules/ace-builds/src-min-noconflict/ace.js';
}
const script = document.createElement('script');
script.src = path;
document.body.appendChild(script); | Fix error loading ace when in production | Fix error loading ace when in production
| TypeScript | mit | qsctr/java-editor,qsctr/java-editor,qsctr/java-editor | ---
+++
@@ -5,8 +5,7 @@
try {
fs.accessSync(path);
} catch (e) {
- // rethrow if no min
- fs.accessSync(path = 'node_modules/ace-builds/src-min-noconflict/ace.js');
+ path = 'node_modules/ace-builds/src-min-noconflict/ace.js';
}
const script = document.createElement('script'); |
e2d6282934ecdc2d5a0096cd329663169e40335c | ui/src/SearchBar.tsx | ui/src/SearchBar.tsx | import React, { FormEvent, CSSProperties } from 'react';
import InputGroup from 'react-bootstrap/InputGroup';
import FormControl from 'react-bootstrap/FormControl';
import Button from 'react-bootstrap/Button';
import Form from 'react-bootstrap/Form';
import Icon from '@mdi/react';
import { mdiMagnify } from '@mdi/js';
... | import React, { useState, FormEvent, CSSProperties } from 'react';
import InputGroup from 'react-bootstrap/InputGroup';
import FormControl from 'react-bootstrap/FormControl';
import Button from 'react-bootstrap/Button';
import Form from 'react-bootstrap/Form';
import Icon from '@mdi/react';
import { mdiMagnify } from '... | Move query to state again | Move query to state again
Using a function scope variable caused strange effects
for example when resending the form
| TypeScript | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web | ---
+++
@@ -1,4 +1,4 @@
-import React, { FormEvent, CSSProperties } from 'react';
+import React, { useState, FormEvent, CSSProperties } from 'react';
import InputGroup from 'react-bootstrap/InputGroup';
import FormControl from 'react-bootstrap/FormControl';
import Button from 'react-bootstrap/Button';
@@ -17,7 +17... |
7845f2936e41b5dd33ed94924c8bd1e9f608d9b2 | src/extension/safari-extension/Routes.tsx | src/extension/safari-extension/Routes.tsx | import React from 'react'
import { Switch, Route } from 'react-router-dom'
import ExtensionLogin from 'extension/src/components/ExtensionLogin'
import Blocks from 'v2/components/Bookmarklet/components/Blocks'
import EditBlock from 'v2/components/Bookmarklet/components/EditBlock'
import Extension from 'v2/components/Bo... | import React from 'react'
import { Switch, Route } from 'react-router-dom'
import ExtensionLogin from 'extension/src/components/ExtensionLogin'
import Blocks from 'v2/components/Bookmarklet/components/Blocks'
import EditBlock from 'v2/components/Bookmarklet/components/EditBlock'
import Extension from 'v2/components/Bo... | Fix route for edit block | Fix route for edit block
| TypeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | ---
+++
@@ -19,8 +19,20 @@
{isLoggedIn && (
<React.Fragment>
- <Route path="/edit" component={EditBlock} />
- <Route path="/" render={() => <Blocks isSafari />} />
+ <Route path="/edit" render={() => <EditBlock isSafari />} />
+ <Route
+ path="/"
+ ... |
d5ee7dc00342fdefb12fcea0aa7ed2f9c10463c0 | source/services/guid/guid.service.ts | source/services/guid/guid.service.ts | import { OpaqueToken, Provider } from '@angular/core';
import * as uuid from 'uuid';
export interface IGuidService {
time(): string;
random(): string;
}
class GuidService implements IGuidService {
time(): string {
return uuid.v1();
}
random(): string {
return uuid.v4();
}
}
export const guid: IGuidServic... | import { OpaqueToken, Provider } from '@angular/core';
import * as uuid from 'node-uuid';
export interface IGuidService {
time(): string;
random(): string;
}
class GuidService implements IGuidService {
time(): string {
return uuid.v1();
}
random(): string {
return uuid.v4();
}
}
export const guid: IGuidS... | Use node-uuid to eliminate the dependency on crypto (node) | Use node-uuid to eliminate the dependency on crypto (node)
| TypeScript | mit | RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities | ---
+++
@@ -1,6 +1,6 @@
import { OpaqueToken, Provider } from '@angular/core';
-import * as uuid from 'uuid';
+import * as uuid from 'node-uuid';
export interface IGuidService {
time(): string; |
3f4763cefd5e8b040e4623b1521c12bedf17571e | src/app/index.tsx | src/app/index.tsx | // This is the entry point for the renderer process.
//
// Here we disable a few electron settings and mount the root component.
import React from "react"
import ReactDOM from "react-dom"
import { AppLayout as RootComponent } from "./root-component"
import { webFrame } from "electron"
import { css } from "glamor"
/**
... | // This is the entry point for the renderer process.
//
// Here we disable a few electron settings and mount the root component.
import React from "react"
import ReactDOM from "react-dom"
import { AppLayout as RootComponent } from "./root-component"
import { webFrame } from "electron"
/**
* CSS reset
*/
/**
* Elec... | Remove CSS resets in renderer | Remove CSS resets in renderer
| TypeScript | agpl-3.0 | briandk/transcriptase,briandk/transcriptase | ---
+++
@@ -5,30 +5,14 @@
import ReactDOM from "react-dom"
import { AppLayout as RootComponent } from "./root-component"
import { webFrame } from "electron"
-import { css } from "glamor"
/**
* CSS reset
*/
-import "glamor/reset"
/**
* Electron-focused CSS resets
*/
-css.global("html, body", {
- // t... |
660db27017f740f4ee851b5bf8bc742e1ada2b43 | src/app/app.component.spec.ts | src/app/app.component.spec.ts | import {async, TestBed} from "@angular/core/testing";
import {AppComponent} from "./app.component";
import {MdSidenavModule, MdSnackBarModule} from "@angular/material";
import {MainToolbarComponent} from "./main-toolbar/main-toolbar.component";
import {AccountButtonComponent} from "./account-button/account-button.comp... | import {async, TestBed} from "@angular/core/testing";
import {AppComponent} from "./app.component";
import {MdSidenavModule, MdSnackBarModule} from "@angular/material";
import {MainToolbarComponent} from "./main-toolbar/main-toolbar.component";
import {AccountButtonComponent} from "./account-button/account-button.comp... | Add import in unit test | app: Add import in unit test
| TypeScript | mit | lukaszkostrzewa/graphy,lukaszkostrzewa/graphy,lukaszkostrzewa/graphy | ---
+++
@@ -7,13 +7,14 @@
import {HintsComponent} from "./hints/hints.component";
import {SlickModule} from "ngx-slick";
import {HotkeyModule} from "angular2-hotkeys";
+import {GraphComponent} from "./graph/graph.component";
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTest... |
8cecd36684e84051e131639e4ce9d06e15d25735 | src/core/utils.ts | src/core/utils.ts |
/**
* Deep clone object
* @param object Object to clone
* @returns The cloned object
*/
export function clone <T>(object: T): T {
var out, v, key
out = Array.isArray(object) ? [] : {}
for (key in object) {
v = object[key]
out[key] = (typeof v === 'object') ? clone (v) : v
}
return out
}
| import { Context, deepmerge } from '.'
/**
* Deep clone object
* @param object Object to clone
* @returns The cloned object
*/
export function clone <T>(object: T): T {
var out, v, key
out = Array.isArray(object) ? [] : {}
for (key in object) {
v = object[key]
out[key] = (typeof v === 'object') ?... | Add `isServer` and `hydrateState` helpers for prerendering and SSR | Add `isServer` and `hydrateState` helpers for prerendering and SSR
| TypeScript | mit | FractalBlocks/Fractal,FractalBlocks/Fractal,FractalBlocks/Fractal | ---
+++
@@ -1,3 +1,4 @@
+import { Context, deepmerge } from '.'
/**
* Deep clone object
@@ -13,3 +14,17 @@
}
return out
}
+
+export const isServer = typeof window === 'undefined'
+
+export const isBrowser = !isServer
+
+export const hydrateState = <S>(ctx: Context<S>) => {
+ if ((window as any).ssrInitia... |
4ec2109c8d961d7384721708a6d8a982d66cb986 | src/js/store/appSettings/reducers.ts | src/js/store/appSettings/reducers.ts | import { AppSettings, AppSettingsTypes, OVERWRITE_SETTINGS } from './types';
const initialState: AppSettings = {
webmap: 'e691172598f04ea8881cd2a4adaa45ba',
title: 'GFW Mapbuilder',
subtitle: 'Make maps that matter',
logoUrl: 'https://my.gfw-mapbuilder.org/img/gfw-logo.png',
logoLinkUrl: 'https://www.gfw-map... | import { AppSettings, AppSettingsTypes, OVERWRITE_SETTINGS } from './types';
const initialState: AppSettings = {
webmap: '512eef95997b4e7486cdbdc45078739d',
title: 'GFW Mapbuilder',
subtitle: 'Make maps that matter',
logoUrl: 'https://my.gfw-mapbuilder.org/img/gfw-logo.png',
logoLinkUrl: 'https://www.gfw-map... | Update webmap id with our testing id that has a few diff layers | Update webmap id with our testing id that has a few diff layers | TypeScript | mit | wri/gfw-mapbuilder,wri/gfw-mapbuilder,wri/gfw-mapbuilder | ---
+++
@@ -1,7 +1,7 @@
import { AppSettings, AppSettingsTypes, OVERWRITE_SETTINGS } from './types';
const initialState: AppSettings = {
- webmap: 'e691172598f04ea8881cd2a4adaa45ba',
+ webmap: '512eef95997b4e7486cdbdc45078739d',
title: 'GFW Mapbuilder',
subtitle: 'Make maps that matter',
logoUrl: 'http... |
92fc60aedda42478163ce3cf95bcc6e49f558af9 | CeraonUI/src/Components/NavigationBar.tsx | CeraonUI/src/Components/NavigationBar.tsx | import * as React from 'react';
import {Menu, Input} from 'semantic-ui-react';
import UserSessionInfo from '../State/Identity/UserSessionInfo';
import NavigationBarState from '../State/NavigationBarState';
export interface NavigationBarProps extends React.Props<NavigationBar> {
navigationBarState: NavigationBarState;... | import * as React from 'react';
import {Menu, Input} from 'semantic-ui-react';
import UserSessionInfo from '../State/Identity/UserSessionInfo';
import NavigationBarState from '../State/NavigationBarState';
import LoginForm from './LoginForm';
import CeraonDispatcher from '../Store/CeraonDispatcher';
import CreateLoginA... | Add more functionality to navigation bar | Add more functionality to navigation bar
| TypeScript | bsd-3-clause | Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound | ---
+++
@@ -2,28 +2,59 @@
import {Menu, Input} from 'semantic-ui-react';
import UserSessionInfo from '../State/Identity/UserSessionInfo';
import NavigationBarState from '../State/NavigationBarState';
+import LoginForm from './LoginForm';
+import CeraonDispatcher from '../Store/CeraonDispatcher';
+import CreateLogi... |
19801ada9bee3ecd137c466c6e4a9f20de10aedb | applications/calendar/src/app/components/events/MoreFullDayEvent.tsx | applications/calendar/src/app/components/events/MoreFullDayEvent.tsx | import React, { CSSProperties, Ref } from 'react';
import { classnames } from 'react-components';
interface Props {
style: CSSProperties;
more: number;
eventRef?: Ref<HTMLDivElement>;
isSelected: boolean;
}
// NOTE: Can not be a button to satisfy auto close, and to be the same as the normal events
cons... | import React, { CSSProperties, Ref } from 'react';
import { classnames } from 'react-components';
interface Props {
style: CSSProperties;
more: number;
eventRef?: Ref<HTMLDivElement>;
isSelected: boolean;
}
// NOTE: Can not be a button to satisfy auto close, and to be the same as the normal events
cons... | Fix "more" button for new styles | Fix "more" button for new styles
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -19,8 +19,8 @@
>
<div
className={classnames([
- 'calendar-dayeventcell-inner calendar-dayeventcell-inner--isNotAllDay calendar-dayeventcell-inner--isLoaded ellipsis inline-flex alignleft w100 pl0-5 pr0-5',
- isSelected && 'calenda... |
d7058c12bc19d5bd037e3d21dc80ed27b2a38d31 | app/src/ui/updates/update-available.tsx | app/src/ui/updates/update-available.tsx | import * as React from 'react'
import { LinkButton } from '../lib/link-button'
import { updateStore } from '../lib/update-store'
import { Octicon, OcticonSymbol } from '../octicons'
interface IUpdateAvailableProps {
readonly onDismissed: () => void
}
/**
* A component which tells the user an update is available an... | import * as React from 'react'
import { LinkButton } from '../lib/link-button'
import { updateStore } from '../lib/update-store'
import { Octicon, OcticonSymbol } from '../octicons'
interface IUpdateAvailableProps {
readonly updateAvailble: boolean
}
interface IUpdateAvailableState {
readonly isActive: boolean,
}... | Add state to manage visibility of update banner | Add state to manage visibility of update banner
| TypeScript | mit | j-f1/forked-desktop,hjobrien/desktop,BugTesterTest/desktops,gengjiawen/desktop,kactus-io/kactus,shiftkey/desktop,hjobrien/desktop,j-f1/forked-desktop,say25/desktop,j-f1/forked-desktop,desktop/desktop,artivilla/desktop,say25/desktop,BugTesterTest/desktops,gengjiawen/desktop,gengjiawen/desktop,BugTesterTest/desktops,say2... | ---
+++
@@ -4,21 +4,36 @@
import { Octicon, OcticonSymbol } from '../octicons'
interface IUpdateAvailableProps {
- readonly onDismissed: () => void
+ readonly updateAvailble: boolean
+}
+
+interface IUpdateAvailableState {
+ readonly isActive: boolean,
}
/**
* A component which tells the user an update i... |
be9ac553de4c95272a3951282233ef7471ba95fe | MonitoredSocket.ts | MonitoredSocket.ts | import net = require("net");
/**
* Represents a given host and port. Handles checking whether a host
* is up or not, as well as if it is accessible on the given port.
*/
class MonitoredSocket {
/**
* Returns whether the host can be accessed on its port.
*/
public isUp: boolean;
private socke... | import net = require("net");
/**
* Represents a given host and port. Handles checking whether a host
* is up or not, as well as if it is accessible on the given port.
*/
class MonitoredSocket {
/**
* Returns whether the host can be accessed on its port.
*/
public isUp: boolean;
private socke... | Add optional connection param to callbacks | Add optional connection param to callbacks
| TypeScript | mit | OzuYatamutsu/is-my-server-up,OzuYatamutsu/is-my-server-up,OzuYatamutsu/is-my-server-up | ---
+++
@@ -18,8 +18,8 @@
this.socket = new net.Socket();
}
- connect(successCallback: { (sock: MonitoredSocket): void },
- failCallback: { (sock: MonitoredSocket): void }): void {
+ connect(successCallback: { (sock: MonitoredSocket, conn?: any): void },
+ failCallback: { (sock: Mo... |
3f22797c158be281f8deb333cff7d9208459e704 | src/utils/privateClassNames.ts | src/utils/privateClassNames.ts | import { classNamePrefix } from "./consts";
export const sortArrowClassName = classNamePrefix + "sortArrow";
export const activeSortArrowClassName = classNamePrefix + "sortArrow--active";
export const ascendantSortArrowClassName = classNamePrefix + "sortArrow--ascendant";
export const descendantSortArrowClassName = cl... | import { classNamePrefix } from "./consts";
export const sortArrowClassName = classNamePrefix + "sortArrow";
export const activeSortArrowClassName = classNamePrefix + "sortArrow--active";
export const ascendantSortArrowClassName = classNamePrefix + "sortArrow--ascendant";
export const descendantSortArrowClassName = cl... | Create privateClassName for the sticky header | feat: Create privateClassName for the sticky header
| TypeScript | mit | vhfmag/react-data-table,vhfmag/react-data-table,vhfmag/react-data-table | ---
+++
@@ -6,3 +6,4 @@
export const descendantSortArrowClassName = classNamePrefix + "sortArrow--descendant";
export const selectionCellClassName = classNamePrefix + "selectionCell";
+export const stickyHeaderClassName = classNamePrefix + "stickyHeader"; |
e037fa061174c3e74af6515f487d8b39b19f2f0f | src/app/search-results/search-results.tsx | src/app/search-results/search-results.tsx | import * as React from 'react';
import * as Aggregate from './search-results-aggregate/search-results-aggregate';
import * as Person from './search-results-person/search-results-person'
import { Row, Col } from 'react-bootstrap'
export const SearchResults = (props) => {
// Be nice to revist the tag aggregations with... | import * as React from 'react';
import * as Aggregate from './search-results-aggregate/search-results-aggregate';
import * as Person from './search-results-person/search-results-person'
import { Row, Col } from 'react-bootstrap'
export const SearchResults = (props) => {
// Be nice to revist the tag aggregations with... | Add the removal of the button if there are no more | Add the removal of the button if there are no more
| TypeScript | mit | JoshuaToth/person-data-viewer,JoshuaToth/person-data-viewer,JoshuaToth/person-data-viewer | ---
+++
@@ -15,7 +15,7 @@
<Person.SearchResultsPerson onSubmit={props.onSubmit} persons={props.resultData.hits.hits} total={props.resultData.hits.total}/>
</Row>
<Row>
- {props.resultData.hits.total ? <button onClick={() => {props.loadMore(props.resultData.hits.hits.length)}} className="... |
a4d0c9b3967e8a526bce79ba8a2f33c4b70bbcf9 | src/app/dashboards/card.simple.component.ts | src/app/dashboards/card.simple.component.ts | import { Component, EventEmitter, Output, Input } from '@angular/core';
@Component({
selector: 'app-sac-card',
templateUrl: 'card.simple.component.html',
styleUrls: ['card.simple.component.css'],
})
export class CardComponent {
@Input() cardImage: string;
@Input() title: string;
@Input() bodyText: strin... | import { Component, EventEmitter, Output, Input } from '@angular/core';
@Component({
selector: 'app-sac-card',
templateUrl: 'card.simple.component.html',
styleUrls: ['card.simple.component.css'],
})
export class CardComponent {
@Input() cardImage: string;
@Input() title: string;
@Input() bodyText: strin... | Revert "build error fixed introduced with 59c064e" | Revert "build error fixed introduced with 59c064e"
This reverts commit ea741f69cf7bd9dcdc81aa0ed923acff8d4589d9.
| TypeScript | apache-2.0 | ZGIS/smart-portal-webgui,ZGIS/smart-portal-webgui,ZGIS/smart-portal-webgui,ZGIS/smart-portal-webgui,ZGIS/smart-portal-webgui | ---
+++
@@ -36,18 +36,6 @@
}
}
- getProgressType(value: number): string {
- if (value > 0.75) {
- return 'success';
- } else if (value > 0.5) {
- return 'info';
- } else if (value > 0.1) {
- return 'warning';
- } else {
- return 'default';
- }
- }
-
headerClicked() {
... |
4a85c84da21425368c22a3c59aaa6af8a89f757b | welcome/index.ts | welcome/index.ts | import axios from 'axios';
const welcomeScrapboxUrl = `https://scrapbox.io/api/pages/tsg/welcome`;
import {WebClient, RTMClient} from '@slack/client';
interface SlackInterface {
rtmClient: RTMClient,
webClient: WebClient,
}
export default async ({rtmClient: rtm, webClient: slack}: SlackInterface) => {
const gene... | import axios from 'axios';
const welcomeScrapboxUrl = `https://scrapbox.io/api/pages/tsg/welcome`;
import {WebClient, RTMClient} from '@slack/client';
interface SlackInterface {
rtmClient: RTMClient,
webClient: WebClient,
}
export default async ({rtmClient: rtm, webClient: slack}: SlackInterface) => {
const gene... | Use JP3BPY's name and icon to welcome nwecomers | welcome: Use JP3BPY's name and icon to welcome nwecomers
| TypeScript | mit | tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot | ---
+++
@@ -20,6 +20,12 @@
const {data} = await axios.get(welcomeScrapboxUrl, {headers: {Cookie: `connect.sid=${process.env.SCRAPBOX_SID}`}});
const text = [`<@${event.user}>`, ...data.lines.map(({text}: {text: string}) => text).slice(1)].join('\n');
- slack.chat.postMessage({channel: general, text, link_nam... |
f6c8be81e8757f88c0b6d8d8b4fc528e106f3358 | typescript-marionette-v2/src/RootModel.ts | typescript-marionette-v2/src/RootModel.ts | // The following has to be added to the bottom of typings/global/backbone.localstorage/index.d.ts.
// TODO: Figure out how to avoid this or add a pull request fixing this.
// declare module "backbone.localstorage" {
// export = Backbone.LocalStorage;
// }
import Filter from "./Filter"
import Store = require("backbo... | // The following has to be added to the bottom of typings/global/backbone.localstorage/index.d.ts.
// TODO: Figure out how to avoid this or add a pull request fixing this.
// declare module "backbone.localstorage" {
// export = Backbone.LocalStorage;
// }
import Filter from "./Filter"
import Store = require("backbo... | Remove filter since it returns an array | Remove filter since it returns an array
| TypeScript | unlicense | janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations | ---
+++
@@ -25,27 +25,6 @@
this.set("fitler", filter)
}
- // TODO: Filtering a collection does not return a new collection, but an array.
- // get filteredTodos(): TodoCollection {
- // const filtered = this.todos.filter(todo => {
- // switch (this.filter) {
- // case Filter.Active:
- // ... |
66666eba32f395242a0245b73a05d3598375597b | examples/components/with-handle.tsx | examples/components/with-handle.tsx | import React, { useState } from "react";
import { ReactSortable } from "../../src";
import styled from "styled-components";
import { threes, Item } from "../util";
export function WithHandle() {
const [list, setList] = useState(threes);
return (
<ReactSortable
handle=".handle"
animation={150}
... | import React, { useState } from "react";
import { ReactSortable } from "../../src";
import styled from "styled-components";
import { threes, Item } from "../util";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
export function WithHandle() {
const [list, setList] = useState(threes);
return (
... | Replace handle with font awesome handle | Replace handle with font awesome handle
| TypeScript | mit | cheton/react-sortable | ---
+++
@@ -2,7 +2,7 @@
import { ReactSortable } from "../../src";
import styled from "styled-components";
import { threes, Item } from "../util";
-
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
export function WithHandle() {
const [list, setList] = useState(threes);
@@ -14,22 +14,22 @@
... |
1677778e44fd15d37047fdfd485594c4123c3dab | src/v2/Apps/_Preferences2/__tests__/PreferencesApp.jest.tsx | src/v2/Apps/_Preferences2/__tests__/PreferencesApp.jest.tsx | import { render, screen, fireEvent } from "@testing-library/react"
import { PreferencesApp } from "../PreferencesApp"
describe("PreferencesApp", () => {
it("renders the preference center", () => {
render(<PreferencesApp></PreferencesApp>)
expect(screen.getByText("Preferences Center")).toBeInTheDocument()
... | import { render, screen, fireEvent } from "@testing-library/react"
import { PreferencesApp } from "../PreferencesApp"
describe("PreferencesApp", () => {
it("renders the preference center", () => {
render(<PreferencesApp></PreferencesApp>)
expect(screen.getByText("Preferences Center")).toBeInTheDocument()
... | Expand testing for the preference center | chore: Expand testing for the preference center
| TypeScript | mit | artsy/force,artsy/force,artsy/force,artsy/force | ---
+++
@@ -8,22 +8,58 @@
expect(screen.getByText("Preferences Center")).toBeInTheDocument()
})
- it("allows user to uncheck all boxes with unsubscribe all", () => {
+ it("allows user to uncheck all boxes with unsubscribe from all", () => {
render(<PreferencesApp></PreferencesApp>)
+ expect(scre... |
0a2475655fc8f11a848b7a2c948a9bffad1c4c91 | src/browser/shared/workspace.service.ts | src/browser/shared/workspace.service.ts | import { Inject, Injectable, InjectionToken, OnDestroy, Optional } from '@angular/core';
import { from, Observable } from 'rxjs';
import { GEEKS_DIARY_DIR_PATH, NOTES_DIR_PATH, WORKSPACE_DIR_PATH } from '../../core/workspace';
import { IpcActionClient } from '../../libs/ipc';
export class WorkspaceConfig {
rootDi... | import { Inject, Injectable, InjectionToken, OnDestroy, Optional } from '@angular/core';
import { from, Observable } from 'rxjs';
import { ASSETS_DIR_PATH, GEEKS_DIARY_DIR_PATH, NOTES_DIR_PATH, WORKSPACE_DIR_PATH } from '../../core/workspace';
import { IpcActionClient } from '../../libs/ipc';
export class WorkspaceCo... | Add assets directory path config option | Add assets directory path config option
| TypeScript | mit | seokju-na/geeks-diary,seokju-na/geeks-diary,seokju-na/geeks-diary | ---
+++
@@ -1,6 +1,6 @@
import { Inject, Injectable, InjectionToken, OnDestroy, Optional } from '@angular/core';
import { from, Observable } from 'rxjs';
-import { GEEKS_DIARY_DIR_PATH, NOTES_DIR_PATH, WORKSPACE_DIR_PATH } from '../../core/workspace';
+import { ASSETS_DIR_PATH, GEEKS_DIARY_DIR_PATH, NOTES_DIR_PATH,... |
d2a1af471b071f2cc8d7940ec887609577a3be8d | src/jsonapi/jsonapi-response.model.ts | src/jsonapi/jsonapi-response.model.ts | import { JSONAPIResourceObject } from './jsonapi-resource-object.model';
export class JSONAPIResponse<T extends JSONAPIResourceObject | JSONAPIResourceObject[]> {
public data: T;
public included: JSONAPIResourceObject[];
public constructor(json: {data: any, included?: any}) {
this.data = json.data... | import { JSONAPIResourceObject } from './jsonapi-resource-object.model';
export class JSONAPIResponse<T extends JSONAPIResourceObject | JSONAPIResourceObject[]> {
public data: T;
public included: JSONAPIResourceObject[];
public constructor(json: {data: any, included?: any}) {
this.data = json.data... | Return empty array when include not defined | Return empty array when include not defined
| TypeScript | mit | ValueMiner/ng2-valueminer-connector,ValueMiner/ng2-valueminer-connector | ---
+++
@@ -18,7 +18,10 @@
}
public toIncludedByType<U extends JSONAPIResourceObject>(type: string): U[] {
- return <U[]>this.included.filter((include: JSONAPIResourceObject) => include.type === type);
+ if (!this.included) {
+ return [];
+ }
+ return <U[]>this.included.filter... |
5bc0a365f0ac29df2feb22e611d691b2eceda386 | src/app/shared/footer/footer.component.ts | src/app/shared/footer/footer.component.ts | import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.sass']
})
export class FooterComponent {
constructor(private router: Router) { }
relativePos() {
... | import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.sass']
})
export class FooterComponent {
constructor(private router: Router) { }
relativePos() {
... | Add profile to relative pos | Add profile to relative pos
| TypeScript | apache-2.0 | SamuelM333/snippet-sniper-frontend,SamuelM333/snippet-sniper-frontend,SamuelM333/snippet-sniper-frontend | ---
+++
@@ -18,7 +18,9 @@
'/sign-up'
];
- if (this.router.url === '/snippets' || this.router.url === '/sign-up') {
+ if (this.router.url === '/snippets' ||
+ this.router.url === '/profile' ||
+ this.router.url === '/sign-up') {
return true;
... |
15e9312625c10b488ad49f648b95796d7d6ef5f0 | lib/run-effects.ts | lib/run-effects.ts | import { OpaqueToken, Provider } from '@angular/core';
import { flatten } from './util';
import { CONNECT_EFFECTS_PROVIDER } from './effects';
import { STATE_UPDATES_PROVIDER } from './state-updates';
export const BOOTSTRAP_EFFECTS = new OpaqueToken('@ngrx/effects Bootstrap Effects');
export function runEffects(...e... | import { OpaqueToken, Provider } from '@angular/core';
import { flatten } from './util';
import { CONNECT_EFFECTS_PROVIDER, BOOTSTRAP_EFFECTS } from './effects';
import { STATE_UPDATES_PROVIDER } from './state-updates';
export function runEffects(...effects: any[]) {
const allEffects = flatten(effects).map(effect ... | Fix import for bootstrap effects token | Fix import for bootstrap effects token
| TypeScript | mit | ngrx/effects,ngrx/effects | ---
+++
@@ -1,10 +1,9 @@
import { OpaqueToken, Provider } from '@angular/core';
import { flatten } from './util';
-import { CONNECT_EFFECTS_PROVIDER } from './effects';
+import { CONNECT_EFFECTS_PROVIDER, BOOTSTRAP_EFFECTS } from './effects';
import { STATE_UPDATES_PROVIDER } from './state-updates';
-export co... |
e8d055daa6b34881915d6cf39715da668f907db6 | src/key-value-storage/LocalForageProxy.ts | src/key-value-storage/LocalForageProxy.ts | import * as localForage from 'localforage';
import {IKeyValueStorageProxy} from './KeyValueStorageProxy';
import {ISerializer} from '../serializers/serializer';
export class LocalForageProxy implements IKeyValueStorageProxy {
private localForageStore: LocalForage;
private serializer: ISerializer;
constru... | import * as localForage from 'localforage';
import {IKeyValueStorageProxy} from './KeyValueStorageProxy';
import {ISerializer} from '../serializers/serializer';
export class LocalForageProxy implements IKeyValueStorageProxy {
private localForageStore: LocalForage;
private serializer: ISerializer;
constru... | Fix typing issue that fails in the latest TS version | Fix typing issue that fails in the latest TS version
| TypeScript | apache-2.0 | bencompton/io-source | ---
+++
@@ -11,7 +11,7 @@
this.serializer = serializer;
this.localForageStore = localForage.createInstance({
- driver: <any[]>[localForage.WEBSQL, localForage.INDEXEDDB, localForage.LOCALSTORAGE]
+ driver: <any[]>[localForage.INDEXEDDB, localForage.WEBSQL, localForage.LOCALST... |
c1ba2fa6f6f7e30f7b069f09a3532c542886c09e | coffee-chats/src/main/webapp/src/components/GroupListPage.tsx | coffee-chats/src/main/webapp/src/components/GroupListPage.tsx | import React from "react";
import {Box, Container, Grid, TextField} from "@material-ui/core";
import {GroupCard} from "./GroupCard";
export function GroupListPage() {
return (
<Box mt={4}>
<Container maxWidth="md">
<Grid container spacing={2}>
<Grid item xs={12}>
<Te... | import React from "react";
import {Box, Container, Fab, Grid, Icon, TextField} from "@material-ui/core";
import {GroupCard} from "./GroupCard";
import {makeStyles} from "@material-ui/core/styles";
const useStyles = makeStyles((theme) => ({
extendedIcon: {
marginRight: theme.spacing(.5),
},
shrink: {
flex... | Add a create group button | Add a create group button
| TypeScript | apache-2.0 | googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020 | ---
+++
@@ -1,20 +1,40 @@
import React from "react";
-import {Box, Container, Grid, TextField} from "@material-ui/core";
+import {Box, Container, Fab, Grid, Icon, TextField} from "@material-ui/core";
import {GroupCard} from "./GroupCard";
+import {makeStyles} from "@material-ui/core/styles";
+
+const useStyles = ma... |
cb5936c7f9738311ab2d8cab7fa7267bbe63a400 | src/app/comingSoon/comingSoon.component.ts | src/app/comingSoon/comingSoon.component.ts | import {AfterViewInit} from "@angular/core";
import {Component} from "@angular/core";
import {Router} from "@angular/router";
@Component({
selector: 'comming-soon',
templateUrl: './comingSoon.component.html'
})
export class ComingSoonComponent implements AfterViewInit
{
constructor(private router:Router) {
}... | import {AfterViewInit, OnInit} from "@angular/core";
import {Component} from "@angular/core";
import {Router, ActivatedRoute} from "@angular/router";
import {SearchService} from "../app.search.service";
@Component({
selector: 'comming-soon',
templateUrl: './comingSoon.component.html'
})
export class ComingSoonComp... | Update search parameters so that search values reset. | Update search parameters so that search values reset.
| TypeScript | bsd-3-clause | UoA-eResearch/research-hub,UoA-eResearch/research-hub,UoA-eResearch/research-hub | ---
+++
@@ -1,16 +1,25 @@
-import {AfterViewInit} from "@angular/core";
+import {AfterViewInit, OnInit} from "@angular/core";
import {Component} from "@angular/core";
-import {Router} from "@angular/router";
+import {Router, ActivatedRoute} from "@angular/router";
+import {SearchService} from "../app.search.service"... |
aa3b1b1bab2538576db2e3f99b944fe3776c9edd | app/src/ui/lib/theme-change-monitor.ts | app/src/ui/lib/theme-change-monitor.ts | import { remote } from 'electron'
import { ApplicationTheme } from './application-theme'
import { IDisposable, Disposable, Emitter } from 'event-kit'
import { supportsDarkMode, isDarkModeEnabled } from './dark-theme'
class ThemeChangeMonitor implements IDisposable {
private readonly emitter = new Emitter()
public... | import { remote } from 'electron'
import { ApplicationTheme } from './application-theme'
import { IDisposable, Disposable, Emitter } from 'event-kit'
import { supportsDarkMode, isDarkModeEnabled } from './dark-theme'
class ThemeChangeMonitor implements IDisposable {
private readonly emitter = new Emitter()
public... | Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+ | Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+
| TypeScript | mit | say25/desktop,say25/desktop,j-f1/forked-desktop,shiftkey/desktop,artivilla/desktop,say25/desktop,desktop/desktop,artivilla/desktop,shiftkey/desktop,j-f1/forked-desktop,shiftkey/desktop,artivilla/desktop,desktop/desktop,desktop/desktop,j-f1/forked-desktop,j-f1/forked-desktop,say25/desktop,shiftkey/desktop,artivilla/desk... | ---
+++
@@ -11,11 +11,13 @@
}
public dispose() {
- remote.nativeTheme.removeAllListeners()
+ if (remote.nativeTheme) {
+ remote.nativeTheme.removeAllListeners()
+ }
}
private subscribe = () => {
- if (!supportsDarkMode()) {
+ if (!supportsDarkMode() || !remote.nativeTheme) {
... |
265a20787f6982e5b0373656efbc01512c179576 | app/src/ui/cli-installed/cli-installed.tsx | app/src/ui/cli-installed/cli-installed.tsx | import * as React from 'react'
import { Button } from '../lib/button'
import { ButtonGroup } from '../lib/button-group'
import { Dialog, DialogContent, DialogFooter } from '../dialog'
import { InstalledCLIPath } from '../lib/install-cli'
interface ICLIInstalledProps {
/** Called when the popup should be dismissed. *... | import * as React from 'react'
import { Dialog, DialogContent, DefaultDialogFooter } from '../dialog'
import { InstalledCLIPath } from '../lib/install-cli'
interface ICLIInstalledProps {
/** Called when the popup should be dismissed. */
readonly onDismissed: () => void
}
/** Tell the user the CLI tool was success... | Convert cli installed notice dialog to default dialog footer | Convert cli installed notice dialog to default dialog footer
| TypeScript | mit | desktop/desktop,say25/desktop,kactus-io/kactus,shiftkey/desktop,say25/desktop,artivilla/desktop,shiftkey/desktop,j-f1/forked-desktop,kactus-io/kactus,say25/desktop,shiftkey/desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,desktop/desktop,desktop/desktop,artivilla/desktop,j-f1/forked-desktop,kactus-io/kactus,... | ---
+++
@@ -1,7 +1,5 @@
import * as React from 'react'
-import { Button } from '../lib/button'
-import { ButtonGroup } from '../lib/button-group'
-import { Dialog, DialogContent, DialogFooter } from '../dialog'
+import { Dialog, DialogContent, DefaultDialogFooter } from '../dialog'
import { InstalledCLIPath } from ... |
1ca79ae147725b96f0f6a494f0151c4ab649c55d | app/core/images/row/image-width-calculator.ts | app/core/images/row/image-width-calculator.ts | /**
* @author Thomas Kleinke
*/
export module ImageWidthCalculator {
export function computeWidth(imageWidth: number, imageHeight: number, targetHeight: number,
maxWidth: number): number {
const targetWidth: number = Math.ceil(Math.min((targetHeight / imageHeight), 1) * ... | /**
* @author Thomas Kleinke
*/
export module ImageWidthCalculator {
export function computeWidth(imageWidth: number, imageHeight: number, targetHeight: number,
maxWidth: number): number {
const targetWidth: number = Math.round(Math.min((targetHeight / imageHeight), 1) *... | Switch rounding function in ImageWidthCalculator | Switch rounding function in ImageWidthCalculator
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -6,7 +6,7 @@
export function computeWidth(imageWidth: number, imageHeight: number, targetHeight: number,
maxWidth: number): number {
- const targetWidth: number = Math.ceil(Math.min((targetHeight / imageHeight), 1) * imageWidth);
+ const targetWidth: n... |
fa35a1e5563a8a47625e304982868cfcdbf0ee72 | coffee-chats/src/main/webapp/src/format.ts | coffee-chats/src/main/webapp/src/format.ts | /**
* Joins a list of strings to produce a human readable string:
*
* > humanReadableJoin(["apple", "banana", "orange"])
* "apple, banana, and orange"
*/
export function humanReadableJoin(list: string[]) {
return list.concat(list.splice(-2, 2).join(" and ")).join(", ");
} | /**
* Joins a list of strings to produce a human readable string:
*
* > humanReadableJoin(["apple", "banana", "orange"])
* "apple, banana, and orange"
*/
export function humanReadableJoin(list: string[]) {
list = list.slice();
return list.concat(list.splice(-2, 2).join(" and ")).join(", ");
}
| Fix humanReadableJoin not being a pure function | Fix humanReadableJoin not being a pure function
| TypeScript | apache-2.0 | googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020 | ---
+++
@@ -5,5 +5,6 @@
* "apple, banana, and orange"
*/
export function humanReadableJoin(list: string[]) {
+ list = list.slice();
return list.concat(list.splice(-2, 2).join(" and ")).join(", ");
} |
ea27bf8177e49c200c22f5392f40503ecdb09da8 | bokehjs/test/core/index.ts | bokehjs/test/core/index.ts | import "./signaling"
import "./enums"
import "./has_props"
import "./layout"
import "./logging"
import "./properties"
import "./property_mixins"
import "./util"
import "./selection_manager"
import "./selector"
import "./ui_events"
| import "./signaling"
import "./enums"
import "./has_props"
import "./layout"
import "./logging"
import "./properties"
import "./property_mixins"
import "./util"
import "./selector"
import "./ui_events"
| Remove SelectionManager import from JS tests | Remove SelectionManager import from JS tests
| TypeScript | bsd-3-clause | rs2/bokeh,Karel-van-de-Plassche/bokeh,timsnyder/bokeh,aavanian/bokeh,timsnyder/bokeh,timsnyder/bokeh,rs2/bokeh,rs2/bokeh,rs2/bokeh,dennisobrien/bokeh,stonebig/bokeh,jakirkham/bokeh,stonebig/bokeh,stonebig/bokeh,dennisobrien/bokeh,timsnyder/bokeh,ericmjl/bokeh,philippjfr/bokeh,DuCorey/bokeh,dennisobrien/bokeh,mindriot10... | ---
+++
@@ -6,6 +6,5 @@
import "./properties"
import "./property_mixins"
import "./util"
-import "./selection_manager"
import "./selector"
import "./ui_events" |
40916a552f7ccdbc62c934716dbd74727b2d5d84 | scripts/cli/utils/useSpinner.ts | scripts/cli/utils/useSpinner.ts | import ora from 'ora';
type FnToSpin<T> = (options: T) => Promise<void>;
export const useSpinner = <T>(spinnerLabel: string, fn: FnToSpin<T>, killProcess = true) => {
return async (options: T) => {
const spinner = new ora(spinnerLabel);
spinner.start();
try {
await fn(options);
spinner.succe... | import ora from 'ora';
type FnToSpin<T> = (options: T) => Promise<void>;
export const useSpinner = <T>(spinnerLabel: string, fn: FnToSpin<T>, killProcess = true) => {
return async (options: T) => {
const spinner = ora(spinnerLabel);
spinner.start();
try {
await fn(options);
spinner.succeed()... | Call ora instead of instantiating it | Call ora instead of instantiating it
| TypeScript | agpl-3.0 | grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana | ---
+++
@@ -4,7 +4,7 @@
export const useSpinner = <T>(spinnerLabel: string, fn: FnToSpin<T>, killProcess = true) => {
return async (options: T) => {
- const spinner = new ora(spinnerLabel);
+ const spinner = ora(spinnerLabel);
spinner.start();
try {
await fn(options); |
f3ba44e02964c60dd674645474bcc68cc2b55d11 | tests/__tests__/tsx-errors.spec.ts | tests/__tests__/tsx-errors.spec.ts | import runJest from '../__helpers__/runJest';
import * as React from 'react';
describe('TSX Errors', () => {
it('should show the correct error locations in the typescript files', () => {
const result = runJest('../button', ['--no-cache', '-u']);
const stderr = result.stderr.toString();
expect(result.st... | import runJest from '../__helpers__/runJest';
import * as React from 'react';
describe('TSX Errors', () => {
it('should show the correct error locations in the typescript files', () => {
const result = runJest('../button', ['--no-cache', '-u']);
const stderr = result.stderr.toString();
expect(result.st... | Fix line number in a test | Fix line number in a test | TypeScript | mit | kulshekhar/ts-jest,kulshekhar/ts-jest | ---
+++
@@ -9,6 +9,6 @@
expect(result.status).toBe(1);
expect(stderr).toContain('Button.tsx:22:17');
- expect(stderr).toContain('Button.test.tsx:16:12');
+ expect(stderr).toContain('Button.test.tsx:19:12');
});
}); |
3ea0cdea91f174c9e89cd64d471cd021941197a9 | src/renderer/app/components/Menu/styles.ts | src/renderer/app/components/Menu/styles.ts | import styled, { css } from 'styled-components';
import { shadows } from '@mixins';
export const Container = styled.div`
width: 300px;
padding-top: 4px;
padding-bottom: 4px;
position: absolute;
top: 56px;
right: 0;
background-color: #fff;
z-index: 9999;
border-radius: 4px;
transform-origin: top ri... | import styled, { css } from 'styled-components';
import { shadows } from '@mixins';
import { EASE_FUNCTION } from '~/constants';
export const Container = styled.div`
width: 300px;
padding-top: 4px;
padding-bottom: 4px;
position: absolute;
top: 56px;
right: 0;
background-color: #fff;
z-index: 9999;
b... | Add toggle animation to menu | Add toggle animation to menu
| TypeScript | apache-2.0 | Nersent/Wexond,Nersent/Wexond | ---
+++
@@ -1,6 +1,7 @@
import styled, { css } from 'styled-components';
import { shadows } from '@mixins';
+import { EASE_FUNCTION } from '~/constants';
export const Container = styled.div`
width: 300px;
@@ -14,11 +15,16 @@
border-radius: 4px;
transform-origin: top right;
-webkit-app-region: no-dr... |
1ad77a76cd70caef63c2847961d15279037c1962 | src/shared/components/ErrorMessage.tsx | src/shared/components/ErrorMessage.tsx | import * as React from "react";
import {observer} from "mobx-react";
import ErrorIcon from "./ErrorIcon";
export interface IErrorMessageProps {
message?:string;
}
@observer
export default class ErrorMessage extends React.Component<IErrorMessageProps, {}> {
static defaultProps = {
message: "Error encou... | import * as React from "react";
import {observer} from "mobx-react";
import ErrorIcon from "./ErrorIcon";
import AppConfig from "appConfig";
export interface IErrorMessageProps {
message?:string;
}
@observer
export default class ErrorMessage extends React.Component<IErrorMessageProps, {}> {
static defaultProp... | Customize contact email in Error message | Customize contact email in Error message
Former-commit-id: 3e39c59092b5dc1732445510775bcf5ab228a9c7 | TypeScript | agpl-3.0 | cBioPortal/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-frontend,alisman/cbioportal-frontend,alisman/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-frontend,cBioPortal/cbioportal-frontend,cBioPortal/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-fro... | ---
+++
@@ -1,6 +1,7 @@
import * as React from "react";
import {observer} from "mobx-react";
import ErrorIcon from "./ErrorIcon";
+import AppConfig from "appConfig";
export interface IErrorMessageProps {
message?:string;
@@ -22,7 +23,7 @@
marginRight:7
}}
... |
34c112a5db598fdbbe5f929a0120b5712d07589d | src/v2/components/UserSettings/mutations/updateAccountMutation.ts | src/v2/components/UserSettings/mutations/updateAccountMutation.ts | import gql from 'graphql-tag'
export default gql`
mutation UpdateAccountMutation(
$email: String
$first_name: String
$last_name: String
$show_nsfw: Boolean
$home_path: String
$receive_email: String
$receive_newsletter: Boolean
$receive_tips_emails: Boolean
$receive_group_premium_e... | import gql from 'graphql-tag'
export default gql`
mutation UpdateAccountMutation(
$email: String
$first_name: String
$last_name: String
$show_nsfw: Boolean
$home_path: String
$receive_email: String
$receive_newsletter: Boolean
$receive_tips_emails: Boolean
$receive_group_premium_e... | Add fields to mutation response | Add fields to mutation response
| TypeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | ---
+++
@@ -45,6 +45,11 @@
bio
settings {
receive_email
+ receive_tips_emails
+ home_path
+ receive_group_premium_emails
+ exclude_from_indexes
+ receive_newsletter
show_nsfw
}
} |
eb89c92f9c241e675b01c80f6ced09be5dc4f914 | src/theme/helpers/getMemberSymbol.ts | src/theme/helpers/getMemberSymbol.ts | /**
* Returns the member symbol
* @param kindString
*/
export function getMemberSymbol(kindString: string) {
let symbol = '';
switch (kindString) {
case 'Constructor signature':
symbol = '⊕ ';
break;
case 'Call signature':
symbol = '▸ ';
break;
case 'Type alias':
symbol ... | /**
* Returns the member symbol
* @param kindString
*/
export function getMemberSymbol(kindString: string) {
let symbol = '';
switch (kindString) {
case 'Constructor signature':
symbol = '⊕ ';
break;
case 'Call signature':
symbol = '▸ ';
break;
case 'Type alias':
symbol ... | Change type alias prefix symbol and formatting | Change type alias prefix symbol and formatting
| TypeScript | mit | tgreyuk/typedoc-plugin-markdown,tgreyuk/typedoc-plugin-markdown | ---
+++
@@ -12,7 +12,7 @@
symbol = '▸ ';
break;
case 'Type alias':
- symbol = 'Τ';
+ symbol = 'Ƭ ';
break;
case 'Property':
case 'Variable': |
2298690b216938cd9b93b6fae97f83e14d106cc0 | jupyter-js-widgets/src/embed-manager.ts | jupyter-js-widgets/src/embed-manager.ts | // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import {
ManagerBase
} from './manager-base';
export
class EmbedManager extends ManagerBase<HTMLElement> {
display_widget_state(models, el) {
return this.set_state(models, { el: el, displayOnce: true... | // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import {
ManagerBase
} from './manager-base';
export
class EmbedManager extends ManagerBase<HTMLElement> {
display_widget_state(models, el) {
return this.set_state(models, { el: el, displayOnce: true... | Return a fake comm object | Return a fake comm object | TypeScript | bsd-3-clause | ipython/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,cornhundred/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,cornhundred/ipywidgets,jupyter-widgets/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/i... | ---
+++
@@ -27,14 +27,18 @@
};
_create_comm() {
- return Promise.resolve({});
+ return Promise.resolve({
+ on_close: () => {},
+ on_msg: () => {},
+ close: () => {}
+ });
};
+ /**
+ * Takes a requirejs success handler and returns a requir... |
b5ee5af9c2763ed3fa45679cd3e3e35404bbcbd4 | src/services/drawers/ellipse-drawer/dynamic-ellipse-drawer.service.ts | src/services/drawers/ellipse-drawer/dynamic-ellipse-drawer.service.ts | import { CesiumService } from '../../cesium/cesium.service';
import { Injectable } from '@angular/core';
import { SimpleDrawerService } from '../simple-drawer/simple-drawer.service';
import { EllipsePrimitive } from 'primitive-primitives';
import { Checker } from '../../../utils/checker';
/**
* This drawer is respo... | import { CesiumService } from '../../cesium/cesium.service';
import { Injectable } from '@angular/core';
import { SimpleDrawerService } from '../simple-drawer/simple-drawer.service';
import { EllipsePrimitive } from 'primitive-primitives';
import { Checker } from '../../../utils/checker';
/**
* This drawer is respo... | Change that when there is no rotation in props' the checker won't throw an error. | Change that when there is no rotation in props' the checker won't throw an error.
| TypeScript | mit | TGFTech/angular-cesium,TGFTech/angular-cesium,TGFTech/angular-cesium | ---
+++
@@ -18,7 +18,7 @@
}
add(cesiumProps: any): any {
- Checker.throwIfAnyNotPresent(cesiumProps, ['center', 'semiMajorAxis', 'semiMinorAxis', 'rotation']);
+ Checker.throwIfAnyNotPresent(cesiumProps, ['center', 'semiMajorAxis', 'semiMinorAxis']);
return super.add(new EllipsePrimitive(cesiumProps));
... |
e89ff7648b4c00942fc115cb115441acd5584171 | manup-demo/src/app/app.component.ts | manup-demo/src/app/app.component.ts | import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import { TabsPage } from '../pages/tabs/tabs';
import { ManUpService } from 'ionic-manup';
import { TranslateService } from 'ng2-translate'
@Component({
templateUrl: 'app.htm... | import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import { TabsPage } from '../pages/tabs/tabs';
import { ManUpService } from 'ionic-manup';
import { TranslateService } from 'ng2-translate'
@Component({
templateUrl: 'app.htm... | Set demo language to spanish | Set demo language to spanish
| TypeScript | mit | NextFaze/ionic-manup,NextFaze/ionic-manup,NextFaze/ionic-manup | ---
+++
@@ -14,7 +14,7 @@
rootPage = TabsPage;
constructor(platform: Platform, private manup: ManUpService, private translate: TranslateService) {
- translate.setDefaultLang('en');
+ translate.setDefaultLang('es');
platform.ready().then(() => {
// Okay, so the platform is ready and our plugi... |
4cee646f857d7e2564f762088ed5d9b9630bfd22 | Assets/.tiled/platforms.tsx | Assets/.tiled/platforms.tsx | <?xml version="1.0" encoding="UTF-8"?>
<tileset name="platforms" tilewidth="128" tileheight="128" spacing="1" tilecount="4" columns="4">
<image source="C:/Users/Monkey/Desktop/platform sprites.png" width="515" height="128"/>
<tile id="0">
<objectgroup draworder="index">
<object id="1" x="-0.333333" y="0.666667" ... | <?xml version="1.0" encoding="UTF-8"?>
<tileset name="platforms" tilewidth="128" tileheight="128" spacing="1" tilecount="4" columns="4">
<image source="../Tiled2Unity/Textures/platform sprites.png" width="515" height="128"/>
<tile id="0">
<objectgroup draworder="index">
<object id="1" x="-0.333333" y="0.666667" ... | Make tile image relative to project | Make tile image relative to project
[skip ci]
| TypeScript | mit | virtuoushub/game-off-2016,virtuoushub/game-off-2016,whoa-algebraic/game-off-2016,whoa-algebraic/game-off-2016,virtuoushub/game-off-2016,whoa-algebraic/game-off-2016 | ---
+++
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset name="platforms" tilewidth="128" tileheight="128" spacing="1" tilecount="4" columns="4">
- <image source="C:/Users/Monkey/Desktop/platform sprites.png" width="515" height="128"/>
+ <image source="../Tiled2Unity/Textures/platform sprites.png" wi... |
763aa6e00ef2d5749c2a5d61cae77cd2e4457350 | src/__tests__/ModuleBundler.test.ts | src/__tests__/ModuleBundler.test.ts | import * as Archiver from 'archiver';
import * as path from 'path';
import { Logger } from '../lib/Logger';
import { ModuleBundler } from '../ModuleBundler';
describe('ModuleBundler', () => {
const servicePath = path.resolve(__dirname, '../../test/1.0');
const artifact = Archiver('zip', { store: true });
const ... | import * as Archiver from 'archiver';
import * as path from 'path';
import { Logger } from '../lib/Logger';
import { ModuleBundler } from '../ModuleBundler';
describe('ModuleBundler', () => {
const servicePath = path.resolve(__dirname, '../../test/1.0');
jasmine.DEFAULT_TIMEOUT_INTERVAL = 31000;
const artifact... | Set jasmine timeout cus travis | Set jasmine timeout cus travis
| TypeScript | mit | nfour/serverless-build-plugin,nfour/serverless-build-plugin,nfour/serverless-build-plugin | ---
+++
@@ -5,6 +5,8 @@
describe('ModuleBundler', () => {
const servicePath = path.resolve(__dirname, '../../test/1.0');
+
+ jasmine.DEFAULT_TIMEOUT_INTERVAL = 31000;
const artifact = Archiver('zip', { store: true });
const moduleBundler = new ModuleBundler({ |
832533c287b8e6497fd246619338c763dee9464b | src/components/SearchCard/TOpticonButton.tsx | src/components/SearchCard/TOpticonButton.tsx | import * as React from 'react';
import { Button } from '@shopify/polaris';
import { Tooltip } from '@blueprintjs/core';
import { TOpticonData, RequesterScores } from '../../types';
import { turkopticonBaseUrl } from '../../constants';
export interface Props {
readonly requesterId: string;
readonly turkopti... | import * as React from 'react';
import { Button } from '@shopify/polaris';
import { Tooltip } from '@blueprintjs/core';
import { TOpticonData, RequesterScores } from '../../types';
import { turkopticonBaseUrl } from '../../constants/urls';
export interface Props {
readonly requesterId: string;
readonly tur... | Update file path fo turkopticonBaseUrl. | Update file path fo turkopticonBaseUrl.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -2,7 +2,7 @@
import { Button } from '@shopify/polaris';
import { Tooltip } from '@blueprintjs/core';
import { TOpticonData, RequesterScores } from '../../types';
-import { turkopticonBaseUrl } from '../../constants';
+import { turkopticonBaseUrl } from '../../constants/urls';
export interface Props {... |
5c5b1e2eceed6117bf2e310d1679d3c56427b2c6 | src/marketplace/orders/ResourceUsageList.tsx | src/marketplace/orders/ResourceUsageList.tsx | import * as React from 'react';
import { withTranslation } from '@waldur/i18n';
import { Table, connectTable, createFetcher } from '@waldur/table-react';
export const TableComponent = props => {
const { translate } = props;
const columns = [
{
title: translate('Date'),
render: ({ row }) => row.dat... | import * as React from 'react';
import { withTranslation } from '@waldur/i18n';
import { Table, connectTable, createFetcher } from '@waldur/table-react';
export const TableComponent = props => {
const { translate } = props;
const columns = [
{
title: translate('Date'),
render: ({ row }) => row.dat... | Move Unit right after Value column in resource usages list | Move Unit right after Value column in resource usages list [WAL-2050]
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -15,16 +15,16 @@
render: ({ row }) => row.usage,
},
{
+ title: translate('Unit'),
+ render: ({ row }) => row.measured_unit,
+ },
+ {
title: translate('Type'),
render: ({ row }) => row.type,
},
{
title: translate('Name'),
render: ({ row ... |
97996fb2ec739ca9ba5593b65b5cbc339f8f7c3b | src/app/doc/utilities/code.card.component.ts | src/app/doc/utilities/code.card.component.ts | import { Component, Input } from '@angular/core';
@Component({
selector: 'codeCard',
template: `<plrsCard sectioned title="Angular Code">
<pre><code>{{ code }}</code></pre>
</plrsCard>`,
styles: [
"plrscard {margin-top: 2rem;}",
"pre {overflow: auto;}"
]
})
export class CodeC... | import { Component, Input } from '@angular/core';
@Component({
selector: 'codeCard',
template: `<plrsCard sectioned [title]="title">
<pre><code>{{ code }}</code></pre>
</plrsCard>`,
styles: [
"plrscard {margin-top: 2rem;}",
"pre {overflow: auto;}"
]
})
export class CodeCardCo... | Add ability to specify a title for the code. | Add ability to specify a title for the code.
| TypeScript | mit | syrp-nz/angular-polaris,syrp-nz/angular-polaris,syrp-nz/angular-polaris | ---
+++
@@ -1,7 +1,7 @@
import { Component, Input } from '@angular/core';
@Component({
selector: 'codeCard',
- template: `<plrsCard sectioned title="Angular Code">
+ template: `<plrsCard sectioned [title]="title">
<pre><code>{{ code }}</code></pre>
</plrsCard>`,
styles: [
@@ -11,4 +11,... |
edc2b7b9a859883edafb050a5623bb31d792920d | src/utils/installation-sucess.ts | src/utils/installation-sucess.ts | import { buildTools } from '../constants';
export function includesSuccess(input: string = '') {
let isBuildToolsSuccess;
let isPythonSuccess;
if (buildTools.version === 2015) {
// Success strings for build tools (2015)
isBuildToolsSuccess = input.includes('Variable: IsInstalled = 1') ||
input.inc... | import { buildTools } from '../constants';
export function includesSuccess(input: string = '') {
let isBuildToolsSuccess;
let isPythonSuccess;
if (buildTools.version === 2015) {
// Success strings for build tools (2015)
isBuildToolsSuccess = input.includes('Variable: IsInstalled = 1') ||
input.inc... | Check for one more line | :wrench: Check for one more line
| TypeScript | mit | felixrieseberg/windows-build-tools,felixrieseberg/windows-build-tools | ---
+++
@@ -9,7 +9,8 @@
isBuildToolsSuccess = input.includes('Variable: IsInstalled = 1') ||
input.includes('Variable: BuildTools_Core_Installed = ') ||
input.includes('WixBundleInstalled = 1') ||
- input.includes('Setting string variable \'IsInstalled\' to value \'1\'');
+ input.includes... |
25c039a57d86f55eed7c171a3ed88664937a14c2 | src/workspace-module-resolver.ts | src/workspace-module-resolver.ts | import { IWorkspaceModuleProvider } from './workspace-module-provider';
import { matchByWords } from './utils';
import * as path from 'path';
export function findWorkspaceModules(moduleProvider: IWorkspaceModuleProvider, currentDocumentPath: string, packageName: string) {
if (!packageName) {
return [];
}
re... | import * as path from 'path';
import { IWorkspaceModuleProvider } from './workspace-module-provider';
import { matchByWords, stripExtension } from './utils';
import { getConfig } from './config';
export function findWorkspaceModules(moduleProvider: IWorkspaceModuleProvider, currentDocumentPath: string, packageName: s... | Exclude extension and starting dot based on settings. | Exclude extension and starting dot based on settings.
| TypeScript | mit | reflectiondm/vscode-npmsmartimporter | ---
+++
@@ -1,6 +1,8 @@
+import * as path from 'path';
+
import { IWorkspaceModuleProvider } from './workspace-module-provider';
-import { matchByWords } from './utils';
-import * as path from 'path';
+import { matchByWords, stripExtension } from './utils';
+import { getConfig } from './config';
export function f... |
d7ceba4ef1e321b1b8026e0dcddba6ed2ecd3fa1 | src/theme/helpers/getMarkdownFromHtml.ts | src/theme/helpers/getMarkdownFromHtml.ts | const TurndownService = require('turndown');
const turndownService = new TurndownService();
/**
* Coverts html to markdown. We need this in comment blocks that have been processed by the 'Marked' plugin.
* @param options
*/
export function getMarkdownFromHtml(options: any) {
return turndownService.turndown(option... | const TurndownService = require('turndown');
const turndownService = new TurndownService();
/**
* Coverts html to markdown. We need this in comment blocks that have been processed by the 'Marked' plugin.
* @param options
*/
export function getMarkdownFromHtml(options: any) {
return turndownService.turndown(option... | Add trailing comma to adhere to lint rules | Add trailing comma to adhere to lint rules | TypeScript | mit | tgreyuk/typedoc-plugin-markdown,tgreyuk/typedoc-plugin-markdown | ---
+++
@@ -7,6 +7,6 @@
*/
export function getMarkdownFromHtml(options: any) {
return turndownService.turndown(options.fn(this), {
- codeBlockStyle: 'fenced'
+ codeBlockStyle: 'fenced',
});
} |
b9984c9087abd3301f439282052c130608c83de7 | source/ci_source/providers/Nevercode.ts | source/ci_source/providers/Nevercode.ts | import { Env, CISource } from "../ci_source"
import { ensureEnvKeysExist, ensureEnvKeysAreInt } from "../ci_source_helpers"
/**
* Nevercode.io CI Integration
*
* Environment Variables Documented: https://developer.nevercode.io/v1.0/docs/environment-variables-files
*/
export class Nevercode implements CISource {
... | import { Env, CISource } from "../ci_source"
import { ensureEnvKeysExist, ensureEnvKeysAreInt } from "../ci_source_helpers"
/**
* Nevercode.io CI Integration
*
* Environment Variables Documented: https://developer.nevercode.io/v1.0/docs/environment-variables-files
*/
export class Nevercode implements CISource {
... | Remove unused function in nevercode | Remove unused function in nevercode
| TypeScript | mit | danger/danger-js,danger/danger-js,danger/danger-js,danger/danger-js | ---
+++
@@ -42,12 +42,4 @@
get ciRunURL() {
return process.env.NEVERCODE_BUILD_URL
}
-
- private get branchName(): string {
- if (this.isPR) {
- return this.env.NEVERCODE_PULL_REQUEST_SOURCE
- } else {
- return this.env.NEVERCODE_BRANCH
- }
- }
} |
f952ca8afb09d9d6ee7cccd6275c0f4bc996425f | src/Apps/Order/Components/CreditCardInput.tsx | src/Apps/Order/Components/CreditCardInput.tsx | import { color } from "@artsy/palette"
import { fontFamily } from "@artsy/palette/dist/platform/fonts"
import { border } from "Components/Mixins"
import React from "react"
import { CardElement } from "react-stripe-elements"
import styled from "styled-components"
import { BorderBox } from "Styleguide/Elements/Box"
cons... | import { color } from "@artsy/palette"
import { fontFamily } from "@artsy/palette/dist/platform/fonts"
import { border } from "Components/Mixins"
import React from "react"
import { CardElement } from "react-stripe-elements"
import styled from "styled-components"
import { BorderBox } from "Styleguide/Elements/Box"
cons... | Remove unused font-family from card wrapper | Remove unused font-family from card wrapper
| TypeScript | mit | artsy/reaction,xtina-starr/reaction,xtina-starr/reaction,xtina-starr/reaction,xtina-starr/reaction,artsy/reaction-force,artsy/reaction-force,artsy/reaction,artsy/reaction | ---
+++
@@ -8,7 +8,6 @@
const StyledCardElement = styled(CardElement)`
width: 100%;
- font-family: "Comic Sans";
`
interface StyledBorderBox { |
8576018af1825a5df897376a9eb75031b54dbbb7 | tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts | tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts | declare function all(a?: number, b?: number): void;
declare function weird(a?: number | string, b?: number | string): void;
declare function prefix(s: string, a?: number, b?: number): void;
declare function rest(s: string, a?: number, b?: number, ...rest: number[]): void;
declare function normal(s: string): void;
decl... | declare function all(a?: number, b?: number): void;
declare function weird(a?: number | string, b?: number | string): void;
declare function prefix(s: string, a?: number, b?: number): void;
declare function rest(s: string, a?: number, b?: number, ...rest: number[]): void;
declare function normal(s: string): void;
decl... | Add failing test for function calls that have at least one non-spread argument, a spread argument, and overall potentially too few arguments | Add failing test for function calls that have at least one non-spread argument, a spread argument, and overall potentially too few arguments
| TypeScript | apache-2.0 | SaschaNaz/TypeScript,RyanCavanaugh/TypeScript,nojvek/TypeScript,alexeagle/TypeScript,kitsonk/TypeScript,Microsoft/TypeScript,kpreisser/TypeScript,minestarks/TypeScript,kitsonk/TypeScript,minestarks/TypeScript,microsoft/TypeScript,alexeagle/TypeScript,alexeagle/TypeScript,kpreisser/TypeScript,weswigham/TypeScript,Micros... | ---
+++
@@ -4,6 +4,7 @@
declare function rest(s: string, a?: number, b?: number, ...rest: number[]): void;
declare function normal(s: string): void;
declare function thunk(): string;
+declare function prefix2(s: string, n: number, a?: number, b?: number): void;
declare var ns: number[];
declare var mixed: (nu... |
f82f95780fed6e54147e99bc995495827990155f | server/test/_root.ts | server/test/_root.ts | import { Database, Mode } from '../src/Database';
// Mocha root suite. Install test hooks for all tests here.
// https://mochajs.org/#root-level-hooks
before('connect to database', () => {
return Database.get().connect(Mode.TEST);
});
after('disconnect from database', () => {
return Database.get().disconnect... | import { Database, Mode } from '../src/Database';
// Catch unhandled Promises
process.on('unhandledRejection', (reason) => {
process.stderr.write("Unhandled Promise rejection:\n");
console.error(reason);
process.exit(1);
});
// Mocha root suite. Install test hooks for all tests here.
// https://mochajs.or... | Enforce handling rejected promises in server tests | Enforce handling rejected promises in server tests
| TypeScript | mit | mattbdean/Helium,mattbdean/Helium,mattbdean/Helium,mattbdean/Helium | ---
+++
@@ -1,4 +1,11 @@
import { Database, Mode } from '../src/Database';
+
+// Catch unhandled Promises
+process.on('unhandledRejection', (reason) => {
+ process.stderr.write("Unhandled Promise rejection:\n");
+ console.error(reason);
+ process.exit(1);
+});
// Mocha root suite. Install test hooks for ... |
4f05c6975fa95db665c43eb4206d964b88589d99 | src/renderer/app/components/NavigationButtons/index.tsx | src/renderer/app/components/NavigationButtons/index.tsx | import { observer } from 'mobx-react';
import * as React from 'react';
import store from '~/renderer/app/store';
import ToolbarButton from '~/renderer/app/components/ToolbarButton';
import { icons } from '~/renderer/app/constants/icons';
import { StyledContainer } from './style';
import { ipcRenderer } from 'electron'... | import { observer } from 'mobx-react';
import * as React from 'react';
import store from '~/renderer/app/store';
import ToolbarButton from '~/renderer/app/components/ToolbarButton';
import { icons } from '~/renderer/app/constants/icons';
import { StyledContainer } from './style';
import { ipcRenderer } from 'electron'... | Fix errors when reloading a page | Fix errors when reloading a page
| TypeScript | apache-2.0 | Nersent/Wexond,Nersent/Wexond | ---
+++
@@ -17,7 +17,7 @@
};
const onRefreshClick = () => {
- callBrowserViewMethod(store.tabsStore.selectedTabId, 'refresh');
+ callBrowserViewMethod(store.tabsStore.selectedTabId, 'reload');
};
export const NavigationButtons = observer(() => { |
94731c52f02a0d46ccdfaa8c16ec79504623d9d3 | src/app/app.ts | src/app/app.ts | import {Directive, View, ElementRef} from 'angular2/angular2';
import {RouteConfig, Router} from 'angular2/router';
import {Http, Headers} from 'angular2/http';
import {Component, ViewQuery} from 'angular2/angular2';
import {CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/angular2';
import {ROUTER_DIRECTIVES} from 'a... | import {Directive, View, ElementRef} from 'angular2/angular2';
import {RouteConfig, Router} from 'angular2/router';
import {Http, Headers} from 'angular2/http';
import {Component, ViewQuery} from 'angular2/angular2';
import {CORE_DIRECTIVES, FORM_DIRECTIVES} from 'angular2/angular2';
import {ROUTER_DIRECTIVES} from 'a... | Change Default Page to Section | Change Default Page to Section
| TypeScript | mit | Ao21/PatternLibrary,Ao21/PatternLibrary,Ao21/PatternLibrary | ---
+++
@@ -20,7 +20,7 @@
bindings: [ CORE_DIRECTIVES, FORM_DIRECTIVES, ROUTER_DIRECTIVES, Dispatcher ],
})
@RouteConfig([
- { path: '/', component: Dashboard, as: 'Section' }
+ { path: '/', component: Section, as: 'Section' }
])
@View({
styles: [styles], |
928dfbe439421f61b626f0725f48ca506c763f5a | tools/env/base.ts | tools/env/base.ts | import { EnvConfig } from './env-config.interface';
const BaseConfig: EnvConfig = {
// Sample API url
API: 'https://demo.com',
RELEASEURL: 'https://github.com/nie-ine/raeber-website/releases/tag/0.8.0',
RELEASEVERSION: '0.8.0'
};
export = BaseConfig;
| import { EnvConfig } from './env-config.interface';
const BaseConfig: EnvConfig = {
// Sample API url
API: 'https://demo.com',
RELEASEURL: 'https://github.com/nie-ine/raeber-website/releases/tag/0.9.0',
RELEASEVERSION: '0.9.0'
};
export = BaseConfig;
| Update release version to 0.9.0. | Update release version to 0.9.0.
| TypeScript | mit | nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website | ---
+++
@@ -3,8 +3,8 @@
const BaseConfig: EnvConfig = {
// Sample API url
API: 'https://demo.com',
- RELEASEURL: 'https://github.com/nie-ine/raeber-website/releases/tag/0.8.0',
- RELEASEVERSION: '0.8.0'
+ RELEASEURL: 'https://github.com/nie-ine/raeber-website/releases/tag/0.9.0',
+ RELEASEVERSION: '0.9.0'
... |
e4e030244b043182ca9b9dabaff47036153a3099 | src/app/core/services/socket.service.ts | src/app/core/services/socket.service.ts | import { Injectable } from '@angular/core';
import { environment } from './../../../environments/environment';
import { Observable } from 'rxjs';
import * as io from 'socket.io-client';
@Injectable()
export class SocketService {
url: string;
socket: SocketIOClient.Socket;
constructor() {
if(e... | import { Injectable } from '@angular/core';
import { environment } from './../../../environments/environment';
import { Observable } from 'rxjs';
import * as io from 'socket.io-client';
@Injectable()
export class SocketService {
url: string;
socket: SocketIOClient.Socket;
constructor() {
if(t... | Add experimental/temporal control to avoid create new connections | Add experimental/temporal control to avoid create new connections
| TypeScript | mit | semagarcia/javascript-kata-player,semagarcia/javascript-kata-player,semagarcia/javascript-kata-player | ---
+++
@@ -10,12 +10,16 @@
socket: SocketIOClient.Socket;
constructor() {
+ if(this.socket) {
+ console.log('SS >>>> ', this.socket.connected);
+ this.socket.removeAllListeners();
+ this.socket.disconnect();
+ }
if(environment.production) {
... |
d8aec0f91e943b98417f7c277065b976450bc017 | modules/tinymce/src/plugins/bbcode/test/ts/browser/BbcodeSanityTest.ts | modules/tinymce/src/plugins/bbcode/test/ts/browser/BbcodeSanityTest.ts | import { ApproxStructure, Log, Pipeline } from '@ephox/agar';
import { UnitTest } from '@ephox/bedrock-client';
import { TinyApis, TinyLoader } from '@ephox/mcagar';
import BbcodePlugin from 'tinymce/plugins/bbcode/Plugin';
import Theme from 'tinymce/themes/silver/Theme';
UnitTest.asynctest('browser.tinymce.plugins.bb... | import { ApproxStructure } from '@ephox/agar';
import { describe, it } from '@ephox/bedrock-client';
import { TinyAssertions, TinyHooks } from '@ephox/mcagar';
import Plugin from 'tinymce/plugins/bbcode/Plugin';
import Theme from 'tinymce/themes/silver/Theme';
describe('browser.tinymce.plugins.bbcode.BbcodeSanityTest... | Switch bbcode plugin to use BDD style tests | TINY-6870: Switch bbcode plugin to use BDD style tests
| TypeScript | mit | TeamupCom/tinymce,tinymce/tinymce,tinymce/tinymce,TeamupCom/tinymce,tinymce/tinymce | ---
+++
@@ -1,39 +1,35 @@
-import { ApproxStructure, Log, Pipeline } from '@ephox/agar';
-import { UnitTest } from '@ephox/bedrock-client';
-import { TinyApis, TinyLoader } from '@ephox/mcagar';
-import BbcodePlugin from 'tinymce/plugins/bbcode/Plugin';
+import { ApproxStructure } from '@ephox/agar';
+import { descri... |
2051d9c3facbfa3c0bda0c78c00ec65ab3d826d1 | config/webpack.prod.ts | config/webpack.prod.ts | /**
* Created by Jean-paul.attard on 06/09/2016.
*/
var webpack = require('webpack');
var webpackMerge = require('webpack-merge');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var commonConfig = require('./webpack.common');
var helpers = require('./helpers');
const ENV = process.env.NODE_ENV = p... | /**
* Created by Jean-paul.attard on 06/09/2016.
*/
var webpack = require('webpack');
var webpackMerge = require('webpack-merge');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var commonConfig = require('./webpack.common');
var helpers = require('./helpers');
const ENV = process.env.NODE_ENV = p... | Set warning compression to false | Set warning compression to false
| TypeScript | mit | jeanpaulattard/tourofheroes,jeanpaulattard/tourofheroes,jeanpaulattard/tourofheroes | ---
+++
@@ -32,12 +32,11 @@
mangle: {
keep_fnames: true
},
- compress: {
+ compress: { // Hide warnings about potentially dangerous optimizations/code. Consider setting it to true for debugging purposes.
warnings: false
},
... |
5634ef71147e9b3839cc335b563c8fa0f8245fb8 | src/tests/exceptions.ts | src/tests/exceptions.ts | import * as assert from "assert";
import { wrap } from "..";
describe("exceptions", function () {
it("should be cached", function () {
const error = new Error("expected");
let threw = false;
function throwOnce() {
if (!threw) {
threw = true;
throw error;
}
return "alread... | import * as assert from "assert";
import { wrap } from "..";
describe("exceptions", function () {
it("should be cached", function () {
const error = new Error("expected");
let threw = false;
function throwOnce() {
if (!threw) {
threw = true;
throw error;
}
return "alread... | Test memoization of naive Fibonacci function that throws results. | Test memoization of naive Fibonacci function that throws results.
| TypeScript | mit | benjamn/optimism,benjamn/optimism | ---
+++
@@ -35,4 +35,42 @@
wrapper.dirty();
assert.strictEqual(wrapper(), "already threw");
});
+
+ it("should memoize a throwing fibonacci function", function () {
+ const fib = wrap((n: number) => {
+ if (n < 2) throw n;
+ try {
+ fib(n - 1);
+ } catch (minusOne) {
+ tr... |
a49ce682441924e9e095e4a2dcce45523d302732 | packages/components/containers/overview/IndexSection.tsx | packages/components/containers/overview/IndexSection.tsx | import React from 'react';
import { Icon } from '../../components';
import { usePermissions } from '../../hooks';
import { classnames } from '../../helpers';
import Sections from './Sections';
import { SectionConfig } from '../../components/layout';
const IndexSection = ({ pages, limit = 4 }: { pages: SectionConfig[... | import React from 'react';
import { Icon } from '../../components';
import { usePermissions } from '../../hooks';
import { classnames } from '../../helpers';
import Sections from './Sections';
import { SectionConfig } from '../../components/layout';
const IndexSection = ({ pages, limit = 4 }: { pages: SectionConfig[... | Fix - icon alignment for overview | Fix - icon alignment for overview
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -20,9 +20,11 @@
subsections.length > limit && 'overview-grid-item--tall',
])}
>
- <h2 className="h6 mb1">
- <Icon name={icon} className="mr0-5" />
- <stron... |
780cea570b4d4101756053cce45d73b987bd519a | packages/node_modules/glimmer-util/lib/platform-utils.ts | packages/node_modules/glimmer-util/lib/platform-utils.ts | interface InternedStringMarker {
"d0850007-25c2-47d8-bb63-c4054016d539": boolean;
}
export type InternedString = InternedStringMarker & string;
export function intern(str: string): InternedString {
return <InternedString>str;
// let obj = {};
// obj[str] = 1;
// for (let key in obj) return <InternedString>k... | interface InternedStringMarker {
"d0850007-25c2-47d8-bb63-c4054016d539": boolean;
}
export type InternedString = InternedStringMarker & string;
export function intern(str: string): InternedString {
return <InternedString>str;
// let obj = {};
// obj[str] = 1;
// for (let key in obj) return <InternedString>k... | Switch to a nicer `Opaque` implementation | Switch to a nicer `Opaque` implementation
Mega props to @mhegazy who invented the trick! | TypeScript | mit | glimmerjs/glimmer-vm,lbdm44/glimmer-vm,lbdm44/glimmer-vm,tildeio/glimmer,chadhietala/glimmer,chadhietala/glimmer,glimmerjs/glimmer-vm,lbdm44/glimmer-vm,glimmerjs/glimmer-vm,tildeio/glimmer,chadhietala/glimmer,chadhietala/glimmer,tildeio/glimmer | ---
+++
@@ -11,14 +11,10 @@
// for (let key in obj) return <InternedString>key;
}
-interface OpaqueMarker {
- "a7613ac4-e3a3-4298-b06e-2349fe5a5ed5": boolean;
-}
+export type Opaque = {} | void;
-export type Opaque = OpaqueMarker;
-
-export function opaque(value: any): Opaque {
- return value as Opaque;
+ex... |
34af3f6b7d72f64571618059c74351a6537f37a0 | web-server/tweakr-server/src/app/tweak/tweak.module.ts | web-server/tweakr-server/src/app/tweak/tweak.module.ts | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {AngularFireModule} from '@angular/fire';
import {AngularFireAuthModule} from '@angular/fire/auth';
import {AngularFireDatabaseModule} from '@angular/fire/database';
import { TweakRoutingModule } from './tweak-routing.mod... | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {AngularFireModule} from '@angular/fire';
import {AngularFireAuthModule} from '@angular/fire/auth';
import {AngularFireDatabaseModule} from '@angular/fire/database';
import { TweakRoutingModule } from './tweak-routing.mod... | Fix Card styling not working on Tweakr editors | Fix Card styling not working on Tweakr editors
| TypeScript | apache-2.0 | google/tweakr,google/tweakr,google/tweakr,google/tweakr,google/tweakr | ---
+++
@@ -7,6 +7,11 @@
import { TweakRoutingModule } from './tweak-routing.module';
import { TweakComponent } from './tweak.component';
+
+import {MatButtonModule} from '@angular/material/button';
+import {MatCardModule} from '@angular/material/card';
+import {MatToolbarModule} from '@angular/material/toolbar';... |
3c1f362737779104882e58a011a082c0cfccba7f | lib/msal-core/src/utils/StringUtils.ts | lib/msal-core/src/utils/StringUtils.ts | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* @hidden
*/
export class StringUtils {
/**
* Check if a string is empty
*
* @param str
*/
static isEmpty(str: string): boolean {
return (typeof str === "undefined" || !str |... | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* @hidden
*/
export class StringUtils {
/**
* Check if a string is empty
*
* @param str
*/
static isEmpty(str: string): boolean {
return (typeof str === "undefined" || !str |... | Add explanatory comment to isValidJson method | Add explanatory comment to isValidJson method
| TypeScript | mit | AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication... | ---
+++
@@ -24,6 +24,11 @@
static isValidJson(str: string): boolean {
try {
const parsedValue = JSON.parse(str);
+ /**
+ * There are edge cases in which JSON.parse will successfully parse a non-valid JSON object
+ * (e.g. JSON.parse will parse an escaped ... |
eeabe48cef90c70b817962bdb73a1e68950348e5 | frontend/sequences/step_tiles/__tests__/tile_set_servo_angle_test.tsx | frontend/sequences/step_tiles/__tests__/tile_set_servo_angle_test.tsx | import * as React from "react";
import { TileSetServoAngle } from "../tile_set_servo_angle";
import { mount } from "enzyme";
import { fakeSequence } from "../../../__test_support__/fake_state/resources";
import { SetServoAngle } from "farmbot";
import { emptyState } from "../../../resources/reducer";
import { StepParam... | import * as React from "react";
import { TileSetServoAngle } from "../tile_set_servo_angle";
import { mount } from "enzyme";
import { fakeSequence } from "../../../__test_support__/fake_state/resources";
import { SetServoAngle } from "farmbot";
import { emptyState } from "../../../resources/reducer";
import { StepParam... | Fix test breakage in set_servo_angle. | Fix test breakage in set_servo_angle.
| TypeScript | mit | FarmBot/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,FarmBot/Farmbot-Web-API,gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,FarmBot/Far... | ---
+++
@@ -28,10 +28,10 @@
const block = mount(<TileSetServoAngle {...fakeProps()} />);
const inputs = block.find("input");
const labels = block.find("label");
- expect(inputs.length).toEqual(3);
- expect(labels.length).toEqual(2);
+ expect(inputs.length).toEqual(4);
+ expect(labels.length... |
9b1dbe8ec632c03807f7d9df584035948c87f011 | app/static/helloWorld.ts | app/static/helloWorld.ts | import 'zone.js';
import 'reflect-metadata';
import { Component } from '@angular/core';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
@Component({
selector: 'i-am',
template: '<h2... | import 'zone.js';
import 'reflect-metadata';
import { Component } from '@angular/core';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
@Component({
selector: 'i-am',
template: '<h2... | Add template support for random number | Add template support for random number
| TypeScript | mit | pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise | ---
+++
@@ -8,13 +8,15 @@
@Component({
selector: 'i-am',
- template: '<h2> I am {{ status }} </h2>'
+ template: '<h2> I am {{ status }} </h2><br/><h3>Your lucky number is {{ randNum }}</h3>'
})
export class IAmAliveComponent {
status: string;
+ randNum: number;
constructor() {
... |
cf49610b3c93fc46412961f02c4e35bc8a9717ad | step-release-vis/src/app/components/environments/environments_test.ts | step-release-vis/src/app/components/environments/environments_test.ts | import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {EnvironmentsComponent} from './environments';
import {HttpClientTestingModule} from '@angular/common/http/testing';
describe('EnvironmentsComponent', () => {
let component: EnvironmentsComponent;
let fixture: ComponentFixture<Environm... | import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {EnvironmentsComponent} from './environments';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {FileServiceStub} from '../../../testing/FileServiceStub';
import {FileService} from '../../services/file';
import {... | Add test for Environments component. | Add test for Environments component.
| TypeScript | apache-2.0 | googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020 | ---
+++
@@ -2,15 +2,30 @@
import {EnvironmentsComponent} from './environments';
import {HttpClientTestingModule} from '@angular/common/http/testing';
+import {FileServiceStub} from '../../../testing/FileServiceStub';
+import {FileService} from '../../services/file';
+import {ActivatedRouteStub} from '../../../tes... |
d287fb6173a817a476922a44981426ee64af5bde | src/common-ui/components/progress-step.tsx | src/common-ui/components/progress-step.tsx | import React, { PureComponent } from 'react'
import cx from 'classnames'
const styles = require('./progress-step.css')
interface Props {
onClick: () => void
isSeen?: boolean
isCurrentStep: boolean
}
const noop = () => undefined
export default class ProgressStep extends PureComponent<Props> {
render(... | import React, { PureComponent } from 'react'
import cx from 'classnames'
const styles = require('./progress-step.css')
interface Props {
onClick: () => void
isSeen?: boolean
isCurrentStep: boolean
}
export default class ProgressStep extends PureComponent<Props> {
render() {
return (
... | Allow pressing of all onboarding step bubbles | Allow pressing of all onboarding step bubbles
| TypeScript | mit | WorldBrain/WebMemex,WorldBrain/WebMemex | ---
+++
@@ -9,13 +9,11 @@
isCurrentStep: boolean
}
-const noop = () => undefined
-
export default class ProgressStep extends PureComponent<Props> {
render() {
return (
<span
- onClick={this.props.isSeen ? this.props.onClick : noop}
+ onClick={this.prop... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.