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 vm from "@/main"; | |
const emitOnMain = (event) => { | |
vm.$root.$emit(event); | |
}; |
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 typescript from 'rollup-plugin-typescript2' | |
import pkg from './package.json' | |
const dependencies = Object.keys(pkg.dependencies || {}); | |
const peerDependencies = Object.keys(pkg.peerDependencies || {}); | |
const external = [...dependencies, ...peerDependencies]; | |
export default { | |
input: 'src/index.ts', | |
output: [ |
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 ExampleService from ".."; | |
export default interface IExampleContext { | |
service: ExampleService | |
} |
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 * as React from 'react'; | |
import IErrorBoundary from "./IErrorBoundary"; | |
import ErrorBoundaryFallbackUI from './ErrorBoundaryFallbackUI'; | |
type ErrorBoundaryState = { | |
error?: Error, | |
}; | |
/** | |
* Note that this component can not be refactored using hooks yet. |
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
<?php | |
namespace App\Traits\ApiLibrary; | |
use DateTimeImmutable; | |
use DateTimeInterface; | |
use DateTimeZone; | |
use Exception; | |
use GuzzleHttp\Middleware; | |
use Psr\Http\Message\RequestInterface; |
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 axios, {AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse} from "axios"; | |
import {Constants} from "./Constants"; | |
import AxiosUtilities from "./Utilities/AxiosUtilities"; | |
import { | |
GetServiceCredentials, | |
IServicesCredentials, | |
} from "./IServiceTypes"; | |
/** | |
* Provides constants and functionality common to and api service. |
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
.ms-Link-Child { | |
color: inherit; | |
text-decoration: inherit; | |
} |
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
// src/contexts/UserContext/IUser.ts | |
/** | |
* A representation of the user returned from the Microsoft Graph api. | |
*/ | |
export default interface IUser { | |
"@odata.context"?: string, // "https://graph.microsoft.com/v1.0/$metadata#users/$entity" | |
displayName: string, // "Lance Gliser" | |
givenName?: string, // "Lance" | |
jobTitle?: string, // "Developer" | |
mail?: string, // "lance@fragmentedthought.com" |
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
/** | |
* Api actions | |
*/ | |
import * as constants from './constants.api'; | |
// POST auth | |
export function apiAuthCredentialsStartAction(credentials) { | |
return { type: constants.API_AUTH_CREDENTIALS_REQUEST_SUCCESS, credentials }; | |
} |
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
// The date input stores the time in local timezone format | |
// To output the string 'as it appears' rather than shifted by local | |
// We have to shift the date by the offset before displaying it | |
var displayDate = field.valueAsDate; | |
displayDate.setMinutes(displayDate.getTimezoneOffset()); | |
return displayDate.toLocaleDateString(); |