type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
InterfaceDeclaration |
export interface DefaultPageActionsProps {
pollInterval?: number
refetch: () => void
loading: boolean
setPollInterval: (newInterval: number) => void
rangeValue: DateRangeValue
setRangeValue: (newRangeValue: DateRangeValue) => void
} | infinite-cat/recap.dev-ui | src/components/page-controls/default-page-actions.component.tsx | TypeScript |
ArrowFunction |
() => {
const parser = createParser(replaceVars)
parser.addReplaceFunctions(componentHtmlAttributesFunc)
test('variable: %componentHtmlAttributes%', async () => {
const result = parser.parse('<Element %componentHtmlAttributes% />')
expect(result).toStrictEqual(
'<Element __typename="value" someTex... | jaccomeijer/wheelroom | packages/wheelroom-plugin-boilerplate/src/lib/parser/replace-functions/component-html-attributes/component-html-attributes.unit.test.ts | TypeScript |
ArrowFunction |
async () => {
const result = parser.parse('<Element %componentHtmlAttributes% />')
expect(result).toStrictEqual(
'<Element __typename="value" someText="testing-this-here" title="value" />'
)
} | jaccomeijer/wheelroom | packages/wheelroom-plugin-boilerplate/src/lib/parser/replace-functions/component-html-attributes/component-html-attributes.unit.test.ts | TypeScript |
ClassDeclaration |
@Injectable()
export class AuthService {
constructor(private ldapService: LdapService, private usersService: UsersService, private config: Config) {}
async auth(credentials: LoginModel) {
let user: UserEntity;
if (this.config.FEATURE_AUTH_TYPE !== 'LDAP') {
user = await this.authLocal(credentials);... | timkovik/work-calendar | backend/src/work-calendar/services/auth.service.ts | TypeScript |
MethodDeclaration |
async auth(credentials: LoginModel) {
let user: UserEntity;
if (this.config.FEATURE_AUTH_TYPE !== 'LDAP') {
user = await this.authLocal(credentials);
} else {
user = await this.authLdap(credentials);
}
return user;
} | timkovik/work-calendar | backend/src/work-calendar/services/auth.service.ts | TypeScript |
MethodDeclaration |
private async authLocal(credentials: LoginModel): Promise<UserEntity> {
const user = await this.usersService.getUserByLogin(credentials.username);
if (user && user.hashPassword === crypto.createHmac('sha256', credentials.password).digest('hex')) {
return Promise.resolve(user);
}
return Promise.... | timkovik/work-calendar | backend/src/work-calendar/services/auth.service.ts | TypeScript |
MethodDeclaration |
private async authLdap(credentials: LoginModel): Promise<UserEntity> {
const user = await this.usersService.getUserByLogin(credentials.username);
const ldapResult = await this.ldapService.auth(credentials);
if (!ldapResult) {
return Promise.reject('USER NOT FOUND');
}
if (user) {
ret... | timkovik/work-calendar | backend/src/work-calendar/services/auth.service.ts | TypeScript |
MethodDeclaration |
async registration(userInfo: LoginModel): Promise<UserEntity> {
const emailPostfix =
this.config.FEATURE_AUTH_TYPE === 'LDAP' && this.config.MAIL_POSTFIX ? `@${this.config.MAIL_POSTFIX}` : '';
const data: UserDto = {
_id: undefined,
username: userInfo.name,
patronymic: null,
loca... | timkovik/work-calendar | backend/src/work-calendar/services/auth.service.ts | TypeScript |
FunctionDeclaration | /**
* decorate any sortBy(s) with properties that might exist on the column - properties defined in sortBys override those
* defined in the column definition
* @param initialSortBys
* @param columnsWithSort
* @returns {Column[]}
*/
export declare function decorateInitialSortBys(initialSortBys: any, columnsWithSor... | mehulgupta29/GigaGrid | lib/store/handlers/InitializeReducer.d.ts | TypeScript |
FunctionDeclaration | /**
* for every column, add the direction property if it is part of a initialSortBy
* @param columns
* @param initialSortBys
* @returns {any}
*/
export declare function decorateColumnsWithSort(columns: any, initialSortBys: any): Column[]; | mehulgupta29/GigaGrid | lib/store/handlers/InitializeReducer.d.ts | TypeScript |
FunctionDeclaration |
export default function (action: InitializeAction): GigaState; | mehulgupta29/GigaGrid | lib/store/handlers/InitializeReducer.d.ts | TypeScript |
InterfaceDeclaration |
export interface InitializeAction extends GigaAction {
props?: GigaProps;
} | mehulgupta29/GigaGrid | lib/store/handlers/InitializeReducer.d.ts | TypeScript |
InterfaceDeclaration |
export interface RadioItemProps extends RadioProps {
radioStyle?: any; // rn only
} | antFB/antFB-mobile | components/radio/RadioItemPropsType.tsx | TypeScript |
InterfaceDeclaration |
interface ImmediateProvider {
setImmediate: SetImmediateFunction;
clearImmediate: ClearImmediateFunction;
delegate:
| {
setImmediate: SetImmediateFunction;
clearImmediate: ClearImmediateFunction;
}
| undefined;
} | 0xhodl/Module_4 | node_modules/rxjs/src/internal/scheduler/immediateProvider.ts | TypeScript |
TypeAliasDeclaration |
type SetImmediateFunction = (handler: () => void, ...args: any[]) => number; | 0xhodl/Module_4 | node_modules/rxjs/src/internal/scheduler/immediateProvider.ts | TypeScript |
TypeAliasDeclaration |
type ClearImmediateFunction = (handle: number) => void; | 0xhodl/Module_4 | node_modules/rxjs/src/internal/scheduler/immediateProvider.ts | TypeScript |
MethodDeclaration | // When accessing the delegate, use the variable rather than `this` so that
// the functions can be called without being bound to the provider.
setImmediate(...args) {
const { delegate } = immediateProvider;
return (delegate?.setImmediate || setImmediate)(...args);
} | 0xhodl/Module_4 | node_modules/rxjs/src/internal/scheduler/immediateProvider.ts | TypeScript |
MethodDeclaration |
clearImmediate(handle) {
const { delegate } = immediateProvider;
return (delegate?.clearImmediate || clearImmediate)(handle);
} | 0xhodl/Module_4 | node_modules/rxjs/src/internal/scheduler/immediateProvider.ts | TypeScript |
ArrowFunction |
(listaDB) => {
this.listaDomiciliarios = listaDB;
storage.get('login_barberoexpress').then((val) => {
console.log("usuario" + val);
if(val){
for(var w=0;w<this.listaDomiciliarios.length;w++){
if(val == this.listaDomiciliarios[w].password){
console.log("y... | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
ArrowFunction |
(val) => {
console.log("usuario" + val);
if(val){
for(var w=0;w<this.listaDomiciliarios.length;w++){
if(val == this.listaDomiciliarios[w].password){
console.log("yeah");
var usuario = this.listaDomiciliarios[w];
this.navCtrl.setRoot(Pedid... | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
ArrowFunction |
(listaDB) => {
this.listaDomiciliarios = listaDB;
} | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
ArrowFunction |
(data) => {
console.log(data);
let toast = this.toastCtrl.create({
message: 'Bienvenido',
duration: 3000,
position: 'top'
});
toast.present();
// this.navCtrl.setRoot(ListaGeneralProductosPage);
} | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
ArrowFunction |
(error) => {
alert('Ocurrió un error');
console.log(error);
} | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
ArrowFunction |
(resolve, rejevt) => {
this.authService.loginWithGoogle()
.then( (response) => {
this.viewCtrl.dismiss();
alert('Loggeado con Google con éxito, bienvenido a Barbero Express.')
localStorage.setItem('loginData', JSON.stringify(response))
// var papi = localStorage.getI... | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
ArrowFunction |
(response) => {
this.viewCtrl.dismiss();
alert('Loggeado con Google con éxito, bienvenido a Barbero Express.')
localStorage.setItem('loginData', JSON.stringify(response))
// var papi = localStorage.getItem('loginData')
// var papus = JSON.parse(papi); ... | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
ArrowFunction |
err => rejevt(err) | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
ClassDeclaration | /**
* Generated class for the LoginPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-login',
templateUrl: 'login.html',
})
export class LoginPage {
password: any;
password2: string;
email: ... | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
MethodDeclaration |
entrar(codigo: number, password: string) {
let usuario = this.listaDomiciliarios[codigo];
if (usuario.password == password){
let toast = this.toastCtrl.create({
message: 'Bienvenido',
duration: 3000,
position: 'bottom'
});
localStorage.setItem('login_barberoexpress', p... | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
MethodDeclaration |
ionViewDidLoad() {
console.log('ionViewDidLoad LoginPage');
} | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
MethodDeclaration |
loginWithEmail() {
this.authService.loginWithEmail(this.email, this.password).then((data) => {
console.log(data);
let toast = this.toastCtrl.create({
message: 'Bienvenido',
duration: 3000,
position: 'top'
});
toast.present();
// this.navCtrl.setRoot(Lista... | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
MethodDeclaration | // loginFacebook() {
// this.authService.loginWithFacebook().then( (response)=> {
// alert('Loggeado con Facebook con éxito, bienvenido a Barbero Express.');
// this.viewCtrl.dismiss();
// localStorage.setItem('loginData', JSON.stringify(response))
// });
// }
loginGoogle(){
return new Promise... | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
MethodDeclaration |
cancelar() {
console.log('Entró')
this.viewCtrl.dismiss();
} | josewweee/appMensajeros | src/src/pages/login/login.ts | TypeScript |
ClassDeclaration | /** Class representing a Permissions. */
export class Permissions {
private readonly client: LuisAuthoringContext;
/**
* Create a Permissions.
* @param {LuisAuthoringContext} client Reference to the service client.
*/
constructor(client: LuisAuthoringContext) {
this.client = client;
}
/**
* ... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* Gets the list of user emails that have permissions to access your application.
* @param appId The application ID.
* @param [options] The optional parameters
* @returns Promise<Models.PermissionsListResponse>
*/
list(appId: string, options?: msRest.RequestOptionsBase): Promise<Models.PermissionsList... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* @param appId The application ID.
* @param callback The callback
*/
list(appId: string, callback: msRest.ServiceCallback<Models.UserAccessList>): void; | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* @param appId The application ID.
* @param options The optional parameters
* @param callback The callback
*/
list(appId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.UserAccessList>): void; | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration |
list(appId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.UserAccessList>, callback?: msRest.ServiceCallback<Models.UserAccessList>): Promise<Models.PermissionsListResponse> {
return this.client.sendOperationRequest(
{
appId,
options
},
listOperationS... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* Adds a user to the allowed list of users to access this LUIS application. Users are added using
* their email address.
* @param appId The application ID.
* @param userToAdd A model containing the user's email address.
* @param [options] The optional parameters
* @returns Promise<Models.Permissio... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* @param appId The application ID.
* @param userToAdd A model containing the user's email address.
* @param callback The callback
*/
add(appId: string, userToAdd: Models.UserCollaborator, callback: msRest.ServiceCallback<Models.OperationStatus>): void; | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* @param appId The application ID.
* @param userToAdd A model containing the user's email address.
* @param options The optional parameters
* @param callback The callback
*/
add(appId: string, userToAdd: Models.UserCollaborator, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Mod... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration |
add(appId: string, userToAdd: Models.UserCollaborator, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationStatus>, callback?: msRest.ServiceCallback<Models.OperationStatus>): Promise<Models.PermissionsAddResponse> {
return this.client.sendOperationRequest(
{
appId,
u... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* Removes a user from the allowed list of users to access this LUIS application. Users are removed
* using their email address.
* @param appId The application ID.
* @param userToDelete A model containing the user's email address.
* @param [options] The optional parameters
* @returns Promise<Models... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* @param appId The application ID.
* @param userToDelete A model containing the user's email address.
* @param callback The callback
*/
deleteMethod(appId: string, userToDelete: Models.UserCollaborator, callback: msRest.ServiceCallback<Models.OperationStatus>): void; | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* @param appId The application ID.
* @param userToDelete A model containing the user's email address.
* @param options The optional parameters
* @param callback The callback
*/
deleteMethod(appId: string, userToDelete: Models.UserCollaborator, options: msRest.RequestOptionsBase, callback: msRest.Serv... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration |
deleteMethod(appId: string, userToDelete: Models.UserCollaborator, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationStatus>, callback?: msRest.ServiceCallback<Models.OperationStatus>): Promise<Models.PermissionsDeleteMethodResponse> {
return this.client.sendOperationRequest(
{
... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* Replaces the current user access list with the new list sent in the body. If an empty list is
* sent, all access to other users will be removed.
* @param appId The application ID.
* @param collaborators A model containing a list of user email addresses.
* @param [options] The optional parameters
... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* @param appId The application ID.
* @param collaborators A model containing a list of user email addresses.
* @param callback The callback
*/
update(appId: string, collaborators: Models.CollaboratorsArray, callback: msRest.ServiceCallback<Models.OperationStatus>): void; | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration | /**
* @param appId The application ID.
* @param collaborators A model containing a list of user email addresses.
* @param options The optional parameters
* @param callback The callback
*/
update(appId: string, collaborators: Models.CollaboratorsArray, options: msRest.RequestOptionsBase, callback: msRest.... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
MethodDeclaration |
update(appId: string, collaborators: Models.CollaboratorsArray, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationStatus>, callback?: msRest.ServiceCallback<Models.OperationStatus>): Promise<Models.PermissionsUpdateResponse> {
return this.client.sendOperationRequest(
{
appI... | Bhaskers-Blu-Org2/botbuilder-tools | packages/LUIS/src/operations/permissions.ts | TypeScript |
ArrowFunction |
(state: Object = {}, actions: any):Object => ({
...state,
...actions.state,
}) | TrickTrackers/Fut | src/store/common/redux.devtool.ts | TypeScript |
ArrowFunction |
() => {
if (process.env.NODE_ENV === 'development' && window.__REDUX_DEVTOOLS_EXTENSION__) {
const devMiddleware = window.__REDUX_DEVTOOLS_EXTENSION__();
const store = createStore(root, devMiddleware);
return () => (next: any) => (record: any) => {
store.dispatch({
type: `${record.moduleName}/${record.ac... | TrickTrackers/Fut | src/store/common/redux.devtool.ts | TypeScript |
ArrowFunction |
() => (next: any) => (record: any) => {
store.dispatch({
type: `${record.moduleName}/${record.actionName}`,
state: {
[record.moduleName]: record.state,
},
});
return next(record);
} | TrickTrackers/Fut | src/store/common/redux.devtool.ts | TypeScript |
ArrowFunction |
(next: any) => (record: any) => {
store.dispatch({
type: `${record.moduleName}/${record.actionName}`,
state: {
[record.moduleName]: record.state,
},
});
return next(record);
} | TrickTrackers/Fut | src/store/common/redux.devtool.ts | TypeScript |
ArrowFunction |
(record: any) => {
store.dispatch({
type: `${record.moduleName}/${record.actionName}`,
state: {
[record.moduleName]: record.state,
},
});
return next(record);
} | TrickTrackers/Fut | src/store/common/redux.devtool.ts | TypeScript |
ArrowFunction |
() => (next: any) => (record: any) => next(record) | TrickTrackers/Fut | src/store/common/redux.devtool.ts | TypeScript |
ArrowFunction |
(next: any) => (record: any) => next(record) | TrickTrackers/Fut | src/store/common/redux.devtool.ts | TypeScript |
ArrowFunction |
(record: any) => next(record) | TrickTrackers/Fut | src/store/common/redux.devtool.ts | TypeScript |
FunctionDeclaration |
async function main() {
await ngPackagr()
.forProject(join(process.cwd(), 'src/lib/picker/package.json'))
.build();
copyFileSync(
join(process.cwd(), 'README.md'),
join(process.cwd(), 'dist/README.md'),
);
copyFileSync(
join(process.cwd(), 'LICENSE'),
join(process.cwd(), 'dist/LICENSE'... | BioPhoton/ngx-emoji-mart | build.ts | TypeScript |
ArrowFunction |
() => console.log('success') | BioPhoton/ngx-emoji-mart | build.ts | TypeScript |
ArrowFunction |
e => {
console.error(e);
process.exit(1);
} | BioPhoton/ngx-emoji-mart | build.ts | TypeScript |
ArrowFunction |
props => {
const styles: React.CSSProperties[] = [
{ height: '332px', left: 0, top: 0, marginBottom: '2%' },
{ height: '251px', right: 0, top: 0, marginBottom: '2%' },
{ height: '200px', left: 0, bottom: 0 },
{ height: '281px', right: 0, bottom: 0 },
];
const { error, data }... | miaowing/blog | packages/next/containers/banner-images.container.tsx | TypeScript |
ArrowFunction |
(image, index) => <div
key | miaowing/blog | packages/next/containers/banner-images.container.tsx | TypeScript |
InterfaceDeclaration |
export interface AppEnvironment {
ID: string;
metadata: Record<string, string> | null;
CreatedAt: string;
DeletedAt: string | null;
UpdatedAt: string;
environment_id: string;
environment: null;
app_id: string;
app: null;
containers: null;
latest_deployment: {
deployment_history_id: string;
... | platformercloud/cli | src/modules/apps/app.interface.ts | TypeScript |
InterfaceDeclaration |
export interface Application {
ID: string;
name: string;
organization_id: OrgId;
project_id: ProjectId;
type: ApplicationType;
app_environments: AppEnvironment[] | null;
metadata: Record<string, string> | null;
CreatedAt: string;
DeletedAt: string | null;
UpdatedAt: string;
} | platformercloud/cli | src/modules/apps/app.interface.ts | TypeScript |
TypeAliasDeclaration |
export type ApplicationType = typeof appTypes[number]; | platformercloud/cli | src/modules/apps/app.interface.ts | TypeScript |
TypeAliasDeclaration |
export type OrgId = string; | platformercloud/cli | src/modules/apps/app.interface.ts | TypeScript |
TypeAliasDeclaration |
export type ProjectId = string; | platformercloud/cli | src/modules/apps/app.interface.ts | TypeScript |
TypeAliasDeclaration |
export type AppEnvServiceType = 'ClusterIP' | 'NodePort' | 'LoadBalancer' | ''; | platformercloud/cli | src/modules/apps/app.interface.ts | TypeScript |
ArrowFunction |
() => {
this.setState({ isUploading: true, uploadProgress: 0 })
} | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
ArrowFunction |
(progress: any) => {
this.setState({ uploadProgress: progress })
} | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
ArrowFunction |
(error: any) => {
this.setState({ isUploading: false })
console.error(error)
} | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
ArrowFunction |
async (filename: string) => {
const meta: FullMetadata = await storage
.ref(this.props.storagePath)
.child(filename)
.getMetadata()
const url = await storage
.ref(this.props.storagePath)
.child(filename)
.getDownloadURL()
const fileInfo: IFirebaseUploadInfo = {
dow... | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
ArrowFunction |
async (fileInfo?: any) => {
// WiP
} | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
ClassDeclaration |
export class FirebaseFileUploader extends React.Component<IProps, IState> {
public static defaultProps: any
public fileInputRef: any
constructor(props: any) {
super(props)
this.state = {
isUploading: false,
uploadProgress: 0,
}
}
public handleUploadStart = () => {
this.setState(... | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
InterfaceDeclaration | /*
This component takes a folder storage path and uploads files to firebase storage
onUploadSucess allows URLs of completed uploads to be passed back to parent component
additional optional fields are a subset of https://www.npmjs.com/package/react-firebase-file-uploader
*/
interface IProps {
storagePath: string
on... | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
InterfaceDeclaration |
interface IState {
isUploading: boolean
uploadProgress: number
} | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
InterfaceDeclaration |
export interface IFirebaseUploadInfo {
downloadUrl: string
contentType?: string | null
fullPath: string
name: string
size: number
timeCreated: string
updated: string
} | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
MethodDeclaration | // the first styled button in our template intercepts all click events so we have a manual method
// to trigger the second click
public triggerFileUploaderClick() {
const divRef: HTMLElement = this.fileInputRef
const inputRef = divRef.querySelector('input') as HTMLInputElement
inputRef.click()
} | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
MethodDeclaration |
public renderProgressBar() {
if (this.state.isUploading) {
if (this.state.uploadProgress > 0) {
return (
<ProgressBar
variant="determinate"
value={this.state.uploadProgress}
progress={this.state.uploadProgress}
/>
)
}
return ... | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
MethodDeclaration |
public render() {
return (
<Container>
<UploadBtn
icon={'upload'}
onClick={() => this.triggerFileUploaderClick()} | AlecGrover/onearmy | src/pages/common/FirebaseFileUploader/FirebaseFileUploader.tsx | TypeScript |
ArrowFunction |
() => {
const title = 'Case Title';
const caseLink = 'http://reddit.com';
const user = { username: 'username', fullName: 'Full Name', email: 'testemail@elastic.co' };
const open = jest.fn();
beforeAll(() => {
window.open = open;
});
beforeEach(() => {
jest.resetAllMocks();
});
it('triggers ma... | AlexanderWert/kibana | x-pack/plugins/security_solution/public/cases/components/user_list/index.test.tsx | TypeScript |
ArrowFunction |
() => {
window.open = open;
} | AlexanderWert/kibana | x-pack/plugins/security_solution/public/cases/components/user_list/index.test.tsx | TypeScript |
ArrowFunction |
() => {
const wrapper = shallow(
<UserList
email={{
subject: i18n.EMAIL_SUBJECT(title),
body: i18n.EMAIL_BODY(caseLink),
}} | AlexanderWert/kibana | x-pack/plugins/security_solution/public/cases/components/user_list/index.test.tsx | TypeScript |
ArrowFunction |
(dataTablesParameters: any, callback) => {
if (!this.applicationSelected) {
this.namings = [];
return
}
this.fileKindsService
.getAllFromApplication(this.applicationSelected.id, {
'page': dataTablesParameters.start / dataTablesParameters.length,
... | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
resp => {
this.namings = resp.content;
callback({
recordsTotal: resp.totalElements,
recordsFiltered: resp.totalElements,
data: []
});
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
(dtInstance: DataTables.Api) => {
dtInstance.destroy();
this.dtTrigger.next();
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
(result) => {
this.toastService.showSuccess(`Le nommage ${result.name} a bien été ajouté`);
this.applicationChanged(this.applicationSelected);
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
(reason) => {
if (reason.message !== undefined) {
this.toastService.showError( `Une erreur est survenue lors de l'ahout du nommage : ${reason.message}`);
}
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
(result) => {
this.toastService.showSuccess(`Le nommage ${result.name} a bien été modifié`);
this.applicationChanged(this.applicationSelected);
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
(reason) => {
if (reason.message !== undefined) {
this.toastService.showError( `Une erreur est survenue lors de la modification du nommage : ${reason.message}`);
}
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
(result) => {
this.fileKindsService.deleteNaming(naming).subscribe(
fileKind => {
this.toastService.showSuccess(`Le nommage a été supprimé`);
this.applicationChanged(this.applicationSelected);
},
reason => {
this.toastService.showError( `Une erreur est surven... | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
fileKind => {
this.toastService.showSuccess(`Le nommage a été supprimé`);
this.applicationChanged(this.applicationSelected);
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
reason => {
this.toastService.showError( `Une erreur est survenue lors de la suppression du nommage : ${reason}`);
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ArrowFunction |
reason => {
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-manage-naming',
templateUrl: './manage-naming.component.html'
})
export class ManageNamingComponent implements AfterViewInit, OnDestroy, OnInit {
applicationSelected: Application;
namings: FileKind[];
@ViewChild(DataTableDirective, { static: true })
dtElement: DataTableDirectiv... | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this.dtOptions = {
order: [[0, 'asc']],
pagingType: 'full_numbers',
pageLength: this.constants.numberByPage,
serverSide: true,
processing: false,
ajax: (dataTablesParameters: any, callback) => {
if (!this.applicationSelected) {
this.namings = [];... | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
MethodDeclaration |
ngAfterViewInit(): void {
this.dtTrigger.next();
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
MethodDeclaration |
ngOnDestroy(): void {
this.dtTrigger.unsubscribe();
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
MethodDeclaration |
refreshNaming() {
this.dtElement.dtInstance.then((dtInstance: DataTables.Api) => {
dtInstance.destroy();
this.dtTrigger.next();
});
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
MethodDeclaration |
applicationChanged(application: Application) {
this.applicationSelected = application;
this.refreshNaming();
} | dtrouillet/ebad-front | src/app/manage-naming/manage-naming.component.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.