repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
huazai128/nest-emp2-wechat
server/pipes/transform.pipe.ts
import { config } from '@app/config'; import { HttpRequest } from '@app/interfaces/request.interface'; import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common'; /** * 拼接转发接口 * @export * @class TransformPipe * @implements {PipeTransform<HttpRequest, HttpRequest>} */ @Injectable() export class T...
huazai128/nest-emp2-wechat
server/modules/auth/auth.controller.ts
<reponame>huazai128/nest-emp2-wechat import { Controller, Get, Param, Post, Body, Req, Res } from "@nestjs/common"; import { AuthService } from "./auth.service"; import { Responsor } from "@app/decorators/responsor.decorator"; import { TransformPipe } from "@app/pipes/transform.pipe"; import { HttpRequest } from "@app/...
huazai128/nest-emp2-wechat
server/constants/error.constant.ts
export const UnAuthStatus = [401, 403]
huazai128/nest-emp2-wechat
src/stores/GlobalStore/index.ts
<filename>src/stores/GlobalStore/index.ts import { action, observable, makeObservable } from 'mobx' export class GlobalStore { constructor() { makeObservable(this) } // PC 端下获取参数 @observable wxConfig = window.INIT_DATA?.wxConfig || {} // 微信内核下的js 配置 @observable jsConfig = window.I...
huazai128/nest-emp2-wechat
server/main.ts
<filename>server/main.ts import { NestFactory } from '@nestjs/core'; import { NestExpressApplication } from '@nestjs/platform-express'; import { getServerIp } from '@app/utils/util'; import { join, resolve } from 'path'; import { isDevEnv } from '@app/app.env'; import { Request } from 'express'; import { get } from 'lo...
huazai128/nest-emp2-wechat
server/app.controller.ts
<filename>server/app.controller.ts import { Controller, Get, Query, Req, Res } from '@nestjs/common'; import { Request, Response } from 'express' import { get } from "lodash"; import request from 'request'; import { Responsor } from './decorators/responsor.decorator'; /** * 工具类接口 * @export * @class AppController *...
huazai128/nest-emp2-wechat
server/guards/api.guard.ts
import { ExecutionContext, Injectable } from "@nestjs/common"; import { LoggedInGuard } from "./logged-in.guard"; import { HttpUnauthorizedError } from "@app/errors/unauthorized.error"; import { Request } from 'express' import { ApiWhiteList } from "@app/constants/api.contant"; @Injectable() export class ApiGuard exte...
huazai128/nest-emp2-wechat
server/processors/redis/redis.module.ts
<filename>server/processors/redis/redis.module.ts<gh_stars>1-10 import { CacheModule as NestCacheModule, Global, Module } from '@nestjs/common' import { RedisConfigServer } from './redis.config.server'; import { RedisServer } from './redis.server'; /** * Redis * @export * @class RedisModule */ @Global() @Module({ ...
huazai128/nest-emp2-wechat
server/modules/wechat/wechat.controller.ts
<reponame>huazai128/nest-emp2-wechat import { Lang, ScopeEnum, WX_STATE } from "@app/constants/text.constant"; import { QueryParams } from "@app/decorators/params.decorator"; import { Responsor } from "@app/decorators/responsor.decorator"; import { Controller, Get, Res, Req } from "@nestjs/common"; import { Response, R...
huazai128/nest-emp2-wechat
server/config/index.ts
import { resolve } from 'path' import { environment } from '@app/app.env' import { ConfigServer } from '@app/interfaces/config.interface' import session from 'express-session' const conf = require(resolve(__dirname, `./config.${environment}`)) export const config: ConfigServer = conf export const APP = { PORT: 3...
huazai128/nest-emp2-wechat
src/utils/monitor/interfaces/index.ts
export interface IMetrics { [prop: string | number]: any; } export enum MetricsName { RCR = 'router-change-record', CBR = 'click-behavior-record', CDR = 'custom-define-record', HT = 'http-record', CE = 'change-exposure', } export interface PageInfo { // 浏览器的语种 (eg:zh) language?: strin...
huazai128/nest-emp2-wechat
src/utils/monitor/userVitals.ts
<filename>src/utils/monitor/userVitals.ts import BehaviorStore from "./behaviorStore"; import { proxyFetch, proxyXmlHttp } from "./httpProxy"; import { CustomAnalyticsData, FN1, HttpMetrics, MetricsName } from "./interfaces"; import SendLog from "./send"; import { mOberver, proxyHistory } from "./utils"; /** * 用户行为 ...
huazai128/nest-emp2-wechat
src/stores/AuthStore/index.ts
<reponame>huazai128/nest-emp2-wechat<gh_stars>1-10 import { action, makeObservable, observable } from 'mobx' import { StoreExt } from '@src/utils/reactExt'; export class AuthStore extends StoreExt { constructor() { super() makeObservable(this) } @observable userInfo = {} @action get...
huazai128/nest-emp2-wechat
server/modules/router/router.service.ts
import { AxiosService } from "@app/processors/axios/axios.service"; import { Injectable } from "@nestjs/common"; /** * 处理路由下各种数据 * @export * @class RouterSercive */ @Injectable() export class RouterSercive { constructor(private readonly axiosSerice: AxiosService) { } }
huazai128/nest-emp2-wechat
server/modules/wechat/wechat.service.ts
import { Lang, ScopeEnum } from "@app/constants/text.constant"; import { JsConfig } from "@app/interfaces/wechat.interface"; import { Injectable } from "@nestjs/common"; import { ApiConfigKit, HttpKit, WeChat } from 'tnwx' import util from 'util' @Injectable() export class WechatService { private authorizeUrl = "h...
huazai128/nest-emp2-wechat
server/middlewares/dev.middleware.ts
<filename>server/middlewares/dev.middleware.ts import { Injectable, NestMiddleware } from "@nestjs/common"; import { Request, Response, NextFunction } from 'express' import { isDevEnv } from "@app/app.env"; import logger from "@app/utils/logger"; import { AuthService } from "@app/modules/auth/auth.service"; /** * 用于本...
huazai128/nest-emp2-wechat
server/modules/wechat/wechat.module.ts
<filename>server/modules/wechat/wechat.module.ts import { Module, OnModuleInit } from "@nestjs/common"; import { WechatController } from "./wechat.controller"; import { WechatService } from "./wechat.service"; import { ApiConfigKit, ApiConfig } from 'tnwx' import { config } from "@app/config"; import { AuthModule } fro...
huazai128/nest-emp2-wechat
src/utils/monitor/behaviorStore.ts
<reponame>huazai128/nest-emp2-wechat import { BehaviorStack, BehaviorRecordsOptions } from "./interfaces"; /** * 记录用户行为 * @export * @class BehaviorStore */ export default class BehaviorStore { private state: Array<BehaviorStack> private max: number constructor({ maxBehaviorRecords }: BehaviorRecordsOpt...
huazai128/nest-emp2-wechat
src/utils/monitor/webVitals.ts
<gh_stars>0 import { getFCP } from 'web-vitals'; import { IMetrics } from "./interfaces" import { afterLoad, getFP, getNavigationTiming, getResourceFlow, mOberver, supported } from './utils' import SendLog from './send'; /** * 性能 * @export * @class Performance * @extends {SendLog} */ export default class WebVital...
huazai128/nest-emp2-wechat
server/decorators/responsor.decorator.ts
<reponame>huazai128/nest-emp2-wechat import { reflector } from '@app/constants/reflector.constant' import { SetMetadata } from '@nestjs/common' import * as META from '@app/constants/meta.constant' interface ResponsorOptions { isApi?: boolean } export const getResponsorOptions = (target: any): ResponsorOptions => ...
huazai128/nest-emp2-wechat
server/processors/axios/axios.module.ts
import { AXIOS_INSTANCE_TOKEN } from "@app/constants/axios.constant"; import { Global, Module } from "@nestjs/common"; import { AxiosService } from "./axios.service"; import axios from 'axios' @Global() @Module({ providers: [ AxiosService, { provide: AXIOS_INSTANCE_TOKEN, // 注入一个服务 ...
huazai128/nest-emp2-wechat
server/interfaces/wechat.interface.ts
export interface JsConfig { appId: string timestamp: string nonceStr: string signature: string }
huazai128/nest-emp2-wechat
server/middlewares/wechat.middleware.ts
<filename>server/middlewares/wechat.middleware.ts import { isDevEnv } from "@app/app.env"; import { RouterWhiteList } from "@app/constants/router.constant"; import { Lang, ScopeEnum } from "@app/constants/text.constant"; import { CustomError } from "@app/errors/custom.error"; import { User } from "@app/interfaces/reque...
huazai128/nest-emp2-wechat
src/config/config.prod.ts
<reponame>huazai128/nest-emp2-wechat import { ConfigParams } from "@src/interfaces/config" const config: ConfigParams = { apiHost: 'https://emp-wechat.zbisq.com', wxUdbLoginDomain: '', } export default config
huazai128/nest-emp2-wechat
server/middlewares/origin.middleware.ts
<reponame>huazai128/nest-emp2-wechat<gh_stars>1-10 import { Injectable, NestMiddleware } from "@nestjs/common"; import { Request, Response, NextFunction } from 'express' import { isProdEnv } from "@app/app.env"; import { CROSS_DOMAIN } from "@app/config"; /** * 用于验证是否为非法来源 * @export * @class OriginMiddleware * @im...
huazai128/nest-emp2-wechat
server/middlewares/app.middleware.ts
<reponame>huazai128/nest-emp2-wechat import { isDevEnv } from "@app/app.env"; import { User } from "@app/interfaces/request.interface"; import logger from "@app/utils/logger"; import { Injectable, NestMiddleware } from "@nestjs/common"; import { Request, Response, NextFunction } from 'express' /** * 用于app内嵌页面授权访问 * ...
huazai128/nest-emp2-wechat
server/constants/cache.constant.ts
<reponame>huazai128/nest-emp2-wechat<filename>server/constants/cache.constant.ts<gh_stars>0 export const CACHE_ACCESS_TOKEN = 'CACHE_ACCESS_TOKEN'
huazai128/nest-emp2-wechat
src/routes/index.ts
<reponame>huazai128/nest-emp2-wechat<filename>src/routes/index.ts import { lazy } from 'react' import { RouteProps } from 'react-router-dom'; const Hello = lazy(() => import('@src/page/Hello')); const Login = lazy(() => import('@src/page/Login')); const List = lazy(() => import('@src/page/List')); export const routes...
huazai128/nest-emp2-wechat
src/page/Login/index.tsx
import React, { useEffect } from 'react' import { Form, Button, Input } from 'antd' import { observer } from 'mobx-react-lite' import useRootStore from '@src/stores/useRootStore' import { useHistory } from 'react-router-dom' import './style.scss' function Login() { const { authStore } = useRootStore() const hi...
huazai128/nest-emp2-wechat
server/constants/meta.constant.ts
export const HTTP_API = '__httpApi__'
huazai128/nest-emp2-wechat
src/stores/GlobalStore/type.d.ts
import { GlobalStore as GlobalStoreModel } from './index' export as namespace IGlobalStore export type GlobalStore = GlobalStoreModel
huazai128/nest-emp2-wechat
server/interfaces/response.interface.ts
<filename>server/interfaces/response.interface.ts export type ResponseMessage = string export enum ResponseStatus { Error = 'error', Success = 'success', } export interface HttpResponseBase { status: ResponseStatus message: ResponseMessage } export type ExceptionInfo = | ResponseMessage | { ...
huazai128/nest-emp2-wechat
server/utils/util.ts
<filename>server/utils/util.ts import { networkInterfaces } from 'os'; import { Base64 } from 'js-base64'; import { createHash } from 'crypto'; /** * 获取服务端IP * @export * @return {*} */ export function getServerIp() { const interfaces = networkInterfaces(); for (const devName in interfaces) { const ...
huazai128/nest-emp2-wechat
typings/global.d.ts
<reponame>huazai128/nest-emp2-wechat declare interface Window { INIT_DATA: Record<string, any> msPerformance: Record<string, any> webkitPerformance: Record<string, any> } /** * 全局Store * @interface IStore */ declare interface IStore { globalStore: IGlobalStore.GlobalStore authStore: IAuthStore.A...
huazai128/nest-emp2-wechat
server/constants/api.contant.ts
<gh_stars>1-10 export const ApiWhiteList: Array<any> = [ '/user/info' ]
huazai128/nest-emp2-wechat
src/components/StoreProvider/index.tsx
import { createContext } from 'react' const StoreContext = createContext<IStore>(null as any) interface IProps { store: IStore children: React.ReactNode } const RootStoreProvider = ({ store, children }: IProps) => { return ( <StoreContext.Provider value={{ ...store }}> {children} ...
huazai128/nest-emp2-wechat
src/utils/monitor/send.ts
import { FN1, PageInfo } from "./interfaces"; import Cookies from 'js-cookie' import { proxyHash, proxyHistory, wrHistory } from "./utils"; export default class SendLog { // 处理基本的页面信息,然后发送 public pageInfo: PageInfo = {} public msObserver?: MutationObserver = undefined private curHref = '' private p...
huazai128/nest-emp2-wechat
src/page/List/index.tsx
import React, { Fragment, useState, useEffect, useRef } from 'react' import { createPortal } from 'react-dom' import './style.scss' const List = () => { const [isVisible, setIsVisible] = useState<boolean>(false) const nodeRef = (document as Document).getElementById("emp-root") return ( <Fragment> ...
huazai128/nest-emp2-wechat
server/decorators/cookie.decorator.ts
<filename>server/decorators/cookie.decorator.ts import { createParamDecorator, ExecutionContext } from '@nestjs/common'; export interface CookiesResult { jwt: string } /** * Cookies 自定义装饰器,解析cookie参数 * @function QueryParams * @example `@Cookies()` * @example `@Cookies('jwt')` */ export const Cookies = create...
huazai128/nest-emp2-wechat
src/App.tsx
import RouterComp from '@src/components/RouterComp' import { RouterCompProps } from '@src/types' import '@src/styles/flex.scss' import 'antd/dist/antd.css'; import './App.scss' const App = (props: RouterCompProps) => <RouterComp {...props} /> export default App
huazai128/nest-emp2-wechat
src/config/config.test.ts
<filename>src/config/config.test.ts<gh_stars>1-10 import { ConfigParams } from "@src/interfaces/config" const config: ConfigParams = { apiHost: 'http://172.25.197.154:3002', wxUdbLoginDomain: '', } export default config
Wedvich/stellaris-to-json
src/types.ts
<reponame>Wedvich/stellaris-to-json<filename>src/types.ts export enum AstNodeType { array = 'array', boolean = 'boolean', endOfFile = 'endOfFile', number = 'number', object = 'object', property = 'property', string = 'string', } export type AstNode = | ArrayExpression | BooleanLiteral | EndOfFileMa...
Wedvich/stellaris-to-json
src/index.ts
import { tokenize } from './tokenizer'; import { parse } from './parser'; import { transform } from './transformer'; import { generate } from './generator'; import * as t from './types'; /** * Converts a Stellaris data file to JSON. * @param text Text contents of the Stellaris data file. * @returns JSON string wit...
Wedvich/stellaris-to-json
tests/parser.test.ts
import * as t from '../src/types'; import { parse } from '../src/parser'; import type { Token } from '../src/tokenizer'; it('parses variables', () => { const tokens: Array<Token> = [ { type: 'identifier', value: '@s_t1_cost' }, { type: 'assignment', value: '=' }, { type: 'number', value: '1' }, ]; c...
Wedvich/stellaris-to-json
src/tokenizer.ts
const LINEBREAK = /\r?\n|\r/; const WHITESPACE = /\s/; const NUMBERS = /\d/; const IDENTIFIERS = /[a-z0-9_\-@]/i; export interface Token { type: 'assignment' | 'bracket' | 'boolean' | 'comment' | 'comparison' | 'identifier' | 'number' | 'string'; value: string; } const makeIdentifier = (value: string): Token => {...
Wedvich/stellaris-to-json
tests/tokenizer.test.ts
<gh_stars>0 import { tokenize } from '../src/tokenizer'; it('throws a TypeError when it encounters an unrecognized character', () => { const fixture = ` ! = yes `; expect(() => tokenize(fixture)).toThrow({ message: 'Unexpected character: !', name: TypeError.name, }); }); it('handles boolean value...
Wedvich/stellaris-to-json
src/generator.ts
<reponame>Wedvich/stellaris-to-json<filename>src/generator.ts<gh_stars>0 import * as t from './types'; const _generate = (node: t.AstNode): number | boolean | string => { switch (node.type) { case t.AstNodeType.object: return `{${node.properties.map(_generate).join(',')}}`; case t.AstNodeType.property...
Wedvich/stellaris-to-json
tests/index.test.ts
<gh_stars>0 import fs from 'fs'; import path from 'path'; import { convert } from '../src'; it('correctly converts an object data file into JSON', async () => { const fixture = await fs.promises.readFile(path.join(__dirname, './fixtures/00_required_sets.txt'), 'utf8'); const jsonFixture = await fs.promises.readFi...
Wedvich/stellaris-to-json
tests/traverser.test.ts
<gh_stars>0 import * as t from '../src/types'; import { traverse, Visitor } from '../src/traverser'; it('calls the visit method', () => { const visitor: Visitor = { object: jest.fn(), }; const ast = t.objectExpression([]); traverse(ast, visitor); expect(visitor.object).toHaveBeenCalledTimes(1); });
Wedvich/stellaris-to-json
tests/transformer.test.ts
<reponame>Wedvich/stellaris-to-json<gh_stars>0 import * as t from '../src/types'; import { transform } from '../src/transformer'; it('merges duplicate object properties', () => { const ast = t.objectExpression([ t.objectProperty( 'has_monthly_income', t.objectExpression([ t.objectProperty('re...
Wedvich/stellaris-to-json
src/traverser.ts
import * as t from './types'; export type Visitor = Partial<Record<t.AstNodeType, (node: t.AstNode, parent?: t.AstNode) => void>>; export const traverse = (root: t.AstNode, visitor: Visitor): void => { const traverseArray = (nodes: Array<t.AstNode>, parent?: t.AstNode) => { nodes.forEach(child => { traver...
Wedvich/stellaris-to-json
src/parser.ts
<reponame>Wedvich/stellaris-to-json<filename>src/parser.ts import type { Token } from './tokenizer'; import * as t from './types'; const isArray = (tokens: Array<Token>, current: number): boolean => { const token = tokens[current]; let nextToken = tokens[current + 1]; let nextIndex = current + 1; while (nextT...
Wedvich/stellaris-to-json
src/transformer.ts
<filename>src/transformer.ts import * as t from './types'; import { traverse } from './traverser'; const wrapKeyword = (id: string) => id.replace(/^(constructor)$/, '%%__$1__%%'); const unwrapKeyword = (id: string) => id.replace(/^%%__(.*)__%%$/, '$1'); // TODO: Don't mutate? export const transform = (root: t.AstNode...
Wedvich/stellaris-to-json
tests/generator.test.ts
<reponame>Wedvich/stellaris-to-json import * as t from '../src/types'; import { generate } from '../src/generator'; it('generates empty JSON', () => { const ast = t.objectExpression([]); const json = generate(ast); expect(json).toEqual('{}'); }); it('generates JSON with primitive properties', () => { const ...
emanuelmoraes-dev/build-git-clone
src/index.ts
// importing import fs from 'fs' import rimraf from 'rimraf' import { spawn } from 'child_process' import { resolve, join } from 'path' // parse to promise import { promisify } from 'util' const mkdir = promisify(fs.mkdir) const rmdir = promisify(rimraf) function getStdioLogObj (stdioLog: StdioLog) { return { incl...
emanuelmoraes-dev/build-git-clone
dist/index.d.ts
export declare enum StdioLog { IncludeSilent = 0, IncludeShow = 1, Show = 2, None = 3 } export declare function clone(folder: string, url: string, afterCommand?: string | null, { git, stdioInherit, stdoutLog, stderrLog, internalLog }?: { git?: string; stdioInherit?: boolean; stdoutLog?: Stdi...
vojtaholik/simple
src/simple.ts
<filename>src/simple.ts import { app, BrowserWindow, ipcMain, screen } from 'electron'; import { autoUpdater } from 'electron-updater'; import path from 'path'; import kill from 'tree-kill'; import { fork, ChildProcess } from 'child_process'; import log from 'electron-log'; import { debounce } from 'lodash'; import { ...
vojtaholik/simple
src/main.dev.ts
/* eslint global-require: off, no-console: off */ /** * This module executes inside of electron's main process. You can start * electron renderer process from here and communicate with the other processes * through IPC. * * When running `yarn build` or `yarn build-main`, this file is compiled to * `./src/main.pr...
vojtaholik/simple
src/tray.ts
<filename>src/tray.ts /* eslint-disable import/prefer-default-export */ import { Tray } from 'electron'; import log from 'electron-log'; import { KeyboardEvent } from 'electron/main'; import { trySimpleScript, debugToggle } from './simple'; import { getAssetPath } from './assets'; let tray: Tray | null = null; const ...
vojtaholik/simple
src/assets.ts
/* eslint-disable import/prefer-default-export */ import { app } from 'electron'; import path from 'path'; const checkPackaged = (name) => app.isPackaged ? path.join(process.resourcesPath, name) : path.join(__dirname, '..', name); export const getAssetPath = (...paths: string[]): string => { return path.j...
vojtaholik/simple
src/types.ts
<gh_stars>0 import { BasePromptOptions, ArrayPromptOptions } from './enquirer'; export interface SimplePromptOptions extends BasePromptOptions { choices: any; from: 'prompt' | 'show' | 'log' | 'choices'; detail: string | null; } export interface SimpleArrayPromptOptions extends ArrayPromptOptions { from: 'prom...
vojtaholik/simple
src/notifications.ts
/* eslint-disable import/prefer-default-export */ import { app, BrowserWindow, protocol, screen } from 'electron'; import log from 'electron-log'; import path from 'path'; import { getAssetPath } from './assets'; let notificationWindow: BrowserWindow | null = null; export const createNotification = async () => { no...
vojtaholik/simple
src/shortcuts.ts
/* eslint-disable import/prefer-default-export */ import { grep } from 'shelljs'; import log from 'electron-log'; import { globalShortcut } from 'electron'; import chokidar from 'chokidar'; import path from 'path'; import { SIMPLE_SCRIPTS_PATH, SIMPLE_APP_SCRIPTS_PATH, trySimpleScript, } from './simple'; export...
vojtaholik/simple
src/App.tsx
/* eslint-disable jsx-a11y/no-autofocus */ /* eslint-disable jsx-a11y/label-has-associated-control */ import React, { KeyboardEvent, RefObject, useCallback, useEffect, useRef, useState, } from 'react'; import { app, ipcRenderer, nativeTheme } from 'electron'; import { SimplePromptOptions } from './types'; i...
vojtaholik/simple
src/debug.ts
/* eslint-disable import/prefer-default-export */ import { app, BrowserWindow, screen } from 'electron'; import { getAssetPath } from './assets'; const styles = 'dist/style.css'; const page = (html: string) => `<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width...
vojtaholik/simple
src/prompt.ts
/* eslint-disable import/prefer-default-export */ import { BrowserWindow, screen, nativeTheme, app } from 'electron'; import log from 'electron-log'; import { getAssetPath } from './assets'; import iohook from 'iohook'; let promptWindow: BrowserWindow | null = null; export const createPromptWindow = async () => { p...
mmmeff/graphql-tag
src/documentCache.ts
<gh_stars>0 import type { default as LRUCache } from 'lru-cache'; import { DocumentNode } from 'graphql/language/ast'; interface CacheClient<K, V> { has: (key: K) => boolean; set: (key: K, value: V) => void; get: (key: K) => V | undefined; delete: (key: K) => boolean; clear: () => void; } type DocC...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/HospitalBedCapacity/src/components/HospitalWidget.ts
/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, property, internalProperty, query, PropertyValues, } from "lit-ele...
dzlatic/webex-contact-center-widget-starter
lit-element/webpack.config.ts
/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { CleanWebpackPlugin } from "clean-webpack-plugin"; import ...
dzlatic/webex-contact-center-widget-starter
angular/src/app/my-custom-component/my-custom-component.component.ts
import { Component, OnInit, ViewEncapsulation } from '@angular/core'; @Component({ selector: 'my-custom-component', templateUrl: './my-custom-component.component.html', styleUrls: ['./my-custom-component.component.scss'], encapsulation: ViewEncapsulation.ShadowDom }) export class MyCustomComponentComponent imp...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/CovidByLocation/src/components/Table.ts
/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, property, internalProperty, PropertyValues, query, } from "lit-ele...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/Timer/src/components/time-circle.ts
<reponame>dzlatic/webex-contact-center-widget-starter /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { DateTime, Duration } from "luxon"; import { html, LitElemen...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/Timer/src/index.ts
<filename>Examples/Widgets/Timer/src/index.ts /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, css, property, query } from "lit-e...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/CRM/src/index.ts
<reponame>dzlatic/webex-contact-center-widget-starter /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, css, internalPro...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/RSS/src/index.ts
<filename>Examples/Widgets/RSS/src/index.ts /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, css, internalProperty, p...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/CRM/src/components/Visits.ts
<reponame>dzlatic/webex-contact-center-widget-starter<gh_stars>10-100 /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, pr...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/CRM/src/types/declare.d.ts
<filename>Examples/Widgets/CRM/src/types/declare.d.ts /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ declare module "*.scss" { const css: CSSResult; export default c...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/Timer/src/components/App.ts
<filename>Examples/Widgets/Timer/src/components/App.ts /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { DateTime, Duration, Interval } from "luxon"; import { html...
dzlatic/webex-contact-center-widget-starter
lit-element/src/index.ts
/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, css, internalProperty } from "lit-element"; import { Desktop } from "@wxcc-deskt...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/RSS/src/components/App.ts
<filename>Examples/Widgets/RSS/src/components/App.ts<gh_stars>10-100 /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, int...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/CovidByLocation/src/components/App.ts
/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, internalProperty, PropertyValues, property, query, } from "lit-ele...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/LearningWidgetSample/src/components/App.ts
<reponame>dzlatic/webex-contact-center-widget-starter /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, PropertyValues, ...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/LearningWidgetSample/src/index.ts
/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, css, property } from "lit-element"; import "./components/App"; /** * Please giv...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/CRM/src/customer-data/mock-customer-blob.ts
export const data = [ { "type": "meta", "label": "ID", "value": "6009c1d89966d3040ab6732e" }, { "type": "header", "label": "MRN", "value": "366A7-234BZ" }, { "type": "meta", "label": "Active Account", "value": false }, { "type": "meta", "label": "Balance", "value": "$1,315.22" }, { "type": "header", "label": ...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/HospitalBedCapacity/src/components/HospitalItem.ts
<reponame>dzlatic/webex-contact-center-widget-starter /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, property, } from "...
dzlatic/webex-contact-center-widget-starter
react/src/index.tsx
<filename>react/src/index.tsx import { DireflowComponent } from "direflow-component"; import App from "./direflow-component/App"; const direflowProperties = { componentTitle: "React Component", agentId: "agent1", darkTheme: false, sampleList: [ "Create with React", "Build as Web Component", "Use it...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/CRM/src/components/Summary.ts
<gh_stars>10-100 /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, property } from "lit-element"; import { ifDefined } from "lit-h...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/Map/src/components/App.ts
/* eslint-disable @typescript-eslint/ban-ts-ignore */ /** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, internalProperty, ...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/Map/src/index.ts
/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { html, LitElement, customElement, css, internalProperty, property } from "lit-element"; import { Deskt...
dzlatic/webex-contact-center-widget-starter
react/src/direflow-component/sdk.ts
<reponame>dzlatic/webex-contact-center-widget-starter import { Desktop } from "@wxcc-desktop/sdk"; /** * Replace the namespace here according to your widget/component name */ export const logger = Desktop.logger.createLogger("my-custom-widget");
dzlatic/webex-contact-center-widget-starter
lit-element/src/[sandbox]/sandbox.mock.ts
/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ export const agentContactData: any /** Service.Aqm.Contact.AgentContact["data"] **/ = { mediaResourceId: "Y2lzY29zcG...
dzlatic/webex-contact-center-widget-starter
Examples/Widgets/CRM/src/components/VisitBadge.ts
/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { DateTime } from "luxon"; import { html, LitElement, customElement, property, query } from "lit-element"; import s...
vvnhattien98/my-first-project
src/app/edit-user/edit-user.component.ts
<reponame>vvnhattien98/my-first-project<filename>src/app/edit-user/edit-user.component.ts import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; import { MatDialog } from '@angular/material'; ...
vvnhattien98/my-first-project
src/app/avatar-dialog/avatar-dialog.component.ts
<reponame>vvnhattien98/my-first-project<gh_stars>0 import { Component, OnInit, Input } from '@angular/core'; import { FirebaseService } from '../services/firebase.service'; import { MatDialogRef } from '@angular/material'; @Component({ selector: 'app-avatar-dialog', templateUrl: './avatar-dialog.component.html', ...
qualweb/dom
src/index.ts
<reponame>qualweb/dom import { Page, Viewport, HTTPResponse } from 'puppeteer'; import { QualwebOptions, PageOptions } from '@qualweb/core'; import { PageData } from '@qualweb/dom'; import fetch from 'node-fetch'; import { DEFAULT_DESKTOP_USER_AGENT, DEFAULT_MOBILE_USER_AGENT, DEFAULT_DESKTOP_PAGE_VIEWPORT_WIDTH...
qualweb/dom
src/constants.ts
/** * PAGE USER AGENT */ export const DEFAULT_DESKTOP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firefox/22.0'; export const DEFAULT_MOBILE_USER_AGENT = 'Mozilla/5.0 (Linux; U; Android 2.2; en-us; DROID2 GLOBAL Build/S273) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 M...
Leonid-Bajdullin/express-typescript-boilerplate
src/api/controllers/TeamController.ts
import { Body, Get, Put, Delete, JsonController, Post, OnUndefined, Param } from 'routing-controllers'; import { Team } from '../models/Team'; import { TeamService } from '../services/TeamService'; import { TeamRequestDto } from '../dto/TeamRequestDto'; import { TeamNotFoundError } from...
Leonid-Bajdullin/express-typescript-boilerplate
src/api/services/AccountService.ts
<filename>src/api/services/AccountService.ts import { Service } from 'typedi'; import { OrmRepository } from 'typeorm-typedi-extensions'; import { Account } from '../models/Account'; import { Logger, LoggerInterface } from '../../decorators/Logger'; import { AccountRepository } from '../repositories/AccountRepository'...
Leonid-Bajdullin/express-typescript-boilerplate
src/api/models/Account.ts
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'; import { User } from './User'; @Entity() export class Account { @PrimaryGeneratedColumn() public id: string; @Column() public provider: string; @Column() public salt: string; @ManyToOne(() => User, (user: User) ...
Leonid-Bajdullin/express-typescript-boilerplate
src/api/controllers/UserController.ts
import { Body, Delete, Get, JsonController, OnUndefined, Param, Post, UseBefore, Put } from 'routing-controllers'; import { UserNotFoundError } from '../errors/UserNotFoundError'; import { User } from '../models/User'; import { UserService } from '../services/UserService'; import { ...