repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
welschoff/bergfest-songs
src/app/App.tsx
<reponame>welschoff/bergfest-songs import React from 'react'; import styles from './App.module.css'; import Title from './components/Title/Title'; function App(): JSX.Element { return ( <main className={styles.container}> <div className={styles.card}> <Title text="Bergfest" /> <form classNa...
TrueFit/bach-react-hook-form
src/types.ts
<gh_stars>0 export {UseFormReturn, UseWatchProps} from 'react-hook-form';
TrueFit/bach-react-hook-form
src/enhancers/withFieldArray.ts
<gh_stars>0 import {EnhancerResult, EnhancerContext, isFunction, PROPS} from '@truefit/bach'; import {useFieldArray, UseFieldArrayProps, FieldValues, FieldArrayPath} from 'react-hook-form'; type FieldArrayOptionsParameter< T extends FieldValues = FieldValues, TFieldArrayName extends FieldArrayPath<T> = FieldArrayP...
TrueFit/bach-react-hook-form
src/enhancers/index.ts
export {default as withForm} from './withForm'; export {default as withFormContext} from './withFormContext'; export {default as withWatch} from './withWatch'; export {default as withFieldArray} from './withFieldArray';
TrueFit/bach-react-hook-form
src/enhancers/withForm.ts
import {EnhancerContext, EnhancerResult, isFunction, PROPS} from '@truefit/bach'; import {useForm, UseFormProps} from 'react-hook-form'; type FormConfigParameter<T, P> = UseFormProps<T> | ((props: P) => UseFormProps<T>) | undefined; export default <T, P>(formConfig: FormConfigParameter<T, P>) => ({generateNewVariab...
TrueFit/bach-react-hook-form
src/enhancers/withFormContext.ts
import {EnhancerResult} from '@truefit/bach'; import {useFormContext} from 'react-hook-form'; export default () => (): EnhancerResult => { return { dependencies: { useFormContext, }, initialize: ` const formContext = useFormContext(); `, props: ['formContext'], }; };
TrueFit/bach-react-hook-form
src/enhancers/withWatch.ts
/* eslint-disable no-param-reassign */ /* eslint-disable @typescript-eslint/ban-ts-comment */ import {EnhancerResult, EnhancerContext, isFunction, PROPS} from '@truefit/bach'; import {useWatch} from 'react-hook-form'; import {UseWatchProps} from '../types'; type UseWatchPropsGenerator<P> = (props: P) => UseWatchProps;...
DFE-Digital/bat-node-prototype
src/migrations/1540916487317-snake_case.ts
import {MigrationInterface, QueryRunner} from "typeorm"; export class snakeCase1540916487317 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise<any> { await queryRunner.query(`ALTER TABLE "site" RENAME COLUMN "providerId" TO "provider_id"`); await queryRunner.query(...
DFE-Digital/bat-node-prototype
src/routes/sitesRoutes.ts
import Site from "./../entity/site"; import connection from "../infrastructure/connection"; import { makeRouter, Controller } from "../infrastructure/controller"; export default makeRouter(() => new SitesController()) .get("/", c => c.showAll) .get("/search", c => c.search); export class SitesController extends C...
DFE-Digital/bat-node-prototype
src/infrastructure/unauthorisedRequestHandler.ts
export default function unauthorisedRequestHandler(err, req, res, next) { if (err && err.httpCode === 401) { res.redirect("/auth/login"); } else { next(); } }
DFE-Digital/bat-node-prototype
src/infrastructure/controller.ts
import express = require("express"); import { NextFunction } from "express-serve-static-core"; export abstract class Controller { protected req: express.Request; protected res: express.Response; protected next: express.NextFunction; public setContext(req: express.Request, res: express.Response, next: NextFunc...
DFE-Digital/bat-node-prototype
src/migrations/1540914935176-BreakUpAddress.ts
<filename>src/migrations/1540914935176-BreakUpAddress.ts import {MigrationInterface, QueryRunner} from "typeorm"; export class BreakUpAddress1540914935176 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise<any> { await queryRunner.query(`ALTER TABLE "site" rename COLUMN "ad...
DFE-Digital/bat-node-prototype
src/migrations/1540914179572-Initial.ts
<gh_stars>1-10 import {MigrationInterface, QueryRunner} from "typeorm"; export class Initial1540914179572 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise<any> { await queryRunner.query(`CREATE TABLE "site" ("id" SERIAL NOT NULL, "providerId" integer NOT NULL, "locationNa...
DFE-Digital/bat-node-prototype
src/infrastructure/oidc.ts
import { Strategy, Issuer } from "openid-client"; const getPassportStrategy = async logger => { const issuer = await Issuer.discover(process.env.BAT_NODE_SIGNIN_URL); const client = new issuer.Client({ client_id: process.env.BAT_NODE_SIGNIN_CLIENT_ID, client_secret: process.env.BAT_NODE_SIGNIN_CLIENT_SECR...
DFE-Digital/bat-node-prototype
src/entity/site.ts
<filename>src/entity/site.ts import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; import { Length } from "class-validator"; @Entity() export default class Site { @PrimaryGeneratedColumn() id: number; @Column({ name: "provider_id" }) providerId: number; @Length(1, 50) @Column({ name: "locatio...
DFE-Digital/bat-node-prototype
src/services/manageApiService.ts
import axios from "axios"; export interface Provider { name: string; providerCode: string; } export default class ManageApiService { private accessToken: string; private baseUrl: string; constructor(accessToken: string) { this.accessToken = accessToken; this.baseUrl = process.env.BAT_NODE_MANAGE_AP...
DFE-Digital/bat-node-prototype
src/server.ts
import "reflect-metadata"; // this shim is required import "dotenv"; import connection from "./infrastructure/connection"; import express = require("express"); import helmet = require("helmet"); import bodyParser = require("body-parser"); import nunjucks = require("nunjucks"); import https = require("https"); import p...
DFE-Digital/bat-node-prototype
src/routes/authRoutes.ts
<filename>src/routes/authRoutes.ts import { makeRouter, Controller } from "../infrastructure/controller"; import pp = require("passport"); // export default makeRouter(() => new AuthController(passport)) // .get("/login", c => c.login) // .get("/cb", c => c.cb) // .get("/logout", c => c.logout); export class Au...
DFE-Digital/bat-node-prototype
src/infrastructure/bakingQueue.ts
<filename>src/infrastructure/bakingQueue.ts import Queue = require("bull"); const bakingQueue = new Queue("baking cookies", process.env.REDIS_URL); bakingQueue.process(({ data }, done) => { console.log("received baking job", data); console.log("cookies baking for 30 seconds"); setTimeout(() => { console.log...
DFE-Digital/bat-node-prototype
src/routes/homeRoutes.ts
import Site from "../entity/site"; import { validate, ValidationError } from "class-validator"; import connection from "../infrastructure/connection"; import { makeRouter, Controller } from "../infrastructure/controller"; import { plainToClass } from "class-transformer"; import bakingQueue from "../infrastructure/bakin...
AlexRogalskiy/setup-loft
src/login.ts
<filename>src/login.ts import * as core from '@actions/core' import {exec} from '@actions/exec' export async function loginToLoft( url: string, accessKey: string, insecure: boolean, dockerLogin: boolean ): Promise<void> { if (url === '') { throw new Error('No Loft url provided') } if (accessKey === ...
AlexRogalskiy/setup-loft
src/cleanup.ts
<reponame>AlexRogalskiy/setup-loft import * as core from '@actions/core' import * as io from '@actions/io' import {homedir} from 'os' import path from 'path' async function run(): Promise<void> { try { core.startGroup('Remove Loft Configuration') const homeDir = homedir() await io.rmRF(path.join(homeDir,...
AlexRogalskiy/setup-loft
__tests__/loft.test.ts
<filename>__tests__/loft.test.ts import {expect, test} from '@jest/globals' import {binaryUrl} from '../src/loft' test('binaryUrl(platform: string, architecture: string, version: string)', () => { expect(binaryUrl('darwin', 'arm64', '5.14.4')).resolves.toEqual( 'https://github.com/loft-sh/loft/releases/download...
AlexRogalskiy/setup-loft
__tests__/login.test.ts
import {describe, expect, test} from '@jest/globals' import {loginToLoft} from '../src/login' describe('loginToLoft(url: string, accessKey: string)', () => { test('with empty url', async () => { await expect(loginToLoft('', 'foo', false, false)).rejects.toThrow( 'No Loft url provided' ) }) test('...
AlexRogalskiy/setup-loft
src/main.ts
<reponame>AlexRogalskiy/setup-loft<gh_stars>1-10 import * as core from '@actions/core' import * as os from 'os' import {installKubectl} from './kubectl' import {installLoft} from './loft' import {loginToLoft} from './login' async function run(): Promise<void> { const runnerPlatform: string = os.platform() const a...
Tthiagoo/NextJS-Test
pages/members/[login].tsx
<filename>pages/members/[login].tsx import { GetStaticPaths, GetStaticProps } from "next"; import {useRouter }from 'next/router' export default function Member({ user }) { const {isFallback} = useRouter() if(isFallback){ return <p>Carregando...</p> } return ( <div> <img src={user.avatar_url} alt={user...
Tthiagoo/NextJS-Test
pages/index.tsx
export default function Home({org}) { return ( <div> <h1>{org.login}</h1> <h3>{org.description}</h3> <p> Site:<a href={org.blog}>{org.blog}</a> </p> </div> ); } export const getStaticProps = async () => { const response = await fetch("https://api.github.com/orgs/rocketseat"); const data = awa...
Antloup/workflow-js
lib/Elements/Types/ParentTypes/Action.d.ts
<reponame>Antloup/workflow-js<filename>lib/Elements/Types/ParentTypes/Action.d.ts import ParentType from './ParentType'; import Loader from '../../../Loader'; import ActionElement from '../../Actions/ActionFunction'; import Type from '../Type'; import { ScalarValue } from '../../../typing/ScalarValue'; import { Scalar,...
Antloup/workflow-js
src/Elements/Types/ParentTypes/Rule.ts
<reponame>Antloup/workflow-js import ParentType from './ParentType'; import Loader from '../../../Loader'; import Condition from './Condition'; import {ScalarValue} from '../../../typing/ScalarValue'; export default class Rule extends ParentType { public static readonly STRING_SEPARATOR = ', '; protected nam...
Antloup/workflow-js
src/Parser.ts
<reponame>Antloup/workflow-js import Workflow from './Workflow'; import Rule from './Elements/Types/ParentTypes/Rule'; import Loader from './Loader'; import ParentType from './Elements/Types/ParentTypes/ParentType'; export default class Parser { public static createFromJson(json: string): Workflow { let d...
Antloup/workflow-js
lib/Providers/index.d.ts
<filename>lib/Providers/index.d.ts import ActionProvider from './ActionProvider'; import ComparatorProvider from './ComparatorProvider'; import TypeProvider from './TypeProvider'; export { ActionProvider, ComparatorProvider, TypeProvider };
Antloup/workflow-js
src/Elements/Types/Type.ts
import Element from '../Element'; export default abstract class Type extends Element { }
Antloup/workflow-js
src/Elements/Types/ScalarTypes/index.ts
<gh_stars>0 import Scalar from './Scalar'; import ScalarType from './ScalarType'; import Variable from './Variable'; export {Scalar, ScalarType, Variable};
Antloup/workflow-js
src/Elements/Types/Condition/index.ts
import All from './Operators/All'; import Any from './Operators/Any'; import Operator from './Operators/Operator'; export {All, Any, Operator};
Antloup/workflow-js
src/Providers/Provider.ts
import Element from '../Elements/Element'; export default abstract class Provider<T extends Element> { public abstract getProviderType(): string; private registeredElements: Map<string, Map<string, new() => T>> = new Map(); public register(element: new() => T): this { const providerType = this.get...
Antloup/workflow-js
src/Elements/CompareOperators/CompareOperator.ts
import Element from '../Element'; import Type from '../Types/Type'; import Scalar from '../Types/ScalarTypes/Scalar'; import Variable from '../Types/ScalarTypes/Variable'; export default abstract class CompareOperator extends Element { protected operands: Array<Type> = []; public getHash(): string { ...
Antloup/workflow-js
lib/Elements/Types/Condition/Operators/All.d.ts
import Operator from './Operator'; export default class All extends Operator { name: string; getHash(): string; getJSONData(): { [p: string]: unknown; } | null; getResult(vars: any, childrenValues: any): boolean; isValid(vars: any, childrenValues: any): boolean; toString(): string; }...
Antloup/workflow-js
src/Elements/CompareOperators/Not.ts
<gh_stars>0 import CompareOperator from './CompareOperator'; export default class Not extends CompareOperator { public name = 'not'; getJSONData(): { [p: string]: unknown } | null { return {}; } getResult(vars: any, childrenValues: any): boolean { return !childrenValues[0]; } ...
Antloup/workflow-js
src/Elements/Types/Condition/Operators/Any.ts
import Operator from './Operator'; export default class Any extends Operator { public name = 'any'; getHash(): string { return ''; } getJSONData(): { [p: string]: unknown } | null { return {}; } getResult(vars: any, childrenValues: any): boolean { for (let childrenVa...
Antloup/workflow-js
src/Elements/Types/ParentTypes/Condition.ts
import ParentType from './ParentType'; import Loader from '../../../Loader'; import Operator from '../Condition/Operators/Operator'; import Type from '../Type'; import Comparator from './Comparator'; export default class Condition extends ParentType { public name: string = 'condition'; public conditionOperato...
Antloup/workflow-js
lib/Elements/Types/Condition/Operators/Operator.d.ts
<reponame>Antloup/workflow-js import Type from '../../Type'; export default abstract class Operator extends Type { protected operands: Array<Type>; addOperand(value: Type): this; getOperands(): Type[]; removeOperand(index: number): void; }
Antloup/workflow-js
src/Providers/TypeProvider.ts
<filename>src/Providers/TypeProvider.ts import Provider from './Provider'; import Type from '../Elements/Types/Type'; export default class TypeProvider extends Provider<Type> { getProviderType() { return 'type'; } }
Antloup/workflow-js
src/Elements/Actions/ActionFunction.ts
import Element from '../Element'; import Type from '../Types/Type'; export default abstract class ActionFunction extends Element { protected args: Array<Type> = []; public addArgs(arg: Type): void { this.args.push(arg); } public getArgs(): Array<Type> { return this.args; } p...
Antloup/workflow-js
lib/Elements/Types/Condition/index.d.ts
<reponame>Antloup/workflow-js import All from './Operators/All'; import Any from './Operators/Any'; import Operator from './Operators/Operator'; export { All, Any, Operator };
Antloup/workflow-js
src/Elements/Actions/Arithmetics/Modulo.ts
<reponame>Antloup/workflow-js import ActionFunction from '../ActionFunction'; export default class Modulo extends ActionFunction { public name = 'modulo'; getHash(): string { return ''; } getResult(vars: any, childrenValues: any): unknown { let firstOperand = Number(this.args[0].getR...
Antloup/workflow-js
lib/Workflow.d.ts
<filename>lib/Workflow.d.ts import Rule from './Elements/Types/ParentTypes/Rule'; import Loader from './Loader'; import { ScalarValue } from './typing/ScalarValue'; export default class Workflow { static readonly behaviorAllMatches: string; static readonly behaviorFirstMatches: string; static readonly STRIN...
Antloup/workflow-js
src/Elements/CompareOperators/Equal.ts
import CompareOperator from './CompareOperator'; export default class Equal extends CompareOperator { public name = 'equal'; getJSONData(): { [p: string]: unknown } | null { return {}; } getResult(vars: any, childrenValues: any): boolean { let valueToBeEquals = childrenValues[0]; ...
Antloup/workflow-js
lib/Elements/Actions/index.d.ts
import Divide from './Arithmetics/Divide'; import Minus from './Arithmetics/Minus'; import Modulo from './Arithmetics/Modulo'; import Times from './Arithmetics/Times'; import Plus from './Arithmetics/Plus'; import Pow from './Arithmetics/Pow'; import ActionFunction from './ActionFunction'; export { Divide, Minus, Modul...
Antloup/workflow-js
src/Elements/Types/ParentTypes/index.ts
<reponame>Antloup/workflow-js import Action from './Action'; import Comparator from './Comparator'; import Condition from './Condition'; import ParentType from './ParentType'; import Rule from './Rule'; export {Action, Comparator, Condition, ParentType, Rule};
Antloup/workflow-js
lib/Elements/index.d.ts
export * from './Actions'; export * from './CompareOperators'; export * from './Types'; export * from './Element';
Antloup/workflow-js
lib/Providers/ComparatorProvider.d.ts
import Provider from './Provider'; import { CompareOperator } from '../Elements'; export default class ComparatorProvider extends Provider<CompareOperator> { getProviderType(): string; }
Antloup/workflow-js
lib/Providers/Provider.d.ts
import Element from '../Elements/Element'; export default abstract class Provider<T extends Element> { abstract getProviderType(): string; private registeredElements; register(element: new () => T): this; createInstance(element: string): T; getRegisteredElement(): Array<string>; }
Antloup/workflow-js
src/Providers/ActionProvider.ts
<reponame>Antloup/workflow-js import Provider from './Provider'; import ActionFunction from '../Elements/Actions/ActionFunction'; export default class ActionProvider extends Provider<ActionFunction> { getProviderType() { return 'action'; } }
Antloup/workflow-js
lib/Elements/Types/ScalarTypes/index.d.ts
import Scalar from './Scalar'; import ScalarType from './ScalarType'; import Variable from './Variable'; export { Scalar, ScalarType, Variable };
Antloup/workflow-js
lib/Elements/Types/ParentTypes/Comparator.d.ts
import ParentType from './ParentType'; import Type from '../Type'; import Loader from '../../../Loader'; import CompareOperator from '../../CompareOperators/CompareOperator'; import { ScalarValue } from '../../../typing/ScalarValue'; import Action from './Action'; import { Scalar, Variable } from '../ScalarTypes'; expo...
Antloup/workflow-js
lib/Elements/Types/ParentTypes/Condition.d.ts
<reponame>Antloup/workflow-js import ParentType from './ParentType'; import Loader from '../../../Loader'; import Operator from '../Condition/Operators/Operator'; import Type from '../Type'; import Comparator from './Comparator'; export default class Condition extends ParentType { name: string; conditionOperato...
Antloup/workflow-js
src/Elements/Types/Condition/Operators/Operator.ts
<filename>src/Elements/Types/Condition/Operators/Operator.ts import Type from '../../Type'; export default abstract class Operator extends Type { protected operands: Array<Type> = []; public addOperand(value: Type) { this.operands.push(value); return this; } public getOperands() { ...
Antloup/workflow-js
lib/Loader.d.ts
<filename>lib/Loader.d.ts import { ActionProvider, ComparatorProvider, TypeProvider } from './Providers'; export default class Loader { private static typeProviderConfig; private static actionProviderConfig; private static comparatorProviderConfig; getTypeProviderConfig(): TypeProvider; getComparato...
Antloup/workflow-js
lib/Elements/Types/ScalarTypes/Scalar.d.ts
<reponame>Antloup/workflow-js import ScalarType from './ScalarType'; import Loader from '../../../Loader'; export default class Scalar extends ScalarType { name: string; getResult(vars: any, childrenValues: any): any; createFromParser(parsedData: { value: any; }, loader: Loader): any; isVali...
Antloup/workflow-js
lib/Providers/ActionProvider.d.ts
<gh_stars>0 import Provider from './Provider'; import ActionFunction from '../Elements/Actions/ActionFunction'; export default class ActionProvider extends Provider<ActionFunction> { getProviderType(): string; }
Antloup/workflow-js
lib/typing/ScalarValue.d.ts
<reponame>Antloup/workflow-js export declare type ScalarValue = number | string | Array<ScalarValue>;
Antloup/workflow-js
src/Elements/Types/ScalarTypes/Variable.ts
import ScalarType from './ScalarType'; import Loader from '../../../Loader'; import {ScalarValue} from '../../../typing/ScalarValue'; export default class Variable extends ScalarType { public name = 'variable'; getResult(vars: Map<string, ScalarValue>, childrenValues: any) { if (this.scalarValue === ...
Antloup/workflow-js
src/Elements/Types/ScalarTypes/Scalar.ts
import ScalarType from './ScalarType'; import Loader from '../../../Loader'; export default class Scalar extends ScalarType { public name = 'scalar'; getResult(vars: any, childrenValues: any): any { return this.scalarValue; } createFromParser(parsedData: { value: any }, loader: Loader): any ...
Antloup/workflow-js
lib/Elements/Types/ScalarTypes/Variable.d.ts
<reponame>Antloup/workflow-js<filename>lib/Elements/Types/ScalarTypes/Variable.d.ts import ScalarType from './ScalarType'; import Loader from '../../../Loader'; import { ScalarValue } from '../../../typing/ScalarValue'; export default class Variable extends ScalarType { name: string; getResult(vars: Map<string,...
Antloup/workflow-js
src/Loader.ts
<reponame>Antloup/workflow-js<gh_stars>0 import { Action, All, Any, Comparator, Condition, Divide, Equal, Greater, GreaterOrEqual, Less, LessOrEqual, Minus, Modulo, Not, Plus, Pow, Rule, Scalar, Times, Variable } from './Elements'; import {ActionProvider, ComparatorPr...
Antloup/workflow-js
lib/Elements/CompareOperators/CompareOperator.d.ts
<filename>lib/Elements/CompareOperators/CompareOperator.d.ts import Element from '../Element'; import Type from '../Types/Type'; import Scalar from '../Types/ScalarTypes/Scalar'; import Variable from '../Types/ScalarTypes/Variable'; export default abstract class CompareOperator extends Element { protected operands:...
Antloup/workflow-js
src/Providers/ComparatorProvider.ts
import Provider from './Provider'; import {CompareOperator} from '../Elements'; export default class ComparatorProvider extends Provider<CompareOperator> { getProviderType() { return 'comparator'; } }
Antloup/workflow-js
src/Workflow.ts
import Rule from './Elements/Types/ParentTypes/Rule'; import * as Crypto from 'crypto'; import Loader from './Loader'; import {ScalarValue} from './typing/ScalarValue'; export default class Workflow { static readonly behaviorAllMatches: string = 'allMatches'; static readonly behaviorFirstMatches: string = 'fir...
Antloup/workflow-js
lib/Elements/Types/ScalarTypes/ScalarType.d.ts
<filename>lib/Elements/Types/ScalarTypes/ScalarType.d.ts import Type from '../Type'; import { ScalarValue } from '../../../typing/ScalarValue'; export default abstract class ScalarType extends Type { protected scalarValue: ScalarValue | null; getJSONData(): { [p: string]: unknown; } | null; getV...
Antloup/workflow-js
src/Elements/Types/ParentTypes/ParentType.ts
<filename>src/Elements/Types/ParentTypes/ParentType.ts import Type from '../Type'; import Loader from '../../../Loader'; import {ScalarValue} from '../../../typing/ScalarValue'; export default abstract class ParentType extends Type { protected values: Array<Type> = []; public getValues(): Array<Type> { ...
Antloup/workflow-js
src/Elements/Types/ParentTypes/Comparator.ts
import ParentType from './ParentType'; import Type from '../Type'; import Loader from '../../../Loader'; import CompareOperator from '../../CompareOperators/CompareOperator'; import {ScalarValue} from '../../../typing/ScalarValue'; import Action from './Action'; import {Scalar, Variable} from '../ScalarTypes'; export ...
Antloup/workflow-js
lib/Parser.d.ts
<gh_stars>0 import Workflow from './Workflow'; export default class Parser { static createFromJson(json: string): Workflow; private static parse; }
Antloup/workflow-js
src/Elements/Element.ts
<reponame>Antloup/workflow-js<filename>src/Elements/Element.ts import * as Crypto from 'crypto'; import Loader from '../Loader'; import {ScalarValue} from '../typing/ScalarValue'; export default abstract class Element { constructor() {} protected abstract name: string; private loader!: Loader; publ...
Antloup/workflow-js
lib/Providers/TypeProvider.d.ts
<gh_stars>0 import Provider from './Provider'; import Type from '../Elements/Types/Type'; export default class TypeProvider extends Provider<Type> { getProviderType(): string; }
Antloup/workflow-js
src/Elements/Types/ParentTypes/Action.ts
import ParentType from './ParentType'; import Loader from '../../../Loader'; import ActionElement from '../../Actions/ActionFunction'; import Type from '../Type'; import {ScalarValue} from '../../../typing/ScalarValue'; import {Scalar, Variable} from '../ScalarTypes'; export default class Action extends ParentType { ...
Antloup/workflow-js
src/Providers/index.ts
<gh_stars>0 import ActionProvider from './ActionProvider'; import ComparatorProvider from './ComparatorProvider'; import TypeProvider from './TypeProvider'; export {ActionProvider, ComparatorProvider, TypeProvider};
Antloup/workflow-js
src/Elements/Types/ScalarTypes/ScalarType.ts
import Type from '../Type'; import {ScalarValue} from '../../../typing/ScalarValue'; export default abstract class ScalarType extends Type { protected scalarValue: ScalarValue | null = null; public getJSONData(): { [p: string]: unknown } | null { return { 'type': this.getName(), ...
Antloup/workflow-js
lib/Elements/Element.d.ts
<reponame>Antloup/workflow-js import Loader from '../Loader'; import { ScalarValue } from '../typing/ScalarValue'; export default abstract class Element { constructor(); protected abstract name: string; private loader; toJSON(): { [p: string]: unknown; }; protected hashValues<T extends E...
Antloup/workflow-js
lib/Elements/Types/index.d.ts
export * from './Condition'; export * from './ParentTypes'; export * from './ScalarTypes';
Antloup/workflow-js
lib/Elements/Types/ParentTypes/ParentType.d.ts
<gh_stars>0 import Type from '../Type'; import Loader from '../../../Loader'; import { ScalarValue } from '../../../typing/ScalarValue'; export default abstract class ParentType extends Type { protected values: Array<Type>; getValues(): Array<Type>; addValue(value: Type): any; removeValue(index: number)...
Antloup/workflow-js
src/Elements/Actions/Arithmetics/Divide.ts
import ActionFunction from '../ActionFunction'; export default class Divide extends ActionFunction { public name = 'divide'; getHash(): string { return ''; } getResult(vars: any, childrenValues: any): number { let result = childrenValues.shift(); for (let childrenValue of chi...
Antloup/workflow-js
lib/Elements/CompareOperators/index.d.ts
import CompareOperator from './CompareOperator'; import Equal from './Equal'; import Greater from './Greater'; import GreaterOrEqual from './GreaterOrEqual'; import Less from './Less'; import LessOrEqual from './LessOrEqual'; import Not from './Not'; export { CompareOperator, Equal, Greater, GreaterOrEqual, Less, LessO...
Antloup/workflow-js
src/index.ts
<reponame>Antloup/workflow-js<filename>src/index.ts import Loader from './Loader'; import Parser from './Parser'; import Workflow from './Workflow'; export * from './Workflow'; export * from './Parser'; export * from './Loader'; export * from './Providers'; export * from './Elements' export {Workflow, Parser, Loader};...
Antloup/workflow-js
lib/Elements/Actions/Arithmetics/Modulo.d.ts
<gh_stars>0 import ActionFunction from '../ActionFunction'; export default class Modulo extends ActionFunction { name: string; getHash(): string; getResult(vars: any, childrenValues: any): unknown; isValid(vars: any, childrenValues: Array<any>): boolean; toString(): string; }
Antloup/workflow-js
lib/Elements/Actions/Action.d.ts
import Element from '../Element'; import Type from '../Types/Type'; export default abstract class Action extends Element { protected args: Array<Type>; addArgs(arg: Type): void; getArgs(): Array<Type>; getHash(): string; getJSONData(): { [p: string]: unknown; } | null; }
Antloup/workflow-js
lib/Elements/Types/ParentTypes/Rule.d.ts
import ParentType from './ParentType'; import Loader from '../../../Loader'; import Condition from './Condition'; import { ScalarValue } from '../../../typing/ScalarValue'; export default class Rule extends ParentType { static readonly STRING_SEPARATOR = ", "; protected name: string; private return; get...
WGriffing/simplematcomponents
projects/simplealert/src/simplealert/alert-type.model.ts
export enum AlertType { INFO = 1, ERROR, WARN, SUCCESS } export type AlertTypeString = ('info' | 'error' | 'warn' | 'success');
WGriffing/simplematcomponents
projects/simplemattable/src/lib/simplemattable/simplemattable.component.ts
<filename>projects/simplemattable/src/lib/simplemattable/simplemattable.component.ts<gh_stars>0 import {AfterViewInit, Component, DoCheck, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core'; import {TableColumn} from '../model/table-column.model'; import {MatPaginator, MatSor...
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/select-form-field.model.ts
<reponame>WGriffing/simplematcomponents import {AbstractFormField} from './abstract-form-field.model'; import {FormFieldType} from './form-field-type.model'; import {SelectFormFieldOption} from './select-form-field-option.model'; export class SelectFormField<T, P extends keyof T, F> extends AbstractFormField<T, P, F> ...
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/select-form-field-option.model.ts
<reponame>WGriffing/simplematcomponents export interface SelectFormFieldOption<F> { display: string; value: F; }
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/button-type.model.ts
export enum ButtonType { BASIC = 1, RAISED = 2, ICON = 3 }
WGriffing/simplematcomponents
projects/simplealert/src/simplealert/simplealert.module.ts
<reponame>WGriffing/simplematcomponents<filename>projects/simplealert/src/simplealert/simplealert.module.ts import {NgModule} from '@angular/core'; import {SimplealertComponent} from './simplealert.component'; import {CommonModule} from '@angular/common'; import {MatButtonModule, MatCommonModule, MatIconModule} from '@...
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/table-column.model.ts
<reponame>WGriffing/simplematcomponents import {Align} from './align.model'; import {ButtonType} from './button-type.model'; import {ThemePalette} from '@angular/material'; import {Width} from './width.model'; import {AbstractFormField} from './abstract-form-field.model'; import {NumberFormField} from './number-form-fi...
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/form-field-type.model.ts
export enum FormFieldType { TEXT = 1, NUMBER, DATE, SELECT, LARGE_TEXT }
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/large-text-form-field.model.ts
<reponame>WGriffing/simplematcomponents import {AbstractFormField} from './abstract-form-field.model'; import {FormFieldType} from './form-field-type.model'; export class LargeTextFormField<T, P extends keyof T> extends AbstractFormField<T, P, string> { maxLines: number = 10; minLines: number = 1; constructor(...
WGriffing/simplematcomponents
projects/simplealert/src/public_api.ts
/* * Public API Surface of simplealert */ export * from './simplealert/simplealert.component'; export * from './simplealert/simplealert.module'; export * from './simplealert/alert-type.model';
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/text-form-field.model.ts
<gh_stars>1-10 import {AbstractFormField} from './abstract-form-field.model'; import {FormFieldType} from './form-field-type.model'; export class TextFormField<T, P extends keyof T> extends AbstractFormField<T, P, string> { constructor() { super(); this.formType = FormFieldType.TEXT; } }
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/width.model.ts
<reponame>WGriffing/simplematcomponents export class Width { private percent: number; private pixel: number; private _shrink: number = 0; private _grow: number = 0; static pct(percent: number): Width { const width = new Width(); width.percent = percent; return width; } static px(pixel: numb...
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/data-status.model.ts
<reponame>WGriffing/simplematcomponents<gh_stars>1-10 export class DataStatus { loading: boolean = false; editing: boolean = false; added: boolean = false; }
WGriffing/simplematcomponents
projects/simplemattable/src/lib/model/abstract-form-field.model.ts
import {FormFieldType} from './form-field-type.model'; import {ValidatorFn} from '@angular/forms'; import {FormError} from './form-error.model'; export class AbstractFormField<T, P extends keyof T, F> { formType: FormFieldType; validators: ValidatorFn[] = []; init: (data: T[P], dataParent: T) => F; apply: (val...