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
/** | |
Replace the "<DOCID>" with your document ID, or the entire URL per say. Should be something like: | |
var EMAIL_TEMPLATE_DOC_URL = 'https://docs.google.com/document/d/asdasdakvJZasdasd3nR8kmbiphqlykM-zxcrasdasdad/edit?usp=sharing'; | |
*/ | |
var EMAIL_TEMPLATE_DOC_URL = 'https://docs.google.com/document/d/<DOCID>/edit?usp=sharing'; | |
var EMAIL_SUBJECT = 'This is an important email'; | |
/** | |
* Sends a customized email for every response on a form. |
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-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]="popoverMenuOrigin!" | |
[cdkConnectedOverlayOpen]="menuShown" [cdkConnectedOverlayHasBackdrop]="true" | |
(backdropClick)="closeMenu()" | |
[cdkConnectedOverlayPositions]="menuPositions" | |
cdkConnectedOverlayPanelClass="menu-popover" | |
> | |
<div class="menu-popover__list"> | |
<div class="menu-popover__list__item"> | |
Duplicate | |
</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
import { Component, OnInit, QueryList, ViewChildren } from '@angular/core'; | |
import { UsersService } from './core/services/users.service'; | |
import { first } from 'rxjs/operators'; | |
import { ListKeyManager } from '@angular/cdk/a11y'; | |
import { ListItemComponent } from './core/components/list-item/list-item.component'; | |
import { UP_ARROW, DOWN_ARROW, ENTER } from '@angular/cdk/keycodes'; | |
@Component({ | |
selector: 'app-root', |
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
<!-- Add this before your HTML's closing body tag --> | |
<script> | |
Reveal.initialize({ | |
controls: true, | |
progress: true, | |
history: true, | |
center: true, | |
plugins: [ | |
RevealMarkdown, |
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
it('should return expected user data (HttpClient called once)', () => { | |
const mockUsers: User[] = [ | |
{ | |
id: 1, | |
name: 'User A', | |
email: 'userA@example.com', | |
username: 'userA', | |
address: { | |
street: 'sample street 1', | |
suite: '123 ABC', |
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
// replace the tests below | |
it('should call the CounterService.getFromStorage method on component init', () => { | |
jest.spyOn(CounterServiceMock, 'getFromStorage'); | |
component.ngOnInit(); | |
expect(component.counterService.getFromStorage).toHaveBeenCalled(); | |
}); | |
it('should retrieve the last saved value from CounterService on component init', () => { | |
jest.spyOn(CounterServiceMock, 'getFromStorage').mockReturnValue(12); | |
component.counterService.saveToStorage(12); |
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
.cdk-overlay-container { | |
display: block; | |
&.z-index-top { | |
z-index: 2050; | |
} | |
} | |
.duplicate-modal-overlay { | |
z-index: 999; | |
} |
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 { AfterViewInit, ChangeDetectorRef, Directive, Input, OnChanges, Renderer2, SimpleChanges, inject } from '@angular/core'; | |
@Directive({ | |
selector: '[appPopoverPositionalClass]', | |
standalone: true, | |
}) | |
export class PopoverPositionalClassDirective implements AfterViewInit, OnChanges { | |
@Input() originY: string | undefined = 'top'; | |
@Input() targetSelector!: string; | |
@Input() inverseClass = ''; |
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 {describe, expect, test} from '@jest/globals'; | |
import * as API from './api'; | |
import fetch from 'jest-mock-fetch'; | |
describe('api module', () => { | |
test('addProp should add bootcamp', async () => { | |
/** | |
* spying on the fetchUser method to check if it is called | |
* by addProp | |
* we're also mocking a return value from the fetchUser |
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": "2022-11-21T23:25:28.008Z", | |
"name": "sjs-request-page-index", | |
"tags": [ | |
"sjs-request-page-index" | |
], | |
"content": "import { Component } from \"solid-js\";\n\nconst RequestIndex: Component = () => {\n return (\n <div class=\"flex flex-col md:flex-row gap-4 justify-center items-center bg-gray-200 p-4 border border-gray-300 min-h-full rounded-lg\">\n <div class=\"text-2xl flex gap-4 items-center\">\n <ion-icon class=\"text-4xl\" name=\"arrow-back-circle-outline\"></ion-icon>\n <span>Select a request from the left panel</span>\n </div>\n </div>\n );\n};\n\nexport default RequestIndex;", | |
"contentType": "typescriptreact" | |
}, |
NewerOlder