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 ReactQuill, { Quill } from 'react-quill';
import { axios, Content } from 'choerodon-front-boot';
import 'react-quill/dist/quill.snow.css';
import './Editor.scss';
import { Modal, Input, Button, Form, Tabs, Upload, Icon } from 'choerodon-ui';
import { FormattedMessage, injectIntl } from 'react-intl';
const TabPane = Tabs.TabPane;
const Dragger = Upload.Dragger;
const FormItem = Form.Item;
const limitSize = 5120;
const Align = Quill.import('attributors/style/align');
Align.whitelist = ['right', 'center', 'justify'];
Quill.register(Align, true);
const Size = Quill.import('attributors/style/size');
Size.whitelist = ['10px', '12px', '14px', '16px', '18px', '20px'];
Quill.register(Size, true);
const Font = Quill.import('attributors/style/font');
Font.whitelist = ['STSong', 'STKaiti', 'STHeiti', 'STFangsong', 'SimSun', 'KaiTi', 'SimHei', 'FangSong', 'Microsoft-YaHei'];
Quill.register(Font, true);
const CustomToolbar = () => (
<div id="toolbar"></div>
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-front-boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';
import SystemSettingStore from '../../../stores/global/system-setting/SystemSettingStore';
import '../../user/user-info/Userinfo.scss';
const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'global.system-setting.edit';
const prefixClas = 'c7n-iam-system-setting-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;
function rotateFlag(rotate) {
/**
* 裁剪头像上传
*/
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-boot-combine';
import PropTypes from 'prop-types';
import querystring from 'query-string';
import './AvatarUploader.scss';
const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const prefixClas = 'c7n-iam-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;
function rotateFlag(rotate) {
return (rotate / 90) % 2 !== 0;
import React, { Component } from 'react';
import ReactQuill, { Quill } from 'react-quill';
import { axios, Content } from '@choerodon/boot';
import 'react-quill/dist/quill.snow.css';
import './Editor.scss';
import { Modal, Input, Button, Form, Tabs, Upload, Icon } from 'choerodon-ui';
import { FormattedMessage, injectIntl } from 'react-intl';
const TabPane = Tabs.TabPane;
const Dragger = Upload.Dragger;
const FormItem = Form.Item;
const limitSize = 5120;
const Align = Quill.import('attributors/style/align');
Align.whitelist = ['right', 'center', 'justify'];
Quill.register(Align, true);
const Size = Quill.import('attributors/style/size');
Size.whitelist = ['10px', '12px', '14px', '16px', '18px', '20px'];
Quill.register(Size, true);
const Font = Quill.import('attributors/style/font');
Font.whitelist = ['STSong', 'STKaiti', 'STHeiti', 'STFangsong', 'SimSun', 'KaiTi', 'SimHei', 'FangSong', 'Microsoft-YaHei'];
Quill.register(Font, true);
const CustomToolbar = () => (
<div id="toolbar"></div>
/**
* 裁剪头像上传
*/
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-front-boot';
import PropTypes from 'prop-types';
import querystring from 'query-string';
import './AvatarUploader.scss';
const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const prefixClas = 'c7n-iam-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;
function rotateFlag(rotate) {
return (rotate / 90) % 2 !== 0;
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from '@choerodon/boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';
const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'user.userinfo.avatar.edit';
const prefixClas = 'user-info-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;
function rotateFlag(rotate) {
/**
* 裁剪头像上传
*/
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from '@choerodon/boot';
import PropTypes from 'prop-types';
import querystring from 'query-string';
import './AvatarUploader.scss';
const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const prefixClas = 'c7n-iam-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;
function rotateFlag(rotate) {
return (rotate / 90) % 2 !== 0;
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-front-boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';
const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'user.userinfo.avatar.edit';
const prefixClas = 'user-info-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;
function rotateFlag(rotate) {
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from '@choerodon/boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';
import SystemSettingStore from '../../../stores/global/system-setting/SystemSettingStore';
import '../../user/user-info/Userinfo.scss';
const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'global.system-setting.edit';
const prefixClas = 'c7n-iam-system-setting-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;
function rotateFlag(rotate) {
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { inject } from 'mobx-react';
import { Button, Icon, Modal, Upload } from 'choerodon-ui';
import { axios } from 'choerodon-front-boot';
import querystring from 'query-string';
import UserInfoStore from '../../../stores/user/user-info/UserInfoStore';
const Dragger = Upload.Dragger;
const { round } = Math;
const editorWidth = 540;
const editorHeight = 300;
const defaultRectSize = 200;
const minRectSize = 80;
const intlPrefix = 'user.userinfo.avatar.edit';
const prefixClas = 'user-info-avatar-edit';
const limitSize = 1024;
let relativeX = 0;
let relativeY = 0;
let resizeMode;
let resizeX = 0;
let resizeY = 0;
let resizeSize = 0;
function rotateFlag(rotate) {