Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, { Component } from "react";
import PropTypes from "prop-types";
// import SyntaxHighlighter from "react-syntax-highlighter";
import SyntaxHighlighter from "react-syntax-highlighter";
const md5 = require("md5");
var Scroll = require("react-scroll");
var Link = Scroll.Link;
var DirectLink = Scroll.DirectLink;
var Element = Scroll.Element;
var Events = Scroll.Events;
var scroll = Scroll.animateScroll;
var scrollSpy = Scroll.scrollSpy;
import { docco } from "react-syntax-highlighter/styles/hljs";
import { atomDark } from "react-syntax-highlighter/styles/prism";
var log = require("loglevel");
const _ = require("lodash");
import axios from "axios";
let isDev = require("isdev");
console.log("preview isDev:", isDev);
if (isDev) {
log.setLevel("debug");
import React, { Component } from "react";
import PropTypes from "prop-types";
// import SyntaxHighlighter from "react-syntax-highlighter";
import SyntaxHighlighter from "react-syntax-highlighter";
const md5 = require("md5");
var Scroll = require("react-scroll");
var Link = Scroll.Link;
var DirectLink = Scroll.DirectLink;
var Element = Scroll.Element;
var Events = Scroll.Events;
var scroll = Scroll.animateScroll;
var scrollSpy = Scroll.scrollSpy;
import { docco } from "react-syntax-highlighter/styles/hljs";
import { atomDark } from "react-syntax-highlighter/styles/prism";
var log = require("loglevel");
const _ = require("lodash");
import axios from "axios";
let isDev = require("isdev");
console.log("preview isDev:", isDev);
if (isDev) {
log.setLevel("debug");
log.debug("in Development");
} else {
clickHandler = () => {
const { props } = this;
if (process.env.NODE_ENV === 'production') {
ScrollEvent.scrollEvent.register('begin', () => {
ReactGA.event({
category: 'Interactions',
action: 'Clicked Scroll Button',
label: `To [${props.href}]`,
});
});
} else {
// eslint-disable-next-line no-console
console.log(`Analytics disabled. clicked.`);
}
return props.onClick;
};
import React, { Component } from "react";
import PropTypes from "prop-types";
// import SyntaxHighlighter from "react-syntax-highlighter";
import SyntaxHighlighter from "react-syntax-highlighter";
const md5 = require("md5");
var Scroll = require("react-scroll");
var Link = Scroll.Link;
var DirectLink = Scroll.DirectLink;
var Element = Scroll.Element;
var Events = Scroll.Events;
var scroll = Scroll.animateScroll;
var scrollSpy = Scroll.scrollSpy;
import { docco } from "react-syntax-highlighter/styles/hljs";
import { atomDark } from "react-syntax-highlighter/styles/prism";
var log = require("loglevel");
const _ = require("lodash");
import axios from "axios";
let isDev = require("isdev");
console.log("preview isDev:", isDev);
import React, { Component } from "react";
import PropTypes from "prop-types";
// import SyntaxHighlighter from "react-syntax-highlighter";
import SyntaxHighlighter from "react-syntax-highlighter";
const md5 = require("md5");
var Scroll = require("react-scroll");
var Link = Scroll.Link;
var DirectLink = Scroll.DirectLink;
var Element = Scroll.Element;
var Events = Scroll.Events;
var scroll = Scroll.animateScroll;
var scrollSpy = Scroll.scrollSpy;
import { docco } from "react-syntax-highlighter/styles/hljs";
import { atomDark } from "react-syntax-highlighter/styles/prism";
var log = require("loglevel");
const _ = require("lodash");
import axios from "axios";
let isDev = require("isdev");
console.log("preview isDev:", isDev);
if (isDev) {
log.setLevel("debug");
log.debug("in Development");
import React, { Component } from "react";
import PropTypes from "prop-types";
// import SyntaxHighlighter from "react-syntax-highlighter";
import SyntaxHighlighter from "react-syntax-highlighter";
const md5 = require("md5");
var Scroll = require("react-scroll");
var Link = Scroll.Link;
var DirectLink = Scroll.DirectLink;
var Element = Scroll.Element;
var Events = Scroll.Events;
var scroll = Scroll.animateScroll;
var scrollSpy = Scroll.scrollSpy;
import { docco } from "react-syntax-highlighter/styles/hljs";
import { atomDark } from "react-syntax-highlighter/styles/prism";
var log = require("loglevel");
const _ = require("lodash");
import axios from "axios";
let isDev = require("isdev");
console.log("preview isDev:", isDev);
if (isDev) {
log.setLevel("debug");
log.debug("in Development");
} else {
log.setLevel("silent");
target.prototype.componentDidMount = function() {
ScrollEvents.scrollEvent.register('begin', (to, element) => {
// console.log('begin', to, element);
});
ScrollEvents.scrollEvent.register('end', (to, element) => {
// console.log('end', to, element);
});
ScrollSpy.update();
if (oldMount) oldMount.call(this);
};
import React, { Component } from "react";
import PropTypes from "prop-types";
// import SyntaxHighlighter from "react-syntax-highlighter";
import SyntaxHighlighter from "react-syntax-highlighter";
const md5 = require("md5");
var Scroll = require("react-scroll");
var Link = Scroll.Link;
var DirectLink = Scroll.DirectLink;
var Element = Scroll.Element;
var Events = Scroll.Events;
var scroll = Scroll.animateScroll;
var scrollSpy = Scroll.scrollSpy;
import { docco } from "react-syntax-highlighter/styles/hljs";
import { atomDark } from "react-syntax-highlighter/styles/prism";
var log = require("loglevel");
const _ = require("lodash");
import axios from "axios";
let isDev = require("isdev");
console.log("preview isDev:", isDev);
if (isDev) {
} from '../actions/prescriptions';
import {
openGlossaryModal,
openRefillModal
} from '../actions/modals';
import Pagination from '../../common/components/Pagination';
import { getScrollOptions } from '../../common/utils/helpers';
import LoadingIndicator from '../../common/components/LoadingIndicator';
import PrescriptionList from '../components/PrescriptionList';
import PrescriptionTable from '../components/PrescriptionTable';
const ScrollElement = Scroll.Element;
const scroller = Scroll.scroller;
class Active extends React.Component {
constructor(props) {
super(props);
const viewPref = sessionStorage.getItem('rxView');
this.handleSort = this.handleSort.bind(this);
this.pushAnalyticsEvent = this.pushAnalyticsEvent.bind(this);
this.handlePageSelect = this.handlePageSelect.bind(this);
this.formattedSortParam = this.formattedSortParam.bind(this);
this.scrollToTop = this.scrollToTop.bind(this);
this.checkWindowSize = _.debounce(() => {
const toggleDisplayStyle = window.getComputedStyle(this.viewToggle, null).getPropertyValue('display');
// the viewToggle element is hidden with CSS on the $small breakpoint
import _ from 'lodash/fp'; // eslint-disable-line no-restricted-imports
import classNames from 'classnames';
import Scroll from 'react-scroll';
import {
toIdSchema,
getDefaultFormState,
deepEquals,
} from '@department-of-veterans-affairs/react-jsonschema-form/lib/utils';
import { scrollToFirstError } from '../utilities/ui';
import { setArrayRecordTouched } from '../helpers';
import { errorSchemaIsValid } from '../validation';
const Element = Scroll.Element;
const scroller = Scroll.scroller;
/* Non-review growable table (array) field */
export default class ArrayField extends React.Component {
constructor(props) {
super(props);
// Throw an error if there’s no viewField (should be React component)
if (typeof this.props.uiSchema['ui:options'].viewField !== 'function') {
throw new Error(
`No viewField found in uiSchema for ArrayField ${
this.props.idSchema.$id
}.`,
);
}
/*