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
var app=function(t){"use strict";function e(){}function n(t){return t()}function i(){return Object.create(null)}function o(t){t.forEach(n)}function s(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e}function r(t,e,n){t.insertBefore(e,n||null)}function l(t){t.parentNode.removeChild(t)}function d(t){return document.createElement(t)}function u(t){const e={};for(const n of t)e[n.name]=n.value;return e}let h;function c(t){h=t}function f(){if(!h)throw new Error("Function called outside component initialization");return h}function p(t){f().$$.on_mount.push(t)}function y(t){f().$$.after_update.push(t)}function g(t){f().$$.on_destroy.push(t)}function m(){const t=f();return(e,n)=>{const i=t.$$.callbacks[e];if(i){const o=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);i.slice().forEach((e=>{e.call(t,o)}))}}}const $=[],b=[],k=[],w=[],x=Promise.resolve();let A=!1;function C(t){k.push(t)}let _=!1;const v=new Set;function D(){if(!_){_=!0;do{for(let t= |
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 { Component, ViewChild, ElementRef, Input, Output, EventEmitter, OnChanges } from '@angular/core'; | |
@Component({ | |
selector: 'animated-svg', | |
template: '<div #container><ng-content></ng-content></div>', | |
}) | |
export class AnimatedSvgComponent implements OnChanges { | |
@Input() public shouldAnimate?: boolean = true; | |
@Input() public duration?: number; | |
@Input() public delay?: number; |
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 { BehaviorSubject, Observable, Subscription } from 'rxjs'; | |
import { cloneDeep } from 'lodash'; | |
export interface State {} | |
export class Store { | |
private _state = new BehaviorSubject<State>({}); | |
public constructor() { | |
// this.state$.subscribe((state) => console.log('state >>>', state)); |
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
# This will parse all provided named params in such way: | |
# TL;DR. someFunction --skip 10 --name "SomeName" --dev. -----> skip=10, name="SomeName", dev=true | |
# One liner, just easy to use in each necessary function | |
# while [[ $# -gt 0 ]]; do if [[ $1 == *"--"* ]]; then if [[ $2 != *"--"* ]]; then declare "${1/--/}"="${2:-true}"; else declare "${1/--/}"=true; fi; fi; shift; done | |
while [[ $# -gt 0 ]]; do | |
if [[ $1 == *"--"* ]]; then | |
if [[ $2 != *"--"* ]]; then declare "${1/--/}"="${2:-true}"; | |
else declare "${1/--/}"=true; |
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 createRipple(color: string = '#ffffff80', duration: number = 1000) { | |
const styles = { | |
position: 'relative', | |
overflow: 'hidden', | |
transform: 'translate3d(0, 0, 0)', | |
cursor: 'pointer', | |
'&::after': { | |
content: '""', | |
display: 'block', |
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
interface RippleMixin { | |
vert?: 'top' | 'bottom' | 'center'; | |
hor?: 'left' | 'right' | 'center'; | |
color?: string; | |
opacity?: number; | |
duration?: number; | |
timingFunction?: string; | |
} | |
/** |
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
// Usage | |
// <div [clsx]="[true && 'Test', classes.Test]"></div> | |
import { Directive, Input, ElementRef, OnChanges } from '@angular/core'; | |
import clsx, { ClassValue } from 'clsx'; | |
/** | |
* Directive for module clsx. | |
* | |
* @see https://www.npmjs.com/package/clsx. |
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
/* ------------------------------------------------------------------- */ | |
/** | |
* Inserts data into file | |
* | |
* @param path - File path | |
* @param data - Data to insert | |
* @param [after] - String | RegExp, after which to insert | |
* @param [before] - String | RegExp, before which to insert | |
* @param [removeNewLine] - Whether to remove empty newLine | |
* after / before insertion position |
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
/* ------------------------------------------------------------------- */ | |
/** | |
* Creates structure for data (specifically for swagger) | |
* | |
* @param data - Original data object, for which there would | |
* be created a structure | |
*/ | |
/* ------------------------------------------------------------------- */ | |
export const createDataStructure = (data: any) => { |
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
/* ------------------------------------------------------------------- */ | |
/** | |
* Parses data and corrects types: from string to boolean | number | |
* | |
* @param data - Data to parse | |
*/ | |
/* ------------------------------------------------------------------- */ | |
export const parseTypes = <T = any>(input: T, deepness?: number): T => { | |
function parser(data: T, deepLevel = 0): T { |