repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
lucas-barbosa/frontend-challenge
foton-books/src/components/ReviewCard/styles.ts
<gh_stars>0 import styled from 'styled-components'; export const Wrapper = styled.a` max-width: 335px; width: 100%; display: flex; `; export const Image = styled.img` border-radius: 5px 5px 0 0; `;
lucas-barbosa/frontend-challenge
foton-books/src/styles/fonts.ts
import { css } from 'styled-components'; export const SFProDisplay = css` @font-face { font-family: 'SFProDisplay'; font-style: normal; font-weight: 300; src: local('SFProDisplay Light'), local('SFProDisplay Light'), url('/fonts/SFProDisplay/SFProDisplay-Light.woff') format('woff'); } @fon...
lucas-barbosa/frontend-challenge
foton-books/src/components/NewBookCard/styles.ts
<reponame>lucas-barbosa/frontend-challenge import styled, { css } from 'styled-components'; import * as Symbols from 'components/Symbols/styles'; type WrapperProps = { active?: boolean; }; const WrapperModifiers = { active: css` background: #00173d; transform: scale(1.05); ` }; export const Wrapper = s...
lucas-barbosa/frontend-challenge
foton-books/src/templates/Book/styles.ts
import styled, { css } from 'styled-components'; import * as BookActionStyles from 'components/BookActions/styles'; import * as SymbolStyles from 'components/Symbols/styles'; export const Wrapper = styled.article` ${({ theme }) => css` ${BookActionStyles.Wrapper} { position: fixed; bottom: 55px; ...
lucas-barbosa/frontend-challenge
foton-books/src/components/BottomMenu/styles.ts
<gh_stars>0 import styled, { css } from 'styled-components'; export const Wrapper = styled.footer` background: #fff; width: 100%; `; export const Nav = styled.nav` display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; `; type LinkProps = { active?: boolean; }; export const Link = sty...
lucas-barbosa/frontend-challenge
foton-books/src/types/book.ts
<gh_stars>0 export type BookProps = { id: string; title: string; subtitle?: string; author?: string; description?: string; cover?: string; };
lucas-barbosa/frontend-challenge
foton-books/src/components/BookCard/styles.ts
import styled, { css } from 'styled-components'; export const Wrapper = styled.article` color: #313131cc; max-width: 100px; `; export const Link = styled.a` display: flex; text-decoration: none; `; export const Image = styled.img` ${({ theme }) => css` border-radius: ${theme.border.radius}; box-sha...
lucas-barbosa/frontend-challenge
foton-books/src/components/SearchForm/stories.tsx
import { Story, Meta } from '@storybook/react/types-6-0'; import SearchForm from '.'; export default { title: 'SearchForm', component: SearchForm } as Meta; export const Default: Story = (args) => <SearchForm {...args} />;
lucas-barbosa/frontend-challenge
foton-books/src/services/bookService.ts
<reponame>lucas-barbosa/frontend-challenge import axios from 'axios'; import { BookProps } from 'types/book'; const API_URL = 'https://www.googleapis.com/books/v1/volumes'; type BookResponseData = { id: string; volumeInfo: { title: string; subtitle: string; authors: string[]; description: string; ...
lucas-barbosa/frontend-challenge
foton-books/src/styles/theme.ts
<reponame>lucas-barbosa/frontend-challenge export default { border: { radius: '5px' }, font: { family: 'SFProText, -apple-system, BlinkMacSystemFont, Roboto, sans-serif', weights: { light: 300, normal: 400, bold: 600 }, types: { text: 'SFProText', display: 'SFProD...
lucas-barbosa/frontend-challenge
foton-books/src/components/SearchForm/styles.ts
<gh_stars>0 import styled, { css } from 'styled-components'; export const Wrapper = styled.div` background: #fdfcfc; border-radius: 10px; box-shadow: 5px 5px 80px rgba(212, 173, 134, 0.122623); display: flex; align-items: center; padding: 0 15px; label { display: flex; } :focus-within { box...
lucas-barbosa/frontend-challenge
foton-books/src/components/ReviewCard/test.tsx
<filename>foton-books/src/components/ReviewCard/test.tsx import { screen } from '@testing-library/react'; import { renderWithTheme } from 'utils/helpers'; import ReviewCard from '.'; import mock from './mock'; describe('<ReviewCard />', () => { it('should render a cover', () => { renderWithTheme(<ReviewCard {.....
lucas-barbosa/frontend-challenge
foton-books/src/components/BottomMenu/stories.tsx
<reponame>lucas-barbosa/frontend-challenge import { Story, Meta } from '@storybook/react/types-6-0'; import BottomMenu from '.'; export default { title: 'BottomMenu', component: BottomMenu } as Meta; export const Default: Story = (args) => <BottomMenu {...args} />;
lucas-barbosa/frontend-challenge
foton-books/src/components/CurrentlyReadingCard/test.tsx
<reponame>lucas-barbosa/frontend-challenge import { screen } from '@testing-library/react'; import { renderWithTheme } from 'utils/helpers'; import CurrentlyReadingCard from '.'; import mock from './mock'; describe('<CurrentlyReadingCard />', () => { it('should render cover, title, author, currently chapter and tot...
lucas-barbosa/frontend-challenge
foton-books/src/pages/_app.tsx
import type { AppProps } from 'next/app'; import Head from 'next/head'; import NextNprogress from 'nextjs-progressbar'; import { ThemeProvider } from 'styled-components'; import GlobalStyles from 'styles/global'; import theme from 'styles/theme'; function MyApp({ Component, pageProps }: AppProps) { return ( <Th...
lucas-barbosa/frontend-challenge
foton-books/src/components/Grid/index.tsx
import styled from 'styled-components'; const Grid = styled.div` display: grid; grid-template-columns: repeat(auto-fit, 100px); justify-content: center; gap: 17px; margin: 40px 0; @media (min-width: 550px) { gap: 30px; } `; export default Grid;
lucas-barbosa/frontend-challenge
foton-books/src/components/BookActions/test.tsx
<reponame>lucas-barbosa/frontend-challenge import { screen } from '@testing-library/react'; import { renderWithTheme } from 'utils/helpers'; import BookActions from '.'; describe('<BookActions />', () => { it('should render a read, listen and share button', () => { renderWithTheme(<BookActions />); expect(...
lucas-barbosa/frontend-challenge
foton-books/src/components/ErrorMessage/index.tsx
import styled, { css } from 'styled-components'; const ErrorMessage = styled.p` ${({ theme }) => css` color: #ff6978; font-family: ${theme.font.types.display}; font-size: ${theme.font.sizes.normal}; letter-spacing: 0.5px; `} `; export default ErrorMessage;
lucas-barbosa/frontend-challenge
foton-books/src/templates/Base/index.tsx
<gh_stars>0 import { useEffect, useMemo } from 'react'; import { useRouter } from 'next/router'; import { useQueryState } from 'next-usequerystate'; import debounce from 'lodash.debounce'; import BottomMenu from 'components/BottomMenu'; import SearchForm from 'components/SearchForm'; import Container from 'components/...
lucas-barbosa/frontend-challenge
foton-books/src/components/ReviewCard/mock.ts
export default { cover: '/images/review.png', link: '/' };
aizamjj/ingenuity
hashTable.test.ts
describe('hashTable', function() { var hashTable; var people = [['Steven', 'Tyler'], ['George', 'Harrison'], ['Mr.', 'Doob'], ['Dr.', 'Sunshine'], ['John', 'Resig'], ['Brendan', 'Eich'], ['Alan', 'Turing']]; beforeEach(function() { hashTable = new HashTable(); }); it('should have methods named "insert"...
aizamjj/ingenuity
recursion/coin-sum.ts
<reponame>aizamjj/ingenuity<filename>recursion/coin-sum.ts const makeChange = (total) => { const count = 0; const coins = [200, 200, 50, 20, 10, 5, 2, 1]; const recurse = (currentTotal, coinIndex) => { if (currentTotal === total) { count++; } if (currentTotal < total) { for (let i = coinI...
aizamjj/ingenuity
hashTable.ts
var HashTable = function() { this._limit = 8; this._storage = LimitedArray(this._limit); }; HashTable.prototype.insert = function(k, v) { var index = getIndexBelowMaxForKey(k, this._limit); }; HashTable.prototype.retrieve = function(k) { var index = getIndexBelowMaxForKey(k, this._limit); }; HashTable.prot...
aizamjj/ingenuity
binarySearchTree.ts
var BinarySearchTree = function(value) { }; /* * Complexity: What is the time complexity of the above functions? */
aizamjj/ingenuity
queue.ts
<gh_stars>0 class Queue<T> { private storage: T; private readonly maxSize: number; public constructor(maxSize: number) { // create storage container object for the unique values of each object instance this.storage = {}; // create a head variable and set to 0 this.head = 0; // create a tail...
aizamjj/ingenuity
total-sales/total-sales.ts
interface Employee { name: string; individualSales: number; leadsInProgress: number; manages: Employee[]; } function findTotalSales(employee: Employee, total: number=0): number { if(employee?.manages) { for (const e of employee.manages) { return findTotalSales(e, employee.individualSales + total)...
aizamjj/ingenuity
set.test.ts
describe('set', function() { var set; beforeEach(function() { set = Set(); }); it('should have methods named "add", "contains", and "remove"', function() { expect(set.add).to.be.a('function'); expect(set.contains).to.be.a('function'); expect(set.remove).to.be.a('function'); }); it('should...
aizamjj/ingenuity
freedomTrail.ts
function mod(x, m) { return (x % m + m) % m; } console.log(mod(2, 5)) function fill(n, s) { let array = []; while (n > 0) { array.push(s) n--; } return array.concat('.'); } function solve(ring: string, key: string, keyIndex: number, ringIndex: number): string[] { if (keyIndex === key.length) ...
aizamjj/ingenuity
total-sales/total-sales.test.ts
<filename>total-sales/total-sales.test.ts const totalSum = require('./total-sales') test('returns total when there is one employee', () => { expect(totalSum({ name: '<NAME>', individualSales: 20, leadsInProgress: 10, manages: [] })).toBe(20); }) test('returns total', () => { const salesTeam = { ...
aizamjj/ingenuity
stack.ts
<filename>stack.ts interface IStackNode<T> { item: T | null; next: IStackNode<T> | null; } interface IStack<T> { push(item: T): void; pop(): T | undefined; peek(): T | undefined; size(): number; } class Stack<T> implements IStack<T> { private storage: T[] = []; constructor(private maxSize: number = Inf...
aizamjj/ingenuity
linkedList.ts
// Singly LinkedList with Sentinel Nodes // Empty list would contain two pointers, head and tail, that are sentinel nodes with head pointing to // tail. interface INode<T> { value: T | null; next: INode<T> | null; } class LinkedListNode<T> implements INode<T> { value: T | null; next: INode<T> | null; constr...
aizamjj/ingenuity
linkedList.test.ts
import { LinkedList } from './linkedList'; describe('linkedList', function() { var linkedList; beforeEach(function() { linkedList = new LinkedList(); }); it('should have a head and tail', function() { expect(linkedList).toHaveProperty('head'); expect(linkedList).toHaveProperty('tail'); }); i...
aizamjj/ingenuity
graph.test.ts
<reponame>aizamjj/ingenuity describe('graph', function() { var graph; beforeEach(function() { graph = new Graph(); }); it('should have methods named "addNode", "contains", "removeNode", "addEdge", "hasEdge", "removeEdge" and "forEachNode"', function() { expect(graph.addNode).to.be.a('function'); e...
aizamjj/ingenuity
binarySearchTree.test.ts
describe('binarySearchTree', function() { var binarySearchTree; beforeEach(function() { binarySearchTree = BinarySearchTree(5); }); it('should have methods named "insert", "contains", and "depthFirstLog', function() { expect(binarySearchTree.insert).to.be.a('function'); expect(binarySearchTree.con...
aizamjj/ingenuity
set.ts
var Set = function() { var set = Object.create(setPrototype); set.storage = {}; // fix me return set; }; var setPrototype = {}; // O(1) setPrototype.add = function(item) { if (!this.storage.item) { // store the new item at the current set storage this.storage.item = item; } }; // O(1) setPrototype....
aizamjj/ingenuity
tree.ts
var Tree = function(value) { var newTree = {}; newTree.value = value; // your code here newTree.children = []; // newTree.addChild = treeMethods.addChild; // newTree.contains = treeMethods.contains; _.extend(newTree, treeMethods); return newTree; }; var treeMethods = {}; treeMethods.addChild = func...
aizamjj/ingenuity
queue.test.ts
<filename>queue.test.ts import { Queue } from './queue' import { Stack } from './stack' describe('stack', function() { const stack = new Stack() beforeEach(function() { }); describe('stack shared behavior', function() { it('reports a size of zero for a new stack', function() { expect(stac...
aizamjj/ingenuity
graph.ts
<filename>graph.ts interface IGraph { } class Graph = function() { // create a variable called newGraph for a new instance and set to empty this.newGraph = {}; // graph will have properties at Graph.prototype }; // Add a node to the graph, passing in the node's value. Graph.prototype.addNode = function(node) ...
jymfony/angular-universal-bridge
lib/Module/AngularUniversalBridgeModule.d.ts
<filename>lib/Module/AngularUniversalBridgeModule.d.ts export declare class AngularUniversalBridgeModule { }
jymfony/angular-universal-bridge
src/Service/ServerResponse.ts
import { Inject, Optional } from '@angular/core'; import { Cookie } from './Cookie'; import Http = require('../Injection/Http'); declare var Jymfony: any; export class ServerResponse { constructor(@Optional() @Inject(Http.RESPONSE) private _serverResponse: any) { } /** * Adds an header to the response. ...
jymfony/angular-universal-bridge
lib/Module/AngularUniversalBridgeModule.ngfactory.d.ts
<reponame>jymfony/angular-universal-bridge<filename>lib/Module/AngularUniversalBridgeModule.ngfactory.d.ts<gh_stars>1-10 import * as i0 from '@angular/core'; import * as i1 from './AngularUniversalBridgeModule'; export declare const AngularUniversalBridgeModuleNgFactory: i0.NgModuleFactory<i1.AngularUniversalBridgeModu...
jymfony/angular-universal-bridge
src/public_api.ts
<reponame>jymfony/angular-universal-bridge<filename>src/public_api.ts import Http = require('./Injection/Http'); import Di = require('./Injection/DependencyInjection'); const { RESPONSE, REQUEST } = Http; const { CONTAINER } = Di; export { RESPONSE, REQUEST }; export { CONTAINER }; export * from './Service/ServerResp...
jymfony/angular-universal-bridge
lib/Service/Cookie.d.ts
export interface Cookie { /** * The name of the cookie. */ name: string; /** * The value of the cookie. */ value?: string; /** * The time the cookie expires (unix time). */ expire?: number; /** * The path on the server in which the cookie will be available ...
jymfony/angular-universal-bridge
src/Injection/DependencyInjection.ts
<filename>src/Injection/DependencyInjection.ts<gh_stars>1-10 import { InjectionToken } from '@angular/core'; export var CONTAINER = new InjectionToken<any>('JymfonyContainer');
jymfony/angular-universal-bridge
lib/Service/ServerResponse.d.ts
<filename>lib/Service/ServerResponse.d.ts import { Cookie } from './Cookie'; export declare class ServerResponse { private _serverResponse; constructor(_serverResponse: any); /** * Adds an header to the response. */ setHeader(name: string, content: string, replace?: boolean): void; /** ...
jymfony/angular-universal-bridge
src/Injection/Http.ts
import { InjectionToken } from '@angular/core'; export var REQUEST = new InjectionToken<any>('JymfonyRequest'); export var RESPONSE = new InjectionToken<any>('JymfonyResponse');
jymfony/angular-universal-bridge
src/Module/AngularUniversalBridgeModule.ts
import { NgModule } from '@angular/core'; import { ServerResponse } from '../Service/ServerResponse'; @NgModule({ providers: [ ServerResponse, ], }) export class AngularUniversalBridgeModule { }
jymfony/angular-universal-bridge
lib/Injection/Http.d.ts
import { InjectionToken } from '@angular/core'; export declare var REQUEST: InjectionToken<any>; export declare var RESPONSE: InjectionToken<any>;
jymfony/angular-universal-bridge
lib/public_api.d.ts
declare const RESPONSE: import("@angular/core").InjectionToken<any>, REQUEST: import("@angular/core").InjectionToken<any>; declare const CONTAINER: import("@angular/core").InjectionToken<any>; export { RESPONSE, REQUEST }; export { CONTAINER }; export * from './Service/ServerResponse'; export * from './Module/AngularUn...
PedroBarata/controle-ponto
src/app/services/auth.service.ts
<filename>src/app/services/auth.service.ts import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Subject } from 'rxjs'; import { environment } from '../../environments/environment'; import { User } from '../model/user.model'; // const BACKEND_URL = environment.apiUrl ...
PedroBarata/controle-ponto
src/environments/environment.prod.ts
<gh_stars>0 export const environment = { production: true, apiUrl: "https://controle-ponto-7d91e.firebaseio.com/" };
PedroBarata/controle-ponto
src/app/services/error.service.ts
import { Injectable } from "@angular/core"; import { Subject } from "rxjs"; import { TranslateService } from "@ngx-translate/core"; @Injectable({ providedIn: "root" }) export class ErrorService { constructor(private translate: TranslateService) {} formatErrorMessage(error: string) { if (error === "INVALID_E...
PedroBarata/controle-ponto
src/app/views/auth/login/login.component.ts
<gh_stars>0 import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { FormGroup, FormControl, Validators } from '@angular/forms'; import { UtilsService } from 'src/app/services/utils.service'; import { AuthService } from 'src/app/services/auth.service'; @Component({ select...
PedroBarata/controle-ponto
src/app/app.component.ts
import { Component, OnDestroy, OnInit } from "@angular/core"; import { Subscription } from "rxjs"; import { NotificationUI } from "./model/notification.ui"; import { UtilsService } from "./services/utils.service"; import { AuthService } from './services/auth.service'; @Component({ selector: "app-root", templateUrl...
PedroBarata/controle-ponto
src/app/commons/shared.module.ts
<filename>src/app/commons/shared.module.ts import { CommonModule } from "@angular/common"; import { HttpClient, HttpClientModule } from "@angular/common/http"; import { NgModule } from "@angular/core"; import { FormsModule, ReactiveFormsModule } from "@angular/forms"; import { RouterModule } from "@angular/router"; imp...
PedroBarata/controle-ponto
src/app/views/graph/graph-view/graph-view.page.ts
<reponame>PedroBarata/controle-ponto import { Component, OnInit } from '@angular/core'; import { Ponto } from 'src/app/model/ponto.model'; import { ActionService } from 'src/app/services/action.service'; import { AuthService } from 'src/app/services/auth.service'; import { GoogleChartInterface } from 'ng2-google-charts...
PedroBarata/controle-ponto
src/app/services/date.service.ts
<reponame>PedroBarata/controle-ponto import { Injectable } from "@angular/core"; import { Subject } from "rxjs"; import { TranslateService } from "@ngx-translate/core"; @Injectable({ providedIn: "root" }) export class DateService { private _monthNames = [ "january", "february", "march", "april", ...
PedroBarata/controle-ponto
src/app/services/action.service.ts
<filename>src/app/services/action.service.ts import { Status, Ponto } from "../model/ponto.model"; import { UtilsService } from "./utils.service"; import { TypeNotifcation } from "../model/notification.ui"; import { environment } from "src/environments/environment"; import { HttpClient } from "@angular/common/http"; im...
PedroBarata/controle-ponto
src/app/commons/components/page-subheader/page-subheader.component.ts
import { Component, OnInit, Input } from "@angular/core"; import { DateService } from "src/app/services/date.service"; import { AuthService } from 'src/app/services/auth.service'; @Component({ selector: "app-page-subheader", templateUrl: "./page-subheader.component.html", styleUrls: ["./page-subheader.component....
PedroBarata/controle-ponto
src/app/commons/shared/interceptors/auth.interceptor.ts
import { HttpHandler, HttpInterceptor, HttpRequest, HttpHeaders } from "@angular/common/http"; import { Injectable } from "@angular/core"; import { AuthService } from "src/app/services/auth.service"; @Injectable() export class AuthInterceptor implements HttpInterceptor { constructor(private authService: Auth...
PedroBarata/controle-ponto
src/app/views/home/home.module.ts
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { HomeRoutingModule } from './home-routing.module'; import { DefaultHomeComponent } from './default-home/default-home.component'; import { SharedModule } from 'src/app/commons/shared.module'; import { TimeControllerCompone...
PedroBarata/controle-ponto
src/app/commons/components/notification/notification.component.ts
<reponame>PedroBarata/controle-ponto import { Component, Input, OnInit } from '@angular/core'; import { TypeNotifcation, NotificationUI } from 'src/app/model/notification.ui'; @Component({ selector: 'app-notification', templateUrl: './notification.component.html', styleUrls: ['./notification.component.scss'], })...
PedroBarata/controle-ponto
src/app/app.module.ts
<gh_stars>0 import { CommonModule } from "@angular/common"; import { HttpClientModule, HTTP_INTERCEPTORS } from "@angular/common/http"; import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; im...
PedroBarata/controle-ponto
src/app/services/utils.service.ts
<reponame>PedroBarata/controle-ponto<filename>src/app/services/utils.service.ts import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; import { NotificationUI, TypeNotifcation } from '../model/notification.ui'; @Injectable({ providedIn: 'root', }) export class UtilsService { private _loadingLi...
PedroBarata/controle-ponto
src/app/model/notification.ui.ts
<filename>src/app/model/notification.ui.ts export enum TypeNotifcation { "success", "info", "danger", "warning" } export interface NotificationUI { msg?: string, type?: TypeNotifcation, isPresent: boolean }
PedroBarata/controle-ponto
src/app/commons/layout/layout.module.ts
<reponame>PedroBarata/controle-ponto<filename>src/app/commons/layout/layout.module.ts import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { BlankLayoutComponent } from './blank-layout/blank-layout.component'; import { AuthLayoutComponent } from './auth-layout/auth-layout.co...
PedroBarata/controle-ponto
src/app/commons/shared/interceptors/error.interceptor.ts
<gh_stars>0 import { HttpInterceptor, HttpRequest, HttpHandler, HttpErrorResponse } from "@angular/common/http"; import { throwError } from "rxjs"; import { catchError } from "rxjs/operators"; import { Injectable } from "@angular/core"; import { UtilsService } from "src/app/services/utils.service"; import { Typ...
PedroBarata/controle-ponto
src/app/model/ponto.model.ts
export enum Status { "Started", "Paused", "Returned", "Stopped" } export interface Ponto { id: string, userId: string, entrada?: string; saida?: string; status: Status; inicioAlmoco?: string; voltaAlmoco?: string; mes: number; }
PedroBarata/controle-ponto
src/app/views/home/default-home/default-home.component.ts
<reponame>PedroBarata/controle-ponto<filename>src/app/views/home/default-home/default-home.component.ts import { Component, OnInit } from '@angular/core'; import { Status, Ponto } from 'src/app/model/ponto.model'; import { ActionService } from 'src/app/services/action.service'; import { AuthService } from 'src/app/serv...
PedroBarata/controle-ponto
src/app/app-routing.module.ts
import { NgModule } from "@angular/core"; import { Routes, RouterModule } from "@angular/router"; import { BlankLayoutComponent } from "./commons/layout/blank-layout/blank-layout.component"; import { AuthLayoutComponent } from "./commons/layout/auth-layout/auth-layout.component"; import { AdminLayoutComponent } from "....
PedroBarata/controle-ponto
src/app/views/graph/graph.module.ts
<filename>src/app/views/graph/graph.module.ts import { NgModule } from "@angular/core"; import { CommonModule } from "@angular/common"; import { SharedModule } from "src/app/commons/shared.module"; import { GraphRoutingModule } from "./graph-routing.module"; import { GraphViewPage } from "./graph-view/graph-view.page";...
PedroBarata/controle-ponto
src/app/commons/layout/admin-layout/admin-layout.component.ts
import { Component, OnInit, OnDestroy } from "@angular/core"; import { Subscription } from "rxjs"; import { NotificationUI } from "src/app/model/notification.ui"; import { UtilsService } from "src/app/services/utils.service"; @Component({ selector: "app-layout", templateUrl: "./admin-layout.component.html", styl...
PedroBarata/controle-ponto
src/app/commons/layout/blank-layout/blank-layout.component.ts
import { Component, OnInit, OnDestroy } from "@angular/core"; import { Router } from "@angular/router"; import { Subscription } from "rxjs"; import { AuthService } from "src/app/services/auth.service"; @Component({ selector: "app-blank-layout", templateUrl: "./blank-layout.component.html", styles: [] }) export c...
PedroBarata/controle-ponto
src/app/commons/layout/components/date-picker/date-picker.component.ts
<filename>src/app/commons/layout/components/date-picker/date-picker.component.ts import { Component, OnInit, Input } from "@angular/core"; import { FormGroup } from "@angular/forms"; @Component({ selector: "app-date-picker", templateUrl: "./date-picker.component.html", styleUrls: ["./date-picker.component.scss"]...
PedroBarata/controle-ponto
src/app/views/home/components/time-controller/time-controller.component.ts
import { Component, OnInit, Output, EventEmitter, Input } from "@angular/core"; import { Status, Ponto } from "src/app/model/ponto.model"; @Component({ selector: "app-time-controller", templateUrl: "./time-controller.component.html", styleUrls: ["./time-controller.component.scss"] }) export class TimeControllerC...
DrSensor/example-vue-component-rust
src/shims-wasm.d.ts
declare module '*.rs' { global { namespace WebAssembly { class Instance { readonly exports: { [key: string]: any } constructor() } } } const loadWasm: () => Promise<{ instance: WebAssembly.Instance }> export default loadWasm } declare module '*.asc' { const loadWasm...
Flambe/discord-nestjs
packages/core/decorator/use-pipes.decorator.ts
import { DecoratorConstant } from '../constant/decorator.constant'; import { DiscordPipeTransform } from './interface/discord-pipe-transform'; /** * UsePipes decorator */ export const UsePipes = ( ...pipes: (DiscordPipeTransform | Function)[] ): MethodDecorator => { return ( target: Record<string, any>, ...
Flambe/discord-nestjs
packages/core/resolver/client.resolver.ts
<filename>packages/core/resolver/client.resolver.ts import { Injectable } from '@nestjs/common'; import { ReflectMetadataProvider } from '../provider/reflect-metadata.provider'; import { DiscordClientProvider } from '../provider/discord-client-provider'; import { ClassResolveOptions } from './interface/class-resolve-op...
Flambe/discord-nestjs
packages/core/provider/discord-client-provider.ts
<reponame>Flambe/discord-nestjs import { ClientProvider } from './interface/client-provider.interface'; import { Client, WebhookClient } from 'discord.js'; import { Injectable } from '@nestjs/common'; import { DiscordService } from '../service/discord.service'; @Injectable() export class DiscordClientProvider implemen...
Flambe/discord-nestjs
packages/core/decorator/transform-to-user.decorator.ts
<reponame>Flambe/discord-nestjs import { DecoratorConstant } from '../constant/decorator.constant'; import { TransformToUserOptions } from './interface/transform-to-user-options'; /** * Transform user alias to user object */ export const TransformToUser = (options: TransformToUserOptions = {throwError: false}): Prop...
Flambe/discord-nestjs
packages/core/decorator/on.decorator.ts
<filename>packages/core/decorator/on.decorator.ts<gh_stars>0 import { DecoratorConstant } from '../constant/decorator.constant'; import { OnDecoratorOptions } from './interface/on-decorator-options'; /** * On event decorator */ export const On = (options: OnDecoratorOptions): MethodDecorator => { return ( targ...
Flambe/discord-nestjs
packages/core/discord.module.ts
import { DynamicModule, Module, Provider } from '@nestjs/common'; import { DiscoveryModule } from '@nestjs/core'; import { DiscordModuleAsyncOptions } from './interface/discord-module-async-options'; import { DiscordOptionsFactory } from './interface/discord-options-factory'; import { ModuleConstant } from './constant/...
Flambe/discord-nestjs
packages/core/service/discord-access.service.ts
<gh_stars>0 import { Injectable } from '@nestjs/common'; import { DiscordService } from './discord.service'; import { DiscordModuleCommandOptions } from '../interface/discord-module-command-options'; import { Message } from 'discord.js'; @Injectable() export class DiscordAccessService { constructor( private read...
Flambe/discord-nestjs
packages/core/service/discord-handler.service.ts
<filename>packages/core/service/discord-handler.service.ts import { Injectable } from '@nestjs/common'; @Injectable() export class DiscordHandlerService { callHandler( instance: unknown, methodName: string, params: any ): void { instance[methodName](...params); } }
Flambe/discord-nestjs
packages/core/resolver/param.resolver.ts
<gh_stars>0 import { Injectable } from '@nestjs/common'; import { ReflectMetadataProvider } from '../provider/reflect-metadata.provider'; import { DiscordParamList } from './interface/discord-param-list'; import { DecoratorParamType } from '../constant/decorator-param-type'; import { DecoratorTypeArg } from './interfac...
Flambe/discord-nestjs
packages/common/index.ts
export * from './pipe/transform.pipe'; export * from './pipe/validation.pipe';
Flambe/discord-nestjs
packages/core/decorator/interface/arg-num-options.ts
export interface ArgNumOptions { /** * Position index form input */ position: number; }
Flambe/discord-nestjs
packages/core/interface/discord-module-command-options.ts
export interface DiscordModuleCommandOptions { /** * Command name from gateway */ name: string; /** * List of channel identifiers with which the command will work */ channels?: string[]; /** * List of user identifiers with which the command will work */ users?: string[]; }
Flambe/discord-nestjs
packages/core/decorator/interface/arg-range-options.ts
export interface ArgRangeOptions { /** * Start index position form input */ formPosition: number; /** * Finish index position form input */ toPosition?: number; }
Flambe/discord-nestjs
packages/core/constant/module.constant.ts
<filename>packages/core/constant/module.constant.ts export enum ModuleConstant { DISCORD_MODULE_OPTIONS = 'DISCORD_MODULE_OPTIONS' }
Flambe/discord-nestjs
packages/core/decorator/once.decorator.ts
<filename>packages/core/decorator/once.decorator.ts import { OnDecoratorOptions } from './interface/on-decorator-options'; import { DecoratorConstant } from '../constant/decorator.constant'; /** * Once handle event decorator */ export const Once = (options: OnDecoratorOptions): MethodDecorator => { return ( ta...
Flambe/discord-nestjs
packages/core/util/type/pipe-type.ts
import { DiscordPipeTransform } from '../../decorator/interface/discord-pipe-transform'; import { ConstructorType } from './constructor-type'; /** * Pipe type */ export type PipeType = DiscordPipeTransform | ConstructorType;
Flambe/discord-nestjs
packages/core/decorator/interface/discord-pipe-transform.ts
<filename>packages/core/decorator/interface/discord-pipe-transform.ts import { ClientEvents } from 'discord.js'; import { ConstructorType } from '../../util/type/constructor-type'; /** * Base pipe interface */ export interface DiscordPipeTransform<T = any, D = any> { transform( event: keyof ClientEvents, c...
Flambe/discord-nestjs
packages/common/pipe/transform.pipe.ts
import { ClientEvents } from 'discord.js'; import { Injectable } from '@nestjs/common'; import { ConstructorType, DiscordPipeTransform, TransformProvider } from '../../core'; @Injectable() export class TransformPipe implements DiscordPipeTransform { constructor( private readonly transformProvider: TransformProvi...
Flambe/discord-nestjs
packages/core/service/discord-catch.service.ts
import { Injectable } from '@nestjs/common'; import { ValidationProvider } from '../provider/validation.provider'; import { ValidationError } from 'class-validator'; import { DiscordAPIError, Message } from 'discord.js'; @Injectable() export class DiscordCatchService { constructor( private readonly validationPro...
Flambe/discord-nestjs
packages/core/resolver/interface/apply-property-option.ts
<reponame>Flambe/discord-nestjs import { ClientEvents } from 'discord.js'; export interface ApplyPropertyOption { instance: unknown; methodName: string; context: ClientEvents[keyof ClientEvents]; content?: string; }
Flambe/discord-nestjs
packages/core/decorator/use-guard.decorator.ts
import { DecoratorConstant } from '../constant/decorator.constant'; import { GuardType } from '../util/type/guard-type'; /** * UseGuards decorator */ export const UseGuards = ( ...guards: GuardType[] ): MethodDecorator => { return ( target: Record<string, any>, propertyKey: string | symbol, descripto...
Lucian1/itutor4u
src/app/model/app.center.ts
export class Center { Address: string Answer: string Area_Work: string City: string ContactPerson: string Email: string Id: number Mobile: string Name: string Password: string Question: string Status: string UserName: string message: string state: string z...
Lucian1/itutor4u
src/app/model/app.message.ts
<gh_stars>1-10 export class Message { Id: number = 0; fromType: string=''; fromId: string=''; toType: string=''; toId: string=''; time: string=''; subject: string=''; content: string=''; constructor() { } }
Lucian1/itutor4u
src/app/service/messageService/message-service.service.ts
<filename>src/app/service/messageService/message-service.service.ts import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { environment } from '../../../environments/environment'; import { map, catchError} from 'rxjs/operators'; import { throwError, Observabl...