@titaui/pc 1.12.15 → 1.12.17-beta.2

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 (330) hide show
  1. package/lib/components/avatar/icon-avatar/index.js +1 -1
  2. package/lib/components/avatar/num-avatar/index.js +1 -1
  3. package/lib/components/book-demo/components/pc/components/content/index.js +1 -1
  4. package/lib/components/book-demo-award/components/pc/components/checkbox/index.css +54 -0
  5. package/lib/components/book-demo-award/components/pc/components/checkbox/index.js +126 -0
  6. package/lib/components/book-demo-award/components/pc/components/content/index.css +124 -0
  7. package/lib/components/book-demo-award/components/pc/components/content/index.js +372 -0
  8. package/lib/components/book-demo-award/components/pc/components/drop-select/index.css +41 -0
  9. package/lib/components/book-demo-award/components/pc/components/drop-select/index.js +86 -0
  10. package/lib/components/book-demo-award/components/pc/components/error-info/index.css +6 -0
  11. package/lib/components/book-demo-award/components/pc/components/error-info/index.js +24 -0
  12. package/lib/components/book-demo-award/components/pc/components/input/index.css +56 -0
  13. package/lib/components/book-demo-award/components/pc/components/input/index.js +94 -0
  14. package/lib/components/book-demo-award/components/pc/components/phone/index.css +68 -0
  15. package/lib/components/book-demo-award/components/pc/components/phone/index.js +95 -0
  16. package/lib/components/book-demo-award/components/pc/components/verify-code/index.css +45 -0
  17. package/lib/components/book-demo-award/components/pc/components/verify-code/index.js +139 -0
  18. package/lib/components/book-demo-award/components/pc/index.css +22 -0
  19. package/lib/components/book-demo-award/components/pc/index.js +174 -0
  20. package/lib/components/book-demo-award/constant.js +812 -0
  21. package/lib/components/book-demo-award/img/demo-close.svg +16 -0
  22. package/lib/components/book-demo-award/img/demo-down.svg +7 -0
  23. package/lib/components/book-demo-award/img/demo-learning.jpg +0 -0
  24. package/lib/components/book-demo-award/img/demo-okr.jpg +0 -0
  25. package/lib/components/book-demo-award/img/demo-performance.jpg +0 -0
  26. package/lib/components/book-demo-award/img/demo-universal.jpg +0 -0
  27. package/lib/components/book-demo-award/img/order-award.png +0 -0
  28. package/lib/components/book-demo-award/index.js +22 -0
  29. package/lib/components/book-demo-award/interface.js +17 -0
  30. package/lib/components/book-demo-award/request.js +50 -0
  31. package/lib/components/book-demo-award/utils.js +82 -0
  32. package/lib/components/button/default-button/index.js +1 -1
  33. package/lib/components/button/icon-btn/index.js +1 -1
  34. package/lib/components/cascader/index.js +1 -1
  35. package/lib/components/cascader/time.js +1 -1
  36. package/lib/components/change-okr-modal/Filter.js +2 -2
  37. package/lib/components/change-okr-modal/Item.js +2 -2
  38. package/lib/components/change-okr-modal/filterTab.js +2 -2
  39. package/lib/components/change-okr-modal/index.js +6 -4
  40. package/lib/components/common-share/publishMblog.js +4 -2
  41. package/lib/components/communication/CommunicationAttachments.js +2 -2
  42. package/lib/components/communication/ConvertUserName.js +2 -2
  43. package/lib/components/communication/index.js +2 -2
  44. package/lib/components/create-okr-modal/fields/okr-type-detail.js +4 -2
  45. package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +4 -2
  46. package/lib/components/create-okr-modal/index.js +4 -2
  47. package/lib/components/create-okr-modal/objectType.js +2 -2
  48. package/lib/components/create-okr-modal/request-api.js +16 -12
  49. package/lib/components/create-okr-modal/utils/helper.js +6 -2
  50. package/lib/components/date-picker/BodyItem.js +3 -3
  51. package/lib/components/date-picker/CalendarBody.js +3 -3
  52. package/lib/components/date-picker/CalendarHeader.js +3 -3
  53. package/lib/components/date-picker/index.js +2 -2
  54. package/lib/components/date-range-picker/index.js +2 -2
  55. package/lib/components/delete-confirm-pop/ConfirmPop.js +2 -2
  56. package/lib/components/dialog/index.js +1 -1
  57. package/lib/components/dialog-confirm/index.js +1 -1
  58. package/lib/components/drawer/headerDrop.js +1 -1
  59. package/lib/components/drawer/index.js +1 -1
  60. package/lib/components/drawer-manager/drawerWrapper.js +5 -3
  61. package/lib/components/drawer-manager/index.js +1 -1
  62. package/lib/components/drop-selector/index.js +1 -1
  63. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
  64. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +1 -1
  65. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +1 -1
  66. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
  67. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +1 -1
  68. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +1 -1
  69. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +1 -1
  70. package/lib/components/dynamic/dynamic-item/dynamic-learning/index.js +1 -1
  71. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +1 -1
  72. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +1 -1
  73. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +1 -1
  74. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +1 -1
  75. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +1 -1
  76. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +1 -1
  77. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +1 -1
  78. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +1 -1
  79. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +1 -1
  80. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +1 -1
  81. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
  82. package/lib/components/eReport/eReportListEmpty.js +2 -2
  83. package/lib/components/eReport/eReportLists/reportList.js +2 -2
  84. package/lib/components/eReport/eReportShare/index.js +2 -2
  85. package/lib/components/eReport/eReportShare/toast/index.js +2 -2
  86. package/lib/components/edit-kr-wight/EditKrWightModal.js +2 -2
  87. package/lib/components/edit-kr-wight/FormItemV2.js +2 -2
  88. package/lib/components/emotions-selector/selector-content.js +2 -2
  89. package/lib/components/emotions-selector/selector-pop.js +2 -2
  90. package/lib/components/ereport-list/index.js +2 -2
  91. package/lib/components/error-boundary/index.js +2 -2
  92. package/lib/components/firework/index.js +6 -2
  93. package/lib/components/form/form-fields/date/index.js +1 -1
  94. package/lib/components/form/form-fields/dropdown/index.js +1 -1
  95. package/lib/components/form/form-fields/input/index.js +1 -1
  96. package/lib/components/form/form-fields/input-verification-code/index.js +4 -2
  97. package/lib/components/form/form-fields/user/index.js +1 -1
  98. package/lib/components/grid-layout/util/network.js +10 -6
  99. package/lib/components/help-card/image/liaojie1.svg +50 -0
  100. package/lib/components/help-card/index.css +4 -4
  101. package/lib/components/help-card/index.js +1 -1
  102. package/lib/components/mblog/components/ConfirmPop.js +2 -2
  103. package/lib/components/mblog/components/MblogAction.js +2 -2
  104. package/lib/components/mblog/components/MblogContent.js +2 -2
  105. package/lib/components/mblog/index.js +2 -2
  106. package/lib/components/menus/components/menu-tree/index.js +1 -1
  107. package/lib/components/menus/components/menu-tree/tree-node/index.js +1 -1
  108. package/lib/components/menus/export-modules/appraisal-menus/menus.js +6 -0
  109. package/lib/components/nav-top/components/app-center/images/yuyue-award.png +0 -0
  110. package/lib/components/nav-top/components/app-center/images/yuyue.png +0 -0
  111. package/lib/components/nav-top/components/app-center/index.css +28 -6
  112. package/lib/components/nav-top/components/app-center/index.js +59 -5
  113. package/lib/components/nav-top/components/app-center/interface.js +19 -0
  114. package/lib/components/nav-top/components/menu/index.js +6 -2
  115. package/lib/components/nav-top/components/user-message/images/bell-1.svg +13 -0
  116. package/lib/components/nav-top/components/user-message/index.css +4 -4
  117. package/lib/components/nav-top/components/user-message/index.js +21 -21
  118. package/lib/components/nav-top/images/app-center.png +0 -0
  119. package/lib/components/nav-top/images/app-center.svg +21 -0
  120. package/lib/components/nav-top/images/home.svg +16 -0
  121. package/lib/components/nav-top/index.css +22 -6
  122. package/lib/components/nav-top/index.js +5 -5
  123. package/lib/components/okr-detail/auth.js +2 -2
  124. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +4 -2
  125. package/lib/components/okr-detail/components/ao-nice/index.js +6 -4
  126. package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +2 -2
  127. package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +2 -2
  128. package/lib/components/okr-detail/components/base-okr-type/object-type.js +2 -2
  129. package/lib/components/okr-detail/components/header/edit-name.js +4 -2
  130. package/lib/components/okr-detail/components/header/o-avatar.js +4 -2
  131. package/lib/components/okr-detail/components/header/o-classify.js +4 -2
  132. package/lib/components/okr-detail/components/header/o-score.js +1 -1
  133. package/lib/components/okr-detail/components/icon-text/index.js +1 -1
  134. package/lib/components/okr-detail/components/o-classify.js +4 -2
  135. package/lib/components/okr-detail/components/o-progress-update/index.js +4 -2
  136. package/lib/components/okr-detail/components/okr-tree/index.js +1 -1
  137. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +4 -2
  138. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +4 -2
  139. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +4 -2
  140. package/lib/components/okr-detail/components/okr-tree/tree-node/index.js +1 -1
  141. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +4 -2
  142. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +2 -2
  143. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +3 -3
  144. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +4 -2
  145. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +8 -6
  146. package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +4 -2
  147. package/lib/components/okr-detail/detail-footer/index.js +4 -2
  148. package/lib/components/okr-detail/detail-header/index.js +12 -10
  149. package/lib/components/okr-detail/okr-list/index.js +4 -2
  150. package/lib/components/okr-detail/request-apis.js +6 -2
  151. package/lib/components/okr-flow/child-node/fields/creator.js +4 -2
  152. package/lib/components/okr-flow/child-node/work-node.js +4 -2
  153. package/lib/components/okr-flow/export-modal/index.js +4 -12
  154. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +10 -8
  155. package/lib/components/okr-flow/request-apis.js +6 -2
  156. package/lib/components/okr-flow/root-node/index.js +4 -2
  157. package/lib/components/okr-progress/components/o-progress-update/index.js +4 -2
  158. package/lib/components/okr-progress-modal/index.js +4 -2
  159. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +6 -4
  160. package/lib/components/okr-review/ReviewPop/components/Toast/index.js +2 -2
  161. package/lib/components/okr-review/ReviewPop/index.js +2 -2
  162. package/lib/components/okr-review/components/ReviewItem/index.js +2 -2
  163. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +2 -2
  164. package/lib/components/okr-review/index.js +2 -2
  165. package/lib/components/okr-share/common-painter/darwAvatar.js +8 -4
  166. package/lib/components/okr-share/common-painter/openDataPainter.js +6 -2
  167. package/lib/components/okr-share/common-painter/utils.js +8 -4
  168. package/lib/components/okr-share/pink-card/drawDepartmentName.js +6 -2
  169. package/lib/components/okr-share/pink-card/drawKrs.js +6 -2
  170. package/lib/components/okr-share/pink-card/drawQuote.js +6 -2
  171. package/lib/components/okr-share/pink-card/drawUserName.js +6 -2
  172. package/lib/components/okr-share/pink-card/index.js +6 -2
  173. package/lib/components/okr-share/publishMblog.js +4 -2
  174. package/lib/components/okr-share/shareCardSelector.js +6 -4
  175. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
  176. package/lib/components/okrcase-library/server/network.js +24 -20
  177. package/lib/components/open-data-painter/index.js +6 -2
  178. package/lib/components/operation-records/OperationRecordItem.js +2 -2
  179. package/lib/components/operation-records/index.js +2 -2
  180. package/lib/components/order-have-award/img/award.png +0 -0
  181. package/lib/components/order-have-award/index.css +5 -0
  182. package/lib/components/order-have-award/index.js +83 -0
  183. package/lib/components/order-have-award/interface.js +19 -0
  184. package/lib/components/pagination/pagination.js +1 -1
  185. package/lib/components/period-selector/components/button/index.js +1 -1
  186. package/lib/components/period-selector/helper/index.js +6 -2
  187. package/lib/components/picker/components/panels/date-panel/index.js +1 -1
  188. package/lib/components/picker/components/panels/month-panel/index.js +1 -1
  189. package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
  190. package/lib/components/picker/components/panels/year-panel/index.js +1 -1
  191. package/lib/components/picker/components/panels/year-panel/year-head.js +1 -1
  192. package/lib/components/picker/picker.js +1 -1
  193. package/lib/components/point-demo/drop-down-box/index.js +1 -1
  194. package/lib/components/point-demo/input/index.js +3 -3
  195. package/lib/components/point-demo/popup/index.js +1 -1
  196. package/lib/components/popup/index.js +1 -1
  197. package/lib/components/praise-record/PraiseRecordItem.js +2 -2
  198. package/lib/components/praise-record/index.js +2 -2
  199. package/lib/components/range-picker-pop/index.js +3 -3
  200. package/lib/components/range-selector-pop/RangeList.js +2 -2
  201. package/lib/components/range-selector-pop/RangeSelectorPop.js +2 -2
  202. package/lib/components/rich-editor/models/schema.js +2 -2
  203. package/lib/components/rich-editor/plugins/block/block-quote/index.js +2 -2
  204. package/lib/components/rich-editor/plugins/block/heading/index.js +2 -2
  205. package/lib/components/rich-editor/plugins/block/lists/index.js +2 -2
  206. package/lib/components/rich-editor/plugins/block/paragraph/index.js +2 -2
  207. package/lib/components/rich-editor/plugins/core/index.js +2 -2
  208. package/lib/components/rich-editor/plugins/extension/alignment/index.js +2 -2
  209. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +2 -2
  210. package/lib/components/rich-editor/plugins/inline/color/index.js +2 -2
  211. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +2 -2
  212. package/lib/components/rich-editor/plugins/inline/em/index.js +2 -2
  213. package/lib/components/rich-editor/plugins/inline/link/index.js +2 -2
  214. package/lib/components/rich-editor/plugins/inline/strong/index.js +2 -2
  215. package/lib/components/rich-editor/plugins/inline/under-line/index.js +2 -2
  216. package/lib/components/rich-editor/react/reactNodeView.js +4 -4
  217. package/lib/components/rich-editor/react/uiProvider.js +2 -2
  218. package/lib/components/rich-editor/ui/Popup/index.js +2 -2
  219. package/lib/components/scroll-container/index.js +2 -2
  220. package/lib/components/scrollbar/index.js +1 -1
  221. package/lib/components/scrollbar/scroll-mask/index.js +1 -1
  222. package/lib/components/scrollbar/simplebar-react.js +1 -1
  223. package/lib/components/search-dropdown/index.js +1 -1
  224. package/lib/components/select/Option.js +3 -3
  225. package/lib/components/select/index.js +3 -3
  226. package/lib/components/select-layer/index.js +1 -1
  227. package/lib/components/select-tags/index.js +1 -1
  228. package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +6 -2
  229. package/lib/components/superset-charts/fetch-assets-and-append/index.js +8 -4
  230. package/lib/components/survey-model/request-api.js +6 -2
  231. package/lib/components/switch/index.js +1 -1
  232. package/lib/components/table/index.js +1 -1
  233. package/lib/components/tabs/index.js +1 -1
  234. package/lib/components/task-relation-modal/index.js +7 -5
  235. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +1 -1
  236. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +1 -1
  237. package/lib/components/task-relation-modal/tree/category-tree/index.js +4 -2
  238. package/lib/components/task-relation-modal/tree/okr-tree/index.js +4 -2
  239. package/lib/components/task-relation-modal/tree/work-tree/index.js +4 -2
  240. package/lib/components/task-relation-modal/tree-node/index.js +1 -1
  241. package/lib/components/task-relation-modal/work-relation/index.js +7 -5
  242. package/lib/components/task-tree/task-item-node/e-project.js +4 -2
  243. package/lib/components/task-tree/task-item-node/e-task.js +4 -2
  244. package/lib/components/task-tree/task-item-node/task-node-render.js +1 -1
  245. package/lib/components/task-tree/task-tree.js +1 -1
  246. package/lib/components/textarea/index.js +1 -1
  247. package/lib/components/time-picker/time-picker-selector.js +1 -1
  248. package/lib/components/time-picker/time-picker.js +1 -1
  249. package/lib/components/time-picker/timer-picker-input.js +1 -1
  250. package/lib/components/tita-chart/charts/liquid-ball.js +1 -1
  251. package/lib/components/tita-chart/charts/pie.js +1 -1
  252. package/lib/components/tita-chart/errorBoundary/index.js +2 -2
  253. package/lib/components/toast/index.js +12 -8
  254. package/lib/components/tooltip/error-tip.js +1 -1
  255. package/lib/components/tooltip/tooltip.js +1 -1
  256. package/lib/components/tree/index.js +1 -1
  257. package/lib/components/upload/components/uploadedPreview.js +2 -2
  258. package/lib/components/upload/index.js +2 -2
  259. package/lib/components/upvote/index.js +7 -5
  260. package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.js +1 -1
  261. package/lib/components/user-selector/select-tree/choose-tree/index.js +1 -1
  262. package/lib/components/user-selector/select-tree/selected-tree/index.js +1 -1
  263. package/lib/components/version-change-modal/index.js +6 -4
  264. package/lib/components/version-change-modal/request-api.js +6 -2
  265. package/lib/components/viewer/ImageListRender.js +2 -2
  266. package/lib/components/viewer/index.js +2 -2
  267. package/lib/components/weekly-report/card.js +4 -12
  268. package/lib/components/weekly-report/common-painter/darwAvatar.js +10 -6
  269. package/lib/components/weekly-report/common-painter/drawName.js +6 -2
  270. package/lib/components/weekly-report/common-painter/openDataPainter.js +6 -2
  271. package/lib/components/weekly-report/index.js +6 -4
  272. package/lib/components-v1/animate/AnimateChild.js +2 -2
  273. package/lib/components-v1/animate/animate.js +2 -2
  274. package/lib/components-v1/avatar/index.js +2 -2
  275. package/lib/components-v1/buttonv2/ButtonOutlined.js +2 -2
  276. package/lib/components-v1/buttonv2/ButtonRounded.js +2 -2
  277. package/lib/components-v1/buttonv2/DefaultButton.js +2 -2
  278. package/lib/components-v1/confirm/index.js +2 -2
  279. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +2 -2
  280. package/lib/components-v1/dropDownSelector/dropDownSelector.js +2 -2
  281. package/lib/components-v1/input/Input.js +3 -3
  282. package/lib/components-v1/input/InputNumber.js +2 -2
  283. package/lib/components-v1/placement/placement.js +2 -2
  284. package/lib/components-v1/placement/placementInner.js +2 -2
  285. package/lib/components-v1/pop/Pop.js +2 -2
  286. package/lib/components-v1/pop/PopInner.js +2 -2
  287. package/lib/components-v1/portals/Portals.js +2 -2
  288. package/lib/components-v1/progress/CircleProgress.js +2 -2
  289. package/lib/components-v1/progress/LineProgress.js +2 -2
  290. package/lib/components-v1/progress/index.js +2 -2
  291. package/lib/components-v1/radio/radio.js +2 -2
  292. package/lib/components-v1/radio/radioGroup.js +2 -2
  293. package/lib/components-v1/search/index.js +2 -2
  294. package/lib/components-v1/select/Option.js +3 -3
  295. package/lib/components-v1/select/index.js +3 -3
  296. package/lib/components-v1/tabs/index.js +2 -2
  297. package/lib/components-v1/textarea/index.js +2 -2
  298. package/lib/components-v1/transition/index.js +2 -2
  299. package/lib/components-v1/userSelector/UserSelectorPop.js +2 -2
  300. package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +2 -2
  301. package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +2 -2
  302. package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +2 -2
  303. package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +2 -2
  304. package/lib/components-v1/userSelector/components/MultiMode/index.js +2 -2
  305. package/lib/components-v1/userSelector/components/SearchBar.js +2 -2
  306. package/lib/components-v1/userSelector/components/SingleMode.js +2 -2
  307. package/lib/components-v1/userSelector/components/UserItem.js +2 -2
  308. package/lib/components-v1/userSelector/index.js +2 -2
  309. package/lib/pages/aha2021/index.css +7 -0
  310. package/lib/pages/aha2021/index.js +10 -4
  311. package/lib/pages/aha2021/new-menu-switcher/index.css +5 -1
  312. package/lib/pages/aha2021/new-menu-switcher/index.js +9 -5
  313. package/lib/pages/appointment-demo/drop-down-box/index.js +1 -1
  314. package/lib/pages/appointment-demo/input/index.js +3 -3
  315. package/lib/pages/appointment-demo/popup/index.js +1 -1
  316. package/lib/pages/group-management/components/input-form/index.js +3 -3
  317. package/lib/pages/group-management/components/radio/index.js +1 -1
  318. package/lib/pages/group-management/groupInterface.js +6 -2
  319. package/lib/pages/group-management/page-view/importGroupStaff/index.js +1 -1
  320. package/lib/pages/group-management/tree/index.js +1 -1
  321. package/lib/pages/new-okr-list/request-api.js +18 -14
  322. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +5 -3
  323. package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +1 -1
  324. package/lib/pages/okr-map/request-apis.js +6 -2
  325. package/lib/pages/okr-map/share-dialog/index.js +1 -1
  326. package/lib/utils/auth.js +2 -2
  327. package/lib/utils/open-data.js +6 -4
  328. package/lib/utils/request-v1.js +6 -2
  329. package/lib/utils/request.js +6 -2
  330. package/package.json +1 -1
@@ -0,0 +1,372 @@
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 _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _input = _interopRequireDefault(require("../input"));
15
+
16
+ var _utils = require("../../../../utils");
17
+
18
+ var _checkbox = _interopRequireDefault(require("../../../../../checkbox"));
19
+
20
+ var _dropSelect = _interopRequireDefault(require("../drop-select"));
21
+
22
+ var _verifyCode = _interopRequireDefault(require("../verify-code"));
23
+
24
+ var _checkbox2 = _interopRequireDefault(require("../checkbox"));
25
+
26
+ var _phone = _interopRequireDefault(require("../phone"));
27
+
28
+ var _toast = _interopRequireDefault(require("../../../../../toast"));
29
+
30
+ var _constant = require("../../../../constant");
31
+
32
+ var _scrollbar = _interopRequireDefault(require("../../../../../scrollbar"));
33
+
34
+ var _conditionRender = _interopRequireDefault(require("../../../../../condition-render"));
35
+
36
+ var _request = require("../../../../request");
37
+
38
+ require("./index.css");
39
+
40
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
41
+
42
+ 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); }
43
+
44
+ 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; }
45
+
46
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
47
+
48
+ 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; }
49
+
50
+ 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; }
51
+
52
+ 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; }
53
+
54
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
55
+
56
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
57
+
58
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
59
+
60
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
61
+
62
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
63
+
64
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
65
+
66
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
67
+
68
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
69
+
70
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
71
+
72
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
73
+
74
+ var preCls = "titaui-book-demo-pc-content";
75
+ var uname = window.BSGlobal && window.BSGlobal.loginUserInfo.Name || "";
76
+ var uid = window.BSGlobal && window.BSGlobal.tenantInfo.Id || "";
77
+ var Source = window.BSGlobal && window.BSGlobal.tenantInfo.Source || (0, _utils.getSource)();
78
+ var lname = window.BSGlobal && window.BSGlobal.loginUserInfo.Name || "";
79
+ var lmobile = window.BSGlobal && window.BSGlobal.loginUserInfo.Mobile || "";
80
+ var lcompany = window.BSGlobal && window.BSGlobal.tenantInfo.Name || "";
81
+
82
+ var BookDemoPCContent = function BookDemoPCContent(_ref) {
83
+ var type = _ref.type,
84
+ onSubmitSuccess = _ref.onSubmitSuccess,
85
+ _ref$source = _ref.source,
86
+ source = _ref$source === void 0 ? 0 : _ref$source,
87
+ onChange = _ref.onChange;
88
+
89
+ var _useState = (0, _react.useState)((0, _utils.getTypeData)(type)),
90
+ _useState2 = _slicedToArray(_useState, 2),
91
+ data = _useState2[0],
92
+ setData = _useState2[1];
93
+
94
+ var _useState3 = (0, _react.useState)(false),
95
+ _useState4 = _slicedToArray(_useState3, 2),
96
+ isFormOverflow = _useState4[0],
97
+ setIsFormOverflow = _useState4[1];
98
+
99
+ var _useState5 = (0, _react.useState)(false),
100
+ _useState6 = _slicedToArray(_useState5, 2),
101
+ isAggrePrivacy = _useState6[0],
102
+ setIsAggrePrivacy = _useState6[1];
103
+
104
+ var _useState7 = (0, _react.useState)(true),
105
+ _useState8 = _slicedToArray(_useState7, 2),
106
+ hasErr = _useState8[0],
107
+ setHasErr = _useState8[1];
108
+
109
+ var _useState9 = (0, _react.useState)(false),
110
+ _useState10 = _slicedToArray(_useState9, 2),
111
+ isLoading = _useState10[0],
112
+ setIsLoading = _useState10[1];
113
+
114
+ var _useState11 = (0, _react.useState)([]),
115
+ _useState12 = _slicedToArray(_useState11, 2),
116
+ result = _useState12[0],
117
+ setResult = _useState12[1];
118
+
119
+ var formRef = (0, _react.useRef)(document.createElement("div"));
120
+
121
+ var handleChangeAggrePrivacyValue = function handleChangeAggrePrivacyValue(value) {
122
+ setIsAggrePrivacy(value);
123
+ };
124
+
125
+ var handleValueChange = function handleValueChange(name, id, value, hasError, other) {
126
+ var index = result.findIndex(function (item) {
127
+ return item.name === name;
128
+ });
129
+ result[index].value = value;
130
+ result[index].hasErr = hasError;
131
+
132
+ if (id === "verificationCode") {
133
+ result[index].yzmGuid = other.yzmGuid;
134
+ result[index].handelChangeImage = other.handelChangeImage;
135
+ }
136
+
137
+ setResult(_toConsumableArray(result));
138
+
139
+ if (onChange) {
140
+ onChange(result);
141
+ }
142
+ };
143
+
144
+ var emptyFun = function emptyFun() {};
145
+
146
+ var handleCommit = function handleCommit() {
147
+ if (hasErr || isLoading) return;
148
+ setIsLoading(true);
149
+ var verificationData = result.filter(function (item) {
150
+ return item.type === "verificationCode";
151
+ })[0];
152
+ var yzmGuidVal = verificationData.yzmGuid || "";
153
+ var handelChangeImage = verificationData.handelChangeImage || emptyFun;
154
+ var setErrMsg = verificationData.setErrMsg || emptyFun;
155
+ var content = uid ? "\u79DF\u6237ID\uFF1A".concat(uid, "\uFF0C\u79DF\u6237\u8D26\u53F7\u540D\u79F0\uFF1A").concat(uname, ",") : "";
156
+ result.forEach(function (item) {
157
+ if (typeof item.value === "string") {
158
+ content += "".concat(item.name, ": ").concat(item.value, ",");
159
+ } else {
160
+ var tempValue = "";
161
+ Object.values(item.value).forEach(function (value) {
162
+ if (value.isSelected) {
163
+ tempValue += "".concat(value.text, ",");
164
+ }
165
+ });
166
+ tempValue = tempValue.slice(0, tempValue.length - 1);
167
+ content += "".concat(item.name, ": ").concat(tempValue, ",");
168
+ }
169
+ });
170
+ content = content.slice(0, content.length - 1);
171
+ (0, _request.sendEmailBookDemo)({
172
+ title: "预约演示",
173
+ content: "".concat(content, " @fromNew."),
174
+ code: verificationData.value,
175
+ yzmGuidVal: yzmGuidVal.indexOf("?") !== -1 ? yzmGuidVal.slice(0, yzmGuidVal.indexOf("?")) : yzmGuidVal,
176
+ source: source > 0 ? source : Source
177
+ }).then(function (res) {
178
+ if (res.data.Code) {
179
+ (0, _request.sendBookDemoJson)((0, _utils.bookDemoTransformDataToJson)(result, source > 0 ? source : Source, _constant.DemoTypeTextMap[type], content));
180
+
181
+ _toast["default"].Success("提交成功", {
182
+ style: {
183
+ position: "fixed"
184
+ },
185
+ canClose: false
186
+ });
187
+
188
+ if (onSubmitSuccess) {
189
+ onSubmitSuccess();
190
+ }
191
+
192
+ localStorage.setItem("isSubmitted", "1");
193
+ var trickerContent = _constant.trackerInfo[type];
194
+
195
+ if (window.titaTracker && !localStorage.getItem("titaccc")) {
196
+ window.titaTracker("action").record(_objectSpread({
197
+ actionName: "提交预约演示",
198
+ productName: "预约演示"
199
+ }, trickerContent));
200
+ }
201
+ } else {
202
+ setErrMsg(res.data.Message);
203
+
204
+ _toast["default"].Warning(res.data.Message, {
205
+ style: {
206
+ position: "fixed"
207
+ },
208
+ canClose: false
209
+ });
210
+ }
211
+
212
+ handelChangeImage();
213
+ })["catch"](function (error) {
214
+ _toast["default"].Error(error, {
215
+ style: {
216
+ position: "fixed"
217
+ },
218
+ canClose: false
219
+ });
220
+ })["finally"](function () {
221
+ setIsLoading(false);
222
+ });
223
+ };
224
+
225
+ var renderItem = function renderItem(item) {
226
+ switch (item.type) {
227
+ case "text":
228
+ return /*#__PURE__*/_react["default"].createElement(_input["default"], _extends({}, item, {
229
+ onChange: handleValueChange
230
+ }));
231
+
232
+ case "phone":
233
+ return /*#__PURE__*/_react["default"].createElement(_phone["default"], _extends({}, item, {
234
+ onChange: handleValueChange
235
+ }));
236
+
237
+ case "dropSelect":
238
+ return /*#__PURE__*/_react["default"].createElement(_dropSelect["default"], _extends({}, item, {
239
+ onChange: handleValueChange
240
+ }));
241
+
242
+ case "checkbox":
243
+ return /*#__PURE__*/_react["default"].createElement(_checkbox2["default"], _extends({}, item, {
244
+ onChange: handleValueChange
245
+ }));
246
+
247
+ case "verificationCode":
248
+ return /*#__PURE__*/_react["default"].createElement(_verifyCode["default"], _extends({}, item, {
249
+ onChange: handleValueChange
250
+ }));
251
+
252
+ default:
253
+ return /*#__PURE__*/_react["default"].createElement("span", null);
254
+ }
255
+ };
256
+
257
+ (0, _react.useEffect)(function () {
258
+ var resultHasErr = !isAggrePrivacy || result.filter(function (item) {
259
+ return item.required && item.hasErr;
260
+ }).length > 0;
261
+ setHasErr(resultHasErr);
262
+ }, [result, isAggrePrivacy]);
263
+ (0, _react.useEffect)(function () {
264
+ setTimeout(function () {
265
+ if (formRef.current.offsetHeight > 366) {
266
+ setIsFormOverflow(true);
267
+ }
268
+ }, 0);
269
+ var formField = data.formField.map(function (item) {
270
+ if (item.id === "username") {
271
+ return _objectSpread(_objectSpread({}, item), {}, {
272
+ value: lname,
273
+ hasErr: !lname
274
+ });
275
+ }
276
+
277
+ if (item.id === "phone") {
278
+ return _objectSpread(_objectSpread({}, item), {}, {
279
+ value: lmobile,
280
+ hasErr: !lmobile
281
+ });
282
+ }
283
+
284
+ if (item.id === "tenantName") {
285
+ return _objectSpread(_objectSpread({}, item), {}, {
286
+ value: lcompany,
287
+ hasErr: !lcompany
288
+ });
289
+ }
290
+
291
+ return item;
292
+ });
293
+ data.formField = formField;
294
+ setData(_objectSpread({}, data));
295
+ setResult(formField.map(function (item) {
296
+ return {
297
+ name: item.name,
298
+ value: item.type === "dropSelect" ? item.option[0].text : item.value,
299
+ id: item.id,
300
+ hasErr: !(item.value || item.type === "dropSelect"),
301
+ required: item.required,
302
+ type: item.type,
303
+ multiSelect: item.multiSelect
304
+ };
305
+ }));
306
+ var trickerContent = _constant.trackerInfo[type];
307
+
308
+ if (window.titaTracker && !localStorage.getItem("titaccc")) {
309
+ window.titaTracker("action").record({
310
+ actionName: "点开预约演示",
311
+ productName: "预约演示",
312
+ actionGroup: trickerContent.actionGroup
313
+ });
314
+ }
315
+ }, []);
316
+ return /*#__PURE__*/_react["default"].createElement("div", {
317
+ className: preCls
318
+ }, /*#__PURE__*/_react["default"].createElement("div", {
319
+ className: "".concat(preCls, "__left")
320
+ }, /*#__PURE__*/_react["default"].createElement("div", {
321
+ className: "".concat(preCls, "__left__bg")
322
+ }, /*#__PURE__*/_react["default"].createElement("div", {
323
+ className: "".concat(preCls, "__left-title")
324
+ }, data.title), /*#__PURE__*/_react["default"].createElement("div", {
325
+ className: "".concat(preCls, "__left-desc")
326
+ }, data.desc))), /*#__PURE__*/_react["default"].createElement("div", {
327
+ className: "".concat(preCls, "__right")
328
+ }, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
329
+ style: {
330
+ maxHeight: "366px"
331
+ }
332
+ }, /*#__PURE__*/_react["default"].createElement("div", {
333
+ className: (0, _classnames["default"])("".concat(preCls, "__right-form")),
334
+ ref: formRef
335
+ }, data.formField.map(function (item) {
336
+ return renderItem(item);
337
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
338
+ className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__right-commit--shadow"), isFormOverflow))
339
+ }), /*#__PURE__*/_react["default"].createElement("div", {
340
+ className: (0, _classnames["default"])("".concat(preCls, "__right-commit"))
341
+ }, /*#__PURE__*/_react["default"].createElement("button", {
342
+ type: "button",
343
+ className: (0, _classnames["default"])("".concat(preCls, "__right-commit-btn"), _defineProperty({}, "".concat(preCls, "__right-commit-btn--disabled"), hasErr || isLoading)),
344
+ onClick: handleCommit
345
+ }, "\u63D0\u4EA4", /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
346
+ condition: isLoading
347
+ }, /*#__PURE__*/_react["default"].createElement("span", null, "\u4E2D\u3002\u3002\u3002"))), /*#__PURE__*/_react["default"].createElement("div", {
348
+ className: "".concat(preCls, "__privacy")
349
+ }, /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
350
+ onChange: handleChangeAggrePrivacyValue
351
+ }), /*#__PURE__*/_react["default"].createElement("span", {
352
+ className: "".concat(preCls, "__privacy-aggre")
353
+ }, "\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F "), /*#__PURE__*/_react["default"].createElement("a", {
354
+ href: "https://okr.tita.com/#/privacy",
355
+ target: "_blank",
356
+ className: "".concat(preCls, "__privacy-link"),
357
+ rel: "noreferrer"
358
+ }, "\u300A\u9690\u79C1\u653F\u7B56\u300B"), "\u548C", /*#__PURE__*/_react["default"].createElement("a", {
359
+ target: "_blank",
360
+ className: "".concat(preCls, "__privacy-link"),
361
+ href: "https://okr.tita.com/#/userAgreement",
362
+ rel: "noreferrer"
363
+ }, "\u300A\u7528\u6237\u670D\u52A1\u534F\u8BAE\u300B")))));
364
+ };
365
+
366
+ BookDemoPCContent.defaultProps = {
367
+ source: 0,
368
+ onChange: function onChange() {},
369
+ onSubmitSuccess: function onSubmitSuccess() {}
370
+ };
371
+ var _default = BookDemoPCContent;
372
+ exports["default"] = _default;
@@ -0,0 +1,41 @@
1
+ .titaui-book-demo-drop-select {
2
+ display: flex;
3
+ word-break: keep-all;
4
+ border-bottom: 1px solid #e9ecf0;
5
+ position: relative;
6
+ padding-bottom: 5px;
7
+ }
8
+
9
+ .titaui-book-demo-drop-select--full-row {
10
+ grid-column-start: 1;
11
+ grid-column-end: 3;
12
+ }
13
+
14
+ .titaui-book-demo-drop-select__name {
15
+ font-size: 14px;
16
+ color: #89919f;
17
+ line-height: 22px;
18
+ white-space: nowrap;
19
+ }
20
+
21
+ .titaui-book-demo-drop-select__name--required::after {
22
+ content: '*';
23
+ display: inline-block;
24
+ color: #f05e5e;
25
+ }
26
+
27
+ .titaui-book-demo-drop-select__value {
28
+ display: inline-flex;
29
+ justify-content: space-between;
30
+ cursor: pointer;
31
+ width: calc(100% - 4px);
32
+ padding-left: 8px;
33
+ font-size: 14px;
34
+ color: #3f4755;
35
+ line-height: 22px;
36
+ }
37
+
38
+ .titaui-book-demo-drop-select__value-down {
39
+ width: 10px;
40
+ align-self: center;
41
+ }
@@ -0,0 +1,86 @@
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 _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _dropSelector = _interopRequireWildcard(require("../../../../../drop-selector"));
15
+
16
+ var _demoDown = _interopRequireDefault(require("../../../../img/demo-down.svg"));
17
+
18
+ require("./index.css");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ 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); }
23
+
24
+ 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; }
25
+
26
+ 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; }
27
+
28
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
29
+
30
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
31
+
32
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
33
+
34
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
35
+
36
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
37
+
38
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
+
40
+ var preCls = "titaui-book-demo-drop-select";
41
+
42
+ var BookDemoDropSelect = function BookDemoDropSelect(_ref) {
43
+ var name = _ref.name,
44
+ id = _ref.id,
45
+ required = _ref.required,
46
+ halfWidth = _ref.halfWidth,
47
+ option = _ref.option,
48
+ onChange = _ref.onChange;
49
+
50
+ var _useState = (0, _react.useState)(option[0].value),
51
+ _useState2 = _slicedToArray(_useState, 2),
52
+ value = _useState2[0],
53
+ setValue = _useState2[1];
54
+
55
+ var handleChangeInputValue = function handleChangeInputValue(val) {
56
+ setValue(val);
57
+
58
+ if (onChange) {
59
+ onChange(name, id, val, false);
60
+ }
61
+ };
62
+
63
+ return /*#__PURE__*/_react["default"].createElement("div", {
64
+ className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "--full-row"), !halfWidth))
65
+ }, /*#__PURE__*/_react["default"].createElement("span", {
66
+ className: (0, _classnames["default"])("".concat(preCls, "__name"), _defineProperty({}, "".concat(preCls, "__name--required"), required))
67
+ }, name), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
68
+ popupPlacement: "bottomLeft",
69
+ onChange: handleChangeInputValue,
70
+ limitHeight: false,
71
+ trigger: /*#__PURE__*/_react["default"].createElement("span", {
72
+ className: "".concat(preCls, "__value")
73
+ }, value, /*#__PURE__*/_react["default"].createElement("img", {
74
+ alt: "",
75
+ src: _demoDown["default"],
76
+ className: (0, _classnames["default"])("".concat(preCls, "__value-down"))
77
+ }))
78
+ }, option.map(function (item) {
79
+ return /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
80
+ name: item.value
81
+ }, item.text);
82
+ })));
83
+ };
84
+
85
+ var _default = BookDemoDropSelect;
86
+ exports["default"] = _default;
@@ -0,0 +1,6 @@
1
+ .titaui-book-demo-error {
2
+ position: absolute;
3
+ color: #f05e5e;
4
+ font-size: 12px;
5
+ bottom: -20px;
6
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ require("./index.css");
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+
14
+ var preCls = "titaui-book-demo-error";
15
+
16
+ var ErrorInfo = function ErrorInfo(_ref) {
17
+ var errMsg = _ref.errMsg;
18
+ return /*#__PURE__*/_react["default"].createElement("span", {
19
+ className: preCls
20
+ }, errMsg);
21
+ };
22
+
23
+ var _default = ErrorInfo;
24
+ exports["default"] = _default;
@@ -0,0 +1,56 @@
1
+ .titaui-book-demo-input {
2
+ display: flex;
3
+ word-break: keep-all;
4
+ border-bottom: 1px solid #e9ecf0;
5
+ position: relative;
6
+ padding-bottom: 5px;
7
+ }
8
+
9
+ .titaui-book-demo-input--error {
10
+ border-bottom: 1px solid #f05e5e;
11
+ }
12
+
13
+ .titaui-book-demo-input--full-row {
14
+ grid-column-start: 1;
15
+ grid-column-end: 3;
16
+ }
17
+
18
+ .titaui-book-demo-input__name {
19
+ font-size: 14px;
20
+ color: #89919f;
21
+ line-height: 22px;
22
+ white-space: nowrap;
23
+ }
24
+
25
+ .titaui-book-demo-input__name--required::after {
26
+ content: '*';
27
+ display: inline-block;
28
+ color: #f05e5e;
29
+ }
30
+
31
+ .titaui-book-demo-input__input {
32
+ border: none;
33
+ outline: none;
34
+ padding-left: 8px;
35
+ font-size: 14px;
36
+ color: #3f4755;
37
+ line-height: 22px;
38
+ box-sizing: border-box;
39
+ flex: 1;
40
+ }
41
+
42
+ .titaui-book-demo-input__input--half {
43
+ width: 110px;
44
+ }
45
+
46
+ .titaui-book-demo-input__input ::-webkit-input-placeholder {
47
+ color: #bfc7d5;
48
+ }
49
+
50
+ .titaui-book-demo-input__input :-ms-input-placeholder {
51
+ color: #bfc7d5;
52
+ }
53
+
54
+ .titaui-book-demo-input__input :-moz-input-placeholder {
55
+ color: #bfc7d5;
56
+ }