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 |
|---|---|---|---|---|---|---|---|---|---|---|
3a4cb35d4857d1df65118f7c3266df0fc6f9df8d | applications/calendar/src/app/App.tsx | applications/calendar/src/app/App.tsx | import { hot } from 'react-hot-loader/root';
import React from 'react';
import { ProtonApp, StandardSetup } from 'react-components';
import locales from 'proton-shared/lib/i18n/locales';
import sentry from 'proton-shared/lib/helpers/sentry';
import * as config from './config';
import PrivateApp from './content/Private... | import React from 'react';
import { ProtonApp, StandardSetup } from 'react-components';
import locales from 'proton-shared/lib/i18n/locales';
import sentry from 'proton-shared/lib/helpers/sentry';
import * as config from './config';
import PrivateApp from './content/PrivateApp';
import './app.scss';
sentry(config);
... | Use fast-refresh instead of hot-loader | Use fast-refresh instead of hot-loader
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -1,4 +1,3 @@
-import { hot } from 'react-hot-loader/root';
import React from 'react';
import { ProtonApp, StandardSetup } from 'react-components';
import locales from 'proton-shared/lib/i18n/locales';
@@ -19,4 +18,4 @@
);
};
-export default hot(App);
+export default App; |
ea5c4305a1a79ef4ad499af0536979d800b24233 | packages/elasticsearch-store/src/utils/retry-config.ts | packages/elasticsearch-store/src/utils/retry-config.ts | import { PRetryConfig, isTest } from '@terascope/utils';
export const MAX_RETRIES = isTest ? 2 : 100;
export const RETRY_DELAY = isTest ? 50 : 500;
export function getRetryConfig(): Partial<PRetryConfig> {
return {
retries: MAX_RETRIES,
delay: RETRY_DELAY,
matches: ['es_rejected_execution_... | import { PRetryConfig, isTest } from '@terascope/utils';
export const MAX_RETRIES = isTest ? 2 : 100;
export const RETRY_DELAY = isTest ? 50 : 500;
export function getRetryConfig(): Partial<PRetryConfig> {
return {
retries: MAX_RETRIES,
delay: RETRY_DELAY,
matches: [
'node_disc... | Add node_disconnect_exception to retry list in elasticsearch-store | Add node_disconnect_exception to retry list in elasticsearch-store
| TypeScript | apache-2.0 | terascope/teraslice,terascope/teraslice,terascope/teraslice,terascope/teraslice | ---
+++
@@ -7,6 +7,10 @@
return {
retries: MAX_RETRIES,
delay: RETRY_DELAY,
- matches: ['es_rejected_execution_exception', 'No Living connections'],
+ matches: [
+ 'node_disconnect_exception',
+ 'es_rejected_execution_exception',
+ 'No Living conne... |
d644325b277a271a7ce8884126ffa25cf012e362 | packages/cli/src/lib/api.ts | packages/cli/src/lib/api.ts | import * as superagent from 'superagent';
import {
APIResponse,
APIResponseError,
APIResponseSuccess,
IClient,
IConfig
} from '../definitions';
const CONTENT_TYPE_JSON = 'application/json';
export const ERROR_UNKNOWN_CONTENT_TYPE = 'UNKNOWN_CONTENT_TYPE';
export const ERROR_UNKNOWN_RESPONSE_FORMAT = 'UNKNOW... | import * as superagent from 'superagent';
import {
APIResponse,
APIResponseError,
APIResponseSuccess,
IClient,
IConfig
} from '../definitions';
const CONTENT_TYPE_JSON = 'application/json';
export const ERROR_UNKNOWN_CONTENT_TYPE = 'UNKNOWN_CONTENT_TYPE';
export const ERROR_UNKNOWN_RESPONSE_FORMAT = 'UNKNOW... | Fix compiler complaint for now | Fix compiler complaint for now
| TypeScript | mit | driftyco/ionic-cli,devtotvs/thf-mobile-cli,devtotvs/thf-mobile-cli,ricardo-mello/ionic-cli,driftyco/ionic-cli,ricardo-mello/ionic-cli,driftyco/ionic-cli,devtotvs/thf-mobile-cli,ricardo-mello/ionic-cli | ---
+++
@@ -22,7 +22,7 @@
}
async do(req: superagent.Request): Promise<APIResponseSuccess> {
- let res = await req;
+ let res = await Promise.resolve(req); // TODO: should be able to just do `await req`
if (res.type !== CONTENT_TYPE_JSON) {
throw ERROR_UNKNOWN_CONTENT_TYPE; |
af0258c8aaa529e71323315655b4faeec7e709d3 | app/javascript/retrospring/features/lists/create.ts | app/javascript/retrospring/features/lists/create.ts | import Rails from '@rails/ujs';
import { showNotification, showErrorNotification } from 'utilities/notifications';
import I18n from 'retrospring/i18n';
export function createListHandler(event: Event): void {
const button = event.target as HTMLButtonElement;
const input = document.querySelector<HTMLInputElement>('i... | import { post } from '@rails/request.js';
import { showNotification, showErrorNotification } from 'utilities/notifications';
import I18n from 'retrospring/i18n';
export function createListHandler(event: Event): void {
const button = event.target as HTMLButtonElement;
const input = document.querySelector<HTMLInputE... | Refactor list creation to use request.js | Refactor list creation to use request.js
| TypeScript | agpl-3.0 | Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring | ---
+++
@@ -1,4 +1,4 @@
-import Rails from '@rails/ujs';
+import { post } from '@rails/request.js';
import { showNotification, showErrorNotification } from 'utilities/notifications';
import I18n from 'retrospring/i18n';
@@ -6,25 +6,26 @@
const button = event.target as HTMLButtonElement;
const input = docume... |
edec01f4c51d4d2f14631a3f851954d0dc047a83 | data/static/codefixes/registerAdminChallenge_4.ts | data/static/codefixes/registerAdminChallenge_4.ts | /* Generated API endpoints */
finale.initialize({ app, sequelize: models.sequelize })
const autoModels = [
{ name: 'User', exclude: ['password', 'totpSecret', 'role'] },
{ name: 'Product', exclude: [] },
{ name: 'Feedback', exclude: [] },
{ name: 'BasketItem', exclude: [] },
{ name: 'Challenge', exclude: [] ... | /* Generated API endpoints */
finale.initialize({ app, sequelize: models.sequelize })
const autoModels = [
{ name: 'User', exclude: ['password', 'totpSecret', 'role'] },
{ name: 'Product', exclude: [] },
{ name: 'Feedback', exclude: [] },
{ name: 'BasketItem', exclude: [] },
{ name: 'Challeng... | Fix indentation to match original code | Fix indentation to match original code
| TypeScript | mit | bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop | ---
+++
@@ -1,35 +1,35 @@
-/* Generated API endpoints */
-finale.initialize({ app, sequelize: models.sequelize })
+ /* Generated API endpoints */
+ finale.initialize({ app, sequelize: models.sequelize })
-const autoModels = [
- { name: 'User', exclude: ['password', 'totpSecret', 'role'] },
- { name: 'Product', ... |
f6299343538458384b9e83294260297bb13a82b5 | src/api.ts | src/api.ts | import * as stringify from "json-stringify-pretty-compact";
import { JSONKifuFormat } from "./shogiUtils";
export default class Api {
static fetchJKF() {
const begin = new Date();
return fetch('/jkf')
.then(response => response.json())
.then(json => {
const end = new Date();
conso... | import * as stringify from "json-stringify-pretty-compact";
import { JSONKifuFormat } from "./shogiUtils";
export default class Api {
static fetchJKF() {
const begin = new Date();
return fetch('/jkf')
.then(response => response.json())
.then(json => {
const end = new Date();
conso... | Add newline at end of file in JKF | Add newline at end of file in JKF
| TypeScript | mit | orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook | ---
+++
@@ -13,7 +13,7 @@
});
}
static storeJKF(jkf: JSONKifuFormat) {
- const body = stringify(jkf);
+ const body = stringify(jkf) + '\n'; // Add newline at end of file
function preserveFailedData(e: Error | Response) {
console.error(e); |
1d08fec807d09fb4fa4b96408aca19c742b71066 | src/app/components/pricing-card/pricing-card.ts | src/app/components/pricing-card/pricing-card.ts | import Vue from 'vue';
import { Component } from 'vue-property-decorator';
import { State } from 'vuex-class';
import View from '!view!./pricing-card.html?style=./pricing-card.styl';
import { Store } from '../../store/index';
import { currency } from '../../../lib/gj-lib-client/vue/filters/currency';
@View
@Component... | import Vue from 'vue';
import { Component } from 'vue-property-decorator';
import { State } from 'vuex-class';
import View from '!view!./pricing-card.html?style=./pricing-card.styl';
import { Store } from '../../store/index';
import { currency } from '../../../lib/gj-lib-client/vue/filters/currency';
@View
@Component... | Fix the pricing card discount percentage. | Fix the pricing card discount percentage.
It was showing 0% because it wasn't multplied by 100.
| TypeScript | mit | gamejolt/widgets,gamejolt/widgets,gamejolt/widgets | ---
+++
@@ -13,14 +13,19 @@
},
})
export class AppPricingCard extends Vue {
- @State sellable: Store['sellable'];
- @State price: Store['price'];
- @State originalPrice: Store['originalPrice'];
+ @State
+ sellable: Store['sellable'];
+
+ @State
+ price: Store['price'];
+
+ @State
+ originalPrice: Store['originalP... |
d63a17cd51246073be5b59e290b6dd1b4edcb515 | src/settings/ISetting.ts | src/settings/ISetting.ts | import { SettingType } from './SettingType';
export interface ISetting {
/** The id of this setting. */
id: string;
/** Type of setting this is. */
type: SettingType;
/** What is the default value (allows a reset button). */
packageValue: any;
/** Will be the value of this setting. Should n... | import { SettingType } from './SettingType';
export interface ISetting {
/** The id of this setting. */
id: string;
/** Type of setting this is. */
type: SettingType;
/** What is the default value (allows a reset button). */
packageValue: any;
/** Will be the value of this setting. If nothi... | Add optional i18n placeholder setting to the settings | Add optional i18n placeholder setting to the settings
| TypeScript | mit | graywolf336/temporary-rocketlets-ts-definition,graywolf336/temporary-rocketlets-ts-definition | ---
+++
@@ -7,7 +7,7 @@
type: SettingType;
/** What is the default value (allows a reset button). */
packageValue: any;
- /** Will be the value of this setting. Should nothing be set here the "packageValue" will be used. */
+ /** Will be the value of this setting. If nothing is set here, then the... |
333990d1510f95b76f9659f13b524a31978523ef | src/api/applications/get.ts | src/api/applications/get.ts | import { RequestHandler } from 'express'
import * as get from './db'
export const one: RequestHandler = async (req, res) => {
const application = await get.one(req.params.id)
res.json(application)
}
export const all: RequestHandler = async (req, res) => {
const applications = await get.all()
res.json(applicat... | import { RequestHandler } from 'express'
import * as get from './db'
export const one: RequestHandler = async (req, res) => {
const application = await get.one(req.params.id)
application.key = ''
res.json(application)
}
export const all: RequestHandler = async (req, res) => {
const applications = await get.al... | Remove key from application DTO | Remove key from application DTO
| TypeScript | mit | the-concierge/concierge,the-concierge/concierge,the-concierge/concierge | ---
+++
@@ -3,10 +3,16 @@
export const one: RequestHandler = async (req, res) => {
const application = await get.one(req.params.id)
+ application.key = ''
res.json(application)
}
export const all: RequestHandler = async (req, res) => {
const applications = await get.all()
+
+ for (const app of appli... |
fa67c980a277de8c6194d67bcee0a2fec9739ef8 | applications/mail/src/app/components/sidebar/LocationAside.tsx | applications/mail/src/app/components/sidebar/LocationAside.tsx | import React from 'react';
import { Icon, classnames } from 'react-components';
import './RefreshRotation.scss';
interface Props {
unreadCount?: number;
active?: boolean;
refreshing?: boolean;
}
const LocationAside = ({ unreadCount, active = false, refreshing = false }: Props) => {
return (
<... | import React from 'react';
import { Icon, classnames } from 'react-components';
import { c, msgid } from 'ttag';
import './RefreshRotation.scss';
interface Props {
unreadCount?: number;
active?: boolean;
refreshing?: boolean;
}
const UNREAD_LIMIT = 999;
const LocationAside = ({ unreadCount, active = fal... | Update the unread counter to be limited at 999 | [MAILWEB-980] Update the unread counter to be limited at 999
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -1,5 +1,6 @@
import React from 'react';
import { Icon, classnames } from 'react-components';
+import { c, msgid } from 'ttag';
import './RefreshRotation.scss';
@@ -9,7 +10,12 @@
refreshing?: boolean;
}
+const UNREAD_LIMIT = 999;
+
const LocationAside = ({ unreadCount, active = false, refres... |
fd08ac356a47d3430ec9bc1f22b527984fd877ff | src/ng2-restangular-http.ts | src/ng2-restangular-http.ts | import {Injectable} from '@angular/core';
import {Http, Request} from '@angular/http';
import {Observable} from 'rxjs';
import {RestangularHelper} from './ng2-restangular-helper';
@Injectable()
export class RestangularHttp {
constructor(public http: Http) {
}
createRequest(options) {
let requestOptio... | import {Injectable} from '@angular/core';
import {Http, Request} from '@angular/http';
import {Observable} from 'rxjs';
import {RestangularHelper} from './ng2-restangular-helper';
@Injectable()
export class RestangularHttp {
constructor(public http: Http) {
}
createRequest(options) {
let requestOptio... | Check error response before parsing | Check error response before parsing
| TypeScript | mit | 2muchcoffeecom/ngx-restangular,2muchcoffeecom/ngx-restangular,2muchcoffeecom/ng2-restangular,2muchcoffeecom/ng2-restangular | ---
+++
@@ -33,7 +33,7 @@
return response;
})
.catch(err => {
- err.data = typeof err._body == 'string' ? JSON.parse(err._body) : err._body;
+ err.data = typeof err._body == 'string' && err._body.length > 0 ? JSON.parse(err._body) : err._body;
err.request = request;
err.repeat... |
8c1584003341eefa95b6cdf940bcfb9cca206cea | src/Model.ts | src/Model.ts | import Day from './Day'
export default class Model {
private _checkInDate: Day
private _checkOutDate: Day
constructor(checkInDate: Day, checkOutDate: Day) {
if (checkOutDate.toMoment().isBefore(checkInDate.toMoment())) {
throw new Error(
`Check-out date can be before ch... | import Day from './Day'
export default class Model {
private _checkInDate: Day
private _checkOutDate: Day
constructor(checkInDate: Day, checkOutDate: Day) {
if (checkOutDate.toMoment().isBefore(checkInDate.toMoment())) {
throw new Error(
`Check-out date can't be before ... | Fix a mistake in an Error message | Fix a mistake in an Error message
| TypeScript | mit | ikr/react-period-of-stay-input,ikr/react-period-of-stay-input,ikr/react-period-of-stay-input | ---
+++
@@ -7,7 +7,7 @@
constructor(checkInDate: Day, checkOutDate: Day) {
if (checkOutDate.toMoment().isBefore(checkInDate.toMoment())) {
throw new Error(
- `Check-out date can be before check-in. Got ${checkInDate}, ${checkOutDate}`
+ `Check-out date can't be... |
7bbc1a971b70964e3c609ebd8a69e22564ebf4cc | Spa/NakedObjects.Spa/Scripts/nakedobjects.config.ts | Spa/NakedObjects.Spa/Scripts/nakedobjects.config.ts | // Copyright 2013-2014 Naked Objects Group Ltd
// Licensed under the Apache License, Version 2.0(the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in... | // Copyright 2013-2014 Naked Objects Group Ltd
// Licensed under the Apache License, Version 2.0(the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in... | Update spa to point at azure rest demo | Update spa to point at azure rest demo
| TypeScript | apache-2.0 | NakedObjectsGroup/NakedObjectsFramework,NakedObjectsGroup/NakedObjectsFramework,NakedObjectsGroup/NakedObjectsFramework,NakedObjectsGroup/NakedObjectsFramework | ---
+++
@@ -15,7 +15,7 @@
// custom configuration for a particular implementation
// path to Restful Objects server
- export var appPath = "http://mvc.nakedobjects.net:1081/RestDemo";
+ export var appPath = "http://nakedobjectsrodemo.azurewebsites.net";
// export var appPath = "http://localho... |
60595a002b439dda178bbec17289b02cf32db316 | src/icons.ts | src/icons.ts | import { TResponse, TResponseItem } from "./alfred/response";
import { getAllIconsObject, TIconObject } from "./assets/icons_object";
export const toResponseItem = (iconObject: TIconObject): TResponseItem => {
return {
title: iconObject.name,
subtitle: `Paste class name: fa-${iconObject.name}`,
arg: icon... | import { TResponse, TResponseItem } from "./alfred/response";
import { getAllIconsObject, TIconObject } from "./assets/icons_object";
export const toResponseItem = (iconObject: TIconObject): TResponseItem => {
const prefix = (style: TIconObject["style"]) => {
switch (style) {
case "brands":
return ... | Add style parameter to TResponseItem | feat(src): Add style parameter to TResponseItem
| TypeScript | mit | ruedap/alfred-font-awesome-workflow,ruedap/alfred-font-awesome-workflow,ruedap/alfred-font-awesome-workflow | ---
+++
@@ -2,12 +2,29 @@
import { getAllIconsObject, TIconObject } from "./assets/icons_object";
export const toResponseItem = (iconObject: TIconObject): TResponseItem => {
+ const prefix = (style: TIconObject["style"]) => {
+ switch (style) {
+ case "brands":
+ return "fab";
+ case "regular... |
8d9cf180e671d9e332afb2f3c4b04f4ddee6409a | packages/web-api/src/response/TeamProfileGetResponse.ts | packages/web-api/src/response/TeamProfileGetResponse.ts | /* eslint-disable */
/////////////////////////////////////////////////////////////////////////////////////////
// //
// !!! DO NOT EDIT THIS FILE !!! //
// ... | /* eslint-disable */
/////////////////////////////////////////////////////////////////////////////////////////
// //
// !!! DO NOT EDIT THIS FILE !!! //
// ... | Update the web-api response types using the latest source | Update the web-api response types using the latest source
| TypeScript | mit | slackapi/node-slack-sdk,slackapi/node-slack-sdk,slackapi/node-slack-sdk,slackapi/node-slack-sdk | ---
+++
@@ -23,13 +23,14 @@
}
export interface Field {
- id?: string;
- ordering?: number;
- field_name?: string;
- label?: string;
- hint?: string;
- type?: string;
- is_hidden?: boolean;
+ id?: string;
+ ordering?: number;
+ field_name?: string;
+ ... |
afa242e9c03e609d5e9a5c53caffbfe7e60d1848 | src/store.ts | src/store.ts | import {applyMiddleware, createStore} from 'redux'
import flowRight from 'lodash-es/flowRight'
import * as firebase from 'firebase/app'
import {reducer} from './reducer'
import {reactReduxFirebase} from 'react-redux-firebase'
const middlewares = []
// Redux-logger plugin
if (process.env.NODE_ENV === 'development') {
... | import {applyMiddleware, createStore} from 'redux'
import flowRight from 'lodash-es/flowRight'
import * as firebase from 'firebase/app'
import {reducer} from './reducer'
import {reactReduxFirebase} from 'react-redux-firebase'
const middlewares = []
// Redux-logger plugin
if (process.env.NODE_ENV === 'development') {
... | Disable firebase logging on production | Disable firebase logging on production
| TypeScript | mit | jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend | ---
+++
@@ -18,7 +18,7 @@
// Firebase plugin
const firebaseConfig = {
- enableLogging: true,
+ enableLogging: process.env.NODE_ENV === 'development',
userProfile: 'users'
}
|
a20600e20aed6cf4d7ef2ade188bfe615c8b8c74 | src/index.ts | src/index.ts | export {default as Size} from './size'
export {default as Point} from './point'
export {default as Scale} from './scale'
export {default as Rectangle, Rectangular } from './rectangle'
export {default as Borders} from './borders'
export {default as BorderedRectangle} from './bordered-rectangle'
| export {default as BorderedRectangle} from './bordered-rectangle'
export {default as Borders} from './borders'
export {default as Rectangle, Rectangular } from './rectangle'
export {default as Scale} from './scale'
export {default as Point} from './point'
export {default as Size} from './size'
| Reorder exports to fix inheritance bug | Reorder exports to fix inheritance bug
| TypeScript | mit | romancow/ts-geometry,romancow/ts-geometry | ---
+++
@@ -1,6 +1,6 @@
+export {default as BorderedRectangle} from './bordered-rectangle'
+export {default as Borders} from './borders'
+export {default as Rectangle, Rectangular } from './rectangle'
+export {default as Scale} from './scale'
+export {default as Point} from './point'
export {default as Size} from '.... |
2fd0ce9e2e049ab165a1fa016b54cb1f75db23c0 | src/queue.ts | src/queue.ts | class Queue {
private _running = false;
private _queue: Function[] = [];
public push(f: Function) {
this._queue.push(f);
if (!this._running) {
// if nothing is running, then start the engines!
this._next();
}
return this; // for chaining fun!
}
private _next() {
this._runn... | class Queue {
private _running = false;
private _queue: Function[] = [];
public push(f: Function) {
this._queue.push(f);
if (!this._running) {
// if nothing is running, then start the engines!
this._next();
}
return this; // for chaining fun!
}
private _next() {
this._runn... | Switch 'resolve' and 'reject' declaration + context binding in then | Switch 'resolve' and 'reject' declaration + context binding in then
| TypeScript | apache-2.0 | KamiKillertO/vscode-colorize,KamiKillertO/vscode-colorize | ---
+++
@@ -20,7 +20,7 @@
let action = this._queue.shift();
if (action) {
this._running = true;
- new Promise((reject, resolve) => action(resolve)).then(this._next)
+ new Promise((resolve, reject) => action(resolve)).then(this._next.bind(this));
// action(() => {
// this._ne... |
d7c68a6853b87e4e453835830e5fee4d17833645 | server/util/credentials.ts | server/util/credentials.ts | /* Copyright 2019 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | /* Copyright 2019 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | Fix type of fetched creds. - The framework has no idea what are in the creds file. | Fix type of fetched creds.
- The framework has no idea what are in the creds file.
| TypeScript | apache-2.0 | google/chicago-brick,google/chicago-brick,google/chicago-brick,google/chicago-brick | ---
+++
@@ -15,7 +15,7 @@
import * as path from "https://deno.land/std@0.132.0/path/mod.ts";
-const creds: Record<string, string> = {};
+const creds: Record<string, unknown> = {};
export function get(name: string) {
return creds[name]; |
e1239b6c5a7cdb8f34751971d0c7b8b3e64870e2 | packages/web-client/app/utils/web3-strategies/ethereum.ts | packages/web-client/app/utils/web3-strategies/ethereum.ts | import { tracked } from '@glimmer/tracking';
import { Layer1Web3Strategy, TransactionHash } from './types';
import BN from 'bn.js';
import { WalletProvider } from '../wallet-providers';
import { defer } from 'rsvp';
import { TransactionReceipt } from 'web3-core';
import { getConstantByNetwork } from '@cardstack/cardpay... | import Layer1ChainWeb3Strategy from './layer1-chain';
export default class EthereumWeb3Strategy extends Layer1ChainWeb3Strategy {
constructor() {
super('mainnet', 'Ethereum mainnet');
}
}
| Update Ethereum strategy to extend Layer1Chain | Update Ethereum strategy to extend Layer1Chain
We haven’t actually exercised this…?
| TypeScript | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | ---
+++
@@ -1,63 +1,7 @@
-import { tracked } from '@glimmer/tracking';
-import { Layer1Web3Strategy, TransactionHash } from './types';
-import BN from 'bn.js';
-import { WalletProvider } from '../wallet-providers';
-import { defer } from 'rsvp';
-import { TransactionReceipt } from 'web3-core';
-import { getConstantBy... |
4029e7156141d2e0496738594e770c36ca4e615b | lib/utils.ts | lib/utils.ts | import {rtmClient, webClient} from './slack';
export class Deferred {
promise: Promise<any>;
private nativeReject: (...args: any[]) => any;
private nativeResolve: (...args: any[]) => any;
constructor() {
this.promise = new Promise((resolve, reject) => {
this.nativeReject = reject;
this.nativeResolve = res... | import {rtmClient, webClient} from './slack';
export class Deferred {
promise: Promise<any>;
private nativeReject: (...args: any[]) => any;
private nativeResolve: (...args: any[]) => any;
constructor() {
this.promise = new Promise((resolve, reject) => {
this.nativeReject = reject;
this.nativeResolve = res... | Support for newcomers in getMemberName | Support for newcomers in getMemberName
| TypeScript | mit | tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot,tsg-ut/slackbot | ---
+++
@@ -25,13 +25,23 @@
webClient.users.list().then(({members}: any) => {
loadMembersDeferred.resolve(members);
});
+const additionalMembers: any[] = [];
+rtmClient.on('team_join', (event) => {
+ additionalMembers.push(event.user);
+});
export const getMemberName = async (user: string) => {
- const members =... |
8ade355abf632c3928ca3fd595505d36c257583a | infr_tests.ts | infr_tests.ts | import { sslTest, dnssec, headers } from './infr';
import * as assert from 'assert';
export async function testSslPositive() {
const result = await sslTest({ host: 'google.com' });
assert.equal(result.endpoints.length, 2);
assert.equal(result.endpoints[0].grade, 'A');
assert.equal(result.endpoints[1].... | import { sslTest, dnssec, headers } from './infr';
import * as assert from 'assert';
export async function testSslPositive() {
const result = await sslTest({ host: 'google.com' });
assert.equal(result.endpoints.length, 2);
assert.equal(result.endpoints[0].grade, 'A');
assert.equal(result.endpoints[1].... | Fix type error on AssertionError constructor | Fix type error on AssertionError constructor
| TypeScript | apache-2.0 | wiktor-k/infrastructure-tests | ---
+++
@@ -25,7 +25,9 @@
const result = await headers({ url: 'https://securityheaders.io' });
const sts = result.get('strict-transport-security');
if (!sts) {
- throw new assert.AssertionError('STS header should be set.');
+ throw new assert.AssertionError({
+ message: 'STS he... |
0d8ad4f4065a348a001df639de161aba78d8ccd1 | src/definitions/Handler.ts | src/definitions/Handler.ts | import {Context} from "./SkillContext";
let Frames = require("../definitions/FrameDirectory");
namespace Handlers {
export class FrameDirectory {
constructor() {
}
get(prop): Frame | undefined {
console.log(`Fetching frame ${prop}, ${prop in this ? "found" : "not found"}.`);
... | import {Context} from "./SkillContext";
let Frames = require("../definitions/FrameDirectory");
namespace Handlers {
export class FrameDirectory {
constructor() {
}
get(prop): Frame | undefined {
console.log(`Fetching frame ${prop}, ${prop in this ? "found" : "not found"}.`);
... | Throw error if attempting to add duplicate frame. | Throw error if attempting to add duplicate frame.
| TypeScript | agpl-3.0 | deegles/cookietime,deegles/cookietime | ---
+++
@@ -13,7 +13,12 @@
}
set(prop, value): boolean {
- console.log(`setting frame ${prop}, ${prop in this ? "overwritten" : "new frame"}.`);
+ console.log(`setting frame ${prop}`);
+
+ if (prop in this) {
+ throw new Error(`Error, frame ${prop} a... |
4ca67ab4633d4b316333a10246d041fd22b969bc | src/EDLog/ContinousReadStream.ts | src/EDLog/ContinousReadStream.ts | import { Readable, ReadableOptions } from 'stream';
import * as fs from 'fs';
export class ContinuesReadStream extends Readable {
private closed = false;
private offset = 0;
private file: number;
private poll: NodeJS.Timer;
private buffer: Buffer;
constructor (private fileName: string, opts?: R... | import { Readable, ReadableOptions } from 'stream';
import * as fs from 'fs';
export class ContinuesReadStream extends Readable {
private closed = false;
private offset = 0;
private file: number;
private poll: NodeJS.Timer;
private buffer: Buffer;
constructor (public readonly fileName: string, ... | Make some properties accessible, allow injection of poll interval | Make some properties accessible, allow injection of poll interval
| TypeScript | mit | SimonSchick/EliteDangerousUtils | ---
+++
@@ -7,7 +7,7 @@
private file: number;
private poll: NodeJS.Timer;
private buffer: Buffer;
- constructor (private fileName: string, opts?: ReadableOptions) {
+ constructor (public readonly fileName: string, opts?: ReadableOptions, public readonly pollInterval: number = 100) {
supe... |
95450b68ef3a6ee9763e84794b86604375a887fe | jovo-integrations/jovo-db-cosmosdb/src/CosmosDb.ts | jovo-integrations/jovo-db-cosmosdb/src/CosmosDb.ts | import {BaseApp} from 'jovo-core';
import {MongoDb, Config} from 'jovo-db-mongodb';
import _get = require('lodash.get');
export class CosmosDb extends MongoDb {
constructor(config?: Config) {
super(config);
}
install(app: BaseApp) {
if (_get(app.config, 'db.default')) {
if (_ge... | import {BaseApp} from 'jovo-core';
import {MongoDb, Config} from 'jovo-db-mongodb';
import _get = require('lodash.get');
export class CosmosDb extends MongoDb {
constructor(config?: Config) {
super(config);
}
async install(app: BaseApp) {
await super.install(app);
if (_get(app.conf... | Add super.install() call to initialize MongoClient | :bug: Add super.install() call to initialize MongoClient
In commit a1dcc99d7409e91d4dcec740639f9483e7195a20 a public MongoDb connection was introcuded which broke this integration. The super.install() fixes that issue
| TypeScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | ---
+++
@@ -7,7 +7,8 @@
super(config);
}
- install(app: BaseApp) {
+ async install(app: BaseApp) {
+ await super.install(app);
if (_get(app.config, 'db.default')) {
if (_get(app.config, 'db.default') === 'CosmosDb') {
app.$db = this; |
42700e2497ba60acf096569e0aa82524c94817bf | lib/Events.ts | lib/Events.ts | function call(target: any, type: string, listener: EventListener, standard: string, fallback: string): boolean {
let standardFn: any = target[standard];
let fallbackFn: any = target[fallback];
if (standardFn !== undefined) {
standardFn(type, listener);
return true;
} else if (fallbackFn... | function call(target: any, type: string, listener: EventListener, standard: string, fallback: string): boolean {
let standardFn: any = target[standard];
let fallbackFn: any = target[fallback];
if (typeof standardFn === 'function') {
standardFn.call(target, type, listener);
return true;
... | Correct event listener call context | Correct event listener call context
| TypeScript | unknown | michaelbull/zoom.ts,MikeBull94/zoom.ts,michaelbull/zoom.ts,MikeBull94/zoom.ts,MikeBull94/zoom.ts | ---
+++
@@ -2,11 +2,11 @@
let standardFn: any = target[standard];
let fallbackFn: any = target[fallback];
- if (standardFn !== undefined) {
- standardFn(type, listener);
+ if (typeof standardFn === 'function') {
+ standardFn.call(target, type, listener);
return true;
- } el... |
7e32f5a46c438ef946c36e572b9a9bc01b3cc63d | src/app/bucketlists/bucketlists.component.ts | src/app/bucketlists/bucketlists.component.ts | import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-bucketlists',
templateUrl: './bucketlists.component.html',
styleUrls: ['./bucketlists.component.css']
})
export class BucketlistsComponent implements OnInit {
constructor() {
console.log(localStorage.getItem('currentuser'))
... | import { Component, OnInit } from '@angular/core';
import { NgForm} from '@angular/forms';
import { AuthService} from '../services/auth.service';
import { Http, Response } from '@angular/http';
import { Router } from '@angular/router';
import { BucketlistsService } from '../services/bucketlists.service'
@Component({
... | Set console log to see whther bucketlists cn retrive tokenfrom localStorage | Set console log to see whther bucketlists cn retrive tokenfrom localStorage
| TypeScript | mit | emugaya/bucketlist_frontend,emugaya/bucketlist_frontend,emugaya/bucketlist_frontend | ---
+++
@@ -1,4 +1,10 @@
import { Component, OnInit } from '@angular/core';
+import { NgForm} from '@angular/forms';
+import { AuthService} from '../services/auth.service';
+import { Http, Response } from '@angular/http';
+import { Router } from '@angular/router';
+import { BucketlistsService } from '../services/buc... |
4695462cf532468595f236d25d85637b37630a4c | src/utils/addIcon.ts | src/utils/addIcon.ts | const faFontFamily = 'Font Awesome 5 Free';
export type FontAwesomeStyle = 'solid' | 'regular' | 'brands';
/**
* Add an icon into `sap.ui.core.IconPool`.
*
* @export
* @param {string} iconName Icon name.
* @param {string} unicode Icon unicode character.
* @param {FontAwesomeStyle} style Font Awesome icon style.... | const faFreeFontFamily = 'Font Awesome 5 Free';
const faBrandsFontFamily = 'Font Awesome 5 Brands';
export type FontAwesomeStyle = 'solid' | 'regular' | 'brands';
/**
* Add an icon into `sap.ui.core.IconPool`.
*
* @export
* @param {string} iconName Icon name.
* @param {string} unicode Icon unicode character.
* ... | Fix incorrect brands icon font | :bug: Fix incorrect brands icon font
| TypeScript | mit | gluons/font-awesome-openui5 | ---
+++
@@ -1,4 +1,5 @@
-const faFontFamily = 'Font Awesome 5 Free';
+const faFreeFontFamily = 'Font Awesome 5 Free';
+const faBrandsFontFamily = 'Font Awesome 5 Brands';
export type FontAwesomeStyle = 'solid' | 'regular' | 'brands';
@@ -15,7 +16,7 @@
iconName,
`font-awesome-${style}`,
{
- fontFamily:... |
f612fa625d91985257dd0acc4b2113993694deaa | packages/lesswrong/server/callbacks/sequenceCallbacks.ts | packages/lesswrong/server/callbacks/sequenceCallbacks.ts | import Chapters from '../../lib/collections/chapters/collection'
import Sequences, { makeEditableOptions } from '../../lib/collections/sequences/collection'
import { addEditableCallbacks } from '../editor/make_editable_callbacks';
import { getCollectionHooks } from '../mutationCallbacks';
getCollectionHooks("Sequences... | import Chapters from '../../lib/collections/chapters/collection'
import Sequences, { makeEditableOptions } from '../../lib/collections/sequences/collection'
import { addEditableCallbacks } from '../editor/make_editable_callbacks';
import { getCollectionHooks } from '../mutationCallbacks';
getCollectionHooks("Sequences... | Fix type error due to reference to resolver-only field chaptersDummy | Fix type error due to reference to resolver-only field chaptersDummy
This was attempting to check whether a sequence already had a chapter in
it. But it was inside a creation callback, so it never would. Also, it
was checking by looking at the name of a resolver, rather than a field,
so the access would always result ... | TypeScript | mit | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | ---
+++
@@ -4,7 +4,7 @@
import { getCollectionHooks } from '../mutationCallbacks';
getCollectionHooks("Sequences").newAsync.add(function SequenceNewCreateChapter(sequence) {
- if (sequence._id && !sequence.chaptersDummy) {
+ if (sequence._id) {
Chapters.insert({sequenceId:sequence._id})
}
}); |
d763f0bf594b2b7a8e618e2ae1d3f4ced173526c | tests/helpers/setup-pretender.ts | tests/helpers/setup-pretender.ts | import { TestContext } from 'ember-test-helpers';
import Pretender from 'pretender';
export default function setupPretender(hooks: NestedHooks) {
hooks.beforeEach(function(this: TestContext) {
this.server = new Pretender();
});
hooks.afterEach(function(this: TestContext) {
this.server.shutdown();
});
... | import { TestContext } from '@ember/test-helpers';
import Pretender from 'pretender';
export default function setupPretender(hooks: NestedHooks) {
hooks.beforeEach(function(this: TestContext) {
this.server = new Pretender();
});
hooks.afterEach(function(this: TestContext) {
this.server.shutdown();
});... | Fix test helpers import path | chore: Fix test helpers import path
| TypeScript | mit | mike-north/ember-api-actions,mike-north/ember-api-actions,truenorth/ember-api-actions,mike-north/ember-api-actions,truenorth/ember-api-actions,mike-north/ember-api-actions | ---
+++
@@ -1,4 +1,4 @@
-import { TestContext } from 'ember-test-helpers';
+import { TestContext } from '@ember/test-helpers';
import Pretender from 'pretender';
export default function setupPretender(hooks: NestedHooks) { |
c8c72182da705f9a0b813ef18f7735eef050bbf4 | src/lib/finalMetrics.ts | src/lib/finalMetrics.ts | /*
* Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | /*
* Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Add support for Set in place of WeakSet | Add support for Set in place of WeakSet
| TypeScript | apache-2.0 | GoogleChrome/web-vitals,GoogleChrome/web-vitals | ---
+++
@@ -16,5 +16,6 @@
import {Metric} from '../types.js';
-
-export const finalMetrics: WeakSet<Metric> = new WeakSet();
+export const finalMetrics: WeakSet<Metric>|Set<Metric> = 'WeakSet' in window
+ ? new WeakSet()
+ : new Set(); |
2b1eba6964df6cd7c915fe40db02159a6c375d8e | src/marketplace/resources/change-limits/ChangeLimitsAction.ts | src/marketplace/resources/change-limits/ChangeLimitsAction.ts | import { ngInjector } from '@waldur/core/services';
import { translate } from '@waldur/i18n';
import { marketplaceIsVisible } from '@waldur/marketplace/utils';
import { validateState } from '@waldur/resource/actions/base';
import { ResourceAction } from '@waldur/resource/actions/types';
export default function createA... | import { translate } from '@waldur/i18n';
import { marketplaceIsVisible } from '@waldur/marketplace/utils';
import { validateState } from '@waldur/resource/actions/base';
import { ResourceAction } from '@waldur/resource/actions/types';
export default function createAction(ctx): ResourceAction {
return {
name: 'u... | Enable Change limits action by default. | Enable Change limits action by default.
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -1,4 +1,3 @@
-import { ngInjector } from '@waldur/core/services';
import { translate } from '@waldur/i18n';
import { marketplaceIsVisible } from '@waldur/marketplace/utils';
import { validateState } from '@waldur/resource/actions/base';
@@ -13,7 +12,7 @@
title: translate('Change limits'),
useR... |
962c475f7e36ce774f8fb3ff426218cdbf4182a1 | Wallet/OnlineWallet.Web.Core/ClientApp/actions/wallets.ts | Wallet/OnlineWallet.Web.Core/ClientApp/actions/wallets.ts | import { Dispatch } from "redux";
import { Actions } from "../constants/actions";
import { Wallet, walletService } from "walletApi";
import { createAction } from "redux-actions";
import { AlertsActions } from "./alerts";
export const loadWalletSuccess = createAction<Wallet[]>(Actions.loadWallets);
export function loa... | import { Dispatch } from "redux";
import { Actions } from "../constants/actions";
import { Wallet, walletService } from "walletApi";
import { createAction } from "redux-actions";
import { AlertsActions } from "./alerts";
export const loadWalletSuccess = createAction<Wallet[]>(Actions.loadWallets);
export function loa... | Fix error message in failed wallet api call. | Fix error message in failed wallet api call.
| TypeScript | mit | faddiv/budget-keeper,faddiv/budget-keeper,faddiv/budget-keeper,faddiv/budget-keeper | ---
+++
@@ -12,7 +12,7 @@
const wallets = await walletService.getAll();
dispatch(loadWalletSuccess(wallets));
} catch (error) {
- dispatch(AlertsActions.showAlert({type: "danger", message: error}));
+ dispatch(AlertsActions.showAlert({type: "danger", message: e... |
7851a3c0ada3a7034ca9988bcc2ef734b068d3ef | frontend/projects/admin/e2e/src/login/admin-login.e2e-spec.ts | frontend/projects/admin/e2e/src/login/admin-login.e2e-spec.ts | import { AdminLoginPage } from './admin-login.po';
describe('admin login page', () => {
const page = new AdminLoginPage();
let usernameInput;
let passwordInput;
beforeEach(async () => {
await page.navigateTo();
expect(await page.getTitleContent()).toBe('Admin Login');
usernameInput = page.getUs... | import { AdminLoginPage } from './admin-login.po';
describe('admin login page', () => {
const page = new AdminLoginPage();
let usernameInput;
let passwordInput;
beforeEach(async () => {
await page.navigateTo();
expect(await page.getTitleContent()).toBe('Admin Login');
usernameInput = page.getUs... | Add e2e login page scenario | Add e2e login page scenario
Ensures that the admin login page is not able to be accessed when the admin is already logged in.
| TypeScript | mit | drumonii/LeagueTrollBuild,drumonii/LeagueTrollBuild,drumonii/LeagueTrollBuild,drumonii/LeagueTrollBuild | ---
+++
@@ -44,6 +44,10 @@
await page.attemptLoginAdmin();
expect(await page.getCurrentUrl()).toBe('/');
+ // ensure login page is not accessible when already logged in
+ await page.navigateTo();
+ expect(await page.getCurrentUrl()).toBe('/');
+
await page.logoutAdmin();
e... |
3074d5ee04f6b3b9d2112164e649a121d3a42c88 | demo-shell-ng2/app/components/login/login.component.ts | demo-shell-ng2/app/components/login/login.component.ts | import {Component} from 'angular2/core';
import {Router, ROUTER_DIRECTIVES} from 'angular2/router';
import {FORM_DIRECTIVES, ControlGroup, FormBuilder, Validators} from 'angular2/common';
import {Authentication} from '../../services/authentication';
declare let componentHandler;
@Component({
selector: 'login-compo... | import {Component} from 'angular2/core';
import {Router, ROUTER_DIRECTIVES} from 'angular2/router';
import {FORM_DIRECTIVES, ControlGroup, FormBuilder, Validators} from 'angular2/common';
import {Authentication} from '../../services/authentication';
declare let componentHandler;
@Component({
selector: 'login-compo... | Fix redirect from Login dialog | Fix redirect from Login dialog
| TypeScript | apache-2.0 | Alfresco/alfresco-ng2-components,Alfresco/alfresco-ng2-components,Alfresco/alfresco-ng2-components,Alfresco/alfresco-ng2-components | ---
+++
@@ -37,7 +37,7 @@
}
this.auth.login('POST', value.username, value.password)
.subscribe(
- (token:any) => this.router.navigate(['Home']),
+ (token:any) => this.router.navigate(['Files']),
() => {
this.error = tru... |
3a1f81d73bc7a720b4f03083c8cb0c1d2beb8e6e | src/mollie.ts | src/mollie.ts | import createHttpClient from './create-http-client';
import createMollieApi from './create-mollie-api';
// Expose models
import * as ChargebackModel from './models/chargeback';
import * as CustomerModel from './models/customer';
import * as MandateModel from './models/mandate';
import * as MethodModel from './models/m... | import createHttpClient from './create-http-client';
import createMollieApi from './create-mollie-api';
// Expose models
import * as ChargebackModel from './models/chargeback';
import * as CustomerModel from './models/customer';
import * as MandateModel from './models/mandate';
import * as MethodModel from './models/me... | Change how models are exposed | Change how models are exposed
| TypeScript | bsd-3-clause | mollie/mollie-api-node,mollie/mollie-api-node,mollie/mollie-api-node | ---
+++
@@ -1,6 +1,5 @@
import createHttpClient from './create-http-client';
import createMollieApi from './create-mollie-api';
-
// Expose models
import * as ChargebackModel from './models/chargeback';
import * as CustomerModel from './models/customer';
@@ -21,15 +20,15 @@
const httpClient = createHttpClie... |
21fdbfc10cd1028cbaac23a0bfed23969f52813f | src/eds-ui/src/main/frontend/app/dsa/purposeAdd.dialog.ts | src/eds-ui/src/main/frontend/app/dsa/purposeAdd.dialog.ts | import {Component, Input} from "@angular/core";
import {Dsa} from "./models/Dsa";
import {DsaService} from "./dsa.service";
import {LoggerService} from "eds-common-js";
import {NgbModal, NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {DsaPurpose} from "./models/DsaPurpose";
@Component({
selector: 'ngbd-... | import {Component, Input} from "@angular/core";
import {Dsa} from "./models/Dsa";
import {DsaService} from "./dsa.service";
import {LoggerService} from "eds-common-js";
import {NgbModal, NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {DsaPurpose} from "./models/DsaPurpose";
@Component({
selector: 'ngbd-... | Fix scope issue when adding multiple purposes | Fix scope issue when adding multiple purposes
| TypeScript | apache-2.0 | endeavourhealth/EDS,endeavourhealth/EDS,endeavourhealth/EDS,endeavourhealth/EDS,endeavourhealth/EDS | ---
+++
@@ -20,23 +20,24 @@
@Input() resultData : DsaPurpose[];
title : string = '';
detail : string = '';
- newPurpose : DsaPurpose = new DsaPurpose();
constructor(public activeModal: NgbActiveModal,
private log:LoggerService) {}
Add() {
- this.newPurpose.tit... |
18658caefdb8bb45fd8fc329c5a6e15ab3798b49 | app/src/renderer/components/paper/paper-icon-button.tsx | app/src/renderer/components/paper/paper-icon-button.tsx | // Copyright (c) 2016 Vadim Macagon
// MIT License, see LICENSE file for full terms.
import * as React from 'react';
import { PolymerComponent } from './polymer';
/**
* React component that wraps a Polymer paper-icon-button custom element.
*/
export class PaperIconButtonComponent
extends PolymerComponent<
... | // Copyright (c) 2016 Vadim Macagon
// MIT License, see LICENSE file for full terms.
import * as React from 'react';
import { PolymerComponent } from './polymer';
import { omitOwnProps } from '../../../common/utils';
/**
* React component that wraps a Polymer paper-icon-button custom element.
*/
export class PaperI... | Make it easier to style PaperIconButtonComponent with CSS mixins | Make it easier to style PaperIconButtonComponent with CSS mixins
| TypeScript | mit | debugworkbench/hydragon,debugworkbench/hydragon,debugworkbench/hydragon | ---
+++
@@ -3,6 +3,7 @@
import * as React from 'react';
import { PolymerComponent } from './polymer';
+import { omitOwnProps } from '../../../common/utils';
/**
* React component that wraps a Polymer paper-icon-button custom element.
@@ -11,6 +12,24 @@
extends PolymerComponent<
Poly... |
dd1dfef513b70ab3156cb9b66856800efbc34252 | src/app/bestiary/bestiary-entry.model.ts | src/app/bestiary/bestiary-entry.model.ts | import { Die } from '../shared/die.model';
import { Data } from "../shared/data.interface";
export class BestiaryEntry implements Data<BestiaryEntry> {
constructor(
public ID:number|undefined = undefined,
public name:string="",
public description:string="",
public health:Die=new Die(),
public ini... | import { Die } from '../shared/die.model';
import { Data } from "../shared/data.interface";
export class BestiaryEntry implements Data<BestiaryEntry> {
constructor(
public ID:number|undefined = undefined,
public name:string="",
public description:string="",
public health:Die=new Die(),
public ini... | Fix bug where health was loaded as initiative. | Fix bug where health was loaded as initiative.
| TypeScript | mit | madigan/ncounter-ng2,madigan/ncounter-ng2,madigan/ncounter-ng2 | ---
+++
@@ -27,9 +27,9 @@
}
nameGeneratorID:number|undefined
}):BestiaryEntry {
- if(!raw.health) {
+ if(!raw.initiative) {
// Backwards compatibility in case the initiative wasn't defined.
- raw.health = { quantity: 1, sides: 20, modifier: 0};
+ raw.initiative = { quan... |
9c8c5705c9d71df44881d71cda3a41b351f2e3f7 | src/app/public/ts/permalink.component.ts | src/app/public/ts/permalink.component.ts | import { ActivatedRoute } from '@angular/router'
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Socket } from '../../../services/socketio.service';
import { Title } from '@angular/platform-browser';
import { TranslateService } from '@ngx-translate/core';
import { User } from '../../../services/u... | import { ActivatedRoute } from '@angular/router'
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Socket } from '../../../services/socketio.service';
import { Title } from '@angular/platform-browser';
import { TranslateService } from '@ngx-translate/core';
import { User } from '../../../services/u... | Define current msg as empty by default | Define current msg as empty by default | TypeScript | agpl-3.0 | V-Paranoiaque/Ellas-War,V-Paranoiaque/Ellas-War,V-Paranoiaque/Ellas-War,V-Paranoiaque/Ellas-War | ---
+++
@@ -16,6 +16,7 @@
constructor(private titleService: Title, public translate: TranslateService,
private socket: Socket, public user: User,
private route: ActivatedRoute) {
+ this.currentMsg = {};
}
ngOnInit() { |
60f57c203f65c9b25799ffaa21327042d5de2061 | web_client/app/models/mittens-chat/notification-signup.tsx | web_client/app/models/mittens-chat/notification-signup.tsx | import * as React from 'react';
import { Exchange } from "infrastructure/chat";
import { MittensChat } from "./mittens-chat";
import { Signup } from "components/signup/signup";
MittensChat.createGoal("notification-signup").exchanges = [
new Exchange(
[
"If you'd like me to remind you about upcoming electio... | import * as React from 'react';
import { Exchange } from "infrastructure/chat";
import { MittensChat } from "./mittens-chat";
import { Signup } from "components/signup/signup";
MittensChat.createGoal("notification-signup").exchanges = [
new Exchange(
[
"If you'd like to stay in touch, let me know your emai... | Remove commitment to send email reminders | Remove commitment to send email reminders
| TypeScript | mit | citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement,citizenlabsgr/voter-engagement | ---
+++
@@ -6,7 +6,7 @@
MittensChat.createGoal("notification-signup").exchanges = [
new Exchange(
[
- "If you'd like me to remind you about upcoming elections, let me know your email address (I'll keep it secret and safe!)"
+ "If you'd like to stay in touch, let me know your email address (I'll kee... |
7d70e0b4062d2d2ca0423fe80ea1bf3cdd8da4e1 | packages/components/containers/general/ShortcutsSection.tsx | packages/components/containers/general/ShortcutsSection.tsx | import React, { useState, useEffect } from 'react';
import { c } from 'ttag';
import { Row, Label, Field, SmallButton } from '../../components';
import { useMailSettings } from '../../hooks';
import ShortcutsToggle from './ShortcutsToggle';
interface Props {
onOpenShortcutsModal: () => void;
}
const ShortcutsSe... | import React, { useState, useEffect } from 'react';
import { c } from 'ttag';
import { Row, Label, Field, SmallButton } from '../../components';
import { useMailSettings } from '../../hooks';
import ShortcutsToggle from './ShortcutsToggle';
interface Props {
onOpenShortcutsModal: () => void;
}
const ShortcutsSe... | Use the same message to open the shortcut modal | Use the same message to open the shortcut modal
INside ShortcutsSection.tsx and SupportDropdown.tsx
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -29,7 +29,7 @@
<ShortcutsToggle className="mr1" id="hotkeysToggle" hotkeys={hotkeys} onChange={handleChange} />
</div>
<div className="mt1">
- <SmallButton onClick={onOpenShortcutsModal}>{c('Action').t`View keyboard shortcuts`}</Smal... |
ce524feee0be9dd2b312e5efae5f0509e065075b | src/app/app.routes.ts | src/app/app.routes.ts | import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home';
import { AboutComponent } from './about';
import { NoContentComponent } from './no-content';
import { DataResolver } from './app.resolver';
import { StressComponent } from "./stress/stress.component";
export const ROUTES:... | import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home';
import { AboutComponent } from './about';
import { NoContentComponent } from './no-content';
import { DataResolver } from './app.resolver';
import { StressComponent } from "./stress/stress.component";
export const ROUTES:... | Change default route to stress | Change default route to stress
| TypeScript | mit | jacobjojan/angular2-webpack-starter,HipsterZipster/angular2-webpack-starter,jacobjojan/angular2-webpack-starter,HipsterZipster/angular2-webpack-starter,jacobjojan/angular2-webpack-starter,HipsterZipster/angular2-webpack-starter | ---
+++
@@ -8,7 +8,7 @@
export const ROUTES: Routes = [
- { path: '', component: HomeComponent },
+ { path: '', component: StressComponent },
{ path: 'home', component: HomeComponent },
{ path: 'about', component: AboutComponent },
{ path: 'stress', component: StressComponent }, |
d966e1d712fb365122b6036dd7af3a444355e5ab | src/menu/bookmarks/components/TreeBar/Item/styles.ts | src/menu/bookmarks/components/TreeBar/Item/styles.ts | import styled from 'styled-components';
import opacity from '../../../../../shared/defaults/opacity';
import typography from '../../../../../shared/mixins/typography';
import images from '../../../../../shared/mixins/images';
const homeIcon = require('../../../../../shared/icons/home.svg');
export interface RootProp... | import styled from 'styled-components';
import opacity from '../../../../../shared/defaults/opacity';
import typography from '../../../../../shared/mixins/typography';
import images from '../../../../../shared/mixins/images';
const homeIcon = require('../../../../../shared/icons/home.svg');
export interface RootProp... | Change TreeBar items text opacity to secondary | Change TreeBar items text opacity to secondary
| TypeScript | apache-2.0 | Nersent/Wexond,Nersent/Wexond | ---
+++
@@ -34,7 +34,7 @@
padding-left: 2px;
padding-right: 2px;
font-size: 14px;
- color: rgba(0, 0, 0, ${opacity.light.primaryText});
+ color: rgba(0, 0, 0, ${opacity.light.secondaryText});
${typography.robotoMedium()};
`; |
31a91116674231815624542b99d95cbe7a64ed32 | src/file/table/table-column.ts | src/file/table/table-column.ts | import { TableCell, VMergeType } from "./table-cell";
export class TableColumn {
constructor(private readonly cells: TableCell[]) {}
public getCell(index: number): TableCell {
const cell = this.cells[index];
if (!cell) {
throw Error("Index out of bounds when trying to get cell on ... | import { TableCell, VMergeType } from "./table-cell";
export class TableColumn {
constructor(private readonly cells: TableCell[]) {}
public getCell(index: number): TableCell {
const cell = this.cells[index];
if (!cell) {
throw Error("Index out of bounds when trying to get cell on ... | Fix merging of 3+ cells vertically | Fix merging of 3+ cells vertically
| TypeScript | mit | dolanmiu/docx,dolanmiu/docx,dolanmiu/docx | ---
+++
@@ -15,7 +15,10 @@
public mergeCells(startIndex: number, endIndex: number): TableCell {
this.cells[startIndex].addVerticalMerge(VMergeType.RESTART);
- this.cells[endIndex].addVerticalMerge(VMergeType.CONTINUE);
+
+ for (let i = startIndex; i <= endIndex; i++) {
+ this.... |
0692edd2381159aa004995cfd973f4d6995170f8 | knockout.rx/knockout.rx.d.ts | knockout.rx/knockout.rx.d.ts | // Type definitions for knockout.rx 1.0
// Project: https://github.com/Igorbek/knockout.rx
// Definitions by: Igor Oleinikov <https://github.com/Igorbek>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../knockout/knockout.d.ts"/>
interface KnockoutSubscribableFunctions<T> {
toObs... | // Type definitions for knockout.rx 1.0
// Project: https://github.com/Igorbek/knockout.rx
// Definitions by: Igor Oleinikov <https://github.com/Igorbek>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../knockout/knockout.d.ts"/>
/// <reference path="../rx.js/rx.d.ts"/>
interface ... | Revert "Remove useless reference to RxJS" | Revert "Remove useless reference to RxJS"
This reverts commit dc4d81a6bda11013ce1e1752a53a8cf00606adfd.
| TypeScript | mit | davidsidlinger/DefinitelyTyped,bluong/DefinitelyTyped,progre/DefinitelyTyped,arusakov/DefinitelyTyped,jimthedev/DefinitelyTyped,onecentlin/DefinitelyTyped,jasonswearingen/DefinitelyTyped,lseguin42/DefinitelyTyped,rcchen/DefinitelyTyped,bkristensen/DefinitelyTyped,dydek/DefinitelyTyped,olivierlemasle/DefinitelyTyped,ash... | ---
+++
@@ -4,6 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../knockout/knockout.d.ts"/>
+/// <reference path="../rx.js/rx.d.ts"/>
interface KnockoutSubscribableFunctions<T> {
toObservable(event?: string): Rx.Observable<T>; |
f57dc9cee65483eac287ea1747893fff3aabec95 | src/frontend/redux/store.ts | src/frontend/redux/store.ts | import * as Redux from 'redux'
import {rootReducer, rootReducerMock} from './reducers'
declare global {
interface Window {
__REDUX_DEVTOOLS_EXTENSION__: Function
}
}
const configureStore = (): Redux.Store<any> => {
const devtools = window.__REDUX_DEVTOOLS_EXTENSION__
const _module = module as any
if (_... | import * as Redux from 'redux'
import {rootReducer} from './reducers'
// TODO: put back rootReducerMock
// import {rootReducer, rootReducerMock} from './reducers'
declare global {
interface Window {
__REDUX_DEVTOOLS_EXTENSION__: Function
}
}
const configureStore = (): Redux.Store<any> => {
const devtools = ... | Comment out rootReducerMock for now | Comment out rootReducerMock for now
| TypeScript | mit | devonzuegel/clarity,devonzuegel/clarity,devonzuegel/clarity,devonzuegel/clarity | ---
+++
@@ -1,5 +1,7 @@
import * as Redux from 'redux'
-import {rootReducer, rootReducerMock} from './reducers'
+import {rootReducer} from './reducers'
+// TODO: put back rootReducerMock
+// import {rootReducer, rootReducerMock} from './reducers'
declare global {
interface Window {
@@ -12,7 +14,7 @@
const _... |
0a1373b6ec1b008ab22f7deb4f56884039f3cd23 | test/index.ts | test/index.ts | import * as path from 'path';
import * as Mocha from 'mocha';
import * as glob from 'glob';
export function run(): Promise<void> {
// Create the mocha test
const mocha = new Mocha({
ui: 'tdd',
});
mocha.useColors(true);
const testsRoot = path.resolve(__dirname, '..');
return new Promise((c, e) => {
glob('*... | import * as path from 'path';
import * as Mocha from 'mocha';
import * as glob from 'glob';
export function run(): Promise<void> {
// Create the mocha test
const mocha = new Mocha({
ui: 'tdd',
color: true
});
const testsRoot = path.resolve(__dirname, '..');
return new Promise((c, e) => {
glob('**/**.test.... | Use new property to tell Mocha to use colors | Use new property to tell Mocha to use colors
| TypeScript | mit | DAXaholic/vscode-edifact | ---
+++
@@ -6,8 +6,8 @@
// Create the mocha test
const mocha = new Mocha({
ui: 'tdd',
+ color: true
});
- mocha.useColors(true);
const testsRoot = path.resolve(__dirname, '..');
|
ae422d6ffe5c83c0f87b7a15defd068c62b97940 | src/dev.pakl.ttvst/renderer/Pages/SettingsPage.ts | src/dev.pakl.ttvst/renderer/Pages/SettingsPage.ts | import Page from '../UI/Page';
import _ttvst from '../TTVST';
import * as riot from 'riot';
import SettingsMenu from '../../../../dist/dev.pakl.ttvst/renderer/UI/Settings/SettingsMenu';
import SettingsConfig from '../UI/Settings/SettingsConfiguration';
declare var TTVST: _ttvst;
class SettingsPage extends Page {
... | import Page from '../UI/Page';
import _ttvst from '../TTVST';
import * as riot from 'riot';
import SettingsMenu from '../../../../dist/dev.pakl.ttvst/renderer/UI/Settings/SettingsMenu';
import SettingsConfig from '../UI/Settings/SettingsConfiguration';
import { ISettingsSetProps } from '../UI/Settings/SettingsConfigu... | Allow for settings to be added | Allow for settings to be added
| TypeScript | mit | PakL/TTVStreamerTool,PakL/TTVStreamerTool,PakL/TTVStreamerTool | ---
+++
@@ -5,15 +5,19 @@
import SettingsMenu from '../../../../dist/dev.pakl.ttvst/renderer/UI/Settings/SettingsMenu';
import SettingsConfig from '../UI/Settings/SettingsConfiguration';
+import { ISettingsSetProps } from '../UI/Settings/SettingsConfiguration';
declare var TTVST: _ttvst;
class SettingsPage ... |
da5c634880b1f077ac6b6b55a3a7e08324e2ac18 | src/elements/types/object.ts | src/elements/types/object.ts | import {Container} from '../../collections';
import {emit_object} from '../../helpers/emit-object';
import {ObjectMember} from '../members/object';
import {Type} from '../type';
// tslint:disable-next-line no-empty-interface
export interface IObjectTypeRequiredParameters {}
export interface IObjectTypeOptionalParamet... | import {Container} from '../../collections';
import {emit_object} from '../../helpers/emit-object';
import {ObjectMember} from '../members/object';
import {Type} from '../type';
export interface IObjectTypeRequiredParameters {
children: ObjectMember[];
}
// tslint:disable-next-line no-empty-interface
export interfa... | Update ObjectType children should be required parameter | Update ObjectType
children should be required parameter
| TypeScript | mit | ikatyang/dts-element,ikatyang/dts-element | ---
+++
@@ -3,19 +3,17 @@
import {ObjectMember} from '../members/object';
import {Type} from '../type';
-// tslint:disable-next-line no-empty-interface
-export interface IObjectTypeRequiredParameters {}
-
-export interface IObjectTypeOptionalParameters {
+export interface IObjectTypeRequiredParameters {
childr... |
399fe0fb1da41976e7e5120d52752ce5a81d8207 | src/Documents/Queries/HashCalculator.ts | src/Documents/Queries/HashCalculator.ts | import * as md5 from "md5";
import { TypeUtil } from "../../Utility/TypeUtil";
import { TypesAwareObjectMapper } from "../../Mapping/ObjectMapper";
export class HashCalculator {
private _buffers: Buffer[] = [];
public getHash(): string {
return md5(Buffer.concat(this._buffers));
}
//TBD 4.1 ... | import * as md5 from "md5";
import { TypeUtil } from "../../Utility/TypeUtil";
import { TypesAwareObjectMapper } from "../../Mapping/ObjectMapper";
const typeSignatures = {
bigint: Buffer.from([1]),
boolean: Buffer.from([2]),
function: Buffer.from([3]),
number: Buffer.from([4]),
object: Buffer.from... | Add type signatures to query hashes | Add type signatures to query hashes
| TypeScript | mit | ravendb/ravendb-nodejs-client,ravendb/ravendb-nodejs-client | ---
+++
@@ -1,6 +1,17 @@
import * as md5 from "md5";
import { TypeUtil } from "../../Utility/TypeUtil";
import { TypesAwareObjectMapper } from "../../Mapping/ObjectMapper";
+
+const typeSignatures = {
+ bigint: Buffer.from([1]),
+ boolean: Buffer.from([2]),
+ function: Buffer.from([3]),
+ number: Buffe... |
df1f5f3bbace7f54ef7f1172656d582d73523b29 | tests/intern-saucelabs.ts | tests/intern-saucelabs.ts | export * from './intern';
export const environments = [
{ browserName: 'internet explorer', version: [ '10.0', '11.0' ], platform: 'Windows 7' },
/* Having issues with Edge with Intern and SauceLabs */
// { browserName: 'MicrosoftEdge', platform: 'Windows 10' },
{ browserName: 'firefox', platform: 'Windows 10' },
... | export * from './intern';
export const environments = [
{ browserName: 'internet explorer', version: [ '10.0', '11.0' ], platform: 'Windows 7' },
/* Having issues with Edge with Intern and SauceLabs */
// { browserName: 'MicrosoftEdge', platform: 'Windows 10' },
// { browserName: 'firefox', platform: 'Windows 10' ... | Remove firefox from SauceLab tests | Remove firefox from SauceLab tests
| TypeScript | bsd-3-clause | edhager/widget-core,edhager/widget-core,edhager/widget-core,edhager/widget-core | ---
+++
@@ -4,7 +4,7 @@
{ browserName: 'internet explorer', version: [ '10.0', '11.0' ], platform: 'Windows 7' },
/* Having issues with Edge with Intern and SauceLabs */
// { browserName: 'MicrosoftEdge', platform: 'Windows 10' },
- { browserName: 'firefox', platform: 'Windows 10' },
+ // { browserName: 'firefo... |
f5084045f216c79702ad7124ae72a7144d014881 | public/app/features/dashboard/components/SaveModals/index.ts | public/app/features/dashboard/components/SaveModals/index.ts | export { SaveDashboardAsModalCtrl } from './SaveDashboardAsModalCtrl';
export { SaveDashboardModalCtrl } from './SaveDashboardModalCtrl';
| export { SaveDashboardAsModalCtrl } from './SaveDashboardAsModalCtrl';
export { SaveDashboardModalCtrl } from './SaveDashboardModalCtrl';
export { SaveProvisionedDashboardModalCtrl } from './SaveProvisionedDashboardModalCtrl';
| Fix save provisioned dashboard modal | Fix save provisioned dashboard modal
| TypeScript | agpl-3.0 | grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana | ---
+++
@@ -1,2 +1,3 @@
export { SaveDashboardAsModalCtrl } from './SaveDashboardAsModalCtrl';
export { SaveDashboardModalCtrl } from './SaveDashboardModalCtrl';
+export { SaveProvisionedDashboardModalCtrl } from './SaveProvisionedDashboardModalCtrl'; |
7de2659a424ca472388bc7169fb80b802a69c0c6 | src/config.ts | src/config.ts | import * as localForage from 'localforage';
import * as immutableTransform from 'redux-persist-transform-immutable';
import {
PERSISTED_STATE_WHITELIST,
IMMUTABLE_PERSISTED_STATE_WHITELIST
} from './constants/settings';
export const config = {
reduxPersistSettings: {
whitelist: PERSISTED_STATE_WHITE... | import * as localForage from 'localforage';
import * as immutableTransform from 'redux-persist-transform-immutable';
import {
PERSISTED_STATE_WHITELIST,
IMMUTABLE_PERSISTED_STATE_WHITELIST
} from './constants/settings';
import { compose } from 'redux';
export const config = {
reduxPersistSettings: {
... | Fix crash when redux devtools extension is not installed. | Fix crash when redux devtools extension is not installed.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -4,6 +4,7 @@
PERSISTED_STATE_WHITELIST,
IMMUTABLE_PERSISTED_STATE_WHITELIST
} from './constants/settings';
+import { compose } from 'redux';
export const config = {
reduxPersistSettings: {
@@ -22,9 +23,8 @@
err
)
: undefined,
- // tslint:disable:no-any
// tslin... |
a01b302530451b9cece38806e68b304a27c8f1b3 | src/index.tsx | src/index.tsx | import * as React from 'react';
import {
applyMiddleware,
createStore,
combineReducers,
compose,
} from 'redux';
import * as ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import thunkMiddleware from 'redux-thunk';
import * as ReactGA from 'react-ga';
import * as injectTapEventPlugin from 'r... | import * as React from 'react';
import {
applyMiddleware,
createStore,
combineReducers,
compose,
} from 'redux';
import * as ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import thunkMiddleware from 'redux-thunk';
import * as ReactGA from 'react-ga';
import * as injectTapEventPlugin from 'r... | Fix call to GA pageview | Fix call to GA pageview
| TypeScript | mit | fsahmad/tsuml-demo,fsahmad/tsuml-demo,fsahmad/tsuml-demo | ---
+++
@@ -10,9 +10,6 @@
import thunkMiddleware from 'redux-thunk';
import * as ReactGA from 'react-ga';
import * as injectTapEventPlugin from 'react-tap-event-plugin';
-
-// Initialize google analytics
-ReactGA.initialize('UA-101530055-1');
injectTapEventPlugin();
@@ -37,12 +34,15 @@
),
);
+// Initial... |
f5952435dd00a9906995b7426b2664f8c3da3729 | src/picturepark-sdk-v1-angular/projects/picturepark-sdk-v1-angular-ui/src/lib/features-module/language-switch/language-switch.component.ts | src/picturepark-sdk-v1-angular/projects/picturepark-sdk-v1-angular-ui/src/lib/features-module/language-switch/language-switch.component.ts | import { Component } from '@angular/core';
import { Language, LanguageService } from '@picturepark/sdk-v1-angular';
@Component({
selector: 'pp-language-switch',
templateUrl: './language-switch.component.html',
styleUrls: ['./language-switch.component.scss'],
})
export class LanguageSwitchComponent {
get langua... | import { Component } from '@angular/core';
import { Language, LanguageService } from '@picturepark/sdk-v1-angular';
import { TranslatePipe } from '../../shared-module/pipes/translate.pipe';
@Component({
selector: 'pp-language-switch',
templateUrl: './language-switch.component.html',
styleUrls: ['./language-switc... | Fix sort language switch items alphabethical. | PP9-11554: Fix sort language switch items alphabethical.
| TypeScript | mit | Picturepark/Picturepark.SDK.TypeScript,Picturepark/Picturepark.SDK.TypeScript,Picturepark/Picturepark.SDK.TypeScript | ---
+++
@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { Language, LanguageService } from '@picturepark/sdk-v1-angular';
+import { TranslatePipe } from '../../shared-module/pipes/translate.pipe';
@Component({
selector: 'pp-language-switch',
@@ -7,14 +8,17 @@
styleUrls: ['./language-switc... |
e9b20c800a3e2162bd96f323b073efb5606bb56e | app/scripts/modules/core/src/application/modal/PlatformHealthOverride.tsx | app/scripts/modules/core/src/application/modal/PlatformHealthOverride.tsx | import * as React from 'react';
import { isEqual } from 'lodash';
import { IServerGroupCommand } from 'core/serverGroup';
import { HelpField } from 'core/help/HelpField';
export interface IPlatformHealthOverrideProps {
command: IServerGroupCommand;
onChange: (healthProviderNames: string[]) => void;
platformHeal... | import * as React from 'react';
import { isEqual } from 'lodash';
import { IServerGroupCommand } from 'core/serverGroup';
import { HelpField } from 'core/help/HelpField';
export interface IPlatformHealthOverrideProps {
command: IServerGroupCommand;
onChange: (healthProviderNames: string[]) => void;
platformHeal... | Fix whitespace in platform health override | fix(core/deploy): Fix whitespace in platform health override
| TypeScript | apache-2.0 | spinnaker/deck,sgarlick987/deck,icfantv/deck,ajordens/deck,spinnaker/deck,duftler/deck,spinnaker/deck,icfantv/deck,icfantv/deck,duftler/deck,duftler/deck,ajordens/deck,ajordens/deck,sgarlick987/deck,sgarlick987/deck,spinnaker/deck,duftler/deck,icfantv/deck,ajordens/deck,sgarlick987/deck | ---
+++
@@ -27,7 +27,7 @@
onChange={this.clicked}
/>
Consider only {this.props.platformHealthType} health
- </label>
+ </label>{' '}
<HelpField id="application.platformHealthOnly" expand={this.props.showHelpDetails} />
</div>
); |
5ce9656a940207a8157c8cd2e6f9b72324777936 | src/Diploms.WebUI/ClientApp/app/auth/auth.module.ts | src/Diploms.WebUI/ClientApp/app/auth/auth.module.ts | import { NgModule, ModuleWithProviders } from '@angular/core';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { TokenInterceptor } from './interceptors/token.interceptor';
import { JwtHelper } from './helpers/jwt.helper';
import { TokenService } from './services/token.service';
import { AuthService } ... | import { NgModule, ModuleWithProviders } from '@angular/core';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { TokenInterceptor } from './interceptors/token.interceptor';
import { JwtHelper } from './helpers/jwt.helper';
import { TokenService } from './services/token.service';
import { AuthService } ... | Add AuthInfo and AuthGuard into the AuthModule | Add AuthInfo and AuthGuard into the AuthModule
| TypeScript | mit | denismaster/dcs,denismaster/dcs,denismaster/dcs,denismaster/dcs | ---
+++
@@ -5,6 +5,8 @@
import { TokenService } from './services/token.service';
import { AuthService } from './services/auth.service';
import { RefreshInterceptor } from './interceptors/refresh.interceptor';
+import { AuthInfoService } from './services/auth-info.service';
+import { AuthGuard } from './guards/auth... |
4c602ce5e28f27c1e8a2a46bf9b948359d71992b | packages/@sanity/base/src/client/index.ts | packages/@sanity/base/src/client/index.ts | import config from 'config:sanity'
import configureClient from 'part:@sanity/base/configure-client?'
import sanityClient from '@sanity/client'
const deprecationMessage = `[deprecation] The Sanity client is now exposed in CommonJS format.
For instance, change:
\`const client = require('part:@sanity/base/client').def... | import config from 'config:sanity'
import configureClient from 'part:@sanity/base/configure-client?'
import sanityClient, {SanityClient} from '@sanity/client'
const deprecationMessage = `[deprecation] The Sanity client is now exposed in CommonJS format.
For instance, change:
\`const client = require('part:@sanity/b... | Add ability to use experimental API version (localStorage flag) | [base] Add ability to use experimental API version (localStorage flag)
| TypeScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -1,6 +1,6 @@
import config from 'config:sanity'
import configureClient from 'part:@sanity/base/configure-client?'
-import sanityClient from '@sanity/client'
+import sanityClient, {SanityClient} from '@sanity/client'
const deprecationMessage = `[deprecation] The Sanity client is now exposed in CommonJS... |
3ce1b2c9856242c369d4a988f3d0d59159ff95ba | src/lib/ng-bootstrap-form-validation.module.ts | src/lib/ng-bootstrap-form-validation.module.ts | import { CommonModule } from "@angular/common";
import { NgModule, ModuleWithProviders } from "@angular/core";
import { FormValidationDirective } from "./Directives/form-validation.directive";
import { FormGroupComponent } from "./Components/form-group-component/form-group-component";
import { ErrorMessageService } fro... | import { CommonModule } from "@angular/common";
import { NgModule, ModuleWithProviders } from "@angular/core";
import { FormValidationDirective } from "./Directives/form-validation.directive";
import { FormGroupComponent } from "./Components/form-group-component/form-group-component";
import { ErrorMessageService } fro... | Use message from forRoot as muli-provider base | Use message from forRoot as muli-provider base
| TypeScript | mit | third774/ng-bootstrap-form-validation,third774/ng-bootstrap-form-validation,third774/ng-bootstrap-form-validation | ---
+++
@@ -13,14 +13,16 @@
exports: [FormValidationDirective, FormGroupComponent]
})
export class NgBootstrapFormValidationModule {
- static forRoot(): ModuleWithProviders {
+ static forRoot(
+ customErrorMessages: ErrorMessage[] = []
+ ): ModuleWithProviders {
return {
ngModule: NgBootstrapFo... |
4785f0158789d8fee2d5a2b06e2d81b46748cd70 | packages/schematics/angular/application/other-files/app.component.spec.ts | packages/schematics/angular/application/other-files/app.component.spec.ts | import { TestBed, async } from '@angular/core/testing';<% if (routing) { %>
import { RouterTestingModule } from '@angular/router/testing';<% } %>
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({<% if (routing) { %>
imp... | import { TestBed, async } from '@angular/core/testing';<% if (routing) { %>
import { RouterTestingModule } from '@angular/router/testing';<% } %>
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({<% if (routing) { %>
imp... | Fix broken unit test on new app | fix(@schematics/angular): Fix broken unit test on new app
| TypeScript | mit | hansl/devkit,hansl/devkit,hansl/devkit,hansl/devkit | ---
+++
@@ -26,6 +26,6 @@
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
- expect(compiled.querySelector('h1').textContent).toContain('Welcome to <%= prefix %>!');
+ expect(compiled.querySelector('h1').textConte... |
c4c9bf70c429fd5a22537691f841cfc5867db0b9 | tests/cases/fourslash/completionListOfUnion.ts | tests/cases/fourslash/completionListOfUnion.ts | /// <reference path='fourslash.ts' />
// @strictNullChecks: true
// Non-objects should be skipped, so `| number | null` should have no effect on completions.
////const x: { a: number, b: number } | { a: string, c: string } | { b: boolean } | number | null = { /*x*/ };
////interface I { a: number; }
////function f(..... | /// <reference path='fourslash.ts' />
// @strictNullChecks: true
// Primitives should be skipped, so `| number | null | undefined` should have no effect on completions.
////const x: { a: number, b: number } | { a: string, c: string } | { b: boolean } | number | null | undefined = { /*x*/ };
////interface I { a: numb... | Add `| undefined` to test | Add `| undefined` to test
| TypeScript | apache-2.0 | minestarks/TypeScript,alexeagle/TypeScript,nojvek/TypeScript,basarat/TypeScript,Microsoft/TypeScript,RyanCavanaugh/TypeScript,donaldpipowitch/TypeScript,mihailik/TypeScript,kitsonk/TypeScript,Eyas/TypeScript,nojvek/TypeScript,TukekeSoft/TypeScript,kpreisser/TypeScript,mihailik/TypeScript,chuckjaz/TypeScript,RyanCavanau... | ---
+++
@@ -2,8 +2,8 @@
// @strictNullChecks: true
-// Non-objects should be skipped, so `| number | null` should have no effect on completions.
-////const x: { a: number, b: number } | { a: string, c: string } | { b: boolean } | number | null = { /*x*/ };
+// Primitives should be skipped, so `| number | null | ... |
9070d68b069d930d9166efeb56cd53d0cfa539fb | src/index.ts | src/index.ts | import * as C from './combinators';
import * as T from './types/index';
import * as S from './seq';
import { Arbitrary } from './arbitrary';
import hold from './integrations/index';
import { property, TestResult, forAll, ForAll } from './property';
const namespace = Object.assign({}, C, T, {
seq: S,
forAll: fo... | import * as C from './combinators';
import * as T from './types/index';
import * as S from './seq';
import { Arbitrary } from './arbitrary';
import hold from './integrations/index';
import { property, TestResult, forAll, ForAll } from './property';
const namespace = Object.assign({}, C, T, {
seq: S,
forAll: fo... | Add ke.register to add a new type/library in ke namespace. | Add ke.register to add a new type/library in ke namespace.
Example:
```
$ ke.register('chance', ke.number.choose(0, 1).set('name', 'Chance'))
```
| TypeScript | mit | hychen/ke-e,hychen/ke-e | ---
+++
@@ -9,7 +9,14 @@
seq: S,
forAll: forAll,
property: property,
- hold: hold
+ hold: hold,
+ register: function register(name: string, module: Object) {
+ if (namespace.hasOwnProperty(name)) {
+ throw new Error(`${name} is registered.`);
+ }
+ namespace[nam... |
72d3f7de35b2639e7b1a1f0ceba97347850b3677 | DeadBaseSample/src/DeadBaseSample/TypeScriptSource/deadbase.ts | DeadBaseSample/src/DeadBaseSample/TypeScriptSource/deadbase.ts | import { bootstrap, Component } from 'angular2/angular2';
@Component({
selector: 'deadbase-app',
template: '<h1>{{title}}</h1><h2>{{venue}} Details!</h2>'
})
class DeadBaseAppComponent {
public title = "Deadbase - Grateful Dead Concert Archive";
public venue = "Filmore West";
}
bootstrap(DeadBaseAppC... | import { bootstrap, Component } from 'angular2/angular2';
class ConcertSet {
date: Date;
venue: string;
set: number;
}
@Component({
selector: 'deadbase-app',
template: '<h1>{{title}}</h1><h2>{{concert.date}} -- {{concert.venue}} Details!</h2>'
})
class DeadBaseAppComponent {
public title = "... | Create class for a concert set | Create class for a concert set
| TypeScript | mit | BillWagner/TypeScriptAngular2,BillWagner/TypeScriptAngular2,BillWagner/TypeScriptAngular2,BillWagner/TypeScriptAngular2 | ---
+++
@@ -1,12 +1,23 @@
import { bootstrap, Component } from 'angular2/angular2';
+
+class ConcertSet {
+ date: Date;
+ venue: string;
+ set: number;
+}
+
@Component({
selector: 'deadbase-app',
- template: '<h1>{{title}}</h1><h2>{{venue}} Details!</h2>'
+ template: '<h1>{{title}}</h1><h2>{{... |
092a5164043632802dfa56ec51b7c6658794fe5f | test/reducers/slides/actions/moveSlideDown-spec.ts | test/reducers/slides/actions/moveSlideDown-spec.ts | import { expect } from 'chai';
import { MOVE_SLIDE_DOWN } from '../../../../app/constants/slides.constants';
export default function(initialState: any, reducer: any, slide: any) {
const dummySlide1 = {
plugins: ['plugin1'],
state: {
backgroundColor: { r: 255, g: 255, b: 255, a: 100 },
transition:... | import { expect } from 'chai';
import { MOVE_SLIDE_DOWN } from '../../../../app/constants/slides.constants';
export default function(initialState: any, reducer: any, slide: any) {
const dummySlide1 = {
plugins: ['plugin1'],
state: {
backgroundColor: { r: 255, g: 255, b: 255, a: 100 },
transition:... | Update description of test case | refactor: Update description of test case
| TypeScript | mit | Team-CHAD/DevDecks,Team-CHAD/DevDecks,chengsieuly/devdecks,chengsieuly/devdecks,chengsieuly/devdecks,Team-CHAD/DevDecks,DevDecks/devdecks,DevDecks/devdecks,DevDecks/devdecks | ---
+++
@@ -14,17 +14,17 @@
};
describe('MOVE_SLIDE_DOWN', () => {
- it('should not move the slide when current selected slide is 0', () => {
+ const _initialState = [slide, dummySlide1];
+ it('should not move the slide when the first slide is selected', () => {
expect(
- reducer(initia... |
5fef998275aa6330b812a1e741bee0111981f2a5 | tests/__tests__/ts-coverage-async.spec.ts | tests/__tests__/ts-coverage-async.spec.ts | import runJest from '../__helpers__/runJest';
import * as fs from 'fs';
import * as path from 'path';
describe('hello_world', () => {
const snapshot =
`---------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
---------... | import runJest from '../__helpers__/runJest';
import * as fs from 'fs';
import * as path from 'path';
describe('hello_world', () => {
const snapshot =
`------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |... | Include JS file in coverage for `simple-async` test | Include JS file in coverage for `simple-async` test
| TypeScript | mit | kulshekhar/ts-jest,kulshekhar/ts-jest | ---
+++
@@ -4,14 +4,15 @@
describe('hello_world', () => {
const snapshot =
-`---------------|----------|----------|----------|----------|----------------|
-File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------------|----------|----------|----------|----------|----------------|... |
4ab1fc513569ec42869061828be1140fda570073 | app/components/signIn/signIn.ts | app/components/signIn/signIn.ts | import {Component} from 'angular2/core';
import {Router, ROUTER_DIRECTIVES} from 'angular2/router';
import { References } from '../../services/references';
@Component({
selector: 'home',
templateUrl: './components/signIn/signIn.html',
styleUrls: ['./components/signIn/signIn.css'],
directives: [ROUTER_DIRECTIVE... | import {Component} from 'angular2/core';
import {Router, ROUTER_DIRECTIVES} from 'angular2/router';
import { References } from '../../services/references';
@Component({
selector: 'home',
templateUrl: './components/signIn/signIn.html',
styleUrls: ['./components/signIn/signIn.css'],
directives: [ROUTER_DIRECTIVE... | Change set to update for user profile. | Change set to update for user profile.
| TypeScript | mit | misoukrane/did-or-wish,misoukrane/did-or-wish,misoukrane/did-or-wish | ---
+++
@@ -23,7 +23,7 @@
if (error) {
console.log(error);
} else {
- this.references.getUserRef().set({info: this.ref.getAuth()}, (err) => {
+ this.references.getUserRef().update({info: this.ref.getAuth()}, (err) => {
this.router.navigate(['/Dashboard']);
});
... |
2f740f4bc97e187e5415466435d7ed54494f027b | citrus-admin-client/src/js/components/design/test.action.component.ts | citrus-admin-client/src/js/components/design/test.action.component.ts | import {Component, Input, Output, EventEmitter} from 'angular2/core';
import {TestAction} from "../../model/tests";
@Component({
selector: "test-action",
template: `<div class="test-action" (click)="select()" (mouseenter)="focused = true" (mouseleave)="focused = false">
<i class="fa icon-{{action.... | import {Component, Input, Output, EventEmitter} from 'angular2/core';
import {NgSwitch} from "angular2/common";
import {TestAction} from "../../model/tests";
@Component({
selector: "test-action",
template: `<div class="test-action" (click)="select()" (mouseenter)="focused = true" (mouseleave)="focused = false... | Use action specific detail preview | Use action specific detail preview
| TypeScript | apache-2.0 | christophd/citrus-admin,christophd/citrus-admin,christophd/citrus-admin,christophd/citrus-admin | ---
+++
@@ -1,4 +1,5 @@
import {Component, Input, Output, EventEmitter} from 'angular2/core';
+import {NgSwitch} from "angular2/common";
import {TestAction} from "../../model/tests";
@Component({
@@ -11,10 +12,27 @@
<h3 class="panel-title">{{action.type}}</h3>
</div>
... |
60d8868306f3a1479cc16f00f52c1e8db714c465 | app/javascript/retrospring/features/answerbox/subscribe.ts | app/javascript/retrospring/features/answerbox/subscribe.ts | import Rails from '@rails/ujs';
import I18n from '../../../legacy/i18n';
import { showNotification, showErrorNotification } from 'utilities/notifications';
export function answerboxSubscribeHandler(event: Event): void {
const button = event.target as HTMLButtonElement;
const id = button.dataset.aId;
let torpedo... | import Rails from '@rails/ujs';
import I18n from '../../../legacy/i18n';
import { showNotification, showErrorNotification } from 'utilities/notifications';
export function answerboxSubscribeHandler(event: Event): void {
const button = event.target as HTMLButtonElement;
const id = button.dataset.aId;
let torpedo... | 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 | ---
+++
@@ -29,7 +29,7 @@
success: (data) => {
if (data.success) {
button.dataset.torpedo = ["yes", "no"][torpedo];
- button.children[0].nextSibling.textContent = torpedo ? I18n.translate('views.actions.unsubscribe') : I18n.translate('views.actions.subscribe');
+ button.children[0].... |
feeba12976632355f6a8300e6bbf873f7b98be56 | packages/lit-dev-server/src/middleware/tutorials-middleware.ts | packages/lit-dev-server/src/middleware/tutorials-middleware.ts | /**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
import type Koa from 'koa';
/**
* Koa Middleware to serve '/tutorials/view.html' from '/tutorials/*'.
*/
export const tutorialsMiddleware = (): Koa.Middleware => async (ctx, next) => {
const path = ctx.request.path;
/*
... | /**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
import type Koa from 'koa';
/**
* Koa Middleware to serve '/tutorials/view.html' from '/tutorials/*'.
*/
export const tutorialsMiddleware = (): Koa.Middleware => async (ctx, next) => {
const path = ctx.request.path;
// We... | Change comment format for tutorial middleware | Change comment format for tutorial middleware
| TypeScript | bsd-3-clause | lit/lit.dev,lit/lit.dev,lit/lit.dev | ---
+++
@@ -12,11 +12,9 @@
export const tutorialsMiddleware = (): Koa.Middleware => async (ctx, next) => {
const path = ctx.request.path;
- /*
- * We want to intercept /tutorials/* but not /tutorials/ itself or the place
- * where we are currently rendering the markdown to html so not
- * /tutorials/cont... |
f708ded77ee8933f424d95216d6cdea379032365 | src/vs/base/worker/workerMain.ts | src/vs/base/worker/workerMain.ts | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | Allow define queue to be consumed by loader before reacting to incoming worker messages | Allow define queue to be consumed by loader before reacting to incoming worker messages
| TypeScript | mit | rishii7/vscode,mjbvz/vscode,Krzysztof-Cieslak/vscode,stringham/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,mjbvz/vscode,the-ress/vscode,hungys/vscode,hashhar/vscode,microlv/vscode,veeramarni/vscode,hashhar/vscode,cleidigh/vscode,DustinCampbell/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,charlespierce/vscode,hun... | ---
+++
@@ -18,14 +18,16 @@
let loadCode = function(moduleId) {
require([moduleId], function(ws) {
- let messageHandler = ws.create((msg:any) => {
- (<any>self).postMessage(msg);
- }, null);
+ setTimeout(function() {
+ let messageHandler = ws.create((msg:any) => {
+ (<any>self).postMessage(msg)... |
fe830a3d4823493faff3d967fb989fee8b18204d | src/component/sidenav/sidenav.component.spec.ts | src/component/sidenav/sidenav.component.spec.ts | /*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
import { NO_ERRORS_SCHEMA } from '@angular/core';
i... | /*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
import { NO_ERRORS_SCHEMA } from '@angular/core';
i... | Add forRoot for test module injection | fix(DejaSidenav): Add forRoot for test module injection
| TypeScript | apache-2.0 | DSI-HUG/dejajs-components,DSI-HUG/dejajs-components,DSI-HUG/dejajs-components,DSI-HUG/dejajs-components | ---
+++
@@ -21,7 +21,7 @@
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
- DejaSidenavModule
+ DejaSidenavModule.forRoot(),
],
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents(); |
5b750b99297670aea575b24719a1181f3aa40ea9 | front_end/src/app/setup/setup.component.ts | front_end/src/app/setup/setup.component.ts | import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';
import { SetupService } from './setup.service';
import { RootService } from '../shared/services';
@Component({
selector: 'setup',
templateUrl: 'setup.component.html',
styleUrls: ['setup.component.scss'],
... | import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';
import { SetupService } from './setup.service';
import { RootService } from '../shared/services';
@Component({
selector: 'setup',
templateUrl: 'setup.component.html',
styleUrls: ['setup.component.scss'],
... | Fix how we are getting params. | Fix how we are getting params.
| TypeScript | bsd-2-clause | crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin,crdschurch/crds-signin-checkin | ---
+++
@@ -25,11 +25,12 @@
}
ngOnInit() {
- this.isError = this.route.snapshot.params['error'];
let machineGuid;
this.route.params.forEach((params: Params) => {
- machineGuid = params['machine'];
- });
+ this.isError = params['error'];
+ machineGuid = params['machine'];
+ ... |
12ccfab25a885a6c69685bb48dc783ecc358c86b | demo/router-components/echo.tsx | demo/router-components/echo.tsx | import app, { Component } from '../../index-jsx';
var model = 'world';
const Hello = ({name}) => <div>Hello: {name}</div>;
const view = (val) => {
return <div>
<Hello name={val}/>
<input value={val} oninput={function() { app.run('render', this.value)}}/>
</div>
};
const update = {
'#echo': (model, pus... | import app from '../../index-jsx';
var model = 'world';
const Hello = ({name}) => <div>Hello: {name}</div>;
const view = (val) => {
return <div>
<Hello name={val}/>
<input value={val} oninput={function() { app.run('render', this.value)}}/>
</div>
};
const update = {
'#echo': (model, pushState) => push... | Fix demo to use app.start instead of new Component | Fix demo to use app.start instead of new Component
| TypeScript | mit | yysun/apprun,yysun/apprun,yysun/apprun | ---
+++
@@ -1,4 +1,4 @@
-import app, { Component } from '../../index-jsx';
+import app from '../../index-jsx';
var model = 'world';
|
c64cf403bb255f3e3a72f341dae629ea41c5b812 | app/components/footer.tsx | app/components/footer.tsx | import dynamic from "next/dynamic";
import ExternalLink from "./externalLink";
const ShareButtons = dynamic(() => import("./shareButtons"));
export default function Footer() {
return (
<>
<style jsx={true}>{`
.footer_row {
display: flex;
flex-direction: row;
align-ite... | import dynamic from "next/dynamic";
import ExternalLink from "./externalLink";
import ShareButtons from "./shareButtons";
export default function Footer() {
return (
<>
<style jsx={true}>{`
.footer_row {
display: flex;
flex-direction: row;
align-items: stretch;
... | Remove delay load share buttons | Remove delay load share buttons
Big issues were coming up with this - I may need to remove the library completely
| TypeScript | apache-2.0 | thenickreynolds/popcorngif,thenickreynolds/popcorngif | ---
+++
@@ -1,7 +1,6 @@
import dynamic from "next/dynamic";
import ExternalLink from "./externalLink";
-
-const ShareButtons = dynamic(() => import("./shareButtons"));
+import ShareButtons from "./shareButtons";
export default function Footer() {
return ( |
13a223f761c4afa81fc8eaab2461221dc251a0ce | packages/formdata-event/ts_src/wrappers/wrap_constructor.ts | packages/formdata-event/ts_src/wrappers/wrap_constructor.ts | /**
* @license
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved. This
* code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt The complete set of authors may be
* found at http://polymer.github.io/AUTHORS.txt The complete set of
* contributors may b... | /**
* @license
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved. This
* code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt The complete set of authors may be
* found at http://polymer.github.io/AUTHORS.txt The complete set of
* contributors may b... | Use more specific types in `wrapConstructor` parameters. | Use more specific types in `wrapConstructor` parameters.
| TypeScript | bsd-3-clause | webcomponents/polyfills,webcomponents/polyfills,webcomponents/polyfills | ---
+++
@@ -9,7 +9,15 @@
* additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
-export const wrapConstructor = (Wrapper: any, Constructor: any, prototype: any) => {
+interface Constructor<T> extends Function {
+ new (...args: Array<any>): T;
+}
+
+export function wrapConstructor<T exten... |
97c23ff2ce61196f97191a4a72f315f726f4d218 | app/services/instagram.ts | app/services/instagram.ts | import {XHR} from '../libs/xhr';
export class InstagramClient {
endpoint: string;
protocol: string;
token: string;
xhr: XHR;
constructor() {
this.protocol = 'https://'
this.endpoint = 'api.instagram.com'
this.token = '31003280.5c1de8f.3e76027eeefe429ba5cc90f0e64ccda0' //For debugging only
... | import {XHR} from '../libs/xhr';
let ENDPOINT = 'api.instagram.com'
let API_VERSION = 'v1'
let ACCESS_TOKEN = '31003280.5c1de8f.3e76027eeefe429ba5cc90f0e64ccda0'
let CLIENT_ID = '5c1de8fe2653445489b480a72803a44c'
export class InstagramClient {
endpoint: string;
protocol: string;
token: string;
xhr: XHR;... | Move variable token outside class declaration | Move variable token outside class declaration
| TypeScript | mit | yadomi/lastagram,yadomi/lastagram,yadomi/lastagram | ---
+++
@@ -1,4 +1,10 @@
import {XHR} from '../libs/xhr';
+
+let ENDPOINT = 'api.instagram.com'
+let API_VERSION = 'v1'
+
+let ACCESS_TOKEN = '31003280.5c1de8f.3e76027eeefe429ba5cc90f0e64ccda0'
+let CLIENT_ID = '5c1de8fe2653445489b480a72803a44c'
export class InstagramClient {
@@ -10,10 +16,8 @@
constructor... |
6abfb5073d1dea53c55e1e2d0d2f37a5665f0fa6 | resources/assets/lib/home-links.ts | resources/assets/lib/home-links.ts | // 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 { route } from 'laroute';
export default function homeLinks(active: string) {
return [
{
active: active === 'home@index',
... | // 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 { route } from 'laroute';
export default function homeLinks(active: string) {
return [
{
active: active === 'home@index',
... | Use subtype that actually exists | Use subtype that actually exists
| TypeScript | agpl-3.0 | notbakaneko/osu-web,notbakaneko/osu-web,ppy/osu-web,nanaya/osu-web,nanaya/osu-web,ppy/osu-web,nanaya/osu-web,omkelderman/osu-web,nanaya/osu-web,omkelderman/osu-web,LiquidPL/osu-web,ppy/osu-web,notbakaneko/osu-web,LiquidPL/osu-web,LiquidPL/osu-web,notbakaneko/osu-web,ppy/osu-web,LiquidPL/osu-web,nanaya/osu-web,ppy/osu-w... | ---
+++
@@ -18,7 +18,7 @@
{
active: active === 'follows@index',
title: osu.trans('follows.index.title_compact'),
- url: route('follows.index', { subtype: 'comment' }),
+ url: route('follows.index', { subtype: 'forum_topic' }),
},
{
active: active === 'account@edit', |
b6eca5a50677143a650a8d538a9bffd7c22e3cb4 | app/static/components/application/application.ts | app/static/components/application/application.ts | import {Component} from "@angular/core";
@Component({
selector: 'application-component',
templateUrl: '/static/components/application/application.html',
styles: [
`#navbar_botom {margin-bottom: 0; border-radius: 0;}`,
`#buffer {height: 70px}`
]
})
export class ApplicationComponent {
}
| import {Component} from "@angular/core";
@Component({
selector: 'application-component',
templateUrl: '/static/components/application/application.html',
styles: [
`#navbar_botom {margin-bottom: 0; border-radius: 0; position: fixed; bottom: 0; left: 0; right: 0;}`,
`#buffer {height: 70px}`
... | Make navbar footer really stick to bottom | Make navbar footer really stick to bottom
| TypeScript | mit | pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise | ---
+++
@@ -3,7 +3,7 @@
selector: 'application-component',
templateUrl: '/static/components/application/application.html',
styles: [
- `#navbar_botom {margin-bottom: 0; border-radius: 0;}`,
+ `#navbar_botom {margin-bottom: 0; border-radius: 0; position: fixed; bottom: 0; left: 0; right: 0... |
414b0e94dbf38aaa7fd56943f610281e87052752 | src/main/ts/ephox/bridge/components/dialog/SelectBox.ts | src/main/ts/ephox/bridge/components/dialog/SelectBox.ts | import { ValueSchema, FieldSchema, FieldProcessorAdt } from '@ephox/boulder';
import { Result } from '@ephox/katamari';
import { FormComponentApi, FormComponent, formComponentFields } from './FormComponent';
export interface ExternalSelectBoxItem {
text: string;
value: string;
}
export interface SelectBoxApi exte... | import { ValueSchema, FieldSchema, FieldProcessorAdt } from '@ephox/boulder';
import { Result } from '@ephox/katamari';
import { FormComponentApi, FormComponent, formComponentFields } from './FormComponent';
export interface ExternalSelectBoxItem {
text: string;
value: string;
}
export interface SelectBoxApi exte... | Stop exporting the internal select box interface | Stop exporting the internal select box interface
| TypeScript | lgpl-2.1 | FernCreek/tinymce,FernCreek/tinymce,TeamupCom/tinymce,FernCreek/tinymce,tinymce/tinymce,tinymce/tinymce,tinymce/tinymce,TeamupCom/tinymce | ---
+++
@@ -13,7 +13,7 @@
size?: number;
}
-export interface InternalSelectBoxItem extends ExternalSelectBoxItem {
+interface InternalSelectBoxItem extends ExternalSelectBoxItem {
text: string;
value: string;
} |
6d60229e820c5069fa1477b91e12d1d7dea0a395 | static/main-hall/components/adventure-list.component.ts | static/main-hall/components/adventure-list.component.ts | import {Component, OnInit} from '@angular/core';
import {Router, ActivatedRoute} from '@angular/router';
import {Player} from '../models/player';
import {AdventureService} from '../services/adventure.service';
import {StatusComponent} from "../components/status.component";
import {PlayerService} from "../services/pla... | import {Component, OnInit} from '@angular/core';
import {Router, ActivatedRoute} from '@angular/router';
import {Player} from '../models/player';
import {AdventureService} from '../services/adventure.service';
import {StatusComponent} from "../components/status.component";
import {PlayerService} from "../services/pla... | Save player when leaving to go on an adventure | Save player when leaving to go on an adventure
| TypeScript | mit | kdechant/eamon,kdechant/eamon,kdechant/eamon,kdechant/eamon | ---
+++
@@ -5,12 +5,13 @@
import {AdventureService} from '../services/adventure.service';
import {StatusComponent} from "../components/status.component";
import {PlayerService} from "../services/player.service";
+import {Adventure} from "../models/adventure";
@Component({
template: `
<h4>Go on an adventur... |
7bec5d37ec99e7cf0b7fb9014be1c05ebf58c040 | test/runTest.ts | test/runTest.ts | import * as path from "path";
import { runTests } from "vscode-test";
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, "../../");
// The pat... | import {resolve} from "path";
import { downloadAndUnzipVSCode, runTests } from "vscode-test";
async function main() {
try {
const extensionDevelopmentPath = resolve(__dirname, "..", "..");
const extensionTestsPath = resolve(__dirname, "index");
const vscodeExecutablePath = await download... | Use insiders build for test suite | Use insiders build for test suite
| TypeScript | mit | ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters | ---
+++
@@ -1,25 +1,23 @@
-import * as path from "path";
+import {resolve} from "path";
-import { runTests } from "vscode-test";
+import { downloadAndUnzipVSCode, runTests } from "vscode-test";
async function main() {
try {
- // The folder containing the Extension Manifest package.json
- // Pa... |
ef09d62d60b3924e1493ea1c8b8fbaa26793750d | addon/components/o-s-s/tag.ts | addon/components/o-s-s/tag.ts | import Component from '@glimmer/component';
export type SkinType = 'primary' | 'success' | 'warning' | 'danger' | 'secondary';
type SkinDefType = {
[key in SkinType]: string;
};
const BASE_CLASS = 'upf-tag';
export const SkinDefinition: SkinDefType = {
primary: 'regular',
success: 'success',
warning: 'alert... | import Component from '@glimmer/component';
export type SkinType = 'primary' | 'success' | 'warning' | 'danger' | 'secondary';
type SkinDefType = {
[key in SkinType]: string;
};
const BASE_CLASS = 'upf-tag';
export const SkinDefinition: SkinDefType = {
primary: 'regular',
success: 'success',
warning: 'alert... | Update because of PR Review | Update because of PR Review
| TypeScript | mit | upfluence/oss-components,upfluence/oss-components,upfluence/oss-components,upfluence/oss-components | ---
+++
@@ -46,7 +46,7 @@
return this.args.hasEllipsis;
}
- get computedClass() {
+ get computedClass(): string {
let classes = [BASE_CLASS];
if (this.skin) { |
5cf0d4aee06ca1c1e5e38a9b1d1c69dcc22a166d | demo/demo_config.ts | demo/demo_config.ts | // The address of your Looker instance. Required.
export const lookerHost = 'self-signed.looker.com:9999'
// A dashboard that the user can see. Set to 0 to disable dashboard demo.
export const dashboardId = 1
// A Look that the user can see. Set to 0 to disable look demo.
export const lookId = 1
// An Explore that the... | // The address of your Looker instance. Required.
export const lookerHost = 'self-signed.looker.com:9999'
// A dashboard that the user can see. Set to 0 to disable dashboard demo.
export const dashboardId = 1
// A Look that the user can see. Set to 0 to disable look demo.
export const lookId = 1
// An Explore that the... | Use demo explore with users.state. | Use demo explore with users.state.
| TypeScript | mit | looker-open-source/embed-sdk,looker-open-source/embed-sdk,looker-open-source/embed-sdk,looker-open-source/embed-sdk | ---
+++
@@ -6,7 +6,7 @@
// A Look that the user can see. Set to 0 to disable look demo.
export const lookId = 1
// An Explore that the user can see. Set to '' to disable explore demo.
-export const exploreId = 'thelook::products'
+export const exploreId = 'thelook::orders'
// An Extension that the user can see. S... |
905f0d85bf0506f592a4de418cc7a230c3668832 | src/events/registry.ts | src/events/registry.ts | import { translate } from '@waldur/i18n';
import { EventGroup } from './types';
export class EventRegistry {
private groups = [];
private formatters = {};
registerGroup(group: EventGroup) {
this.groups.push(group);
for (const type of group.events) {
const defaultFormatter = (event) => {
l... | import { translate } from '@waldur/i18n';
import { EventGroup } from './types';
export class EventRegistry {
private groups = [];
private formatters = {};
registerGroup(group: EventGroup) {
this.groups.push(group);
for (const type of group.events) {
const defaultFormatter = (event) => {
l... | Fix event log rendering for offering permission event | Fix event log rendering for offering permission event [WAL-3764]
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -23,7 +23,7 @@
formatEvent(event) {
const formatter = this.formatters[event.event_type];
if (formatter) {
- return formatter(event.context);
+ return formatter(event.context) || event.message;
} else {
return event.message;
} |
6924ab35f330f9dc7a4518af8be70ae65e3ff37c | src/storage/CachedStorage.ts | src/storage/CachedStorage.ts | import bind from "bind-decorator";
import { Subscribable } from "event/Event";
import { SyncEvent } from "event/SyncEvent";
import { Storage } from "storage/Storage";
export class CachedStorage<T> implements Storage<T> {
private readonly _onChange = new SyncEvent<T | null>();
private readonly init: Promise<voi... | import bind from "bind-decorator";
import { Subscribable } from "event/Event";
import { SyncEvent } from "event/SyncEvent";
import { Storage } from "storage/Storage";
export class CachedStorage<T> implements Storage<T> {
private readonly _onChange = new SyncEvent<T | null>();
private cache: Readonly<T | null> ... | Initialize cache on first load rather than instantiation | Initialize cache on first load rather than instantiation
| TypeScript | mit | easyfuckingpeasy/chrome-reddit-comment-highlights,easyfuckingpeasy/chrome-reddit-comment-highlights | ---
+++
@@ -5,20 +5,14 @@
export class CachedStorage<T> implements Storage<T> {
private readonly _onChange = new SyncEvent<T | null>();
- private readonly init: Promise<void>;
private cache: Readonly<T | null> = null;
+ private initialized = false;
public constructor(
private readon... |
1faf756a1d926576e1276ef437545a9df609561b | client/app/accounts/components/register/register.component.ts | client/app/accounts/components/register/register.component.ts | import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Account } from '../../models';
import { AccountService } from '../../services';
@Component({
selector: 'app-register',
templateUrl: './register.component.html',
styleUrls: ['./register.component.scss']
})
export class ... | import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Account } from '../../models';
import { AccountService } from '../../services';
@Component({
selector: 'app-register',
templateUrl: './register.component.html',
styleUrls: ['./register.component.scss']
})
export class ... | Add specific error message for conflict | Add specific error message for conflict
| TypeScript | mit | fvilers/angular2-training,fvilers/angular2-training,fvilers/angular2-training | ---
+++
@@ -21,7 +21,16 @@
this.service
.register(this.account.email, this.account.password)
.then(() => this.router.navigate(['/']))
- .catch(() => this.errorMessage = `We're sorry, but an unexpected error occurred.`)
+ .catch(error => this.errorMessage = getErrorMessage(error.status))
... |
685782b4aba3b80e1f36ca5b918ea00c57a6da48 | lib/resources/tasks/process-less.ts | lib/resources/tasks/process-less.ts | import * as gulp from 'gulp';
import * as changedInPlace from 'gulp-changed-in-place';
import * as sourcemaps from 'gulp-sourcemaps';
import * as less from 'gulp-less';
import * as project from '../aurelia.json';
import {build} from 'aurelia-cli';
export default function processCSS() {
return gulp.src(project.cssPro... | import * as gulp from 'gulp';
import * as changedInPlace from 'gulp-changed-in-place';
import * as sourcemaps from 'gulp-sourcemaps';
import * as less from 'gulp-less';
import * as plumber from 'gulp-plumber';
import * as notify from 'gulp-notify';
import * as project from '../aurelia.json';
import {build} from 'aureli... | Stop breaking the stream when a less file doesn't compile by introducing plumber here as well. Also add better error logging through notify. | Stop breaking the stream when a less file doesn't compile by introducing plumber here as well. Also add better error logging through notify.
| TypeScript | mit | ghidello/cli,zewa666/cli,zewa666/cli,aurelia/cli,DrSammyD/cli,ghidello/cli,ghidello/cli,zewa666/cli,aurelia/cli,DrSammyD/cli,zewa666/cli,DrSammyD/cli | ---
+++
@@ -2,12 +2,15 @@
import * as changedInPlace from 'gulp-changed-in-place';
import * as sourcemaps from 'gulp-sourcemaps';
import * as less from 'gulp-less';
+import * as plumber from 'gulp-plumber';
+import * as notify from 'gulp-notify';
import * as project from '../aurelia.json';
import {build} from 'a... |
8d2ac8dbda1384b16f469e6e4ddb85ee5ad0ea64 | src/app/core/datastore/model/datastore-errors.ts | src/app/core/datastore/model/datastore-errors.ts | /**
* @author Daniel de Oliveira
*/
export class DatastoreErrors {
public static INVALID_DOCUMENT: string = 'idai-components-2/datastore/invaliddocument';
public static GENERIC_ERROR: string = 'idai-components-2/datastore/genericerror';
public static DOCUMENT_RESOURCE_ID_EXISTS: string = 'idai-components... | /**
* @author Daniel de Oliveira
*/
export class DatastoreErrors {
public static INVALID_DOCUMENT: string = 'datastore/invaliddocument';
public static GENERIC_ERROR: string = 'datastore/genericerror';
public static DOCUMENT_RESOURCE_ID_EXISTS: string = 'datastore/documentresourceidexists';
public sta... | Remove 'idai-components-2' from string values of DatastoreErrors | Remove 'idai-components-2' from string values of DatastoreErrors
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -3,11 +3,11 @@
*/
export class DatastoreErrors {
- public static INVALID_DOCUMENT: string = 'idai-components-2/datastore/invaliddocument';
- public static GENERIC_ERROR: string = 'idai-components-2/datastore/genericerror';
- public static DOCUMENT_RESOURCE_ID_EXISTS: string = 'idai-components... |
4c21d84c6cf6e2c898ba0e5f916b043dc1c1deb5 | src/image-sizes.ts | src/image-sizes.ts | export {}; // To get around: Cannot redeclare block-scoped variable 'mockLogger'.ts(2451)
/**
* Calculate the sizes to be used for resizing the image based on the current size
* @param {number} width - the width of the original image
* @return {ImageSize[]} - an array of up to 4 elements representing the size
* in... | export {}; // To get around: Cannot redeclare block-scoped variable 'mockLogger'.ts(2451)
/**
* Calculate the sizes to be used for resizing the image based on the current size
* @param width - the width of the original image
* @return - an array of up to 4 elements representing the size
* in each group
*/
const c... | Change calcSizes from function to arrow function | Change calcSizes from function to arrow function
| TypeScript | mit | guyellis/plant-image-lambda,guyellis/plant-image-lambda | ---
+++
@@ -2,11 +2,11 @@
/**
* Calculate the sizes to be used for resizing the image based on the current size
- * @param {number} width - the width of the original image
- * @return {ImageSize[]} - an array of up to 4 elements representing the size
+ * @param width - the width of the original image
+ * @return... |
a6104f9bdc6c076f6643e688e617913354013384 | src/client/web/components/PathwayDisplay/PrerequisiteBox/WorkExperienceBox.tsx | src/client/web/components/PathwayDisplay/PrerequisiteBox/WorkExperienceBox.tsx | import * as React from 'react'
import CombinationBox from '../CombinationBox'
import { WorkExperiencePrereq } from '../../../../../definitions/Prerequisites/WorkExperiencePrereq'
import inflect from '../../../../utils/inflect'
import { text } from '../../../../utils/text'
import { units } from '../../../../../data/com... | import * as React from 'react'
import CombinationBox from '../CombinationBox'
import { WorkExperiencePrereq } from '../../../../../definitions/Prerequisites/WorkExperiencePrereq'
import inflect from '../../../../utils/inflect'
import { text } from '../../../../utils/text'
import { units } from '../../../../../data/com... | Remove title that usually overlap with combination title | Remove title that usually overlap with combination title
Signed-off-by: Andy Shu <d9a5ae79e0620530e640970c782273ccd89702f2@gmail.com>
| TypeScript | agpl-3.0 | wikimigrate/wikimigrate,wikimigrate/wikimigrate,wikimigrate/wikimigrate,wikimigrate/wikimigrate | ---
+++
@@ -10,10 +10,6 @@
const WorkExperienceBox = (props: { prereq: WorkExperiencePrereq, lang: LangId }) => {
const prereq = props.prereq
const texts = {
- workExperiences: text({
- en: 'Work experience:',
- zh_hans: '工作经验:',
- }),
withinLast: text({
... |
ed6f9b2cb78eb18aab07807056a4d9841f1e4c3f | app/src/lib/open-shell.ts | app/src/lib/open-shell.ts | import { spawn } from 'child_process'
import { fatalError } from './fatal-error'
/** Opens a shell setting the working directory to fullpath. If a shell is not specified, OS defaults are used. */
export function openShell(fullPath: string, shell?: string) {
let commandName: string = ''
let commandArgs: ReadonlyArr... | import { spawn } from 'child_process'
import { fatalError } from './fatal-error'
/** Opens a shell setting the working directory to fullpath. If a shell is not specified, OS defaults are used. */
export function openShell(fullPath: string, shell?: string) {
let commandName: string = ''
let commandArgs: ReadonlyArr... | Use correct function to convert to an array | Use correct function to convert to an array
| TypeScript | mit | hjobrien/desktop,shiftkey/desktop,kactus-io/kactus,gengjiawen/desktop,kactus-io/kactus,shiftkey/desktop,hjobrien/desktop,BugTesterTest/desktops,hjobrien/desktop,say25/desktop,artivilla/desktop,hjobrien/desktop,desktop/desktop,desktop/desktop,j-f1/forked-desktop,say25/desktop,BugTesterTest/desktops,shiftkey/desktop,BugT... | ---
+++
@@ -18,5 +18,5 @@
return fatalError('Unsupported OS')
}
- return spawn(commandName, commandArgs.map(x => x), { 'shell' : true })
+ return spawn(commandName, Array.from(commandArgs), { 'shell' : true })
} |
4416d199e21a5207361e3311072c2dbefa9a3ed0 | packages/@sanity/form-builder/src/sanity/uploads/utils.ts | packages/@sanity/form-builder/src/sanity/uploads/utils.ts | import {UploadEvent} from './typedefs'
import {UPLOAD_STATUS_KEY} from './constants'
import {set, unset} from '../../utils/patches'
const UNSET_UPLOAD_PATCH = unset([UPLOAD_STATUS_KEY])
export function createUploadEvent(patches = []): UploadEvent {
return {
type: 'uploadEvent',
patches
}
}
export const C... | import {UploadEvent} from './typedefs'
import {UPLOAD_STATUS_KEY} from './constants'
import {set, unset, setIfMissing} from '../../utils/patches'
const UNSET_UPLOAD_PATCH = unset([UPLOAD_STATUS_KEY])
export function createUploadEvent(patches = []): UploadEvent {
return {
type: 'uploadEvent',
patches
}
}
... | Add setIfMissing patch to createInitialUploadEvent | [form-builder] Add setIfMissing patch to createInitialUploadEvent
If you have a nested object inside the PTE which you upload images to, there will be an error because the _upload key is not set yet.
| TypeScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -1,6 +1,6 @@
import {UploadEvent} from './typedefs'
import {UPLOAD_STATUS_KEY} from './constants'
-import {set, unset} from '../../utils/patches'
+import {set, unset, setIfMissing} from '../../utils/patches'
const UNSET_UPLOAD_PATCH = unset([UPLOAD_STATUS_KEY])
@@ -14,14 +14,13 @@
export const CLEA... |
53932ea12ea5e85a65c8e2db51cd7283a88947af | index.d.ts | index.d.ts | interface stringToObjConfig {
trim: Boolean;
delimiters: {
values: { [key: string]: any },
blackhole: string | Boolean,
};
}
declare module 'string-to-obj' {
class stringToObj {
constructor(config: stringToObjConfig);
}
namespace stringToObj {
function parse(input: string): { [key: string... | interface stringToObjConfig {
trim?: Boolean;
delimiters?: {
values?: { [key: string]: any },
blackhole?: string | Boolean,
};
}
declare module 'string-to-obj' {
class stringToObj {
constructor(config?: stringToObjConfig);
}
namespace stringToObj {
function parse(input: string): { [key: s... | Configure args to be optional in TypeScript | :wrench: Configure args to be optional in TypeScript
| TypeScript | mit | richmondwang/string-to-obj | ---
+++
@@ -1,15 +1,15 @@
interface stringToObjConfig {
- trim: Boolean;
- delimiters: {
- values: { [key: string]: any },
- blackhole: string | Boolean,
+ trim?: Boolean;
+ delimiters?: {
+ values?: { [key: string]: any },
+ blackhole?: string | Boolean,
};
}
declare module 'string-to-obj' {
... |
09fed824ad739f013cf7d0c3ab08a0f2dd889b9d | src/js/View/Components/AppAlerts/Index.tsx | src/js/View/Components/AppAlerts/Index.tsx | import * as React from 'react';
import { connect } from 'react-redux';
import AppAlert from './AppAlert';
interface IAppAlertsProps
{
appAlerts?: IAppAlert[];
};
class AppAlerts extends React.Component<IAppAlertsProps, any>
{
render()
{
return (
<div className="app-alert-container">
{this.pro... | import * as React from 'react';
import { connect } from 'react-redux';
import AppAlert from './AppAlert';
interface IAppAlertsProps
{
appAlerts?: IAppAlert[];
};
class AppAlerts extends React.Component<IAppAlertsProps, any>
{
render()
{
return (
<div className="app-alert-container">
{this.pro... | Fix @todo: AppAlerts connect wrapping | Fix @todo: AppAlerts connect wrapping
| TypeScript | mit | harksys/HawkEye,harksys/HawkEye,harksys/HawkEye | ---
+++
@@ -22,8 +22,8 @@
}
};
-export default connect(
+export default connect<{}, {}, IAppAlertsProps>(
(state: IState, props: IAppAlertsProps) => ({
appAlerts : state.appAlerts.alerts
})
-)(AppAlerts as any); // @todo: Fix this. It's complaining. :(
+)(AppAlerts); |
45aa575cfb01e8e056797073b29c80de035b5561 | APM-Start/src/app/products/product-edit/product-edit-info.component.ts | APM-Start/src/app/products/product-edit/product-edit-info.component.ts | import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { NgForm } from '@angular/forms';
import { Product } from '../product';
@Component({
templateUrl: './product-edit-info.component.html'
})
export class ProductEditInfoComponent implements OnInit {
... | import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { NgForm } from '@angular/forms';
import { Product } from '../product';
@Component({
templateUrl: './product-edit-info.component.html'
})
export class ProductEditInfoComponent implements OnInit {
... | Add description property to temporary data | Add description property to temporary data
| TypeScript | mit | DeborahK/Angular-Routing,DeborahK/Angular-Routing,DeborahK/Angular-Routing | ---
+++
@@ -11,7 +11,7 @@
@ViewChild(NgForm, {static: false}) productForm: NgForm;
errorMessage: string;
- product = { id: 1, productName: 'test', productCode: 'test' };
+ product = { id: 1, productName: 'test', productCode: 'test', description: 'test' };
constructor(private route: ActivatedRoute) { }
... |
0e2cf4bbec21fa03cada14d4efe87f00c5e680f4 | lib/components/src/blocks/ArgsTable/SectionRow.stories.tsx | lib/components/src/blocks/ArgsTable/SectionRow.stories.tsx | import React from 'react';
import { SectionRow } from './SectionRow';
import { TableWrapper } from './ArgsTable';
import { ResetWrapper } from '../../typography/DocumentFormatting';
export default {
component: SectionRow,
title: 'Docs/SectionRow',
decorators: [
(getStory) => (
<ResetWrapper>
<T... | import React from 'react';
import { SectionRow } from './SectionRow';
import { TableWrapper } from './ArgsTable';
import { ResetWrapper } from '../../typography/DocumentFormatting';
export default {
component: SectionRow,
title: 'Docs/SectionRow',
decorators: [
(getStory) => (
<ResetWrapper>
<T... | Fix bug in SectionRow story | Fix bug in SectionRow story
| TypeScript | mit | storybooks/storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook | ---
+++
@@ -32,7 +32,7 @@
<SectionRow {...Section.args}>
<SectionRow {...Subsection.args}>
<tr>
- <td>Some content</td>
+ <td colSpan={2}>Some content</td>
</tr>
</SectionRow>
</SectionRow> |
0a12b27bd19ef1342f3df9aa87d91a0e32b1e15a | src/components/Queue/QueueTable.tsx | src/components/Queue/QueueTable.tsx | import * as React from 'react';
import { SearchMap } from '../../types';
import { Card, ResourceList, FormLayout, Button } from '@shopify/polaris';
import EmptyQueue from './EmptyQueue';
import QueueItem from './QueueItem';
export interface Props {
readonly queue: SearchMap;
}
export interface Handlers {
... | import * as React from 'react';
import { SearchMap } from '../../types';
import { Card, ResourceList, Stack, Button } from '@shopify/polaris';
import EmptyQueue from './EmptyQueue';
import QueueItem from './QueueItem';
export interface Props {
readonly queue: SearchMap;
}
export interface Handlers {
re... | Refresh queue button is now a child of a Card. | Refresh queue button is now a child of a Card.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SearchMap } from '../../types';
-import { Card, ResourceList, FormLayout, Button } from '@shopify/polaris';
+import { Card, ResourceList, Stack, Button } from '@shopify/polaris';
import EmptyQueue from './EmptyQueue';
import QueueItem from './QueueI... |
60c167097f724c8e84e7afa923ef6673ec3cb36b | showcase/app/app.component.ts | showcase/app/app.component.ts | import {Component, ViewEncapsulation} from '@angular/core';
import {MenuItem} from 'primeng/primeng';
import {SiteBrowserState} from "../../core/util/site-browser.state";
import {SettingsService} from "../services/settings.services";
var prismjs = require('../assets/js/prism');
@Component({
selector: 'my-app',
... | import {Component, ViewEncapsulation} from '@angular/core';
import {MenuItem} from 'primeng/primeng';
import {SiteBrowserState} from "../../core/util/site-browser.state";
import {SettingsService} from "../services/settings.services";
var prismjs = require('../assets/js/prism');
@Component({
selector: 'my-app',
... | Add services doc link, public deploy npm script | Add services doc link, public deploy npm script
| TypeScript | agpl-3.0 | dotCMS/dotJS,dotCMS/dotJS,dotCMS/dotJS | ---
+++
@@ -46,6 +46,10 @@
label: 'Treeable Detail',
routerLink: ['treable-detail']
},
+ {
+ label: 'Services Documentation',
+ url: './docs'
+ },
];
}
} |
3a8f23c0dc197494eca12d7a3b5cf706e73ea8ff | client/app/accounts/components/login/login.component.ts | client/app/accounts/components/login/login.component.ts | import { Component } from '@angular/core';
import { Account } from '../../models';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent {
public account = new Account();
}
| import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Account } from '../../models';
import { AccountService } from '../../services';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComp... | Add login method and store jwt | Add login method and store jwt
| TypeScript | mit | fvilers/angular2-training,fvilers/angular2-training,fvilers/angular2-training | ---
+++
@@ -1,6 +1,8 @@
import { Component } from '@angular/core';
+import { Router } from '@angular/router';
import { Account } from '../../models';
+import { AccountService } from '../../services';
@Component({
selector: 'app-login',
@@ -9,4 +11,28 @@
})
export class LoginComponent {
public account =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.