@qn-pandora/pandora-component 3.1.1 → 4.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.
Files changed (222) hide show
  1. package/CHANGELOG.json +24 -7
  2. package/CHANGELOG.md +16 -7
  3. package/README.md +36 -36
  4. package/es/components/AutoComplete/style.css +25 -29
  5. package/es/components/AutoComplete/style.less +8 -8
  6. package/es/components/Breadcrumb/style.less +9 -9
  7. package/es/components/Button/index.d.ts +0 -8
  8. package/es/components/Button/index.js +4 -4
  9. package/es/components/Button/style.css +100 -104
  10. package/es/components/Button/style.less +51 -62
  11. package/es/components/Card/RowExtra/style.less +8 -8
  12. package/es/components/Card/SearchInput/style.less +8 -8
  13. package/es/components/Card/style.css +28 -2
  14. package/es/components/Card/style.less +11 -11
  15. package/es/components/CheckTransformList/style.css +50 -21
  16. package/es/components/CheckTransformList/style.less +35 -35
  17. package/es/components/Checkbox/style.css +1 -1
  18. package/es/components/Checkbox/style.less +5 -5
  19. package/es/components/CheckboxList/index.d.ts +2 -0
  20. package/es/components/CheckboxList/index.js +2 -2
  21. package/es/components/CheckboxList/style.css +5 -3
  22. package/es/components/CheckboxList/style.less +11 -9
  23. package/es/components/Collapse/style.css +16 -12
  24. package/es/components/Collapse/style.less +57 -57
  25. package/es/components/CollapsiblePanel/style.css +4 -4
  26. package/es/components/CollapsiblePanel/style.less +63 -63
  27. package/es/components/DateTimePicker/Base/style.css +378 -49
  28. package/es/components/DateTimePicker/Base/style.less +160 -164
  29. package/es/components/DateTimePicker/BaseMobile/Absolute/style.less +35 -35
  30. package/es/components/DateTimePicker/BaseMobile/style.css +4 -4
  31. package/es/components/DateTimePicker/BaseMobile/style.less +32 -32
  32. package/es/components/DateTimePicker/Collapse/Panel/style.less +26 -26
  33. package/es/components/DateTimePicker/DisplayInput/style.css +47 -16
  34. package/es/components/DateTimePicker/DisplayInput/style.less +9 -9
  35. package/es/components/DateTimePicker/constants.d.ts +1 -1
  36. package/es/components/DateTimePicker/constants.js +17 -6
  37. package/es/components/DateTimePicker/index.js +1 -1
  38. package/es/components/DateTimePicker/style.css +7 -7
  39. package/es/components/DateTimePicker/style.less +19 -17
  40. package/es/components/DateTimePicker/transform.d.ts +4 -0
  41. package/es/components/DateTimePicker/transform.js +52 -0
  42. package/es/components/Drawer/index.d.ts +55 -2
  43. package/es/components/Drawer/index.js +3 -1
  44. package/es/components/Drawer/style.css +45 -45
  45. package/es/components/Drawer/style.less +17 -17
  46. package/es/components/Input/index.d.ts +1 -2
  47. package/es/components/Input/index.js +0 -2
  48. package/es/components/Input/style.css +47 -16
  49. package/es/components/Input/style.less +12 -12
  50. package/es/components/InputNumber/index.d.ts +1 -8
  51. package/es/components/InputNumber/index.js +1 -35
  52. package/es/components/KeyValuePair/style.less +21 -21
  53. package/es/components/Menu/Option.d.ts +10 -0
  54. package/es/components/Menu/Option.js +18 -2
  55. package/es/components/Menu/index.d.ts +1 -1
  56. package/es/components/Menu/index.js +3 -3
  57. package/es/components/Menu/style.css +20 -10
  58. package/es/components/Menu/style.less +18 -8
  59. package/es/components/Modal/style.less +30 -30
  60. package/es/components/NameExplainTooltip/style.less +10 -10
  61. package/es/components/NameLimiter/style.css +2 -4
  62. package/es/components/NameLimiter/style.less +19 -21
  63. package/es/components/OptionList/InlineOptionList/style.less +16 -16
  64. package/es/components/OptionList/OptionItem/style.css +2 -2
  65. package/es/components/OptionList/OptionItem/style.less +25 -25
  66. package/es/components/OptionList/PopoverOptionList/style.less +30 -30
  67. package/es/components/OptionList/style.css +2 -2
  68. package/es/components/OptionList/style.less +3 -3
  69. package/es/components/RadioGroup/style.css +8 -8
  70. package/es/components/RadioGroup/style.less +32 -32
  71. package/es/components/RangeInput/style.css +427 -27
  72. package/es/components/RangeInput/style.less +37 -37
  73. package/es/components/RemarkName/style.css +2 -4
  74. package/es/components/RemarkName/style.less +2 -2
  75. package/es/components/Selector/style.css +25 -29
  76. package/es/components/Selector/style.less +99 -100
  77. package/es/components/Spin/style.css +0 -1
  78. package/es/components/Spin/style.less +26 -26
  79. package/es/components/Steps/ControlButton/style.less +5 -5
  80. package/es/components/Steps/style.css +8 -6
  81. package/es/components/Steps/style.less +48 -46
  82. package/es/components/Table/ColumnTag/style.less +40 -40
  83. package/es/components/Table/index.js +7 -4
  84. package/es/components/Table/style.css +85 -27
  85. package/es/components/Table/style.less +306 -313
  86. package/es/components/Tabs/style.css +29 -1
  87. package/es/components/Tabs/style.less +33 -31
  88. package/es/components/TagList/Tag/style.less +72 -72
  89. package/es/components/TagList/TagSwitch/style.less +28 -28
  90. package/es/components/TagList/style.css +10 -10
  91. package/es/components/TagList/style.less +28 -28
  92. package/es/components/Timeline/TimelineItem/style.less +49 -49
  93. package/es/components/Timeline/style.less +23 -23
  94. package/es/components/Transfer/List/index.js +3 -3
  95. package/es/components/Transfer/List/style.css +3 -0
  96. package/es/components/Transfer/List/style.less +19 -15
  97. package/es/components/Transfer/ListBody/style.less +18 -18
  98. package/es/components/Transfer/style.css +3 -0
  99. package/es/components/Transfer/style.less +14 -14
  100. package/es/components/TreeSelector/style.css +64 -20
  101. package/es/components/TreeSelector/style.less +56 -54
  102. package/es/hoc/popContainer.d.ts +5 -0
  103. package/es/hoc/popContainer.js +37 -0
  104. package/es/index.css +3011 -2517
  105. package/es/index.d.ts +1 -1
  106. package/es/index.less +49 -50
  107. package/es/style/mixin.less +45 -45
  108. package/es/style/theme.less +389 -379
  109. package/lib/components/AutoComplete/style.css +25 -29
  110. package/lib/components/AutoComplete/style.less +8 -8
  111. package/lib/components/Breadcrumb/style.less +9 -9
  112. package/lib/components/Button/index.d.ts +0 -8
  113. package/lib/components/Button/index.js +4 -4
  114. package/lib/components/Button/style.css +100 -104
  115. package/lib/components/Button/style.less +51 -62
  116. package/lib/components/Card/RowExtra/style.less +8 -8
  117. package/lib/components/Card/SearchInput/style.less +8 -8
  118. package/lib/components/Card/style.css +28 -2
  119. package/lib/components/Card/style.less +11 -11
  120. package/lib/components/CheckTransformList/style.css +50 -21
  121. package/lib/components/CheckTransformList/style.less +35 -35
  122. package/lib/components/Checkbox/style.css +1 -1
  123. package/lib/components/Checkbox/style.less +5 -5
  124. package/lib/components/CheckboxList/index.d.ts +2 -0
  125. package/lib/components/CheckboxList/index.js +2 -2
  126. package/lib/components/CheckboxList/style.css +5 -3
  127. package/lib/components/CheckboxList/style.less +11 -9
  128. package/lib/components/Collapse/style.css +16 -12
  129. package/lib/components/Collapse/style.less +57 -57
  130. package/lib/components/CollapsiblePanel/style.css +4 -4
  131. package/lib/components/CollapsiblePanel/style.less +63 -63
  132. package/lib/components/DateTimePicker/Base/style.css +378 -49
  133. package/lib/components/DateTimePicker/Base/style.less +160 -164
  134. package/lib/components/DateTimePicker/BaseMobile/Absolute/style.less +35 -35
  135. package/lib/components/DateTimePicker/BaseMobile/style.css +4 -4
  136. package/lib/components/DateTimePicker/BaseMobile/style.less +32 -32
  137. package/lib/components/DateTimePicker/Collapse/Panel/style.less +26 -26
  138. package/lib/components/DateTimePicker/DisplayInput/style.css +47 -16
  139. package/lib/components/DateTimePicker/DisplayInput/style.less +9 -9
  140. package/lib/components/DateTimePicker/constants.d.ts +1 -1
  141. package/lib/components/DateTimePicker/constants.js +17 -6
  142. package/lib/components/DateTimePicker/index.js +1 -1
  143. package/lib/components/DateTimePicker/style.css +7 -7
  144. package/lib/components/DateTimePicker/style.less +19 -17
  145. package/lib/components/DateTimePicker/transform.d.ts +4 -0
  146. package/lib/components/DateTimePicker/transform.js +53 -0
  147. package/lib/components/Drawer/index.d.ts +55 -2
  148. package/lib/components/Drawer/index.js +3 -1
  149. package/lib/components/Drawer/style.css +45 -45
  150. package/lib/components/Drawer/style.less +17 -17
  151. package/lib/components/Input/index.d.ts +1 -2
  152. package/lib/components/Input/index.js +0 -2
  153. package/lib/components/Input/style.css +47 -16
  154. package/lib/components/Input/style.less +12 -12
  155. package/lib/components/InputNumber/index.d.ts +1 -8
  156. package/lib/components/InputNumber/index.js +1 -38
  157. package/lib/components/KeyValuePair/style.less +21 -21
  158. package/lib/components/Menu/Option.d.ts +10 -0
  159. package/lib/components/Menu/Option.js +18 -2
  160. package/lib/components/Menu/index.d.ts +1 -1
  161. package/lib/components/Menu/index.js +3 -3
  162. package/lib/components/Menu/style.css +20 -10
  163. package/lib/components/Menu/style.less +18 -8
  164. package/lib/components/Modal/style.less +30 -30
  165. package/lib/components/NameExplainTooltip/style.less +10 -10
  166. package/lib/components/NameLimiter/style.css +2 -4
  167. package/lib/components/NameLimiter/style.less +19 -21
  168. package/lib/components/OptionList/InlineOptionList/style.less +16 -16
  169. package/lib/components/OptionList/OptionItem/style.css +2 -2
  170. package/lib/components/OptionList/OptionItem/style.less +25 -25
  171. package/lib/components/OptionList/PopoverOptionList/style.less +30 -30
  172. package/lib/components/OptionList/style.css +2 -2
  173. package/lib/components/OptionList/style.less +3 -3
  174. package/lib/components/RadioGroup/style.css +8 -8
  175. package/lib/components/RadioGroup/style.less +32 -32
  176. package/lib/components/RangeInput/style.css +427 -27
  177. package/lib/components/RangeInput/style.less +37 -37
  178. package/lib/components/RemarkName/style.css +2 -4
  179. package/lib/components/RemarkName/style.less +2 -2
  180. package/lib/components/Selector/style.css +25 -29
  181. package/lib/components/Selector/style.less +99 -100
  182. package/lib/components/Spin/style.css +0 -1
  183. package/lib/components/Spin/style.less +26 -26
  184. package/lib/components/Steps/ControlButton/style.less +5 -5
  185. package/lib/components/Steps/style.css +8 -6
  186. package/lib/components/Steps/style.less +48 -46
  187. package/lib/components/Table/ColumnTag/style.less +40 -40
  188. package/lib/components/Table/index.js +6 -3
  189. package/lib/components/Table/style.css +85 -27
  190. package/lib/components/Table/style.less +306 -313
  191. package/lib/components/Tabs/style.css +29 -1
  192. package/lib/components/Tabs/style.less +33 -31
  193. package/lib/components/TagList/Tag/style.less +72 -72
  194. package/lib/components/TagList/TagSwitch/style.less +28 -28
  195. package/lib/components/TagList/style.css +10 -10
  196. package/lib/components/TagList/style.less +28 -28
  197. package/lib/components/Timeline/TimelineItem/style.less +49 -49
  198. package/lib/components/Timeline/style.less +23 -23
  199. package/lib/components/Transfer/List/index.js +3 -3
  200. package/lib/components/Transfer/List/style.css +3 -0
  201. package/lib/components/Transfer/List/style.less +19 -15
  202. package/lib/components/Transfer/ListBody/style.less +18 -18
  203. package/lib/components/Transfer/style.css +3 -0
  204. package/lib/components/Transfer/style.less +14 -14
  205. package/lib/components/TreeSelector/style.css +64 -20
  206. package/lib/components/TreeSelector/style.less +56 -54
  207. package/lib/hoc/popContainer.d.ts +5 -0
  208. package/lib/hoc/popContainer.js +47 -0
  209. package/lib/index.css +5102 -4608
  210. package/lib/index.d.ts +1 -1
  211. package/lib/index.less +49 -50
  212. package/lib/style/mixin.less +45 -45
  213. package/lib/style/theme.less +389 -379
  214. package/package.json +79 -108
  215. package/es/components/Input/NumberInput/index.d.ts +0 -29
  216. package/es/components/Input/NumberInput/index.js +0 -116
  217. package/es/components/InputNumber/style.css +0 -400
  218. package/es/components/InputNumber/style.less +0 -45
  219. package/lib/components/Input/NumberInput/index.d.ts +0 -29
  220. package/lib/components/Input/NumberInput/index.js +0 -121
  221. package/lib/components/InputNumber/style.css +0 -400
  222. package/lib/components/InputNumber/style.less +0 -45
@@ -17,6 +17,7 @@
17
17
  border-radius: 2px;
18
18
  -webkit-transition: all 0.3s;
19
19
  transition: all 0.3s;
20
+ /* stylelint-disable-next-line selector-no-vendor-prefix */
20
21
  display: -webkit-inline-box;
21
22
  display: -ms-inline-flexbox;
22
23
  display: inline-flex;
@@ -26,12 +27,20 @@
26
27
  }
27
28
  .ant-input-affix-wrapper::-webkit-input-placeholder {
28
29
  color: #bfbfbf;
30
+ -webkit-user-select: none;
31
+ user-select: none;
29
32
  }
30
33
  .ant-input-affix-wrapper::-ms-input-placeholder {
31
34
  color: #bfbfbf;
35
+ -ms-user-select: none;
36
+ user-select: none;
32
37
  }
33
38
  .ant-input-affix-wrapper::placeholder {
34
39
  color: #bfbfbf;
40
+ -webkit-user-select: none;
41
+ -moz-user-select: none;
42
+ -ms-user-select: none;
43
+ user-select: none;
35
44
  }
36
45
  .ant-input-affix-wrapper:placeholder-shown {
37
46
  text-overflow: ellipsis;
@@ -46,11 +55,11 @@
46
55
  }
47
56
  .ant-input-affix-wrapper:focus,
48
57
  .ant-input-affix-wrapper-focused {
49
- border-color: #528cde;
58
+ border-color: #9ca0a6;
59
+ -webkit-box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
60
+ box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
50
61
  border-right-width: 1px !important;
51
62
  outline: 0;
52
- -webkit-box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
53
- box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
54
63
  }
55
64
  .ant-input-rtl .ant-input-affix-wrapper:focus,
56
65
  .ant-input-rtl .ant-input-affix-wrapper-focused {
@@ -60,6 +69,9 @@
60
69
  .ant-input-affix-wrapper-disabled {
61
70
  color: rgba(0, 0, 0, 0.25);
62
71
  background-color: #f5f5f5;
72
+ border-color: #bfbfbf;
73
+ -webkit-box-shadow: none;
74
+ box-shadow: none;
63
75
  cursor: not-allowed;
64
76
  opacity: 1;
65
77
  }
@@ -70,6 +82,9 @@
70
82
  .ant-input-affix-wrapper[disabled] {
71
83
  color: rgba(0, 0, 0, 0.25);
72
84
  background-color: #f5f5f5;
85
+ border-color: #bfbfbf;
86
+ -webkit-box-shadow: none;
87
+ box-shadow: none;
73
88
  cursor: not-allowed;
74
89
  opacity: 1;
75
90
  }
@@ -159,7 +174,7 @@ textarea.ant-input-affix-wrapper {
159
174
  margin-left: 4px;
160
175
  }
161
176
  .anticon.ant-input-clear-icon {
162
- margin: 0 4px;
177
+ margin: 0;
163
178
  color: rgba(0, 0, 0, 0.25);
164
179
  font-size: 12px;
165
180
  vertical-align: -1px;
@@ -176,8 +191,8 @@ textarea.ant-input-affix-wrapper {
176
191
  .anticon.ant-input-clear-icon-hidden {
177
192
  visibility: hidden;
178
193
  }
179
- .anticon.ant-input-clear-icon:last-child {
180
- margin-right: 0;
194
+ .anticon.ant-input-clear-icon-has-suffix {
195
+ margin: 0 4px;
181
196
  }
182
197
  .ant-input-affix-wrapper-textarea-with-clear-btn {
183
198
  padding: 0 !important;
@@ -213,18 +228,27 @@ textarea.ant-input-affix-wrapper {
213
228
  border-radius: 2px;
214
229
  -webkit-transition: all 0.3s;
215
230
  transition: all 0.3s;
231
+ /* stylelint-disable-next-line selector-no-vendor-prefix */
216
232
  }
217
233
  .ant-input::-moz-placeholder {
218
234
  opacity: 1;
219
235
  }
220
236
  .ant-input::-webkit-input-placeholder {
221
237
  color: #bfbfbf;
238
+ -webkit-user-select: none;
239
+ user-select: none;
222
240
  }
223
241
  .ant-input::-ms-input-placeholder {
224
242
  color: #bfbfbf;
243
+ -ms-user-select: none;
244
+ user-select: none;
225
245
  }
226
246
  .ant-input::placeholder {
227
247
  color: #bfbfbf;
248
+ -webkit-user-select: none;
249
+ -moz-user-select: none;
250
+ -ms-user-select: none;
251
+ user-select: none;
228
252
  }
229
253
  .ant-input:placeholder-shown {
230
254
  text-overflow: ellipsis;
@@ -239,11 +263,11 @@ textarea.ant-input-affix-wrapper {
239
263
  }
240
264
  .ant-input:focus,
241
265
  .ant-input-focused {
242
- border-color: #528cde;
266
+ border-color: #9ca0a6;
267
+ -webkit-box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
268
+ box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
243
269
  border-right-width: 1px !important;
244
270
  outline: 0;
245
- -webkit-box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
246
- box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
247
271
  }
248
272
  .ant-input-rtl .ant-input:focus,
249
273
  .ant-input-rtl .ant-input-focused {
@@ -253,6 +277,9 @@ textarea.ant-input-affix-wrapper {
253
277
  .ant-input-disabled {
254
278
  color: rgba(0, 0, 0, 0.25);
255
279
  background-color: #f5f5f5;
280
+ border-color: #bfbfbf;
281
+ -webkit-box-shadow: none;
282
+ box-shadow: none;
256
283
  cursor: not-allowed;
257
284
  opacity: 1;
258
285
  }
@@ -263,6 +290,9 @@ textarea.ant-input-affix-wrapper {
263
290
  .ant-input[disabled] {
264
291
  color: rgba(0, 0, 0, 0.25);
265
292
  background-color: #f5f5f5;
293
+ border-color: #bfbfbf;
294
+ -webkit-box-shadow: none;
295
+ box-shadow: none;
266
296
  cursor: not-allowed;
267
297
  opacity: 1;
268
298
  }
@@ -450,10 +480,6 @@ textarea.ant-input {
450
480
  .ant-input-group-sm .ant-select-single .ant-select-selector {
451
481
  height: 26px;
452
482
  }
453
- .ant-input-group .ant-input-affix-wrapper:not(:first-child) {
454
- border-top-left-radius: 0;
455
- border-bottom-left-radius: 0;
456
- }
457
483
  .ant-input-group .ant-input-affix-wrapper:not(:last-child) {
458
484
  border-top-right-radius: 0;
459
485
  border-bottom-right-radius: 0;
@@ -462,6 +488,11 @@ textarea.ant-input {
462
488
  border-top-left-radius: 2px;
463
489
  border-bottom-left-radius: 2px;
464
490
  }
491
+ .ant-input-group .ant-input-affix-wrapper:not(:first-child),
492
+ .ant-input-search .ant-input-group .ant-input-affix-wrapper:not(:first-child) {
493
+ border-top-left-radius: 0;
494
+ border-bottom-left-radius: 0;
495
+ }
465
496
  .ant-input-group.ant-input-group-compact {
466
497
  display: block;
467
498
  }
@@ -716,9 +747,9 @@ textarea.ant-input {
716
747
  .ant-input-textarea-rtl.ant-input-textarea-show-count::after {
717
748
  text-align: left;
718
749
  }
719
- .ant-input-affix-wrapper-rtl .ant-input-clear-icon:last-child {
720
- margin-right: 4px;
721
- margin-left: 0;
750
+ .ant-input-affix-wrapper-rtl .ant-input-clear-icon-has-suffix {
751
+ margin-right: 0;
752
+ margin-left: 4px;
722
753
  }
723
754
  .ant-input-affix-wrapper-rtl .ant-input-clear-icon {
724
755
  right: auto;
@@ -1,9 +1,9 @@
1
- @import 'antd/lib/input/style/index.less';
2
- @import '../../../style/theme.less';
3
-
4
- .@{sdk-prefix}-datetime-pick-input {
5
- .@{ant-prefix}-input-suffix {
6
- pointer-events: none;
7
- color: @font-color-3;
8
- }
9
- }
1
+ @import 'antd/lib/input/style/index.less';
2
+ @import '../../../style/theme.less';
3
+
4
+ .@{sdk-prefix}-datetime-pick-input {
5
+ .@{ant-prefix}-input-suffix {
6
+ pointer-events: none;
7
+ color: @font-color-3;
8
+ }
9
+ }
@@ -207,7 +207,7 @@ export interface ITimeRange {
207
207
  rangePreset?: RangePreset;
208
208
  quarterTime?: IQuarterTime;
209
209
  }
210
- export declare const enum TimeShiftUnit {
210
+ export declare enum TimeShiftUnit {
211
211
  Second = "seconds",
212
212
  Minute = "minutes",
213
213
  Hour = "hours",
@@ -330,29 +330,40 @@ exports.QuartersMap = {
330
330
  endMonth: 0
331
331
  }
332
332
  };
333
+ var TimeShiftUnit;
334
+ (function (TimeShiftUnit) {
335
+ TimeShiftUnit["Second"] = "seconds";
336
+ TimeShiftUnit["Minute"] = "minutes";
337
+ TimeShiftUnit["Hour"] = "hours";
338
+ TimeShiftUnit["Day"] = "days";
339
+ TimeShiftUnit["Week"] = "weeks";
340
+ TimeShiftUnit["Month"] = "months";
341
+ TimeShiftUnit["Quarter"] = "quarters";
342
+ TimeShiftUnit["Year"] = "years";
343
+ })(TimeShiftUnit = exports.TimeShiftUnit || (exports.TimeShiftUnit = {}));
333
344
  exports.TimeShiftUnitOptions = [
334
345
  {
335
- value: "seconds" /* Second */,
346
+ value: TimeShiftUnit.Second,
336
347
  text: '秒'
337
348
  },
338
349
  {
339
- value: "minutes" /* Minute */,
350
+ value: TimeShiftUnit.Minute,
340
351
  text: '分钟'
341
352
  },
342
353
  {
343
- value: "hours" /* Hour */,
354
+ value: TimeShiftUnit.Hour,
344
355
  text: '小时'
345
356
  },
346
357
  {
347
- value: "days" /* Day */,
358
+ value: TimeShiftUnit.Day,
348
359
  text: '天'
349
360
  },
350
361
  {
351
- value: "months" /* Month */,
362
+ value: TimeShiftUnit.Month,
352
363
  text: '月'
353
364
  },
354
365
  {
355
- value: "years" /* Year */,
366
+ value: TimeShiftUnit.Year,
356
367
  text: '年'
357
368
  }
358
369
  ];
@@ -97,7 +97,7 @@ var DateTimePicker = /** @class */ (function (_super) {
97
97
  var ismobile = env_1.isMobileDevice() && showTimeType && showTimeType.length;
98
98
  return (React.createElement("div", null,
99
99
  ismobile && (React.createElement(BaseMobile_1.default, __assign({}, restProps, { showTimeType: showTimeType, buttonType: constants_1.EButtonType.Normal, value: value || this.props.defaultValue, onChange: this.handleChange }))),
100
- !ismobile && (React.createElement(antd_1.Popover, { placement: this.props.placement, trigger: "click", visible: this.visible, openClassName: overlayClassName, getPopupContainer: getPopupContainer, onVisibleChange: this.setVisible, getTooltipContainer: this.props.getPopupContainer, content: React.createElement(Base_1.default, __assign({}, restProps, { showTimeType: showTimeType, onChange: this.handleChange, className: classnames_1.default(style_1.SDK_PREFIX + "-datetime-pick-popover", timeClassName), getPopupContainer: getPopupContainer, value: value || this.props.defaultValue })) }, children || (React.createElement(DisplayInput_1.default, { value: value || this.props.defaultValue, timeFormat: this.props.timeFormat, presets: this.props.presets, className: contentClassName }))))));
100
+ !ismobile && (React.createElement(antd_1.Popover, { placement: this.props.placement, trigger: "click", visible: this.visible, overlayClassName: classnames_1.default(style_1.SDK_PREFIX + "-datetime-pick-popover-root", overlayClassName), getPopupContainer: getPopupContainer, onVisibleChange: this.setVisible, getTooltipContainer: this.props.getPopupContainer, content: React.createElement(Base_1.default, __assign({}, restProps, { showTimeType: showTimeType, onChange: this.handleChange, className: classnames_1.default(style_1.SDK_PREFIX + "-datetime-pick-popover", timeClassName), getPopupContainer: getPopupContainer, value: value || this.props.defaultValue })) }, children || (React.createElement(DisplayInput_1.default, { value: value || this.props.defaultValue, timeFormat: this.props.timeFormat, presets: this.props.presets, className: contentClassName }))))));
101
101
  };
102
102
  DateTimePicker.Base = Base_1.default;
103
103
  DateTimePicker.BaseMobile = BaseMobile_1.default;
@@ -326,15 +326,15 @@
326
326
  .ant-btn-sm {
327
327
  padding: 0 7px;
328
328
  }
329
- .pandora-sdk-datetime-pick-popover {
330
- width: 650px;
331
- }
332
- .ant-popover-inner-content {
333
- padding: 0 !important;
329
+ .pandora-sdk-datetime-pick-popover-root .ant-popover-inner-content {
330
+ padding: 0;
334
331
  }
335
- .ant-btn {
332
+ .pandora-sdk-datetime-pick-popover-root .ant-btn {
336
333
  line-height: 1.499;
337
334
  }
338
- .ant-table {
335
+ .pandora-sdk-datetime-pick-popover-root .ant-table {
339
336
  line-height: 1.5;
340
337
  }
338
+ .pandora-sdk-datetime-pick-popover {
339
+ width: 650px;
340
+ }
@@ -1,17 +1,19 @@
1
- @import 'antd/lib/popover/style/index.less';
2
- @import '../../style/theme.less';
3
-
4
- .@{sdk-prefix}-datetime-pick-popover {
5
- width: 650px;
6
- }
7
-
8
- .@{ant-prefix}-popover-inner-content {
9
- padding: 0 !important;
10
- }
11
- .@{ant-prefix}-btn {
12
- line-height: 1.499;
13
- }
14
-
15
- .@{ant-prefix}-table {
16
- line-height: 1.5;
17
- }
1
+ @import 'antd/lib/popover/style/index.less';
2
+ @import '../../style/theme.less';
3
+
4
+ .@{sdk-prefix}-datetime-pick-popover-root {
5
+ .@{ant-prefix}-popover-inner-content {
6
+ padding: 0;
7
+ }
8
+ .@{ant-prefix}-btn {
9
+ line-height: 1.499;
10
+ }
11
+
12
+ .@{ant-prefix}-table {
13
+ line-height: 1.5;
14
+ }
15
+ }
16
+
17
+ .@{sdk-prefix}-datetime-pick-popover {
18
+ width: 650px;
19
+ }
@@ -1,3 +1,7 @@
1
1
  import { ITimeRange, ITime } from './constants';
2
2
  export declare function transformToTime(time: ITimeRange): ITime;
3
3
  export declare function transformToTimeRange(time: ITime): ITimeRange;
4
+ export declare function calcFullTime(time?: ITimeRange): {
5
+ start: number | undefined;
6
+ end: number | undefined;
7
+ } | undefined;
@@ -1,10 +1,23 @@
1
1
  "use strict";
2
+ var __values = (this && this.__values) || function(o) {
3
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4
+ if (m) return m.call(o);
5
+ if (o && typeof o.length === "number") return {
6
+ next: function () {
7
+ if (o && i >= o.length) o = void 0;
8
+ return { value: o && o[i++], done: !o };
9
+ }
10
+ };
11
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
6
17
  var moment_1 = __importDefault(require("moment"));
7
18
  var lodash_1 = require("lodash");
19
+ var constants_1 = require("./constants");
20
+ var time_1 = __importDefault(require("./time"));
8
21
  function transformToTime(time) {
9
22
  return {
10
23
  preset: time.preset,
@@ -27,3 +40,43 @@ function transformToTimeRange(time) {
27
40
  };
28
41
  }
29
42
  exports.transformToTimeRange = transformToTimeRange;
43
+ function getTimeShiftUnit(time) {
44
+ var e_1, _a;
45
+ try {
46
+ for (var TimeShiftUnitOptions_1 = __values(constants_1.TimeShiftUnitOptions), TimeShiftUnitOptions_1_1 = TimeShiftUnitOptions_1.next(); !TimeShiftUnitOptions_1_1.done; TimeShiftUnitOptions_1_1 = TimeShiftUnitOptions_1.next()) {
47
+ var item = TimeShiftUnitOptions_1_1.value;
48
+ if (time.endsWith(item.value)) {
49
+ return item.value;
50
+ }
51
+ }
52
+ }
53
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
54
+ finally {
55
+ try {
56
+ if (TimeShiftUnitOptions_1_1 && !TimeShiftUnitOptions_1_1.done && (_a = TimeShiftUnitOptions_1.return)) _a.call(TimeShiftUnitOptions_1);
57
+ }
58
+ finally { if (e_1) throw e_1.error; }
59
+ }
60
+ return constants_1.TimeShiftUnit.Second;
61
+ }
62
+ function getRelativeTime(timeShift, time) {
63
+ var timeShiftValue = parseFloat(timeShift) || 0;
64
+ var timeShiftUnit = getTimeShiftUnit(timeShift);
65
+ if (time) {
66
+ return moment_1.default(time).subtract(timeShiftValue, timeShiftUnit);
67
+ }
68
+ }
69
+ function calcFullTime(time) {
70
+ if (!time) {
71
+ return;
72
+ }
73
+ var timeShift = time.timeShift;
74
+ var _a = new time_1.default(transformToTime(time)).toDate(), start = _a.start, end = _a.end;
75
+ var relativeStart = timeShift && start ? getRelativeTime(timeShift, start) : start;
76
+ var relativeEnd = timeShift && end ? getRelativeTime(timeShift, end) : end;
77
+ return {
78
+ start: relativeStart && relativeStart.valueOf(),
79
+ end: relativeEnd && relativeEnd.valueOf()
80
+ };
81
+ }
82
+ exports.calcFullTime = calcFullTime;
@@ -53,5 +53,58 @@ export declare type IDrawerProps = Overwrite<DrawerProps, {
53
53
  onClose?: (e: EventType) => void;
54
54
  afterVisibleChange?: (visible: boolean) => void;
55
55
  }>;
56
- export default function Drawer(props: React.PropsWithChildren<IDrawerProps>): JSX.Element;
57
- export {};
56
+ export declare function Drawer(props: React.PropsWithChildren<IDrawerProps>): JSX.Element;
57
+ declare const _default: (props: {
58
+ className?: string | undefined;
59
+ /**
60
+ * 是否显示关闭按钮
61
+ */
62
+ closable?: boolean | undefined;
63
+ /**
64
+ * 点击遮蔽层是否可以关闭
65
+ */
66
+ maskClosable?: boolean | undefined;
67
+ /**
68
+ * 是否有遮蔽层
69
+ */
70
+ mask?: boolean | undefined;
71
+ /**
72
+ * 遮蔽层样式
73
+ */
74
+ maskStyle?: React.CSSProperties | undefined;
75
+ /**
76
+ * 位置
77
+ */
78
+ placement?: "top" | "left" | "right" | "bottom" | undefined;
79
+ /**
80
+ * 标题
81
+ */
82
+ title?: React.ReactNode;
83
+ /**
84
+ * 是否可见
85
+ */
86
+ visible?: boolean | undefined;
87
+ /**
88
+ * 宽
89
+ */
90
+ width?: string | number | undefined;
91
+ /**
92
+ * 高
93
+ */
94
+ height?: string | number | undefined;
95
+ /**
96
+ * 容器的class name
97
+ */
98
+ wrapClassName?: string | undefined;
99
+ /**
100
+ * 层级
101
+ */
102
+ zIndex?: number | undefined;
103
+ getContainer?: string | false | HTMLElement | getContainerFunc | undefined;
104
+ onClose?: ((e: EventType) => void) | undefined;
105
+ afterVisibleChange?: ((visible: boolean) => void) | undefined;
106
+ } & Pick<DrawerProps, "style" | "autoFocus" | "size" | "prefixCls" | "footer" | "extra" | "bodyStyle" | "forceRender" | "keyboard" | "destroyOnClose" | "closeIcon" | "drawerStyle" | "headerStyle" | "contentWrapperStyle" | "push" | "handler" | "footerStyle" | "level" | "levelMove"> & {
107
+ bodyStyle?: React.CSSProperties | undefined;
108
+ children: React.ReactNode;
109
+ }) => JSX.Element;
110
+ export default _default;
@@ -36,8 +36,10 @@ var React = __importStar(require("react"));
36
36
  var classnames_1 = __importDefault(require("classnames"));
37
37
  var antd_1 = require("antd");
38
38
  var style_1 = require("../../constants/style");
39
+ var popContainer_1 = __importDefault(require("../../hoc/popContainer"));
39
40
  function Drawer(props) {
40
41
  var width = props.width, className = props.className, other = __rest(props, ["width", "className"]);
41
42
  return (React.createElement(antd_1.Drawer, __assign({ className: classnames_1.default(style_1.SDK_PREFIX + "-drawer", className), width: width || 'auto', zIndex: 1200 }, other)));
42
43
  }
43
- exports.default = Drawer;
44
+ exports.Drawer = Drawer;
45
+ exports.default = popContainer_1.default(Drawer);
@@ -7,21 +7,17 @@
7
7
  z-index: 1200;
8
8
  width: 0%;
9
9
  height: 100%;
10
- -webkit-transition: height 0s ease 0.3s, width 0s ease 0.3s, -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
11
- transition: height 0s ease 0.3s, width 0s ease 0.3s, -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
12
- transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), height 0s ease 0.3s, width 0s ease 0.3s;
13
- transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), height 0s ease 0.3s, width 0s ease 0.3s, -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
14
- }
15
- .ant-drawer > * {
16
- -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), -webkit-box-shadow 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
17
- transition: -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), -webkit-box-shadow 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
18
- transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), box-shadow 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
19
- transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), box-shadow 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), -webkit-box-shadow 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
10
+ -webkit-transition: width 0s ease 0.3s, height 0s ease 0.3s;
11
+ transition: width 0s ease 0.3s, height 0s ease 0.3s;
20
12
  }
21
13
  .ant-drawer-content-wrapper {
22
14
  position: absolute;
23
15
  width: 100%;
24
16
  height: 100%;
17
+ -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), -webkit-box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1);
18
+ transition: -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), -webkit-box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1);
19
+ transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1);
20
+ transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1), -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), -webkit-box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1);
25
21
  }
26
22
  .ant-drawer .ant-drawer-content {
27
23
  width: 100%;
@@ -40,10 +36,10 @@
40
36
  .ant-drawer-left.ant-drawer-open,
41
37
  .ant-drawer-right.ant-drawer-open {
42
38
  width: 100%;
43
- -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
44
- transition: -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
45
- transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
46
- transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
39
+ -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
40
+ transition: -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
41
+ transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
42
+ transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
47
43
  }
48
44
  .ant-drawer-left {
49
45
  left: 0;
@@ -83,10 +79,10 @@
83
79
  .ant-drawer-top.ant-drawer-open,
84
80
  .ant-drawer-bottom.ant-drawer-open {
85
81
  height: 100%;
86
- -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
87
- transition: -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
88
- transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
89
- transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), -webkit-transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
82
+ -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
83
+ transition: -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
84
+ transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
85
+ transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), -webkit-transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
90
86
  }
91
87
  .ant-drawer-top {
92
88
  top: 0;
@@ -115,8 +111,8 @@
115
111
  opacity: 1;
116
112
  -webkit-transition: none;
117
113
  transition: none;
118
- -webkit-animation: antdDrawerFadeIn 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
119
- animation: antdDrawerFadeIn 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
114
+ -webkit-animation: antdDrawerFadeIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
115
+ animation: antdDrawerFadeIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
120
116
  pointer-events: auto;
121
117
  }
122
118
  .ant-drawer-title {
@@ -135,12 +131,8 @@
135
131
  border: 0;
136
132
  }
137
133
  .ant-drawer-close {
138
- position: absolute;
139
- top: 0;
140
- right: 0;
141
- z-index: 10;
142
- display: block;
143
- padding: 20px;
134
+ display: inline-block;
135
+ margin-right: 12px;
144
136
  color: rgba(0, 0, 0, 0.45);
145
137
  font-weight: 700;
146
138
  font-size: 16px;
@@ -162,22 +154,37 @@
162
154
  color: rgba(0, 0, 0, 0.75);
163
155
  text-decoration: none;
164
156
  }
165
- .ant-drawer-header-no-title .ant-drawer-close {
166
- margin-right: var(--scroll-bar);
167
- /* stylelint-disable-next-line function-calc-no-invalid */
168
- padding-right: calc(20px - var(--scroll-bar));
169
- }
170
157
  .ant-drawer-header {
171
158
  position: relative;
159
+ display: -webkit-box;
160
+ display: -ms-flexbox;
161
+ display: flex;
162
+ -webkit-box-align: center;
163
+ -ms-flex-align: center;
164
+ align-items: center;
165
+ -webkit-box-pack: justify;
166
+ -ms-flex-pack: justify;
167
+ justify-content: space-between;
172
168
  padding: 16px 24px;
173
169
  color: rgba(0, 0, 0, 0.65);
174
170
  background: #ffffff;
175
171
  border-bottom: 1px solid #e5e5e5;
176
172
  border-radius: 2px 2px 0 0;
177
173
  }
178
- .ant-drawer-header-no-title {
179
- color: rgba(0, 0, 0, 0.65);
180
- background: #ffffff;
174
+ .ant-drawer-header-title {
175
+ display: -webkit-box;
176
+ display: -ms-flexbox;
177
+ display: flex;
178
+ -webkit-box-align: center;
179
+ -ms-flex-align: center;
180
+ align-items: center;
181
+ -webkit-box-pack: justify;
182
+ -ms-flex-pack: justify;
183
+ justify-content: space-between;
184
+ }
185
+ .ant-drawer-header-close-only {
186
+ padding-bottom: 0;
187
+ border: none;
181
188
  }
182
189
  .ant-drawer-wrapper-body {
183
190
  display: -webkit-box;
@@ -185,10 +192,8 @@
185
192
  display: flex;
186
193
  -webkit-box-orient: vertical;
187
194
  -webkit-box-direction: normal;
188
- -ms-flex-direction: column;
189
- flex-direction: column;
190
- -ms-flex-wrap: nowrap;
191
- flex-wrap: nowrap;
195
+ -ms-flex-flow: column nowrap;
196
+ flex-flow: column nowrap;
192
197
  width: 100%;
193
198
  height: 100%;
194
199
  }
@@ -216,15 +221,10 @@
216
221
  height: 0;
217
222
  background-color: rgba(0, 0, 0, 0.45);
218
223
  opacity: 0;
219
- filter: alpha(opacity=45);
220
224
  -webkit-transition: opacity 0.3s linear, height 0s ease 0.3s;
221
225
  transition: opacity 0.3s linear, height 0s ease 0.3s;
222
226
  pointer-events: none;
223
227
  }
224
- .ant-drawer-open-content {
225
- -webkit-box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
226
- box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
227
- }
228
228
  .ant-drawer .ant-picker-clear {
229
229
  background: #ffffff;
230
230
  }
@@ -248,8 +248,8 @@
248
248
  direction: rtl;
249
249
  }
250
250
  .ant-drawer-rtl .ant-drawer-close {
251
- right: auto;
252
- left: 0;
251
+ margin-right: 0;
252
+ margin-left: 12px;
253
253
  }
254
254
  .ant-btn {
255
255
  padding: 4px 15px;