venus-design 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +43 -0
- package/dist/CheckBoxInput/index.d.ts +3 -0
- package/dist/CheckBoxInput/index.js +77 -0
- package/dist/Config/api.d.ts +38 -0
- package/dist/Config/api.js +432 -0
- package/dist/Config/constants.d.ts +23 -0
- package/dist/Config/constants.js +29 -0
- package/dist/Config/proxy.d.ts +165 -0
- package/dist/Config/proxy.js +234 -0
- package/dist/Config/request.d.ts +5 -0
- package/dist/Config/request.js +261 -0
- package/dist/Config/storage.d.ts +18 -0
- package/dist/Config/storage.js +108 -0
- package/dist/Config/utils.d.ts +32 -0
- package/dist/Config/utils.js +245 -0
- package/dist/DownLoad/index.d.ts +48 -0
- package/dist/DownLoad/index.js +246 -0
- package/dist/DownLoadFile/index.d.ts +48 -0
- package/dist/DownLoadFile/index.js +232 -0
- package/dist/NotificationManager/index.d.ts +6 -0
- package/dist/NotificationManager/index.js +48 -0
- package/dist/NumberPercent/index.d.ts +11 -0
- package/dist/NumberPercent/index.js +49 -0
- package/dist/NumberPercent/styles.less +18 -0
- package/dist/NumberUnits/index.d.ts +5 -0
- package/dist/NumberUnits/index.js +55 -0
- package/dist/NumberUnits/styles.less +18 -0
- package/dist/ProForm/index.d.ts +122 -0
- package/dist/ProForm/index.js +868 -0
- package/dist/ProForm/styles.less +59 -0
- package/dist/RadioAndInput/index.d.ts +3 -0
- package/dist/RadioAndInput/index.js +95 -0
- package/dist/Search/index.d.ts +3 -0
- package/dist/Search/index.js +111 -0
- package/dist/TreeSelect/index.d.ts +17 -0
- package/dist/TreeSelect/index.js +117 -0
- package/dist/Upload/index.d.ts +3 -0
- package/dist/Upload/index.js +145 -0
- package/dist/Upload/styles.less +46 -0
- package/dist/UploadImage/index.d.ts +3 -0
- package/dist/UploadImage/index.js +99 -0
- package/dist/VenusUpload/index.d.ts +12 -0
- package/dist/VenusUpload/index.js +72 -0
- package/dist/VenusUpload/services.d.ts +1 -0
- package/dist/VenusUpload/services.js +10 -0
- package/dist/common.less +48 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +18 -0
- package/package.json +97 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@import '~@/common';
|
|
2
|
+
|
|
3
|
+
.uploadList{
|
|
4
|
+
width: 300px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
color: rgba(0,0,0,.85);
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-variant: tabular-nums;
|
|
11
|
+
list-style: none;
|
|
12
|
+
-webkit-font-feature-settings: "tnum";
|
|
13
|
+
font-feature-settings: "tnum";
|
|
14
|
+
line-height: 1.5715;
|
|
15
|
+
.container{
|
|
16
|
+
transition: opacity .3s,height .3s;
|
|
17
|
+
.listItem{
|
|
18
|
+
position: relative;
|
|
19
|
+
height: 22.001px;
|
|
20
|
+
margin-top: 8px;
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
.listItemInfo{
|
|
23
|
+
height: 100%;
|
|
24
|
+
padding: 0 4px;
|
|
25
|
+
transition: background-color .3s;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-flow: row;
|
|
28
|
+
.Prewload{
|
|
29
|
+
margin-left: 10px;
|
|
30
|
+
}
|
|
31
|
+
.uploadSpan{
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
.uploadLinkIcon{
|
|
35
|
+
flex: none;
|
|
36
|
+
margin-right: 5px;
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.listItem:hover{
|
|
43
|
+
background-color: @tableHoverBgColor;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import "antd/es/upload/style";
|
|
2
|
+
import _Upload from "antd/es/upload";
|
|
3
|
+
import "antd/es/app/style";
|
|
4
|
+
import _App from "antd/es/app";
|
|
5
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
10
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
import { LoadingOutlined, PlusOutlined } from '@ant-design/icons';
|
|
13
|
+
import React, { useState, useEffect } from 'react';
|
|
14
|
+
import { notifier } from "../NotificationManager";
|
|
15
|
+
var getBase64 = function getBase64(img, callback) {
|
|
16
|
+
console.log(img);
|
|
17
|
+
if (img) {
|
|
18
|
+
var reader = new FileReader();
|
|
19
|
+
reader.addEventListener('load', function () {
|
|
20
|
+
return callback(reader.result);
|
|
21
|
+
});
|
|
22
|
+
reader.readAsDataURL(img);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var _beforeUpload = function beforeUpload(file, message) {
|
|
26
|
+
var isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
|
27
|
+
if (!isJpgOrPng) {
|
|
28
|
+
//message.error('只支持Jpg和Png格式图片');
|
|
29
|
+
notifier.emit('apiError', {
|
|
30
|
+
type: 'message',
|
|
31
|
+
content: '只支持Jpg和Png格式图片'
|
|
32
|
+
});
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
var isLt2M = file.size / 1024 / 1024 < 2;
|
|
36
|
+
if (!isLt2M) {
|
|
37
|
+
// message.error('图片大小不能超过2MB!');
|
|
38
|
+
notifier.emit('apiError', {
|
|
39
|
+
type: 'message',
|
|
40
|
+
content: '图片大小不能超过2MB'
|
|
41
|
+
});
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
};
|
|
46
|
+
//上传图片
|
|
47
|
+
var UploadImage = function UploadImage(props) {
|
|
48
|
+
var _App$useApp = _App.useApp(),
|
|
49
|
+
message = _App$useApp.message,
|
|
50
|
+
modal = _App$useApp.modal,
|
|
51
|
+
notification = _App$useApp.notification;
|
|
52
|
+
var _useState = useState(false),
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
loading = _useState2[0],
|
|
55
|
+
setLoading = _useState2[1];
|
|
56
|
+
var _useState3 = useState(props.value),
|
|
57
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
58
|
+
imageUrl = _useState4[0],
|
|
59
|
+
setImageUrl = _useState4[1];
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
if (props && props.value) {
|
|
62
|
+
setImageUrl(props.value);
|
|
63
|
+
}
|
|
64
|
+
}, [props.value]);
|
|
65
|
+
var handleChange = function handleChange(info) {
|
|
66
|
+
getBase64(info.file.originFileObj, function (url) {
|
|
67
|
+
setLoading(false);
|
|
68
|
+
setImageUrl(url);
|
|
69
|
+
if (props.onChange) {
|
|
70
|
+
props.onChange(url);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
var uploadButton = /*#__PURE__*/React.createElement("div", null, loading ? /*#__PURE__*/React.createElement(LoadingOutlined, null) : /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
style: {
|
|
76
|
+
marginTop: 8
|
|
77
|
+
}
|
|
78
|
+
}, "Upload"));
|
|
79
|
+
return /*#__PURE__*/React.createElement(_Upload, _extends({}, props, {
|
|
80
|
+
name: "avatar",
|
|
81
|
+
listType: "picture-card",
|
|
82
|
+
className: "avatar-uploader",
|
|
83
|
+
showUploadList: false
|
|
84
|
+
//action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
|
85
|
+
,
|
|
86
|
+
beforeUpload: function beforeUpload(v) {
|
|
87
|
+
return _beforeUpload(v, message);
|
|
88
|
+
},
|
|
89
|
+
onChange: handleChange
|
|
90
|
+
}), imageUrl ? /*#__PURE__*/React.createElement("img", {
|
|
91
|
+
src: imageUrl,
|
|
92
|
+
alt: "avatar",
|
|
93
|
+
style: {
|
|
94
|
+
width: '100%',
|
|
95
|
+
height: 100
|
|
96
|
+
}
|
|
97
|
+
}) : uploadButton);
|
|
98
|
+
};
|
|
99
|
+
export default UploadImage;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import "antd/es/upload/style";
|
|
2
|
+
import _Upload from "antd/es/upload";
|
|
3
|
+
import "antd/es/button/style";
|
|
4
|
+
import _Button from "antd/es/button";
|
|
5
|
+
import "antd/es/app/style";
|
|
6
|
+
import _App from "antd/es/app";
|
|
7
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
8
|
+
import { storage } from "./..";
|
|
9
|
+
import { uploadUrl } from "./services";
|
|
10
|
+
import React from "react";
|
|
11
|
+
/**
|
|
12
|
+
* 导入组件
|
|
13
|
+
* uploadUrl 上传的路径
|
|
14
|
+
* prefix:请求的前缀
|
|
15
|
+
* data:上传时需要携带的参数
|
|
16
|
+
* callback :成功后的回调方法
|
|
17
|
+
* @param props
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
var VenusUpload = function VenusUpload(props) {
|
|
21
|
+
var _App$useApp = _App.useApp(),
|
|
22
|
+
message = _App$useApp.message,
|
|
23
|
+
modal = _App$useApp.modal,
|
|
24
|
+
notification = _App$useApp.notification;
|
|
25
|
+
var callback = props.callback;
|
|
26
|
+
var onSuccess = function onSuccess(res) {
|
|
27
|
+
if (res && res.success) {
|
|
28
|
+
if (res.data.success || res.data.code == 200) {
|
|
29
|
+
message.success("导入成功!");
|
|
30
|
+
callback && callback();
|
|
31
|
+
} else {
|
|
32
|
+
notification.open({
|
|
33
|
+
placement: 'top',
|
|
34
|
+
duration: null,
|
|
35
|
+
message: '导入失败!',
|
|
36
|
+
description: res.data.message,
|
|
37
|
+
onClick: function onClick() {
|
|
38
|
+
console.log('Notification Clicked!');
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
notification.open({
|
|
44
|
+
placement: 'top',
|
|
45
|
+
duration: null,
|
|
46
|
+
message: '导入失败!',
|
|
47
|
+
description: res.data.message,
|
|
48
|
+
onClick: function onClick() {
|
|
49
|
+
console.log('Notification Clicked!');
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var onError = function onError(err, res) {
|
|
55
|
+
if (res) {
|
|
56
|
+
message.error(res.message);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/React.createElement(_Upload, _extends({}, props, {
|
|
60
|
+
action: props.uploadUrl ? props.uploadUrl : uploadUrl(props.prefix || "workhour"),
|
|
61
|
+
data: props.data || undefined,
|
|
62
|
+
showUploadList: false,
|
|
63
|
+
headers: {
|
|
64
|
+
Authorization: storage.getAccessToken()
|
|
65
|
+
},
|
|
66
|
+
onSuccess: onSuccess,
|
|
67
|
+
onError: onError
|
|
68
|
+
}), props.children || /*#__PURE__*/React.createElement(_Button, {
|
|
69
|
+
size: "small"
|
|
70
|
+
}, props.text));
|
|
71
|
+
};
|
|
72
|
+
export default VenusUpload;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function uploadUrl(prefix: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { hostMap } from "./..";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* 导入
|
|
5
|
+
*/
|
|
6
|
+
export function uploadUrl(prefix) {
|
|
7
|
+
var host = hostMap[prefix][process.env.PROXY_ENV || 'development'];
|
|
8
|
+
var prefixStr = process.env.NODE_ENV === 'production' ? host : "/" + prefix || "/workhour";
|
|
9
|
+
return "".concat(prefixStr, "/system/tools/excel/import");
|
|
10
|
+
}
|
package/dist/common.less
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//全局布局
|
|
2
|
+
@contentBg: #0a1025; //内容区背景
|
|
3
|
+
@rootBg: #f9f9f9; //工程背景
|
|
4
|
+
@secondSliderBg: #f8fafa; //二级菜单背景
|
|
5
|
+
//全局color
|
|
6
|
+
@primaryColor: #2e61f2; //主题色 --关键行动点,操作状态、重要信息高亮,图形化等场
|
|
7
|
+
@textPrimaryColor: #2c3f53; //重要文字颜色 --用于重要级文字信息、内页标题信息(label)
|
|
8
|
+
@textGeneralColor: #5a6876; //普通文字颜色 --用于普通级段落信息、内标题信息(如详情段落标题信息)(value)
|
|
9
|
+
@textSupplyColor: #848f9b; //辅助文字颜色 --用于辅助、次要文字信息、普通按钮描边
|
|
10
|
+
@textHolderColor: #aeb4ba; // --用于表格输入框文字提示、缺省图下方文案
|
|
11
|
+
@borderColor: #ececec; // --分割线及边框颜色
|
|
12
|
+
@tableHoverBgColor: #f9fbff; // --用于表格的选中底色
|
|
13
|
+
@disabledColor: #f9f9f9; //禁用颜色
|
|
14
|
+
@errorColor: #ff5363; //错误提示颜色
|
|
15
|
+
@emphasizeColor: #ff9430; //错误提示颜色
|
|
16
|
+
@hoverColor: fade(@primaryColor, 10); //鼠标悬停颜色
|
|
17
|
+
@operateColor: fade(@primaryColor, 80); //表格操作按钮颜色
|
|
18
|
+
@timelineColor: fade(@primaryColor, 20); //时间轴颜色
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
// 菜单设置
|
|
23
|
+
@headerHeight: 60px; //菜单高度
|
|
24
|
+
@firstMenuWidth: 70px; // 一级菜单宽度
|
|
25
|
+
@secondMenuWidth: 180px; // 一级菜单宽度
|
|
26
|
+
//全局字号
|
|
27
|
+
@textFontLgX: 18px; //标题
|
|
28
|
+
@textFontLg: 16px; //小标题&需醒目区别的正文
|
|
29
|
+
@textFontGen: 14px; //正文
|
|
30
|
+
@textFontSm: 12px; //正文和辅助文字
|
|
31
|
+
|
|
32
|
+
//全局间距
|
|
33
|
+
@marginLgX: 24px;
|
|
34
|
+
@marginLg: 16px;
|
|
35
|
+
@marginGen: 12px;
|
|
36
|
+
@marginSm: 8px;
|
|
37
|
+
@marginSmX: 4px;
|
|
38
|
+
@paddingLgX: 24px;
|
|
39
|
+
@paddingLg: 16px;
|
|
40
|
+
@paddingGen: 12px;
|
|
41
|
+
@paddingSm: 8px;
|
|
42
|
+
@paddingSmX: 4px;
|
|
43
|
+
|
|
44
|
+
//全局圆角
|
|
45
|
+
@borderRadius: 4px;
|
|
46
|
+
|
|
47
|
+
// 小圆角 用于复选框等
|
|
48
|
+
@smallBorderRadius: 2px;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { default as ProForm, FormItem, FormText, FormGroup, FormItem2, FormItemSE, FormItemCust, FormDependency, FormText2, FormTextER, FormTextCust, FormTextarea, FormSelect, FormSelect2, FormSelectER, FormRadioGroup, FormNumber, FormNumberPercent, FormNumberUnit, FormDatePicker, FormDatePickerDesign, FormUpload, FormSearch, FormTreeSelect, VenusFormSelect, VenusFormText, VenusFormDatePicker, VenusFormRadioGroup, VenusFormCheckBoxInputGroup, VenusFormCheckBoxGroup, VenusFormTextarea, VenusFormNumber, VenusFormNumberUnit, VenusFormNumberPercent, VenusFormUpload, VenusFormTreeSelect, VenusFormSearch, VenusFormSwitch, VenusFormUploadPro, VenusFormUploadImage } from './ProForm';
|
|
2
|
+
export { default as NumberPercent } from './NumberPercent';
|
|
3
|
+
export { default as NumberUnit } from './NumberUnits';
|
|
4
|
+
export { default as Search } from './Search';
|
|
5
|
+
export { default as TreeSelect } from './TreeSelect';
|
|
6
|
+
export { default as DownLoad } from './DownLoad';
|
|
7
|
+
export { default as DownLoadFile } from './DownLoadFile';
|
|
8
|
+
export { default as VenusUpload } from './VenusUpload';
|
|
9
|
+
export { default as RadioAndInput } from './RadioAndInput';
|
|
10
|
+
export { default as CheckBoxInput } from './CheckBoxInput';
|
|
11
|
+
export { default as UploadImage } from './UploadImage';
|
|
12
|
+
export { default as NotificationManager, notifier } from './NotificationManager';
|
|
13
|
+
export { getUserInfo, getLockScreenTime, getMenuConfig, addMenuConfig, editMenuConfig, getUserMenu, getMenus, getDifyConfigs, deleteFile, validateLogin, deleteNewFile, downloadFile, venusAi, uploadFile, updateSecLevelId, fileByAssId, mnLoginDify, refreshTokenFn, getFileData } from './Config/api';
|
|
14
|
+
export { default as request } from './Config/request';
|
|
15
|
+
export { default as storage, checkCookieAuth } from './Config/storage';
|
|
16
|
+
export { LIVE_ACCESS_TOKEN, LIVE_REFRESH_TOKEN, VENUS_PROJECT_INFO, LIVE_ACCESS_TOKEN_EXPIRES_TIME, LIVE_REFRESH_TOKEN_EXPIRES_TIME, HISTORY_PATHNAME, QUICK_ENTRY_OPEN, DATE_FORMAT, DATETIME_FORMAT, SPECIAL_DATETIME_FORMAT, SPECIAL_DATETIME_FORMAT_30, SPECIAL_DATETIME_FORMAT_00, ADMIN_APP_TOKEN, BUCKET, chromeWin32, chromeWin64, chromeMac } from './Config/constants';
|
|
17
|
+
export { default as proxy, hostMap } from './Config/proxy';
|
|
18
|
+
export { thousandSeparator, unitWanNum, tableUnitWanNum, getCookieDomain, getUrlParams, getUrlSearchStr, renderMillion, isNotNullVenus, renderFileNameAndIds, renderFileNameAndIdsNew, renderTableFileNameAndIds, haveSecLevel, haveSecLevelNew, isValidDate, getweek, formatLarkAvatar } from './Config/utils';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { default as ProForm, FormItem, FormText, FormGroup, FormItem2, FormItemSE, FormItemCust, FormDependency, FormText2, FormTextER, FormTextCust, FormTextarea, FormSelect, FormSelect2, FormSelectER, FormRadioGroup, FormNumber, FormNumberPercent, FormNumberUnit, FormDatePicker, FormDatePickerDesign, FormUpload, FormSearch, FormTreeSelect, VenusFormSelect, VenusFormText, VenusFormDatePicker, VenusFormRadioGroup, VenusFormCheckBoxInputGroup, VenusFormCheckBoxGroup, VenusFormTextarea, VenusFormNumber, VenusFormNumberUnit, VenusFormNumberPercent, VenusFormUpload, VenusFormTreeSelect, VenusFormSearch, VenusFormSwitch, VenusFormUploadPro, VenusFormUploadImage } from "./ProForm";
|
|
2
|
+
export { default as NumberPercent } from "./NumberPercent";
|
|
3
|
+
export { default as NumberUnit } from "./NumberUnits";
|
|
4
|
+
export { default as Search } from "./Search";
|
|
5
|
+
export { default as TreeSelect } from "./TreeSelect";
|
|
6
|
+
export { default as DownLoad } from "./DownLoad";
|
|
7
|
+
export { default as DownLoadFile } from "./DownLoadFile";
|
|
8
|
+
export { default as VenusUpload } from "./VenusUpload";
|
|
9
|
+
export { default as RadioAndInput } from "./RadioAndInput";
|
|
10
|
+
export { default as CheckBoxInput } from "./CheckBoxInput";
|
|
11
|
+
export { default as UploadImage } from "./UploadImage";
|
|
12
|
+
export { default as NotificationManager, notifier } from "./NotificationManager";
|
|
13
|
+
export { getUserInfo, getLockScreenTime, getMenuConfig, addMenuConfig, editMenuConfig, getUserMenu, getMenus, getDifyConfigs, deleteFile, validateLogin, deleteNewFile, downloadFile, venusAi, uploadFile, updateSecLevelId, fileByAssId, mnLoginDify, refreshTokenFn, getFileData } from "./Config/api";
|
|
14
|
+
export { default as request } from "./Config/request";
|
|
15
|
+
export { default as storage, checkCookieAuth } from "./Config/storage";
|
|
16
|
+
export { LIVE_ACCESS_TOKEN, LIVE_REFRESH_TOKEN, VENUS_PROJECT_INFO, LIVE_ACCESS_TOKEN_EXPIRES_TIME, LIVE_REFRESH_TOKEN_EXPIRES_TIME, HISTORY_PATHNAME, QUICK_ENTRY_OPEN, DATE_FORMAT, DATETIME_FORMAT, SPECIAL_DATETIME_FORMAT, SPECIAL_DATETIME_FORMAT_30, SPECIAL_DATETIME_FORMAT_00, ADMIN_APP_TOKEN, BUCKET, chromeWin32, chromeWin64, chromeMac } from "./Config/constants";
|
|
17
|
+
export { default as proxy, hostMap } from "./Config/proxy";
|
|
18
|
+
export { thousandSeparator, unitWanNum, tableUnitWanNum, getCookieDomain, getUrlParams, getUrlSearchStr, renderMillion, isNotNullVenus, renderFileNameAndIds, renderFileNameAndIdsNew, renderTableFileNameAndIds, haveSecLevel, haveSecLevelNew, isValidDate, getweek, formatLarkAvatar } from "./Config/utils";
|
package/package.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "venus-design",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "venus all compoments",
|
|
5
|
+
"module": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "npm run dev",
|
|
9
|
+
"dev": "dumi dev",
|
|
10
|
+
"build": "father build",
|
|
11
|
+
"build:watch": "father dev",
|
|
12
|
+
"docs:build": "dumi build",
|
|
13
|
+
"docs:preview": "dumi preview",
|
|
14
|
+
"prepare": "husky install && dumi setup",
|
|
15
|
+
"doctor": "father doctor",
|
|
16
|
+
"lint": "npm run lint:es && npm run lint:css",
|
|
17
|
+
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
18
|
+
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
19
|
+
"prepublishOnly": "father doctor && npm run build"
|
|
20
|
+
},
|
|
21
|
+
"authors": [
|
|
22
|
+
"j14208656797@163.com"
|
|
23
|
+
],
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"commitlint": {
|
|
29
|
+
"extends": [
|
|
30
|
+
"@commitlint/config-conventional"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"lint-staged": {
|
|
34
|
+
"*.{md,json}": [
|
|
35
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
36
|
+
],
|
|
37
|
+
"*.{css,less}": [
|
|
38
|
+
"stylelint --fix",
|
|
39
|
+
"prettier --write"
|
|
40
|
+
],
|
|
41
|
+
"*.{js,jsx}": [
|
|
42
|
+
"eslint --fix",
|
|
43
|
+
"prettier --write"
|
|
44
|
+
],
|
|
45
|
+
"*.{ts,tsx}": [
|
|
46
|
+
"eslint --fix",
|
|
47
|
+
"prettier --parser=typescript --write"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"antd": "^4.3.0 || ^5.4.0",
|
|
55
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
56
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
57
|
+
"@ant-design/icons": "^5.6.1",
|
|
58
|
+
"js-cookie": "^2.2.1",
|
|
59
|
+
"qs": "^6.10.1",
|
|
60
|
+
"@types/js-cookie": "^3.0.6",
|
|
61
|
+
"@types/lodash": "^4.17.17",
|
|
62
|
+
"@types/qs": "^6.14.0",
|
|
63
|
+
"babel-plugin-import": "^1.13.8",
|
|
64
|
+
"classnames": "^2.2.6",
|
|
65
|
+
"lodash": "^4.17.21",
|
|
66
|
+
"umi-request": "^1.4.0"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@ant-design/cssinjs": "^1.5.6",
|
|
70
|
+
"@commitlint/cli": "^17.1.2",
|
|
71
|
+
"@commitlint/config-conventional": "^17.1.0",
|
|
72
|
+
"@types/js-cookie": "^3.0.6",
|
|
73
|
+
"@types/lodash": "^4.17.17",
|
|
74
|
+
"@types/qs": "^6.14.0",
|
|
75
|
+
"@types/react": "^18.0.0",
|
|
76
|
+
"@types/react-dom": "^18.0.0",
|
|
77
|
+
"@umijs/lint": "^4.0.0",
|
|
78
|
+
"antd": "^4.3.0 || ^5.4.0",
|
|
79
|
+
"babel-plugin-import": "^1.13.8",
|
|
80
|
+
"classnames": "^2.2.6",
|
|
81
|
+
"dumi": "^2.4.13",
|
|
82
|
+
"eslint": "^8.23.0",
|
|
83
|
+
"father": "^4.1.0",
|
|
84
|
+
"husky": "^8.0.1",
|
|
85
|
+
"js-cookie": "^2.2.1",
|
|
86
|
+
"lint-staged": "^13.0.3",
|
|
87
|
+
"lodash": "^4.17.21",
|
|
88
|
+
"prettier": "^2.7.1",
|
|
89
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
|
90
|
+
"prettier-plugin-packagejson": "^2.2.18",
|
|
91
|
+
"qs": "^6.10.1",
|
|
92
|
+
"react": "^18.0.0",
|
|
93
|
+
"react-dom": "^18.0.0",
|
|
94
|
+
"stylelint": "^14.9.1",
|
|
95
|
+
"umi-request": "^1.4.0"
|
|
96
|
+
}
|
|
97
|
+
}
|