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 { forwardRef, Directive, ElementRef, HostListener, Renderer, SecurityContext } from '@angular/core'; | |
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; | |
import { DomSanitizer } from '@angular/platform-browser'; | |
type OnChangeFn = (innerHTML: string) => void; | |
type OnTouchFn = () => void; | |
const ENTER_KEY_CODE = 13; | |
@Directive({ |
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
/** | |
* Created by daniel on 22/11/16. | |
*/ | |
import bowser = require('bowser'); | |
export function fixQueryCommandValueForMSEdge(): void { | |
if (!bowser.msedge && !bowser.msie) { | |
return; |
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
/** | |
* Created by daniel on 12/12/16. | |
*/ | |
import { OnDestroy, OnInit } from '@angular/core'; | |
import { Subscription } from 'rxjs'; | |
export interface ISubscribeTo { | |
// array of functions which create the subscriptions | |
subscribers: Function[]; |
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
// NB: I'd normally deploy this using CloudFormation | |
/* | |
The lambda needs the following configuration: | |
- A bunch of memory probably 2GB | |
- Better to have a long timeout just in case | |
- Must include the following later: | |
- nodejs10.x (or a newer layer - but haven't tested) | |
- BUCKET_NAME environment variable |
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
// NB: I'd normally deploy this using CloudFormation | |
/* | |
The lambda needs the following configuration: | |
- A bunch of memory probably 2GB | |
- Better to have a long timeout just in case | |
- Must include the following later: | |
- nodejs10.x (or a newer layer - but haven't tested) | |
- BUCKET_NAME environment variable | |
- Permissions to access BUCKET_NAME |
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
{ | |
"$schema": "http://json-schema.org/draft-07/schema", | |
"definitions": { | |
"state-machine": { | |
"type": "object", | |
"properties": { | |
"Comment": { | |
"type": "string" | |
}, | |
"StartAt": { |