@qn-pandora/pandora-component 5.1.1 → 5.1.3
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/components/AutoComplete/style.css +17 -17
- package/es/components/Button/style.css +69 -69
- package/es/components/Button/style.less +1 -1
- package/es/components/Card/style.css +11 -11
- package/es/components/CheckTransformList/style.css +19 -19
- package/es/components/Checkbox/index.js +9 -1
- package/es/components/CheckboxList/style.css +5 -5
- package/es/components/Collapse/style.css +1 -1
- package/es/components/DateTimePicker/Base/index.d.ts +3 -0
- package/es/components/DateTimePicker/Base/index.js +51 -6
- package/es/components/DateTimePicker/Base/style.css +67 -61
- package/es/components/DateTimePicker/Base/style.less +7 -0
- package/es/components/DateTimePicker/DisplayInput/index.js +3 -1
- package/es/components/DateTimePicker/DisplayInput/style.css +14 -14
- package/es/components/DateTimePicker/constants.d.ts +7 -1
- package/es/components/DateTimePicker/constants.js +1 -0
- package/es/components/DateTimePicker/time.d.ts +1 -0
- package/es/components/DateTimePicker/time.js +1 -0
- package/es/components/DateTimePicker/transform.js +4 -2
- package/es/components/Drawer/index.d.ts +1 -1
- package/es/components/FileResumable/index.js +2 -3
- package/es/components/FileResumable/style.css +8 -8
- package/es/components/FlameGraph/customTooltip.d.ts +22 -0
- package/es/components/FlameGraph/customTooltip.js +91 -0
- package/es/components/FlameGraph/index.d.ts +16 -0
- package/es/components/FlameGraph/index.js +96 -0
- package/es/components/FlameGraph/style.css +8 -0
- package/es/components/FlameGraph/style.less +14 -0
- package/es/components/Input/style.css +14 -14
- package/es/components/Menu/Option.d.ts +1 -1
- package/es/components/Menu/Option.js +12 -4
- package/es/components/Menu/style.css +23 -23
- package/es/components/Modal/style.css +1 -1
- package/es/components/NameExplainTooltip/style.css +1 -1
- package/es/components/OptionList/InlineOptionList/style.css +1 -1
- package/es/components/OptionList/OptionItem/style.css +2 -2
- package/es/components/OptionList/PopoverOptionList/style.css +3 -3
- package/es/components/OptionList/style.css +6 -6
- package/es/components/RadioGroup/style.css +35 -32
- package/es/components/RadioGroup/style.less +4 -0
- package/es/components/RangeInput/style.css +29 -29
- package/es/components/Selector/style.css +17 -17
- package/es/components/Spin/style.css +2 -2
- package/es/components/Steps/style.css +16 -16
- package/es/components/Table/ColumnSetting/index.d.ts +1 -0
- package/es/components/Table/ColumnSetting/index.js +19 -14
- package/es/components/Table/ColumnTag/style.css +4 -4
- package/es/components/Table/EmptyText.d.ts +7 -0
- package/es/components/Table/EmptyText.js +22 -0
- package/es/components/Table/ResizableTitle/index.js +12 -2
- package/es/components/Table/index.d.ts +11 -83
- package/es/components/Table/index.js +114 -287
- package/es/components/Table/style.css +54 -44
- package/es/components/Table/style.less +23 -4
- package/es/components/Table/type.d.ts +63 -0
- package/es/components/Table/type.js +5 -0
- package/es/components/Table/util.d.ts +59 -0
- package/es/components/Table/util.js +224 -0
- package/es/components/Tabs/style.css +10 -10
- package/es/components/TagList/Tag/style.css +5 -5
- package/es/components/TagList/TagSwitch/style.css +1 -1
- package/es/components/TagList/style.css +6 -6
- package/es/components/Timeline/TimelineItem/style.css +1 -1
- package/es/components/TreeSelector/style.css +21 -21
- package/es/constants/language/datetime/en.js +4 -2
- package/es/constants/language/datetime/type.d.ts +4 -2
- package/es/constants/language/datetime/zh.js +4 -2
- package/es/index.css +4666 -4639
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.less +18 -17
- package/es/style/theme.less +3 -3
- package/lib/components/AutoComplete/style.css +17 -17
- package/lib/components/Button/style.css +69 -69
- package/lib/components/Button/style.less +1 -1
- package/lib/components/Card/style.css +11 -11
- package/lib/components/CheckTransformList/style.css +19 -19
- package/lib/components/Checkbox/index.js +9 -1
- package/lib/components/CheckboxList/style.css +5 -5
- package/lib/components/Collapse/style.css +1 -1
- package/lib/components/DateTimePicker/Base/index.d.ts +3 -0
- package/lib/components/DateTimePicker/Base/index.js +51 -6
- package/lib/components/DateTimePicker/Base/style.css +67 -61
- package/lib/components/DateTimePicker/Base/style.less +7 -0
- package/lib/components/DateTimePicker/DisplayInput/index.js +3 -1
- package/lib/components/DateTimePicker/DisplayInput/style.css +14 -14
- package/lib/components/DateTimePicker/constants.d.ts +7 -1
- package/lib/components/DateTimePicker/constants.js +1 -0
- package/lib/components/DateTimePicker/time.d.ts +1 -0
- package/lib/components/DateTimePicker/time.js +1 -0
- package/lib/components/DateTimePicker/transform.js +4 -2
- package/lib/components/Drawer/index.d.ts +1 -1
- package/lib/components/FileResumable/index.js +2 -3
- package/lib/components/FileResumable/style.css +8 -8
- package/lib/components/FlameGraph/customTooltip.d.ts +22 -0
- package/lib/components/FlameGraph/customTooltip.js +114 -0
- package/lib/components/FlameGraph/index.d.ts +16 -0
- package/lib/components/FlameGraph/index.js +117 -0
- package/lib/components/FlameGraph/style.css +8 -0
- package/lib/components/FlameGraph/style.less +14 -0
- package/lib/components/Input/style.css +14 -14
- package/lib/components/Menu/Option.d.ts +1 -1
- package/lib/components/Menu/Option.js +17 -25
- package/lib/components/Menu/style.css +23 -23
- package/lib/components/Modal/style.css +1 -1
- package/lib/components/NameExplainTooltip/style.css +1 -1
- package/lib/components/OptionList/InlineOptionList/style.css +1 -1
- package/lib/components/OptionList/OptionItem/style.css +2 -2
- package/lib/components/OptionList/PopoverOptionList/style.css +3 -3
- package/lib/components/OptionList/style.css +6 -6
- package/lib/components/RadioGroup/style.css +35 -32
- package/lib/components/RadioGroup/style.less +4 -0
- package/lib/components/RangeInput/style.css +29 -29
- package/lib/components/Selector/style.css +17 -17
- package/lib/components/Spin/style.css +2 -2
- package/lib/components/Steps/style.css +16 -16
- package/lib/components/Table/ColumnSetting/index.d.ts +1 -0
- package/lib/components/Table/ColumnSetting/index.js +19 -14
- package/lib/components/Table/ColumnTag/style.css +4 -4
- package/lib/components/Table/EmptyText.d.ts +7 -0
- package/lib/components/Table/EmptyText.js +27 -0
- package/lib/components/Table/ResizableTitle/index.js +12 -2
- package/lib/components/Table/index.d.ts +11 -83
- package/lib/components/Table/index.js +118 -289
- package/lib/components/Table/style.css +54 -44
- package/lib/components/Table/style.less +23 -4
- package/lib/components/Table/type.d.ts +63 -0
- package/lib/components/Table/type.js +8 -0
- package/lib/components/Table/util.d.ts +59 -0
- package/lib/components/Table/util.js +233 -0
- package/lib/components/Tabs/style.css +10 -10
- package/lib/components/TagList/Tag/style.css +5 -5
- package/lib/components/TagList/TagSwitch/style.css +1 -1
- package/lib/components/TagList/style.css +6 -6
- package/lib/components/Timeline/TimelineItem/style.css +1 -1
- package/lib/components/TreeSelector/style.css +21 -21
- package/lib/constants/language/datetime/en.js +4 -2
- package/lib/constants/language/datetime/type.d.ts +4 -2
- package/lib/constants/language/datetime/zh.js +4 -2
- package/lib/index.css +6603 -6576
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/index.less +22 -21
- package/lib/style/theme.less +3 -3
- package/package.json +8 -5
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
.ant-checkbox-wrapper:hover .ant-checkbox-inner,
|
|
176
176
|
.ant-checkbox:hover .ant-checkbox-inner,
|
|
177
177
|
.ant-checkbox-input:focus + .ant-checkbox-inner {
|
|
178
|
-
border-color: #
|
|
178
|
+
border-color: #436bff;
|
|
179
179
|
}
|
|
180
180
|
.ant-checkbox-checked::after {
|
|
181
181
|
position: absolute;
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
left: 0;
|
|
184
184
|
width: 100%;
|
|
185
185
|
height: 100%;
|
|
186
|
-
border: 1px solid #
|
|
186
|
+
border: 1px solid #436bff;
|
|
187
187
|
border-radius: 2px;
|
|
188
188
|
visibility: hidden;
|
|
189
189
|
-webkit-animation: antCheckboxEffect 0.36s ease-in-out;
|
|
@@ -254,8 +254,8 @@
|
|
|
254
254
|
content: ' ';
|
|
255
255
|
}
|
|
256
256
|
.ant-checkbox-checked .ant-checkbox-inner {
|
|
257
|
-
background-color: #
|
|
258
|
-
border-color: #
|
|
257
|
+
background-color: #436bff;
|
|
258
|
+
border-color: #436bff;
|
|
259
259
|
}
|
|
260
260
|
.ant-checkbox-disabled {
|
|
261
261
|
cursor: not-allowed;
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
left: 50%;
|
|
361
361
|
width: 8px;
|
|
362
362
|
height: 8px;
|
|
363
|
-
background-color: #
|
|
363
|
+
background-color: #436bff;
|
|
364
364
|
border: 0;
|
|
365
365
|
-webkit-transform: translate(-50%, -50%) scale(1);
|
|
366
366
|
transform: translate(-50%, -50%) scale(1);
|
|
@@ -429,7 +429,7 @@
|
|
|
429
429
|
text-overflow: ellipsis;
|
|
430
430
|
}
|
|
431
431
|
.ant-input-affix-wrapper:hover {
|
|
432
|
-
border-color: #
|
|
432
|
+
border-color: #436bff;
|
|
433
433
|
border-right-width: 1px;
|
|
434
434
|
}
|
|
435
435
|
.ant-input-rtl .ant-input-affix-wrapper:hover {
|
|
@@ -438,9 +438,9 @@
|
|
|
438
438
|
}
|
|
439
439
|
.ant-input-affix-wrapper:focus,
|
|
440
440
|
.ant-input-affix-wrapper-focused {
|
|
441
|
-
border-color: #
|
|
442
|
-
-webkit-box-shadow: 0 0 0 2px rgba(
|
|
443
|
-
box-shadow: 0 0 0 2px rgba(
|
|
441
|
+
border-color: #6b90ff;
|
|
442
|
+
-webkit-box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
|
|
443
|
+
box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
|
|
444
444
|
border-right-width: 1px;
|
|
445
445
|
outline: 0;
|
|
446
446
|
}
|
|
@@ -506,7 +506,7 @@ textarea.ant-input-affix-wrapper {
|
|
|
506
506
|
direction: rtl;
|
|
507
507
|
}
|
|
508
508
|
.ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover {
|
|
509
|
-
border-color: #
|
|
509
|
+
border-color: #436bff;
|
|
510
510
|
border-right-width: 1px;
|
|
511
511
|
z-index: 1;
|
|
512
512
|
}
|
|
@@ -734,7 +734,7 @@ textarea.ant-input-affix-wrapper {
|
|
|
734
734
|
text-overflow: ellipsis;
|
|
735
735
|
}
|
|
736
736
|
.ant-input:hover {
|
|
737
|
-
border-color: #
|
|
737
|
+
border-color: #436bff;
|
|
738
738
|
border-right-width: 1px;
|
|
739
739
|
}
|
|
740
740
|
.ant-input-rtl .ant-input:hover {
|
|
@@ -743,9 +743,9 @@ textarea.ant-input-affix-wrapper {
|
|
|
743
743
|
}
|
|
744
744
|
.ant-input:focus,
|
|
745
745
|
.ant-input-focused {
|
|
746
|
-
border-color: #
|
|
747
|
-
-webkit-box-shadow: 0 0 0 2px rgba(
|
|
748
|
-
box-shadow: 0 0 0 2px rgba(
|
|
746
|
+
border-color: #6b90ff;
|
|
747
|
+
-webkit-box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
|
|
748
|
+
box-shadow: 0 0 0 2px rgba(67, 107, 255, 0.2);
|
|
749
749
|
border-right-width: 1px;
|
|
750
750
|
outline: 0;
|
|
751
751
|
}
|
|
@@ -899,7 +899,7 @@ textarea.ant-input {
|
|
|
899
899
|
}
|
|
900
900
|
.ant-input-group-addon .ant-select-open .ant-select-selector,
|
|
901
901
|
.ant-input-group-addon .ant-select-focused .ant-select-selector {
|
|
902
|
-
color: #
|
|
902
|
+
color: #436bff;
|
|
903
903
|
}
|
|
904
904
|
.ant-input-group-addon .ant-cascader-picker {
|
|
905
905
|
margin: -9px -12px;
|
|
@@ -1212,11 +1212,11 @@ textarea.ant-input {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
.ant-input-search .ant-input:hover,
|
|
1214
1214
|
.ant-input-search .ant-input:focus {
|
|
1215
|
-
border-color: #
|
|
1215
|
+
border-color: #436bff;
|
|
1216
1216
|
}
|
|
1217
1217
|
.ant-input-search .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),
|
|
1218
1218
|
.ant-input-search .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary) {
|
|
1219
|
-
border-left-color: #
|
|
1219
|
+
border-left-color: #436bff;
|
|
1220
1220
|
}
|
|
1221
1221
|
.ant-input-search .ant-input-affix-wrapper {
|
|
1222
1222
|
border-radius: 0;
|
|
@@ -1321,11 +1321,11 @@ textarea.ant-input {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
.ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover,
|
|
1323
1323
|
.ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover {
|
|
1324
|
-
border-left-color: #
|
|
1324
|
+
border-left-color: #436bff;
|
|
1325
1325
|
}
|
|
1326
1326
|
.ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper:hover,
|
|
1327
1327
|
.ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper-focused {
|
|
1328
|
-
border-right-color: #
|
|
1328
|
+
border-right-color: #436bff;
|
|
1329
1329
|
}
|
|
1330
1330
|
.ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child {
|
|
1331
1331
|
right: -1px;
|
|
@@ -24,7 +24,15 @@ import * as React from 'react';
|
|
|
24
24
|
import { Checkbox as BaseCheckbox } from 'antd';
|
|
25
25
|
export default function Checkbox(props) {
|
|
26
26
|
var value = props.value, onChange = props.onChange, other = __rest(props, ["value", "onChange"]);
|
|
27
|
-
var handleChange = React.useCallback(function () {
|
|
27
|
+
var handleChange = React.useCallback(function (e) {
|
|
28
|
+
/**
|
|
29
|
+
* 原因未知,可能是浏览器差异
|
|
30
|
+
* <Form mobxForm={xxx}><Form.Item><Checkbox/<</Form.Item></Form>
|
|
31
|
+
* 阻止事件冒泡(在火狐浏览器下,使用下面此列子,Checkbox onchange 事件不响应,click 事件响应两次, input 的点击事件冒泡没导致input 的执行一次,等层的label 执行一次)
|
|
32
|
+
*/
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
e.stopPropagation();
|
|
35
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
28
36
|
if (onChange) {
|
|
29
37
|
onChange(!value);
|
|
30
38
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
.ant-checkbox-wrapper:hover .ant-checkbox-inner,
|
|
49
49
|
.ant-checkbox:hover .ant-checkbox-inner,
|
|
50
50
|
.ant-checkbox-input:focus + .ant-checkbox-inner {
|
|
51
|
-
border-color: #
|
|
51
|
+
border-color: #436bff;
|
|
52
52
|
}
|
|
53
53
|
.ant-checkbox-checked::after {
|
|
54
54
|
position: absolute;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
left: 0;
|
|
57
57
|
width: 100%;
|
|
58
58
|
height: 100%;
|
|
59
|
-
border: 1px solid #
|
|
59
|
+
border: 1px solid #436bff;
|
|
60
60
|
border-radius: 2px;
|
|
61
61
|
visibility: hidden;
|
|
62
62
|
-webkit-animation: antCheckboxEffect 0.36s ease-in-out;
|
|
@@ -127,8 +127,8 @@
|
|
|
127
127
|
content: ' ';
|
|
128
128
|
}
|
|
129
129
|
.ant-checkbox-checked .ant-checkbox-inner {
|
|
130
|
-
background-color: #
|
|
131
|
-
border-color: #
|
|
130
|
+
background-color: #436bff;
|
|
131
|
+
border-color: #436bff;
|
|
132
132
|
}
|
|
133
133
|
.ant-checkbox-disabled {
|
|
134
134
|
cursor: not-allowed;
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
left: 50%;
|
|
234
234
|
width: 8px;
|
|
235
235
|
height: 8px;
|
|
236
|
-
background-color: #
|
|
236
|
+
background-color: #436bff;
|
|
237
237
|
border: 0;
|
|
238
238
|
-webkit-transform: translate(-50%, -50%) scale(1);
|
|
239
239
|
transform: translate(-50%, -50%) scale(1);
|
|
@@ -32,6 +32,7 @@ export default class Base extends React.Component<IBaseProps, any> {
|
|
|
32
32
|
relativeTimeInValid: RelativeInvalid;
|
|
33
33
|
activeKey: string;
|
|
34
34
|
quarterTime?: IQuarterTime;
|
|
35
|
+
onlyTradingDay: boolean;
|
|
35
36
|
containerRef: HTMLElement | null;
|
|
36
37
|
get isRelativeTimeValid(): boolean | import("../constants").ICompositedTime;
|
|
37
38
|
get activeKeys(): string[];
|
|
@@ -42,6 +43,7 @@ export default class Base extends React.Component<IBaseProps, any> {
|
|
|
42
43
|
setRangePreset(rangePreset: RangePreset): void;
|
|
43
44
|
setActiveKey(activeKey: string): void;
|
|
44
45
|
setQuqrterTime(quarterTime: IQuarterTime): void;
|
|
46
|
+
setOnlyTradingDay(onlyTradingDay: boolean): void;
|
|
45
47
|
handleQuqrterlyTimeChange(key: string, value: number): void;
|
|
46
48
|
handleRangeChange(value: RangePickerValue | moment.Moment): void;
|
|
47
49
|
setRange(range: RangePickerValue): void;
|
|
@@ -65,6 +67,7 @@ export default class Base extends React.Component<IBaseProps, any> {
|
|
|
65
67
|
handleRetiveTimeFromChange(num: number, unit: string): void;
|
|
66
68
|
handleRetiveTimeToChange(num: number, unit: string): void;
|
|
67
69
|
handleRelativeChange(): void;
|
|
70
|
+
handleTradingDayChange(checked: boolean): void;
|
|
68
71
|
panelOnToggle(isActive: boolean, key?: string): void;
|
|
69
72
|
isRangePicker(): boolean;
|
|
70
73
|
getPopupContainer: () => HTMLElement;
|
|
@@ -48,6 +48,7 @@ import Button from '../../Button';
|
|
|
48
48
|
import Collapse from '../Collapse';
|
|
49
49
|
import Selector from '../../Selector';
|
|
50
50
|
import NameLimiter from '../../NameLimiter';
|
|
51
|
+
import Checkbox from '../../Checkbox';
|
|
51
52
|
import RelativeTimePicker from './relativeTimePicker';
|
|
52
53
|
import Time from '../time';
|
|
53
54
|
import { defaultPresets, EPresetMode, RangePreset, rangePresetOptions, TimeType, RelativeUnitValue, RELATIVE_TIME_UNITS } from '../constants';
|
|
@@ -91,6 +92,7 @@ var Base = /** @class */ (function (_super) {
|
|
|
91
92
|
};
|
|
92
93
|
_this.relativeTimeInValid = RelativeInvalid.Valid;
|
|
93
94
|
_this.activeKey = '';
|
|
95
|
+
_this.onlyTradingDay = false;
|
|
94
96
|
_this.containerRef = null;
|
|
95
97
|
_this.getPopupContainer = function () {
|
|
96
98
|
return _this.containerRef;
|
|
@@ -116,6 +118,7 @@ var Base = /** @class */ (function (_super) {
|
|
|
116
118
|
if (time.quarterTime) {
|
|
117
119
|
_this.setQuqrterTime(time.quarterTime);
|
|
118
120
|
}
|
|
121
|
+
_this.setOnlyTradingDay(_.isUndefined(time.onlyTradingDay) ? false : time.onlyTradingDay);
|
|
119
122
|
return _this;
|
|
120
123
|
}
|
|
121
124
|
Object.defineProperty(Base.prototype, "isRelativeTimeValid", {
|
|
@@ -181,6 +184,9 @@ var Base = /** @class */ (function (_super) {
|
|
|
181
184
|
Base.prototype.setQuqrterTime = function (quarterTime) {
|
|
182
185
|
this.quarterTime = quarterTime;
|
|
183
186
|
};
|
|
187
|
+
Base.prototype.setOnlyTradingDay = function (onlyTradingDay) {
|
|
188
|
+
this.onlyTradingDay = onlyTradingDay;
|
|
189
|
+
};
|
|
184
190
|
Base.prototype.handleQuqrterlyTimeChange = function (key, value) {
|
|
185
191
|
var _a;
|
|
186
192
|
var quarterTime = this.quarterTime;
|
|
@@ -274,7 +280,8 @@ var Base = /** @class */ (function (_super) {
|
|
|
274
280
|
var onChange = this.props.onChange;
|
|
275
281
|
if (onChange) {
|
|
276
282
|
onChange(new Time({
|
|
277
|
-
preset: preset.value
|
|
283
|
+
preset: preset.value,
|
|
284
|
+
onlyTradingDay: this.onlyTradingDay
|
|
278
285
|
}));
|
|
279
286
|
}
|
|
280
287
|
};
|
|
@@ -287,7 +294,8 @@ var Base = /** @class */ (function (_super) {
|
|
|
287
294
|
// 赋值时将毫秒数清零
|
|
288
295
|
start: showTime === false ? start === null || start === void 0 ? void 0 : start.startOf('day') : start === null || start === void 0 ? void 0 : start.milliseconds(0),
|
|
289
296
|
end: showTime === false ? end === null || end === void 0 ? void 0 : end.startOf('day') : end === null || end === void 0 ? void 0 : end.milliseconds(0),
|
|
290
|
-
rangePreset: this.rangePreset
|
|
297
|
+
rangePreset: this.rangePreset,
|
|
298
|
+
onlyTradingDay: this.onlyTradingDay
|
|
291
299
|
}));
|
|
292
300
|
}
|
|
293
301
|
};
|
|
@@ -295,7 +303,8 @@ var Base = /** @class */ (function (_super) {
|
|
|
295
303
|
var onChange = this.props.onChange;
|
|
296
304
|
if (onChange && this.quarterTime) {
|
|
297
305
|
onChange(new Time({
|
|
298
|
-
quarterTime: this.quarterTime
|
|
306
|
+
quarterTime: this.quarterTime,
|
|
307
|
+
onlyTradingDay: this.onlyTradingDay
|
|
299
308
|
}));
|
|
300
309
|
}
|
|
301
310
|
};
|
|
@@ -332,10 +341,16 @@ var Base = /** @class */ (function (_super) {
|
|
|
332
341
|
var onChange = this.props.onChange;
|
|
333
342
|
if (onChange) {
|
|
334
343
|
onChange(new Time({
|
|
335
|
-
relative: this.relative
|
|
344
|
+
relative: this.relative,
|
|
345
|
+
onlyTradingDay: this.onlyTradingDay
|
|
336
346
|
}));
|
|
337
347
|
}
|
|
338
348
|
};
|
|
349
|
+
Base.prototype.handleTradingDayChange = function (checked) {
|
|
350
|
+
this.setOnlyTradingDay(checked);
|
|
351
|
+
var _a = this.props, onChange = _a.onChange, value = _a.value, defaultValue = _a.defaultValue, presets = _a.presets;
|
|
352
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(new Time(__assign(__assign({}, (value || defaultValue || { preset: 'm5' })), { onlyTradingDay: checked }), { presets: presets }));
|
|
353
|
+
};
|
|
339
354
|
Base.prototype.panelOnToggle = function (isActive, key) {
|
|
340
355
|
this.activeKey = isActive ? key || '' : '';
|
|
341
356
|
};
|
|
@@ -382,7 +397,12 @@ var Base = /** @class */ (function (_super) {
|
|
|
382
397
|
: DatePicker;
|
|
383
398
|
var showTimeType = this.props.showTimeType || [];
|
|
384
399
|
if (showTimeType && showTimeType.length === 0) {
|
|
385
|
-
showTimeType = [
|
|
400
|
+
showTimeType = [
|
|
401
|
+
TimeType.Absolute,
|
|
402
|
+
TimeType.Relative,
|
|
403
|
+
TimeType.Preset,
|
|
404
|
+
TimeType.OnlyTradingDay
|
|
405
|
+
];
|
|
386
406
|
}
|
|
387
407
|
var _c = this.props, quarterTitle = _c.quarterTitle, presetTitle = _c.presetTitle, relativeTitle = _c.relativeTitle, absoluteTitle = _c.absoluteTitle;
|
|
388
408
|
var locale = this.context.locale;
|
|
@@ -415,6 +435,9 @@ var Base = /** @class */ (function (_super) {
|
|
|
415
435
|
} })),
|
|
416
436
|
React.createElement("div", { className: SDK_PREFIX + "-datetime-pick-footer" },
|
|
417
437
|
React.createElement(Button, { className: SDK_PREFIX + "-datetime-pick-footer-botton", onClick: this.handleQuarterlyOk, type: "primary" }, formatString(DateTimeLocale.confirm, locale))))),
|
|
438
|
+
showTimeType.indexOf(TimeType.OnlyTradingDay) > -1 && (React.createElement("div", { className: classnames(SDK_PREFIX + "-datetime-pick-trading-day-content") },
|
|
439
|
+
React.createElement("span", { className: SDK_PREFIX + "-datetime-pick-trading-day-label" }, formatString(DateTimeLocale.trading_day.label, locale)),
|
|
440
|
+
React.createElement(Checkbox, { value: this.onlyTradingDay, onChange: this.handleTradingDayChange }))),
|
|
418
441
|
(this.props.customTimeContents || []).map(function (content) {
|
|
419
442
|
return (React.createElement(Panel, { title: content.title, key: content.title, titleClassName: SDK_PREFIX + "-datetime-pick-title", contentClassName: SDK_PREFIX + "-datetime-pick-panel-content", className: SDK_PREFIX + "-datetime-pick-panel", disableToggle: _this.props.disableToggle, onToggle: _this.panelOnToggle }, content.Component));
|
|
420
443
|
}))));
|
|
@@ -424,7 +447,12 @@ var Base = /** @class */ (function (_super) {
|
|
|
424
447
|
timeFormat: timeFormat,
|
|
425
448
|
showTime: true,
|
|
426
449
|
placement: 'bottom',
|
|
427
|
-
showTimeType: [
|
|
450
|
+
showTimeType: [
|
|
451
|
+
TimeType.Absolute,
|
|
452
|
+
TimeType.Preset,
|
|
453
|
+
TimeType.Relative,
|
|
454
|
+
TimeType.OnlyTradingDay
|
|
455
|
+
]
|
|
428
456
|
};
|
|
429
457
|
Base.contextType = ConfigContext;
|
|
430
458
|
__decorate([
|
|
@@ -451,6 +479,10 @@ var Base = /** @class */ (function (_super) {
|
|
|
451
479
|
observable.ref,
|
|
452
480
|
__metadata("design:type", Object)
|
|
453
481
|
], Base.prototype, "quarterTime", void 0);
|
|
482
|
+
__decorate([
|
|
483
|
+
observable,
|
|
484
|
+
__metadata("design:type", Object)
|
|
485
|
+
], Base.prototype, "onlyTradingDay", void 0);
|
|
454
486
|
__decorate([
|
|
455
487
|
computed,
|
|
456
488
|
__metadata("design:type", Object),
|
|
@@ -502,6 +534,13 @@ var Base = /** @class */ (function (_super) {
|
|
|
502
534
|
__metadata("design:paramtypes", [Object]),
|
|
503
535
|
__metadata("design:returntype", void 0)
|
|
504
536
|
], Base.prototype, "setQuqrterTime", null);
|
|
537
|
+
__decorate([
|
|
538
|
+
bind,
|
|
539
|
+
action,
|
|
540
|
+
__metadata("design:type", Function),
|
|
541
|
+
__metadata("design:paramtypes", [Boolean]),
|
|
542
|
+
__metadata("design:returntype", void 0)
|
|
543
|
+
], Base.prototype, "setOnlyTradingDay", null);
|
|
505
544
|
__decorate([
|
|
506
545
|
bind,
|
|
507
546
|
__metadata("design:type", Function),
|
|
@@ -602,6 +641,12 @@ var Base = /** @class */ (function (_super) {
|
|
|
602
641
|
__metadata("design:paramtypes", []),
|
|
603
642
|
__metadata("design:returntype", void 0)
|
|
604
643
|
], Base.prototype, "handleRelativeChange", null);
|
|
644
|
+
__decorate([
|
|
645
|
+
bind,
|
|
646
|
+
__metadata("design:type", Function),
|
|
647
|
+
__metadata("design:paramtypes", [Boolean]),
|
|
648
|
+
__metadata("design:returntype", void 0)
|
|
649
|
+
], Base.prototype, "handleTradingDayChange", null);
|
|
605
650
|
__decorate([
|
|
606
651
|
bind,
|
|
607
652
|
action,
|