@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
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
cursor: pointer;
|
|
193
193
|
}
|
|
194
194
|
.ant-card-actions > li > span:hover {
|
|
195
|
-
color: #
|
|
195
|
+
color: #436bff;
|
|
196
196
|
-webkit-transition: color 0.3s;
|
|
197
197
|
transition: color 0.3s;
|
|
198
198
|
}
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
}
|
|
208
208
|
.ant-card-actions > li > span a:not(.ant-btn):hover,
|
|
209
209
|
.ant-card-actions > li > span > .anticon:hover {
|
|
210
|
-
color: #
|
|
210
|
+
color: #436bff;
|
|
211
211
|
}
|
|
212
212
|
.ant-card-actions > li > span > .anticon {
|
|
213
213
|
font-size: 16px;
|
|
@@ -691,10 +691,10 @@
|
|
|
691
691
|
cursor: pointer;
|
|
692
692
|
}
|
|
693
693
|
.ant-tabs-dropdown-menu-item-remove:hover {
|
|
694
|
-
color: #
|
|
694
|
+
color: #436bff;
|
|
695
695
|
}
|
|
696
696
|
.ant-tabs-dropdown-menu-item:hover {
|
|
697
|
-
background: rgba(
|
|
697
|
+
background: rgba(67, 107, 255, 0.05);
|
|
698
698
|
}
|
|
699
699
|
.ant-tabs-dropdown-menu-item-disabled,
|
|
700
700
|
.ant-tabs-dropdown-menu-item-disabled:hover {
|
|
@@ -713,7 +713,7 @@
|
|
|
713
713
|
}
|
|
714
714
|
.ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active,
|
|
715
715
|
.ant-tabs-card > div > .ant-tabs-nav .ant-tabs-tab-active {
|
|
716
|
-
color: #
|
|
716
|
+
color: #436bff;
|
|
717
717
|
background: #ffffff;
|
|
718
718
|
}
|
|
719
719
|
.ant-tabs-card > .ant-tabs-nav .ant-tabs-ink-bar,
|
|
@@ -880,13 +880,13 @@
|
|
|
880
880
|
}
|
|
881
881
|
.ant-tabs > .ant-tabs-nav .ant-tabs-nav-add:hover,
|
|
882
882
|
.ant-tabs > div > .ant-tabs-nav .ant-tabs-nav-add:hover {
|
|
883
|
-
color: #
|
|
883
|
+
color: #436bff;
|
|
884
884
|
}
|
|
885
885
|
.ant-tabs > .ant-tabs-nav .ant-tabs-nav-add:active,
|
|
886
886
|
.ant-tabs > div > .ant-tabs-nav .ant-tabs-nav-add:active,
|
|
887
887
|
.ant-tabs > .ant-tabs-nav .ant-tabs-nav-add:focus,
|
|
888
888
|
.ant-tabs > div > .ant-tabs-nav .ant-tabs-nav-add:focus {
|
|
889
|
-
color: #
|
|
889
|
+
color: #436bff;
|
|
890
890
|
}
|
|
891
891
|
.ant-tabs-extra-content {
|
|
892
892
|
-webkit-box-flex: 0;
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
}
|
|
902
902
|
.ant-tabs-ink-bar {
|
|
903
903
|
position: absolute;
|
|
904
|
-
background: #
|
|
904
|
+
background: #436bff;
|
|
905
905
|
pointer-events: none;
|
|
906
906
|
}
|
|
907
907
|
.ant-tabs-tab {
|
|
@@ -923,7 +923,7 @@
|
|
|
923
923
|
.ant-tabs-tab-remove:focus,
|
|
924
924
|
.ant-tabs-tab-btn:active,
|
|
925
925
|
.ant-tabs-tab-remove:active {
|
|
926
|
-
color: #
|
|
926
|
+
color: #436bff;
|
|
927
927
|
}
|
|
928
928
|
.ant-tabs-tab-btn {
|
|
929
929
|
outline: none;
|
|
@@ -949,10 +949,10 @@
|
|
|
949
949
|
color: #333;
|
|
950
950
|
}
|
|
951
951
|
.ant-tabs-tab:hover {
|
|
952
|
-
color: #
|
|
952
|
+
color: #436bff;
|
|
953
953
|
}
|
|
954
954
|
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
|
|
955
|
-
color: #
|
|
955
|
+
color: #436bff;
|
|
956
956
|
text-shadow: 0 0 0.25px currentcolor;
|
|
957
957
|
}
|
|
958
958
|
.ant-tabs-tab.ant-tabs-tab-disabled {
|
|
@@ -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;
|
|
@@ -45,7 +45,15 @@ var React = __importStar(require("react"));
|
|
|
45
45
|
var antd_1 = require("antd");
|
|
46
46
|
function Checkbox(props) {
|
|
47
47
|
var value = props.value, onChange = props.onChange, other = __rest(props, ["value", "onChange"]);
|
|
48
|
-
var handleChange = React.useCallback(function () {
|
|
48
|
+
var handleChange = React.useCallback(function (e) {
|
|
49
|
+
/**
|
|
50
|
+
* 原因未知,可能是浏览器差异
|
|
51
|
+
* <Form mobxForm={xxx}><Form.Item><Checkbox/<</Form.Item></Form>
|
|
52
|
+
* 阻止事件冒泡(在火狐浏览器下,使用下面此列子,Checkbox onchange 事件不响应,click 事件响应两次, input 的点击事件冒泡没导致input 的执行一次,等层的label 执行一次)
|
|
53
|
+
*/
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
e.stopPropagation();
|
|
56
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
49
57
|
if (onChange) {
|
|
50
58
|
onChange(!value);
|
|
51
59
|
}
|
|
@@ -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;
|
|
@@ -73,6 +73,7 @@ var Button_1 = __importDefault(require("../../Button"));
|
|
|
73
73
|
var Collapse_1 = __importDefault(require("../Collapse"));
|
|
74
74
|
var Selector_1 = __importDefault(require("../../Selector"));
|
|
75
75
|
var NameLimiter_1 = __importDefault(require("../../NameLimiter"));
|
|
76
|
+
var Checkbox_1 = __importDefault(require("../../Checkbox"));
|
|
76
77
|
var relativeTimePicker_1 = __importDefault(require("./relativeTimePicker"));
|
|
77
78
|
var time_2 = __importDefault(require("../time"));
|
|
78
79
|
var constants_1 = require("../constants");
|
|
@@ -116,6 +117,7 @@ var Base = /** @class */ (function (_super) {
|
|
|
116
117
|
};
|
|
117
118
|
_this.relativeTimeInValid = RelativeInvalid.Valid;
|
|
118
119
|
_this.activeKey = '';
|
|
120
|
+
_this.onlyTradingDay = false;
|
|
119
121
|
_this.containerRef = null;
|
|
120
122
|
_this.getPopupContainer = function () {
|
|
121
123
|
return _this.containerRef;
|
|
@@ -141,6 +143,7 @@ var Base = /** @class */ (function (_super) {
|
|
|
141
143
|
if (time.quarterTime) {
|
|
142
144
|
_this.setQuqrterTime(time.quarterTime);
|
|
143
145
|
}
|
|
146
|
+
_this.setOnlyTradingDay(_.isUndefined(time.onlyTradingDay) ? false : time.onlyTradingDay);
|
|
144
147
|
return _this;
|
|
145
148
|
}
|
|
146
149
|
Object.defineProperty(Base.prototype, "isRelativeTimeValid", {
|
|
@@ -206,6 +209,9 @@ var Base = /** @class */ (function (_super) {
|
|
|
206
209
|
Base.prototype.setQuqrterTime = function (quarterTime) {
|
|
207
210
|
this.quarterTime = quarterTime;
|
|
208
211
|
};
|
|
212
|
+
Base.prototype.setOnlyTradingDay = function (onlyTradingDay) {
|
|
213
|
+
this.onlyTradingDay = onlyTradingDay;
|
|
214
|
+
};
|
|
209
215
|
Base.prototype.handleQuqrterlyTimeChange = function (key, value) {
|
|
210
216
|
var _a;
|
|
211
217
|
var quarterTime = this.quarterTime;
|
|
@@ -299,7 +305,8 @@ var Base = /** @class */ (function (_super) {
|
|
|
299
305
|
var onChange = this.props.onChange;
|
|
300
306
|
if (onChange) {
|
|
301
307
|
onChange(new time_2.default({
|
|
302
|
-
preset: preset.value
|
|
308
|
+
preset: preset.value,
|
|
309
|
+
onlyTradingDay: this.onlyTradingDay
|
|
303
310
|
}));
|
|
304
311
|
}
|
|
305
312
|
};
|
|
@@ -312,7 +319,8 @@ var Base = /** @class */ (function (_super) {
|
|
|
312
319
|
// 赋值时将毫秒数清零
|
|
313
320
|
start: showTime === false ? start === null || start === void 0 ? void 0 : start.startOf('day') : start === null || start === void 0 ? void 0 : start.milliseconds(0),
|
|
314
321
|
end: showTime === false ? end === null || end === void 0 ? void 0 : end.startOf('day') : end === null || end === void 0 ? void 0 : end.milliseconds(0),
|
|
315
|
-
rangePreset: this.rangePreset
|
|
322
|
+
rangePreset: this.rangePreset,
|
|
323
|
+
onlyTradingDay: this.onlyTradingDay
|
|
316
324
|
}));
|
|
317
325
|
}
|
|
318
326
|
};
|
|
@@ -320,7 +328,8 @@ var Base = /** @class */ (function (_super) {
|
|
|
320
328
|
var onChange = this.props.onChange;
|
|
321
329
|
if (onChange && this.quarterTime) {
|
|
322
330
|
onChange(new time_2.default({
|
|
323
|
-
quarterTime: this.quarterTime
|
|
331
|
+
quarterTime: this.quarterTime,
|
|
332
|
+
onlyTradingDay: this.onlyTradingDay
|
|
324
333
|
}));
|
|
325
334
|
}
|
|
326
335
|
};
|
|
@@ -357,10 +366,16 @@ var Base = /** @class */ (function (_super) {
|
|
|
357
366
|
var onChange = this.props.onChange;
|
|
358
367
|
if (onChange) {
|
|
359
368
|
onChange(new time_2.default({
|
|
360
|
-
relative: this.relative
|
|
369
|
+
relative: this.relative,
|
|
370
|
+
onlyTradingDay: this.onlyTradingDay
|
|
361
371
|
}));
|
|
362
372
|
}
|
|
363
373
|
};
|
|
374
|
+
Base.prototype.handleTradingDayChange = function (checked) {
|
|
375
|
+
this.setOnlyTradingDay(checked);
|
|
376
|
+
var _a = this.props, onChange = _a.onChange, value = _a.value, defaultValue = _a.defaultValue, presets = _a.presets;
|
|
377
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(new time_2.default(__assign(__assign({}, (value || defaultValue || { preset: 'm5' })), { onlyTradingDay: checked }), { presets: presets }));
|
|
378
|
+
};
|
|
364
379
|
Base.prototype.panelOnToggle = function (isActive, key) {
|
|
365
380
|
this.activeKey = isActive ? key || '' : '';
|
|
366
381
|
};
|
|
@@ -407,7 +422,12 @@ var Base = /** @class */ (function (_super) {
|
|
|
407
422
|
: antd_1.DatePicker;
|
|
408
423
|
var showTimeType = this.props.showTimeType || [];
|
|
409
424
|
if (showTimeType && showTimeType.length === 0) {
|
|
410
|
-
showTimeType = [
|
|
425
|
+
showTimeType = [
|
|
426
|
+
constants_1.TimeType.Absolute,
|
|
427
|
+
constants_1.TimeType.Relative,
|
|
428
|
+
constants_1.TimeType.Preset,
|
|
429
|
+
constants_1.TimeType.OnlyTradingDay
|
|
430
|
+
];
|
|
411
431
|
}
|
|
412
432
|
var _c = this.props, quarterTitle = _c.quarterTitle, presetTitle = _c.presetTitle, relativeTitle = _c.relativeTitle, absoluteTitle = _c.absoluteTitle;
|
|
413
433
|
var locale = this.context.locale;
|
|
@@ -440,6 +460,9 @@ var Base = /** @class */ (function (_super) {
|
|
|
440
460
|
} })),
|
|
441
461
|
React.createElement("div", { className: style_1.SDK_PREFIX + "-datetime-pick-footer" },
|
|
442
462
|
React.createElement(Button_1.default, { className: style_1.SDK_PREFIX + "-datetime-pick-footer-botton", onClick: this.handleQuarterlyOk, type: "primary" }, language_1.formatString(type_1.DateTimeLocale.confirm, locale))))),
|
|
463
|
+
showTimeType.indexOf(constants_1.TimeType.OnlyTradingDay) > -1 && (React.createElement("div", { className: classnames_1.default(style_1.SDK_PREFIX + "-datetime-pick-trading-day-content") },
|
|
464
|
+
React.createElement("span", { className: style_1.SDK_PREFIX + "-datetime-pick-trading-day-label" }, language_1.formatString(type_1.DateTimeLocale.trading_day.label, locale)),
|
|
465
|
+
React.createElement(Checkbox_1.default, { value: this.onlyTradingDay, onChange: this.handleTradingDayChange }))),
|
|
443
466
|
(this.props.customTimeContents || []).map(function (content) {
|
|
444
467
|
return (React.createElement(Panel, { title: content.title, key: content.title, titleClassName: style_1.SDK_PREFIX + "-datetime-pick-title", contentClassName: style_1.SDK_PREFIX + "-datetime-pick-panel-content", className: style_1.SDK_PREFIX + "-datetime-pick-panel", disableToggle: _this.props.disableToggle, onToggle: _this.panelOnToggle }, content.Component));
|
|
445
468
|
}))));
|
|
@@ -449,7 +472,12 @@ var Base = /** @class */ (function (_super) {
|
|
|
449
472
|
timeFormat: time_1.timeFormat,
|
|
450
473
|
showTime: true,
|
|
451
474
|
placement: 'bottom',
|
|
452
|
-
showTimeType: [
|
|
475
|
+
showTimeType: [
|
|
476
|
+
constants_1.TimeType.Absolute,
|
|
477
|
+
constants_1.TimeType.Preset,
|
|
478
|
+
constants_1.TimeType.Relative,
|
|
479
|
+
constants_1.TimeType.OnlyTradingDay
|
|
480
|
+
]
|
|
453
481
|
};
|
|
454
482
|
Base.contextType = config_provider_1.ConfigContext;
|
|
455
483
|
__decorate([
|
|
@@ -476,6 +504,10 @@ var Base = /** @class */ (function (_super) {
|
|
|
476
504
|
mobx_1.observable.ref,
|
|
477
505
|
__metadata("design:type", Object)
|
|
478
506
|
], Base.prototype, "quarterTime", void 0);
|
|
507
|
+
__decorate([
|
|
508
|
+
mobx_1.observable,
|
|
509
|
+
__metadata("design:type", Object)
|
|
510
|
+
], Base.prototype, "onlyTradingDay", void 0);
|
|
479
511
|
__decorate([
|
|
480
512
|
mobx_1.computed,
|
|
481
513
|
__metadata("design:type", Object),
|
|
@@ -527,6 +559,13 @@ var Base = /** @class */ (function (_super) {
|
|
|
527
559
|
__metadata("design:paramtypes", [Object]),
|
|
528
560
|
__metadata("design:returntype", void 0)
|
|
529
561
|
], Base.prototype, "setQuqrterTime", null);
|
|
562
|
+
__decorate([
|
|
563
|
+
bind_1.default,
|
|
564
|
+
mobx_1.action,
|
|
565
|
+
__metadata("design:type", Function),
|
|
566
|
+
__metadata("design:paramtypes", [Boolean]),
|
|
567
|
+
__metadata("design:returntype", void 0)
|
|
568
|
+
], Base.prototype, "setOnlyTradingDay", null);
|
|
530
569
|
__decorate([
|
|
531
570
|
bind_1.default,
|
|
532
571
|
__metadata("design:type", Function),
|
|
@@ -627,6 +666,12 @@ var Base = /** @class */ (function (_super) {
|
|
|
627
666
|
__metadata("design:paramtypes", []),
|
|
628
667
|
__metadata("design:returntype", void 0)
|
|
629
668
|
], Base.prototype, "handleRelativeChange", null);
|
|
669
|
+
__decorate([
|
|
670
|
+
bind_1.default,
|
|
671
|
+
__metadata("design:type", Function),
|
|
672
|
+
__metadata("design:paramtypes", [Boolean]),
|
|
673
|
+
__metadata("design:returntype", void 0)
|
|
674
|
+
], Base.prototype, "handleTradingDayChange", null);
|
|
630
675
|
__decorate([
|
|
631
676
|
bind_1.default,
|
|
632
677
|
mobx_1.action,
|