repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
ES-UFABC/UFABCplanner
ufabc_planner-frontend/src/components/IconButton/index.ts
<reponame>ES-UFABC/UFABCplanner export { default as IconButton } from './IconButton.component'; export type { IconBtnType } from './IconButton.component';
ES-UFABC/UFABCplanner
ufabc_planner-backend/src/modules/quarters/services/GetQuarterByAcademicYearIdService.ts
import { Quarter } from '@prisma/client'; import { IDateProvider } from 'infra/container/providers/DateProvider/IDateProvider'; import { AppError } from 'infra/http/errors/AppError'; import { IAcademicYearRepository } from 'modules/academicYears/repositories/IAcademicYearRepository'; import { injectable, inject } from ...
ES-UFABC/UFABCplanner
ufabc_planner-frontend/src/pages/dashboard/index.ts
<reponame>ES-UFABC/UFABCplanner export { default as DashboardPage } from './DashboardPage.component';
ES-UFABC/UFABCplanner
ufabc_planner-frontend/src/components/MainLogo/MainLogo.component.tsx
import styles from './MainLogo.module.scss'; const MainLogo = () => { return ( <div className={styles.logo}> <img src="/UFABCplanner_logo.svg" alt="UFABCplanner_logo" width="200px" /> </div> ); } export default MainLogo;
ES-UFABC/UFABCplanner
ufabc_planner-frontend/src/components/InitialPageLayout/index.ts
export { default as InitialPageLayout } from './InitialPageLayout.component';
ES-UFABC/UFABCplanner
ufabc_planner-backend/src/modules/exams/controllers/GetExamsBySubjectIdController.ts
<gh_stars>1-10 import { Request, Response } from 'express'; import { validateInput } from 'infra/http/errors/validation'; import { container } from 'tsyringe'; import { GetExamsBySubjectIdDTO } from '../dtos/GetExamsBySubjectId.dto'; import { GetExamsBySubjectIdService } from '../services/GetExamsBySubjectIdService'; ...
ES-UFABC/UFABCplanner
ufabc_planner-backend/src/modules/quarters/services/UpdateQuarterService.ts
import { IDateProvider } from 'infra/container/providers/DateProvider/IDateProvider'; import { AppError } from 'infra/http/errors/AppError'; import { injectable, inject } from 'tsyringe'; import { createQuarterDTO } from '../dtos/CreateQuarter.dto.'; import { UpdateQuarterDTO } from '../dtos/UpdateQuarter.dto'; import ...
madhudskumar/ng2-music-app
app/music/albumbs.component.ts
import { Component } from '@angular/core'; @Component({ selector:'albumbs-component', template:` <h1>albumbs html</h1> ` }) export class albumbsComponent { }
madhudskumar/ng2-music-app
app/test/test.component.ts
<reponame>madhudskumar/ng2-music-app<filename>app/test/test.component.ts import { Component } from '@angular/core'; @Component({ selector:'test-component', template:` <h1>Test html</h1> ` }) export class testComponent { }
madhudskumar/ng2-music-app
app/models/country/country.interface.ts
export interface iCountry{ alpha2code : string; name : string; }
madhudskumar/ng2-music-app
app/common/header.component.ts
import { Component } from '@angular/core'; @Component({ selector:'header-component', template:` <h1>header component what ?</h1> ` }) export class headerComponent { }
madhudskumar/ng2-music-app
app/directives/forRange.directives.ts
<reponame>madhudskumar/ng2-music-app<gh_stars>0 import {Directive, Input, EmbeddedViewRef, TemplateRef, ViewContainerRef} from "@angular/core"; @Directive({ selector: '[forRange]' }) export class ForRangeDirective{ constructor( private _templateRef:TemplateRef, private _viewContainer:ViewConta...
madhudskumar/ng2-music-app
app/models/music/song.class.ts
<reponame>madhudskumar/ng2-music-app import { iSong } from './music.interface'; export class Song implements iSong { constructor(public name:string){ } }
madhudskumar/ng2-music-app
app/common/country.service.ts
<reponame>madhudskumar/ng2-music-app import { iCountry } from '../models/country/country.interface' import { Country } from '../models/country/country.class' import {Injectable} from "@angular/core"; import {Http} from "@angular/http"; import {Observable} from "rxjs/Rx"; @Injectable() export class counttryService{ ...
madhudskumar/ng2-music-app
app/models/country/country.class.ts
import { iCountry } from './country.interface'; export class Country implements iCountry { constructor( public alpha2code : string, public name : string ){} }
madhudskumar/ng2-music-app
app/user/regestration.component.ts
import { Component } from '@angular/core'; @Component({ selector:'reg-component', template:` <h1>registration</h1> ` }) export class regestrationComponent { }
madhudskumar/ng2-music-app
app/models/pagination/pager.interface.ts
<reponame>madhudskumar/ng2-music-app export interface iPage{ itemsPerPage: number; startIndex: number; totalResults: number; maxPages : number; }
madhudskumar/ng2-music-app
app/app.route.ts
<reponame>madhudskumar/ng2-music-app import { RouterConfig, provideRouter } from '@angular/router'; import { testComponent } from './test/test.component'; import { albumbComponent } from './music/albumb.component'; import { albumbsComponent } from './music/albumbs.component'; import { loginComponent } from './user/logi...
madhudskumar/ng2-music-app
app/common/welcome.component.ts
import { Component } from '@angular/core'; @Component({ selector:'welcome-component', template:` <h1 class="bg-success">welcome to the music app</h1> ` }) export class welcomeComponent { }
madhudskumar/ng2-music-app
app/models/user/user.class.ts
import { iUser } from './user.interface'; export class User implements iUser { username: string; email: string; password: string; country: string; birthday: Date; constructor(authData:any){ this.email = authData.password.email; } }
madhudskumar/ng2-music-app
app/main.ts
import { bootstrap } from '@angular/platform-browser-dynamic'; import { HTTP_PROVIDERS } from '@angular/http' import { appRouterProvider } from './app.route' import { AppComponent } from './app.component'; bootstrap(AppComponent,[ HTTP_PROVIDERS, appRouterProvider ]);
madhudskumar/ng2-music-app
app/music/music.service.ts
import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { Http } from '@angular/http'; import { iSong, iAlbumb } from './../models/music/music.interface'; import { Song } from './../models/music/song.class'; import { Albumb } from './../models/music/albumb.class'; import { iPage...
madhudskumar/ng2-music-app
app/music/albumb.component.ts
<filename>app/music/albumb.component.ts import { Component } from '@angular/core'; @Component({ selector:'albumb-component', template:` <h1>albumb</h1> ` }) export class albumbComponent { }
madhudskumar/ng2-music-app
app/app.component.ts
import { Component } from '@angular/core'; import { ROUTER_DIRECTIVES } from '@angular/router'; import { headerComponent } from './common/header.component'; import { footerComponent } from './common/footer.component'; @Component({ selector: 'my-app', template: ` <div class="container"> <he...
madhudskumar/ng2-music-app
app/models/search/search.interface.ts
export interface iSearch{ query : string; }
madhudskumar/ng2-music-app
app/models/music/music.interface.ts
<gh_stars>0 export interface iSong{ name:string; } export interface iAlbumb{ id: number, name: string, artist:string, url: string, images?: Array<string>, songs?: Array<iSong>; getImageSize(size:albumbImageSize); } export enum albumbImageSize{ LARGE = <any>"large", MEDIUM = <a...
madhudskumar/ng2-music-app
app/models/music/albumb.class.ts
<filename>app/models/music/albumb.class.ts<gh_stars>0 import {iAlbumb, albumbImageSize} from './music.interface'; import { iSong } from './music.interface'; export class Albumb implements iAlbumb{ constructor( public id: number, public name: string, public artist:string, public url...
madhudskumar/ng2-music-app
app/user/login.component.ts
import { Component } from '@angular/core'; @Component({ selector:'login-component', template:` <h1>ogin</h1> ` }) export class loginComponent { }
madhudskumar/ng2-music-app
app/models/user/user.interface.ts
export interface iUser{ username: string, email: string, password: <PASSWORD>, country?: string, birthday?: Date }
madhudskumar/ng2-music-app
app/models/pagination/pager.class.ts
import { iPage } from './pager.interface'; export class Pager implements iPage{ public pages: number = 0; constructor( public itemsPerPage: number, public startIndex: number, public totalResults: number, public maxPages : number = 10 ){ let realMaxPages = Math.ceil(...
madhudskumar/ng2-music-app
app/user/user.service.ts
<reponame>madhudskumar/ng2-music-app import { Observable } from 'rxjs/observable'; import { iUser } from '../models/user/user.interface'; import { User } from '../models/user/user.class'; import {error} from "util"; export class userServices{ firebaseUrl:string = "http://ng2-music.firebaseio.com"; firebaseRef...
madhudskumar/ng2-music-app
app/directives/hilight.directive.ts
import {Directive, Input, ElementRef} from "@angular/core"; @Directive({ selector:'hilight', host:{ '(mouseenter)':'onMouseEnter()', '(mouseleave)':'onMouseLeave()' } }) export class HilightDirective{ private _activeColor = "red"; private _originalColor; constructor( pr...
madhudskumar/ng2-music-app
app/common/footer.component.ts
<gh_stars>0 import { Component } from '@angular/core'; @Component({ selector:'footer-component', template:` <h1>this is footer</h1> ` }) export class footerComponent { }
madhudskumar/ng2-music-app
app/common/pagination.component.ts.ts
import { Component } from '@angular/core'; @Component({ selector:'pagination-component', template:` <h1>Test html</h1> ` }) export class paginationComponent { }
MikeAlphaBravo/Food_Delivery_Manager
src/app/meal.service.spec.ts
import { TestBed, inject } from '@angular/core/testing'; import { Meal.Service } from './meal.service'; describe('Meal.Service', () => { beforeEach(() => { TestBed.configureTestingModule({ providers: [Meal.ServiceService] }); }); it('should be created', inject([Meal.Service], (service: Meal.Servi...
MikeAlphaBravo/Food_Delivery_Manager
src/app/update-client/update-client.component.ts
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { ClientService } from '../client.service'; import { Client } from '../client.model'; import { Router } from '@angular/router'; import * as firebase from 'firebase'; @Component({ selector: 'app-update-client', templateUrl: './up...
MikeAlphaBravo/Food_Delivery_Manager
src/app/client.service.ts
import { Injectable } from '@angular/core'; import { Client } from './client.model'; import { Observable } from 'rxjs/Observable'; import { AngularFirestore } from 'angularfire2/firestore'; import { masterCodConfig } from './api-keys'; @Injectable() export class ClientService { clients: Observable<any[]>; message:...
MikeAlphaBravo/Food_Delivery_Manager
src/app/admin-guard.service.ts
import { Injectable } from '@angular/core'; import { CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/do'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/take'; import { AuthenticationService } f...
MikeAlphaBravo/Food_Delivery_Manager
src/app/app.module.ts
<filename>src/app/app.module.ts import { BrowserModule } from '@angular/platform-browser'; import { NgModule, ApplicationRef } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { routing } from './app.ro...
MikeAlphaBravo/Food_Delivery_Manager
src/app/map/map.component.ts
import { Component, OnInit } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { MapService } from '../map.service'; import { Client } from '../client.model'; import { Router } from '@angular/router'; import { ClientService } from '../client.service'; import * as firebase from 'firebase'; @Com...
MikeAlphaBravo/Food_Delivery_Manager
src/app/optness.pipe.spec.ts
import { OptnessPipe } from './optness.pipe'; describe('OptnessPipe', () => { it('create an instance', () => { const pipe = new OptnessPipe(); expect(pipe).toBeTruthy(); }); });
MikeAlphaBravo/Food_Delivery_Manager
src/app/map.service.ts
import { Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; @Injectable() export class MapService { constructor() {} }
MikeAlphaBravo/Food_Delivery_Manager
src/app/meal.model.ts
<gh_stars>1-10 export class Meal { constructor( public meal: string, public date: string, ) {} }
MikeAlphaBravo/Food_Delivery_Manager
src/app/client-detail/client-detail.component.ts
import { Component, OnInit } from '@angular/core'; import { AngularFirestore } from 'angularfire2/firestore'; import { Observable } from 'rxjs/Observable'; import { Router } from '@angular/router'; import { Client } from '../client.model'; import { ClientService } from '../client.service'; import { ActivatedRoute, Para...
MikeAlphaBravo/Food_Delivery_Manager
src/app/optness.pipe.ts
import { Pipe, PipeTransform } from '@angular/core'; import { Client } from './client.model'; @Pipe({ name: "optness", pure: false }) export class OptnessPipe implements PipeTransform { transform(input: Client[], optStatus) { let output: Client[] = []; for (let i = 0; i < input.length; ++i) { ...
MikeAlphaBravo/Food_Delivery_Manager
src/app/meal.service.ts
import { Injectable } from '@angular/core'; import { Meal } from './meal.model'; import { Observable } from 'rxjs/Observable'; import { AngularFirestore } from 'angularfire2/firestore'; @Injectable() export class MealService { meals: Observable<any[]>; constructor(private database: AngularFirestore) { this.mea...
MikeAlphaBravo/Food_Delivery_Manager
src/app/client.model.ts
<reponame>MikeAlphaBravo/Food_Delivery_Manager<filename>src/app/client.model.ts export class Client { constructor( public name: string, public address: string, public zip: number, public account: number, public statement: number, public phone: string, public carrier: string, public pla...
MikeAlphaBravo/Food_Delivery_Manager
src/app/meal/meal.component.ts
<reponame>MikeAlphaBravo/Food_Delivery_Manager import { Component, OnInit } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { Router } from '@angular/router'; import { Meal } from '../meal.model'; import { MealService } from '../meal.service'; import { ClientService } from '../client.service'...
MikeAlphaBravo/Food_Delivery_Manager
src/app/app.routing.ts
<filename>src/app/app.routing.ts import { ModuleWithProviders } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { LoginComponent } from './login/login.component'; import { PaymentComponent } from './payment/payment.component'; import { ClientListComponent } from './client-list/clien...
MikeAlphaBravo/Food_Delivery_Manager
src/app/create-client/create-client.component.ts
<reponame>MikeAlphaBravo/Food_Delivery_Manager import { Component, OnInit } from '@angular/core'; import { ClientService } from '../client.service'; import { Client } from '../client.model'; import * as firebase from 'firebase'; @Component({ selector: 'app-create-client', templateUrl: './create-client.component.ht...
ContentPI/lib
src/object/index.ts
// Dependencies import dot from 'dot-object' // Utils import { isBrowser, isObject, isDefined, isJson, isArray } from '../is' interface iData { _DEBUG: string } interface iNode { key: string value: string } export function cloneObject(o: any): any { return { ...o } } export function getDebug(data: iData): ...
ContentPI/lib
src/string/index.ts
<gh_stars>0 import { isString } from '../is' import { words } from '../utils' export function capitalize(str: string): string { if (!isString(str)) { return '' } return str.charAt(0).toUpperCase() + str.slice(1) } export function camelCase(str: string): string { return words(str.replace(/['\u2019]/g, '')...
ContentPI/lib
src/array/index.ts
export function chunk(arr: any[], size = 1): any[] { return arr.length > size ? [arr.slice(0, size), ...chunk(arr.slice(size), size)] : [arr] }
ContentPI/lib
src/utils/index.ts
const rsAstralRange = '\\ud800-\\udfff' const rsComboMarksRange = '\\u0300-\\u036f' const reComboHalfMarksRange = '\\ufe20-\\ufe2f' const rsComboSymbolsRange = '\\u20d0-\\u20ff' const rsComboMarksExtendedRange = '\\u1ab0-\\u1aff' const rsComboMarksSupplementRange = '\\u1dc0-\\u1dff' const rsComboRange = rsComboMarksR...
ContentPI/lib
src/index.ts
<filename>src/index.ts export * from './array' export * from './core' export * from './files' export * from './frontend' export * from './graphql' export * from './i18n' export * from './is' export * from './object' export * from './security' export * from './string' export * from './typescript' export * from './url'
ContentPI/lib
src/@types/crypto/index.d.ts
<gh_stars>0 declare module 'crypto'
ContentPI/lib
src/is/__tests__/index.test.ts
import { isArray, isDefined, isFunction, isJson, isNumber, isObject, isPassword, isString, isUndefined, isEmptyObject, isLanguage } from '../index' describe('#isArray', () => { it('should return true if is an Array', () => { expect(isArray([1, 2, 3])).toBe(true) }) it('should return fa...
ContentPI/lib
src/url/index.ts
<filename>src/url/index.ts import { isBrowser } from '../is' export function getLocation(req?: any): any { return typeof window !== 'undefined' ? window.location : { pathname: req && req.url } } export function getParamsFromUrl(mapParams: string[], baseUrl?: string): any { let pathname = '' if (isBrowser() && ...
ContentPI/lib
src/typescript/__tests__/index.test.ts
<gh_stars>0 import { hasKey } from '../index' describe('#hasKey', () => { const obj = { foo: 'bar' } it('should return true if an object has a key', () => { expect(hasKey(obj, 'foo')).toBe(true) }) it('should return false if an object does not has a key', () => { expect(hasKey(obj, 'bar')).toBe...
ContentPI/lib
src/string/__tests__/index.test.ts
import { arrayIn, capitalize, camelCase, pluralify } from '../index' describe('#arrayIn', () => { it('should return true if a value from array exists on string', () => { const whitelist = ['login'] const fakeWhitelist = ['getUsers'] const query = ` mutation { login(input: {email: "<EMAIL>",...
ContentPI/lib
src/security/index.ts
<reponame>ContentPI/lib // Dependencies import crypto from 'crypto' // Utils import { isString, isJson, isObject } from '../is' declare const Buffer: any export function encrypt(str: string): string { return crypto.createHash('sha1').update(str.toString()).digest('hex') } export function getBase64(value: string):...
ContentPI/lib
src/files/index.ts
<reponame>ContentPI/lib import fetch from 'isomorphic-fetch' export function getFileInfo(file: any): any { if (!file) { return { fileName: '', extension: '' } } const parts = file.split('.') const extension = parts.pop() const fileName = parts.pop() return { fileName, extensio...
ContentPI/lib
src/core/__tests__/index.ts
import { getReferenceTitle, getEmptyValues } from '../index' const data = [ { id: 'a7e48837-a759-49d9-9061-7c0e0cc9ca53', type: 'Status', fieldName: 'Status', identifier: 'status', description: 'The status of the record', isHide: false, isMedia: false, isRequired: true, isUnique: ...
ContentPI/lib
src/global.d.ts
export {} declare global { interface Window { initialState: any } }
ContentPI/lib
src/graphql/index.ts
// Interfaces interface Error { error: boolean message: string } export function getGraphQlError(error: any): Error { return { error: true, message: error.toString().replace('Error: GraphQL error: ', '') } } export function validateFields( validations: any, values: any, alert = 'Error trying to ...
ContentPI/lib
src/security/__tests__/index.test.ts
import { encrypt, getBase64, setBase64 } from '../index' describe('#encrypt', () => { it('should return a encrypted salted string', () => { expect(encrypt('foo')).toBe('0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33') }) }) describe('#getBase64', () => { it('should get a value from base64 string', () => { exp...
ContentPI/lib
src/languages.ts
export const languagesList: any = { ar: { name: 'العربية', lang: 'ar', dir: 'rtl' }, 'de-DE': { name: 'Deutsch', lang: 'de-DE' }, 'en-US': { name: 'English (US)', lang: 'en-US' }, 'en-GB': { name: 'English (UK)', lang: 'en-GB' }, es: { name: 'Español', lang:...
ContentPI/lib
src/frontend/index.ts
// Dependencies import slug from 'slug' // Utils import { isDefined, isString } from '../is' // Interfaces interface Router { asPath: string } interface PathInfo { section: string module: string action: string id: string } interface iAdd { if: (condition: boolean) => string } interface iProps { ccn: ...
ContentPI/lib
src/is/index.ts
<gh_stars>0 import { languagesList } from '../languages' export function isArray(v: unknown): boolean { return v instanceof Array } export function isDefined(v: unknown): boolean { return typeof v !== 'undefined' && v !== null } export function isFalse(v: unknown): boolean { return isDefined(v) && v === false ...
ContentPI/lib
src/object/__tests__/index.test.ts
<filename>src/object/__tests__/index.test.ts import { buildContentJson, cloneObject, forEach, getDebug, hasOwnProperty, keys, objectToDot, pick } from '../index' describe('#cloneObject', () => { it('should clone an object', () => { const obj = { foo: true, baz: false } const ...
ContentPI/lib
src/i18n/index.ts
<filename>src/i18n/index.ts import { isLanguage, isString, isDefined, isBrowser } from '../is' import { pick } from '../object' import { getLocation } from '../url' import { languagesList } from '../languages' export function getParams(url: string, index = 0): string | string[] { if (!url) { url = getLocation()....
isabella232/avalanche-explorer
cypress/plugins/index.ts
/** * Rather then have a bunch of configs for each environment we simply * create a object here, dynamically change it based on various environment variables * and pass it to cypress just before it starts. */ const CYPRESS_BASE_CONFIG = { nodeVersion: "system", }; const CYPRESS_CONFIG_PROD = { ...CYPRESS_BAS...
isabella232/avalanche-explorer
src/plugins/vuetify.ts
import Vue from 'vue' import Vuetify from 'vuetify' // Font Awesome import { library } from '@fortawesome/fontawesome-svg-core' import { faAngleDown, faAngleLeft, faAngleRight, faArrowLeft, faArrowRight, faBars, faCheck, faCheckCircle, faCog, faCoins, faCopy, faExclamati...
PritishSawant/rn-thub-share-module
src/index.tsx
<gh_stars>1-10 import { NativeModules } from 'react-native'; type RnThubShareModuleType = { multiply(a: number, b: number): Promise<number>; }; const { RnThubShareModule } = NativeModules; export default RnThubShareModule as RnThubShareModuleType;
Aschen/nsecure
index.d.ts
/// <reference types="js-x-ray"/> /// <reference types="ntlp"/> import { Warning, Dependencies } from "js-x-ray"; import { license as License } from "ntlp"; declare namespace NodeSecure { interface Publisher { name: string; version: string; at: string; } interface Maintainer { ...
keemy/anchor
ts/src/utils/index.ts
<reponame>keemy/anchor import { sha256 } from "crypto-hash"; import * as bs58 from "bs58"; import * as rpc from "./rpc"; import * as publicKey from "./pubkey"; export function decodeUtf8(array: Uint8Array): string { const decoder = typeof TextDecoder === "undefined" ? new (require("util").TextDecoder)("utf...
brett0701/nativescript-confusion
src/app/shared/baseurl.ts
<reponame>brett0701/nativescript-confusion export const baseURL = "http://127.0.0.1:3000/";
llooker/carousel
src/components/Embed/EmbedDashboard.tsx
<reponame>llooker/carousel import React, { useCallback, useContext, useEffect } from "react" import { EmbedProps } from "./types" import { LookerEmbedSDK, LookerEmbedDashboard } from '@looker/embed-sdk' import { ExtensionContext, ExtensionContextData, } from "@looker/extension-sdk-react" import { Button, Heading, L...
stomo21/ng-router-state-params
router-state-params.ts
import { NgModule } from "@angular/core"; import { RouterModule, Routes } from '@angular/router'; import { RouterStateParamsService } from './src/router-state-params.service'; // for manual imports export * from './src/router-state-params.service'; @NgModule({ imports: [ RouterModule ], declarati...
stomo21/ng-router-state-params
src/router-state-params.service.ts
<reponame>stomo21/ng-router-state-params import { Injectable } from '@angular/core'; import { Router, ActivatedRoute, NavigationEnd } from '@angular/router'; import { BehaviorSubject } from 'rxjs'; import { map, filter } from 'rxjs/operators'; /** * router state params service * usage: add to a component constructor...
elernal-tree/elernal-tree
src/app/pages/home/home.component.ts
import { Component, OnInit } from '@angular/core'; import { Core } from '@src/app/model/core'; import { WeaponItem } from '@src/app/model/weapon'; import { RouteKeep } from '@app/core/router-config/route-keep' @Component({ selector: 'app-home', templateUrl: './home.component.html', styleUrls: ['./home.componen...
elernal-tree/elernal-tree
src/app/pages/home/component/weapon/data-panel/extra-info/extra-info.component.ts
<gh_stars>1-10 import { Component, Input, OnInit } from '@angular/core'; import { ExtraInfo } from '../../model'; @Component({ selector: 'app-extra-info', templateUrl: './extra-info.component.html', styleUrls: ['./extra-info.component.scss'] }) export class ExtraInfoComponent { @Input() extra: ExtraInfo; co...
elernal-tree/elernal-tree
src/app/pages/home/component/weapon/data-panel/result/atk/atk.component.ts
<reponame>elernal-tree/elernal-tree import { Component, Input, OnInit } from '@angular/core'; @Component({ selector: 'app-atk', templateUrl: './atk.component.html', styleUrls: ['./atk.component.scss'], }) export class AtkComponent { constructor() {} @Input() magunaAtk: number; @Input() normalAtk: number; ...
elernal-tree/elernal-tree
src/app/pages/home/component/weapon/data-panel/result/stamina/stamina.component.ts
import { Component, Input, OnInit } from '@angular/core'; @Component({ selector: 'app-stamina', templateUrl: './stamina.component.html', styleUrls: ['./stamina.component.scss'], }) export class StaminaComponent { @Input() magunaStamina: number; @Input() normalStamina: number; @Input() exStamina: number; ...
elernal-tree/elernal-tree
src/app/constants/enum.ts
<gh_stars>1-10 /** section 1 方阵 2 ex 3 普刃 */ export enum SkillSection { maguna = 1, ex, normal, } export enum CoreSeries { maguna = 1, normal, ex, } export enum CoreElement { '火' = 1, "水", "地", "风", "光", "暗" } /** * core paramType */ export enum SklAttrType { atk = 3, hp, da, ta, ...
elernal-tree/elernal-tree
src/app/pages/home/component/weapon/weapon.component.ts
<gh_stars>1-10 import { Component, Input, OnInit } from '@angular/core'; import { CoreElement, Robot, SkillSection, SklAttrType } from '@src/app/constants/enum'; import { Core, CoreStage, PaSkillFuncition, Skill } from '@src/app/model/core'; import { WeaponItem } from '@src/app/model/weapon'; import { isNullOrUndefined...
elernal-tree/elernal-tree
src/app/pages/home/component/weapon/data-panel/data-panel.component.ts
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { CoreOption, Limit } from '@src/app/constants/constants'; import { Robot } from '@src/app/constants/enum'; import { ExtraInfo, PanelData } from '../model'; import { ShushuService } from '@app/core/service/shushu.service'; const cal...
elernal-tree/elernal-tree
src/app/core/service/shushu.service.ts
import { Injectable } from '@angular/core'; import { Limit } from '@src/app/constants/constants'; import { AtkType } from '@src/app/constants/enum'; @Injectable({ providedIn: 'root', }) export class ShushuService { constructor() {} atkLimit(damage: number, type: AtkType, LimitBonus: number) { let limit = Li...
elernal-tree/elernal-tree
src/app/share/directives/darg-drop/cdrag.directive.ts
<gh_stars>1-10 import { DOCUMENT } from '@angular/common'; import { Directive, ElementRef, EventEmitter, Inject, Input, NgZone, OnDestroy, Output, } from '@angular/core'; @Directive({ selector: '[appCdrag]', }) export class CdragDirective<T = any> implements OnDestroy { @Input('dragData') data!: a...
elernal-tree/elernal-tree
src/app/share/directives/directives.module.ts
<gh_stars>1-10 import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ClickStopModule } from './click-stop/click-stop.module'; import { ContextmuneModule } from './contextmenu/contextmenu.module'; import { DargDropModule } from './darg-drop/darg-drop.module'; @NgModule({ d...
elernal-tree/elernal-tree
src/app/pages/home/component/weapon/data-panel/result/enmity/enmity.component.ts
<gh_stars>1-10 import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'app-enmity', templateUrl: './enmity.component.html', styleUrls: ['./enmity.component.scss'] }) export class EnmityComponent { @Input() magunaEnmity: number; @Input() normalEnmity: number; @Input() exEnmity: n...
elernal-tree/elernal-tree
src/app/pages/ng-zorro.ts
import { NzGridModule } from 'ng-zorro-antd/grid' import { NzSelectModule } from 'ng-zorro-antd/select'; import { NzPopoverModule } from 'ng-zorro-antd/popover'; import { NzInputNumberModule } from 'ng-zorro-antd/input-number'; import { NzTableModule } from 'ng-zorro-antd/table'; import { NzTabsModule } from 'ng-zorro-...
elernal-tree/elernal-tree
src/app/pages/home/component/weapon/data-panel/result/result.component.ts
import { Component, Input, OnInit } from '@angular/core'; import { ShushuService } from '@app/core/service/shushu.service'; import { AtkRatio, CriRatio } from '@src/app/constants/constants'; import { AtkType } from '@src/app/constants/enum'; @Component({ selector: 'app-result', templateUrl: './result.component.htm...
elernal-tree/elernal-tree
src/app/share/directives/darg-drop/darg-drop.module.ts
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import {CdragDirective} from './cdrag.directive' import { DragDropBoxDirective} from './drag-drop-box.directive'; @NgModule({ declarations: [CdragDirective, DragDropBoxDirective], imports: [ CommonModule ], exports:...
elernal-tree/elernal-tree
src/app/share/pipe/fixed.pipe.ts
import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'fixed', }) export class FixedPipe implements PipeTransform { transform(value: number, ...args: [number?, boolean?]): unknown { const fractionDigits = args[0] ?? 2; const isPercent = args[1] ?? true; return (value * (isPercent ? 100 : ...
elernal-tree/elernal-tree
src/app/constants/constants.ts
<gh_stars>1-10 import { CoreElement } from './enum'; export const CoreOption = Object.freeze([ { label: '火', value: CoreElement.火, }, { label: '水', value: CoreElement.水, }, { label: '地', value: CoreElement.地, }, { label: '风', value: CoreElement.风, }, { label: '光',...
elernal-tree/elernal-tree
src/environments/environment.cdn.ts
export const environment = { production: true, ImgUrl:"https://cdn.jsdelivr.net/gh/elernal-tree/elernal-tree@master/static/image/core/{id}.png" };
elernal-tree/elernal-tree
src/app/layout/default/default.component.ts
<gh_stars>1-10 import { AfterViewInit, Component, OnInit, QueryList, ViewChildren } from '@angular/core'; import { NzModalService} from 'ng-zorro-antd/modal'; @Component({ selector: 'app-default', templateUrl: './default.component.html', styleUrls: ['./default.component.scss'], }) export class DefaultComponent {...
elernal-tree/elernal-tree
src/app/model/weapon.ts
import { Core } from "./core"; export interface WeaponItem { core: Core, lv: number, sLv: number, exLv: number }
elernal-tree/elernal-tree
src/app/pages/pages.module.ts
<filename>src/app/pages/pages.module.ts import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ShareModule } from '@app/share'; import { DragDropModule } from '@angular/cdk/drag-drop'; import { PagesRoutingModule } from './pages-routing.module'; import { HomeComponent } from...