Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
window._ = require('lodash');
try {
window.Vue = require('vue');
window.Popper = require('popper.js').default;
window.$ = window.jQuery = require('jquery');
window.PerfectScrollbar = require('perfect-scrollbar').default;
window.moment = require('moment');
window.Swal = require('sweetalert2').mixin({
customClass: {
confirmButton: 'btn btn-success',
cancelButton: 'btn btn-danger'
},
buttonsStyling: false,
});
require('bootstrap');
require('bootstrap-material-design');
} catch (e) {
console.error(e);
}
Vue.use(require('./plugin').default);
import * as React from 'react';
import PerfectScrollbarType, * as PerfectScrollbarNamespace from 'perfect-scrollbar';
import psStyles from 'perfect-scrollbar/css/perfect-scrollbar.css';
import { OptionsContext } from '../components/OptionsProvider';
import styled, { createGlobalStyle } from '../styled-components';
/*
* perfect scrollbar umd bundle uses exports assignment while module uses default export
* so when bundled with webpack default export works but with jest it crashes
* That's why the following ugly fix is required
*/
const PerfectScrollbarConstructor =
PerfectScrollbarNamespace.default || ((PerfectScrollbarNamespace as any) as PerfectScrollbarType);
const PSStyling = createGlobalStyle`${psStyles && psStyles.toString()}`;
const StyledScrollWrapper = styled.div`
position: relative;
`;
export interface PerfectScrollbarProps {
options?: PerfectScrollbarType.Options;
className?: string;
updateFn?: (fn) => void;
}
export class PerfectScrollbar extends React.Component {
private _container: HTMLElement;
private inst: PerfectScrollbarType;