This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "plugins": { | |
| "tools/nx-tailwind-graph-plugin/index.js": {}, | |
| "@tailwindcss/postcss": {} | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function getCurrentUrl(pathname: string) { | |
| return pathname.split(/[?#]/)[0] | |
| } | |
| export function checkIsActive(pathname: string, url: string) { | |
| const current = getCurrentUrl(pathname) | |
| if (!current || !url) { | |
| return false | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useState } from 'react' | |
| type CopiedValue = string | null | |
| type CopyFn = (text: string) => Promise<boolean> // Return success | |
| export function useCopyToClipboard(): [CopiedValue, CopyFn] { | |
| const [copiedText, setCopiedText] = useState<CopiedValue>(null) | |
| const copy: CopyFn = async text => { | |
| if (!navigator?.clipboard) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Pipe, PipeTransform } from '@angular/core'; | |
| /** | |
| * A pipe for human readable file size representation. | |
| */ | |
| @Pipe({ | |
| name: 'filesize' | |
| }) | |
| export class FileSizePipe implements PipeTransform { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Subject } from "rxjs"; | |
| export function TakeUntilDestroyDecorator(blackList: string[] = []) { | |
| return function(constructor) { | |
| let originalDestroy = constructor.prototype.ngOnDestroy; | |
| if (typeof originalDestroy !== "function") { | |
| console.warn( | |
| `${constructor.name} is using @TakeUntilDestroy but does not implement OnDestroy` | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Animated, Easing } from "react-native"; | |
| export const bottomToUp = (index: any, sceneProps: any) => { | |
| const { layout, position, scene } = sceneProps; | |
| const height = layout.initHeight; | |
| const translateY = position.interpolate({ | |
| inputRange: [index - 1, index, index + 1], | |
| outputRange: [height, 0, 0] | |
| }); | |
| const opacity = position.interpolate({ |