@qn-pandora/pandora-component 4.4.4 → 4.4.6

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 (292) hide show
  1. package/es/components/AutoComplete/index.d.ts +3 -2
  2. package/es/components/Breadcrumb/index.d.ts +1 -1
  3. package/es/components/Button/index.d.ts +1 -1
  4. package/es/components/Card/RowExtra/index.d.ts +1 -1
  5. package/es/components/Card/SearchInput/index.d.ts +2 -2
  6. package/es/components/Card/index.d.ts +1 -1
  7. package/es/components/CheckTransformList/Item/index.d.ts +2 -2
  8. package/es/components/CheckTransformList/index.d.ts +2 -2
  9. package/es/components/Checkbox/index.d.ts +2 -2
  10. package/es/components/CheckboxList/index.d.ts +1 -1
  11. package/es/components/Collapse/Panel/index.d.ts +2 -2
  12. package/es/components/Collapse/index.d.ts +2 -2
  13. package/es/components/Collapse/index.js +10 -8
  14. package/es/components/CollapsiblePanel/PanelContent/index.d.ts +1 -1
  15. package/es/components/CollapsiblePanel/PanelContent/index.js +2 -2
  16. package/es/components/CollapsiblePanel/PanelHeader/index.d.ts +1 -1
  17. package/es/components/CollapsiblePanel/PanelHeader/index.js +1 -1
  18. package/es/components/CollapsiblePanel/index.d.ts +1 -1
  19. package/es/components/CollapsiblePanel/index.js +1 -1
  20. package/es/components/ConfigProvider/context.d.ts +1 -1
  21. package/es/components/ConfigProvider/index.d.ts +2 -2
  22. package/es/components/DateTimePicker/Base/index.d.ts +4 -4
  23. package/es/components/DateTimePicker/Base/index.js +7 -7
  24. package/es/components/DateTimePicker/Base/relativeTimePicker.d.ts +1 -1
  25. package/es/components/DateTimePicker/Base/relativeTimePicker.js +1 -1
  26. package/es/components/DateTimePicker/BaseMobile/Absolute/index.d.ts +1 -1
  27. package/es/components/DateTimePicker/BaseMobile/Absolute/index.js +4 -4
  28. package/es/components/DateTimePicker/BaseMobile/CustomButton/index.d.ts +2 -2
  29. package/es/components/DateTimePicker/BaseMobile/index.d.ts +2 -2
  30. package/es/components/DateTimePicker/BaseMobile/index.js +1 -1
  31. package/es/components/DateTimePicker/Collapse/Panel/index.d.ts +1 -1
  32. package/es/components/DateTimePicker/Collapse/index.d.ts +1 -1
  33. package/es/components/DateTimePicker/DisplayInput/index.d.ts +1 -1
  34. package/es/components/DateTimePicker/DisplayInput/index.js +1 -1
  35. package/es/components/DateTimePicker/index.d.ts +1 -1
  36. package/es/components/DateTimePicker/index.js +1 -1
  37. package/es/components/Drawer/index.d.ts +5 -5
  38. package/es/components/Drawer/index.js +3 -3
  39. package/es/components/FileResumable/constants.js +1 -0
  40. package/es/components/FileResumable/index.d.ts +2 -2
  41. package/es/components/Input/Password/index.d.ts +2 -2
  42. package/es/components/Input/TextArea/index.d.ts +2 -2
  43. package/es/components/Input/index.d.ts +4 -4
  44. package/es/components/InputNumberWithUnit/index.d.ts +1 -1
  45. package/es/components/KeyValuePair/index.d.ts +2 -2
  46. package/es/components/KeyValuePair/index.js +10 -3
  47. package/es/components/Measure/index.d.ts +2 -2
  48. package/es/components/Menu/Option.d.ts +1 -1
  49. package/es/components/Menu/index.d.ts +1 -1
  50. package/es/components/Modal/index.d.ts +1 -1
  51. package/es/components/Modal/index.js +1 -1
  52. package/es/components/NameExplainTooltip/index.d.ts +2 -2
  53. package/es/components/NameLimiter/index.d.ts +1 -1
  54. package/es/components/OptionList/InlineOptionList/index.d.ts +2 -2
  55. package/es/components/OptionList/OptionItem/index.d.ts +2 -2
  56. package/es/components/OptionList/PopoverOptionList/index.d.ts +1 -1
  57. package/es/components/OptionList/index.d.ts +1 -1
  58. package/es/components/RadioGroup/index.d.ts +1 -1
  59. package/es/components/RangeInput/index.d.ts +1 -1
  60. package/es/components/ReactSortable/index.d.ts +23 -0
  61. package/es/components/ReactSortable/index.js +171 -0
  62. package/es/components/RemarkName/index.d.ts +2 -2
  63. package/es/components/Selector/SelectorWidthChildren.d.ts +1 -1
  64. package/es/components/Selector/index.d.ts +1 -1
  65. package/es/components/Selector/index.js +1 -1
  66. package/es/components/SolidRadioGroup/index.d.ts +1 -1
  67. package/es/components/Spin/LoadingSVG.d.ts +2 -2
  68. package/es/components/Spin/index.d.ts +1 -1
  69. package/es/components/Steps/ControlButton/index.d.ts +1 -1
  70. package/es/components/Steps/Step/index.d.ts +2 -2
  71. package/es/components/Steps/index.d.ts +2 -2
  72. package/es/components/Style/index.d.ts +1 -1
  73. package/es/components/Style/index.js +1 -1
  74. package/es/components/Table/ColumnSetting/index.d.ts +1 -1
  75. package/es/components/Table/ColumnSetting/index.js +1 -1
  76. package/es/components/Table/ColumnTag/ColumnTag.d.ts +2 -2
  77. package/es/components/Table/ResizableTitle/index.d.ts +2 -2
  78. package/es/components/Table/constant.d.ts +7 -1
  79. package/es/components/Table/constant.js +6 -0
  80. package/es/components/Table/index.d.ts +15 -6
  81. package/es/components/Table/index.js +147 -117
  82. package/es/components/Tabs/index.d.ts +1 -1
  83. package/es/components/TagList/Tag/index.d.ts +1 -1
  84. package/es/components/TagList/TagSwitch/index.d.ts +1 -1
  85. package/es/components/TagList/index.d.ts +1 -1
  86. package/es/components/TagList/index.js +1 -1
  87. package/es/components/Timeline/TimelineItem/index.d.ts +1 -1
  88. package/es/components/Timeline/index.d.ts +1 -1
  89. package/es/components/Transfer/List/index.d.ts +2 -2
  90. package/es/components/Transfer/ListBody/index.d.ts +2 -2
  91. package/es/components/Transfer/constants.js +1 -0
  92. package/es/components/Transfer/index.d.ts +2 -2
  93. package/es/components/TreeSelector/index.d.ts +1 -1
  94. package/es/hoc/debounce.d.ts +1 -1
  95. package/es/hoc/modalPopupContainer.d.ts +1 -1
  96. package/es/index.css +372 -372
  97. package/es/index.d.ts +1 -0
  98. package/es/index.js +1 -0
  99. package/es/index.less +13 -13
  100. package/es/models/index.js +1 -0
  101. package/es/style/theme.less +4 -3
  102. package/lib/components/AutoComplete/index.d.ts +3 -2
  103. package/lib/components/AutoComplete/index.js +20 -7
  104. package/lib/components/Breadcrumb/index.d.ts +1 -1
  105. package/lib/components/Breadcrumb/index.js +14 -2
  106. package/lib/components/Button/index.d.ts +1 -1
  107. package/lib/components/Button/index.js +19 -7
  108. package/lib/components/Card/RowExtra/index.d.ts +1 -1
  109. package/lib/components/Card/RowExtra/index.js +14 -2
  110. package/lib/components/Card/SearchInput/index.d.ts +2 -2
  111. package/lib/components/Card/SearchInput/index.js +19 -7
  112. package/lib/components/Card/index.d.ts +1 -1
  113. package/lib/components/Card/index.js +19 -7
  114. package/lib/components/CheckTransformList/Item/index.d.ts +2 -2
  115. package/lib/components/CheckTransformList/Item/index.js +14 -2
  116. package/lib/components/CheckTransformList/index.d.ts +2 -2
  117. package/lib/components/CheckTransformList/index.js +19 -7
  118. package/lib/components/Checkbox/index.d.ts +2 -2
  119. package/lib/components/Checkbox/index.js +19 -7
  120. package/lib/components/CheckboxList/index.d.ts +1 -1
  121. package/lib/components/CheckboxList/index.js +14 -2
  122. package/lib/components/Collapse/Panel/index.d.ts +2 -2
  123. package/lib/components/Collapse/Panel/index.js +20 -7
  124. package/lib/components/Collapse/index.d.ts +2 -2
  125. package/lib/components/Collapse/index.js +30 -15
  126. package/lib/components/CollapsiblePanel/PanelContent/index.d.ts +1 -1
  127. package/lib/components/CollapsiblePanel/PanelContent/index.js +2 -2
  128. package/lib/components/CollapsiblePanel/PanelHeader/index.d.ts +1 -1
  129. package/lib/components/CollapsiblePanel/PanelHeader/index.js +1 -1
  130. package/lib/components/CollapsiblePanel/index.d.ts +1 -1
  131. package/lib/components/CollapsiblePanel/index.js +1 -1
  132. package/lib/components/ConfigProvider/context.d.ts +1 -1
  133. package/lib/components/ConfigProvider/context.js +20 -7
  134. package/lib/components/ConfigProvider/index.d.ts +2 -2
  135. package/lib/components/DateTimePicker/Base/constants.js +1 -0
  136. package/lib/components/DateTimePicker/Base/index.d.ts +4 -4
  137. package/lib/components/DateTimePicker/Base/index.js +25 -12
  138. package/lib/components/DateTimePicker/Base/relativeTimePicker.d.ts +1 -1
  139. package/lib/components/DateTimePicker/Base/relativeTimePicker.js +15 -3
  140. package/lib/components/DateTimePicker/BaseMobile/Absolute/constants.js +1 -0
  141. package/lib/components/DateTimePicker/BaseMobile/Absolute/index.d.ts +1 -1
  142. package/lib/components/DateTimePicker/BaseMobile/Absolute/index.js +4 -4
  143. package/lib/components/DateTimePicker/BaseMobile/CustomButton/index.d.ts +2 -2
  144. package/lib/components/DateTimePicker/BaseMobile/constants.js +1 -0
  145. package/lib/components/DateTimePicker/BaseMobile/index.d.ts +2 -2
  146. package/lib/components/DateTimePicker/BaseMobile/index.js +3 -2
  147. package/lib/components/DateTimePicker/Collapse/Panel/index.d.ts +1 -1
  148. package/lib/components/DateTimePicker/Collapse/Panel/index.js +19 -7
  149. package/lib/components/DateTimePicker/Collapse/index.d.ts +1 -1
  150. package/lib/components/DateTimePicker/Collapse/index.js +14 -2
  151. package/lib/components/DateTimePicker/DisplayInput/index.d.ts +1 -1
  152. package/lib/components/DateTimePicker/DisplayInput/index.js +20 -8
  153. package/lib/components/DateTimePicker/constants.js +1 -0
  154. package/lib/components/DateTimePicker/index.d.ts +1 -1
  155. package/lib/components/DateTimePicker/index.js +22 -9
  156. package/lib/components/DateTimePicker/transform.js +1 -0
  157. package/lib/components/Descriptions/index.js +19 -7
  158. package/lib/components/Drawer/CloseIcon/index.js +17 -3
  159. package/lib/components/Drawer/index.d.ts +5 -5
  160. package/lib/components/Drawer/index.js +4 -3
  161. package/lib/components/FileResumable/index.d.ts +2 -2
  162. package/lib/components/FileResumable/index.js +19 -7
  163. package/lib/components/FileResumable/utils.js +3 -1
  164. package/lib/components/Input/Password/index.d.ts +2 -2
  165. package/lib/components/Input/Password/index.js +20 -7
  166. package/lib/components/Input/TextArea/index.d.ts +2 -2
  167. package/lib/components/Input/TextArea/index.js +20 -7
  168. package/lib/components/Input/index.d.ts +4 -4
  169. package/lib/components/Input/index.js +19 -7
  170. package/lib/components/InputNumberWithUnit/index.d.ts +1 -1
  171. package/lib/components/InputNumberWithUnit/index.js +19 -7
  172. package/lib/components/KeyValuePair/index.d.ts +2 -2
  173. package/lib/components/KeyValuePair/index.js +27 -8
  174. package/lib/components/Measure/index.d.ts +2 -2
  175. package/lib/components/Menu/Option.d.ts +1 -1
  176. package/lib/components/Menu/Option.js +14 -2
  177. package/lib/components/Menu/index.d.ts +1 -1
  178. package/lib/components/Menu/index.js +20 -7
  179. package/lib/components/Modal/index.d.ts +1 -1
  180. package/lib/components/Modal/index.js +20 -8
  181. package/lib/components/NameExplainTooltip/index.d.ts +2 -2
  182. package/lib/components/NameExplainTooltip/index.js +19 -7
  183. package/lib/components/NameLimiter/index.d.ts +1 -1
  184. package/lib/components/NameLimiter/index.js +19 -7
  185. package/lib/components/OptionList/InlineOptionList/index.d.ts +2 -2
  186. package/lib/components/OptionList/InlineOptionList/index.js +14 -2
  187. package/lib/components/OptionList/OptionItem/index.d.ts +2 -2
  188. package/lib/components/OptionList/OptionItem/index.js +14 -2
  189. package/lib/components/OptionList/PopoverOptionList/index.d.ts +1 -1
  190. package/lib/components/OptionList/PopoverOptionList/index.js +19 -7
  191. package/lib/components/OptionList/constants.js +1 -0
  192. package/lib/components/OptionList/index.d.ts +1 -1
  193. package/lib/components/OptionList/index.js +23 -11
  194. package/lib/components/RadioGroup/index.d.ts +1 -1
  195. package/lib/components/RadioGroup/index.js +14 -2
  196. package/lib/components/RangeInput/index.d.ts +1 -1
  197. package/lib/components/RangeInput/index.js +19 -7
  198. package/lib/components/RangeInput/utils.js +1 -0
  199. package/lib/components/ReactSortable/index.d.ts +23 -0
  200. package/lib/components/ReactSortable/index.js +195 -0
  201. package/lib/components/RemarkName/index.d.ts +2 -2
  202. package/lib/components/RemarkName/index.js +15 -2
  203. package/lib/components/Selector/SelectorWidthChildren.d.ts +1 -1
  204. package/lib/components/Selector/SelectorWidthChildren.js +19 -7
  205. package/lib/components/Selector/index.d.ts +1 -1
  206. package/lib/components/Selector/index.js +20 -8
  207. package/lib/components/SolidRadioGroup/index.d.ts +1 -1
  208. package/lib/components/SolidRadioGroup/index.js +14 -2
  209. package/lib/components/Spin/LoadingSVG.d.ts +2 -2
  210. package/lib/components/Spin/index.d.ts +1 -1
  211. package/lib/components/Spin/index.js +1 -0
  212. package/lib/components/Steps/ControlButton/index.d.ts +1 -1
  213. package/lib/components/Steps/ControlButton/index.js +14 -2
  214. package/lib/components/Steps/Step/index.d.ts +2 -2
  215. package/lib/components/Steps/Step/index.js +14 -2
  216. package/lib/components/Steps/context.js +15 -2
  217. package/lib/components/Steps/index.d.ts +2 -2
  218. package/lib/components/Steps/index.js +19 -7
  219. package/lib/components/Style/index.d.ts +1 -1
  220. package/lib/components/Style/index.js +18 -6
  221. package/lib/components/Table/ColumnSetting/index.d.ts +1 -1
  222. package/lib/components/Table/ColumnSetting/index.js +22 -9
  223. package/lib/components/Table/ColumnTag/ColumnTag.d.ts +2 -2
  224. package/lib/components/Table/ColumnTag/ColumnTag.js +15 -2
  225. package/lib/components/Table/ResizableTitle/index.d.ts +2 -2
  226. package/lib/components/Table/constant.d.ts +7 -1
  227. package/lib/components/Table/constant.js +7 -0
  228. package/lib/components/Table/index.d.ts +15 -6
  229. package/lib/components/Table/index.js +167 -124
  230. package/lib/components/Tabs/index.d.ts +1 -1
  231. package/lib/components/Tabs/index.js +1 -0
  232. package/lib/components/TagList/Tag/index.d.ts +1 -1
  233. package/lib/components/TagList/Tag/index.js +19 -7
  234. package/lib/components/TagList/TagSwitch/index.d.ts +1 -1
  235. package/lib/components/TagList/TagSwitch/index.js +14 -2
  236. package/lib/components/TagList/index.d.ts +1 -1
  237. package/lib/components/TagList/index.js +20 -8
  238. package/lib/components/Timeline/TimelineItem/index.d.ts +1 -1
  239. package/lib/components/Timeline/TimelineItem/index.js +14 -2
  240. package/lib/components/Timeline/index.d.ts +1 -1
  241. package/lib/components/Timeline/index.js +15 -2
  242. package/lib/components/Transfer/List/index.d.ts +2 -2
  243. package/lib/components/Transfer/List/index.js +19 -7
  244. package/lib/components/Transfer/ListBody/index.d.ts +2 -2
  245. package/lib/components/Transfer/index.d.ts +2 -2
  246. package/lib/components/TreeSelector/index.d.ts +1 -1
  247. package/lib/components/TreeSelector/index.js +20 -7
  248. package/lib/constants/language/check_transform_list/en.js +1 -0
  249. package/lib/constants/language/check_transform_list/type.js +1 -0
  250. package/lib/constants/language/check_transform_list/zh.js +1 -0
  251. package/lib/constants/language/datetime/en.js +1 -0
  252. package/lib/constants/language/datetime/type.js +1 -0
  253. package/lib/constants/language/datetime/zh.js +1 -0
  254. package/lib/constants/language/en.js +1 -0
  255. package/lib/constants/language/modal/en.js +1 -0
  256. package/lib/constants/language/modal/type.js +1 -0
  257. package/lib/constants/language/modal/zh.js +1 -0
  258. package/lib/constants/language/range_input/en.js +1 -0
  259. package/lib/constants/language/range_input/type.js +1 -0
  260. package/lib/constants/language/range_input/zh.js +1 -0
  261. package/lib/constants/language/steps/en.js +1 -0
  262. package/lib/constants/language/steps/type.js +1 -0
  263. package/lib/constants/language/steps/zh.js +1 -0
  264. package/lib/constants/language/table/en.js +1 -0
  265. package/lib/constants/language/table/type.js +1 -0
  266. package/lib/constants/language/table/zh.js +1 -0
  267. package/lib/constants/language/transfer/en.js +1 -0
  268. package/lib/constants/language/transfer/type.js +1 -0
  269. package/lib/constants/language/transfer/zh.js +1 -0
  270. package/lib/constants/language/type.js +1 -0
  271. package/lib/constants/language/upload/type.js +1 -0
  272. package/lib/constants/language/zh.js +1 -0
  273. package/lib/constants/locale.js +1 -0
  274. package/lib/constants/style.js +1 -0
  275. package/lib/constants/time.js +1 -0
  276. package/lib/hoc/debounce.d.ts +1 -1
  277. package/lib/hoc/debounce.js +19 -7
  278. package/lib/hoc/modalPopupContainer.d.ts +1 -1
  279. package/lib/hoc/modalPopupContainer.js +19 -7
  280. package/lib/index.css +1587 -1587
  281. package/lib/index.d.ts +1 -0
  282. package/lib/index.js +67 -54
  283. package/lib/index.less +11 -11
  284. package/lib/style/theme.less +4 -3
  285. package/lib/utils/dom.js +1 -0
  286. package/lib/utils/env.js +1 -0
  287. package/lib/utils/language.js +1 -0
  288. package/lib/utils/languageLocale.js +1 -0
  289. package/lib/utils/time.js +17 -3
  290. package/package.json +17 -15
  291. package/CHANGELOG.json +0 -672
  292. package/CHANGELOG.md +0 -235
@@ -3,7 +3,7 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
@@ -23,12 +23,31 @@ var __assign = (this && this.__assign) || function () {
23
23
  };
24
24
  return __assign.apply(this, arguments);
25
25
  };
26
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
27
+ if (k2 === undefined) k2 = k;
28
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
29
+ }) : (function(o, m, k, k2) {
30
+ if (k2 === undefined) k2 = k;
31
+ o[k2] = m[k];
32
+ }));
33
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
34
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
35
+ }) : function(o, v) {
36
+ o["default"] = v;
37
+ });
26
38
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
27
39
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
40
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
41
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
42
  return c > 3 && r && Object.defineProperty(target, key, r), r;
31
43
  };
44
+ var __importStar = (this && this.__importStar) || function (mod) {
45
+ if (mod && mod.__esModule) return mod;
46
+ var result = {};
47
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
48
+ __setModuleDefault(result, mod);
49
+ return result;
50
+ };
32
51
  var __metadata = (this && this.__metadata) || function (k, v) {
33
52
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
34
53
  };
@@ -63,17 +82,11 @@ var __spread = (this && this.__spread) || function () {
63
82
  for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
64
83
  return ar;
65
84
  };
66
- var __importStar = (this && this.__importStar) || function (mod) {
67
- if (mod && mod.__esModule) return mod;
68
- var result = {};
69
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
70
- result["default"] = mod;
71
- return result;
72
- };
73
85
  var __importDefault = (this && this.__importDefault) || function (mod) {
74
86
  return (mod && mod.__esModule) ? mod : { "default": mod };
75
87
  };
76
88
  Object.defineProperty(exports, "__esModule", { value: true });
89
+ exports.ETableSettingType = void 0;
77
90
  var React = __importStar(require("react"));
78
91
  var classnames_1 = __importDefault(require("classnames"));
79
92
  var mobx_react_1 = require("mobx-react");
@@ -146,10 +159,19 @@ var Table = /** @class */ (function (_super) {
146
159
  this.setHiddenColumn(nextProps.hiddenColumns);
147
160
  }
148
161
  if (nextProps.columns !== this.props.columns) {
149
- this.setColumns((nextProps.scroll && nextProps.draggable === true) ||
150
- nextProps.draggable === ETableSettingType.RESIZE
151
- ? this.getResizeColumns(nextProps.columns)
152
- : nextProps.columns);
162
+ if ((nextProps.scroll && nextProps.draggable === true) ||
163
+ nextProps.draggable === ETableSettingType.RESIZE) {
164
+ this.updateSettingConfig(nextProps.columns);
165
+ this.setColumns(this.getResizeColumns(nextProps.columns));
166
+ }
167
+ else {
168
+ this.setColumns(nextProps.columns || []);
169
+ }
170
+ }
171
+ };
172
+ Table.prototype.componentWillUnmount = function () {
173
+ if (this.props.saveSettingKey) {
174
+ localStorage.setItem(this.props.saveSettingKey, JSON.stringify(this.settingFields));
153
175
  }
154
176
  };
155
177
  Object.defineProperty(Table.prototype, "selectedRowKeys", {
@@ -157,7 +179,7 @@ var Table = /** @class */ (function (_super) {
157
179
  var rowSelection = this.props.rowSelection;
158
180
  return (rowSelection && rowSelection.selectedRowKeys) || [];
159
181
  },
160
- enumerable: true,
182
+ enumerable: false,
161
183
  configurable: true
162
184
  });
163
185
  Object.defineProperty(Table.prototype, "rowSelection", {
@@ -167,7 +189,7 @@ var Table = /** @class */ (function (_super) {
167
189
  return __assign(__assign({}, rowSelection), { selectedRowKeys: this.selectedRowKeys, onChange: this.handleSelectionChange });
168
190
  }
169
191
  },
170
- enumerable: true,
192
+ enumerable: false,
171
193
  configurable: true
172
194
  });
173
195
  Object.defineProperty(Table.prototype, "undisabledData", {
@@ -181,14 +203,14 @@ var Table = /** @class */ (function (_super) {
181
203
  }
182
204
  return undisabledData;
183
205
  },
184
- enumerable: true,
206
+ enumerable: false,
185
207
  configurable: true
186
208
  });
187
209
  Object.defineProperty(Table.prototype, "keysOfCurrentPage", {
188
210
  get: function () {
189
211
  return this.undisabledData.map(this.getRowKey);
190
212
  },
191
- enumerable: true,
213
+ enumerable: false,
192
214
  configurable: true
193
215
  });
194
216
  Object.defineProperty(Table.prototype, "emptyTextComp", {
@@ -208,7 +230,7 @@ var Table = /** @class */ (function (_super) {
208
230
  }
209
231
  return emptyText;
210
232
  },
211
- enumerable: true,
233
+ enumerable: false,
212
234
  configurable: true
213
235
  });
214
236
  Object.defineProperty(Table.prototype, "columnsSettingOptions", {
@@ -230,7 +252,7 @@ var Table = /** @class */ (function (_super) {
230
252
  .map(function (key) { return options.find(function (option) { return option.value === key; }); })
231
253
  .filter(function (f) { return !!f; });
232
254
  },
233
- enumerable: true,
255
+ enumerable: false,
234
256
  configurable: true
235
257
  });
236
258
  Object.defineProperty(Table.prototype, "columnKeys", {
@@ -256,16 +278,17 @@ var Table = /** @class */ (function (_super) {
256
278
  resetKeys: resetKeys
257
279
  };
258
280
  },
259
- enumerable: true,
281
+ enumerable: false,
260
282
  configurable: true
261
283
  });
262
284
  Object.defineProperty(Table.prototype, "resizable", {
263
285
  get: function () {
264
286
  var _a, _b;
265
- return (((_a = this.props) === null || _a === void 0 ? void 0 : _a.draggable) === true ||
266
- ((_b = this.props) === null || _b === void 0 ? void 0 : _b.draggable) === ETableSettingType.RESIZE);
287
+ return ((((_a = this.props) === null || _a === void 0 ? void 0 : _a.draggable) === true ||
288
+ ((_b = this.props) === null || _b === void 0 ? void 0 : _b.draggable) === ETableSettingType.RESIZE) &&
289
+ this.props.scroll);
267
290
  },
268
- enumerable: true,
291
+ enumerable: false,
269
292
  configurable: true
270
293
  });
271
294
  Object.defineProperty(Table.prototype, "sortable", {
@@ -274,98 +297,83 @@ var Table = /** @class */ (function (_super) {
274
297
  return (((_a = this.props) === null || _a === void 0 ? void 0 : _a.draggable) === true ||
275
298
  ((_b = this.props) === null || _b === void 0 ? void 0 : _b.draggable) === ETableSettingType.SORT);
276
299
  },
277
- enumerable: true,
300
+ enumerable: false,
278
301
  configurable: true
279
302
  });
303
+ Table.prototype.updateSettingConfig = function (columns) {
304
+ this.updateSettingFields(columns, this.settingFields);
305
+ };
280
306
  Table.prototype.initSettingConfig = function () {
281
- var _this = this;
282
- var _a = this.props, saveSettingKey = _a.saveSettingKey, _b = _a.hiddenColumns, hiddenColumns = _b === void 0 ? [] : _b;
307
+ var saveSettingKey = this.props.saveSettingKey;
283
308
  var settingFields = [];
309
+ if (saveSettingKey) {
310
+ var settingStr = localStorage.getItem(saveSettingKey);
311
+ var settingConfig = !!settingStr && JSON.parse(settingStr);
312
+ if (lodash_1.isArray(settingConfig)) {
313
+ settingFields = settingConfig;
314
+ }
315
+ }
316
+ this.updateSettingFields(this.props.columns, settingFields);
317
+ };
318
+ Table.prototype.updateSettingFields = function (columns, settingFields) {
319
+ var _a = this.props.hiddenColumns, hiddenColumns = _a === void 0 ? [] : _a;
284
320
  var sortableColumns = [];
285
321
  var leftColumns = [];
286
322
  var rightColumns = [];
287
323
  var hideKeys = [];
288
- if (saveSettingKey) {
289
- // 支持排序或拖拽
290
- var sizeStr = localStorage.getItem(saveSettingKey);
291
- settingFields = (!!sizeStr && JSON.parse(sizeStr)) || [];
292
- // 已配置的列和实际的对不上
293
- // 可能新增或者删除列的情况
294
- var newSettingFields = [];
295
- if ((settingFields === null || settingFields === void 0 ? void 0 : settingFields.length) && lodash_1.isArray(settingFields)) {
296
- // 已配置列
297
- // 旧类型数据为对象类型,未配置
298
- settingFields.map(function (field) {
299
- var find = _this.columns.find(function (column) { return column.dataIndex === field.field; });
300
- if (find) {
301
- if (field.hide) {
302
- hideKeys.push(field.field);
303
- }
304
- if (!find.fixed) {
305
- sortableColumns.push(field);
306
- }
307
- else if (find.fixed === 'left' || find.fixed === true) {
308
- leftColumns.push(field);
309
- }
310
- else {
311
- rightColumns.push(field);
312
- }
313
- }
314
- });
315
- // 未配置过的列
316
- this.columns
317
- .filter(function (f) { return !settingFields.find(function (field) { return field.field === f.dataIndex; }); })
318
- .map(function (column) {
319
- if (!column.fixed) {
320
- sortableColumns.push({
321
- field: column.dataIndex,
322
- fixed: column.fixed
323
- });
324
- }
325
- else if (column.fixed === 'left' || column.fixed === true) {
326
- leftColumns.push({
327
- field: column.dataIndex,
328
- fixed: column.fixed
329
- });
330
- }
331
- else {
332
- rightColumns.push({
333
- field: column.dataIndex,
334
- fixed: column.fixed
335
- });
336
- }
337
- });
324
+ // 已配置的列和实际的对不上
325
+ // 可能新增或者删除列的情况
326
+ var newSettingFields = [];
327
+ // 已配置列
328
+ // 旧类型数据为对象类型,未配置
329
+ settingFields.map(function (field) {
330
+ var find = columns.find(function (column) { var _a; return ((_a = column) === null || _a === void 0 ? void 0 : _a.dataIndex) === field.field; });
331
+ if (find) {
332
+ if (field.hide) {
333
+ hideKeys.push(field.field);
334
+ }
335
+ if (!find.fixed) {
336
+ sortableColumns.push(field);
337
+ }
338
+ else if (find.fixed === 'left' || find.fixed === true) {
339
+ leftColumns.push(field);
340
+ }
341
+ else {
342
+ rightColumns.push(field);
343
+ }
338
344
  }
339
- else {
340
- // 从未配置过的列
341
- this.columns.map(function (column) {
342
- if (!column.fixed) {
343
- sortableColumns.push({
344
- field: column.dataIndex,
345
- fixed: column.fixed
346
- });
347
- }
348
- else if (column.fixed === 'left' || column.fixed === true) {
349
- leftColumns.push({
350
- field: column.dataIndex,
351
- fixed: column.fixed
352
- });
353
- }
354
- else {
355
- rightColumns.push({
356
- field: column.dataIndex,
357
- fixed: column.fixed
358
- });
359
- }
360
- });
345
+ });
346
+ // 未配置过的列
347
+ columns
348
+ .filter(function (f) { return !settingFields.find(function (field) { return field.field === f.dataIndex; }); })
349
+ .map(function (column) {
350
+ if (column.dataIndex) {
351
+ if (!column.fixed) {
352
+ sortableColumns.push({
353
+ field: column.dataIndex.toString(),
354
+ fixed: column.fixed
355
+ });
356
+ }
357
+ else if (column.fixed === 'left' || column.fixed === true) {
358
+ leftColumns.push({
359
+ field: column.dataIndex.toString(),
360
+ fixed: column.fixed
361
+ });
362
+ }
363
+ else {
364
+ rightColumns.push({
365
+ field: column.dataIndex.toString(),
366
+ fixed: column.fixed
367
+ });
368
+ }
361
369
  }
362
- this.setFixedLeftKeys(leftColumns.map(function (t) { return t.field; }));
363
- this.setFixedRightKeys(rightColumns.map(function (t) { return t.field; }));
364
- this.setSortKeys(sortableColumns.map(function (t) { return t.field; }));
365
- this.setHiddenColumn(__spread(new Set(__spread(hiddenColumns, hideKeys))));
366
- newSettingFields = __spread(leftColumns, sortableColumns, rightColumns);
367
- this.setSettingFields(newSettingFields);
368
- }
370
+ });
371
+ this.setFixedLeftKeys(leftColumns.map(function (t) { return t.field; }));
372
+ this.setFixedRightKeys(rightColumns.map(function (t) { return t.field; }));
373
+ this.setSortKeys(sortableColumns.map(function (t) { return t.field; }));
374
+ this.setHiddenColumn(__spread(new Set(__spread(hiddenColumns, hideKeys))));
375
+ newSettingFields = __spread(leftColumns, sortableColumns, rightColumns);
376
+ this.setSettingFields(newSettingFields);
369
377
  };
370
378
  // 隐藏key
371
379
  Table.prototype.handleHideColumnsChange = function (keys) {
@@ -402,14 +410,35 @@ var Table = /** @class */ (function (_super) {
402
410
  });
403
411
  return __spread(fixedLeftColumn, this.getSortCoulmns(selectedCols), fixedRightColumn);
404
412
  };
413
+ // 如果支持拖拽,在屏幕宽度大于table总的列宽的时候,添加一个空白列,宽度auto.
414
+ // 空白列添加到右固定列的前面
415
+ Table.prototype.transfromColumns = function (columns) {
416
+ if (!this.resizable)
417
+ return columns;
418
+ var cols = __spread(columns);
419
+ var firstFixedRightIndex = cols.findIndex(function (item) { return lodash_1.get(item, 'fixed') === 'right'; });
420
+ var column = {
421
+ title: '',
422
+ dataIndex: '__empty__',
423
+ key: '__empty__'
424
+ };
425
+ if (firstFixedRightIndex === -1) {
426
+ cols.push(column);
427
+ }
428
+ else {
429
+ cols.splice(firstFixedRightIndex, 0, column);
430
+ }
431
+ return cols;
432
+ };
405
433
  Table.prototype.getColumns = function () {
406
434
  var _a = this.props, showColumnSetting = _a.showColumnSetting, columnSettingOverlayClass = _a.columnSettingOverlayClass;
407
435
  if (!showColumnSetting) {
408
- return this.columns;
436
+ return this.transfromColumns(this.columns);
409
437
  }
410
438
  // 获取到列设置的options
411
439
  var columnsSettingOptions = this.columnsSettingOptions;
412
440
  var allCols = this.getSortedColumns();
441
+ this.transfromColumns(allCols);
413
442
  var length = allCols.length;
414
443
  if (length > 0) {
415
444
  var title = (React.createElement("span", { className: style_1.SDK_PREFIX + "-last-column-title" },
@@ -464,9 +493,6 @@ var Table = /** @class */ (function (_super) {
464
493
  this.sortConfig = __assign(__assign({}, this.sortConfig), { sortKeys: columns });
465
494
  };
466
495
  Table.prototype.setSettingFields = function (columns) {
467
- if (this.props.saveSettingKey) {
468
- localStorage.setItem(this.props.saveSettingKey, JSON.stringify(columns));
469
- }
470
496
  this.settingFields = columns;
471
497
  };
472
498
  Table.prototype.setFixedRightKeys = function (columns) {
@@ -572,18 +598,14 @@ var Table = /** @class */ (function (_super) {
572
598
  };
573
599
  Table.prototype.getResizeColumns = function (columns) {
574
600
  var _this = this;
575
- var fields;
576
- if (this.props.saveSettingKey) {
577
- var sizeStr = localStorage.getItem(this.props.saveSettingKey);
578
- fields = !!sizeStr && JSON.parse(sizeStr);
579
- if (fields) {
580
- columns = columns === null || columns === void 0 ? void 0 : columns.map(function (col) {
581
- var _a;
582
- var dataIndex = lodash_1.get(col, 'dataIndex');
583
- var width = (_a = fields.find(function (f) { return f.field === dataIndex; })) === null || _a === void 0 ? void 0 : _a.width;
584
- return lodash_1.isNumber(width) ? __assign(__assign({}, col), { width: width }) : col;
585
- });
586
- }
601
+ var fields = this.settingFields;
602
+ if ((fields === null || fields === void 0 ? void 0 : fields.length) && lodash_1.isArray(fields)) {
603
+ columns = columns === null || columns === void 0 ? void 0 : columns.map(function (col) {
604
+ var _a;
605
+ var dataIndex = lodash_1.get(col, 'dataIndex');
606
+ var width = (_a = fields === null || fields === void 0 ? void 0 : fields.find(function (f) { return f.field === dataIndex; })) === null || _a === void 0 ? void 0 : _a.width;
607
+ return lodash_1.isNumber(width) ? __assign(__assign({}, col), { width: width }) : col;
608
+ });
587
609
  }
588
610
  var transformColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (it) {
589
611
  if (lodash_1.get(it, 'resizable') && _this.resizable) {
@@ -603,12 +625,13 @@ var Table = /** @class */ (function (_super) {
603
625
  return transformColumns;
604
626
  };
605
627
  Table.prototype.componentDidMount = function () {
606
- this.setColumns(this.resizable && this.props.scroll
607
- ? this.getResizeColumns(this.props.columns)
608
- : this.props.columns);
628
+ var _a;
609
629
  if (this.sortable || this.resizable) {
610
630
  this.initSettingConfig();
611
631
  }
632
+ this.setColumns(this.resizable && ((_a = this.settingFields) === null || _a === void 0 ? void 0 : _a.length)
633
+ ? this.getResizeColumns(this.props.columns)
634
+ : this.props.columns);
612
635
  };
613
636
  Table.prototype.render = function () {
614
637
  var _a, _b;
@@ -620,7 +643,7 @@ var Table = /** @class */ (function (_super) {
620
643
  // getCheckboxProps只能放到tableBatchWrapper里,因为selectedRowKeys在那个组件计算
621
644
  rowSelection: batchOptions && this.props.rowSelection
622
645
  ? this.rowSelection
623
- : this.props.rowSelection, rowClassName: this.getRowClassName, components: __assign(__assign({}, (components || {})), (this.resizable && scroll
646
+ : this.props.rowSelection, rowClassName: this.getRowClassName, components: __assign(__assign({}, (components || {})), (this.resizable
624
647
  ? {
625
648
  header: {
626
649
  cell: ResizableTitle_1.default
@@ -716,6 +739,13 @@ var Table = /** @class */ (function (_super) {
716
739
  __metadata("design:type", Object),
717
740
  __metadata("design:paramtypes", [])
718
741
  ], Table.prototype, "sortable", null);
742
+ __decorate([
743
+ bind_1.default,
744
+ mobx_1.action,
745
+ __metadata("design:type", Function),
746
+ __metadata("design:paramtypes", [Array]),
747
+ __metadata("design:returntype", void 0)
748
+ ], Table.prototype, "updateSettingConfig", null);
719
749
  __decorate([
720
750
  bind_1.default,
721
751
  mobx_1.action,
@@ -723,6 +753,13 @@ var Table = /** @class */ (function (_super) {
723
753
  __metadata("design:paramtypes", []),
724
754
  __metadata("design:returntype", void 0)
725
755
  ], Table.prototype, "initSettingConfig", null);
756
+ __decorate([
757
+ bind_1.default,
758
+ mobx_1.action,
759
+ __metadata("design:type", Function),
760
+ __metadata("design:paramtypes", [Array, Array]),
761
+ __metadata("design:returntype", void 0)
762
+ ], Table.prototype, "updateSettingFields", null);
726
763
  __decorate([
727
764
  bind_1.default,
728
765
  __metadata("design:type", Function),
@@ -735,6 +772,12 @@ var Table = /** @class */ (function (_super) {
735
772
  __metadata("design:paramtypes", []),
736
773
  __metadata("design:returntype", void 0)
737
774
  ], Table.prototype, "getSortedColumns", null);
775
+ __decorate([
776
+ bind_1.default,
777
+ __metadata("design:type", Function),
778
+ __metadata("design:paramtypes", [Array]),
779
+ __metadata("design:returntype", void 0)
780
+ ], Table.prototype, "transfromColumns", null);
738
781
  __decorate([
739
782
  bind_1.default,
740
783
  __metadata("design:type", Function),
@@ -58,5 +58,5 @@ export interface ITabsProps extends TabsProps {
58
58
  /**
59
59
  * 卡片顶栏功能切换Tab
60
60
  */
61
- export declare function Tabs(props: ITabsProps): JSX.Element;
61
+ export declare function Tabs(props: ITabsProps): React.JSX.Element;
62
62
  export default Tabs;
@@ -25,6 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
25
25
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.Tabs = void 0;
28
29
  var icons_1 = require("@ant-design/icons");
29
30
  var antd_1 = require("antd");
30
31
  var react_1 = __importDefault(require("react"));
@@ -30,4 +30,4 @@ export interface ITagProps extends IKeyValues<any> {
30
30
  */
31
31
  getPopupContainer?: () => HTMLElement;
32
32
  }
33
- export default function Tag(props: React.PropsWithChildren<ITagProps>): JSX.Element;
33
+ export default function Tag(props: React.PropsWithChildren<ITagProps>): React.JSX.Element;
@@ -10,6 +10,25 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || function (mod) {
26
+ if (mod && mod.__esModule) return mod;
27
+ var result = {};
28
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
+ __setModuleDefault(result, mod);
30
+ return result;
31
+ };
13
32
  var __rest = (this && this.__rest) || function (s, e) {
14
33
  var t = {};
15
34
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -21,13 +40,6 @@ var __rest = (this && this.__rest) || function (s, e) {
21
40
  }
22
41
  return t;
23
42
  };
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
28
- result["default"] = mod;
29
- return result;
30
- };
31
43
  var __importDefault = (this && this.__importDefault) || function (mod) {
32
44
  return (mod && mod.__esModule) ? mod : { "default": mod };
33
45
  };
@@ -31,4 +31,4 @@ export interface ITagSwitchProps {
31
31
  */
32
32
  getPopupContainer?: () => HTMLElement;
33
33
  }
34
- export default function TagSwitch(props: React.PropsWithChildren<ITagSwitchProps>): JSX.Element;
34
+ export default function TagSwitch(props: React.PropsWithChildren<ITagSwitchProps>): React.JSX.Element;
@@ -1,9 +1,21 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
2
14
  var __importStar = (this && this.__importStar) || function (mod) {
3
15
  if (mod && mod.__esModule) return mod;
4
16
  var result = {};
5
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6
- result["default"] = mod;
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
7
19
  return result;
8
20
  };
9
21
  var __importDefault = (this && this.__importDefault) || function (mod) {
@@ -28,7 +28,7 @@ export interface ITagListProps {
28
28
  */
29
29
  onChange?: (values: any[]) => void;
30
30
  }
31
- declare function TagList(props: React.PropsWithChildren<ITagListProps>): JSX.Element;
31
+ declare function TagList(props: React.PropsWithChildren<ITagListProps>): React.JSX.Element;
32
32
  declare namespace TagList {
33
33
  var Tag: typeof import("./Tag").default;
34
34
  var TagSwitch: typeof import("./TagSwitch").default;
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
2
21
  var __read = (this && this.__read) || function (o, n) {
3
22
  var m = typeof Symbol === "function" && o[Symbol.iterator];
4
23
  if (!m) return o;
@@ -19,13 +38,6 @@ var __spread = (this && this.__spread) || function () {
19
38
  for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
20
39
  return ar;
21
40
  };
22
- var __importStar = (this && this.__importStar) || function (mod) {
23
- if (mod && mod.__esModule) return mod;
24
- var result = {};
25
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
26
- result["default"] = mod;
27
- return result;
28
- };
29
41
  var __importDefault = (this && this.__importDefault) || function (mod) {
30
42
  return (mod && mod.__esModule) ? mod : { "default": mod };
31
43
  };
@@ -46,7 +58,7 @@ function TagList(props) {
46
58
  return;
47
59
  }
48
60
  if (active) {
49
- return onChange(__spread(values, [value]));
61
+ return onChange(__spread((values || []), [value]));
50
62
  }
51
63
  return onChange(values.filter(function (v) { return v !== value; }));
52
64
  };
@@ -23,4 +23,4 @@ export interface ITimelineItemProps {
23
23
  /**
24
24
  * Timeline的每个时间节点
25
25
  */
26
- export default function TimelineItem(props: ITimelineItemProps): JSX.Element;
26
+ export default function TimelineItem(props: ITimelineItemProps): React.JSX.Element;
@@ -1,9 +1,21 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
2
14
  var __importStar = (this && this.__importStar) || function (mod) {
3
15
  if (mod && mod.__esModule) return mod;
4
16
  var result = {};
5
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6
- result["default"] = mod;
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
7
19
  return result;
8
20
  };
9
21
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,7 +10,7 @@ export interface ITimelineProps {
10
10
  /**
11
11
  * 时间轴组件封装
12
12
  */
13
- export declare function Timeline(props: React.PropsWithChildren<ITimelineProps>): JSX.Element;
13
+ export declare function Timeline(props: React.PropsWithChildren<ITimelineProps>): React.JSX.Element;
14
14
  export declare namespace Timeline {
15
15
  var TimelineItem: typeof import("./TimelineItem").default;
16
16
  }