text
stringlengths
10
953k
import { createTheme } from '@material-ui/core/styles'; import CustomComponents from './overrides'; const theme = createTheme({ components: CustomComponents, transitions: { create: () => 'none', }, }); export default theme;
import { FetchItemsSuccessAction, FETCH_ITEMS_SUCCESS } from '../../../item/actions' import { FetchNFTsSuccessAction, FETCH_NFTS_SUCCESS } from '../../../nft/actions' import { View } from '../../types' export type HomepageUIState = { [View.HOME_NEW_ITEMS]: string[] [View.HOME_SOLD_ITEMS]: string[] [View....
import { Component, OnInit, Input } from '@angular/core'; import { CardService } from '../../services/card.service'; import { Card } from 'src/app/models/Card'; @Component({ selector: 'app-body', templateUrl: './body.component.html', styleUrls: ['./body.component.scss'] }) export class BodyComponent implements...
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { PostsModule } from './posts/posts.module'; import {TypegooseModule} from 'nestjs-typegoose' @Module({ imports: [ PostsModule, TypegooseModule.forRoot("mongodb://loca...
export const environment = { production: true, // baseUrl: "http://localhost:3000", baseUrl: "https://a39aa988ea66.ngrok.io/", };
/** * Typescript class based component for custom-error * @link https://nextjs.org/docs/advanced-features/custom-error-page */ import React from "react"; import { NextPage, NextPageContext } from "next"; import NextError, { ErrorProps } from "next/error"; import { HttpError } from "@lib/core/http/error"; import { Er...
import * as React from 'react' import * as uuid from 'uuid' import AppleKeyboardCommand from 'react-material-icon-svg/dist/AppleKeyboardCommand' import Keymap from './keymaps/Keymap' import { SettingsStore } from '../../stores/SettingsStore' import { translate, Trans } from 'react-i18next' import { inject, observer } f...
// The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `.angul...
/** * WalletProvider * @license MIT * @author https://github.com/libertypie */ import Web3Standard from "./Web3Standard"; import Provider from '../interface/Provider'; import Exception from '../classes/Exception'; const win = window as any; class EthereumProvider extends Web3Standard implements Provider { ...
import { ErrorDO, TechnicalException } from '../../../../src' describe('TechnicalException', () => { describe('prototype', () => { it('should be prototype of TechnicalException', () => { try { const error = new ErrorDO('champErreur', 'code.error', 'label error') const causeError = new Error...
import React, { useEffect, useRef, useState } from 'react'; import type { IconType, IconBaseProps } from 'react-icons'; import { AiFillCloseCircle } from 'react-icons/ai'; import { useField } from '@unform/core'; import { styled } from '@src/styles/stitches.config'; export const Label = styled('label', { color: '$...
<TS language="be" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Правы клік, каб рэдагаваць адрас ці метку</translation> </message> <message> <source>Create a new address</source> <transla...
interface ITripOriginProvider { get(): string; }
import React from 'react'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; const { Navigator, Screen } = createStackNavigator(); import Landing from '../pages/Landing'; import GiveClasses from '../pages/GiveClasses'; import StudyTabs from...
const hashes = ['# ', ' #']; const slashes = ['/* ', ' */']; const semicolons = [';; ', ' ;;']; const parens = ['(* ', ' *)']; const dashes = ['-- ', ' --']; const chevrons = ['<!--', ' -->']; const percents = ['%% ', ' %%']; // all the supported languages export const youcodeLanguage: { [lang: string]: string[] | und...
import { Resource, TriggerDefinition } from "@azure/cosmos"; import { logConsoleError, logConsoleProgress } from "../../Utils/NotificationConsoleUtils"; import { client } from "../CosmosClient"; import { logError } from "../Logger"; import { sendNotificationForError } from "./sendNotificationForError"; export async fu...
import { Component, OnInit, Input, SystemJsNgModuleLoaderConfig, SimpleChanges } from '@angular/core'; import { pricesData } from './../../pricesData'; import _ from 'lodash'; @Component({ selector: 'app-hideout-view', templateUrl: './hideout-view.component.html', styleUrls: ['./hideout-view.component.scss'] }) ...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *-------------------------------------------------------------------------...
import test from "tape"; import { Stealer } from "./stealer"; test("Seen flag initialized to false", t => { const stealer = new Stealer<string, unknown>({ ttl: 2, unref: true }); stealer.set("test", {}); t.false(stealer.keyValues.get("test")?.marked); t.end(); }); test("Seen flag is set to true by stealer", ...
import { AfterContentInit, ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, HostBinding, HostListener, Input, OnDestroy, OnInit, Output, QueryList, ViewEncapsulation } from '@angular/core'; import { ListItemComponent } from './list-item/list-item.com...
import React, { ButtonHTMLAttributes } from "react"; import PropTypes from "prop-types"; import "./Button.scss"; import { ButtonTypes, getButtonClassName, } from "../../utils/getButtonClassName"; interface Props { variant: ButtonTypes; } const Button = ({ children, variant, className, ...props }: React...
import React from 'react' import Auth from './auth/Auth' import { Router, Route } from 'react-router-dom' import Callback from './components/Callback' import createHistory from 'history/createBrowserHistory' import App from './App'; const history = createHistory() const auth = new Auth(history) const handleAuthentica...
import { action, Action, thunk, Thunk } from "https://esm.sh/easy-peasy@5.0.3"; export enum Theme { "default" = "default", "colorblind" = "colorblind", "saltyroger" = "saltyroger", } export interface ISettingsModel { initialize: Thunk<ISettingsModel>; changeTheme: Thunk<ISettingsModel, Theme>; changeAuto...
import { LambdaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LambdaClient"; import { FunctionConfiguration, UpdateFunctionCodeRequest } from "../models/models_0"; import { deserializeAws_restJson1UpdateFunctionCodeCommand, serializeAws_restJson1UpdateFunctionCodeCommand, } from "../protocol...
import {Module} from '../../core/Module'; import {IMessage} from '../../core/Events/IMessage'; import {IEndpoint} from '../../core/IEndpoint'; import { EndpointTypes } from '../../core/EndpointTypes'; import { Bot } from '../../core/Bot'; // import * as http from 'http'; import * as https from 'https'; import * as fs f...
import { PolymorphicComponent, FormElementProps } from './_shared'; import { FlexProps } from './Flex'; export declare type BaseFieldProps = FlexProps & FormElementProps & { /** * Renders a `cursor: pointer` on hover. * * @default false */ isClickable?: boolean; /** * Renders focus styles. * ...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
/** * @license * Copyright 2018-2020 Streamlit Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
export { default as HelpModal } from './HelpModal';
import React from 'react'; import styled from 'styled-components'; import { RouteComponentProps, withRouter } from 'react-router-dom'; import { AppBar } from './AppBar'; import { Heading } from './Heading'; const Content = styled.div` width: 100%; max-width: 1024px; margin: 30px 0; position: relative; `; cons...
import { Listener } from './plugin' export { Listener, VuexListener } from './plugin' // Please redefine this in your source repository declare module 'vue/types/vue' { interface Vue { $storeListener: Listener<any> } }
import { useState, useEffect } from 'react'; import styled from 'styled-components'; export interface BrandIconProps { children: React.ReactNode; color: string; hoverColor: string; size: string; } export interface IconProps { color?: string; colorful?: boolean; hoverColor?: string; size?: string; } e...
// This file was generated from the Models.tst template // export class SubscribeModel { email: string; }
/** * @file Jinritoutiao 今日头条 * @author Auto Generated by IconPark */ /* tslint:disable: max-line-length */ /* eslint-disable max-len */ import {ISvgIconProps, IconHelper, IconWrapper} from '../runtime'; export default IconWrapper( 'jinritoutiao', true, (h: IconHelper, props: ISvgIconProps) => ( ...
var os = require('os'); var ipc = require('ipc'); var $ = <JQueryStatic>require('jquery'); var app = require('remote').require('app'); var shell = require('shell'); import config = require("../../vorlon.config"); var userDataPath = app.getPath('userData'); export class SessionsManager { sessions: any; txtAddSession...
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ListBookSettingsComponent } from './list-book-settings.component'; describe('ListBookSettingsComponent', () => { let component: ListBookSettingsComponent; let fixture: ComponentFixture<ListBookSettingsComponent>; beforeEach(asyn...
export const environment = { production: false, ci: false, ensemblDomain: 'grch37.rest.ensembl.org', ensemblProtocol: 'https', baseHref: '', auth0ClientId: 'eS2HA6aSYnxCXFvo9bzHpV1DI6H1yw0l', auth0Domain: 'sgc.au.auth0.com', auth0Connection: 'Username-Password-Authentication', beacon...
/* * * Copyright 2018-present NEM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
import { DictItem } from '@/app-config/dicts' export type JukuuConfig = DictItem<{ lang: 'zheng' | 'engjp' | 'zhjp' }> export default (): JukuuConfig => ({ lang: '11010000', selectionLang: { english: true, chinese: true, japanese: true, korean: true, french: true, spanish: true, deut...
/** @hidden */ export declare var bumpFragmentMainFunctions: { name: string; shader: string; };
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import {connect} from 'react-redux'; import {createSelector} from 'reselect'; import {Preferences} from 'mattermost-redux/constants'; import {getChannelsNameMapInCurrentTeam} from 'mattermost-redux/selector...
import { CommonServiceOptions, DnsDomain } from '../../types' export type IngressOptions = CommonServiceOptions & { domain: DnsDomain[] email?: string }
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
import { AbilityWithDone } from "../ability-type"; import { Vector3 } from "../../types/vector3"; import { Projectile } from "../../weapons/projectile/projectile"; import { ProjectileTargetStatic, ProjectileMoverParabolic, ProjectileMoverLinear } from "../../weapons/projectile/projectile-target"; import { LaserRifle } ...
import { ApiOperationOptions, ApiParamOptions, ApiQueryOptions, ApiResponseOptions, } from '@nestjs/swagger'; import { CreateOneRouteOptions, DeleteOneRouteOptions, RecoverOneRouteOptions, ReplaceOneRouteOptions, UpdateOneRouteOptions, } from '@nestjsx/crud'; import { CrudValidationOptions } from '../...
// Copyright 2022 Kenth Fagerlund. // SPDX-License-Identifier: MIT declare global { namespace NodeJS { interface ProcessEnv { NEXT_PUBLIC_CHAINID: number; NODE_ENV: 'development' | 'production'; INFURA_KEY: string; ALCHEMY_KEY: string; RPC_ENDPOINT: string; SENT...
import { element } from 'protractor'; import { hexToRgba, getStyle } from '@coreui/coreui/dist/js/coreui-utilities'; import { CustomTooltips } from '@coreui/coreui-plugin-chartjs-custom-tooltips'; import { CovidService } from './../../../covid-shared/covid.service'; import { Component, OnInit, ViewChild, ElementRef, Ho...
import {NgModule} from '@angular/core'; import {MatSidenavModule} from '@angular/material/sidenav'; import {YqSharedModule} from '@yq/core'; import {YqSidebarModule, YqThemeOptionsModule} from '@yq/components'; import {ChatPanelModule} from 'app/layout/components/chat-panel/chat-panel.module'; import {ContentModule} ...
import { User } from 'src/auth/user.entity'; import { EntityRepository, Repository } from 'typeorm'; import { CreateTaskDto } from './dto/create-task.dto'; import { GetTasksFilterDto } from './dto/get-tasks-filter.dto'; import { TaskStatus } from './task-status.enum'; import { Task } from './task.entity'; @EntityRepos...
import React from 'react'; import { Meta, Story } from '@storybook/react'; import { Accordion, AccordionProps } from './'; export default { title: 'Data/Accordion', component: Accordion, subcomponents: { Pane: Accordion.Pane }, } as Meta; export const Default: Story<AccordionProps> = (args) => ( <Acco...
/* * @Author: wangYe * @Date: 2020-12-18 13:25:08 * @Last Modified by: WhiteShader * @Last Modified time: 2022-02-21 11:12:12 */ import { useEffect } from 'react'; import { KeepAlive, useIntl, useModel } from 'umi'; export default function KeepAlivePage(props: any) { const intl = useIntl(); const { dispatch,...
/* * Copyright (c) 2017, salesforce.com, inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ // tslint:disable:no-unused-expression import { expect } from 'chai'; import * as events...
import {GetServerSideProps, getSession} from "blitz" import {Suspense} from "react" export const getServerSideProps: GetServerSideProps = async ({req, res}) => { const session = await getSession(req, res) await session.$setPublicData({role: "user"}) return { props: {}, } } function Content() { return (...
import { Fun } from '@ephox/katamari'; import { Focus } from '@ephox/sugar'; import { Focusing } from '../../api/behaviour/Focusing'; import { AlloyComponent } from '../../api/component/ComponentApi'; import * as AlloyTriggers from '../../api/events/AlloyTriggers'; const hoverEvent = 'alloy.item-hover'; const focusEv...
import { InvalidCurrencyBaseAmountError, InvalidSatoshiAmountError, InvalidTargetConfirmations, } from "@domain/errors" export const SATS_PER_BTC = 10 ** 8 export const btc2sat = (btc: number) => { return Math.round(btc * SATS_PER_BTC) as Satoshis } export const sat2btc = (sat: number) => { return sat / SA...
import { Component, OnDestroy } from '@angular/core'; import { NbThemeService } from '@nebular/theme'; import { takeWhile } from 'rxjs/operators/takeWhile'; @Component({ selector: 'ngx-home', styleUrls: ['./home.component.scss'], templateUrl: './home.component.html', }) export class HomeComponent implements OnDe...
import {TraceWorker} from "./TraceWorker"; /** * Created by Nidin on 4/1/2016. */ export class Thread { instance:Worker; onTraceComplete:Function; onInitComplete:Function; initialized:boolean; isTracing:boolean; constructor(name:string, public id:number) { //console.log("Thread:"+...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *-------------------------------------------------------------------------...
import {Component, h, Prop, State} from '@stencil/core'; import {RouterHistory} from "@stencil/router"; @Component({ tag: 'elsa-studio-workflow-instances-list', shadow: false, }) export class ElsaStudioWorkflowInstancesList { @Prop() history: RouterHistory; @Prop() serverUrl: string; render() { return (...
<TS language="zh_TW" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>右鍵點一下來修改位址或標記</translation> </message> <message> <source>Create a new address</source> <translation>產生一個新位址</translation...
/* MIT License Copyright (c) 2021 Looker Data Sciences, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modi...
import React from 'react' import { FunctionComponent } from "react" import { SearchCandidate } from '@/src/models/node' import { Text, Color, Box } from 'ink' import { Highlight } from '@/src/components/util/highlight' import figures from 'figures' interface ResultProps extends SearchCandidate { matches: { [fiel...
import * as jwt from "jsonwebtoken"; export class Authenticator { private static expiresIn: string = process.env.JWT_EXPIRE_TIME!; public generateToken = (input: AuthenticationData): string => { const newToken = jwt.sign( { id: input.id, role: input.role, }, process.env.JWT_K...
import JassAgent from './agent'; /** * type unit */ export default class JassHashTable extends JassAgent { table: Map<number, Map<number, any>>; save(parentKey: number, childKey: number, value: any): void; load(parentKey: number, childKey: number, defaultValue?: number): any; have(parentKey: number, c...
import { ApolloServer } from "apollo-server"; import process from "process"; import createServer from "./server"; try { const PORT = process.env.PORT || "8080"; const HOST = process.env.HOST || `http://localhost:${PORT}`; let server: ApolloServer; if (module.hot) { module.hot.accept(); module.hot.di...
export * from './key-sequence'; export * from './render-with-app-shell'; export * from './test-server';
import { TriggerPayload } from "@prismatic-io/spectral"; export const snsExampleHeaders = { "x-amz-sns-message-type": "Notification", "x-amz-sns-message-id": "da41e39f-ea4d-435a-b922-c6aae3915ebe", "x-amz-sns-topic-arn": "arn:aws:sns:us-west-2:123456789012:MyTopic", "x-amz-sns-subscription-arn": "arn:aws:s...
import Command from "@oclif/command"; import { chdir, cwd } from "process"; import { betterDirName } from "../helpers/betterDirName"; export function openFolder(CLI: Command, dir: string) { CLI.log(`Navigate inside "${betterDirName(dir)}" directory`); try { chdir(dir); } catch (err) { CLI.error(`Folder ...
import {NgModule} from '@angular/core'; import {RouterModule, Routes} from "@angular/router"; import { TC_PATH_EDIT, } from "../translation.service"; import {SponsorsComponent} from "./sponsors.component"; import {SponsorEditComponent} from "./sponsor-edit/sponsor-edit.component"; import {ROUTE_INDEX} from "../app-sh...
import { Button } from './Button' import { Inline } from './Inline' type SegmentedControlProps = { activeValue: any values: Array<{ value: any; label: any }> onChange: (value: { value: any; label: any }, event: MouseEvent) => void } export const SegmentedControl = ({ activeValue, values, onChange, }: Segm...
import * as React from "react" import * as ReactDOM from "react-dom" import {List, Map, Set, Range} from "immutable" import * as Immutable from "immutable" import * as Moment from 'moment' import {UrlTemplate, application, get_context, Route, Url, make_url, fallback_url, link_to_route, Option, C, Mode, unit, bind, stri...
import { Component, OnInit,Input } from '@angular/core'; import { Waybill } from '../../../shared/DTOs/wayBill'; import { WaybillService } from '../waybill.service'; import { ConfigService, IConfig } from '../../../app.config'; import { Totals } from '../../../shared/DTOs/totals'; import { WaybillProduct } from '../../...
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing'; import { Component } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { changeBrowserInne...
/* This file is generated by createIcons.js any changes will be lost. */ import { IconType } from '../createIcon'; declare const BullseyeIcon: IconType; export default BullseyeIcon;
import { Injectable } from '@angular/core'; import { FormGroup, FormArray, FormControl, AbstractControl, Validators, AbstractControlOptions } from '@angular/forms'; import { FormlyConfig, FieldValidatorFn, TemplateManipulators } from './formly.config'; import { FORMLY_VALIDATORS, evalStringExpression, evalExpressionVal...
// THIS FILE IS AUTO GENERATED import { IconTree, IconType } from '../lib' export declare const TiArrowSync: IconType;
import { CollectionCache, CollectionKey } from "../../../common"; import { StartPosRegions } from "./StartPosRegions"; import { Religions } from "./Religions"; export declare namespace StartPosRegionReligions { const KEY: CollectionKey; class Entry { private readonly collectionCache; readonly _r...
import { SocketState, Snapshot } from "./types" import HudState from "./HudState" import PathBuilder from "./PathBuilder" type Resource = Proto.webviewResource type K8sResourceInfo = Proto.webviewK8sResourceInfo interface HudInt { setAppState: <K extends keyof HudState>(state: Pick<HudState, K>) => void setHistor...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
import { Component } from '@angular/core'; import { CurrentProductService } from './current-product.service'; @Component({ selector: 'cx-product-page', templateUrl: './product-page.component.html', providers: [CurrentProductService], }) export class ProductPageComponent { constructor() {} }
import React from "react"; import MyComponent from "../components/my_component"; import { EuiButton, EuiCode, EuiPage, EuiPageBody, EuiPageContent, EuiPageContentBody, EuiPageContentHeader, EuiPageContentHeaderSection, EuiPageHeader, EuiPageHeaderSection, EuiText, EuiTitle, } from "@elastic/eui"...
import { CustomLocale } from "../types/locale"; export declare const Ukrainian: CustomLocale; declare const _default: { ar?: CustomLocale | undefined; at?: CustomLocale | undefined; az?: CustomLocale | undefined; be?: CustomLocale | undefined; bg?: CustomLocale | undefined; bn?: CustomLocale | u...
export * from '~platform/node/imgstry'; export * from '~platform/node/spline';
import { MediaMatcher } from '@angular/cdk/layout'; import { Component, NgZone, OnInit } from '@angular/core'; import { Education } from '../core/models/education'; import { ResponsiveComponent } from '../core/responsive-component'; import { ResumeService } from '../core/services/resume.service'; @Component({ templ...
// import * as auth from './auth'; // import * as database from './database'; // import * as notification from './notification'; export const appFirebase = { // auth, // database, // notification, };
import { MongoClient } from 'mongodb'; import { MongoClientRole } from '../../models/mongo-client-role'; import { logDisruptionsOnEventEmitter } from '../../utils/logger/common-logs/event-emitter'; import { logInfo } from '../../utils/logger/logger'; /** * Initiates a mongo client based on a connection string and con...
import { Contract, EventData, EventOptions, Filter } from 'web3-eth-contract' import { TransactionReceipt } from 'web3-core' import ContractHandler from '../ContractHandler' import { Instantiable, InstantiableConfig } from '../../Instantiable.abstract' export interface EventDataOptions extends EventOptions { fromBl...
// Copyright 2017-2020 @canvas-ui/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 import { Option } from '@canvas-ui/apps-config/settings/types'; import { SettingsStruct } from '@polkadot/ui-settings/types'; import React from 'react'; import { Dropdown, IdentityIcon } from '@canvas-ui/react...
import { useCallback } from 'react' import { useNavigate } from 'remix' /** * Trigger a revalidation of the current routes loaders. * * This work by navigating to the current page, this make Remix run the loaders * of the current page again. * * The hook sets `replace: true` to the navigation options in order to...
import { Directive, HostListener, ElementRef } from '@angular/core'; @Directive({ selector: '[appOnlyLetterUserAccount]' }) export class OnlyLetterUserAccountDirective { private specialKeys: Array<string> = ['Backspace', 'Tab', 'End', 'Home', 'ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft']; constructor(pr...
import { Injectable } from '@angular/core'; import { Actions, createEffect } from '@ngrx/effects'; @Injectable() export class AppEffects { constructor(private actions$: Actions) {} }
import { Component, h, Prop, Host } from '@stencil/core'; import { UI } from '../../services/ui-util.service'; @Component({ tag: 'dialog-container', styleUrl: 'dialog-container.css', shadow: false }) export class DialogContainer { @Prop() dialogTitle="Modal Dialog" @Prop() dialogContent="<p>An HTML string t...
import { Type } from 'class-transformer'; import { IsEmail, IsInt, IsNotEmpty, IsNotEmptyObject, IsString, ValidateNested, } from 'class-validator'; import { CreateAdrressDto } from './CreateAdrressDto'; export class cretaeCustomerDto { @IsEmail() @IsNotEmpty() email: string; @IsInt() @IsNotEmpt...
import renderer from 'react-test-renderer'; import { MessagePanel } from './message-panel'; describe('MessagePanel', () => { it('should match snapshot with the default text', () => { const tree = renderer.create( <MessagePanel message={{ type: 'SUCCESS', text: 'Succes! Congratz!' }} onClose={() => {}} />,...
import * as React from 'react'; export default class Parent extends React.Component { public render() { return ( <> <p>Parent</p> </> ); } }
import { getTickCount } from './getTickCount'; import { CHART_CONFIG } from '../../common/testUtil'; describe('get tick counts', () => { it('returns a minimum number of ticks when width and height are small', () => { const { xTickCount, yTickCount } = getTickCount({ width: 40, height: 40 }, CHART_CONFIG.scale); ...
import { IsNotEmpty, Length } from 'class-validator'; import { UUID_LENGTH } from '../../../constants'; export class ConversationLastMessageUpdateDto { @IsNotEmpty() @Length(UUID_LENGTH) readonly conversationId: string; @IsNotEmpty() @Length(UUID_LENGTH) readonly messageId: string; }
import {createElement as h} from 'react'; import {storiesOf} from '@storybook/react'; import {delayed} from './delayed'; import {viewport} from './viewport'; import ShowDocs from './ShowDocs' const Loaded = () => <div>LOADED</div>; const Loadable = delayed({ loading: <div>Loading....</div>, loader: () => Promise....
import { crowi, Fixture } from 'server/test/setup' describe('Config model test', () => { let Config beforeAll(done => { Config = crowi.model('Config') const fixtures = [ { ns: 'crowi', key: 'test:test', value: JSON.stringify('crowi test value') }, { ns: 'crowi', key: 'test:test2', value: JSON...
import Application from 'koa'; import { info } from '../tools/debug'; export default function computerTime(app: Application) { app.use(async (ctx, next) => { const start = Date.now(); info(`${ctx.method} ${ctx.path}`); await next(); info(`${ctx.method} ${ctx.path} ${Date.now() - sta...