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
const t = new Date(); | |
if (isPlatformBrowser(this.platformId)) { | |
const timeoutDelay = 60_000; | |
const events = ['keypress', 'click', 'wheel', 'mousemove', 'ontouchstart']; | |
const $onInactive = from(events.map(e => fromEvent(this.document, e))).pipe( | |
mergeAll(), | |
map(() => false), | |
timeout({ each: timeoutDelay, with: () => of(true) }), | |
repeat(), |
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
@Component({ | |
selector: 'content-component', | |
template: '<div>Test {{ data }}</div>', | |
}) | |
export class ContentComponent { | |
@Input() data: string; | |
} | |
@Component({ | |
selector: 'child-component', |
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
@Component({ | |
selector: 'parent-component', | |
template: '<child-component><content-component></content-component></child-component>' | |
}) | |
export class ParentComponent implements AfterViewInit { | |
} | |
@Component({ | |
selector: 'child-component', | |
template: '<button (click)="this.increaseContentCounter()"></button><ng-content></ng-content>' |
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
@Component({ | |
selector: 'parent-component', | |
template: '<child-component></child-component>' | |
}) | |
export class ParentComponent implements AfterViewInit { | |
@ViewChild(ChildComponent) child!: ChildComponent; | |
protected myData = 'my data'; | |
handleEvent(counter: 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
@Component({ | |
selector: 'parent-component', | |
template: '<child-component [myInput]="myData" (myOutput)="handleEvent($event)"></child-component>' | |
}) | |
export class ParentComponent { | |
protected myData = 'my data'; | |
handleEvent(counter: number) { | |
alert(counter); | |
} |
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 { promisify } from 'util'; | |
import axios from 'axios'; | |
const exec = promisify(require('child_process').exec); | |
async function run() { | |
const affected = []; | |
for (const project of ['api', 'frontend', 'functions']) { | |
console.error(`Project: ${project}`); |
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
$ git diff | |
diff --git a/package.json b/package.json | |
index a1e396fb4..0514a26ee 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -45,20 +45,20 @@ | |
"dependencies": { | |
"@angular-material-components/color-picker": "7.0.0", | |
"@angular-material-components/datetime-picker": "7.0.0", | |
- "@angular/animations": "13.0.2", |
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
// Managed by Frits | |
const init = () => { | |
let _handler = () => {}; // just an empty function in case no listener is registered. | |
setTimeout(() => { | |
_handler({ myEventData: 'something' }); | |
}, 1000); | |
return { | |
onEvent: (handler) => { _handler = handler } |
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
img, video { | |
height: 200px; | |
:host-context(.desktop) & { | |
height: 300px; | |
} | |
} | |
:host-context(.desktop) { | |
img, video { |
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 * as imagepicker from 'nativescript-imagepicker'; | |
import { ImagePickerMediaType } from 'nativescript-imagepicker'; | |
import { EMPTY, Observable } from 'rxjs'; | |
import { knownFolders } from 'tns-core-modules/file-system'; | |
import { fromFile } from 'tns-core-modules/image-source'; | |
import * as dialogs from 'tns-core-modules/ui/dialogs'; | |
import * as utils from 'tns-core-modules/utils/utils'; | |
export declare const NO_IMAGE_SELECTED = 'no-image-selected'; |
NewerOlder