@titaui/pc 1.11.1 → 1.11.4-0

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 (287) hide show
  1. package/lib/components/button/icon-btn/index.js +17 -8
  2. package/lib/components/date-picker/BodyItem.js +3 -3
  3. package/lib/components/date-picker/CalendarHeader.js +3 -3
  4. package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
  5. package/lib/components/drawer-manager/index.js +25 -27
  6. package/lib/components/drop-selector/index.js +25 -10
  7. package/lib/components/dynamic/online-broadcast/data.js +7 -1
  8. package/lib/components/eReport/eReportLists/reportList.js +3 -3
  9. package/lib/components/emotions-selector/selector-pop.js +3 -3
  10. package/lib/components/ereport-list/index.js +3 -3
  11. package/lib/components/mblog/components/MblogAction.js +3 -3
  12. package/lib/components/menus/export-modules/interview-menus/constant.js +24 -0
  13. package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
  14. package/{es/components/word-cloud → lib/components/menus/export-modules/interview-menus}/index.js +87 -69
  15. package/lib/components/menus/index.js +11 -5
  16. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
  17. package/lib/components/okr-progress-modal/index.css +1 -1
  18. package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
  19. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
  20. package/lib/components/okrcase-library/okrcases-components/caseLibrary-main.js +14 -8
  21. package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
  22. package/lib/components/rich-editor/models/schema.js +6 -6
  23. package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
  24. package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
  25. package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
  26. package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
  27. package/lib/components/rich-editor/plugins/core/index.js +4 -4
  28. package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
  29. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
  30. package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
  31. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
  32. package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
  33. package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
  34. package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
  35. package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
  36. package/lib/components/rich-editor/react/uiProvider.js +3 -3
  37. package/lib/components/rich-editor/ui/Popup/index.js +3 -3
  38. package/lib/components/select/Option.js +3 -3
  39. package/lib/components/time-picker/index.css +99 -0
  40. package/{es/components-v1/placement → lib/components/time-picker}/index.js +2 -2
  41. package/lib/components/time-picker/time-picker-selector.js +142 -0
  42. package/lib/components/time-picker/time-picker.js +307 -0
  43. package/{es/components/tabs/index.js → lib/components/time-picker/timer-picker-input.js} +69 -38
  44. package/lib/components/time-picker/utils.js +41 -0
  45. package/lib/components/tita-chart/errorBoundary/index.js +3 -3
  46. package/lib/components-v1/animate/AnimateChild.js +3 -3
  47. package/lib/components-v1/avatar/index.js +3 -3
  48. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
  49. package/lib/components-v1/progress/CircleProgress.js +3 -3
  50. package/lib/components-v1/select/Option.js +3 -3
  51. package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
  52. package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
  53. package/lib/components-v1/userSelector/components/UserItem.js +3 -3
  54. package/lib/index.js +8 -0
  55. package/lib/pages/aha2021/index.js +5 -1
  56. package/lib/utils/hooks.js +72 -0
  57. package/package.json +1 -1
  58. package/yarn-error.log +6356 -5424
  59. package/es/components/cascader/time.js +0 -31
  60. package/es/components/common-share/request-apis.js +0 -56
  61. package/es/components/confidence/heart.js +0 -66
  62. package/es/components/create-okr-modal/fields/index.js +0 -17
  63. package/es/components/create-okr-modal/utils/getCreateOkrSurpassPercent.js +0 -154
  64. package/es/components/date-picker/BodyItem.js +0 -121
  65. package/es/components/date-picker/CalendarBody.js +0 -157
  66. package/es/components/date-picker/CalendarHeader.js +0 -187
  67. package/es/components/date-picker/index.js +0 -157
  68. package/es/components/date-range-picker/index.js +0 -210
  69. package/es/components/dialog/index.js +0 -119
  70. package/es/components/dialog-confirm/index.js +0 -154
  71. package/es/components/drop-selector/icon-item.js +0 -40
  72. package/es/components/drop-selector/index.js +0 -179
  73. package/es/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  74. package/es/components/dynamic/dynamic-liking/mock.js +0 -83
  75. package/es/components/dynamic/dynamic-topping/request-api.js +0 -36
  76. package/es/components/e-priority/index.js +0 -88
  77. package/es/components/e-status-dropdown/index.js +0 -94
  78. package/es/components/grid-layout/commen-components/index.js +0 -73
  79. package/es/components/grid-layout/image/could.js +0 -8
  80. package/es/components/grid-layout/image/lv.js +0 -8
  81. package/es/components/grid-layout/image/tita-mask.js +0 -8
  82. package/es/components/help-card/request-api.js +0 -35
  83. package/es/components/icon-button-list/index.js +0 -65
  84. package/es/components/menus/context.js +0 -18
  85. package/es/components/menus/precls.js +0 -8
  86. package/es/components/okr-detail/auth.js +0 -197
  87. package/es/components/okr-detail/components/ao-nice/index.js +0 -245
  88. package/es/components/okr-detail/components/block-line/index.js +0 -20
  89. package/es/components/okr-detail/components/header/index.js +0 -211
  90. package/es/components/okr-detail/components/icon-text/index.js +0 -116
  91. package/es/components/okr-detail/components/okr-tree/index.js +0 -48
  92. package/es/components/okr-detail/components/okr-tree/precls.js +0 -8
  93. package/es/components/okr-detail/components/okr-tree/tree-node/default-node.js +0 -22
  94. package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +0 -88
  95. package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +0 -200
  96. package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-status-dropdown.js +0 -98
  97. package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +0 -412
  98. package/es/components/okr-detail/components/okr-tree/tree-node/get-process-color.js +0 -62
  99. package/es/components/okr-detail/components/okr-tree/tree-node/index.js +0 -90
  100. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/get-process-color.js +0 -46
  101. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +0 -421
  102. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/index.js +0 -54
  103. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +0 -62
  104. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +0 -94
  105. package/es/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +0 -273
  106. package/es/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +0 -207
  107. package/es/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +0 -236
  108. package/es/components/okr-detail/components/padding-layout.js +0 -22
  109. package/es/components/okr-detail/components/tab-panel-content/index.js +0 -27
  110. package/es/components/okr-detail/context.js +0 -30
  111. package/es/components/okr-detail/e-list/index.js +0 -243
  112. package/es/components/okr-detail/e-list/precls.js +0 -8
  113. package/es/components/okr-detail/e-list/search-form/fields/e-order.js +0 -172
  114. package/es/components/okr-detail/e-list/search-form/fields/e-status.js +0 -99
  115. package/es/components/okr-detail/e-list/search-form/fields/e-user.js +0 -49
  116. package/es/components/okr-detail/e-list/search-form/index.js +0 -143
  117. package/es/components/okr-detail/error-page/index.js +0 -33
  118. package/es/components/okr-detail/index.js +0 -428
  119. package/es/components/okr-detail/loading/index.js +0 -28
  120. package/es/components/okr-detail/okr-list/add-parent-okr.js +0 -37
  121. package/es/components/okr-detail/okr-list/create-kr-item/heart.js +0 -38
  122. package/es/components/okr-detail/okr-list/drag-order-kr.js +0 -62
  123. package/es/components/okr-detail/okr-list/empty/index.js +0 -48
  124. package/es/components/okr-detail/okr-list/index.js +0 -524
  125. package/es/components/okr-detail/okr-list/warp-parent-okr.js +0 -21
  126. package/es/components/okr-detail/store.js +0 -1
  127. package/es/components/okr-flow/child-node/fields/creator.js +0 -175
  128. package/es/components/okr-flow/child-node/fields/okrClassify.js +0 -31
  129. package/es/components/okr-flow/child-node/fields/okrType.js +0 -21
  130. package/es/components/okr-flow/child-node/helper.js +0 -35
  131. package/es/components/okr-flow/child-node/index.js +0 -110
  132. package/es/components/okr-flow/child-node/kr-node.js +0 -75
  133. package/es/components/okr-flow/child-node/work-node.js +0 -242
  134. package/es/components/okr-flow/context.js +0 -14
  135. package/es/components/okr-flow/empty/index.js +0 -29
  136. package/es/components/okr-flow/export-modules/okr-search-panel/index.js +0 -394
  137. package/es/components/okr-flow/index.js +0 -24
  138. package/es/components/okr-flow/mini-map/index.js +0 -112
  139. package/es/components/okr-flow/mini-map/map.js +0 -145
  140. package/es/components/okr-flow/mini-map/mini-node.js +0 -57
  141. package/es/components/okr-flow/mini-map/utils.js +0 -79
  142. package/es/components/okr-flow/okr-map/index.js +0 -192
  143. package/es/components/okr-flow/open-data/index.js +0 -115
  144. package/es/components/okr-flow/precls.js +0 -8
  145. package/es/components/okr-flow/request-apis.js +0 -118
  146. package/es/components/okr-flow/root-node/index.js +0 -229
  147. package/es/components/okr-flow/utils/config.js +0 -18
  148. package/es/components/okr-flow/utils/helper.js +0 -36
  149. package/es/components/okr-flow/utils/index.js +0 -66
  150. package/es/components/okr-flow/utils/tree-handler.js +0 -323
  151. package/es/components/okr-progress-modal/helper.js +0 -156
  152. package/es/components/okr-progress-modal/request-apis.js +0 -34
  153. package/es/components/okr-share/request-apis.js +0 -56
  154. package/es/components/okrcase-library/server/network.js +0 -407
  155. package/es/components/pagination/locale/en_US.js +0 -22
  156. package/es/components/pagination/locale/zh_CN.js +0 -22
  157. package/es/components/point-demo/drop-down-box/index.js +0 -159
  158. package/es/components/point-demo/index.js +0 -533
  159. package/es/components/point-demo/input/index.js +0 -176
  160. package/es/components/point-demo/point-demo.js +0 -75
  161. package/es/components/point-demo/popup/index.js +0 -113
  162. package/es/components/point-demo/popup/placement.js +0 -44
  163. package/es/components/range-picker-pop/index.js +0 -273
  164. package/es/components/scrollbar/simplebar/helpers.js +0 -59
  165. package/es/components/scrollbar/simplebar/index.js +0 -91
  166. package/es/components/scrollbar/simplebar/scrollbar-width.js +0 -47
  167. package/es/components/scrollbar/simplebar/simplebar.js +0 -852
  168. package/es/components/scrollbar/simplebar-react.js +0 -163
  169. package/es/components/search-dropdown/index.js +0 -40
  170. package/es/components/search-input/index.js +0 -126
  171. package/es/components/select/Option.js +0 -94
  172. package/es/components/select/index.js +0 -330
  173. package/es/components/selector-input/debounce.js +0 -36
  174. package/es/components/selector-input/index.js +0 -109
  175. package/es/components/slider-input/index.js +0 -119
  176. package/es/components/switch/index.js +0 -39
  177. package/es/components/table/index.js +0 -275
  178. package/es/components/task-relation-modal/tree-node/index.js +0 -58
  179. package/es/components/tita-chart/charts/img/could.js +0 -8
  180. package/es/components/tooltip/error-tip.js +0 -24
  181. package/es/components/tooltip/index.js +0 -21
  182. package/es/components/tree/index.js +0 -79
  183. package/es/components/tree/precls.js +0 -8
  184. package/es/components/upvote/request-apis.js +0 -45
  185. package/es/components/user-selector/action-btns/btn-cancel.js +0 -21
  186. package/es/components/user-selector/action-btns/btn-ok.js +0 -21
  187. package/es/components/user-selector/action-btns/index.js +0 -27
  188. package/es/components/user-selector/context.js +0 -18
  189. package/es/components/user-selector/empty/group.js +0 -55
  190. package/es/components/user-selector/empty/index.js +0 -28
  191. package/es/components/user-selector/export-modules/depart-search-selector/result-part.js +0 -41
  192. package/es/components/user-selector/export-modules/group-selector/index.js +0 -170
  193. package/es/components/user-selector/export-modules/group-selector/searched-panel.js +0 -68
  194. package/es/components/user-selector/export-modules/multiple-user-selector--bak/index.js +0 -246
  195. package/es/components/user-selector/index.js +0 -25
  196. package/es/components/user-selector/layout/index.js +0 -25
  197. package/es/components/user-selector/loading/index.js +0 -18
  198. package/es/components/user-selector/request-apis.js +0 -180
  199. package/es/components/user-selector/searched-panel/index.js +0 -139
  200. package/es/components/user-selector/searched-panel/result-part.js +0 -43
  201. package/es/components/user-selector/select-tree/selected-tree/index.js +0 -91
  202. package/es/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +0 -48
  203. package/es/components/user-selector/select-tree/tree-nodes/tree-duties-node/index.js +0 -27
  204. package/es/components/user-selector/select-tree/tree-nodes/tree-group-node/index.js +0 -57
  205. package/es/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +0 -93
  206. package/es/components/user-selector/utils.js +0 -139
  207. package/es/components/viewer/ImageListRender.js +0 -143
  208. package/es/components/viewer/index.js +0 -168
  209. package/es/components/word-cloud/request-apis.js +0 -26
  210. package/es/components-v1/animate/AnimateChild.js +0 -76
  211. package/es/components-v1/animate/animate.js +0 -148
  212. package/es/components-v1/animate/index.js +0 -13
  213. package/es/components-v1/dom/index.js +0 -30
  214. package/es/components-v1/placement/placement.js +0 -111
  215. package/es/components-v1/placement/placementInner.js +0 -139
  216. package/es/components-v1/pop/Pop.js +0 -246
  217. package/es/components-v1/pop/PopInner.js +0 -163
  218. package/es/components-v1/pop/index.js +0 -13
  219. package/es/components-v1/progress/CircleProgress.js +0 -152
  220. package/es/components-v1/progress/LineProgress.js +0 -83
  221. package/es/components-v1/progress/index.js +0 -80
  222. package/es/components-v1/select/Option.js +0 -94
  223. package/es/components-v1/select/index.js +0 -330
  224. package/es/components-v1/utils/animate/animate.js +0 -103
  225. package/es/components-v1/utils/animate/event.js +0 -79
  226. package/es/components-v1/utils/dom/index.js +0 -30
  227. package/es/components-v1/utils/placement/autoAdjustPlacement.js +0 -93
  228. package/es/components-v1/utils/placement/getContainerVisibleArea.js +0 -22
  229. package/es/components-v1/utils/placement/getExpectPlacement.js +0 -49
  230. package/es/components-v1/utils/placement/getPlacementInContainer.js +0 -26
  231. package/es/components-v1/utils/placement/placement.js +0 -76
  232. package/es/index.js +0 -777
  233. package/es/pages/appointment-demo/drop-down-box/index.js +0 -159
  234. package/es/pages/appointment-demo/index.js +0 -649
  235. package/es/pages/appointment-demo/input/index.js +0 -176
  236. package/es/pages/appointment-demo/popup/index.js +0 -113
  237. package/es/pages/appointment-demo/popup/placement.js +0 -44
  238. package/es/pages/group-management/components/checkbox/index.js +0 -28
  239. package/es/pages/group-management/components/input-form/index.js +0 -174
  240. package/es/pages/group-management/components/radio/index.js +0 -21
  241. package/es/pages/group-management/components/table/index.js +0 -174
  242. package/es/pages/group-management/groupInterface.js +0 -293
  243. package/es/pages/group-management/index.js +0 -13
  244. package/es/pages/group-management/page-view/empty.js +0 -111
  245. package/es/pages/group-management/page-view/group-empty.js +0 -66
  246. package/es/pages/group-management/page-view/importGroupStaff/index.js +0 -208
  247. package/es/pages/group-management/page-view/index.js +0 -412
  248. package/es/pages/group-management/page-view/loading/index.js +0 -32
  249. package/es/pages/group-management/table/index.js +0 -104
  250. package/es/pages/group-management/tree/add-group-dialog/index.js +0 -153
  251. package/es/pages/group-management/tree/delete-group-dialog/index.js +0 -82
  252. package/es/pages/group-management/tree/edit-group-dialog/index.js +0 -155
  253. package/es/pages/group-management/tree/group-form/index.js +0 -207
  254. package/es/pages/group-management/tree/index.js +0 -168
  255. package/es/pages/group-management/tree/operation-panel.js +0 -41
  256. package/es/pages/group-management/tree/trigger-render.js +0 -99
  257. package/es/pages/like-ranking/mock.js +0 -366
  258. package/es/pages/okr-map/export-modules/index.js +0 -1
  259. package/es/pages/okr-map/export-modules/okr-map/header/index.js +0 -182
  260. package/es/pages/okr-map/export-modules/okr-map/header/show-kr-confirm.js +0 -47
  261. package/es/pages/okr-map/export-modules/okr-map/okr-map.js +0 -497
  262. package/es/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -69
  263. package/es/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +0 -168
  264. package/es/pages/okr-map/hooks/useStorage.js +0 -96
  265. package/es/pages/okr-map/index.js +0 -18
  266. package/es/pages/okr-map/level2-search/depart.js +0 -53
  267. package/es/pages/okr-map/level2-search/group.js +0 -69
  268. package/es/pages/okr-map/level2-search/index.js +0 -51
  269. package/es/pages/okr-map/level2-search/level2-input.js +0 -46
  270. package/es/pages/okr-map/level2-search/user.js +0 -54
  271. package/es/pages/okr-map/no-okr/index.js +0 -24
  272. package/es/pages/okr-map/number-select/index.js +0 -81
  273. package/es/pages/okr-map/open-data/index.js +0 -115
  274. package/es/pages/okr-map/precls.js +0 -8
  275. package/es/pages/okr-map/request-apis.js +0 -76
  276. package/es/pages/okr-map/share-dialog/index.js +0 -122
  277. package/es/pages/okr-map/unsupport-ie/index.js +0 -83
  278. package/es/pages/okr-map/utils.js +0 -51
  279. package/es/utils/auth.js +0 -294
  280. package/es/utils/bs-global.js +0 -114
  281. package/es/utils/local-storage.js +0 -42
  282. package/es/utils/mblog.js +0 -33
  283. package/es/utils/mock-bsglobal.js +0 -1837
  284. package/es/utils/open-data.js +0 -341
  285. package/es/utils/request-v1.js +0 -115
  286. package/es/utils/request.js +0 -183
  287. package/es/utils/tools.js +0 -286
@@ -1,80 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _CircleProgress = _interopRequireDefault(require("./CircleProgress"));
13
-
14
- var _LineProgress = _interopRequireDefault(require("./LineProgress"));
15
-
16
- var _excluded = ["type"];
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
-
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
25
-
26
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
27
-
28
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
-
30
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
31
-
32
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
33
-
34
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
35
-
36
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
37
-
38
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
39
-
40
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
41
-
42
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
43
-
44
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
45
-
46
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
47
-
48
- var Progress = /*#__PURE__*/function (_Component) {
49
- _inherits(Progress, _Component);
50
-
51
- var _super = _createSuper(Progress);
52
-
53
- function Progress() {
54
- _classCallCheck(this, Progress);
55
-
56
- return _super.apply(this, arguments);
57
- }
58
-
59
- _createClass(Progress, [{
60
- key: "render",
61
- value: function render() {
62
- var _this$props = this.props,
63
- type = _this$props.type,
64
- rest = _objectWithoutProperties(_this$props, _excluded);
65
-
66
- if (type == "circle") {
67
- return /*#__PURE__*/_react["default"].createElement(_CircleProgress["default"], rest);
68
- }
69
-
70
- return /*#__PURE__*/_react["default"].createElement(_LineProgress["default"], rest);
71
- }
72
- }]);
73
-
74
- return Progress;
75
- }(_react.Component);
76
-
77
- exports["default"] = Progress;
78
- Progress.defaultProps = {
79
- type: "line"
80
- };
@@ -1,94 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
-
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
-
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
-
18
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
-
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
-
22
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
-
24
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
-
26
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
27
-
28
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
-
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
-
32
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
-
34
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
35
-
36
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
37
-
38
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
-
40
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
-
42
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
43
-
44
- var Option = /*#__PURE__*/function (_Component) {
45
- _inherits(Option, _Component);
46
-
47
- var _super = _createSuper(Option);
48
-
49
- function Option() {
50
- var _temp, _this;
51
-
52
- _classCallCheck(this, Option);
53
-
54
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
55
- args[_key] = arguments[_key];
56
- }
57
-
58
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.handleSelect = function (e) {
59
- e.stopPropagation();
60
- e.nativeEvent.stopImmediatePropagation();
61
- var onSelect = _this.props.onSelect;
62
- onSelect && onSelect(_this.props.value);
63
- }, _this.getStyle = function () {
64
- return {
65
- height: _this.props.height,
66
- lineHeight: _this.props.height
67
- };
68
- }, _temp));
69
- }
70
-
71
- _createClass(Option, [{
72
- key: "render",
73
- value: function render() {
74
- var _this$props = this.props,
75
- triggerMethod = _this$props.triggerMethod,
76
- className = _this$props.className;
77
-
78
- var select = _defineProperty({}, triggerMethod, this.handleSelect);
79
-
80
- return /*#__PURE__*/_react["default"].createElement("li", _extends({
81
- className: "tita-common-selector-option ".concat(className)
82
- }, select, {
83
- style: _objectSpread({}, this.getStyle())
84
- }), this.props.children);
85
- }
86
- }]);
87
-
88
- return Option;
89
- }(_react.Component);
90
-
91
- exports["default"] = Option;
92
- Option.defaultProps = {
93
- triggerMethod: "onClick"
94
- };
@@ -1,330 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _pop = _interopRequireDefault(require("../pop"));
13
-
14
- var _Option = _interopRequireDefault(require("./Option"));
15
-
16
- require("./index.scss");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
-
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
-
26
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
27
-
28
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29
-
30
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
31
-
32
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
33
-
34
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
35
-
36
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
37
-
38
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
39
-
40
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
41
-
42
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
43
-
44
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
45
-
46
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
47
-
48
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
49
-
50
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
51
-
52
- var index = /*#__PURE__*/function (_Component) {
53
- _inherits(index, _Component);
54
-
55
- var _super = _createSuper(index);
56
-
57
- function index(p) {
58
- var _this;
59
-
60
- _classCallCheck(this, index);
61
-
62
- _this = _super.call(this, p);
63
-
64
- _initialiseProps.call(_assertThisInitialized(_this));
65
-
66
- var value = _this.props.value;
67
-
68
- if (value != undefined) {
69
- _this.controled = true;
70
- _this.state = {
71
- focus: false
72
- };
73
- return _possibleConstructorReturn(_this);
74
- }
75
-
76
- _this.state = {
77
- value: _this.props.defaultValue === undefined ? "" : _this.props.defaultValue,
78
- focus: false
79
- };
80
- return _this;
81
- }
82
-
83
- _createClass(index, [{
84
- key: "componentDidUpdate",
85
- value: function componentDidUpdate(newProps) {
86
- this.setWrapperScrollTop(newProps);
87
- }
88
- }, {
89
- key: "render",
90
- value: function render() {
91
- var _this$props = this.props,
92
- className = _this$props.className,
93
- disabled = _this$props.disabled,
94
- type = _this$props.type,
95
- containerStyle = _this$props.containerStyle,
96
- container = _this$props.container,
97
- title = _this$props.title;
98
- var style = this.props.maxHeight ? {
99
- overflow: "auto",
100
- maxHeight: this.props.maxHeight
101
- } : {};
102
- return /*#__PURE__*/_react["default"].createElement("div", _extends({
103
- className: type == "old" ? "tita-common-select-wrapper-o" : "tita-common-select-wrapper",
104
- style: containerStyle
105
- }, this.getHideEventHandler()), /*#__PURE__*/_react["default"].createElement("div", _extends({
106
- ref: "selector",
107
- style: _objectSpread(_objectSpread({}, this.props.style || {}), {
108
- backgroundColor: disabled ? "#f5f5f5" : this.props.dis ? "#4C5D68" : "#ffffff",
109
- cursor: disabled ? "not-allowed" : "pointer"
110
- }),
111
- className: "tita-common-select ".concat(this.state.focus ? "" : "tita-common-select-active")
112
- }, this.getShowEventHandler()), /*#__PURE__*/_react["default"].createElement("div", {
113
- className: "tita-select-text"
114
- }, title || this.getText()), /*#__PURE__*/_react["default"].createElement("span", {
115
- className: "".concat(type == "old" ? "tu-icon-sort-up" : "tu-icon-arrow-up", " common-select-arrow")
116
- })), /*#__PURE__*/_react["default"].createElement(_pop["default"], {
117
- ref: "options",
118
- blurToHide: this.props.toggle !== "hover",
119
- transitionName: "none-transition",
120
- onBeforeHide: this.handleBlur,
121
- container: container
122
- }, /*#__PURE__*/_react["default"].createElement("ul", {
123
- className: className,
124
- ref: "titaCommonCelectorWrapper",
125
- style: _objectSpread(_objectSpread({}, {
126
- minWidth: this.props.style.width
127
- }), style),
128
- onClick: function onClick(e) {
129
- e.stopPropagation();
130
- e.nativeEvent.stopImmediatePropagation();
131
- },
132
- onMouseDown: function onMouseDown(e) {
133
- e.stopPropagation();
134
- e.nativeEvent.stopImmediatePropagation();
135
- }
136
- }, this.getChildren())));
137
- }
138
- }]);
139
-
140
- return index;
141
- }(_react.Component);
142
-
143
- exports["default"] = index;
144
- index.defaultProps = {
145
- style: {
146
- width: "100px !important",
147
- // NOTE IE11 下 width auto 不展示
148
- height: "26px"
149
- },
150
- toggle: "click",
151
- data: [],
152
- disabled: false,
153
- placeHolder: "",
154
- wrapperHeight: 300,
155
- adjustHeight: 54
156
- };
157
-
158
- var _initialiseProps = function _initialiseProps() {
159
- var _this2 = this;
160
-
161
- this.setWrapperScrollTop = function (newProps) {
162
- var value = newProps.value || -1;
163
- var activeTimeIndex = newProps.data.findIndex(function (item) {
164
- return (item.value || item) == value;
165
- });
166
- var scrollTop = activeTimeIndex * 32 >= _this2.props.wrapperHeight ? activeTimeIndex * 32 - _this2.props.wrapperHeight + _this2.props.adjustHeight : 0; // @ts-ignore
167
-
168
- if (_this2.refs.titaCommonCelectorWrapper) {
169
- _this2.refs.titaCommonCelectorWrapper.scrollTop = scrollTop;
170
- }
171
- };
172
-
173
- this.getShowEventHandler = function () {
174
- var handler = {};
175
-
176
- switch (_this2.props.toggle) {
177
- case "click":
178
- {
179
- handler.onClick = _this2.showOptions;
180
- break;
181
- }
182
-
183
- case "hover":
184
- {
185
- handler.onMouseOver = _this2.showOptions;
186
- break;
187
- }
188
-
189
- case "mousedonwn":
190
- {
191
- handler.onMouseDown = _this2.showOptions;
192
- }
193
-
194
- case "mouseup":
195
- {
196
- handler.onMouseUp = _this2.showOptions;
197
- }
198
-
199
- default:
200
- {
201
- handler.onClick = _this2.showOptions;
202
- }
203
- }
204
-
205
- return handler;
206
- };
207
-
208
- this.getHideEventHandler = function () {
209
- var handler = {};
210
-
211
- switch (_this2.props.toggle) {
212
- case "mouseup":
213
- case "hover":
214
- {
215
- handler.onMouseLeave = _this2.hideOptions;
216
- break;
217
- }
218
- }
219
-
220
- return handler;
221
- };
222
-
223
- this.getChildren = function () {
224
- var _this2$props$style = _this2.props.style,
225
- height = _this2$props$style.height,
226
- width = _this2$props$style.width;
227
- var _this2$props = _this2.props,
228
- valueField = _this2$props.valueField,
229
- textField = _this2$props.textField,
230
- value = _this2$props.value;
231
- return _this2.props.data.map(function (item, index) {
232
- var text = textField ? item[textField] : item;
233
- var value = valueField ? item[valueField] : item;
234
- var trigger = {
235
- click: "onClick",
236
- mousedonwn: "onMouseDown",
237
- mouseup: "onMouseUp"
238
- };
239
- return /*#__PURE__*/_react["default"].createElement(_Option["default"], {
240
- className: _this2.props.value == value ? "active" : "",
241
- style: {
242
- width: width,
243
- height: height
244
- },
245
- key: value,
246
- value: value,
247
- select: item,
248
- onSelect: _this2.handleSelect,
249
- triggerMethod: trigger[_this2.props.toggle]
250
- }, text);
251
- });
252
- };
253
-
254
- this.handleSelect = function (value) {
255
- if (!_this2.controled) {
256
- _this2.setState({
257
- value: value
258
- });
259
- }
260
-
261
- _this2.hideOptions();
262
-
263
- var onSelect = _this2.props.onSelect;
264
- onSelect && onSelect(value);
265
- };
266
-
267
- this.getSelected = function () {
268
- var valueField = _this2.props.valueField;
269
- if (!valueField) return _this2.getValue();
270
- return _this2.props.data.filter(function (item) {
271
- return item[valueField] == _this2.getValue();
272
- })[0];
273
- };
274
-
275
- this.getValue = function () {
276
- return _this2.controled ? _this2.props.value : _this2.state.value;
277
- };
278
-
279
- this.getText = function () {
280
- var _this2$props2 = _this2.props,
281
- textField = _this2$props2.textField,
282
- placeHolder = _this2$props2.placeHolder;
283
-
284
- var selected = _this2.getSelected();
285
-
286
- if (!selected) return placeHolder;
287
- return textField ? selected[textField] : selected;
288
- };
289
-
290
- this.showOptions = function () {
291
- if (_this2.props.disabled) return;
292
-
293
- _this2.refs.options.show(_this2.refs.selector);
294
-
295
- _this2.setState({
296
- focus: true
297
- });
298
- };
299
-
300
- this.hideOptions = function () {
301
- _this2.refs.options.hide();
302
- };
303
-
304
- this.handleBlur = function () {
305
- _this2.setState({
306
- focus: false
307
- });
308
- };
309
-
310
- this.getToggle = function (type) {
311
- var eventName = "onClick";
312
- var toggle = {};
313
-
314
- if (_this2.props.toggle == "hover") {
315
- eventName = "onMouseOver";
316
- toggle.onMouseLeave = _this2.hideOptions;
317
- }
318
-
319
- if (_this2.props.toggle == "mousedonwn") {
320
- eventName = "onMouseDown", toggle.onMouseDown = _this2.hideOptions;
321
- }
322
-
323
- if (_this2.props.toggle == "mouseup") {
324
- eventName = "onMouseUp", toggle.onMouseUp = _this2.hideOptions;
325
- }
326
-
327
- toggle[eventName] = _this2.showOptions;
328
- return toggle;
329
- };
330
- };
@@ -1,103 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _event = _interopRequireDefault(require("./event"));
9
-
10
- var _dom = require("../dom");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
15
-
16
- var prefixes = ["-webkit-", "-moz-", "-o-", "ms-", ""];
17
-
18
- function getStyleProperty(node, name) {
19
- // old ff need null, https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle
20
- var style = window.getComputedStyle(node, null);
21
- var ret = "";
22
-
23
- for (var i = 0; i < prefixes.length; i++) {
24
- ret = style.getPropertyValue(prefixes[i] + name);
25
-
26
- if (ret) {
27
- break;
28
- }
29
- }
30
-
31
- return ret;
32
- }
33
-
34
- function checkAnimation(node) {
35
- var transitionDelay = parseFloat(getStyleProperty(node, "transition-delay")) || 0;
36
- var transitionDuration = parseFloat(getStyleProperty(node, "transition-duration")) || 0;
37
- var animationDelay = parseFloat(getStyleProperty(node, "animation-delay")) || 0;
38
- var animationDuration = parseFloat(getStyleProperty(node, "animation-duration")) || 0;
39
-
40
- if (transitionDelay || transitionDuration || animationDelay || animationDuration) {
41
- return;
42
- }
43
-
44
- setTimeout(function () {
45
- node.endAniListener && node.endAniListener();
46
- }, 0);
47
- }
48
-
49
- var animation = function animation(node, name, callback) {
50
- var className = name;
51
- var activeName;
52
- var start;
53
- var end = callback;
54
-
55
- if (name && _typeof(name) === "object") {
56
- className = name.name;
57
- activeName = name.active;
58
- } else {
59
- activeName = "".concat(name, "-active");
60
- }
61
-
62
- if (callback && _typeof(callback) === "object") {
63
- start = callback.start;
64
- end = callback.end;
65
- }
66
-
67
- if (node.endAniListener) {
68
- node.endAniListener();
69
- }
70
-
71
- if (node.activeTimer) {
72
- clearTimeout(node.activeTimer);
73
- node.activeTimer = null;
74
- }
75
-
76
- node.endAniListener = function (e) {
77
- if (e && e.target != node) return;
78
- (0, _dom.removeClass)(node, className);
79
- (0, _dom.removeClass)(node, activeName);
80
-
81
- _event["default"].removeEndListener(node, node.endAniListener);
82
-
83
- node.endAniListener = null;
84
- end && end();
85
- };
86
-
87
- _event["default"].addEndListener(node, node.endAniListener);
88
-
89
- (0, _dom.addClass)(node, className);
90
- node.activeTimer = setTimeout(function () {
91
- (0, _dom.addClass)(node, activeName);
92
- checkAnimation(node);
93
- }, 30);
94
- start && start();
95
- return {
96
- stop: function stop() {
97
- node.endAniListener && node.endAniListener();
98
- }
99
- };
100
- };
101
-
102
- var _default = animation;
103
- exports["default"] = _default;