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 MIGHTYCALL_API_URL = 'https://api.mightycall.com/v4/webphone'; | |
const MIGHTYCALL_CORE_URL = 'https://api.mightycall.com/v4/webphone/JavaScriptSDK/mightycall.webphone.core.js'; | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
declare let MightyCallWebPhoneCore: any; | |
const MIGHTYCALL_EVENT = 'mightycall_event'; | |
const MIGHTYCALL_WEBPHONE_STATUS = 'mightycall_webphone_status'; | |
enum CallStatus { |
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 React, { useRef } from 'react'; | |
import useAutoCompleteAddress from '../_generic/useAutoCompleteAddress'; | |
const Example = () => { | |
const ref = useRef(); | |
const { addressComponents } = useAutoCompleteAddress(ref); | |
return ( | |
<> | |
<input type="text" ref={ref} /> |
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 csv from 'fast-csv'; | |
import * as fs from 'fs'; | |
interface Row { | |
[s: string]: string; | |
} | |
type RowCallBack = (data: Row, index: number) => object; | |
export class CSVReader { | |
protected file: string; | |
protected csvOptions = { | |
delimiter: ',', |
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
interface NodeList {first(): Node;} | |
if (!NodeList.prototype.first) { | |
NodeList.prototype.first = function (): Node { | |
if (this.length === 0) { | |
return null; | |
} | |
return this[ 0 ]; | |
}; | |
} |