@zgfe/business-lib 1.1.65 → 1.1.66
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/es/addToPanel/demo/edit.d.ts +1 -2
- package/es/addToPanel/demo/index.d.ts +1 -2
- package/es/addToScene/demo/index.d.ts +1 -2
- package/es/assets/demo/button.d.ts +1 -2
- package/es/assets/demo/dropdown.d.ts +1 -2
- package/es/assets/demo/input.d.ts +1 -2
- package/es/assets/demo/picker.d.ts +2 -0
- package/es/assets/demo/picker.js +22 -0
- package/es/assets/demo/select.d.ts +2 -0
- package/es/assets/demo/select.js +30 -0
- package/es/assets/demo/table.d.ts +1 -2
- package/es/assets/styles/chunks.less +11 -5
- package/es/assets/styles/resetAntd.less +20 -10
- package/es/assets/styles/variable.less +3 -0
- package/es/attrCondition/demo/group.d.ts +1 -2
- package/es/attrCondition/demo/index.d.ts +1 -2
- package/es/attrCondition/styles/index.less +0 -1
- package/es/attrConditions/components/operateList.js +20 -4
- package/es/attrConditions/demo/group.d.ts +1 -2
- package/es/attrConditions/demo/index.d.ts +1 -2
- package/es/attrConditions/styles/index.less +0 -5
- package/es/attrConditions/utils/operates.d.ts +4 -0
- package/es/attrConditions/utils/operates.js +7 -0
- package/es/attributeSelector/demo/disable.d.ts +1 -2
- package/es/attributeSelector/demo/index.d.ts +1 -2
- package/es/attributeSelector/index.js +2 -2
- package/es/attributeSelector/styles/index.less +1 -0
- package/es/chart/demo/bar.d.ts +1 -2
- package/es/chart/demo/index.d.ts +1 -2
- package/es/chart/demo/map.d.ts +1 -2
- package/es/chart/demo/pie.d.ts +1 -2
- package/es/colorIcon/demo/index.d.ts +1 -2
- package/es/cycleTime/demo/disable.d.ts +1 -2
- package/es/cycleTime/demo/index.d.ts +1 -2
- package/es/cycleTime/demo/multi.d.ts +1 -2
- package/es/datePicker/demo/customType.d.ts +1 -2
- package/es/datePicker/demo/day.d.ts +1 -2
- package/es/datePicker/demo/index.d.ts +1 -2
- package/es/demoWrapper/demo/index.d.ts +1 -2
- package/es/dialog/demo/index.d.ts +1 -2
- package/es/dnd/demo/data.d.ts +1 -2
- package/es/dnd/demo/handle.d.ts +1 -2
- package/es/dnd/demo/index.d.ts +1 -2
- package/es/eventSelector/demo/index.d.ts +1 -2
- package/es/eventSelector/demo/index.js +1 -6
- package/es/eventSelector/index.js +4 -3
- package/es/eventSelector/styles/index.less +2 -1
- package/es/icon/demo/index.d.ts +1 -2
- package/es/icon/demo/list.d.ts +1 -2
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/layout/analysisLayout/demo/index.d.ts +1 -2
- package/es/layout/columnLayout/demo/index.d.ts +1 -2
- package/es/layout/detail/demo/index.d.ts +1 -2
- package/es/layout/optionTitle/components/btnMenu/demo.d.ts +1 -2
- package/es/layout/optionTitle/components/title/demo.d.ts +1 -2
- package/es/layout/optionTitle/demo/index.d.ts +1 -2
- package/es/layout/optionTitle/demo/layout.d.ts +1 -2
- package/es/layout/optionTitle/demo/page.d.ts +1 -2
- package/es/layout/optionTitle/demo/panelCreate.d.ts +1 -2
- package/es/loginForm/demo/index.d.ts +1 -2
- package/es/quickDatePicker/demo/index.d.ts +3 -0
- package/es/quickDatePicker/demo/index.js +40 -0
- package/es/quickDatePicker/index.d.ts +6 -0
- package/es/quickDatePicker/index.js +183 -0
- package/es/quickDatePicker/styles/index.less +138 -0
- package/es/quickDatePicker/types.d.ts +25 -0
- package/es/quickDatePicker/types.js +1 -0
- package/es/quickDatePicker/utils.d.ts +12 -0
- package/es/quickDatePicker/utils.js +52 -0
- package/es/searchInput/demo/index.d.ts +1 -2
- package/es/select/demo/children.d.ts +1 -2
- package/es/select/demo/customLabel.d.ts +1 -2
- package/es/select/demo/group.d.ts +1 -2
- package/es/select/demo/index.d.ts +1 -2
- package/es/select/demo/loading.d.ts +1 -2
- package/es/select/demo/multiple.d.ts +1 -2
- package/es/socket/demo/demo.d.ts +1 -2
- package/es/table/demo/index.d.ts +1 -2
- package/es/table/demo/index2.d.ts +1 -2
- package/es/table/demo/index3.d.ts +1 -2
- package/es/targetConditionGroup/demo/group.d.ts +1 -2
- package/es/targetConditionGroup/demo/index.d.ts +1 -2
- package/es/targetConditionGroup/styles/index.less +3 -0
- package/es/targetSelector/demo/index.d.ts +1 -2
- package/es/targetSelector/index.js +12 -4
- package/es/userCondition/conditions/tagsCondition.js +1 -4
- package/es/userCondition/conditions/textDesc.js +3 -2
- package/es/userCondition/demo/business.d.ts +1 -2
- package/es/userCondition/demo/index.d.ts +1 -2
- package/es/userCondition/demo/mockData.d.ts +27 -41
- package/es/userCondition/demo/mockData.js +121 -175
- package/es/userCondition/types.d.ts +8 -0
- package/es/userCondition/types.js +8 -0
- package/es/userCondition/util.d.ts +11 -1
- package/es/userCondition/util.js +35 -10
- package/es/userGroup/demo/group.d.ts +1 -2
- package/es/userGroup/demo/index.d.ts +1 -2
- package/es/userGroup/index.js +10 -2
- package/es/userGroup/styles/index.less +0 -1
- package/es/userTagsSelector/cascaderOverlay.js +29 -2
- package/es/userTagsSelector/demo/index.d.ts +1 -2
- package/es/userTagsSelector/demo/index.js +1 -1
- package/es/userTagsSelector/index.js +4 -2
- package/es/userTagsSelector/util.d.ts +1 -0
- package/es/userTagsSelector/util.js +11 -0
- package/es/utils/demo/ajax.d.ts +1 -2
- package/es/utils/demo/interruption.d.ts +1 -2
- package/package.json +2 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { BizQuickDatePicker } from '@zgfe/business-lib';
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
|
+
import '@zgfe/business-lib/es/assets/styles/resetAntd.less';
|
|
10
|
+
import { ConfigProvider } from 'antd';
|
|
11
|
+
import zhCN from 'antd/es/locale/zh_CN';
|
|
12
|
+
export default (function () {
|
|
13
|
+
var _useState = useState({
|
|
14
|
+
unit: 'month',
|
|
15
|
+
begin: '2023-06-23',
|
|
16
|
+
end: '2023-06-30',
|
|
17
|
+
relative: 2
|
|
18
|
+
}),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
time = _useState2[0],
|
|
21
|
+
setTime = _useState2[1];
|
|
22
|
+
var onChange = function onChange(data) {
|
|
23
|
+
console.log('onChange', data);
|
|
24
|
+
setTime(data);
|
|
25
|
+
};
|
|
26
|
+
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
27
|
+
locale: zhCN
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
style: {
|
|
30
|
+
display: 'flex'
|
|
31
|
+
}
|
|
32
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
style: {
|
|
34
|
+
lineHeight: '32px'
|
|
35
|
+
}
|
|
36
|
+
}, "\u9009\u62E9\u65F6\u95F4\uFF1A"), /*#__PURE__*/React.createElement(BizQuickDatePicker, {
|
|
37
|
+
defaultValue: time,
|
|
38
|
+
onChange: onChange
|
|
39
|
+
})));
|
|
40
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles/index.less';
|
|
3
|
+
import { QuickDatePickerTypes } from './types';
|
|
4
|
+
export declare const classPrefix = "biz-quick-date-picker-wrap";
|
|
5
|
+
declare const BizQuickDatePicker: React.FC<QuickDatePickerTypes.Props>;
|
|
6
|
+
export default BizQuickDatePicker;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useEffect, useState, useRef } from 'react';
|
|
8
|
+
import './styles/index.less';
|
|
9
|
+
import moment from 'moment';
|
|
10
|
+
import { quickModuleOneOptions, quickModuleTwoOptions } from './utils';
|
|
11
|
+
import IconFont from '../icon/iconFont';
|
|
12
|
+
import { DatePicker } from 'antd';
|
|
13
|
+
import { util } from '../utils';
|
|
14
|
+
var RangePicker = DatePicker.RangePicker;
|
|
15
|
+
export var classPrefix = 'biz-quick-date-picker-wrap';
|
|
16
|
+
var BizQuickDatePicker = function BizQuickDatePicker(props) {
|
|
17
|
+
var defaultValue = props.defaultValue;
|
|
18
|
+
var domId = util.guid();
|
|
19
|
+
var _useState = useState(false),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
show = _useState2[0],
|
|
22
|
+
setShow = _useState2[1];
|
|
23
|
+
var _useState3 = useState(-1),
|
|
24
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
25
|
+
relative = _useState4[0],
|
|
26
|
+
setRelative = _useState4[1];
|
|
27
|
+
var _useState5 = useState('day'),
|
|
28
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
29
|
+
unit = _useState6[0],
|
|
30
|
+
setUnit = _useState6[1];
|
|
31
|
+
var _useState7 = useState([moment().subtract(6, 'day'), moment()]),
|
|
32
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
33
|
+
value = _useState8[0],
|
|
34
|
+
setValue = _useState8[1];
|
|
35
|
+
var _useState9 = useState('过去7天'),
|
|
36
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
37
|
+
showText = _useState10[0],
|
|
38
|
+
setShowText = _useState10[1];
|
|
39
|
+
var _useState11 = useState(50),
|
|
40
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
41
|
+
tipWidth = _useState12[0],
|
|
42
|
+
setTipWidth = _useState12[1];
|
|
43
|
+
var _useState13 = useState(true),
|
|
44
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
45
|
+
initialize = _useState14[0],
|
|
46
|
+
setInitialize = _useState14[1];
|
|
47
|
+
useEffect(function () {
|
|
48
|
+
if (!initialize) return;
|
|
49
|
+
var _value = defaultValue || props.value;
|
|
50
|
+
if (_value && _value.begin !== '') {
|
|
51
|
+
_value.relative && setRelative(_value.relative);
|
|
52
|
+
_value.unit && setUnit(_value.unit);
|
|
53
|
+
if (_value.relative === -1) {
|
|
54
|
+
setValue([moment(_value.begin), moment(_value.end)]);
|
|
55
|
+
setShowText('自定义');
|
|
56
|
+
setTipWidth(62);
|
|
57
|
+
} else if (_value.relative !== undefined) {
|
|
58
|
+
setInitialize(false);
|
|
59
|
+
setTimeHandle(_value.unit, _value.relative);
|
|
60
|
+
var _data = _value.unit === 'day' ? quickModuleTwoOptions : quickModuleOneOptions;
|
|
61
|
+
_data.map(function (item) {
|
|
62
|
+
if (item.value === _value.relative && item.type === _value.unit) {
|
|
63
|
+
setShowText(item.label);
|
|
64
|
+
setTipWidth(item.width);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, [defaultValue, props.value, initialize]);
|
|
70
|
+
var onOpenChange = function onOpenChange(show) {
|
|
71
|
+
setShow(show);
|
|
72
|
+
};
|
|
73
|
+
var onChange = function onChange(date, dateString) {
|
|
74
|
+
setShowText('自定义');
|
|
75
|
+
setTipWidth(62);
|
|
76
|
+
setRelative(-1);
|
|
77
|
+
if (date === null) {
|
|
78
|
+
setValue(undefined);
|
|
79
|
+
var changeValue = {
|
|
80
|
+
unit: 'day',
|
|
81
|
+
begin: '',
|
|
82
|
+
end: '',
|
|
83
|
+
relative: -1
|
|
84
|
+
};
|
|
85
|
+
props.onChange && props.onChange(changeValue);
|
|
86
|
+
} else {
|
|
87
|
+
setValue(date);
|
|
88
|
+
var _changeValue = {
|
|
89
|
+
unit: 'day',
|
|
90
|
+
begin: dateString[0],
|
|
91
|
+
end: dateString[1],
|
|
92
|
+
relative: -1
|
|
93
|
+
};
|
|
94
|
+
props.onChange && props.onChange(_changeValue);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var disabledDate = function disabledDate(current) {
|
|
98
|
+
return current && current > moment().endOf('month');
|
|
99
|
+
};
|
|
100
|
+
var setTimeHandle = function setTimeHandle(type, value) {
|
|
101
|
+
var _value;
|
|
102
|
+
switch (type) {
|
|
103
|
+
case 'week':
|
|
104
|
+
_value = value === 1 ? [moment().isoWeekday(1), moment().isoWeekday(7)] : [moment().isoWeekday(1).subtract(1, 'week'), moment().isoWeekday(7).subtract(1, 'week')];
|
|
105
|
+
break;
|
|
106
|
+
case 'month':
|
|
107
|
+
_value = value === 1 ? [moment().startOf('month'), moment().endOf('month')] : [moment().startOf('month').subtract(1, 'month'), moment().endOf('month').subtract(1, 'month')];
|
|
108
|
+
break;
|
|
109
|
+
case 'day':
|
|
110
|
+
_value = [moment().subtract(Number(value), 'day'), moment().subtract(1, 'day')];
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
setValue(_value);
|
|
114
|
+
RangePickerRef.current && RangePickerRef.current.blur();
|
|
115
|
+
if (_value) {
|
|
116
|
+
var changeValue = {
|
|
117
|
+
unit: type,
|
|
118
|
+
begin: _value[0].format('YYYY-MM-DD'),
|
|
119
|
+
end: _value[1].format('YYYY-MM-DD'),
|
|
120
|
+
relative: value
|
|
121
|
+
};
|
|
122
|
+
props.onChange && props.onChange(changeValue);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
var quickModuleHandle = function quickModuleHandle(item) {
|
|
126
|
+
setTipWidth(item.width);
|
|
127
|
+
setRelative(item.value);
|
|
128
|
+
setUnit(item.type);
|
|
129
|
+
setShowText(item.label);
|
|
130
|
+
setTimeHandle(item.type, item.value);
|
|
131
|
+
};
|
|
132
|
+
var RangePickerRef = useRef(null);
|
|
133
|
+
var renderExtraFooter = function renderExtraFooter() {
|
|
134
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: "".concat(classPrefix, "-content-options")
|
|
136
|
+
}, /*#__PURE__*/React.createElement("ol", null, quickModuleOneOptions.map(function (item) {
|
|
137
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
138
|
+
className: "".concat(item.type === unit && item.value === relative ? 'active' : ''),
|
|
139
|
+
key: item.label,
|
|
140
|
+
onClick: function onClick() {
|
|
141
|
+
return quickModuleHandle(item);
|
|
142
|
+
}
|
|
143
|
+
}, item.label);
|
|
144
|
+
})), /*#__PURE__*/React.createElement("ol", null, quickModuleTwoOptions.map(function (item) {
|
|
145
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
146
|
+
className: "".concat(item.type === unit && item.value === relative ? 'active' : ''),
|
|
147
|
+
key: item.label,
|
|
148
|
+
onClick: function onClick() {
|
|
149
|
+
return quickModuleHandle(item);
|
|
150
|
+
}
|
|
151
|
+
}, item.label);
|
|
152
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
className: "".concat(relative === -1 ? 'active' : '')
|
|
154
|
+
}, "\u81EA\u5B9A\u4E49\u65F6\u95F4", /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(IconFont, {
|
|
155
|
+
type: "fanhuiicon"
|
|
156
|
+
}))));
|
|
157
|
+
};
|
|
158
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
id: domId,
|
|
160
|
+
className: "".concat(classPrefix, " clearfix ").concat(show ? 'focus' : '')
|
|
161
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
className: "".concat(classPrefix, "-tip"),
|
|
163
|
+
style: {
|
|
164
|
+
pointerEvents: 'none'
|
|
165
|
+
}
|
|
166
|
+
}, showText), /*#__PURE__*/React.createElement(RangePicker, {
|
|
167
|
+
style: {
|
|
168
|
+
paddingLeft: "".concat(tipWidth, "px")
|
|
169
|
+
},
|
|
170
|
+
popupClassName: "".concat(classPrefix, "-content"),
|
|
171
|
+
ref: RangePickerRef,
|
|
172
|
+
getPopupContainer: function getPopupContainer() {
|
|
173
|
+
return document.getElementById(domId);
|
|
174
|
+
},
|
|
175
|
+
separator: '至',
|
|
176
|
+
value: value,
|
|
177
|
+
onOpenChange: onOpenChange,
|
|
178
|
+
disabledDate: disabledDate,
|
|
179
|
+
onChange: onChange,
|
|
180
|
+
renderExtraFooter: renderExtraFooter
|
|
181
|
+
}));
|
|
182
|
+
};
|
|
183
|
+
export default BizQuickDatePicker;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
@import '../../assets/styles/inner.less';
|
|
2
|
+
|
|
3
|
+
.biz-quick-date-picker-wrap {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-block;
|
|
6
|
+
height: 34px;
|
|
7
|
+
padding: 4px 8px;
|
|
8
|
+
background: #fafafb;
|
|
9
|
+
border: 1px solid #fafafb;
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
&-tip {
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 4px;
|
|
14
|
+
left: 8px;
|
|
15
|
+
z-index: 2;
|
|
16
|
+
border-radius: 2px;
|
|
17
|
+
}
|
|
18
|
+
.ant-picker-range-arrow {
|
|
19
|
+
display: none !important;
|
|
20
|
+
}
|
|
21
|
+
.ant-picker-focused {
|
|
22
|
+
box-shadow: none !important;
|
|
23
|
+
}
|
|
24
|
+
> :nth-child(1) {
|
|
25
|
+
float: left;
|
|
26
|
+
height: 24px;
|
|
27
|
+
margin-right: 8px;
|
|
28
|
+
padding: 2px 8px;
|
|
29
|
+
color: @primary-color;
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
background: #e8efff;
|
|
32
|
+
}
|
|
33
|
+
.ant-picker {
|
|
34
|
+
padding: 0;
|
|
35
|
+
vertical-align: middle;
|
|
36
|
+
border: none;
|
|
37
|
+
border-radius: 0 !important;
|
|
38
|
+
.ant-picker-clear {
|
|
39
|
+
right: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.ant-picker:hover {
|
|
43
|
+
.ant-picker-input > input,
|
|
44
|
+
.ant-picker-range-separator {
|
|
45
|
+
color: #021429 !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
&-content {
|
|
49
|
+
float: left;
|
|
50
|
+
.ant-picker-panel-container {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: row-reverse;
|
|
53
|
+
border-radius: 8px;
|
|
54
|
+
.ant-picker-footer {
|
|
55
|
+
width: auto;
|
|
56
|
+
min-width: auto;
|
|
57
|
+
border-bottom: 1px solid #e8efff;
|
|
58
|
+
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
&-options {
|
|
62
|
+
width: 170px;
|
|
63
|
+
padding-bottom: 25px;
|
|
64
|
+
color: #67727f;
|
|
65
|
+
ol,
|
|
66
|
+
li {
|
|
67
|
+
margin: 0;
|
|
68
|
+
padding: 0;
|
|
69
|
+
list-style: none;
|
|
70
|
+
list-style-type: none;
|
|
71
|
+
}
|
|
72
|
+
> :nth-child(1),
|
|
73
|
+
> :nth-child(2) {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-wrap: wrap;
|
|
76
|
+
justify-content: space-between;
|
|
77
|
+
margin-top: 16px;
|
|
78
|
+
padding-bottom: 4px;
|
|
79
|
+
border-bottom: 1px solid #ecedf0;
|
|
80
|
+
li {
|
|
81
|
+
width: 81px;
|
|
82
|
+
height: 24px;
|
|
83
|
+
margin-bottom: 8px;
|
|
84
|
+
line-height: 24px;
|
|
85
|
+
text-align: center;
|
|
86
|
+
background: #fafafb;
|
|
87
|
+
border-radius: 24px;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
> :nth-child(2) {
|
|
92
|
+
margin-top: 14px;
|
|
93
|
+
li {
|
|
94
|
+
border-radius: 2px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
> :nth-child(3) {
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: space-between;
|
|
100
|
+
width: 100%;
|
|
101
|
+
height: 32px;
|
|
102
|
+
margin-top: 12px;
|
|
103
|
+
padding: 0 12px;
|
|
104
|
+
line-height: 32px;
|
|
105
|
+
background: #fafafb;
|
|
106
|
+
border-radius: 2px;
|
|
107
|
+
> :first-child {
|
|
108
|
+
transform: rotate(180deg);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
.active,
|
|
112
|
+
li.active {
|
|
113
|
+
color: @primary-color;
|
|
114
|
+
background: #e8efff;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.biz-quick-date-picker-wrap:hover {
|
|
121
|
+
border: 1px solid @primary-color;
|
|
122
|
+
}
|
|
123
|
+
.biz-quick-date-picker-wrap.focus {
|
|
124
|
+
border: 1px solid @primary-color;
|
|
125
|
+
box-shadow: 0 0 0 4px #f0f7ff;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.clearfix:after {
|
|
129
|
+
display: block;
|
|
130
|
+
clear: both;
|
|
131
|
+
height: 0;
|
|
132
|
+
content: '';
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.clearfix {
|
|
136
|
+
/* 触发 hasLayout */
|
|
137
|
+
zoom: 1;
|
|
138
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare namespace QuickDatePickerTypes {
|
|
2
|
+
interface Options {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
type: 'week' | 'month' | 'day';
|
|
6
|
+
width: number;
|
|
7
|
+
}
|
|
8
|
+
interface Range {
|
|
9
|
+
begin: string;
|
|
10
|
+
end: string;
|
|
11
|
+
}
|
|
12
|
+
interface Value extends Range {
|
|
13
|
+
unit: 'day' | 'week' | 'month';
|
|
14
|
+
relative?: number;
|
|
15
|
+
}
|
|
16
|
+
interface Props {
|
|
17
|
+
defaultValue?: Value;
|
|
18
|
+
value?: Value;
|
|
19
|
+
onChange?: (data: Value) => void;
|
|
20
|
+
}
|
|
21
|
+
interface ListOption {
|
|
22
|
+
count: number;
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export var quickModuleOneOptions = [{
|
|
2
|
+
label: '本周',
|
|
3
|
+
value: 1,
|
|
4
|
+
type: 'week',
|
|
5
|
+
width: 50
|
|
6
|
+
}, {
|
|
7
|
+
label: '上周',
|
|
8
|
+
value: 2,
|
|
9
|
+
type: 'week',
|
|
10
|
+
width: 50
|
|
11
|
+
}, {
|
|
12
|
+
label: '本月',
|
|
13
|
+
value: 1,
|
|
14
|
+
type: 'month',
|
|
15
|
+
width: 50
|
|
16
|
+
}, {
|
|
17
|
+
label: '上月',
|
|
18
|
+
value: 2,
|
|
19
|
+
type: 'month',
|
|
20
|
+
width: 50
|
|
21
|
+
}];
|
|
22
|
+
export var quickModuleTwoOptions = [{
|
|
23
|
+
label: '过去5天',
|
|
24
|
+
value: 5,
|
|
25
|
+
type: 'day',
|
|
26
|
+
width: 72
|
|
27
|
+
}, {
|
|
28
|
+
label: '过去7天',
|
|
29
|
+
value: 7,
|
|
30
|
+
type: 'day',
|
|
31
|
+
width: 72
|
|
32
|
+
}, {
|
|
33
|
+
label: '过去14天',
|
|
34
|
+
value: 14,
|
|
35
|
+
type: 'day',
|
|
36
|
+
width: 80
|
|
37
|
+
}, {
|
|
38
|
+
label: '过去30天',
|
|
39
|
+
value: 30,
|
|
40
|
+
type: 'day',
|
|
41
|
+
width: 80
|
|
42
|
+
}, {
|
|
43
|
+
label: '过去60天',
|
|
44
|
+
value: 60,
|
|
45
|
+
type: 'day',
|
|
46
|
+
width: 80
|
|
47
|
+
}, {
|
|
48
|
+
label: '过去180天',
|
|
49
|
+
value: 180,
|
|
50
|
+
type: 'day',
|
|
51
|
+
width: 90
|
|
52
|
+
}];
|
package/es/socket/demo/demo.d.ts
CHANGED
package/es/table/demo/index.d.ts
CHANGED
|
@@ -79,15 +79,23 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
79
79
|
value: value
|
|
80
80
|
});
|
|
81
81
|
};
|
|
82
|
-
var
|
|
82
|
+
var onOpenChange = function onOpenChange(flag) {
|
|
83
83
|
setVisible(flag);
|
|
84
84
|
};
|
|
85
|
+
var _useState9 = useState(false),
|
|
86
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
87
|
+
focus = _useState10[0],
|
|
88
|
+
setFocus = _useState10[1];
|
|
89
|
+
var onVisibleChange = function onVisibleChange(flag) {
|
|
90
|
+
setFocus(flag);
|
|
91
|
+
};
|
|
85
92
|
return /*#__PURE__*/React.createElement("div", {
|
|
86
|
-
className: classPrefix
|
|
93
|
+
className: "".concat(classPrefix, " ").concat(focus ? 'focus' : '')
|
|
87
94
|
}, /*#__PURE__*/React.cloneElement(props.children, {
|
|
88
95
|
alias: alias,
|
|
89
96
|
value: targetData,
|
|
90
|
-
onChange: onChange
|
|
97
|
+
onChange: onChange,
|
|
98
|
+
onVisibleChange: onVisibleChange
|
|
91
99
|
}), /*#__PURE__*/React.createElement("div", {
|
|
92
100
|
className: "".concat(classPrefix, "-option-list")
|
|
93
101
|
}, /*#__PURE__*/React.createElement(BizTargetOptionIcon, {
|
|
@@ -104,7 +112,7 @@ var BizTargetSelector = function BizTargetSelector(props) {
|
|
|
104
112
|
onClick: onClickIcon
|
|
105
113
|
}), targetData && /*#__PURE__*/React.createElement(Dropdown, {
|
|
106
114
|
open: visible,
|
|
107
|
-
onOpenChange:
|
|
115
|
+
onOpenChange: onOpenChange,
|
|
108
116
|
dropdownRender: function dropdownRender() {
|
|
109
117
|
return /*#__PURE__*/React.createElement(BizTargetOptionMenu, {
|
|
110
118
|
onClick: onClickIcon,
|
|
@@ -56,10 +56,7 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
56
56
|
if (_.isNumber(value)) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
-
var
|
|
60
|
-
_value$split2 = _slicedToArray(_value$split, 2),
|
|
61
|
-
layerId = _value$split2[1];
|
|
62
|
-
var selectValue = findTag(Number(layerId));
|
|
59
|
+
var selectValue = findTag(value);
|
|
63
60
|
if (selectValue) {
|
|
64
61
|
values.push(selectValue);
|
|
65
62
|
}
|
|
@@ -318,20 +318,21 @@ var Text = function Text(props) {
|
|
|
318
318
|
}, /*#__PURE__*/React.createElement("b", null, "\u7528\u6237\u6807\u7B7E")), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("b", null, operatorMap[labels.operator])), /*#__PURE__*/React.createElement("span", {
|
|
319
319
|
className: "".concat(classPrefix, "-text-desc-value")
|
|
320
320
|
}, /*#__PURE__*/React.createElement("span", null, "("), labels.values.map(function (value, index) {
|
|
321
|
+
var _tag$;
|
|
321
322
|
if (_.isNumber(value)) {
|
|
322
323
|
return null;
|
|
323
324
|
}
|
|
324
325
|
var _value$split = value.split(':'),
|
|
325
326
|
_value$split2 = _slicedToArray(_value$split, 2),
|
|
326
327
|
layerId = _value$split2[1];
|
|
327
|
-
var tag = findTag(
|
|
328
|
+
var tag = findTag(value);
|
|
328
329
|
return /*#__PURE__*/React.createElement("span", {
|
|
329
330
|
key: layerId
|
|
330
331
|
}, index >= 1 ? /*#__PURE__*/React.createElement("span", {
|
|
331
332
|
style: {
|
|
332
333
|
margin: '0 4px'
|
|
333
334
|
}
|
|
334
|
-
}, "\u6216") : null, /*#__PURE__*/React.createElement("span", null, tag && tag[1].labelName + ':' + tag[2]
|
|
335
|
+
}, "\u6216") : null, tag && (tag[1].labelCreateType === 3 || tag[1].labelCreateType === 6) && /*#__PURE__*/React.createElement("span", null, tag && tag[1].labelName), tag && (tag[1].labelCreateType === 0 || tag[1].labelCreateType === 1) && /*#__PURE__*/React.createElement("span", null, tag && tag[1].labelName + ':' + ((_tag$ = tag[2]) === null || _tag$ === void 0 ? void 0 : _tag$.layerLabelName)));
|
|
335
336
|
}), /*#__PURE__*/React.createElement("span", null, ")")));
|
|
336
337
|
}
|
|
337
338
|
function renderCdp(condition) {
|