This file contains 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
squel = require 'squel' | |
squel.useFlavour 'mssql' | |
squel.cls.DefaultQueryBuilderOptions.autoQuoteAliasNames = true | |
squel.cls.DefaultQueryBuilderOptions.tableAliasQuoteCharacter = '"' | |
_parsers = [ | |
# if a field ends with (Date) then parse the value as a date | |
regex: /\(Date\)$/ | |
parse: (value) -> new Date value |
This file contains 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
/* Inspired from https://github.com/angular/material/pull/1599 */ | |
(function () { | |
"use strict"; | |
/** | |
* @ngdoc run | |
* @module material.core.color | |
* | |
* @description | |
* This builds in the css styles to allow use of .md-accent.md-fg to apply the accent class to the foreground (css color attribute). | |
* |
This file contains 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
// Type definitions for Toastr 1.5.0 | |
// Project: https://github.com/Foxandxss/angular-toastr | |
/// <reference path="./angular.d.ts" /> | |
declare module toastr { | |
/** | |
* The settings that define the look and feel of the toasts | |
*/ | |
export interface IBaseOptions { |
This file contains 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
.modal(tabindex="-1" role="dialog" aria-hidden="true") | |
.modal-dialog.time-date | |
.modal-content | |
time-date-picker( | |
display-mode="{{displayMode}}" | |
default-mode="{{defaultMode}}" | |
default-date="{{defaultDate}}" | |
mindate="{{mindate}}" | |
maxdate="{{maxdate}}" | |
ng-model="model" |
This file contains 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
appModule.directive( | |
'lrInfiniteScroll', [ | |
'$timeout', function (timeout) { | |
return { | |
link: function (scope, element, attr) { | |
var | |
lengthThreshold = attr.scrollThreshold || 50, | |
timeThreshold = attr.timeThreshold || 400, | |
handler = scope.$eval(attr.lrInfiniteScroll), | |
promise = null, |
This file contains 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 React, {Component} from 'react'; | |
import {connect} from 'react-redux'; | |
class ReduxRouterConnect extends Component { | |
static contextTypes = { | |
router: React.PropTypes.object | |
}; | |
componentWillReceiveProps(nextProps) { | |
if (nextProps.to !== this.props.to) { |
This file contains 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 React, { createContext } from 'react'; | |
import { getDisplayName } from '@ts-react-utils/hoc'; | |
export const { Provider, Consumer } = createContext([]); | |
export function withShops(WrappedComponent) { | |
const withShopsComponent = (props) => ( | |
<Consumer> | |
{(shops) => <WrappedComponent {...props} shops={shops} />} | |
</Consumer> |
This file contains 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
const shopLoadingMachine = Machine({ | |
id: 'shop-loading', | |
initial: 'entry', | |
context: { | |
shopSettings: null | |
}, | |
states: { | |
entry: { | |
on: { | |
LOAD: { |
This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains 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
declare module 'pagix' { | |
export function between(num: number, min: number, max: number): number; | |
export function range(from: number, to: number): number[]; | |
export interface PagixOptions { | |
/** | |
* total of records to paginate | |
*/ | |
records: number; | |
/** |
OlderNewer