repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
comediadesign/uniforms
packages/uniforms/src/types.ts
import { HTMLProps, ReactNode, SyntheticEvent } from 'react'; import { BaseForm } from './BaseForm'; import { Bridge } from './Bridge'; export type ChangedMap<T> = T extends object ? { [P in keyof T]?: ChangedMap<T[P]> } : Record<string, void>; export type Context<Model> = { changed: boolean; changedMap: Cha...
comediadesign/uniforms
packages/uniforms-bridge-json-schema/src/register.ts
import { filterDOMProps } from 'uniforms'; // There's no possibility to retrieve them at runtime. declare module 'uniforms' { interface FilterDOMProps { minCount: never; maxCount: never; } } filterDOMProps.register('minCount', 'maxCount');
comediadesign/uniforms
packages/uniforms-material/src/BaseForm.tsx
import { BaseForm } from 'uniforms'; function Material(parent: any) { class _ extends parent { static Material = Material; static displayName = `Material${parent.displayName}`; } return _ as unknown as typeof BaseForm; } export default Material(BaseForm);
comediadesign/uniforms
packages/uniforms-material/src/ErrorField.tsx
<filename>packages/uniforms-material/src/ErrorField.tsx import { PropTypes } from '@material-ui/core'; import FormControl from '@material-ui/core/FormControl'; import FormHelperText, { FormHelperTextProps, } from '@material-ui/core/FormHelperText'; import useTheme from '@material-ui/core/styles/useTheme'; import Reac...
os-hun/typescript-oreilly
chapter-3/src/index.ts
<reponame>os-hun/typescript-oreilly function squareOf(n: number) { return n * n } console.log('squareOF =>', squareOf(2)) // any let any_a: any = 666 let any_b: any = ['danger'] let any_c = any_a + any_b console.log('any =>', any_c) // unknown let unknown_a: unknown = 30 let unknown_b = unknown_a === 123 // let un...
os-hun/typescript-oreilly
chapter-3/src/number.ts
// number let a = 1234 let b = Infinity * 0.10 const c = 5678 let d = a < b let e: number = 100 let f: 26.218 = 26.218 console.log('a =>', a) console.log('b =>', b) console.log('c =>', d) console.log('e =>', e) console.log('f =>', f)
os-hun/typescript-oreilly
chapter-2/src/index.ts
<reponame>os-hun/typescript-oreilly<filename>chapter-2/src/index.ts<gh_stars>1-10 console.log('Hello TypeScript!') // P15 練習問題 let a = 1 + 2 let b = a + 3 let c = { apple: a, banana: b } let d = c.apple * 4 console.log("apple: ", c.apple) console.log("banana: ", c.banana)
EnetoJara/axios-typescript
types/api.d.ts
import { Axios } from "./axios"; import type { AxiosRequestConfig, AxiosResponse, AxiosError } from "axios"; /** * @class Api Class is a fancy es6 wrapper class for axios. * * @param {import("axios").AxiosRequestConfig} config - axios Request Config. * @link [AxiosRequestConfig](https://github.com/axios/axios#reque...
EnetoJara/axios-typescript
types/axios.d.ts
<gh_stars>10-100 import type { AxiosRequestConfig, AxiosInterceptorManager, AxiosResponse } from "axios"; export declare class Axios { interceptors: { /** * The **Request** interceptor will be call rigth before the `http request` * @summary * This a useful method especially if you...
LiajuX/NextLevelWeek-Letmeask
src/components/Modal.tsx
import ReactModal from 'react-modal'; import '../styles/modal.scss'; type ModalProps = { icon: string; title: string; subtitle: string; confirmButtonText: string; isOpened: boolean; onCancel: () => void; onConfirm: () => void; }; export function Modal({ icon, title, subtitle, confirmButtonT...
LiajuX/NextLevelWeek-Letmeask
src/components/RoomCode.tsx
import toast, { Toaster } from 'react-hot-toast'; import copyImg from '../assets/images/copy.svg'; import '../styles/room-code.scss' type RoomCodeProps = { code: string; } export function RoomCode(props: RoomCodeProps) { function showToast() { toast('Código copiado!', { duration: 1000, ...
Vlodzimej/KSUQuest
ClientApp/src/app/manager/manager.component.ts
import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-manager', templateUrl: './manager.component.html', }) export class ManagerComponent implements OnInit { public isManager: boolean = false; public managerPassword: string = ""; constructor() { } ngOnInit(): void { } ...
Vlodzimej/KSUQuest
ClientApp/src/app/model/question.ts
export class Question { id: string; content: string; answer: string; number: string; groupId: string; } export class SafeQuestion { id: string; content: string; }
Vlodzimej/KSUQuest
ClientApp/src/app/quest/quest.component.ts
<gh_stars>0 import { Component, OnInit } from '@angular/core'; import { Group, Question, SafeQuestion } from '../model'; import { ApiService } from '../services'; import { Router } from '@angular/router'; @Component({ selector: 'app-quest', templateUrl: './quest.component.html' }) export class QuestComponent ...
Vlodzimej/KSUQuest
ClientApp/src/app/services/api.service.ts
<reponame>Vlodzimej/KSUQuest import { Injectable, Inject } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import {Observable} from 'rxjs/Observable'; import { Group } from '../model'; const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) }; @...
Vlodzimej/KSUQuest
ClientApp/src/app/group/group.component.ts
import { Component, OnInit } from '@angular/core'; import { Group } from '../model'; import { ApiService } from '../services'; @Component({ selector: 'app-group', templateUrl: './group.component.html', }) export class GroupComponent implements OnInit { public group: Group; public groups: Group[]; ...
Vlodzimej/KSUQuest
ClientApp/src/app/model/index.ts
export * from './group'; export * from './question';
Vlodzimej/KSUQuest
ClientApp/src/app/app.module.ts
<reponame>Vlodzimej/KSUQuest<filename>ClientApp/src/app/app.module.ts import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; import { RouterModule } from '@angular/router'...
Vlodzimej/KSUQuest
ClientApp/src/app/editor/editor.component.ts
<filename>ClientApp/src/app/editor/editor.component.ts<gh_stars>0 import { Component, OnInit } from '@angular/core'; import { Group, Question } from '../model'; import { ApiService } from '../services'; @Component({ selector: 'app-editor', templateUrl: './editor.component.html' }) export class EditorComponent ...
Vlodzimej/KSUQuest
ClientApp/src/app/quest/index.ts
export * from './quest.component';
ButterCheezii/fchat-rising
fchat/common.ts
const ltRegex = /&lt;/gi, gtRegex = /&gt;/gi, ampRegex = /&amp;/gi; export function decodeHTML(this: void | never, str: string): string { return str.replace(ltRegex, '<').replace(gtRegex, '>').replace(ampRegex, '&'); }
ButterCheezii/fchat-rising
chat/preview/image-url-mutator.ts
import * as _ from 'lodash'; import Axios from 'axios'; import { domain } from '../../bbcode/core'; export type UrlSolverCallback = (url: string, match: RegExpMatchArray) => Promise<string>; export interface UrlSolver { matcher: RegExp; solver: UrlSolverCallback; } export class ImageUrlMutator { privat...
ButterCheezii/fchat-rising
learn/store/indexed.ts
import log from 'electron-log'; //tslint:disable-line:match-default-export-name import * as _ from 'lodash'; import {Character as ComplexCharacter, CharacterGroup, Guestbook} from '../../site/character_page/interfaces'; import { CharacterAnalysis } from '../matcher'; import { PermanentIndexedStore, ProfileRecord } fro...
ButterCheezii/fchat-rising
learn/store/types.ts
// tslint:disable-next-line:no-duplicate-imports // import * as path from 'path'; // import core from '../../chat/core'; import {Character as ComplexCharacter, CharacterGroup, Guestbook} from '../../site/character_page/interfaces'; import { CharacterImage, SimpleCharacter } from '../../interfaces'; import { FurryPrefe...
ButterCheezii/fchat-rising
bbcode/core.ts
import {BBCodeCustomTag, BBCodeParser, BBCodeSimpleTag, BBCodeTextTag} from './parser'; const urlFormat = '((?:https?|ftps?|irc)://[^\\s/$.?#"\']+\\.[^\\s"]+)'; export const findUrlRegex = new RegExp(`(\\[url[=\\]]\\s*)?${urlFormat}`, 'gi'); export const urlRegex = new RegExp(`^${urlFormat}$`); export type BBCodeElem...
ButterCheezii/fchat-rising
chat/preview/helper/character.ts
import { ImagePreviewHelper } from './helper'; export class CharacterPreviewHelper extends ImagePreviewHelper { static readonly FLIST_CHARACTER_PROTOCOL_TESTER = /^flist-character:\/\/(.+)/; hide(): void { this.visible = false; this.url = undefined; } getName(): string { retu...
ButterCheezii/fchat-rising
chat/preview/helper/helper.ts
<reponame>ButterCheezii/fchat-rising import ImagePreview from '../ImagePreview.vue'; export abstract class ImagePreviewHelper { static readonly HTTP_TESTER = /^https?:\/\//; protected visible = false; protected url: string | undefined = 'about:blank'; protected parent: ImagePreview; protected debu...
ButterCheezii/fchat-rising
chat/preview/helper/index.ts
export * from './character'; export * from './external'; export * from './helper'; export * from './local'; export * from './manager';
ButterCheezii/fchat-rising
webchat/chat.ts
<reponame>ButterCheezii/fchat-rising<gh_stars>0 /** * @license * MIT License * * Copyright (c) 2018 F-List * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, inclu...
ButterCheezii/fchat-rising
chat/preview/helper/external.ts
import { ImageUrlMutator } from '../image-url-mutator'; import { ImagePreviewHelper } from './helper'; import * as _ from 'lodash'; export class ExternalImagePreviewHelper extends ImagePreviewHelper { protected lastExternalUrl: string | undefined = undefined; protected allowCachedUrl = true; protected ur...
ButterCheezii/fchat-rising
fchat/interfaces.ts
import { Character as CharacterProfile } from '../site/character_page/interfaces'; //tslint:disable:no-shadowed-variable export namespace Connection { export type ClientCommands = { ACB: {character: string}, AOP: {character: string}, BRO: {message: string}, CBL: {channel: string}, ...
ButterCheezii/fchat-rising
chat/zip.ts
<gh_stars>10-100 import {getByteLength} from './common'; let crcTable!: number[]; export default class Zip { private blob: BlobPart[] = []; private files: {header: BlobPart[], offset: number, name: string}[] = []; private offset = 0; constructor() { if(crcTable !== undefined!) return; ...
ButterCheezii/fchat-rising
mobile/notifications.ts
import core from '../chat/core'; import {Conversation} from '../chat/interfaces'; import BaseNotifications from '../chat/notifications'; //tslint:disable-line:match-default-export-name declare global { const NativeNotification: { notify(notify: boolean, title: string, text: string, icon: string, sound: str...
ButterCheezii/fchat-rising
components/tabs.ts
import Vue, {CreateElement, VNode} from 'vue'; //tslint:disable-next-line:variable-name const Tabs = Vue.extend({ props: ['value', 'tabs'], render(this: Vue & {readonly value?: string, _v?: string, selected?: string, tabs: {readonly [key: string]: string}}, createElement: CreateElement): VNode { ...
ButterCheezii/fchat-rising
site/character_page/data_store.ts
<gh_stars>10-100 import {Component} from 'vue'; import {SharedStore, StoreMethods} from './interfaces'; export let Store: SharedStore = { shared: undefined!, authenticated: false }; export const registeredComponents: {[key: string]: Component | undefined} = {}; export function registerComponent(name: string,...
ButterCheezii/fchat-rising
learn/store/worker/store.worker.endpoint.ts
import _ from 'lodash'; // import log from 'electron-log'; //tslint:disable-line:match-default-export-name import { IndexedStore } from '../indexed'; import { IndexedRequest, ProfileStoreCommand } from './types'; type IndexedCallback = (params: Record<string, any>) => Promise<any>; let indexed: IndexedStore; const ...
ButterCheezii/fchat-rising
bbcode/view.ts
import {CreateElement, FunctionalComponentOptions, RenderContext, VNode} from 'vue'; import {DefaultProps, RecordPropsDefinition} from 'vue/types/options'; //tslint:disable-line:no-submodule-imports import {BBCodeElement} from './core'; import {BBCodeParser} from './parser'; export const BBCodeView = (parser: BBCodePa...
ButterCheezii/fchat-rising
chat/profile_api.ts
<gh_stars>0 import Axios from 'axios'; import Vue from 'vue'; import Editor from '../bbcode/Editor.vue'; import { BBCodeView } from '../bbcode/view'; import {InlineDisplayMode} from '../interfaces'; import {StandardBBCodeParser} from '../bbcode/standard'; import CharacterLink from '../components/character_link.vue'; im...
ButterCheezii/fchat-rising
webchat/notifications.ts
<reponame>ButterCheezii/fchat-rising import core from '../chat/core'; import {Conversation} from '../chat/interfaces'; //tslint:disable-next-line:match-default-export-name import BaseNotifications from '../chat/notifications'; export default class Notifications extends BaseNotifications { async notify(conversation...
ButterCheezii/fchat-rising
chat/ads/ad-coordinator-guest.ts
import _ from 'lodash'; import { ipcRenderer, IpcRendererEvent } from 'electron'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name import core from '../core'; interface PendingAd { resolve(): void, reject(err: Error): void, from: number; } export class AdCoordinatorGuest { ...
ButterCheezii/fchat-rising
site/note-checker.ts
<reponame>ButterCheezii/fchat-rising import { SiteSession, SiteSessionInterface } from './site-session'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name import { EventBus } from '../chat/preview/event-bus'; /* tslint:disable:no-unsafe-any */ export interface NoteCheckerCount { unread...
ButterCheezii/fchat-rising
chat/qs.d.ts
declare module 'qs' { export function stringify(data: object): string; }
ButterCheezii/fchat-rising
bbcode/parser.ts
abstract class BBCodeTag { noClosingTag = false; allowedTags: {[tag: string]: boolean | undefined} | undefined; constructor(public tag: string, tagList?: string[]) { if(tagList !== undefined) this.setAllowedTags(tagList); } isAllowed(tag: string): boolean { return this....
ButterCheezii/fchat-rising
keys.ts
<filename>keys.ts export const enum Keys { Backspace = 8, Tab = 9, Enter = 13, Shift = 16, Ctrl = 17, Alt = 18, Pause = 19, CapsLock = 20, Escape = 27, Space = 32, PageUp = 33, PageDown = 34, End = 35, Home = 36, ArrowLeft = 37, ArrowUp = 38, ArrowRig...
ButterCheezii/fchat-rising
fchat/channels.ts
import {decodeHTML} from './common'; import {Channel as Interfaces, Character, Connection} from './interfaces'; interface SortableMember extends Interfaces.Member { rank: Interfaces.Rank, key: string } export function queuedJoin(this: void, channels: string[]): void { const timer: NodeJS.Timer = setInterv...
ButterCheezii/fchat-rising
components/custom_dialog.ts
<filename>components/custom_dialog.ts import {Component} from '@f-list/vue-ts'; import Vue from 'vue'; import Modal from './Modal.vue'; @Component({ components: {Modal} }) export default class CustomDialog extends Vue { protected get dialog(): Modal { return <Modal>this.$children[0]; } show():...
ButterCheezii/fchat-rising
chat/preview/helper/manager.ts
<reponame>ButterCheezii/fchat-rising import _ from 'lodash'; import { ImagePreviewHelper } from './helper'; import ImagePreview from '../ImagePreview.vue'; export type RenderStyle = Record<string, any>; export interface PreviewManagerHelper { helper: ImagePreviewHelper; renderStyle: RenderStyle; } export class ...
ButterCheezii/fchat-rising
electron/window.ts
<gh_stars>0 import * as qs from 'querystring'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name import {GeneralSettings} from './common'; import Window from './Window.vue'; log.info('init.window'); const params = <{[key: string]: string | undefined}>qs.parse(window.location.search.subs...
ButterCheezii/fchat-rising
chat/preview/event-bus.ts
// import Vue from 'vue'; import _ from 'lodash'; // import log from 'electron-log'; //tslint:disable-line:match-default-export-name import { Character } from '../../site/character_page/interfaces'; import { Message } from '../common'; import { Conversation } from '../interfaces'; import ChannelConversation = Conversa...
ButterCheezii/fchat-rising
learn/store/worker/client.ts
import _ from 'lodash'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name import { IndexedRequest, IndexedResponse, ProfileStoreCommand } from './types'; export interface WaiterDef { id: string; resolve(result?: any): void; reject(result?: any): void; initiated: number; reques...
ButterCheezii/fchat-rising
learn/store/worker/types.ts
<gh_stars>0 export type ProfileStoreCommand = 'flush' | 'start' | 'stop' | 'update-meta' | 'store' | 'get' | 'init'; export interface IndexedRequest { cmd: ProfileStoreCommand; id: string; params: Record<string, any>; } export interface IndexedResponse { id: string; type: 'event' | 'res'; state: 'err' |...
ButterCheezii/fchat-rising
fchat/index.ts
export {default as Characters} from './characters'; export {default as Channels} from './channels'; export {default as ChatConnection} from './connection'; export {Connection, Character, Channel, WebSocketConnection} from './interfaces'; export {decodeHTML} from './common';
ButterCheezii/fchat-rising
learn/character-profiler.ts
import core from '../chat/core'; import { Character as CharacterFChatInf } from '../fchat'; import { Character as ComplexCharacter } from '../site/character_page/interfaces'; import { Matcher } from './matcher'; import { AdCache } from './ad-cache'; import { ProfileCacheQueueEntry } from './cache-manager'; import { Tag...
ButterCheezii/fchat-rising
webchat/logs.ts
import {EventMessage, Message, Settings as SettingsImpl} from '../chat/common'; import core from '../chat/core'; import {Conversation, Logs as Logging, Settings} from '../chat/interfaces'; import l from '../chat/localize'; type StoredConversation = {id: number, key: string, name: string}; type StoredMessage = { id...
ButterCheezii/fchat-rising
learn/ad-cache.ts
<gh_stars>0 import * as _ from 'lodash'; import { Cache } from './cache'; export interface AdCachedPosting { channelName: string; datePosted: Date; message: string; } export interface AdPosting extends AdCachedPosting { name: string; } export class AdCacheRecord { protected name: string; pos...
ButterCheezii/fchat-rising
chat/ads/ad-manager.ts
import throat from 'throat'; import * as _ from 'lodash'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name import core from '../core'; import { Conversation } from '../interfaces'; import Timer = NodeJS.Timer; import ChannelConversation = Conversation.ChannelConversation; const adMana...
ButterCheezii/fchat-rising
chat/preview/image-dom-mutator.ts
<filename>chat/preview/image-dom-mutator.ts /* tslint:disable:quotemark */ import * as _ from 'lodash'; import * as urlHelper from 'url'; import { domain as extractDomain } from '../../bbcode/core'; // tslint:disable-next-line:ban-ts-ignore // @ts-ignore // tslint:disable-next-line:no-submodule-imports ban-ts-ignore...
ButterCheezii/fchat-rising
chat/localize.ts
<reponame>ButterCheezii/fchat-rising /*tslint:disable:max-line-length object-literal-sort-keys object-literal-key-quotes*/ const strings: {[key: string]: string | undefined} = { 'action.edit': 'Edit', 'action.view': 'View', 'action.cut': 'Cut', 'action.copy': 'Copy', 'action.copyWithoutBBCode': 'Cop...
ButterCheezii/fchat-rising
site/site-session.ts
<reponame>ButterCheezii/fchat-rising import _ from 'lodash'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name import throat from 'throat'; import { NoteChecker } from './note-checker'; import request from 'request-promise'; //tslint:disable-line:match-default-export-name /* tslint:disab...
ButterCheezii/fchat-rising
electron/window_state.ts
<filename>electron/window_state.ts import {app, screen} from 'electron'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name import * as fs from 'fs'; import * as path from 'path'; const baseDir = path.join(app.getPath('userData'), 'data'); const windowStatePath = path.join(baseDir, 'window...
ButterCheezii/fchat-rising
electron/importer.ts
<filename>electron/importer.ts import {addMinutes} from 'date-fns'; import * as fs from 'fs'; import * as path from 'path'; import {promisify} from 'util'; import {Settings} from '../chat/common'; import {Conversation} from '../chat/interfaces'; import {isAction} from '../chat/slash_commands'; import {GeneralSettings} ...
ButterCheezii/fchat-rising
electron/common.ts
<gh_stars>0 import * as electron from 'electron'; import * as path from 'path'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name export const defaultHost = 'wss://chat.f-list.net/chat2'; function getDefaultLanguage(): string { try { return (electron.app.getLocale() || proce...
ButterCheezii/fchat-rising
chat/preview/helper/local.ts
<reponame>ButterCheezii/fchat-rising import { ImagePreviewHelper } from './helper'; export class LocalImagePreviewHelper extends ImagePreviewHelper { hide(): void { this.visible = false; this.url = undefined; } getName(): string { return 'LocalImagePreviewHelper'; } sho...
ButterCheezii/fchat-rising
chat/WebSocket.ts
import {WebSocketConnection} from '../fchat'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name export default class Socket implements WebSocketConnection { static host = 'wss://chat.f-list.net/chat2'; private socket: WebSocket; private lastHandler: Promise<void> = Promise.res...
ButterCheezii/fchat-rising
electron/filesystem.ts
<reponame>ButterCheezii/fchat-rising import * as remote from '@electron/remote'; import * as fs from 'fs'; import * as path from 'path'; import {promisify} from 'util'; import {Message as MessageImpl} from '../chat/common'; import core from '../chat/core'; import {Character, Conversation, Logs as Logging, Settings} fro...
ButterCheezii/fchat-rising
chat/ads/ad-coordinator-host.ts
import throat from 'throat'; import Bluebird from 'bluebird'; import { IpcMainEvent } from 'electron'; import log from 'electron-log'; //tslint:disable-line:match-default-export-name const adCoordinatorThroat = throat(1); export class AdCoordinatorHost { static readonly MIN_DISTANCE = 7500; private lastPost = Da...
ButterCheezii/fchat-rising
interfaces.ts
<reponame>ButterCheezii/fchat-rising export interface SimpleCharacter { id: number name: string deleted: boolean } export interface InlineImage { id: number name: string hash: string extension: string nsfw: boolean } export type CharacterImage = CharacterImageOld | CharacterImageNew; ...
ButterCheezii/fchat-rising
learn/async-cache.ts
<gh_stars>0 import { Cache, CacheCollection } from './cache'; export abstract class AsyncCache<RecordType> { protected cache: CacheCollection<RecordType> = {}; abstract get(name: string): Promise<RecordType | null>; // tslint:disable-next-line no-any abstract register(record: any): void; static ...
ButterCheezii/fchat-rising
learn/channel-conversation-cache.ts
<reponame>ButterCheezii/fchat-rising import * as _ from 'lodash'; import { Cache } from './cache'; import { AdCachedPosting, AdCacheRecord, AdCache } from './ad-cache'; export interface ChannelCachedPosting extends AdCachedPosting { channelName: string; datePosted: Date; message: string; } export interfac...
ButterCheezii/fchat-rising
chat/slash_commands.ts
import core from './core'; import {Character, Conversation, userStatuses} from './interfaces'; import l from './localize'; import ChannelConversation = Conversation.ChannelConversation; import PrivateConversation = Conversation.PrivateConversation; export const enum ParamType { String, Number, Character, Enum } c...
ButterCheezii/fchat-rising
electron/language.ts
<reponame>ButterCheezii/fchat-rising import * as _ from 'lodash'; export function getSafeLanguages(langs: string | string[] | undefined): string[] { const initialLanguages = _.isString(langs) ? ([langs.replace('_', '-')]) : (langs || []); const initialCount = initialLanguages.length; cons...
ButterCheezii/fchat-rising
site/character_page/contact_utils.ts
<reponame>ButterCheezii/fchat-rising import {urlRegex as websitePattern} from '../../bbcode/core'; import {Infotag} from '../../interfaces'; const daUsernamePattern = /^([a-z0-9_\-]+)$/i; const daSitePattern = /^https?:\/\/([a-z0-9_\-]+)\.deviantart\.com\//i; const emailPattern = /^((?:[a-z0-9])+(?:[a-z0-9\._-])*@(?:[...
ButterCheezii/fchat-rising
learn/dictionary/word-pos-search.ts
<filename>learn/dictionary/word-pos-search.ts import _ from 'lodash'; export interface FoundWord { word: string; start: number; clickedRect: DOMRect; } export class WordPosSearch { private listener?: (e: MouseEvent) => void; private lastClicked: FoundWord | null = null; constructor() { this.start()...
ButterCheezii/fchat-rising
learn/cache-manager.ts
import * as _ from 'lodash'; import core from '../chat/core'; import { ChannelAdEvent, ChannelMessageEvent, CharacterDataEvent, EventBus, SelectConversationEvent } from '../chat/preview/event-bus'; import { Channel, Conversation } from '../chat/interfaces'; import { methods } from '../site/character_page/data_store'; i...
ButterCheezii/fchat-rising
learn/cache.ts
<filename>learn/cache.ts<gh_stars>0 export interface CacheCollection<RecordType> { [key: string]: RecordType } export abstract class Cache<RecordType> { protected cache: CacheCollection<RecordType> = {}; get(name: string): RecordType | null { const key = Cache.nameKey(name); if (key in t...
pankajDev001/AngularDemo
src/app/layout/manage-modules/manage-modules-routing.module.ts
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { ManageModulesComponent } from './manage-modules.component'; const routes: Routes = [{ path: '', component: ManageModulesComponent }]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [Route...
pankajDev001/AngularDemo
src/app/layout/my-account/my-account.module.ts
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MyAccountRoutingModule } from './my-account-routing.module'; import { MyAccountComponent } from './my-account.component'; import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import {NgbDateParserFormatter, ...
pankajDev001/AngularDemo
src/app/verify-otp/verify-otp.module.ts
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { VerifyOtpRoutingModule } from './verify-otp-routing.module'; import { VerifyOtpComponent } from './verify-otp.component'; import { ReactiveFormsModule } from '@angular/forms'; import { NgxMaskModule } from 'ngx-mask'; @N...
pankajDev001/AngularDemo
src/app/patient-review/patient-review.component.ts
import { Component, OnInit } from '@angular/core'; import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {AuthService} from '../services/auth.service'; import {ToastrService} from 'ngx-toastr'; import {Title} from '@angular/platform-browser'; import {CommonService} from '../services/common.service';...
pankajDev001/AngularDemo
src/app/landing-page/landing-page.module.ts
<gh_stars>0 import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { LandingPageRoutingModule } from './landing-page-routing.module'; import { LandingPageComponent } from './landing-page.component'; import { CarouselModule } from 'ngx-owl-carousel-o'; import { ScrollSpyDirecti...
pankajDev001/AngularDemo
src/app/app-routing.module.ts
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { AuthGuard, VerifiedGuard } from './shared'; import {LoginGuard} from "./shared/guard/login.guard"; const routes: Routes = [ {path: 'home', loadChildren: () => import('./landing-page/landing-page.module').then...
pankajDev001/AngularDemo
src/app/layout/dashboard/agency-dashboard/agency-dashboard.module.ts
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { AgencyDashboardRoutingModule } from './agency-dashboard-routing.module'; import { AgencyDashboardComponent } from './agency-dashboard.component'; import { DataTablesModule } from 'angular-datatables'; import { FormsModule...
pankajDev001/AngularDemo
src/app/layout/manage-admins/manage-admins.component.ts
import { Component, OnInit, Output, EventEmitter, Renderer } from '@angular/core'; import { Title } from '@angular/platform-browser'; import { routerTransition } from '../../router.animations'; import {NgbModal, NgbModalOptions, NgbModalRef} from '@ng-bootstrap/ng-bootstrap'; import { CreateAdminComponent } from '../.....
pankajDev001/AngularDemo
src/app/signup/signup.component.ts
<filename>src/app/signup/signup.component.ts import { Component, OnInit } from '@angular/core'; import { routerTransition } from '../router.animations'; import { Title } from '@angular/platform-browser'; import { AuthService } from '../services/auth.service'; import { ToastrService } from 'ngx-toastr'; import { FormBui...
pankajDev001/AngularDemo
src/app/modals/cancel-visit/cancel-visit.component.spec.ts
<filename>src/app/modals/cancel-visit/cancel-visit.component.spec.ts import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { CancelVisitComponent } from './cancel-visit.component'; describe('CancelVisitComponent', () => { let component: CancelVisitComponent; let fixture: ComponentFixtur...
pankajDev001/AngularDemo
src/app/modals/completed-review/completed-review.component.ts
import { Component, OnInit, Input, Output } from '@angular/core'; import { ToastrService } from 'ngx-toastr'; import { AuthService } from 'src/app/services/auth.service'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { EventEmitter } from 'protractor'; @Component({ selector: 'app-completed-review', ...
pankajDev001/AngularDemo
src/app/modals/cancel-visit/cancel-visit.component.ts
<filename>src/app/modals/cancel-visit/cancel-visit.component.ts import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; import {DatePipe} from '@angular/common'; import {AuthService} from '../../services/auth.service'; import {NgbModal} from '@ng-bootstrap/ng-bootstrap'; import {ToastrService} fro...
pankajDev001/AngularDemo
src/app/layout/patients/patients.component.ts
import { Component, OnInit, Renderer, Output, EventEmitter } from '@angular/core'; import { routerTransition } from '../../router.animations'; import { NgbModal, NgbModalRef, NgbModalOptions } from '@ng-bootstrap/ng-bootstrap'; import { AuthService } from 'src/app/services/auth.service'; import { ToastrService } from '...
pankajDev001/AngularDemo
src/app/layout/scheduled-visits/scheduled-visits.component.ts
import { Component, OnInit, Renderer, Output, EventEmitter } from '@angular/core'; import { routerTransition } from '../../router.animations'; import { AuthService } from 'src/app/services/auth.service'; import { ToastrService } from 'ngx-toastr'; import { Title } from '@angular/platform-browser'; import { environment ...
pankajDev001/AngularDemo
src/app/app.module.ts
<reponame>pankajDev001/AngularDemo import { CommonModule } from '@angular/common'; import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-b...
pankajDev001/AngularDemo
src/app/layout/scheduled-visits/scheduled-visits.module.ts
<reponame>pankajDev001/AngularDemo import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ScheduledVisitsRoutingModule } from './scheduled-visits-routing.module'; import { ScheduledVisitsComponent } from './scheduled-visits.component'; import { DataTablesMod...
pankajDev001/AngularDemo
src/app/shared/guard/verified.guard.spec.ts
import { TestBed, async, inject } from '@angular/core/testing'; import { VerifiedGuard } from './verified.guard'; describe('VerifiedGuard', () => { beforeEach(() => { TestBed.configureTestingModule({ providers: [VerifiedGuard] }); }); it('should ...', inject([VerifiedGuard], (guard: VerifiedGuard...
pankajDev001/AngularDemo
src/app/layout/user-fee-settings/user-fee-settings.component.ts
<gh_stars>0 import { Component, OnInit } from '@angular/core'; import { Title } from '@angular/platform-browser'; import { AuthService } from 'src/app/services/auth.service'; import { ToastrService } from 'ngx-toastr'; import { Subject } from 'rxjs'; import {FormGroup, FormArray, FormBuilder, Validators} from '@angular...
pankajDev001/AngularDemo
src/app/modals/shared.module.ts
<reponame>pankajDev001/AngularDemo<gh_stars>0 import { NgModule } from '@angular/core'; import {NgbDateParserFormatter, NgbModule} from '@ng-bootstrap/ng-bootstrap'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; import { CommonModule } from '@angular/...
pankajDev001/AngularDemo
src/app/reset-password/reset-password.component.ts
import { Component, OnInit } from '@angular/core'; import { routerTransition } from '../router.animations'; import { FormBuilder, Validators } from '@angular/forms'; import { AuthService } from '../services/auth.service'; import { CommonService } from '../services/common.service'; import { Router, ActivatedRoute } from...
pankajDev001/AngularDemo
src/app/modals/show-zipcodes/show-zipcodes.component.ts
import {Component, Input, OnInit} from '@angular/core'; import {NgbModal} from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'app-show-zipcodes', templateUrl: './show-zipcodes.component.html', styleUrls: ['./show-zipcodes.component.scss'] }) export class ShowZipcodesComponent implements OnInit { @Input(...
pankajDev001/AngularDemo
src/app/modals/edit-admin/edit-admin.component.ts
<reponame>pankajDev001/AngularDemo import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import { AuthService } from 'src/app/services/auth.service'; import { FormBuilder, Validators, FormGroup, FormControl } from '@angular/fo...
pankajDev001/AngularDemo
src/app/layout/clinicians/clinician-details/clinician-details.component.ts
import {Component, OnInit, Renderer} from '@angular/core'; import { routerTransition } from '../../../router.animations'; import { Title } from '@angular/platform-browser'; import {ActivatedRoute, Router} from '@angular/router'; import {AuthService} from '../../../services/auth.service'; import {ToastrService} from 'ng...
pankajDev001/AngularDemo
src/app/app.component.ts
import { Component, OnInit } from '@angular/core'; import { MalihuScrollbarService } from 'ngx-malihu-scrollbar'; import * as signalR from "@aspnet/signalr"; import { HubConnection } from '@aspnet/signalr'; import {ToastrService} from "ngx-toastr"; @Component({ selector: 'app-root', templateUrl: './app.compone...
pankajDev001/AngularDemo
src/app/modals/edit-agency/edit-agency.component.ts
<reponame>pankajDev001/AngularDemo import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import {FormBuilder, Validators, FormGroup, FormControl} from '@angular/forms'; import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import { AuthService } from '../../services/auth.service'...