Skip to content

Instantly share code, notes, and snippets.

View OlIvAl's full-sized avatar

Oleg OlIvAl

  • Russia
View GitHub Profile
@OlIvAl
OlIvAl / filter.ts
Created March 2, 2020 14:30
pagination and filter
import { IFilter, IFilterOptionsObject } from './interfaces';
import { action, computed, observable } from 'mobx';
import isEqual from 'lodash/isEqual';
export class Filter<T> implements IFilter<T> {
filterDefaultValue: T;
@observable filterSelectOptions: IFilterOptionsObject<T> | null = null;
@computed get notDefaultFilterObject(): Partial<T> {
return (Object.keys(this.filterObject) as (keyof T)[]).reduce<Partial<T>>((acc, key): Partial<
@OlIvAl
OlIvAl / package.json
Last active October 25, 2017 11:38 — forked from paulirish/rAF.js
requestAnimationFrame polyfill
{
"name": "raf.js",
"version": "1.0.0"
}
@OlIvAl
OlIvAl / jquery.validate.unobtrusive.js
Last active October 19, 2017 12:46
Custom version jquery.validate.unobtrusive
/*!
** Unobtrusive validation support library for jQuery and jQuery Validate
** Copyright (C) Microsoft Corporation. All rights reserved.
*/
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
/*global document: false, jQuery: false */
(function ($) {
var $jQval = $.validator,
@OlIvAl
OlIvAl / jquery.formatCurrency-1.4.0.custom.js
Last active November 17, 2017 10:02
Custom version jquery.formatCurrency-1.4.0
// This file is part of the jQuery formatCurrency Plugin.
//
// The jQuery formatCurrency Plugin is free software: you can redistribute it
// and/or modify it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// The jQuery formatCurrency Plugin is distributed in the hope that it will
// be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@OlIvAl
OlIvAl / owl.carousel.js
Last active March 18, 2019 21:24
OwlCarousel with custom changes