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 |
|---|---|---|---|---|---|---|---|---|---|---|
900a086dea0f4b508b42b9d3e30c46f59bbff174 | react-renderer/index.d.ts | react-renderer/index.d.ts | import { Canvas, Packets, ILayer } from "src/module";
import {
Protocol,
IRendererEvents,
ConnectionStatus,
IEditorEvents
} from "src/protocol";
declare module "mathjax";
export {
Canvas,
Packets,
Protocol,
ConnectionStatus,
IEditorEvents,
IRendererEvents,
ILayer
};
| import { Canvas, Packets, ILayer } from "src/module";
import {
Protocol,
IRendererEvents,
ConnectionStatus,
IEditorEvents
} from "src/Protocol";
declare module "mathjax";
export {
Canvas,
Packets,
Protocol,
ConnectionStatus,
IEditorEvents,
IRendererEvents,
ILayer
};
| Change path to Protocol.tsx to uppercase | Change path to Protocol.tsx to uppercase
| TypeScript | mit | penrose/penrose,penrose/penrose,penrose/penrose,penrose/penrose | ---
+++
@@ -4,7 +4,7 @@
IRendererEvents,
ConnectionStatus,
IEditorEvents
-} from "src/protocol";
+} from "src/Protocol";
declare module "mathjax";
|
1709af0bc53bd962466dd2025672b95f2e9399cc | packages/api/core/src/util/electron-version.ts | packages/api/core/src/util/electron-version.ts | import debug from 'debug';
const d = debug('electron-forge:electron-version');
const electronPackageNames = [
'electron-prebuilt-compile',
'electron-prebuilt',
'electron-nightly',
'electron',
];
function findElectronDep(dep: string): boolean {
return electronPackageNames.includes(dep);
}
export function g... | import debug from 'debug';
const d = debug('electron-forge:electron-version');
const electronPackageNames = [
'electron-prebuilt-compile',
'electron-prebuilt',
'electron-nightly',
'electron',
];
function findElectronDep(dep: string): boolean {
return electronPackageNames.includes(dep);
}
export function g... | Make copies of the dep lists instead of altering in-place | Make copies of the dep lists instead of altering in-place
| TypeScript | mit | electron-userland/electron-forge,electron-userland/electron-forge,electron-userland/electron-forge,electron-userland/electron-forge | ---
+++
@@ -25,17 +25,19 @@
}
export function updateElectronDependency(packageJSON: any, dev: string[], exact: string[]): [string[], string[]] {
+ const alteredDev = ([] as string[]).concat(dev);
+ let alteredExact = ([] as string[]).concat(exact);
if (Object.keys(packageJSON.devDependencies).find(findElectr... |
0faa1ca0954b4c5250c06143ba49815134a61b46 | src/client/app/shared/models/filter-criteria.model.ts | src/client/app/shared/models/filter-criteria.model.ts | import { Params } from '@angular/router';
import { cloneDeep, pick } from 'lodash';
import { DateRangeType } from './date-range-type.model';
export class FilterCriteria {
fromDate: string; //iso
toDate: string; //iso
ascending: boolean = true;
rangeSelection: DateRangeType = DateRangeType.CURRENT_SEASON;
pla... | import { Params } from '@angular/router';
import { cloneDeep, pick } from 'lodash';
import { DateRangeType } from './date-range-type.model';
export class FilterCriteria {
fromDate: string; //iso
toDate: string; //iso
ascending: boolean = true;
rangeSelection: DateRangeType = DateRangeType.CURRENT_SEASON;
pla... | Allow filtercriteria deserialise to take an optional source parameter, to stop defaults overriding initial values passed by components | Allow filtercriteria deserialise to take an optional source parameter, to stop defaults overriding initial values passed by components
(cherry picked from commit 88fcfe23378e5211687d2570830db2ff9dc0f7fd)
| TypeScript | mit | davewragg/agot-spa,davewragg/agot-spa,davewragg/agot-spa | ---
+++
@@ -16,8 +16,8 @@
return cloneDeep(criteria);
}
- static deserialise(routeParams: Params): FilterCriteria {
- const criteria = new FilterCriteria();
+ static deserialise(routeParams: Params, sourceCriteria?: FilterCriteria): FilterCriteria {
+ const criteria = sourceCriteria || new FilterCri... |
3c7d782b133699e0c57689ce4f98712ada228619 | src/main/components/composable/Layer/index.tsx | src/main/components/composable/Layer/index.tsx | import * as React from 'react'
import * as PropTypes from 'prop-types'
import {
RenderingTarget,
} from '../../../../main'
export type Props = {
target: RenderingTarget,
}
export default class Layer extends React.Component<Props, {}> {
static contextTypes = {
target: PropTypes.func.isRequired,
width: ... | import * as React from 'react'
import * as PropTypes from 'prop-types'
import {
RenderingTarget,
} from '../../../../main'
export type Props = {
target?: RenderingTarget,
}
export default class Layer extends React.Component<Props, {}> {
static contextTypes = {
target: PropTypes.func.isRequired,
width:... | Make target optional on Layer | Make target optional on Layer
| TypeScript | mit | CJ-Johnson/Bullseye,CJ-Johnson/Bullseye | ---
+++
@@ -6,7 +6,7 @@
} from '../../../../main'
export type Props = {
- target: RenderingTarget,
+ target?: RenderingTarget,
}
export default class Layer extends React.Component<Props, {}> { |
cd18489f005e4eeed52699fcc772b5d0b94b180b | templates/Angular2Spa/ClientApp/boot-client.ts | templates/Angular2Spa/ClientApp/boot-client.ts | import 'angular2-universal-polyfills/browser';
import { enableProdMode } from '@angular/core';
import { platformUniversalDynamic } from 'angular2-universal';
import { AppModule } from './app/app.module';
// Include styles in the bundle
import 'bootstrap';
import './styles/site.css';
// Enable either Hot Module Reload... | import 'angular2-universal-polyfills/browser';
import { enableProdMode } from '@angular/core';
import { platformUniversalDynamic } from 'angular2-universal';
import { AppModule } from './app/app.module';
// Include styles in the bundle
import 'bootstrap';
import './styles/site.css';
// Enable either Hot Module Reload... | Fix HMR again following previous change | Fix HMR again following previous change
| TypeScript | apache-2.0 | aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore | ---
+++
@@ -16,8 +16,11 @@
enableProdMode();
}
-// Boot the application
+// Boot the application, either now or when the DOM content is loaded
const platform = platformUniversalDynamic();
-document.addEventListener('DOMContentLoaded', () => {
- platform.bootstrapModule(AppModule);
-});
+const bootApplicat... |
6eb078e045983cf1f5d5a1d9f71cca06b541de5b | src/frameListener.ts | src/frameListener.ts | if (window.self !== window.top) {
window.addEventListener('message', (e) => {
if (e.data === '_tcfdt_subdoc_std') {
browser.runtime.sendMessage({request: 'stdFg'});
(window as any).tcfdtFrameFixed = true;
}
e.stopPropagation();
}, true);
}
| const requestStdColors = (e: MessageEvent) => {
if (e.data === '_tcfdt_subdoc_std') {
browser.runtime.sendMessage({request: 'stdFg'});
(window as any).tcfdtFrameFixed = true;
}
e.stopPropagation();
// No need to listen to more messages if we have fixed ourselves
window.removeEventListener('message', r... | Stop listening to frame fix events once one has already been received | Stop listening to frame fix events once one has already been received
| TypeScript | mit | DmitriK/darkContrast,DmitriK/darkContrast,DmitriK/darkContrast | ---
+++
@@ -1,9 +1,13 @@
+const requestStdColors = (e: MessageEvent) => {
+ if (e.data === '_tcfdt_subdoc_std') {
+ browser.runtime.sendMessage({request: 'stdFg'});
+ (window as any).tcfdtFrameFixed = true;
+ }
+ e.stopPropagation();
+ // No need to listen to more messages if we have fixed ourselves
+ wind... |
dabbab507a56a7642688af51af8183171fda1f7f | app/src/lib/tip.ts | app/src/lib/tip.ts | import { TipState, Tip } from '../models/tip'
export function getTipSha(tip: Tip) {
if (tip.kind === TipState.Valid) {
return tip.branch.tip.sha
}
if (tip.kind === TipState.Detached) {
return tip.currentSha
}
return '(unknown)'
}
| import { TipState, Tip } from '../models/tip'
export function getTipSha(tip: Tip) {
if (tip.kind === TipState.Valid) {
return tip.branch.tip.sha
}
if (tip.kind === TipState.Detached) {
return tip.currentSha
}
return '(unknown)'
}
| Revert "Okay, let's try a linting error that doesn't fail the build" | Revert "Okay, let's try a linting error that doesn't fail the build"
This reverts commit 4d19e2e7e1e5c4ac617ccbec8ed1e5cc576855ae.
| TypeScript | mit | j-f1/forked-desktop,shiftkey/desktop,desktop/desktop,desktop/desktop,desktop/desktop,j-f1/forked-desktop,say25/desktop,artivilla/desktop,shiftkey/desktop,artivilla/desktop,artivilla/desktop,artivilla/desktop,j-f1/forked-desktop,kactus-io/kactus,j-f1/forked-desktop,kactus-io/kactus,say25/desktop,kactus-io/kactus,shiftke... | ---
+++
@@ -1,6 +1,6 @@
import { TipState, Tip } from '../models/tip'
-export function getTipSha(tip: Tip) {
+export function getTipSha(tip: Tip) {
if (tip.kind === TipState.Valid) {
return tip.branch.tip.sha
} |
2eadf4f82fe442c5f01c855dd66df7eaac698297 | src/ts/mobilev3playerapi.ts | src/ts/mobilev3playerapi.ts | import { PlayerAPI, PlayerEvent, PlayerEventBase, PlayerEventCallback } from 'bitmovin-player';
import { WrappedPlayer } from './uimanager';
export enum MobileV3PlayerEvent {
SourceError = 'sourceerror',
PlayerError = 'playererror',
PlaylistTransition = 'playlisttransition',
}
export interface MobileV3PlayerErr... | import { PlayerAPI, PlayerEvent, PlayerEventBase, PlayerEventCallback } from 'bitmovin-player';
import { WrappedPlayer } from './uimanager';
export enum MobileV3PlayerEvent {
SourceError = 'sourceerror',
PlayerError = 'playererror',
PlaylistTransition = 'playlisttransition',
}
export interface MobileV3PlayerErr... | Return from isMobileV3PlayerAPI instead of using const | Return from isMobileV3PlayerAPI instead of using const
| TypeScript | mit | bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui,bitmovin/bitmovin-player-ui | ---
+++
@@ -27,13 +27,11 @@
}
export function isMobileV3PlayerAPI(player: WrappedPlayer | PlayerAPI | MobileV3PlayerAPI): player is MobileV3PlayerAPI {
- let everyKeyExists = true;
-
for (const key in MobileV3PlayerEvent) {
if (MobileV3PlayerEvent.hasOwnProperty(key) && !player.exports.PlayerEvent.hasOwn... |
6b8c3f28a2c372908c530a354b2d04006ecc8eb7 | src/reducers/quotes.ts | src/reducers/quotes.ts | import { reducerWithInitialState } from 'typescript-fsa-reducers';
import { dicitActions } from '../actions';
import { Quote } from '../states/QuoteState';
export interface DicitState {
quote: Quote;
}
const initialState: DicitState = { quote: { sentence: '', author: '' } };
export const quotesReducer = reducerWi... | import { reducerWithInitialState } from 'typescript-fsa-reducers';
import { dicitActions } from '../actions';
import { Quote } from '../states/QuoteState';
export interface DicitState {
quote: Quote;
}
const fetchNewQuote = (): Quote => {
let remainedQuotes = [];
if ('remainedQuotes' in localStorage) {
rem... | Add an action to fetch dynamically | Add an action to fetch dynamically
| TypeScript | mit | saiidalhalawi/dicit,saiidalhalawi/dicit,saiidalhalawi/dicit | ---
+++
@@ -7,13 +7,30 @@
quote: Quote;
}
-const initialState: DicitState = { quote: { sentence: '', author: '' } };
+const fetchNewQuote = (): Quote => {
+ let remainedQuotes = [];
+ if ('remainedQuotes' in localStorage) {
+ remainedQuotes = JSON.parse(localStorage.getItem('remainedQuotes'));
+ }
+
+ if... |
53cd29bd4019fde67a9a28fb416b18f3717f2a5f | libs/screeps-webpack-sources.ts | libs/screeps-webpack-sources.ts | import * as path from "path";
import * as webpack from "webpack";
// disable tslint rule, because we don't have types for these files
/* tslint:disable:no-var-requires */
const ConcatSource = require("webpack-sources").ConcatSource;
// Tiny tiny helper plugin that prepends "module.exports = " to all `.map` assets
exp... | import * as path from 'path'
import * as webpack from 'webpack'
// disable tslint rule, because we don't have types for these files
/* tslint:disable:no-var-requires */
const ConcatSource = require('webpack-sources').ConcatSource
// Tiny tiny helper plugin that prepends "module.exports = " to all `.map` assets
export... | Update to match tslint settings | Update to match tslint settings
| TypeScript | unlicense | tinnvec/aints,tinnvec/aints | ---
+++
@@ -1,9 +1,9 @@
-import * as path from "path";
-import * as webpack from "webpack";
+import * as path from 'path'
+import * as webpack from 'webpack'
// disable tslint rule, because we don't have types for these files
/* tslint:disable:no-var-requires */
-const ConcatSource = require("webpack-sources").Co... |
d8519b2963e5616c7762f985914d799044ca0ab0 | src/utils/backup.ts | src/utils/backup.ts | import * as localforage from 'localforage';
export const persistedStateToJsonString = async () => {
try {
const localForageKeys: string[] = await localforage.keys();
const stringArray = await Promise.all(
localForageKeys.map(
async key => `"${key}":` + (await localforage.getItem(key))
... | import * as localforage from 'localforage';
export const persistedStateToJsonString = async () => {
try {
const localForageKeys: string[] = await localforage.keys();
const stringArray = await Promise.all(
localForageKeys.map(
async key => `"${key}":` + (await localforage.getItem(key))
... | Add rejection condition to readUploadedFileAsText promise. | Add rejection condition to readUploadedFileAsText promise.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -25,11 +25,16 @@
export const readUploadedFileAsText = async (settingsFile: File) => {
const BackupFileReader = new FileReader();
- BackupFileReader.onerror = err => {
- BackupFileReader.abort();
- };
+ /**
+ * FileReader.readAsText is asynchronous but does not use Promises. We wrap it
+ ... |
4aae02a7460b6c49025b4683bbc511f7f29bc1f1 | helpers/session.ts | helpers/session.ts | import * as cookie from "cookie";
import * as http from "http";
import * as orm from "typeorm";
import * as redis from "redis";
import * as eta from "../eta";
import Application from "../server/Application";
export default class HelperSession {
public static getFromRequest(req: http.IncomingMessage, redis: redis.R... | import * as cookie from "cookie";
import * as http from "http";
import * as orm from "typeorm";
import * as redis from "redis";
import * as eta from "../eta";
export default class HelperSession {
public static getFromRequest(req: http.IncomingMessage, redis: redis.RedisClient): Promise<{[key: string]: any}> {
... | Remove unnecessary import from HelperSession | Remove unnecessary import from HelperSession
| TypeScript | mit | crossroads-education/eta,crossroads-education/eta | ---
+++
@@ -3,7 +3,6 @@
import * as orm from "typeorm";
import * as redis from "redis";
import * as eta from "../eta";
-import Application from "../server/Application";
export default class HelperSession {
public static getFromRequest(req: http.IncomingMessage, redis: redis.RedisClient): Promise<{[key: str... |
0d413bd7372143b40dd463e8856b950b2f2e5af9 | types/react-big-calendar/lib/addons/dragAndDrop.d.ts | types/react-big-calendar/lib/addons/dragAndDrop.d.ts | import BigCalendar, { BigCalendarProps, Event, stringOrDate } from '../../index';
import React = require('react');
interface withDragAndDropProps<TEvent> {
onEventDrop?: (args: { event: TEvent, start: stringOrDate, end: stringOrDate, allDay: boolean }) => void;
onEventResize?: (args: { event: TEvent, start: string... | import BigCalendar, { BigCalendarProps, Event, stringOrDate } from '../../index';
import React from 'react';
interface withDragAndDropProps<TEvent> {
onEventDrop?: (args: { event: TEvent, start: stringOrDate, end: stringOrDate, allDay: boolean }) => void;
onEventResize?: (args: { event: TEvent, start: stringOrDate... | Use ES import to see if it works | Use ES import to see if it works | TypeScript | mit | georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,mcliment/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,markogresak/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped | ---
+++
@@ -1,5 +1,5 @@
import BigCalendar, { BigCalendarProps, Event, stringOrDate } from '../../index';
-import React = require('react');
+import React from 'react';
interface withDragAndDropProps<TEvent> {
onEventDrop?: (args: { event: TEvent, start: stringOrDate, end: stringOrDate, allDay: boolean }) => vo... |
4e75ff21cdb979d063e0f48ef341af4ca62de07e | frontend/src/ts/abalone/player.ts | frontend/src/ts/abalone/player.ts | module Abalone {
export enum Player {White, Black}
export function next(p: Player) {
return (p === Player.White) ? Player.Black : Player.White;
}
export function player2str(p: Player): string {
return p === Player.White ? "White" : "Black"
}
export function str2player(s: String): Player {
switch (s) {
c... | module Abalone {
export enum Player {White, Black}
export function next(p: Player) {
return (p === Player.White) ? Player.Black : Player.White;
}
export function player2str(p: Player): string {
return p === Player.White ? "white" : "black"
}
export function str2player(s: String): Player {
switch (s) {
c... | Standardize around lowercase "white" and "black" | Standardize around lowercase "white" and "black"
| TypeScript | mit | danmane/abalone,danmane/abalone,danmane/abalone,danmane/abalone,danmane/abalone,danmane/abalone | ---
+++
@@ -5,13 +5,13 @@
}
export function player2str(p: Player): string {
- return p === Player.White ? "White" : "Black"
+ return p === Player.White ? "white" : "black"
}
export function str2player(s: String): Player {
switch (s) {
- case "White":
+ case "white":
return Player.White;
- cas... |
d5b891d71c74a8941830aa1f767926989ee1bba8 | src/keyPathify.ts | src/keyPathify.ts | const _ = require('underscore');
require('underscore-keypath');
const seedrandom = require('seedrandom');
import { State } from './state'
var seed: string|number|undefined;
var rng = seedrandom();
export default function keyPathify(input: string|any, state: any, checkIfDefined = false) {
// Coerce stringly-numbers... | const _ = require('underscore');
require('underscore-keypath');
const seedrandom = require('seedrandom');
import { State } from './state'
var seed: string|number|undefined;
var rng = seedrandom();
export default function keyPathify(input: string|any, state: any, checkIfDefined = false) {
// TODO: I'm not sure I li... | Remove string/number parsing hack (now handled by the language parser) | Remove string/number parsing hack (now handled by the language parser)
| TypeScript | mit | lazerwalker/storyboard,lazerwalker/storyboard,lazerwalker/storyboard | ---
+++
@@ -8,11 +8,6 @@
var rng = seedrandom();
export default function keyPathify(input: string|any, state: any, checkIfDefined = false) {
- // Coerce stringly-numbers into numbers
- if (input == parseInt(input)) {
- return parseInt(input)
- }
-
// TODO: I'm not sure I like this solution.
if (state.... |
f5d3521d36919a7428f33e616d0b583c0cf8008c | src/app/app.module.ts | src/app/app.module.ts | import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { routing, appRoutingProviders } from './app.routing';
import { Ng2BootstrapModule, ButtonsModule } from 'ng2-bootstrap/ng2-bootstrap';
import { NG2_WEBSTORAGE } fr... | import { NgModule } from '@angular/core';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { routing, appRoutingProviders } from './app.routing';
import { Ng2BootstrapModule, Button... | Use hash-based locationstrategy to allow refreshes | Use hash-based locationstrategy to allow refreshes
| TypeScript | mit | XiTickets/Frontend,XiTickets/Frontend | ---
+++
@@ -1,4 +1,5 @@
import { NgModule } from '@angular/core';
+import { LocationStrategy, HashLocationStrategy } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
@@ -26,7 +27,8 @@
],
providers: [
appRoutingProviders,
-... |
ebd4955b038ae6a4fa235ec49206948ebd0d9a26 | src/app/app.module.ts | src/app/app.module.ts | import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { FooterComponent } from '../components/footer/footer.component';
impor... | import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { FormsModule } from '@angular/forms';
import { MaterializeModule } from 'angular2-materialize';
import { AppComponent } from './app.component';
import { FooterComp... | Add library for MaterializeCSS integration | Add library for MaterializeCSS integration
| TypeScript | mit | ivanna-ostrovets/language-and-literature-admin,ivanna-ostrovets/language-and-literature-admin,ivanna-ostrovets/language-and-literature-admin | ---
+++
@@ -2,6 +2,8 @@
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { FormsModule } from '@angular/forms';
+
+import { MaterializeModule } from 'angular2-materialize';
import { AppComponent } from './app.component';
@@ -12,7 +14,8 @@
import... |
f2eda6950a6dacf3615a198954ebdba411780a47 | src/app/optimizer/optimizer.component.ts | src/app/optimizer/optimizer.component.ts | import {Component, OnInit} from '@angular/core';
import {HTTP_PROVIDERS} from '@angular/http';
import {OptimizerDataService} from './optimizer-data.service';
import {InputComponent} from './input/input.component';
import {BarchartComponent} from './barchart/barchart.component';
import {ResultsTableComponent} from './r... | import {Component, OnInit} from '@angular/core';
import {HTTP_PROVIDERS} from '@angular/http';
import {OptimizerDataService} from './optimizer-data.service';
import {InputComponent} from './input/input.component';
import {BarchartComponent} from './barchart/barchart.component';
import {ResultsTableComponent} from './r... | Fix variable scoping and subscription to data service. | Fix variable scoping and subscription to data service.
| TypeScript | mit | coshx/portfolio_optimizer,coshx/portfolio_optimizer,coshx/portfolio_optimizer,coshx/portfolio_optimizer | ---
+++
@@ -15,17 +15,15 @@
providers: [OptimizerDataService, HTTP_PROVIDERS]
})
export class OptimizerComponent {
- this.optimalAllocs = {AAPL: 0.0,
- GOOG: 0.5489549524820141,
- FB: 0.4510450475179859};
- this.sharpeRatio = 0.5730332517669126;
- history = Object... |
210f576c951bdaa6a6014631286d0c0074430f49 | src/app/public/ts/pagenotfound.component.ts | src/app/public/ts/pagenotfound.component.ts | import { Component } from '@angular/core';
@Component({
templateUrl: '../html/pagenotfound.component.html'
})
export class PageNotFound {}
| import { Component } from '@angular/core';
import { Router } from '@angular/router'
import { Socket } from '../../../services/socketio.service';
@Component({
templateUrl: '../html/pagenotfound.component.html'
})
export class PageNotFound {
constructor(private router: Router, private socket: Socket) {
}
... | Send 404 to the server for stats | Send 404 to the server for stats | TypeScript | agpl-3.0 | V-Paranoiaque/Ellas-War,V-Paranoiaque/Ellas-War,V-Paranoiaque/Ellas-War,V-Paranoiaque/Ellas-War | ---
+++
@@ -1,7 +1,20 @@
import { Component } from '@angular/core';
+import { Router } from '@angular/router'
+import { Socket } from '../../../services/socketio.service';
@Component({
templateUrl: '../html/pagenotfound.component.html'
})
-export class PageNotFound {}
+export class PageNotFound {
+
+ con... |
eb74e49155dcd55b2203b7a5f03cd6a4ccf03294 | src/CK.Glouton.Web/app/src/app/common/logs/models/log.model.ts | src/CK.Glouton.Web/app/src/app/common/logs/models/log.model.ts | export enum LogType {
OpenGroup,
Line,
CloseGroup
}
export interface ILogViewModel {
logType: LogType;
logTime: string;
text: string;
tags: string;
sourceFileName: string;
lineNumber: string;
exception: IExceptionViewModel;
logLevel:string;
monitorId: string;
groupDe... | export enum LogType {
OpenGroup,
Line,
CloseGroup
}
export interface ILogViewModel {
logType: LogType;
logTime: string;
text: string;
tags: string;
sourceFileName: string;
lineNumber: string;
exception: IExceptionViewModel;
logLevel:string;
monitorId: string;
groupDe... | Update groupDepth to number in ILogViewModel. | Update groupDepth to number in ILogViewModel.
| TypeScript | mit | ZooPin/CK-Glouton,ZooPin/CK-Glouton,ZooPin/CK-Glouton,ZooPin/CK-Glouton | ---
+++
@@ -14,7 +14,7 @@
exception: IExceptionViewModel;
logLevel:string;
monitorId: string;
- groupDepth: string;
+ groupDepth: number;
previousEntryType: string;
previousLogTime: string;
appName: string; |
4edb58841c53e454302174aaf4f5d7eedeca2390 | src/services/vuestic-ui/global-config.ts | src/services/vuestic-ui/global-config.ts | import VaIcon from './components/va-icon'
import VaToast from './components/va-toast'
import VaButton from './components/va-button'
import iconsConfig from './icons-config/icons-config'
import { COLOR_THEMES } from './themes'
export default {
components: {
VaIcon,
VaToast,
VaButton,
},
colors: COLOR_... | import VaIcon from './components/va-icon'
import VaToast from './components/va-toast'
import VaButton from './components/va-button'
import iconsConfig from './icons-config/icons-config'
import { COLOR_THEMES } from './themes'
export default {
components: {
VaIcon,
VaToast,
VaButton,
...COLOR_THEMES[0... | Set Navbar and Sidebar color from theme before render. | Set Navbar and Sidebar color from theme before render.
| TypeScript | mit | epicmaxco/vuestic-admin,epicmaxco/vuestic-admin,epicmaxco/vuestic-admin,epicmaxco/vuestic-admin | ---
+++
@@ -9,6 +9,7 @@
VaIcon,
VaToast,
VaButton,
+ ...COLOR_THEMES[0].components
},
colors: COLOR_THEMES[0].colors,
icons: iconsConfig |
bc8303b43a8948a02b387dfb0218466ae8ddc62a | core/lib/router-manager.ts | core/lib/router-manager.ts | import { router } from '@vue-storefront/core/app'
import VueRouter, { RouteConfig } from 'vue-router'
const RouterManager = {
_registeredRoutes: new Array<RouteConfig>(),
addRoutes: function (routes: RouteConfig[], routerInstance: VueRouter = router): void {
this._registeredRoutes.push(...routes)
router.ad... | import { router } from '@vue-storefront/core/app'
import VueRouter, { RouteConfig } from 'vue-router'
const RouterManager = {
_registeredRoutes: new Array<RouteConfig>(),
addRoutes: function (routes: RouteConfig[], routerInstance: VueRouter = router): void {
const uniqueRoutes = routes.filter(
(route) =>... | Fix same routes being registered multiple times | Fix same routes being registered multiple times
| TypeScript | mit | pkarw/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront,DivanteLtd/vue-storefront,pkarw/vue-storefront,DivanteLtd/vue-storefront | ---
+++
@@ -4,8 +4,13 @@
const RouterManager = {
_registeredRoutes: new Array<RouteConfig>(),
addRoutes: function (routes: RouteConfig[], routerInstance: VueRouter = router): void {
- this._registeredRoutes.push(...routes)
- router.addRoutes(routes)
+ const uniqueRoutes = routes.filter(
+ (route)... |
fdd58d8e96beea4bd8005159e77f28cb79bad06b | src/plugins/autocompletion_providers/Cd.ts | src/plugins/autocompletion_providers/Cd.ts | import {expandHistoricalDirectory} from "../../shell/Command";
import {styles, Suggestion, directoriesSuggestionsProvider} from "./Common";
import * as _ from "lodash";
import {PluginManager} from "../../PluginManager";
PluginManager.registerAutocompletionProvider("cd", async(context) => {
let suggestions: Suggest... | import {expandHistoricalDirectory} from "../../shell/Command";
import {styles, Suggestion, directoriesSuggestionsProvider} from "./Common";
import * as _ from "lodash";
import {PluginManager} from "../../PluginManager";
PluginManager.registerAutocompletionProvider("cd", async(context) => {
let suggestions: Suggest... | Use slice instead of take. | Use slice instead of take.
| TypeScript | mit | black-screen/black-screen,vshatskyi/black-screen,drew-gross/black-screen,black-screen/black-screen,drew-gross/black-screen,vshatskyi/black-screen,shockone/black-screen,railsware/upterm,j-allard/black-screen,vshatskyi/black-screen,vshatskyi/black-screen,black-screen/black-screen,j-allard/black-screen,drew-gross/black-sc... | ---
+++
@@ -10,7 +10,8 @@
* Historical directories.
*/
if (context.argument.value.startsWith("-")) {
- const historicalDirectoryAliases = _.take(["-", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9"], context.historicalPresentDirectoriesStack.size)
+ const historicalDirectoryAliases = ["... |
b074e0eff35ac8b1b34efa902681aa19ba2b8629 | js/components/DropTarget.tsx | js/components/DropTarget.tsx | import React from "react";
interface Coord {
x: number;
y: number;
}
interface Props extends React.HTMLAttributes<HTMLDivElement> {
handleDrop(e: React.DragEvent<HTMLDivElement>, coord: Coord): void;
}
export default class DropTarget extends React.Component<Props> {
supress(e: React.DragEvent<HTMLDivElement>... | import React from "react";
interface Coord {
x: number;
y: number;
}
interface Props extends React.HTMLAttributes<HTMLDivElement> {
handleDrop(e: React.DragEvent<HTMLDivElement>, coord: Coord): void;
}
export default class DropTarget extends React.Component<Props> {
supress(e: React.DragEvent<HTMLDivElement>... | Fix how we calculate the position of trackes dropped into the playlist | Fix how we calculate the position of trackes dropped into the playlist
Fixes #688
| TypeScript | mit | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js | ---
+++
@@ -19,12 +19,14 @@
handleDrop = (e: React.DragEvent<HTMLDivElement>) => {
this.supress(e);
- const { target } = e;
- if (!(target instanceof Element)) {
+ // TODO: We could probably move this coordinate logic into the playlist.
+ // I think that's the only place it gets used.
+ const... |
99f92ae44ebf0d70ceaedd596f1b7746fde2a8db | tools/node_tools/node_modules_licenses/utils.ts | tools/node_tools/node_modules_licenses/utils.ts | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | Fix infinity loop when bazel passes an argument with surrounded quotes | Fix infinity loop when bazel passes an argument with surrounded quotes
Change-Id: I35a96f20a05c3042165081efb4fb1dd6a369e0a5
| TypeScript | apache-2.0 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | ---
+++
@@ -22,6 +22,15 @@
process.exit(1);
}
+// Bazel params may be surrounded with quotes
+function removeSurrondedQuotes(str: string): string {
+ return str.startsWith("'") && str.endsWith("'") ?
+ str.slice(1, -1) : str;
+}
+
export function readMultilineParamFile(path: string): string[] {
- return... |
36adda016fb05ca2f5a456b506b951df803d7fe4 | src/selfupdater.ts | src/selfupdater.ts | import fs from './fs';
import { Controller, Events } from './controller';
import { ControllerWrapper } from './controller-wrapper';
import { Manifest } from './data';
export abstract class SelfUpdater {
static async attach(manifestFile: string): Promise<SelfUpdaterInstance> {
const manifestStr = await fs.readFile(m... | import fs from './fs';
import { Controller, Events } from './controller';
import { ControllerWrapper } from './controller-wrapper';
import { Manifest } from './data';
export abstract class SelfUpdater {
static async attach(manifestFile: string): Promise<SelfUpdaterInstance> {
const manifestStr = await fs.readFile(m... | Revert "Return the actual results from the self updater" | Revert "Return the actual results from the self updater"
This reverts commit a35351453d050d945f9b205bcfeb99a59c62ac07.
| TypeScript | mit | gamejolt/client-voodoo,gamejolt/client-voodoo | ---
+++
@@ -37,16 +37,16 @@
options.authToken,
options.metadata
);
- return result;
+ return result.success;
}
async updateBegin() {
const result = await this.controller.sendUpdateBegin();
- return result;
+ return result.success;
}
async updateApply() {
const result = await this.cont... |
758c77896f335848fb609a907033f13bf2431b67 | functions/src/add-item.ts | functions/src/add-item.ts | import { Request, Response } from "express";
import * as admin from "firebase-admin";
import * as msgpack from "msgpack-lite";
import nanoid = require("nanoid");
import { parse } from "url";
import { convertUrlIntoArticle } from "./article";
import { httpsFunction } from "./utils";
import { convertUrlIntoVideo } from ... | import { Request, Response } from "express";
import * as admin from "firebase-admin";
import * as msgpack from "msgpack-lite";
import nanoid = require("nanoid");
import { parse } from "url";
import { convertUrlIntoArticle } from "./article";
import { httpsFunction } from "./utils";
import { convertUrlIntoVideo } from ... | Return added items from addItem function | Return added items from addItem function
| TypeScript | mit | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | ---
+++
@@ -43,5 +43,5 @@
await file.write([{ id: nanoid(), ...item }, ...items]);
- response.sendStatus(200);
+ response.send(item);
}, { noCache: true }); |
62210337b3d036875c06bab66c36f745f86c2085 | MvcNG/Views/ngApp/myapp/services/NameSvc.ts | MvcNG/Views/ngApp/myapp/services/NameSvc.ts | namespace MyApp.Services {
export interface IData {
value: string;
}
export class NameSvc {
static $inject = ["$q", "WAIT"];
constructor(private $q: angular.IQService, private wait: number) {
this.wait = wait || 1000;
}
private _newValue(value: string... | namespace MyApp.Services {
export interface IData {
value: string;
}
export class NameSvc {
static $inject = ["$q", "WAIT", "NAME"];
constructor(private $q: angular.IQService, private wait: number, private name:string) {
this.wait = wait || 1000;
}
pr... | Add inject of NAME from angular.constant <-- dynInject | Add inject of NAME from angular.constant <-- dynInject | TypeScript | mit | dmorosinotto/MVC_NG_TS,dmorosinotto/MVC_NG_TS | ---
+++
@@ -4,8 +4,8 @@
}
export class NameSvc {
- static $inject = ["$q", "WAIT"];
- constructor(private $q: angular.IQService, private wait: number) {
+ static $inject = ["$q", "WAIT", "NAME"];
+ constructor(private $q: angular.IQService, private wait: number, private name:st... |
b440c2f32f12978bf9ec8a94822aff487579460f | app/src/ui/preferences/advanced.tsx | app/src/ui/preferences/advanced.tsx | import * as React from 'react'
import { DialogContent } from '../dialog'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
import { LinkButton } from '../lib/link-button'
interface IAdvancedPreferencesProps {
readonly isOptedOut: boolean,
readonly confirmRepoRemoval: boolean,
readonly onOptOutSet: (check... | import * as React from 'react'
import { DialogContent } from '../dialog'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
import { LinkButton } from '../lib/link-button'
interface IAdvancedPreferencesProps {
readonly isOptedOut: boolean,
readonly confirmRepoRemoval: boolean,
readonly onOptOutSet: (check... | Add state for repo removal | Add state for repo removal
| TypeScript | mit | kactus-io/kactus,j-f1/forked-desktop,gengjiawen/desktop,desktop/desktop,desktop/desktop,desktop/desktop,hjobrien/desktop,kactus-io/kactus,artivilla/desktop,say25/desktop,BugTesterTest/desktops,artivilla/desktop,say25/desktop,gengjiawen/desktop,kactus-io/kactus,j-f1/forked-desktop,kactus-io/kactus,gengjiawen/desktop,shi... | ---
+++
@@ -12,6 +12,7 @@
interface IAdvancedPreferencesState {
readonly reportingOptOut: boolean
+ readonly confirmRepoRemoval: boolean
}
const SamplesURL = 'https://desktop.github.com/samples/'
@@ -22,6 +23,7 @@
this.state = {
reportingOptOut: this.props.isOptedOut,
+ confirmRepoRemova... |
382d091f82b70ce3a0236ff0ee12ccb8e8887b67 | app/types/ItemTypes.ts | app/types/ItemTypes.ts | /// <reference path="../References.d.ts"/>
export const LOADING = Symbol('item.loading');
export const LOAD = Symbol('item.load');
export const CREATE = Symbol('item.create');
export const REMOVE = Symbol('item.remove');
export const UPDATE = Symbol('item.update');
export interface Item {
id: string;
content: string... | /// <reference path="../References.d.ts"/>
export const LOADING = Symbol('item.loading');
export const LOAD = Symbol('item.load');
export const CREATE = Symbol('item.create');
export const REMOVE = Symbol('item.remove');
export const UPDATE = Symbol('item.update');
export interface Item {
id: string;
content: string... | Fix type in item types | Fix type in item types
| TypeScript | mit | zachhuff386/react-boilerplate,zachhuff386/react-boilerplate | ---
+++
@@ -14,7 +14,7 @@
export interface ItemDispatch {
type: Symbol;
- data: {
+ data?: {
id: string;
content: string;
items: Item[]; |
fb6091893fb2b902528351d7084adfb4cd7f4eb4 | lib/download-db.ts | lib/download-db.ts | import path from 'path';
import { downloadFolder } from './constants';
import { setDbLocation } from './db/maxmind/db-helper';
import { downloadDB } from './file-fetch-extract';
const main = async (): Promise<void> => {
const downloadFileLocation = path.join(__dirname, downloadFolder);
await setDbLocation(download... | import path from 'path';
import { downloadFolder } from './constants';
import { setDbLocation } from './db/maxmind/db-helper';
import { downloadDB } from './file-fetch-extract';
const main = async (): Promise<void> => {
const { MAXMIND_LICENSE_KEY } = process.env;
if (!MAXMIND_LICENSE_KEY) {
console.error('You... | Add early error message if MAXMIND_LICENSE_KEY is missing for DB download | Add early error message if MAXMIND_LICENSE_KEY is missing for DB download
| TypeScript | mit | guyellis/ipapi,guyellis/ipapi,guyellis/ipapi | ---
+++
@@ -4,6 +4,12 @@
import { downloadDB } from './file-fetch-extract';
const main = async (): Promise<void> => {
+ const { MAXMIND_LICENSE_KEY } = process.env;
+ if (!MAXMIND_LICENSE_KEY) {
+ console.error('You need to export MAXMIND_LICENSE_KEY');
+ process.exit();
+ }
+
const downloadFileLocati... |
7d7104e8efcf4d04b01e48a59773f4802caa1785 | src/ts/environment.ts | src/ts/environment.ts | import {PreDestroy, Bean, Qualifier, Autowired, PostConstruct, Optional, Context} from "./context/context";
const themes = [ 'fresh', 'dark', 'blue', 'bootstrap', 'material-next', 'material'];
const themeCLass = new RegExp(`ag-(${themes.join('|')})`);
@Bean('environment')
export class Environment {
@Autowired('eG... | import {PreDestroy, Bean, Qualifier, Autowired, PostConstruct, Optional, Context} from "./context/context";
const themes = [ 'fresh', 'dark', 'blue', 'bootstrap', 'material-next', 'material'];
const themeCLass = new RegExp(`ag-(${themes.join('|')})`);
@Bean('environment')
export class Environment {
@Autowired('eG... | Fix case when no theme is matched | Fix case when no theme is matched
| TypeScript | mit | ceolter/ag-grid,seanlandsman/ag-grid,seanlandsman/ag-grid,ceolter/angular-grid,killyosaur/ag-grid,killyosaur/ag-grid,seanlandsman/ag-grid,ceolter/ag-grid,ceolter/angular-grid,killyosaur/ag-grid | ---
+++
@@ -8,6 +8,11 @@
@Autowired('eGridDiv') private eGridDiv: HTMLElement;
public getTheme(): string {
- return this.eGridDiv.className.match(themeCLass)[0];
+ const themeMatch: RegExpMatchArray = this.eGridDiv.className.match(themeCLass);
+ if (themeMatch) {
+ return t... |
b66b5dc97be7c63c60d4a1e78120976d5fec1166 | lib/src/Flex/utils.ts | lib/src/Flex/utils.ts | export interface Props {
[key: string]: any;
}
export function exclude(props: Props): Props {
const result = { ...props };
delete result.inline;
delete result.alignContent;
delete result.alignItems;
delete result.alignSelf;
delete result.justifyContent;
delete result.basis;
delete result.flexBasis;
... | export interface Props {
[key: string]: any;
}
export function exclude(props: Props): Props {
const result = { ...props };
delete result.inline;
delete result.alignContent;
delete result.alignItems;
delete result.alignSelf;
delete result.justifyContent;
delete result.basis;
delete result.flexBasis;
... | Exclude center prop from output | Exclude center prop from output
| TypeScript | mit | vlazh/reflexy,vlazh/reflexy | ---
+++
@@ -24,6 +24,7 @@
delete result.fill;
delete result.component;
delete result.tagName;
+ delete result.center;
return result;
} |
3d54d68e8febab4a24d3ebfd125450b187466ff2 | src/util.ts | src/util.ts | 'use strict';
export function formatPath(contractPath: string) {
return contractPath.replace(/\\/g, '/');
}
| 'use strict';
export function formatPath(contractPath: string) {
return contractPath.replace(/\\/g, '/');
}
| Remove response time bottleneck fix | Remove response time bottleneck fix
| TypeScript | mit | juanfranblanco/vscode-solidity | ---
+++
@@ -1,5 +1,5 @@
'use strict';
export function formatPath(contractPath: string) {
- return contractPath.replace(/\\/g, '/');
+ return contractPath.replace(/\\/g, '/');
} |
d18e10a7904d1156b351b2cc33c9d5a2713445f9 | resources/assets/lib/beatmapsets-show/beatmapset-menu.tsx | resources/assets/lib/beatmapsets-show/beatmapset-menu.tsx | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import BeatmapsetJson from 'interfaces/beatmapset-json';
import { PopupMenuPersistent } from 'popup-menu-persistent';
import * as React from 'r... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import BeatmapsetJson from 'interfaces/beatmapset-json';
import { PopupMenu } from 'popup-menu';
import * as React from 'react';
import { Repor... | Update another one which doesn't have contexts | Update another one which doesn't have contexts
| TypeScript | agpl-3.0 | notbakaneko/osu-web,notbakaneko/osu-web,LiquidPL/osu-web,LiquidPL/osu-web,notbakaneko/osu-web,ppy/osu-web,nanaya/osu-web,notbakaneko/osu-web,ppy/osu-web,notbakaneko/osu-web,LiquidPL/osu-web,nanaya/osu-web,ppy/osu-web,LiquidPL/osu-web,nanaya/osu-web,ppy/osu-web,nanaya/osu-web,LiquidPL/osu-web,nanaya/osu-web,ppy/osu-web | ---
+++
@@ -2,7 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
import BeatmapsetJson from 'interfaces/beatmapset-json';
-import { PopupMenuPersistent } from 'popup-menu-persistent';
+import { PopupMenu } from 'popup-menu';
import * as React from 'react';
import { ReportReportable ... |
a23a6224a359b047886addb4ff7f3a5b7b356b1b | packages/rev-api/src/examples/01_registering_an_api.ts | packages/rev-api/src/examples/01_registering_an_api.ts |
import * as rev from 'rev-models';
import * as api from '../index';
// EXAMPLE:
// import * as rev from 'rev-models'
export class Person {
@rev.TextField({label: 'First Name'})
first_name: string;
@rev.TextField({label: 'Last Name'})
last_name: string;
@rev.IntegerField({label: 'Age', re... |
import * as rev from 'rev-models';
import * as api from '../index';
// EXAMPLE:
// import * as rev from 'rev-models';
// import * as api from 'rev-api';
export class Person {
@rev.TextField({label: 'First Name'})
first_name: string;
@rev.TextField({label: 'Last Name'})
last_name: string;
... | Add further api method example using field object args | Add further api method example using field object args
| TypeScript | mit | RevFramework/rev-framework,RevFramework/rev-framework | ---
+++
@@ -3,7 +3,8 @@
import * as api from '../index';
// EXAMPLE:
-// import * as rev from 'rev-models'
+// import * as rev from 'rev-models';
+// import * as api from 'rev-api';
export class Person {
@@ -33,6 +34,20 @@
console.log('Unsubscribe requested for', email);
retur... |
80765df64ae4f3430ce05de695593f8274a13e25 | packages/utils/src/interaction/useKeyboardDetection.ts | packages/utils/src/interaction/useKeyboardDetection.ts | import { useEffect } from "react";
import useToggle from "../useToggle";
/**
* A small hook for checking if the app is currently being interacted with
* by a keyboard.
*
* @return true if the app is in keyboard mode
* @private
*/
export default function useKeyboardDetection(): boolean {
const [enabled, enable... | import { useEffect } from "react";
import useToggle from "../useToggle";
/**
* A small hook for checking if the app is currently being interacted with
* by a keyboard.
*
* @return true if the app is in keyboard mode
* @private
*/
export default function useKeyboardDetection(): boolean {
const [enabled, enable... | Revert "Fixed interaction mode for shift+mousewheel" | Revert "Fixed interaction mode for shift+mousewheel"
This reverts commit a57ce970ce26de7474c987a2d2482d3bc01e406e.
This doesn't seem like good behavior after playing with it a bit more.
It would work much better if the shift key was being pressed while the
wheel event was triggered instead, but I don't think it's wor... | TypeScript | mit | mlaursen/react-md,mlaursen/react-md,mlaursen/react-md | ---
+++
@@ -29,12 +29,10 @@
return;
}
- window.addEventListener("wheel", disable, true);
window.addEventListener("mousedown", disable, true);
window.addEventListener("touchstart", disable, true);
return () => {
- window.removeEventListener("wheel", disable, true);
window.... |
d7c2e1be8be9f2fc66607ccf76d71941998f9add | src/question_radiogroup.ts | src/question_radiogroup.ts | import { Serializer } from "./jsonobject";
import { QuestionFactory } from "./questionfactory";
import { QuestionCheckboxBase } from "./question_baseselect";
import { surveyLocalization } from "./surveyStrings";
/**
* A Model for a radiogroup question.
*/
export class QuestionRadiogroupModel extends QuestionCheckbox... | import { Serializer } from "./jsonobject";
import { QuestionFactory } from "./questionfactory";
import { QuestionCheckboxBase } from "./question_baseselect";
import { surveyLocalization } from "./surveyStrings";
import { ItemValue } from "./itemvalue";
/**
* A Model for a radiogroup question.
*/
export class Questio... | Add selectedItem property into radiogroup question | Add selectedItem property into radiogroup question
| TypeScript | mit | andrewtelnov/surveyjs,surveyjs/surveyjs,surveyjs/surveyjs,andrewtelnov/surveyjs,andrewtelnov/surveyjs,surveyjs/surveyjs,surveyjs/surveyjs | ---
+++
@@ -2,6 +2,7 @@
import { QuestionFactory } from "./questionfactory";
import { QuestionCheckboxBase } from "./question_baseselect";
import { surveyLocalization } from "./surveyStrings";
+import { ItemValue } from "./itemvalue";
/**
* A Model for a radiogroup question.
@@ -15,6 +16,10 @@
}
protect... |
c276930cc3a40dde0cb3fae6f0c78ac5c6f3230f | polygerrit-ui/app/services/flags/flags.ts | polygerrit-ui/app/services/flags/flags.ts | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | Add experiment ID for new image diff UI | Add experiment ID for new image diff UI
Change-Id: Ieeb7b586912d0f375dbb6db9326ad38951c2368c
| TypeScript | apache-2.0 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | ---
+++
@@ -30,4 +30,5 @@
CI_REBOOT_CHECKS = 'UiFeature__ci_reboot_checks',
NEW_CHANGE_SUMMARY_UI = 'UiFeature__new_change_summary_ui',
PORTING_COMMENTS = 'UiFeature__porting_comments',
+ NEW_IMAGE_DIFF_UI = 'UiFeature__new_image_diff_ui',
} |
0f2668550c47ed2c06d28aee341786e5d6eec681 | Assignment_2/src/frontend/components/MonitoringItem.tsx | Assignment_2/src/frontend/components/MonitoringItem.tsx | import * as React from 'react';
import { WeatherLocationData } from '../../model/WeatherLocationData';
interface MonitoringItemProps {
weatherData: WeatherLocationData;
}
class MonitoringItem extends React.Component<MonitoringItemProps, void> {
public render(): JSX.Element {
let temperatureDataToRender: stri... | import * as React from 'react';
import { WeatherLocationData } from '../../model/WeatherLocationData';
interface MonitoringItemProps {
weatherData: WeatherLocationData;
}
class MonitoringItem extends React.Component<MonitoringItemProps, void> {
public render(): JSX.Element {
let temperatureDataToRender: stri... | Add names for data displayed | Add names for data displayed
| TypeScript | mit | PatrickShaw/weather-app,PatrickShaw/weather-app,PatrickShaw/weather-app | ---
+++
@@ -28,12 +28,12 @@
<h1 className="txt-body-2">{this.props.weatherData.location}</h1>
{
this.props.weatherData.rainfallData ?
- <h2 className="txt-body-1">{rainfallDataToRender}</h2> :
+ <h2 className="txt-body-1">Rainfall: {rainfallDataToRender}</h2> :
... |
8557031a2533107cecf44b64678fcc1a4ff69d24 | src/components/Provider/index.tsx | src/components/Provider/index.tsx | import { Grommet } from 'grommet';
import merge from 'lodash/merge';
import * as React from 'react';
import styled from 'styled-components';
import { DefaultProps, Theme } from '../../common-types';
import defaultTheme from '../../theme';
import { px } from '../../utils';
import { BreakpointProvider } from './Breakpoin... | import { Grommet } from 'grommet';
import merge from 'lodash/merge';
import * as React from 'react';
import styled from 'styled-components';
import { DefaultProps, Theme } from '../../common-types';
import defaultTheme from '../../theme';
import { px } from '../../utils';
import { BreakpointProvider } from './Breakpoin... | Fix the theme prop typings | Provider: Fix the theme prop typings
Since we do `merge`, we do not require
all theme props to be provided.
Change-type: patch
Signed-off-by: Thodoris Greasidis <5791bdc4541e79bd43d586e3c3eff1e39c16665f@balena.io>
| TypeScript | mit | resin-io-modules/resin-components,resin-io-modules/resin-components,resin-io-modules/resin-components | ---
+++
@@ -32,7 +32,7 @@
};
export interface ThemedProvider extends DefaultProps {
- theme?: Theme;
+ theme?: Partial<Theme>;
}
export default Provider; |
c738588ae69ec069ee9af0cc5c9f0a9e374d61c4 | pages/posts/index.tsx | pages/posts/index.tsx | import { NextPage } from "next"
import Page from "../../layouts/main"
import postPreviewsLoader from "../../data/loaders/PostPreviewsLoader"
import EntryPreviews from "../../components/EntryPreviews"
import Head from "next/head"
import BlogPostPreview from "../../models/BlogPostPreview"
interface Props {
posts: Blog... | import { NextPage } from "next"
import Page from "../../layouts/main"
import postPreviewsLoader from "../../data/loaders/PostPreviewsLoader"
import EntryPreviews from "../../components/EntryPreviews"
import Head from "next/head"
import BlogPostPreview from "../../models/BlogPostPreview"
import { compareDesc } from "dat... | Fix /posts/ not being in date order | Fix /posts/ not being in date order
| TypeScript | mit | JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk | ---
+++
@@ -4,6 +4,7 @@
import EntryPreviews from "../../components/EntryPreviews"
import Head from "next/head"
import BlogPostPreview from "../../models/BlogPostPreview"
+import { compareDesc } from "date-fns"
interface Props {
posts: BlogPostPreview[]
@@ -33,6 +34,9 @@
export async function getStaticPro... |
e08f80ee747dfa22fefe2c5c76408e0f2d43e920 | src/file-upload/file-like-object.class.ts | src/file-upload/file-like-object.class.ts | function isElement(node:any):boolean {
return !!(node && (node.nodeName || node.prop && node.attr && node.find));
}
export class FileLikeObject {
public lastModifiedDate:any;
public size:any;
public type:string;
public name:string;
public constructor(fileOrInput:any) {
let isInput = isElement(fileOrIn... | function isElement(node:any):boolean {
return !!(node && (node.nodeName || node.prop && node.attr && node.find));
}
export class FileLikeObject {
public lastModifiedDate:any;
public size:any;
public type:string;
public name:string;
public rawFile:string;
public constructor(fileOrInput:any) {
this.ra... | Add rawFile in the file like object | Add rawFile in the file like object
| TypeScript | mit | valor-software/ng2-file-upload,valor-software/ng2-file-upload,valor-software/ng2-file-upload | ---
+++
@@ -7,8 +7,10 @@
public size:any;
public type:string;
public name:string;
+ public rawFile:string;
public constructor(fileOrInput:any) {
+ this.rawFile = fileOrInput;
let isInput = isElement(fileOrInput);
let fakePathOrObject = isInput ? fileOrInput.value : fileOrInput;
let po... |
e6958ac8fddb3f6433e2157a27534fec3f5dd308 | app/CakeInput.tsx | app/CakeInput.tsx | import * as React from "react";
interface CakeInputState {
value: string;
}
class CakeInput extends React.Component<any, CakeInputState> {
constructor(props: React.Props<any>) {
super(props);
// Required because of the ES6 class syntax decifiency
this.onSubmit = this.onSubmit.bind(thi... | import * as React from "react";
interface CakeInputState {
value: string;
}
class CakeInput extends React.Component<any, CakeInputState> {
constructor(props: React.Props<any>) {
super(props);
// Rebindings required because of the ES6 class syntax decifiency
this.onSubmit = this.onSubm... | Clear input field on submit somewhat properly, via state and not manually | Clear input field on submit somewhat properly, via state and not manually
| TypeScript | mit | mieky/we-love-cake,mieky/we-love-cake | ---
+++
@@ -8,8 +8,9 @@
constructor(props: React.Props<any>) {
super(props);
- // Required because of the ES6 class syntax decifiency
+ // Rebindings required because of the ES6 class syntax decifiency
this.onSubmit = this.onSubmit.bind(this);
+ this.updateState = this.up... |
642afe3746496a4195f5d9cb7a666f1b135c2ba2 | app/scripts/index.tsx | app/scripts/index.tsx | import 'core-js/stable';
import 'regenerator-runtime/runtime';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import store from './redux/store';
import App from './components/App';
import 'purecss/build/pure-min.css';
// Static assets
import '../.htaccess';
impo... | import 'core-js/stable';
import 'regenerator-runtime/runtime';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import 'purecss/build/pure-min.css';
import store from './redux/store';
import App from './components/App';
// Static assets
import '../.htaccess';
impo... | Correct import order for pure css | Correct import order for pure css
| TypeScript | mit | benct/tomlin-web,benct/tomlin-web | ---
+++
@@ -5,10 +5,10 @@
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
+import 'purecss/build/pure-min.css';
+
import store from './redux/store';
import App from './components/App';
-
-import 'purecss/build/pure-min.css';
// Static assets
import '../.htaccess'; |
8bf6b3aa897329ba5bca358d2a79e77a1fe76c3b | src/parser/ui/BoringItemValueText.tsx | src/parser/ui/BoringItemValueText.tsx | /**
* A simple component that shows the spell value in the most plain way possible.
* Use this only as the very last resort.
*/
import { ItemIcon } from 'interface';
import { ItemLink } from 'interface';
import { Item } from 'parser/core/Events';
import * as React from 'react';
type Props = {
item: Item;
child... | /**
* A simple component that shows the spell value in the most plain way possible.
* Use this only as the very last resort.
*/
import { ItemLink } from 'interface';
import { Item } from 'parser/core/Events';
import * as React from 'react';
type Props = {
item: Item;
children: React.ReactNode;
className?: st... | Make itemvalue text link to correct itemlevel. | Make itemvalue text link to correct itemlevel.
| TypeScript | agpl-3.0 | WoWAnalyzer/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,sMteX/WoWAnalyzer,sMteX/WoWAnalyzer,sMteX/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer | ---
+++
@@ -3,7 +3,6 @@
* Use this only as the very last resort.
*/
-import { ItemIcon } from 'interface';
import { ItemLink } from 'interface';
import { Item } from 'parser/core/Events';
import * as React from 'react';
@@ -17,7 +16,7 @@
const BoringItemValueText = ({ item, children, className }: Props) => ... |
64277658afb940bc0f35ca6c988228493e8f2c1b | utilitydelta-frontend/e2e/app.e2e-spec.ts | utilitydelta-frontend/e2e/app.e2e-spec.ts | import { UtilitydeltaFrontendPage } from './app.po';
describe('utilitydelta-frontend App', () => {
let page: UtilitydeltaFrontendPage;
beforeEach(() => {
page = new UtilitydeltaFrontendPage();
});
it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphTex... | import { UtilitydeltaFrontendPage } from './app.po';
describe('utilitydelta-frontend App', () => {
let page: UtilitydeltaFrontendPage;
beforeEach(() => {
page = new UtilitydeltaFrontendPage();
});
it('should display message saying UtilityDelta Frontend Hello World', () => {
page.navigateTo();
exp... | Fix end to end tests | Fix end to end tests
| TypeScript | mit | utilitydelta/spa-angular2-dotnet-auth,utilitydelta/spa-angular2-dotnet-auth,utilitydelta/spa-angular2-dotnet-auth,utilitydelta/spa-angular2-dotnet-auth | ---
+++
@@ -7,8 +7,8 @@
page = new UtilitydeltaFrontendPage();
});
- it('should display message saying app works', () => {
+ it('should display message saying UtilityDelta Frontend Hello World', () => {
page.navigateTo();
- expect(page.getParagraphText()).toEqual('app works!');
+ expect(page.ge... |
f4ee705a9ebe45f81c744bee39e5d812c0bc864c | packages/sush-plugin-trim-id/src/index.ts | packages/sush-plugin-trim-id/src/index.ts | import { SUSHInfo } from 'sush';
export interface TrimIdParams {
head?: number;
tail?: number;
}
/**
* `SUSHPluginTrimId` trims head or tail from ID.
*/
function SUSHPluginTrimId (
{ head, tail }: TrimIdParams = { head: 0, tail: 0 }
) {
return ({ id, stock }: SUSHInfo) => {
const newId = (!tail) ? id.sl... | import { SUSHInfo } from 'sush';
export interface TrimIdParams {
head?: number;
tail?: number;
}
/**
* `SUSHPluginTrimId` trims head or tail from ID.
*/
function SUSHPluginTrimId (
{ head = 0, tail = 0 }: TrimIdParams = {}
) {
return ({ id, stock }: SUSHInfo) => {
const newId = (!tail) ? id.slice(head) ... | Change default params for plugin | fix: Change default params for plugin
affects: sush-plugin-trim-id
| TypeScript | mit | 3846masa/SUSH,3846masa/SUSH | ---
+++
@@ -9,7 +9,7 @@
* `SUSHPluginTrimId` trims head or tail from ID.
*/
function SUSHPluginTrimId (
- { head, tail }: TrimIdParams = { head: 0, tail: 0 }
+ { head = 0, tail = 0 }: TrimIdParams = {}
) {
return ({ id, stock }: SUSHInfo) => {
const newId = (!tail) ? id.slice(head) : id.slice(head, -1... |
d92fca6a018f094a7156dcb447c8ad624d67f30d | src/DataTableColumn.tsx | src/DataTableColumn.tsx | import * as React from 'react'
import { Component } from 'react'
export interface ColumnDef {
/**
* Header label for this column.
*/
header: any
/**
* Function to read value from the source data.
*/
field: (rowData: any) => any
}
export class Column extends Component<ColumnDef, any> {
static __... | import * as React from 'react'
import { Component } from 'react'
export interface ColumnDef {
/**
* Header label for this column.
*/
header: any
/**
* Function to read value from the source data.
*/
field: (rowData: any) => any
}
export class Column extends Component<ColumnDef, any> {
static __... | Update dev environment variable name | Update dev environment variable name
| TypeScript | mit | zhenwenc/rc-box,zhenwenc/rc-box,zhenwenc/rc-box | ---
+++
@@ -17,7 +17,7 @@
static __DataTableColumn__ = true
render() {
- if ('development' === ENV) {
+ if ('development' === process.env.NODE_ENV) {
throw new Error('<TableColumn /> should never be rendered!')
}
return null |
3ffec3d225355e86ab9f684af9706387da1f1439 | new-client/src/hooks/currentDate.ts | new-client/src/hooks/currentDate.ts | import { useCallback, useEffect, useState } from 'react';
import dayjs, { Dayjs } from 'dayjs';
// Plus one to make sure rounding doesn't interfere
const msToMidnight = () => dayjs().add(1, 'day').startOf('date').diff(dayjs()) + 1;
export function useCurrentDate(): Dayjs {
const [currentDate, setCurrentDate] = useS... | import { useCallback, useEffect, useState } from 'react';
import dayjs, { Dayjs } from 'dayjs';
// Plus one to make sure rounding doesn't interfere
const msToMidnight = () => dayjs().add(1, 'day').startOf('date').diff(dayjs()) + 1;
export function useCurrentDate(): Dayjs {
const [currentDate, setCurrentDate] = useS... | Add cleanup to updateDate hook | Add cleanup to updateDate hook
| TypeScript | apache-2.0 | ilkkao/mas,ilkkao/mas,ilkkao/mas,ilkkao/mas | ---
+++
@@ -7,15 +7,18 @@
export function useCurrentDate(): Dayjs {
const [currentDate, setCurrentDate] = useState(dayjs());
- const updateDate = useCallback(() => {
+ const updateDate = useCallback((): ReturnType<typeof setTimeout> => {
const currentDate = dayjs();
const msToNextDay = msToMidnight(... |
b56265c5d866c1b0bd9c54b7d2e79c52afbe0665 | src/dockerDefinition.ts | src/dockerDefinition.ts | /* --------------------------------------------------------------------------------------------
* Copyright (c) Remy Suen. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ----------------------------------------------------------------------------... | /* --------------------------------------------------------------------------------------------
* Copyright (c) Remy Suen. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ----------------------------------------------------------------------------... | Reorder the code so FROMs are iterated over only once | Reorder the code so FROMs are iterated over only once
Signed-off-by: Remy Suen <553f7e7fc51e9ff47ae89d5a0ebd06651241b998@gmail.com>
| TypeScript | mit | rcjsuen/dockerfile-language-server-nodejs,rcjsuen/dockerfile-language-server-nodejs | ---
+++
@@ -12,13 +12,6 @@
public computeDefinition(document: TextDocument, position: Position): Location | null {
let parser = new DockerfileParser();
let dockerfile = parser.parse(document);
- for (let instruction of dockerfile.getFROMs()) {
- let range = instruction.getBuildStageRange();
- if (range &... |
1f10ca68e6388c71c834e662eacf185e2484adbb | src/Button/Button.tsx | src/Button/Button.tsx | import * as React from "react";
import * as PropTypes from "prop-types";
import { BaseButton } from "./BaseButton";
import { ButtonDefaultProps, ButtonProps, ButtonPropTypes } from "./ButtonProps";
export class Button extends BaseButton {
public static readonly propTypes = ButtonPropTypes;
public static reado... | import * as React from "react";
import * as PropTypes from "prop-types";
import { BaseButton } from "./BaseButton";
import { ButtonDefaultProps, ButtonProps, ButtonPropTypes } from "./ButtonProps";
export class Button extends BaseButton {
public static readonly propTypes = ButtonPropTypes;
public static reado... | Add missing prop callback on click | Add missing prop callback on click
| TypeScript | mit | Horat1us/react-context-form,Horat1us/react-context-form | ---
+++
@@ -28,7 +28,13 @@
);
}
- protected handleClick = () => this.context.onChange(this.props.action);
+ protected handleClick = (event: React.MouseEvent<HTMLButtonElement>): void => {
+ this.props.onClick && this.props.onClick(event);
+
+ if (!event.defaultPrevented) {
+ ... |
e42e6c7b8347687b9582acd20adc5dc9f787696e | packages/scripts/src/helpers/worker-farm/index.ts | packages/scripts/src/helpers/worker-farm/index.ts | import createWorkerFarm = require('worker-farm');
type WorkerType = (
moduleName: string,
methodName: string,
args: any[],
callback: (err: any, result?: any) => void,
) => void;
const workers: WorkerType = createWorkerFarm(
// we have some really long running tasks, so lets have
// each worker only handle ... | import createWorkerFarm = require('worker-farm');
type WorkerType = (
moduleName: string,
methodName: string,
args: any[],
callback: (err: any, result?: any) => void,
) => void;
const workers: WorkerType = createWorkerFarm(
// we have some really long running tasks, so lets have
// each worker only handle ... | Fix type error in worker-farm | Fix type error in worker-farm
| TypeScript | mit | mopedjs/moped,mopedjs/moped,mopedjs/moped | ---
+++
@@ -25,7 +25,7 @@
methods.forEach(method => {
result[method] = (...args: any[]) => {
return new Promise((resolve, reject) => {
- workers(moduleName, method, args, (err, res) => {
+ workers(moduleName, method as string, args, (err, res) => {
if (err) reject(err);
... |
74f68a7c22ebd11a7ed45b971a28a45ab7b121f6 | src/marketplace-checklist/AnswerGroup.tsx | src/marketplace-checklist/AnswerGroup.tsx | import * as React from 'react';
import * as ToggleButton from 'react-bootstrap/lib/ToggleButton';
import * as ToggleButtonGroup from 'react-bootstrap/lib/ToggleButtonGroup';
import { translate } from '@waldur/i18n';
export const AnswerGroup = ({ answers, question, setAnswers }) => (
<ToggleButtonGroup
value={{t... | import * as React from 'react';
import * as ToggleButton from 'react-bootstrap/lib/ToggleButton';
import * as ToggleButtonGroup from 'react-bootstrap/lib/ToggleButtonGroup';
import { translate } from '@waldur/i18n';
export const AnswerGroup = ({ answers, question, setAnswers }) => (
<ToggleButtonGroup
value={{t... | Change undefined answer from N/A to ? | Change undefined answer from N/A to ?
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -21,7 +21,7 @@
{translate('No')}
</ToggleButton>
<ToggleButton value="null">
- {translate('N/A')}
+ {translate('?')}
</ToggleButton>
</ToggleButtonGroup>
); |
856f2325f305466b57cd1504fda8f7e125675888 | lib/components/ArticleTeaser.tsx | lib/components/ArticleTeaser.tsx | import React from "react";
import Link from "next/link";
const ArticleTeaser = ({
title,
slug,
date,
abstract,
variant = "default",
}) => {
const Headline = (props) => {
if (variant === "small") {
return <h3 {...props} />;
}
return <h2 {...props} />;
};
return (
<article classNa... | import React from "react";
import Link from "next/link";
const ArticleTeaser = ({
title,
slug,
date,
abstract,
variant = "default",
}) => {
const Headline = (props) => {
if (variant === "small") {
return <h3 {...props} />;
}
return <h2 {...props} />;
};
return (
<article classNa... | Update text for "read more" | Update text for "read more"
| TypeScript | mit | drublic/vc,drublic/vc,drublic/vc | ---
+++
@@ -36,7 +36,7 @@
<div className="posts__post__readmore clearfix">
<Link href={`/blog/${slug}`}>
- <a className="button">Read more</a>
+ <a className="button">Read this Article</a>
</Link>
</div>
</article> |
0266091e4bd20475df5d335479c249f20ef24cc6 | src/shared/pub/api.ts | src/shared/pub/api.ts | import { WebClient } from "../fetch";
export class PubApi {
constructor(private readonly webClient: WebClient) {
}
public async getPackage(packageID: string): Promise<PubPackage> {
return this.get<PubPackage>(`packages/${packageID}`);
}
private async get<T>(url: string): Promise<T> {
const headers = {
Ac... | import { WebClient } from "../fetch";
export class PubApi {
private readonly pubHost: string;
constructor(private readonly webClient: WebClient) {
this.pubHost = process.env.PUB_HOSTED_URL || "https://pub.dev";
}
public async getPackage(packageID: string): Promise<PubPackage> {
return this.get<PubPackage>(`pa... | Use PUB_HOSTED_URL when doing version checks | Use PUB_HOSTED_URL when doing version checks
Fixes #2503.
| TypeScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | ---
+++
@@ -1,7 +1,9 @@
import { WebClient } from "../fetch";
export class PubApi {
+ private readonly pubHost: string;
constructor(private readonly webClient: WebClient) {
+ this.pubHost = process.env.PUB_HOSTED_URL || "https://pub.dev";
}
public async getPackage(packageID: string): Promise<PubPackage> ... |
21334d9eb3648b85cf9bf36f5e502a394e6cf957 | helpers/string.ts | helpers/string.ts | export default class HelperString {
public static toCamelCase(str: string): string {
return str[0].toLowerCase() + str.substring(1);
}
}
| export default class HelperString {
public static toCamelCase(str: string): string {
if (str.length < 2) {
return !!str ? str.toLowerCase() : str;
}
return str[0].toLowerCase() + str.substring(1);
}
}
| Fix a bug in HelperString.toCamelCase() | Fix a bug in HelperString.toCamelCase()
| TypeScript | mit | crossroads-education/eta,crossroads-education/eta | ---
+++
@@ -1,5 +1,8 @@
export default class HelperString {
public static toCamelCase(str: string): string {
+ if (str.length < 2) {
+ return !!str ? str.toLowerCase() : str;
+ }
return str[0].toLowerCase() + str.substring(1);
}
} |
bbde568559ecb1ae9e85c5161bd1517633922af8 | src/app/modal/modal.component.ts | src/app/modal/modal.component.ts | import { Component, OnInit, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'app-modal',
templateUrl: './modal.component.html',
styleUrls: ['./modal.component.css']
})
export class ModalComponent implements OnInit {
@Output() opened = new EventEmitter<any>();
@Output() closed = new Event... | import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
interface ModalConfig extends Object {
title?: string;
id?: string;
}
const defaultConfig = <ModalConfig> {};
let id = 0;
@Component({
selector: 'app-modal',
templateUrl: './modal.component.html',
styleUrls: ['./modal.comp... | Add options input and calc IDs 👌🏽 | Add options input and calc IDs 👌🏽
| TypeScript | mit | filoxo/an-angular-modal,filoxo/an-angular-modal,filoxo/an-angular-modal | ---
+++
@@ -1,4 +1,13 @@
-import { Component, OnInit, Output, EventEmitter } from '@angular/core';
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+
+interface ModalConfig extends Object {
+ title?: string;
+ id?: string;
+}
+
+const defaultConfig = <ModalConfig> {};
+
+let id =... |
5ef7f4b078edb14f6edfebdc8600d5a9868bc858 | app/src/container/Items.tsx | app/src/container/Items.tsx | import * as React from "react";
import Article = require("react-icons/lib/fa/file-code-o");
import Book = require("react-icons/lib/go/book");
import Todo = require("react-icons/lib/md/playlist-add-check");
import { connect } from "react-redux";
import { Link, Redirect } from "react-router-dom";
import "./style/Items.c... | import * as React from "react";
import Article = require("react-icons/lib/fa/file-code-o");
import Book = require("react-icons/lib/go/book");
import Todo = require("react-icons/lib/md/playlist-add-check");
import { connect } from "react-redux";
import { Link, Redirect } from "react-router-dom";
import "./style/Items.c... | Fix position of create-item components when no item is present | Fix position of create-item components when no item is present
| TypeScript | mit | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | ---
+++
@@ -36,7 +36,7 @@
<div className="Items-main">
{list}
<div className="Items-side-bar">
- {currentItem}
+ {currentItem || <div />}
{createItem}
</div>
... |
608ffe41e13896362f39953483a596209113b0bd | app/client/src/components/generator/form/inputs/Input.tsx | app/client/src/components/generator/form/inputs/Input.tsx | import { InputHTMLAttributes, memo, FC } from 'react'
import { FieldPath, UseFormReturn } from 'react-hook-form'
import styled from 'styled-components'
import { colors } from '../../../../theme'
import { FormValues } from '../../../../types/form'
const StyledInput = styled.input`
border: none;
background: ${colors... | import { InputHTMLAttributes, memo, FC } from 'react'
import { FieldPath, UseFormReturn } from 'react-hook-form'
import styled from 'styled-components'
import { colors } from '../../../../theme'
import { FormValues } from '../../../../types/form'
const StyledInput = styled.input`
border: none;
background: ${colors... | Change input text and shadow styling | Change input text and shadow styling
| TypeScript | mit | saadq/latexresu.me,saadq/latexresu.me | ---
+++
@@ -15,8 +15,9 @@
&:focus {
outline: 0;
+ color: ${colors.primary};
border-color: ${colors.primary};
- box-shadow: 0 0 4px 1px ${colors.primary};
+ box-shadow: 0 0 4px 2px ${colors.primary};
}
&::placeholder { |
b096544f4dc5e98e2667e91182691feb0bdeddf4 | hawtio-web/src/main/webapp/app/jmx/js/mbeans.ts | hawtio-web/src/main/webapp/app/jmx/js/mbeans.ts |
module Jmx {
export function MBeansController($scope, $location: ng.ILocationService, workspace: Workspace) {
$scope.$on("$routeChangeSuccess", function (event, current, previous) {
// lets do this asynchronously to avoid Error: $digest already in progress
setTimeout(updateSelectionFromURL, 50);
... |
module Jmx {
export function MBeansController($scope, $location: ng.ILocationService, workspace: Workspace) {
$scope.$on("$routeChangeSuccess", function (event, current, previous) {
// lets do this asynchronously to avoid Error: $digest already in progress
setTimeout(updateSelectionFromURL, 50);
... | Fix tree on integration tab, still need to sort a few things out post-refactor | Fix tree on integration tab, still need to sort a few things out post-refactor
| TypeScript | apache-2.0 | jfbreault/hawtio,samkeeleyong/hawtio,tadayosi/hawtio,andytaylor/hawtio,jfbreault/hawtio,mposolda/hawtio,Fatze/hawtio,mposolda/hawtio,jfbreault/hawtio,telefunken/hawtio,stalet/hawtio,fortyrunner/hawtio,uguy/hawtio,rajdavies/hawtio,telefunken/hawtio,mposolda/hawtio,andytaylor/hawtio,samkeeleyong/hawtio,stalet/hawtio,skar... | ---
+++
@@ -19,7 +19,8 @@
$scope.populateTree = () => {
var treeElement = $("#jmxtree");
- enableTree($scope, $location, workspace, treeElement, workspace.tree.children, true);
+ $scope.tree = workspace.tree;
+ enableTree($scope, $location, workspace, treeElement, $scope.tree.children, tr... |
0abf7d1f00d95547494dc1eba564aa27f91d9ac3 | lib/utils.ts | lib/utils.ts | import { Response } from "request";
import { ApiResponse } from "./types";
export function resolveHttpError(response, message): Error | undefined {
if (response.statusCode < 400) {
return;
}
message = message ? message + " " : "";
message +=
"Status code " +
response.statusCode +
" (" +
r... | import { Response } from "request";
import { ApiResponse } from "./types";
export function resolveHttpError(response, message): Error | undefined {
if (response.statusCode < 400) {
return;
}
message = message ? message + " " : "";
message +=
"Status code " +
response.statusCode +
" (" +
r... | Update wording of http code errors to point at rawResponse | Update wording of http code errors to point at rawResponse
| TypeScript | mit | itsananderson/kudu-api,itsananderson/kudu-api | ---
+++
@@ -13,7 +13,7 @@
response.statusCode +
" (" +
response.statusMessage +
- "). See the response property for details.";
+ "). See the rawResponse property for details.";
var error: Error & { rawResponse?: Response } = new Error(message);
error.rawResponse = response; |
458960673148b70051315a4c0e73f9f22d749e2d | src/utilities/testing/itAsync.ts | src/utilities/testing/itAsync.ts | function wrap<TResult>(
original: (...args: any[]) => TResult,
) {
return (
message: string,
callback: (
resolve: (result?: any) => void,
reject: (reason?: any) => void,
) => any,
timeout?: number,
) => original(message, function () {
return new Promise(
(resolve, reject) => ... | const itIsDefined = typeof it === "object";
function wrap<TResult>(
original: ((...args: any[]) => TResult) | false,
) {
return (
message: string,
callback: (
resolve: (result?: any) => void,
reject: (reason?: any) => void,
) => any,
timeout?: number,
) => original && original(message... | Allow importing @apollo/client/testing when global.it undefined. | Allow importing @apollo/client/testing when global.it undefined.
https://github.com/apollographql/apollo-client/pull/6576#issuecomment-664510739
| TypeScript | mit | apollostack/apollo-client,apollographql/apollo-client,apollostack/apollo-client,apollostack/apollo-client,apollographql/apollo-client | ---
+++
@@ -1,5 +1,7 @@
+const itIsDefined = typeof it === "object";
+
function wrap<TResult>(
- original: (...args: any[]) => TResult,
+ original: ((...args: any[]) => TResult) | false,
) {
return (
message: string,
@@ -8,20 +10,20 @@
reject: (reason?: any) => void,
) => any,
timeout?: n... |
188740715a699c25651a74f3ce090aa130127680 | src/commands.ts | src/commands.ts | import * as vscode from 'vscode';
const lodashSortBy = require('lodash.sortby');
export const COMMAND_LABELS = {
'1toX': '1toX'
};
export function runCommand (command: string) {
const editor = vscode.window.activeTextEditor;
const { document, selections } = editor;
editor.edit(editBuilder => {
... | import * as vscode from 'vscode';
const lodashSortBy = require('lodash.sortby');
export const COMMAND_LABELS = {
'1toX': '1toX'
};
export function runCommand (command: string) {
const editor = vscode.window.activeTextEditor;
const { document, selections } = editor;
editor.edit(editBuilder => {
... | Delete any existing selected text when inserting text | Delete any existing selected text when inserting text
| TypeScript | mit | jkjustjoshing/vscode-text-pastry | ---
+++
@@ -13,9 +13,10 @@
editor.edit(editBuilder => {
if (command === '1toX') {
let orderedSelections = lodashSortBy(selections, (selection: vscode.Selection) => selection.start.line);
- orderedSelections.forEach((location, index) => {
- let range = new vscode.Po... |
3a92b9a07445fb536426447da7cc8289bf9f3e72 | src/dev/stories/dashboard-refactor/header/sidebar-toggle.tsx | src/dev/stories/dashboard-refactor/header/sidebar-toggle.tsx | import React from 'react'
import { storiesOf } from '@storybook/react'
import SidebarToggle from 'src/dashboard-refactor/header/SidebarHeader/SidebarToggle/SidebarToggle'
const stories = storiesOf('Dashboard Refactor|Header/Sidebar Toggle', module)
export const sidebarToggleProps = {
noHover: {
sidebarLo... | import React from 'react'
import { storiesOf } from '@storybook/react'
import SidebarToggle, {
SidebarToggleProps,
} from 'src/dashboard-refactor/header/SidebarHeader/SidebarToggle/SidebarToggle'
import { SidebarLockedState } from 'src/dashboard-refactor/lists-sidebar/types'
import { HoverState } from 'src/dashboa... | Refactor sidebar toggle story to run off template | Refactor sidebar toggle story to run off template
| TypeScript | mit | WorldBrain/WebMemex,WorldBrain/WebMemex | ---
+++
@@ -1,41 +1,48 @@
import React from 'react'
import { storiesOf } from '@storybook/react'
-import SidebarToggle from 'src/dashboard-refactor/header/SidebarHeader/SidebarToggle/SidebarToggle'
+import SidebarToggle, {
+ SidebarToggleProps,
+} from 'src/dashboard-refactor/header/SidebarHeader/SidebarToggle... |
737abbfa822843e1a15e6bec8cb00d94fbab5041 | src/constants/misc.ts | src/constants/misc.ts | import { DAYS_IN_WEEK } from './dates';
export const APPLICATION_TITLE = 'Mturk Engine';
export const MTURK_URL_ENCODING_FORMAT = 'RFC1738';
export const SQUARE_SIZE = 10;
export const MONTH_LABEL_GUTTER_SIZE = 4;
export const MONTH_LABEL_SIZE = SQUARE_SIZE + MONTH_LABEL_GUTTER_SIZE;
export const HEATMAP_... | import { DAYS_IN_WEEK } from './dates';
export const APPLICATION_TITLE = 'Mturk Engine';
export const MTURK_URL_ENCODING_FORMAT = 'RFC1738';
export const SQUARE_SIZE = 10;
export const MONTH_LABEL_GUTTER_SIZE = 4;
export const MONTH_LABEL_SIZE = SQUARE_SIZE + MONTH_LABEL_GUTTER_SIZE;
export const HEATMAP_... | Change DATABASE_RESULTS_PER_PAGE to 20 from 25. | Change DATABASE_RESULTS_PER_PAGE to 20 from 25.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -16,7 +16,7 @@
export const SQUARE_SIZE_WITH_GUTTER = SQUARE_SIZE + GUTTER_SIZE;
export const WEEK_HEIGHT = DAYS_IN_WEEK * SQUARE_SIZE_WITH_GUTTER;
-export const DATABASE_RESULTS_PER_PAGE = 25;
+export const DATABASE_RESULTS_PER_PAGE = 20;
export const STATUS_DETAIL_RESULTS_PER_PAGE = 20;
export co... |
b0654c3018a0beb0c139aac98384f77a6e456aa6 | src/Parsing/Outline/Patterns.ts | src/Parsing/Outline/Patterns.ts | const group = (pattern: string) => `(?:${pattern})`
const optional = (pattern: string) => group(pattern) + '?'
const all = (pattern: string) => group(pattern) + '*'
const atLeast = (count: number, pattern: string) => group(pattern) + `{${count},}`
const either = (...patterns: string[]) => group(patterns.join('|'))
... | const group = (pattern: string) => `(?:${pattern})`
const optional = (pattern: string) => group(pattern) + '?'
const all = (pattern: string) => group(pattern) + '*'
const atLeast = (count: number, pattern: string) => group(pattern) + `{${count},}`
const either = (...patterns: string[]) => group(patterns.join('|'))
... | Make pattern helper constants strings | [Broken] Make pattern helper constants strings
| TypeScript | mit | start/up,start/up | ---
+++
@@ -18,15 +18,13 @@
const lineStartingWith = (pattern: string) => '^' + pattern
-const BLANK_LINE = new RegExp(
- lineOf('')
-)
+const BLANK_LINE = lineOf('')
const INDENT = either(' ', '\t')
// We don't need to check for the start or end of the string, because if a line
// contains a non-whites... |
53b41e90db2c6c4bda3ff36b5d7f850359b02b97 | src/openstack/OpenStackPluginOptionsForm.tsx | src/openstack/OpenStackPluginOptionsForm.tsx | import * as React from 'react';
import { useSelector } from 'react-redux';
import { formValueSelector } from 'redux-form';
import { FormContainer, SelectField, NumberField } from '@waldur/form-react';
import { translate } from '@waldur/i18n';
import { FORM_ID } from '@waldur/marketplace/offerings/store/constants';
co... | import * as React from 'react';
import { useSelector } from 'react-redux';
import { formValueSelector } from 'redux-form';
import { FormContainer, SelectField, NumberField } from '@waldur/form-react';
import { translate } from '@waldur/i18n';
import { FORM_ID } from '@waldur/marketplace/offerings/store/constants';
co... | Fix OpenStack offering provision form | Fix OpenStack offering provision form [WAL-2972]
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -37,7 +37,7 @@
simpleValue={true}
required={true}
/>
- {pluginOptions.storage_mode == 'dynamic' && (
+ {pluginOptions && pluginOptions.storage_mode == 'dynamic' && (
<NumberField
name="snapshot_size_limit_gb"
label={translate('Snapshot size ... |
ec598768e6f50204f726a073c0d324a59bfcb1f5 | kspRemoteTechPlanner/calculator/orbital.ts | kspRemoteTechPlanner/calculator/orbital.ts | /// <reference path="_references.ts" />
module Calculator.Orbital {
'use strict';
export function period(sma: number, stdGravParam: number): number {
return 2 * Math.PI * Math.sqrt(Math.pow(sma, 3) / stdGravParam);
}
export function nightTime(radius: number, sma: number, stdGravParam: number... | /// <reference path="_references.ts" />
module Calculator.Orbital {
'use strict';
export function period(sma: number, stdGravParam: number): number {
return 2 * Math.PI * Math.sqrt(Math.pow(sma, 3) / stdGravParam);
}
export function sma(stdGravParam: number, period: number): number {
... | Add inversion between sma and period. | Add inversion between sma and period.
| TypeScript | mit | ryohpops/kspRemoteTechPlanner,ryohpops/kspRemoteTechPlanner,ryohpops/kspRemoteTechPlanner | ---
+++
@@ -5,6 +5,10 @@
export function period(sma: number, stdGravParam: number): number {
return 2 * Math.PI * Math.sqrt(Math.pow(sma, 3) / stdGravParam);
+ }
+
+ export function sma(stdGravParam: number, period: number): number {
+ return Math.pow(Math.pow(period, 2) * stdGravParam / ... |
533ca8d7168e37c205d79c6ee3fba2b661a4300b | packages/components/components/modal/Header.tsx | packages/components/components/modal/Header.tsx | import React from 'react';
import { c } from 'ttag';
import { classnames } from '../../helpers';
import Title from './Title';
import { Button } from '../button';
import Icon from '../icon/Icon';
interface Props extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, 'children'> {
moda... | import React from 'react';
import { c } from 'ttag';
import { classnames } from '../../helpers';
import Title from './Title';
import { Button } from '../button';
import Icon from '../icon/Icon';
interface Props extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, 'children'> {
moda... | Fix names being too long in header modals | [MAILWEB-1927] Fix names being too long in header modals
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -36,7 +36,7 @@
</Button>
) : null}
{typeof children === 'string' ? (
- <Title id={modalTitleID} className={!displayTitle ? 'sr-only' : undefined}>
+ <Title id={modalTitleID} className={!displayTitle ? 'sr-only' : 'text-ellipsis'}>
... |
fb5be32187cd40156b3cec56a070ee41c428be9b | web/webpack.config.ts | web/webpack.config.ts | import * as webpack from 'webpack';
import * as path from 'path';
import * as CopyWebpackPlugin from 'copy-webpack-plugin';
const OUTPUT_PATH = path.resolve(__dirname, 'dist');
const config: webpack.Configuration = {
entry: './src/main.ts',
output: {
path: OUTPUT_PATH,
filename: 'bundle.js'
},
resolv... | import * as webpack from 'webpack';
import * as path from 'path';
import * as CopyWebpackPlugin from 'copy-webpack-plugin';
const OUTPUT_PATH = path.resolve(__dirname, 'dist');
const config: webpack.Configuration = {
entry: './src/main.ts',
output: {
path: OUTPUT_PATH,
filename: 'bundle.js'
},
resolv... | Add uglification for web build | Add uglification for web build
| TypeScript | mpl-2.0 | gozer/voice-web,gozer/voice-web,kenrick95/voice-web,common-voice/common-voice,common-voice/common-voice,gozer/voice-web,gozer/voice-web,kenrick95/voice-web,kenrick95/voice-web,kenrick95/voice-web,kenrick95/voice-web,gozer/voice-web,common-voice/common-voice,common-voice/common-voice,gozer/voice-web,kenrick95/voice-web,... | ---
+++
@@ -27,7 +27,10 @@
new CopyWebpackPlugin([{
from: 'css/index.css',
to: OUTPUT_PATH }
- ])
+ ]),
+
+ /** See https://github.com/webpack-contrib/uglifyjs-webpack-plugin/tree/v0.4.6 */
+ new webpack.optimize.UglifyJsPlugin()
]
};
|
97663342c025187a919c963bbe5abaf0c54f6f79 | src/app/common/services/http-authentication.interceptor.ts | src/app/common/services/http-authentication.interceptor.ts | import { Injectable, Injector, Inject } from '@angular/core';
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
import { Observable } from 'rxjs';
import { currentUser } from 'src/app/ajs-upgraded-providers';
import API_URL from 'src/app/config/constants/apiURL';
@Injectable()... | import { Injectable, Injector, Inject } from '@angular/core';
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
import { Observable } from 'rxjs';
import { currentUser } from 'src/app/ajs-upgraded-providers';
import API_URL from 'src/app/config/constants/apiURL';
@Injectable()... | Remove Bearer from auth headers | FIX: Remove Bearer from auth headers
| TypeScript | agpl-3.0 | doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web | ---
+++
@@ -11,8 +11,8 @@
if (request.url.startsWith(API_URL) && this.CurrentUser.authenticationToken) {
request = request.clone({
setHeaders: {
- 'Auth-Token': `Bearer ${this.CurrentUser.authenticationToken}`,
- Username: `Bearer ${this.CurrentUser.username}`,
+ 'Auth-... |
f481d54fb3dfe7e00926ca0be287b89f34c5eef2 | packages/controls/test/src/phosphor/currentselection_test.ts | packages/controls/test/src/phosphor/currentselection_test.ts |
import { expect } from 'chai';
import { spy } from 'sinon';
import { Selection } from '../../../lib/phosphor/currentselection'
describe('Selection with items', function() {
let selection;
let subscriber; // subscribe to signals from selection
beforeEach(function() {
selection = new Selection(['v... |
import { expect } from 'chai';
import { spy } from 'sinon';
import { Selection } from '../../../lib/phosphor/currentselection'
describe('Selection with items', function() {
let selection;
let subscriber; // subscribe to signals from selection
beforeEach(function() {
selection = new Selection(['v... | Test for setting by value | Test for setting by value
| TypeScript | bsd-3-clause | SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets | ---
+++
@@ -37,4 +37,22 @@
currentValue: 'value-1'
})
})
+
+ it('set a value', function() {
+ selection.value = 'value-0';
+ expect(selection.value).to.equal('value-0');
+ expect(selection.index).to.equal(0)
+ })
+
+ it('dispatch a signal when setting a value',... |
caea49bad3943d82804e68d490f9319532d2e0c6 | src/lib/Scenes/Home/__tests__/index-tests.tsx | src/lib/Scenes/Home/__tests__/index-tests.tsx | import { shallow } from "enzyme"
import { Tab } from "lib/Components/TabBar"
import React from "react"
import Home from "../index"
it("has the correct number of tabs", () => {
const wrapper = shallow(<Home tracking={null} />)
expect(wrapper.find(Tab)).toHaveLength(3)
})
| import { shallow } from "enzyme"
import { Tab } from "lib/Components/TabBar"
import React from "react"
import Home from "../index"
it("has the correct number of tabs", () => {
const wrapper = shallow(<Home initialTab={0} isVisible={true} tracking={null} />)
expect(wrapper.find(Tab)).toHaveLength(3)
})
| Update home props on index tests | [Tests] Update home props on index tests
| TypeScript | mit | artsy/eigen,artsy/eigen,artsy/emission,artsy/emission,artsy/eigen,artsy/emission,artsy/emission,artsy/eigen,artsy/emission,artsy/emission,artsy/eigen,artsy/eigen,artsy/eigen,artsy/emission | ---
+++
@@ -4,6 +4,6 @@
import Home from "../index"
it("has the correct number of tabs", () => {
- const wrapper = shallow(<Home tracking={null} />)
+ const wrapper = shallow(<Home initialTab={0} isVisible={true} tracking={null} />)
expect(wrapper.find(Tab)).toHaveLength(3)
}) |
9acd35f167b3249f3979f0ca9e0aa99d631f083c | src/viewer/OptionsParser.ts | src/viewer/OptionsParser.ts | import {IViewerOptions} from "../Viewer";
import {ParameterMapillaryError} from "../Error";
export class OptionsParser {
public parseAndDefaultOptions(options: IViewerOptions): IViewerOptions {
if (options === undefined || options == null) {
options = {};
}
if (options.ui == nu... | import {IViewerOptions} from "../Viewer";
import {ParameterMapillaryError} from "../Error";
export class OptionsParser {
public parseAndDefaultOptions(options: IViewerOptions): IViewerOptions {
if (options === undefined || options == null) {
options = {};
}
if (options.ui == nu... | Add GL to options parser default UI list. | Add GL to options parser default UI list.
| TypeScript | mit | mapillary/mapillary-js,mapillary/mapillary-js | ---
+++
@@ -12,7 +12,7 @@
}
if (options.uiList == null) {
- options.uiList = ["none", "cover", "simple"];
+ options.uiList = ["none", "cover", "simple", "gl"];
}
|
08682308b195061788c2c53d23ce8b4dd89edd34 | app/javascript/retrospring/features/moderation/privilege.ts | app/javascript/retrospring/features/moderation/privilege.ts | import Rails from '@rails/ujs';
import I18n from '../../../legacy/i18n';
import { showNotification, showErrorNotification } from 'utilities/notifications';
export function privilegeCheckHandler(event: Event): void {
const checkbox = event.target as HTMLInputElement;
checkbox.disabled = true;
const privilegeTyp... | import Rails from '@rails/ujs';
import I18n from '../../../legacy/i18n';
import { showNotification, showErrorNotification } from 'utilities/notifications';
export function privilegeCheckHandler(event: Event): void {
const checkbox = event.target as HTMLInputElement;
checkbox.disabled = true;
const privilegeTyp... | Apply review suggestion from @raccube | Apply review suggestion from @raccube
Co-authored-by: Karina Kwiatek <a279f78642aaf231facf94ac593d2ad2fd791699@users.noreply.github.com> | TypeScript | agpl-3.0 | Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring | ---
+++
@@ -34,31 +34,4 @@
}
});
-
- /*
- ($ document).on "click", "input[type=checkbox][name=check-your-privileges]", ->
- box = $(this)
- box.attr 'disabled', 'disabled'
-
- privType = box[0].dataset.type
- boxChecked = box[0].checked
-
- $.ajax
- url: '/ajax/mod/privilege'
- type: 'POST'
- ... |
db2b2b08f88435bdc42ba2e4bfbc903cb1fcb896 | test/maml/maml-html-spec.ts | test/maml/maml-html-spec.ts |
import { Frame } from "../../src/frames/frame";
import { FrameString } from "../../src/frames/frame-string";
import { FrameExpr } from "../../src/frames/frame-expr";
import * as chai from "chai";
const expect = chai.expect;
export class FrameHTML extends Frame {
public static readonly BEGIN = `
<!DOCTYPE html>
<ht... |
import { Frame } from "../../src/frames/frame";
import { FrameString } from "../../src/frames/frame-string";
import { FrameExpr } from "../../src/frames/frame-expr";
import * as chai from "chai";
const expect = chai.expect;
export class FrameHTML extends Frame {
public static readonly BEGIN = `
<!DOCTYPE html>
<ht... | Verify presence of HTML tags | Verify presence of HTML tags
| TypeScript | mit | TheSwanFactory/maml,TheSwanFactory/maml,TheSwanFactory/hclang,TheSwanFactory/hclang | ---
+++
@@ -24,7 +24,6 @@
}
};
-
describe("FrameHTML", () => {
const js_string = "Hello, HTML!";
const frame_string = new FrameString(js_string);
@@ -32,7 +31,10 @@
it("HTML-ifies string expressions when called", () => {
const result = frame_html.call(frame_string);
+ const result_string = r... |
1d6f5aca0e7696c9c31f35d0b66e22a10c5d3b78 | Presentation.Web/Tests/ItProject/Edit/projectEdit.e2e.spec.ts | Presentation.Web/Tests/ItProject/Edit/projectEdit.e2e.spec.ts | import mock = require('protractor-http-mock');
import Helper = require('../../helper');
import ItProjectEditPo = require('../../../app/components/it-project/it-project-edit.po');
describe('project edit view', () => {
var browserHelper: Helper.BrowserHelper;
var pageObject: ItProjectEditPo;
beforeEach(() ... | import mock = require('protractor-http-mock');
import Helper = require('../../helper');
import ItProjectEditPo = require('../../../app/components/it-project/it-project-edit.po');
describe('project edit view', () => {
var browserHelper: Helper.BrowserHelper;
var pageObject: ItProjectEditPo;
beforeEach(() ... | Remove redundant e2e test. All tests are on e2e/project-edit branch. | Remove redundant e2e test. All tests are on e2e/project-edit branch.
| TypeScript | mpl-2.0 | miracle-as/kitos,miracle-as/kitos,miracle-as/kitos,os2kitos/kitos,os2kitos/kitos,os2kitos/kitos,os2kitos/kitos,miracle-as/kitos | ---
+++
@@ -16,23 +16,6 @@
browser.driver.manage().window().maximize();
});
- it('should save when name looses focus', () => {
- // arrange
- pageObject.nameInput = 'SomeName';
-
- // act
- pageObject.idElement.click();
-
- // assert
- mock.requestsMade()
-... |
1894b03f4775f0d1b99510bd9af4afabb7a21c52 | app/scripts/components/marketplace/details/FeatureSection.tsx | app/scripts/components/marketplace/details/FeatureSection.tsx | import * as React from 'react';
import { ListCell } from '@waldur/marketplace/common/ListCell';
import { Section, Product } from '@waldur/marketplace/types';
interface FeatureSectionProps {
section: Section;
product: Product;
}
const AttributeRow = ({ product, attribute }) => {
let value = product.attributes[a... | import * as React from 'react';
import { ListCell } from '@waldur/marketplace/common/ListCell';
import { Section, Product } from '@waldur/marketplace/types';
interface FeatureSectionProps {
section: Section;
product: Product;
}
const getOptions = attribute =>
attribute.options.reduce((map, item) => ({...map, [... | Add support for choice attribute in marketplace offering. | Add support for choice attribute in marketplace offering.
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -8,12 +8,18 @@
product: Product;
}
+const getOptions = attribute =>
+ attribute.options.reduce((map, item) => ({...map, [item.key]: item.title}), {});
+
const AttributeRow = ({ product, attribute }) => {
let value = product.attributes[attribute.key];
if (attribute.type === 'list' && typeof va... |
edbeb90105f2ff43eaff3ef228bd89d34fdca828 | clients/client-web-vue2/src/index.ts | clients/client-web-vue2/src/index.ts | import { Client, InitConfig } from '@jovotech/client-web';
import { PluginObject } from 'vue';
declare global {
interface Window {
JovoWebClientVue?: typeof import('.');
}
}
declare module 'vue/types/vue' {
interface Vue {
$client: Client;
}
}
export interface JovoWebClientVueConfig {
endpointUrl: ... | import { Client, InitConfig } from '@jovotech/client-web';
import { PluginObject } from 'vue';
declare global {
interface Window {
JovoWebClientVue?: typeof import('.');
}
}
declare module 'vue/types/vue' {
interface Vue {
$client: Client;
}
}
export interface JovoWebClientVueConfig {
endpointUrl: ... | Allow directly passing a Client-instance to the vue2 plugin | :sparkles: Allow directly passing a Client-instance to the vue2 plugin
| TypeScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | ---
+++
@@ -18,18 +18,22 @@
config?: InitConfig;
}
+export type PluginConfig = JovoWebClientVueConfig | Client;
+
export * from '@jovotech/client-web';
-const plugin: PluginObject<JovoWebClientVueConfig> = {
- install: (vue, config) => {
- if (!config?.endpointUrl) {
- throw new Error(
- `At ... |
533ff171cf68484b297b3169a9596ed5ed0c8475 | tests/legacy-cli/e2e/tests/misc/webpack-5.ts | tests/legacy-cli/e2e/tests/misc/webpack-5.ts | import { rimraf } from '../../utils/fs';
import { killAllProcesses, ng, silentYarn } from '../../utils/process';
import { ngServe, updateJsonFile } from '../../utils/project';
export default async function() {
// Currently disabled as it breaks tslib 2.0.2
// Cannot destructure property '__extends' of '_tslib_js__... | import { rimraf } from '../../utils/fs';
import { killAllProcesses, ng, silentYarn } from '../../utils/process';
import { ngServe, updateJsonFile } from '../../utils/project';
export default async function() {
// Setup project for yarn usage
await rimraf('node_modules');
await updateJsonFile('package.json', (jso... | Revert "test(@angular/cli): disable webpack 5 e2e tests" | Revert "test(@angular/cli): disable webpack 5 e2e tests"
This reverts commit ba830d56350920d95e6c0023c84da9e485cf7800.
| TypeScript | mit | angular/angular-cli,geofffilippi/angular-cli,angular/angular-cli,geofffilippi/angular-cli,catull/angular-cli,Brocco/angular-cli,clydin/angular-cli,catull/angular-cli,Brocco/angular-cli,geofffilippi/angular-cli,catull/angular-cli,ocombe/angular-cli,angular/angular-cli,clydin/angular-cli,clydin/angular-cli,Brocco/angular... | ---
+++
@@ -3,10 +3,6 @@
import { ngServe, updateJsonFile } from '../../utils/project';
export default async function() {
- // Currently disabled as it breaks tslib 2.0.2
- // Cannot destructure property '__extends' of '_tslib_js__WEBPACK_IMPORTED_MODULE_0___default(...)' as it is undefined.
- return;
-
// ... |
052699eba56b1f099f65ac686a41e866a2d088ed | src/app/directives/router-outlet.ts | src/app/directives/router-outlet.ts | import { ElementRef, DynamicComponentLoader, AttributeMetadata, Directive } from 'angular2/core';
import { Router, RouterOutlet } from 'angular2/router';
import { AuthApi } from '../services/auth-api/authentication';
@Directive({
selector: 'router-outlet'
})
export class LoggedInRouterOutlet extends RouterOutlet {
... | import { ElementRef, DynamicComponentLoader, AttributeMetadata, Directive } from 'angular2/core';
import { Router, RouterOutlet } from 'angular2/router';
import { AuthApi } from '../services/auth-api/authentication';
@Directive({
selector: 'router-outlet'
})
export class LoggedInRouterOutlet extends RouterOutlet {
... | Modify to redirect to actual login route | Modify to redirect to actual login route
| TypeScript | mit | bspride/ModernCookbook,bspride/ModernCookbook,bspride/ModernCookbook | ---
+++
@@ -28,8 +28,8 @@
if (this._canActivate(instruction.urlPath)) {
return super.activate(instruction);
}
-
- this.parentRouter.navigate(['Login']);
+ let link = ['Security', {task: 'login'}];
+ this.parentRouter.navigate(link);
}
_canActivate(url) { |
13e96fced0341dfa2002c6de9a17ff241fa9cc81 | packages/linter/src/rules/AmpImgUsesSrcSet.ts | packages/linter/src/rules/AmpImgUsesSrcSet.ts | import { Context } from "../index";
import { Rule } from "../rule";
const SVG_URL_PATTERN = /^[^?]+\.svg(\?.*)?$/i
export class AmpImgUsesSrcSet extends Rule {
async run(context: Context) {
const $ = context.$;
const incorrectImages = $("amp-img")
.filter((_, e) => {
const src = $(e).attr... | import { Context } from "../index";
import { Rule } from "../rule";
const SVG_URL_PATTERN = /^[^?]+\.svg(\?.*)?$/i
const CHECKED_IMG_LAYOUTS = ["fill", "flex-item", "intrinsic", "responsive"];
export class AmpImgUsesSrcSet extends Rule {
async run(context: Context) {
const $ = context.$;
const incorrectIm... | Change img srcset check messages and checked layouts | Change img srcset check messages and checked layouts
| TypeScript | apache-2.0 | ampproject/amp-toolbox,ampproject/amp-toolbox,ampproject/amp-toolbox,ampproject/amp-toolbox | ---
+++
@@ -2,6 +2,8 @@
import { Rule } from "../rule";
const SVG_URL_PATTERN = /^[^?]+\.svg(\?.*)?$/i
+
+const CHECKED_IMG_LAYOUTS = ["fill", "flex-item", "intrinsic", "responsive"];
export class AmpImgUsesSrcSet extends Rule {
async run(context: Context) {
@@ -14,13 +16,13 @@
const srcset = $(e... |
b4abedc2bbc99e1997a83f9b6bdae1f3ea0135f6 | server/tests/factory/NullLoggerFactoryTest.ts | server/tests/factory/NullLoggerFactoryTest.ts | import { assert, expect } from "chai";
import { only, skip, slow, suite, test, timeout } from "mocha-typescript";
import * as sinon from "sinon";
import NullLoggerFactory from "../../src/factory/NullLoggerFactory";
import NullLogger from "../../src/service/logger/NullLogger";
@suite("Null logger factory")
class... | import { assert, expect } from "chai";
import { only, skip, slow, suite, test, timeout } from "mocha-typescript";
import * as sinon from "sinon";
import { IConnection } from "vscode-languageserver";
import NullLoggerFactory from "../../src/factory/NullLoggerFactory";
import NullLogger from "../../src/service/logge... | Fix unit tests after improved typing | Fix unit tests after improved typing
| TypeScript | mit | sandhje/vscode-phpmd | ---
+++
@@ -1,6 +1,7 @@
import { assert, expect } from "chai";
import { only, skip, slow, suite, test, timeout } from "mocha-typescript";
import * as sinon from "sinon";
+import { IConnection } from "vscode-languageserver";
import NullLoggerFactory from "../../src/factory/NullLoggerFactory";
import NullLogger fr... |
b379ecd03cf8faad81fc2b6e8beede28fa5fecc2 | src/cronstrue-i18n.ts | src/cronstrue-i18n.ts | import { ExpressionDescriptor } from "./expressionDescriptor"
import { allLocalesLoader } from "./i18n/allLocalesLoader"
ExpressionDescriptor.initialize(new allLocalesLoader());
export = ExpressionDescriptor;
| import { ExpressionDescriptor } from "./expressionDescriptor"
import { allLocalesLoader } from "./i18n/allLocalesLoader"
ExpressionDescriptor.initialize(new allLocalesLoader());
export default ExpressionDescriptor;
let toString = ExpressionDescriptor.toString;
export { toString };
| Use named export for 'toString' for i18n version | Use named export for 'toString' for i18n version
| TypeScript | mit | bradyholt/cRonstrue,bradyholt/cRonstrue | ---
+++
@@ -2,5 +2,8 @@
import { allLocalesLoader } from "./i18n/allLocalesLoader"
ExpressionDescriptor.initialize(new allLocalesLoader());
+export default ExpressionDescriptor;
-export = ExpressionDescriptor;
+let toString = ExpressionDescriptor.toString;
+export { toString };
+ |
c52757bfd53829665ce54bf1d19961328c10bd0a | server/src/lib/utility.ts | server/src/lib/utility.ts | /**
* Functions to be shared across mutiple modules.
*/
/**
* Returns the file extension of some path.
*/
export function getFileExt(path: string): string {
return path.substr(path.lastIndexOf('.') - path.length);
}
/**
* Returns the first defined argument. Returns null if there are no defined
* arguments.
*... | /**
* Functions to be shared across mutiple modules.
*/
/**
* Returns the file extension of some path.
*/
export function getFileExt(path: string): string {
return path.substr(path.lastIndexOf('.') - path.length);
}
/**
* Returns the first defined argument. Returns null if there are no defined
* arguments.
*... | Use options variable instead of arguments in getFirstDefined | Use options variable instead of arguments in getFirstDefined
| TypeScript | mpl-2.0 | kenrick95/voice-web,kenrick95/voice-web,gozer/voice-web,gozer/voice-web,common-voice/common-voice,kenrick95/voice-web,kenrick95/voice-web,gozer/voice-web,gozer/voice-web,common-voice/common-voice,gozer/voice-web,kenrick95/voice-web,gozer/voice-web,gozer/voice-web,common-voice/common-voice,kenrick95/voice-web,common-voi... | ---
+++
@@ -14,9 +14,9 @@
* arguments.
*/
export function getFirstDefined(...options) {
- for (var i = 0; i < arguments.length; i++) {
- if (arguments[i] !== undefined) {
- return arguments[i];
+ for (var i = 0; i < options.length; i++) {
+ if (options[i] !== undefined) {
+ return options[i];
... |
67545a6c2f4ce1e3517504446e102f549a830292 | packages/components/hooks/useIsMnemonicAvailable.ts | packages/components/hooks/useIsMnemonicAvailable.ts | import { getHasMigratedAddressKeys } from '@proton/shared/lib/keys';
import { FeatureCode } from '../containers/features';
import { useAddresses } from './useAddresses';
import useFeature from './useFeature';
const useIsMnemonicAvailable = (): boolean => {
const mnemonicFeature = useFeature(FeatureCode.Mnemonic);
... | import { getHasMigratedAddressKeys } from '@proton/shared/lib/keys';
import { FeatureCode } from '../containers/features';
import { useAddresses } from './useAddresses';
import useFeature from './useFeature';
import useUser from './useUser';
const useIsMnemonicAvailable = (): boolean => {
const [user] = useUser();... | Make mnemonic unavailable for non private users | Make mnemonic unavailable for non private users
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -2,13 +2,17 @@
import { FeatureCode } from '../containers/features';
import { useAddresses } from './useAddresses';
import useFeature from './useFeature';
+import useUser from './useUser';
const useIsMnemonicAvailable = (): boolean => {
+ const [user] = useUser();
const mnemonicFeature = useF... |
183fb365f1557185ad185971d67245589115d86d | src/app/components/dashboard/dashboard.component.ts | src/app/components/dashboard/dashboard.component.ts | import { Component, OnInit } from '@angular/core';
import { StocksService } from '../../services/stocks.service';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent implements OnInit {
public stocks:any;... | import { Component, OnInit } from '@angular/core';
import { StocksService } from '../../services/stocks.service';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent implements OnInit {
public stocks:any;... | Move stocksService load to ngOnInit | Move stocksService load to ngOnInit
| TypeScript | mit | mbarmawi/stocks-tracker,mbarmawi/stocks-tracker,mbarmawi/stocks-tracker | ---
+++
@@ -8,12 +8,12 @@
})
export class DashboardComponent implements OnInit {
public stocks:any;
- constructor(stocksService: StocksService) {
- stocksService
+ constructor(private stocksService: StocksService) {
+ }
+
+ ngOnInit() {
+ this.stocksService
.load()
.subscribe(res => this.sto... |
7b0884c482f9962a8a81af12acb8007aa38df53c | src/app/components/devlog/post/edit/edit-service.ts | src/app/components/devlog/post/edit/edit-service.ts | import { Injectable, Inject } from 'ng-metadata/core';
import { Fireside_Post } from './../../../../../lib/gj-lib-client/components/fireside/post/post-model';
import template from './edit.html';
@Injectable()
export class DevlogPostEdit
{
constructor(
@Inject( '$modal' ) private $modal: any
)
{
}
show( post: F... | import { Injectable, Inject } from 'ng-metadata/core';
import { Fireside_Post } from './../../../../../lib/gj-lib-client/components/fireside/post/post-model';
import template from './edit.html';
@Injectable()
export class DevlogPostEdit
{
constructor(
@Inject( '$modal' ) private $modal: any
)
{
}
show( post: F... | Fix edit post not loading correctly on game page. | Fix edit post not loading correctly on game page.
| TypeScript | mit | gamejolt/gamejolt,gamejolt/gamejolt,gamejolt/gamejolt,gamejolt/gamejolt | ---
+++
@@ -18,6 +18,8 @@
controller: 'Devlog.Post.EditModalCtrl',
controllerAs: '$ctrl',
resolve: {
+ // They may load this on the game page without having dash stuff loaded in yet.
+ init: [ '$ocLazyLoad', $ocLazyLoad => $ocLazyLoad.load( '/app/modules/dash.js' ) ],
post: () => post,
},
... |
5a61ae2e9f6603961e7498cc0cc02e678fd38671 | src/server/main.tsx | src/server/main.tsx | import api from './api'
import { runHotMiddleware } from './middleware'
import { listen } from './listen'
import { monitorExceptions } from './exceptionMonitoring'
import { serveFrontend } from './serveFrontend'
import { sequelize } from './db'
import { setupSession } from... | import api from './api'
import { runHotMiddleware } from './middleware'
import { listen } from './listen'
import { monitorExceptions } from './exceptionMonitoring'
import { serveFrontend } from './serveFrontend'
import { sequelize } from './db'
import { setupSession } from... | Fix frontend serving for development | Fix frontend serving for development
| TypeScript | mit | devonzuegel/clarity,devonzuegel/clarity,devonzuegel/clarity,devonzuegel/clarity | ---
+++
@@ -13,11 +13,12 @@
monitorExceptions(config)(app)
api(app)
-serveFrontend(app)
setupSession(app)
if (config.env !== 'production') {
runHotMiddleware(app)
}
+serveFrontend(app)
+
sequelize.sync().then(() => listen(app, config)) |
484c5bd0a65e508991a673a4e2c762c45f61489f | src/ts/environment.ts | src/ts/environment.ts | import {PreDestroy, Bean, Qualifier, Autowired, PostConstruct, Optional, Context} from "./context/context";
const themes = [ 'fresh', 'dark', 'blue', 'bootstrap', 'material', 'theme-material'];
const themeCLass = new RegExp(`ag-(${themes.join('|')})`);
@Bean('environment')
export class Environment {
@Autowired('e... | import {PreDestroy, Bean, Qualifier, Autowired, PostConstruct, Optional, Context} from "./context/context";
const themes = [ 'fresh', 'dark', 'blue', 'bootstrap', 'material', 'theme-material'];
const themeCLass = new RegExp(`ag-(${themes.join('|')})`);
@Bean('environment')
export class Environment {
@Autowired('e... | Handle the case of getting theme when detached | Handle the case of getting theme when detached
| TypeScript | mit | seanlandsman/ag-grid,ceolter/angular-grid,ceolter/angular-grid,killyosaur/ag-grid,ceolter/ag-grid,seanlandsman/ag-grid,ceolter/ag-grid,seanlandsman/ag-grid,killyosaur/ag-grid,killyosaur/ag-grid | ---
+++
@@ -14,6 +14,9 @@
while (element != document.documentElement && themeMatch == null) {
themeMatch = element.className.match(themeCLass);
element = element.parentElement;
+ if (element == null) {
+ break;
+ }
}
if (theme... |
c5446891631c96de20b4f4736de6d9a3d4ae08d6 | packages/lesswrong/lib/collections/subscriptions/mutations.ts | packages/lesswrong/lib/collections/subscriptions/mutations.ts | import { Subscriptions } from './collection';
import { subscriptionTypes } from './schema'
import { runCallbacksAsync, Utils } from '../../vulcan-lib';
import Users from '../users/collection';
export const defaultSubscriptionTypeTable = {
"Comments": subscriptionTypes.newReplies,
"Posts": subscriptionTypes.newComm... | import { Subscriptions } from './collection';
import { subscriptionTypes } from './schema'
import { runCallbacksAsync, Utils } from '../../vulcan-lib';
import Users from '../users/collection';
export const defaultSubscriptionTypeTable = {
"Comments": subscriptionTypes.newReplies,
"Posts": subscriptionTypes.newComm... | Fix a crash introduced by Vulcan unpackaging, revealed by unit test | Fix a crash introduced by Vulcan unpackaging, revealed by unit test
| TypeScript | mit | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope | ---
+++
@@ -26,7 +26,7 @@
collectionName,
type: defaultSubscriptionTypeTable[collectionName]
}
- await Utils.newMutator({
+ await Utils.createMutator({
collection: Subscriptions,
document: newSubscription,
validate: true, |
30483114fc36b48c90a7ab6af711b83abc9aebf6 | src/homebridge.ts | src/homebridge.ts | import 'hap-nodejs';
export interface Homebridge {
hap: HAPNodeJS.HAPNodeJS;
log: Homebridge.Log;
registerAccessory(pluginName: string, accessoryName: string, constructor: Function)
}
export namespace Homebridge {
export interface Log {
debug: (...message: string[]) => void
info: (...m... | import 'hap-nodejs';
export interface Homebridge {
hap: HAPNodeJS.HAPNodeJS;
log: Homebridge.Log;
registerAccessory(pluginName: string, accessoryName: string, constructor: Function): void
}
export namespace Homebridge {
export interface Log {
debug: (...message: string[]) => void
info:... | Add missing return type for registerAccessory | Add missing return type for registerAccessory
| TypeScript | mit | JosephDuffy/homebridge-pc-volume,JosephDuffy/homebridge-pc-volume,JosephDuffy/homebridge-pc-volume | ---
+++
@@ -3,7 +3,7 @@
export interface Homebridge {
hap: HAPNodeJS.HAPNodeJS;
log: Homebridge.Log;
- registerAccessory(pluginName: string, accessoryName: string, constructor: Function)
+ registerAccessory(pluginName: string, accessoryName: string, constructor: Function): void
}
export namespace... |
ecbb0fd37a2d7fd7e8f69fa91790a61d8bf7accd | packages/components/containers/app/TopBanner.tsx | packages/components/containers/app/TopBanner.tsx | import React from 'react';
import { Icon, classnames } from '../../index';
interface Props {
children: React.ReactNode;
className?: string;
onClose?: () => void;
}
const TopBanner = ({ children, className, onClose }: Props) => {
return (
<div className={classnames(['aligncenter p0-5 relative'... | import React from 'react';
import { Icon, classnames } from '../../index';
interface Props {
children: React.ReactNode;
className?: string;
onClose?: () => void;
}
const TopBanner = ({ children, className, onClose }: Props) => {
return (
<div className={classnames(['aligncenter p0-5 relative ... | Use bold font in top banners | [MAILWEB-930] Use bold font in top banners
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -10,7 +10,7 @@
const TopBanner = ({ children, className, onClose }: Props) => {
return (
- <div className={classnames(['aligncenter p0-5 relative', className])}>
+ <div className={classnames(['aligncenter p0-5 relative bold', className])}>
{children}
{onClose... |
9cacd0735f7bca85c1735a8e468c759d23c3e976 | src/SyntaxNodes/OrderedListNode.ts | src/SyntaxNodes/OrderedListNode.ts | import { OutlineSyntaxNode } from './OutlineSyntaxNode'
export class OrderedListNode implements OutlineSyntaxNode {
constructor(public items: OrderedListNode.Item[]) { }
start(): number {
return this.items[0].ordinal
}
order(): OrderedListNode.Order {
const withExplicitOrdinals =
this.items.fi... | import { OutlineSyntaxNode } from './OutlineSyntaxNode'
import { OutlineSyntaxNodeContainer } from './OutlineSyntaxNodeContainer'
export class OrderedListNode implements OutlineSyntaxNode {
constructor(public items: OrderedListNode.Item[]) { }
start(): number {
return this.items[0].ordinal
}
order(): Or... | Make ordered list item extend outline container | Make ordered list item extend outline container
| TypeScript | mit | start/up,start/up | ---
+++
@@ -1,4 +1,5 @@
import { OutlineSyntaxNode } from './OutlineSyntaxNode'
+import { OutlineSyntaxNodeContainer } from './OutlineSyntaxNodeContainer'
export class OrderedListNode implements OutlineSyntaxNode {
@@ -28,10 +29,12 @@
export module OrderedListNode {
- export class Item {
+ export class I... |
1d8e036bcbf779faaf4e70c30cefbe0805a7b7eb | public/app/core/components/Page/PageContents.tsx | public/app/core/components/Page/PageContents.tsx | // Libraries
import React, { Component } from 'react';
// Components
import CustomScrollbar from '../CustomScrollbar/CustomScrollbar';
import PageLoader from '../PageLoader/PageLoader';
interface Props {
isLoading?: boolean;
children: JSX.Element[] | JSX.Element;
}
class PageContents extends Component<Props> {
... | // Libraries
import React, { Component } from 'react';
// Components
import { CustomScrollbar } from '@grafana/ui';
import PageLoader from '../PageLoader/PageLoader';
interface Props {
isLoading?: boolean;
children: JSX.Element[] | JSX.Element;
}
class PageContents extends Component<Props> {
render() {
co... | Fix import path after Scrollbar move to @grafana/ui | fix: Fix import path after Scrollbar move to @grafana/ui
| TypeScript | agpl-3.0 | grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana | ---
+++
@@ -2,7 +2,7 @@
import React, { Component } from 'react';
// Components
-import CustomScrollbar from '../CustomScrollbar/CustomScrollbar';
+import { CustomScrollbar } from '@grafana/ui';
import PageLoader from '../PageLoader/PageLoader';
interface Props { |
7cefb91669306fe4fa6f59d8971a1cf19bf5b893 | src/index.ts | src/index.ts | import * as app from 'app';
import * as BrowserWindow from 'browser-window';
import * as Menu from 'menu';
import * as platform from './models/platform';
if (!platform.isOSX) {
app.on('window-all-closed', () => app.quit());
}
app.on('ready', () => {
let mainWindow = new BrowserWindow({
width: 800,
height: 600,
... | import * as app from 'app';
import * as BrowserWindow from 'browser-window';
import * as Menu from 'menu';
import * as platform from './models/platform';
if (!platform.isOSX) {
app.on('window-all-closed', () => app.quit());
}
app.on('ready', () => {
let mainWindow = new BrowserWindow({
width: 800,
height: 600,
... | Set minumum width and height for window | Set minumum width and height for window
| TypeScript | mit | AyaMorisawa/Disskey,AyaMorisawa/Disskey,AyaMorisawa/Disskey | ---
+++
@@ -11,6 +11,8 @@
let mainWindow = new BrowserWindow({
width: 800,
height: 600,
+ 'min-width': 200,
+ 'min-height': 200,
title: 'Disskey',
frame: false,
show: false, |
019fa89f70b824d44b561181cedd8a3cdaf3e25b | src/utils.ts | src/utils.ts | "use strict";
import * as path from "path";
import * as fs from "fs";
import { workspace } from "vscode";
export const dartVMPath = "bin/dart.exe";
export const analyzerPath = "bin/snapshots/analysis_server.dart.snapshot";
const configExtensionName = "dart";
const configSdkPathName = "sdkPath";
const configSetIndentN... | "use strict";
import * as path from "path";
import * as fs from "fs";
import { workspace } from "vscode";
export const dartVMPath = "bin/dart";
export const analyzerPath = "bin/snapshots/analysis_server.dart.snapshot";
const configExtensionName = "dart";
const configSdkPathName = "sdkPath";
const configSetIndentName ... | Remove .exe extension from Dart so it's not Windows-sepcific. | Remove .exe extension from Dart so it's not Windows-sepcific.
| TypeScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | ---
+++
@@ -4,7 +4,7 @@
import * as fs from "fs";
import { workspace } from "vscode";
-export const dartVMPath = "bin/dart.exe";
+export const dartVMPath = "bin/dart";
export const analyzerPath = "bin/snapshots/analysis_server.dart.snapshot";
const configExtensionName = "dart";
const configSdkPathName = "sdkPa... |
1845cfe1f1f9abe81c993e936b51628956854f58 | patcher/src/widgets/Controller/components/PatcherError/index.tsx | patcher/src/widgets/Controller/components/PatcherError/index.tsx | /**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import * as React from 'react';
import styled from 'react-emotion';
import { PatcherError } from '../../../..... | /**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import * as React from 'react';
import styled from 'react-emotion';
import { PatcherError } from '../../../..... | Fix review issues, also fix gradient | Fix review issues, also fix gradient
| TypeScript | mpl-2.0 | saddieeiddas/Camelot-Unchained,csegames/Camelot-Unchained,CUModSquad/Camelot-Unchained,saddieeiddas/Camelot-Unchained,Mehuge/Camelot-Unchained,Mehuge/Camelot-Unchained,Ajackster/Camelot-Unchained,csegames/Camelot-Unchained,Ajackster/Camelot-Unchained,saddieeiddas/Camelot-Unchained,CUModSquad/Camelot-Unchained,CUModSqua... | ---
+++
@@ -10,11 +10,11 @@
const Alert = styled('div')`
overflow: hidden;
- background-color: orange;
+ background: repeating-linear-gradient(45deg, darkorange, orange 2px, orange 1px, darkorange 4px);
color: black;
padding: 3px 15px;
position: relative;
- pointer-events: bounding-box;
+ pointer-e... |
d7a5a35376fba4831e3177e93bc941fd1c1e99a8 | packages/data-mate/src/vector/interfaces.ts | packages/data-mate/src/vector/interfaces.ts | import { Maybe } from '@terascope/types';
/**
* The Vector Type, this will change how the data is stored and read
*/
export enum VectorType {
/**
* Currently this operates like String
* but I imagine will be expanding it.
* But will need to add format options
*/
Date = 'Date',
String = ... | import { Maybe } from '@terascope/types';
/**
* The Vector Type, this will change how the data is stored and read
*
* @todo add IP and IP_RANGE support
*/
export enum VectorType {
/**
* Currently this operates like String
* but I imagine will be expanding it.
* But will need to add format options... | Add todo for IP and IP_RANGE vectors | Add todo for IP and IP_RANGE vectors
| TypeScript | apache-2.0 | terascope/teraslice,terascope/teraslice,terascope/teraslice,terascope/teraslice | ---
+++
@@ -2,6 +2,8 @@
/**
* The Vector Type, this will change how the data is stored and read
+ *
+ * @todo add IP and IP_RANGE support
*/
export enum VectorType {
/**
@@ -17,10 +19,11 @@
Boolean = 'Boolean',
GeoPoint = 'GeoPoint',
GeoJSON = 'GeoJSON',
- /** @todo */
+ IP = 'IP',
+ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.