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
export function updateObject<T>(obj: T, partial: T): T { | |
if (!partial) { | |
return obj; | |
} | |
return Object.keys(partial).reduce((acc, key) => { | |
const value = partial[key]; | |
if (Array.isArray(value)) { | |
// @ts-ignore | |
acc[key] = updateArray(obj[key], value); | |
} else if (typeof value === 'object' && value !== 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
<ng-container [ngSwitch]="triState"> | |
<ng-container *ngSwitchCase="true"> | |
<input type="radio" id="mf" class="trigger mf" [value]="false" [(ngModel)]="model" (change)="update(model)" [disabled]="isDisabled"> | |
<label for="mf"></label> | |
<input id="st_{{formControlName}}_off" [name]="formControlName" type="radio" class="trigger minus" [value]="-1" [(ngModel)]="model" (change)="update(model)" [disabled]="isDisabled"> | |
<label for="st_{{formControlName}}_off"> | |
<div class="pin"> | |
<div class="ink"></div> |
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
date-selector { | |
@include flexbox((display: flex)); | |
width: 100%; | |
select { | |
width: auto; | |
&.month { | |
@include flex(1 0 auto); | |
margin: 0 6px; |