ods-component-lib 1.21.2 → 1.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/dist/components/antd/currencyInput/CurrencySelect.js +16 -11
  2. package/dist/components/antd/currencyInput/CurrencySelect.js.map +1 -1
  3. package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.js +32 -43
  4. package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.js.map +1 -1
  5. package/dist/components/devextreme/OdsDataGrid.Legacy.js +4 -4
  6. package/dist/components/devextreme/OdsRemoteDataGrid.js +1 -1
  7. package/dist/index.js +10 -10
  8. package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js +6 -6
  9. package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js.map +1 -1
  10. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js +20 -20
  11. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js.map +1 -1
  12. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js.map +1 -1
  13. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js +101 -98
  14. package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js.map +1 -1
  15. package/dist/node_modules/@ant-design/cssinjs/es/linters/utils.js +1 -1
  16. package/dist/node_modules/@ant-design/cssinjs/es/util/index.js +29 -27
  17. package/dist/node_modules/@ant-design/cssinjs/es/util/index.js.map +1 -1
  18. package/dist/node_modules/@ant-design/cssinjs-utils/es/util/getComponentToken.js +1 -1
  19. package/dist/node_modules/@ant-design/fast-color/es/FastColor.js +66 -45
  20. package/dist/node_modules/@ant-design/fast-color/es/FastColor.js.map +1 -1
  21. package/dist/node_modules/@ant-design/icons/es/icons/FrownOutlined.js +5 -8
  22. package/dist/node_modules/@ant-design/icons/es/icons/HeartOutlined.js +3 -6
  23. package/dist/node_modules/@ant-design/icons/es/icons/MehOutlined.js +12 -15
  24. package/dist/node_modules/@ant-design/icons/es/icons/SmileOutlined.js +8 -11
  25. package/dist/node_modules/@ant-design/icons/es/utils.js +2 -9
  26. package/dist/node_modules/@ant-design/icons/es/utils.js.map +1 -1
  27. package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js +1 -9
  28. package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js.map +1 -1
  29. package/dist/node_modules/@rc-component/async-validator/es/index.js +20 -20
  30. package/dist/node_modules/@rc-component/async-validator/es/index.js.map +1 -1
  31. package/dist/node_modules/@rc-component/async-validator/es/messages.js +1 -0
  32. package/dist/node_modules/@rc-component/async-validator/es/messages.js.map +1 -1
  33. package/dist/node_modules/@rc-component/async-validator/es/rule/type.js +18 -8
  34. package/dist/node_modules/@rc-component/async-validator/es/rule/type.js.map +1 -1
  35. package/dist/node_modules/@rc-component/async-validator/es/util.js +1 -1
  36. package/dist/node_modules/@rc-component/async-validator/es/util.js.map +1 -1
  37. package/dist/node_modules/@rc-component/async-validator/es/validator/index.js +1 -0
  38. package/dist/node_modules/@rc-component/async-validator/es/validator/index.js.map +1 -1
  39. package/dist/node_modules/@rc-component/collapse/es/Collapse.js +1 -1
  40. package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js +88 -68
  41. package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js.map +1 -1
  42. package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js +75 -96
  43. package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js.map +1 -1
  44. package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js +22 -20
  45. package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js.map +1 -1
  46. package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js +92 -100
  47. package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js.map +1 -1
  48. package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js +40 -29
  49. package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js.map +1 -1
  50. package/dist/node_modules/@rc-component/dropdown/es/Dropdown.js +2 -2
  51. package/dist/node_modules/@rc-component/form/es/Field.js +9 -9
  52. package/dist/node_modules/@rc-component/form/es/FieldContext.js +2 -3
  53. package/dist/node_modules/@rc-component/form/es/FieldContext.js.map +1 -1
  54. package/dist/node_modules/@rc-component/form/es/Form.js +78 -92
  55. package/dist/node_modules/@rc-component/form/es/Form.js.map +1 -1
  56. package/dist/node_modules/@rc-component/form/es/List.js +1 -1
  57. package/dist/node_modules/@rc-component/form/es/{useForm.js → hooks/useForm.js} +136 -143
  58. package/dist/node_modules/@rc-component/form/es/hooks/useForm.js.map +1 -0
  59. package/dist/node_modules/@rc-component/form/es/hooks/useNotifyWatch.js +43 -0
  60. package/dist/node_modules/@rc-component/form/es/hooks/useNotifyWatch.js.map +1 -0
  61. package/dist/node_modules/@rc-component/form/es/{useWatch.js → hooks/useWatch.js} +7 -7
  62. package/dist/node_modules/@rc-component/form/es/hooks/useWatch.js.map +1 -0
  63. package/dist/node_modules/@rc-component/form/es/index.js +2 -2
  64. package/dist/node_modules/@rc-component/form/es/index.js.map +1 -1
  65. package/dist/node_modules/@rc-component/form/es/utils/NameMap.js +28 -22
  66. package/dist/node_modules/@rc-component/form/es/utils/NameMap.js.map +1 -1
  67. package/dist/node_modules/@rc-component/form/es/utils/messages.js +1 -0
  68. package/dist/node_modules/@rc-component/form/es/utils/messages.js.map +1 -1
  69. package/dist/node_modules/@rc-component/form/es/utils/validateUtil.js +1 -1
  70. package/dist/node_modules/@rc-component/form/es/utils/valueUtil.js.map +1 -1
  71. package/dist/node_modules/@rc-component/image/es/Preview/index.js +111 -105
  72. package/dist/node_modules/@rc-component/image/es/Preview/index.js.map +1 -1
  73. package/dist/node_modules/@rc-component/input-number/es/hooks/useCursor.js +1 -1
  74. package/dist/node_modules/@rc-component/menu/es/Menu.js +1 -1
  75. package/dist/node_modules/@rc-component/menu/es/MenuItem.js +1 -1
  76. package/dist/node_modules/@rc-component/menu/es/SubMenu/index.js +1 -1
  77. package/dist/node_modules/@rc-component/menu/es/hooks/useKeyRecords.js +1 -1
  78. package/dist/node_modules/@rc-component/menu/es/placements.js +0 -1
  79. package/dist/node_modules/@rc-component/menu/es/utils/warnUtil.js +1 -1
  80. package/dist/node_modules/@rc-component/pagination/es/Pagination.js +1 -1
  81. package/dist/node_modules/@rc-component/picker/es/PickerInput/RangePicker.js +1 -1
  82. package/dist/node_modules/@rc-component/picker/es/PickerInput/Selector/hooks/useClearIcon.js +1 -1
  83. package/dist/node_modules/@rc-component/picker/es/PickerInput/Selector/hooks/useInputProps.js +1 -1
  84. package/dist/node_modules/@rc-component/picker/es/PickerInput/hooks/useCellRender.js +1 -1
  85. package/dist/node_modules/@rc-component/picker/es/PickerInput/hooks/useFilledProps.js +1 -1
  86. package/dist/node_modules/@rc-component/picker/es/PickerInput/hooks/usePresets.js +1 -1
  87. package/dist/node_modules/@rc-component/picker/es/PickerPanel/index.js +1 -1
  88. package/dist/node_modules/@rc-component/picker/es/hooks/useTimeInfo.js +1 -1
  89. package/dist/node_modules/@rc-component/portal/es/Portal.js +41 -35
  90. package/dist/node_modules/@rc-component/portal/es/Portal.js.map +1 -1
  91. package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js +48 -0
  92. package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js.map +1 -0
  93. package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js +18 -54
  94. package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js.map +1 -1
  95. package/dist/node_modules/@rc-component/resize-observer/es/index.js.map +1 -1
  96. package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js +50 -0
  97. package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js.map +1 -0
  98. package/dist/node_modules/@rc-component/select/es/BaseSelect/index.js +141 -140
  99. package/dist/node_modules/@rc-component/select/es/BaseSelect/index.js.map +1 -1
  100. package/dist/node_modules/@rc-component/select/es/OptionList.js +92 -91
  101. package/dist/node_modules/@rc-component/select/es/OptionList.js.map +1 -1
  102. package/dist/node_modules/@rc-component/select/es/Select.js +5 -5
  103. package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js +50 -50
  104. package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js.map +1 -1
  105. package/dist/node_modules/@rc-component/select/es/SelectInput/Content/SingleContent.js +41 -47
  106. package/dist/node_modules/@rc-component/select/es/SelectInput/Content/SingleContent.js.map +1 -1
  107. package/dist/node_modules/@rc-component/select/es/SelectInput/index.js +85 -80
  108. package/dist/node_modules/@rc-component/select/es/SelectInput/index.js.map +1 -1
  109. package/dist/node_modules/@rc-component/select/es/hooks/useOpen.js +27 -26
  110. package/dist/node_modules/@rc-component/select/es/hooks/useOpen.js.map +1 -1
  111. package/dist/node_modules/@rc-component/select/es/utils/valueUtil.js +1 -1
  112. package/dist/node_modules/@rc-component/select/es/utils/warningPropsUtil.js +6 -6
  113. package/dist/node_modules/@rc-component/table/es/Cell/useCellRender.js +1 -1
  114. package/dist/node_modules/@rc-component/table/es/Table.js +1 -1
  115. package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js +85 -80
  116. package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js.map +1 -1
  117. package/dist/node_modules/@rc-component/table/es/VirtualTable/index.js +1 -1
  118. package/dist/node_modules/@rc-component/table/es/hooks/useColumns/index.js +1 -1
  119. package/dist/node_modules/@rc-component/table/es/hooks/useExpand.js +1 -1
  120. package/dist/node_modules/@rc-component/table/es/utils/legacyUtil.js +1 -1
  121. package/dist/node_modules/@rc-component/tabs/es/hooks/useAnimateConfig.js +1 -1
  122. package/dist/node_modules/@rc-component/tooltip/es/placements.js +0 -1
  123. package/dist/node_modules/@rc-component/tree/es/Tree.js +1 -1
  124. package/dist/node_modules/@rc-component/tree/es/util.js +1 -1
  125. package/dist/node_modules/@rc-component/tree/es/utils/conductUtil.js +1 -1
  126. package/dist/node_modules/@rc-component/tree/es/utils/treeUtil.js +1 -1
  127. package/dist/node_modules/@rc-component/tree-select/es/TreeSelect.js +1 -1
  128. package/dist/node_modules/@rc-component/tree-select/es/hooks/useDataEntities.js +1 -1
  129. package/dist/node_modules/@rc-component/tree-select/es/utils/legacyUtil.js +1 -1
  130. package/dist/node_modules/@rc-component/tree-select/es/utils/warningPropsUtil.js +1 -1
  131. package/dist/node_modules/@rc-component/trigger/es/Popup/index.js +74 -72
  132. package/dist/node_modules/@rc-component/trigger/es/Popup/index.js.map +1 -1
  133. package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js +10 -9
  134. package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js.map +1 -1
  135. package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js +126 -123
  136. package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js.map +1 -1
  137. package/dist/node_modules/@rc-component/trigger/es/index.js +150 -140
  138. package/dist/node_modules/@rc-component/trigger/es/index.js.map +1 -1
  139. package/dist/node_modules/@rc-component/trigger/es/util.js +35 -34
  140. package/dist/node_modules/@rc-component/trigger/es/util.js.map +1 -1
  141. package/dist/node_modules/@rc-component/upload/es/attr-accept.js +1 -1
  142. package/dist/node_modules/@rc-component/util/es/Dom/focus.js +65 -20
  143. package/dist/node_modules/@rc-component/util/es/Dom/focus.js.map +1 -1
  144. package/dist/node_modules/@rc-component/util/es/KeyCode.js.map +1 -1
  145. package/dist/node_modules/@rc-component/util/es/hooks/useId.js.map +1 -1
  146. package/dist/node_modules/@rc-component/util/es/hooks/useState.js +6 -6
  147. package/dist/node_modules/@rc-component/util/es/hooks/useState.js.map +1 -1
  148. package/dist/node_modules/@rc-component/util/es/hooks/useSyncState.js.map +1 -1
  149. package/dist/node_modules/@rc-component/util/es/isEqual.js +1 -1
  150. package/dist/node_modules/@rc-component/util/es/utils/set.js +21 -21
  151. package/dist/node_modules/@rc-component/util/es/utils/set.js.map +1 -1
  152. package/dist/node_modules/@rc-component/virtual-list/es/hooks/useScrollTo.js +1 -1
  153. package/dist/node_modules/antd/es/_util/warning.js +1 -1
  154. package/dist/node_modules/antd/es/_util/wave/WaveEffect.js +53 -48
  155. package/dist/node_modules/antd/es/_util/wave/WaveEffect.js.map +1 -1
  156. package/dist/node_modules/antd/es/_util/wave/index.js +1 -1
  157. package/dist/node_modules/antd/es/_util/wave/index.js.map +1 -1
  158. package/dist/node_modules/antd/es/_util/wave/style.js +8 -7
  159. package/dist/node_modules/antd/es/_util/wave/style.js.map +1 -1
  160. package/dist/node_modules/antd/es/alert/Alert.js +133 -128
  161. package/dist/node_modules/antd/es/alert/Alert.js.map +1 -1
  162. package/dist/node_modules/antd/es/badge/Badge.js +29 -28
  163. package/dist/node_modules/antd/es/badge/Badge.js.map +1 -1
  164. package/dist/node_modules/antd/es/badge/style/index.js +1 -1
  165. package/dist/node_modules/antd/es/badge/style/index.js.map +1 -1
  166. package/dist/node_modules/antd/es/button/buttonHelpers.js +47 -41
  167. package/dist/node_modules/antd/es/button/buttonHelpers.js.map +1 -1
  168. package/dist/node_modules/antd/es/button/style/compact.js +45 -36
  169. package/dist/node_modules/antd/es/button/style/compact.js.map +1 -1
  170. package/dist/node_modules/antd/es/button/style/variant.js +100 -90
  171. package/dist/node_modules/antd/es/button/style/variant.js.map +1 -1
  172. package/dist/node_modules/antd/es/calendar/generateCalendar.js +55 -57
  173. package/dist/node_modules/antd/es/calendar/generateCalendar.js.map +1 -1
  174. package/dist/node_modules/antd/es/calendar/style/index.js +18 -18
  175. package/dist/node_modules/antd/es/calendar/style/index.js.map +1 -1
  176. package/dist/node_modules/antd/es/card/CardGrid.js.map +1 -1
  177. package/dist/node_modules/antd/es/card/style/index.js +23 -11
  178. package/dist/node_modules/antd/es/card/style/index.js.map +1 -1
  179. package/dist/node_modules/antd/es/checkbox/Group.js +32 -30
  180. package/dist/node_modules/antd/es/checkbox/Group.js.map +1 -1
  181. package/dist/node_modules/antd/es/collapse/Collapse.js +61 -61
  182. package/dist/node_modules/antd/es/collapse/Collapse.js.map +1 -1
  183. package/dist/node_modules/antd/es/color-picker/color.js +9 -9
  184. package/dist/node_modules/antd/es/color-picker/color.js.map +1 -1
  185. package/dist/node_modules/antd/es/config-provider/index.js +76 -71
  186. package/dist/node_modules/antd/es/config-provider/index.js.map +1 -1
  187. package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js +29 -31
  188. package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js.map +1 -1
  189. package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js +7 -9
  190. package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js.map +1 -1
  191. package/dist/node_modules/antd/es/date-picker/generatePicker/{SuffixIcon.js → useSuffixIcon.js} +4 -4
  192. package/dist/node_modules/antd/es/date-picker/generatePicker/useSuffixIcon.js.map +1 -0
  193. package/dist/node_modules/antd/es/date-picker/style/panel.js +4 -4
  194. package/dist/node_modules/antd/es/date-picker/style/panel.js.map +1 -1
  195. package/dist/node_modules/antd/es/drawer/useFocusable.js +14 -0
  196. package/dist/node_modules/antd/es/drawer/useFocusable.js.map +1 -0
  197. package/dist/node_modules/antd/es/empty/empty.js +27 -32
  198. package/dist/node_modules/antd/es/empty/empty.js.map +1 -1
  199. package/dist/node_modules/antd/es/empty/simple.js +2 -2
  200. package/dist/node_modules/antd/es/empty/simple.js.map +1 -1
  201. package/dist/node_modules/antd/es/form/hooks/useForm.js +2 -2
  202. package/dist/node_modules/antd/es/form/index.js +1 -1
  203. package/dist/node_modules/antd/es/form/style/index.js +24 -24
  204. package/dist/node_modules/antd/es/form/style/index.js.map +1 -1
  205. package/dist/node_modules/antd/es/grid/col.js +56 -54
  206. package/dist/node_modules/antd/es/grid/col.js.map +1 -1
  207. package/dist/node_modules/antd/es/grid/style/index.js +50 -50
  208. package/dist/node_modules/antd/es/grid/style/index.js.map +1 -1
  209. package/dist/node_modules/antd/es/input/TextArea.js +16 -15
  210. package/dist/node_modules/antd/es/input/TextArea.js.map +1 -1
  211. package/dist/node_modules/antd/es/input/style/index.js +1 -0
  212. package/dist/node_modules/antd/es/input/style/index.js.map +1 -1
  213. package/dist/node_modules/antd/es/input-number/index.js +91 -91
  214. package/dist/node_modules/antd/es/input-number/index.js.map +1 -1
  215. package/dist/node_modules/antd/es/input-number/style/index.js +80 -79
  216. package/dist/node_modules/antd/es/input-number/style/index.js.map +1 -1
  217. package/dist/node_modules/antd/es/layout/Sider.js +1 -2
  218. package/dist/node_modules/antd/es/layout/style/sider.js +9 -9
  219. package/dist/node_modules/antd/es/layout/style/sider.js.map +1 -1
  220. package/dist/node_modules/antd/es/menu/MenuItem.js +6 -6
  221. package/dist/node_modules/antd/es/menu/MenuItem.js.map +1 -1
  222. package/dist/node_modules/antd/es/menu/SubMenu.js +8 -8
  223. package/dist/node_modules/antd/es/menu/SubMenu.js.map +1 -1
  224. package/dist/node_modules/antd/es/menu/style/horizontal.js +1 -1
  225. package/dist/node_modules/antd/es/menu/style/horizontal.js.map +1 -1
  226. package/dist/node_modules/antd/es/menu/style/index.js +58 -58
  227. package/dist/node_modules/antd/es/menu/style/index.js.map +1 -1
  228. package/dist/node_modules/antd/es/menu/style/vertical.js +1 -1
  229. package/dist/node_modules/antd/es/menu/style/vertical.js.map +1 -1
  230. package/dist/node_modules/antd/es/message/index.js +1 -1
  231. package/dist/node_modules/antd/es/modal/ConfirmDialog.js +117 -112
  232. package/dist/node_modules/antd/es/modal/ConfirmDialog.js.map +1 -1
  233. package/dist/node_modules/antd/es/modal/Modal.js +115 -109
  234. package/dist/node_modules/antd/es/modal/Modal.js.map +1 -1
  235. package/dist/node_modules/antd/es/modal/confirm.js +3 -3
  236. package/dist/node_modules/antd/es/modal/style/index.js +83 -80
  237. package/dist/node_modules/antd/es/modal/style/index.js.map +1 -1
  238. package/dist/node_modules/antd/es/pagination/Pagination.js +85 -81
  239. package/dist/node_modules/antd/es/pagination/Pagination.js.map +1 -1
  240. package/dist/node_modules/antd/es/pagination/style/bordered.js +2 -2
  241. package/dist/node_modules/antd/es/pagination/style/bordered.js.map +1 -1
  242. package/dist/node_modules/antd/es/pagination/style/index.js +100 -133
  243. package/dist/node_modules/antd/es/pagination/style/index.js.map +1 -1
  244. package/dist/node_modules/antd/es/popover/index.js +77 -82
  245. package/dist/node_modules/antd/es/popover/index.js.map +1 -1
  246. package/dist/node_modules/antd/es/popover/style/index.js +65 -63
  247. package/dist/node_modules/antd/es/popover/style/index.js.map +1 -1
  248. package/dist/node_modules/antd/es/progress/progress.js +4 -4
  249. package/dist/node_modules/antd/es/radio/context.js +3 -3
  250. package/dist/node_modules/antd/es/radio/context.js.map +1 -1
  251. package/dist/node_modules/antd/es/radio/group.js +31 -29
  252. package/dist/node_modules/antd/es/radio/group.js.map +1 -1
  253. package/dist/node_modules/antd/es/radio/style/index.js +1 -1
  254. package/dist/node_modules/antd/es/radio/style/index.js.map +1 -1
  255. package/dist/node_modules/antd/es/select/style/dropdown.js +1 -1
  256. package/dist/node_modules/antd/es/select/style/dropdown.js.map +1 -1
  257. package/dist/node_modules/antd/es/select/style/select-input-multiple.js +71 -69
  258. package/dist/node_modules/antd/es/select/style/select-input-multiple.js.map +1 -1
  259. package/dist/node_modules/antd/es/select/style/select-input.js +113 -98
  260. package/dist/node_modules/antd/es/select/style/select-input.js.map +1 -1
  261. package/dist/node_modules/antd/es/skeleton/Image.js +9 -9
  262. package/dist/node_modules/antd/es/skeleton/Image.js.map +1 -1
  263. package/dist/node_modules/antd/es/space/Item.js +2 -2
  264. package/dist/node_modules/antd/es/space/Item.js.map +1 -1
  265. package/dist/node_modules/antd/es/space/index.js +4 -4
  266. package/dist/node_modules/antd/es/space/index.js.map +1 -1
  267. package/dist/node_modules/antd/es/space/style/addon.js +47 -46
  268. package/dist/node_modules/antd/es/space/style/addon.js.map +1 -1
  269. package/dist/node_modules/antd/es/steps/PanelArrow.js +2 -2
  270. package/dist/node_modules/antd/es/steps/PanelArrow.js.map +1 -1
  271. package/dist/node_modules/antd/es/steps/ProgressIcon.js +12 -10
  272. package/dist/node_modules/antd/es/steps/ProgressIcon.js.map +1 -1
  273. package/dist/node_modules/antd/es/steps/index.js +108 -106
  274. package/dist/node_modules/antd/es/steps/index.js.map +1 -1
  275. package/dist/node_modules/antd/es/steps/style/horizontal.js +13 -11
  276. package/dist/node_modules/antd/es/steps/style/horizontal.js.map +1 -1
  277. package/dist/node_modules/antd/es/steps/style/icon.js +23 -18
  278. package/dist/node_modules/antd/es/steps/style/icon.js.map +1 -1
  279. package/dist/node_modules/antd/es/steps/style/index.js +41 -41
  280. package/dist/node_modules/antd/es/steps/style/index.js.map +1 -1
  281. package/dist/node_modules/antd/es/steps/style/inline.js +28 -23
  282. package/dist/node_modules/antd/es/steps/style/inline.js.map +1 -1
  283. package/dist/node_modules/antd/es/steps/style/label-placement.js +44 -39
  284. package/dist/node_modules/antd/es/steps/style/label-placement.js.map +1 -1
  285. package/dist/node_modules/antd/es/steps/style/nav.js +29 -27
  286. package/dist/node_modules/antd/es/steps/style/nav.js.map +1 -1
  287. package/dist/node_modules/antd/es/steps/style/panel.js +61 -56
  288. package/dist/node_modules/antd/es/steps/style/panel.js.map +1 -1
  289. package/dist/node_modules/antd/es/steps/style/progress-dot.js +28 -26
  290. package/dist/node_modules/antd/es/steps/style/progress-dot.js.map +1 -1
  291. package/dist/node_modules/antd/es/steps/style/progress.js +24 -57
  292. package/dist/node_modules/antd/es/steps/style/progress.js.map +1 -1
  293. package/dist/node_modules/antd/es/steps/style/rtl.js +10 -8
  294. package/dist/node_modules/antd/es/steps/style/rtl.js.map +1 -1
  295. package/dist/node_modules/antd/es/steps/style/small.js +21 -16
  296. package/dist/node_modules/antd/es/steps/style/small.js.map +1 -1
  297. package/dist/node_modules/antd/es/steps/style/status.js +187 -176
  298. package/dist/node_modules/antd/es/steps/style/status.js.map +1 -1
  299. package/dist/node_modules/antd/es/steps/style/util.js +18 -16
  300. package/dist/node_modules/antd/es/steps/style/util.js.map +1 -1
  301. package/dist/node_modules/antd/es/steps/style/vertical.js +21 -16
  302. package/dist/node_modules/antd/es/steps/style/vertical.js.map +1 -1
  303. package/dist/node_modules/antd/es/style/placementArrow.js +31 -29
  304. package/dist/node_modules/antd/es/style/placementArrow.js.map +1 -1
  305. package/dist/node_modules/antd/es/table/InternalTable.js +65 -62
  306. package/dist/node_modules/antd/es/table/InternalTable.js.map +1 -1
  307. package/dist/node_modules/antd/es/table/TableMeasureRowContext.js +6 -0
  308. package/dist/node_modules/antd/es/table/TableMeasureRowContext.js.map +1 -0
  309. package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js +145 -137
  310. package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js.map +1 -1
  311. package/dist/node_modules/antd/es/table/style/index.js +3 -3
  312. package/dist/node_modules/antd/es/table/style/index.js.map +1 -1
  313. package/dist/node_modules/antd/es/table/style/radius.js +10 -0
  314. package/dist/node_modules/antd/es/table/style/radius.js.map +1 -1
  315. package/dist/node_modules/antd/es/table/style/virtual.js +5 -5
  316. package/dist/node_modules/antd/es/table/style/virtual.js.map +1 -1
  317. package/dist/node_modules/antd/es/tag/style/index.js +5 -5
  318. package/dist/node_modules/antd/es/tag/style/index.js.map +1 -1
  319. package/dist/node_modules/antd/es/theme/util/genStyleUtils.js +29 -32
  320. package/dist/node_modules/antd/es/theme/util/genStyleUtils.js.map +1 -1
  321. package/dist/node_modules/antd/es/timeline/Timeline.js +76 -74
  322. package/dist/node_modules/antd/es/timeline/Timeline.js.map +1 -1
  323. package/dist/node_modules/antd/es/timeline/style/horizontal.js +21 -18
  324. package/dist/node_modules/antd/es/timeline/style/horizontal.js.map +1 -1
  325. package/dist/node_modules/antd/es/timeline/style/index.js +85 -70
  326. package/dist/node_modules/antd/es/timeline/style/index.js.map +1 -1
  327. package/dist/node_modules/antd/es/timeline/useItems.js +38 -37
  328. package/dist/node_modules/antd/es/timeline/useItems.js.map +1 -1
  329. package/dist/node_modules/antd/es/tooltip/PurePanel.js +27 -27
  330. package/dist/node_modules/antd/es/tooltip/PurePanel.js.map +1 -1
  331. package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js +17 -22
  332. package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js.map +1 -1
  333. package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js +27 -26
  334. package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js.map +1 -1
  335. package/dist/node_modules/antd/es/tooltip/index.js +52 -51
  336. package/dist/node_modules/antd/es/tooltip/index.js.map +1 -1
  337. package/dist/node_modules/antd/es/tooltip/style/index.js +55 -52
  338. package/dist/node_modules/antd/es/tooltip/style/index.js.map +1 -1
  339. package/dist/node_modules/antd/es/tooltip/util.js +13 -12
  340. package/dist/node_modules/antd/es/tooltip/util.js.map +1 -1
  341. package/dist/node_modules/antd/es/transfer/ListBody.js +16 -16
  342. package/dist/node_modules/antd/es/transfer/ListBody.js.map +1 -1
  343. package/dist/node_modules/antd/es/transfer/ListItem.js +43 -43
  344. package/dist/node_modules/antd/es/transfer/ListItem.js.map +1 -1
  345. package/dist/node_modules/antd/es/transfer/style/index.js +1 -1
  346. package/dist/node_modules/antd/es/tree/DirectoryTree.js +42 -41
  347. package/dist/node_modules/antd/es/tree/DirectoryTree.js.map +1 -1
  348. package/dist/node_modules/antd/es/typography/Base/index.js +43 -42
  349. package/dist/node_modules/antd/es/typography/Base/index.js.map +1 -1
  350. package/dist/node_modules/antd/es/typography/style/index.js +43 -43
  351. package/dist/node_modules/antd/es/typography/style/index.js.map +1 -1
  352. package/dist/node_modules/antd/es/typography/style/mixins.js +1 -1
  353. package/dist/node_modules/antd/es/typography/style/mixins.js.map +1 -1
  354. package/dist/node_modules/antd/es/version/version.js +1 -1
  355. package/dist/node_modules/antd/es/version/version.js.map +1 -1
  356. package/dist/node_modules/antd/es/watermark/context.js +5 -6
  357. package/dist/node_modules/antd/es/watermark/context.js.map +1 -1
  358. package/dist/node_modules/antd-style/node_modules/@ant-design/cssinjs/es/StyleContext.js +1 -2
  359. package/dist/node_modules/antd-style/node_modules/@ant-design/cssinjs/es/StyleContext.js.map +1 -1
  360. package/dist/node_modules/exceljs/dist/exceljs.min.js +91 -508
  361. package/dist/node_modules/exceljs/dist/exceljs.min.js.map +1 -1
  362. package/dist/node_modules/html2canvas/dist/html2canvas.esm.js +5 -55
  363. package/dist/node_modules/html2canvas/dist/html2canvas.esm.js.map +1 -1
  364. package/dist/node_modules/jspdf/dist/jspdf.es.min.js +8 -53
  365. package/dist/node_modules/jspdf/dist/jspdf.es.min.js.map +1 -1
  366. package/dist/node_modules/lodash/lodash.js +295 -278
  367. package/dist/node_modules/lodash/lodash.js.map +1 -1
  368. package/dist/node_modules/moment/dist/moment.js +2 -8
  369. package/dist/node_modules/moment/dist/moment.js.map +1 -1
  370. package/dist/node_modules/rc-util/es/isEqual.js +1 -1
  371. package/package.json +1 -1
  372. package/dist/node_modules/@rc-component/form/es/BatchUpdate.js +0 -21
  373. package/dist/node_modules/@rc-component/form/es/BatchUpdate.js.map +0 -1
  374. package/dist/node_modules/@rc-component/form/es/useForm.js.map +0 -1
  375. package/dist/node_modules/@rc-component/form/es/useWatch.js.map +0 -1
  376. package/dist/node_modules/antd/es/date-picker/generatePicker/SuffixIcon.js.map +0 -1
@@ -1,14 +1,15 @@
1
- function P(e = [], o = [], t) {
2
- return t ? e[0] === o[0] : e[0] === o[0] && e[1] === o[1];
1
+ function P(e = [], n = [], t) {
2
+ const o = (i, r) => i[r] || "";
3
+ return t ? o(e, 0) === o(n, 0) : o(e, 0) === o(n, 0) && o(e, 1) === o(n, 1);
3
4
  }
4
- function X(e, o, t, n) {
5
+ function X(e, n, t, o) {
5
6
  const {
6
- points: s
7
- } = t, i = Object.keys(e);
8
- for (let r = 0; r < i.length; r += 1) {
9
- const c = i[r];
10
- if (P(e[c]?.points, s, n))
11
- return `${o}-placement-${c}`;
7
+ points: i
8
+ } = t, r = Object.keys(e);
9
+ for (let c = 0; c < r.length; c += 1) {
10
+ const l = r[c];
11
+ if (P(e[l]?.points, i, o))
12
+ return `${n}-placement-${l}`;
12
13
  }
13
14
  return "";
14
15
  }
@@ -16,52 +17,52 @@ function y(e) {
16
17
  return e.ownerDocument.defaultView;
17
18
  }
18
19
  function Y(e) {
19
- const o = [];
20
+ const n = [];
20
21
  let t = e?.parentElement;
21
- const n = ["hidden", "scroll", "clip", "auto"];
22
+ const o = ["hidden", "scroll", "clip", "auto"];
22
23
  for (; t; ) {
23
24
  const {
24
- overflowX: s,
25
- overflowY: i,
26
- overflow: r
25
+ overflowX: i,
26
+ overflowY: r,
27
+ overflow: c
27
28
  } = y(t).getComputedStyle(t);
28
- [s, i, r].some((c) => n.includes(c)) && o.push(t), t = t.parentElement;
29
+ [i, r, c].some((l) => o.includes(l)) && n.push(t), t = t.parentElement;
29
30
  }
30
- return o;
31
+ return n;
31
32
  }
32
- function m(e, o = 1) {
33
- return Number.isNaN(e) ? o : e;
33
+ function g(e, n = 1) {
34
+ return Number.isNaN(e) ? n : e;
34
35
  }
35
36
  function h(e) {
36
- return m(parseFloat(e), 0);
37
+ return g(parseFloat(e), 0);
37
38
  }
38
- function $(e, o) {
39
+ function $(e, n) {
39
40
  const t = {
40
41
  ...e
41
42
  };
42
- return (o || []).forEach((n) => {
43
- if (n instanceof HTMLBodyElement || n instanceof HTMLHtmlElement)
43
+ return (n || []).forEach((o) => {
44
+ if (o instanceof HTMLBodyElement || o instanceof HTMLHtmlElement)
44
45
  return;
45
46
  const {
46
- overflow: s,
47
- overflowClipMargin: i,
48
- borderTopWidth: r,
49
- borderBottomWidth: c,
47
+ overflow: i,
48
+ overflowClipMargin: r,
49
+ borderTopWidth: c,
50
+ borderBottomWidth: l,
50
51
  borderLeftWidth: E,
51
52
  borderRightWidth: R
52
- } = y(n).getComputedStyle(n), l = n.getBoundingClientRect(), {
53
- offsetHeight: g,
53
+ } = y(o).getComputedStyle(o), s = o.getBoundingClientRect(), {
54
+ offsetHeight: m,
54
55
  clientHeight: S,
55
56
  offsetWidth: p,
56
57
  clientWidth: T
57
- } = n, W = h(r), b = h(c), M = h(E), w = h(R), d = m(Math.round(l.width / p * 1e3) / 1e3), u = m(Math.round(l.height / g * 1e3) / 1e3), x = (p - T - M - w) * d, C = (g - S - W - b) * u, B = W * u, A = b * u, N = M * d, O = w * d;
58
+ } = o, W = h(c), b = h(l), M = h(E), w = h(R), d = g(Math.round(s.width / p * 1e3) / 1e3), u = g(Math.round(s.height / m * 1e3) / 1e3), x = (p - T - M - w) * d, C = (m - S - W - b) * u, B = W * u, V = b * u, N = M * d, A = w * d;
58
59
  let f = 0, a = 0;
59
- if (s === "clip") {
60
- const v = h(i);
60
+ if (i === "clip") {
61
+ const v = h(r);
61
62
  f = v * d, a = v * u;
62
63
  }
63
- const H = l.x + N - f, L = l.y + B - a, V = H + l.width + 2 * f - N - O - x, I = L + l.height + 2 * a - B - A - C;
64
- t.left = Math.max(t.left, H), t.top = Math.max(t.top, L), t.right = Math.min(t.right, V), t.bottom = Math.min(t.bottom, I);
64
+ const H = s.x + N - f, L = s.y + B - a, O = H + s.width + 2 * f - N - A - x, I = L + s.height + 2 * a - B - V - C;
65
+ t.left = Math.max(t.left, H), t.top = Math.max(t.top, L), t.right = Math.min(t.right, O), t.bottom = Math.min(t.bottom, I);
65
66
  }), t;
66
67
  }
67
68
  export {
@@ -69,6 +70,6 @@ export {
69
70
  X as getAlignPopupClassName,
70
71
  $ as getVisibleArea,
71
72
  y as getWin,
72
- m as toNum
73
+ g as toNum
73
74
  };
74
75
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../../node_modules/@rc-component/trigger/es/util.js"],"sourcesContent":["function isPointsEq(a1 = [], a2 = [], isAlignPoint) {\n if (isAlignPoint) {\n return a1[0] === a2[0];\n }\n return a1[0] === a2[0] && a1[1] === a2[1];\n}\nexport function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n const {\n points\n } = align;\n const placements = Object.keys(builtinPlacements);\n for (let i = 0; i < placements.length; i += 1) {\n const placement = placements[i];\n if (isPointsEq(builtinPlacements[placement]?.points, points, isAlignPoint)) {\n return `${prefixCls}-placement-${placement}`;\n }\n }\n return '';\n}\nexport function getWin(ele) {\n return ele.ownerDocument.defaultView;\n}\n\n/**\n * Get all the scrollable parent elements of the element\n * @param ele The element to be detected\n * @param areaOnly Only return the parent which will cut visible area\n */\nexport function collectScroller(ele) {\n const scrollerList = [];\n let current = ele?.parentElement;\n const scrollStyle = ['hidden', 'scroll', 'clip', 'auto'];\n while (current) {\n const {\n overflowX,\n overflowY,\n overflow\n } = getWin(current).getComputedStyle(current);\n if ([overflowX, overflowY, overflow].some(o => scrollStyle.includes(o))) {\n scrollerList.push(current);\n }\n current = current.parentElement;\n }\n return scrollerList;\n}\nexport function toNum(num, defaultValue = 1) {\n return Number.isNaN(num) ? defaultValue : num;\n}\nfunction getPxValue(val) {\n return toNum(parseFloat(val), 0);\n}\n/**\n *\n *\n * **************************************\n * * Border *\n * * ************************** *\n * * * * * *\n * * B * * S * B *\n * * o * * c * o *\n * * r * Content * r * r *\n * * d * * o * d *\n * * e * * l * e *\n * * r ******************** l * r *\n * * * Scroll * *\n * * ************************** *\n * * Border *\n * **************************************\n *\n */\n/**\n * Get visible area of element\n */\nexport function getVisibleArea(initArea, scrollerList) {\n const visibleArea = {\n ...initArea\n };\n (scrollerList || []).forEach(ele => {\n if (ele instanceof HTMLBodyElement || ele instanceof HTMLHtmlElement) {\n return;\n }\n\n // Skip if static position which will not affect visible area\n const {\n overflow,\n overflowClipMargin,\n borderTopWidth,\n borderBottomWidth,\n borderLeftWidth,\n borderRightWidth\n } = getWin(ele).getComputedStyle(ele);\n const eleRect = ele.getBoundingClientRect();\n const {\n offsetHeight: eleOutHeight,\n clientHeight: eleInnerHeight,\n offsetWidth: eleOutWidth,\n clientWidth: eleInnerWidth\n } = ele;\n const borderTopNum = getPxValue(borderTopWidth);\n const borderBottomNum = getPxValue(borderBottomWidth);\n const borderLeftNum = getPxValue(borderLeftWidth);\n const borderRightNum = getPxValue(borderRightWidth);\n const scaleX = toNum(Math.round(eleRect.width / eleOutWidth * 1000) / 1000);\n const scaleY = toNum(Math.round(eleRect.height / eleOutHeight * 1000) / 1000);\n\n // Original visible area\n const eleScrollWidth = (eleOutWidth - eleInnerWidth - borderLeftNum - borderRightNum) * scaleX;\n const eleScrollHeight = (eleOutHeight - eleInnerHeight - borderTopNum - borderBottomNum) * scaleY;\n\n // Cut border size\n const scaledBorderTopWidth = borderTopNum * scaleY;\n const scaledBorderBottomWidth = borderBottomNum * scaleY;\n const scaledBorderLeftWidth = borderLeftNum * scaleX;\n const scaledBorderRightWidth = borderRightNum * scaleX;\n\n // Clip margin\n let clipMarginWidth = 0;\n let clipMarginHeight = 0;\n if (overflow === 'clip') {\n const clipNum = getPxValue(overflowClipMargin);\n clipMarginWidth = clipNum * scaleX;\n clipMarginHeight = clipNum * scaleY;\n }\n\n // Region\n const eleLeft = eleRect.x + scaledBorderLeftWidth - clipMarginWidth;\n const eleTop = eleRect.y + scaledBorderTopWidth - clipMarginHeight;\n const eleRight = eleLeft + eleRect.width + 2 * clipMarginWidth - scaledBorderLeftWidth - scaledBorderRightWidth - eleScrollWidth;\n const eleBottom = eleTop + eleRect.height + 2 * clipMarginHeight - scaledBorderTopWidth - scaledBorderBottomWidth - eleScrollHeight;\n visibleArea.left = Math.max(visibleArea.left, eleLeft);\n visibleArea.top = Math.max(visibleArea.top, eleTop);\n visibleArea.right = Math.min(visibleArea.right, eleRight);\n visibleArea.bottom = Math.min(visibleArea.bottom, eleBottom);\n });\n return visibleArea;\n}"],"names":["isPointsEq","a1","a2","isAlignPoint","getAlignPopupClassName","builtinPlacements","prefixCls","align","points","placements","i","placement","getWin","ele","collectScroller","scrollerList","current","scrollStyle","overflowX","overflowY","overflow","o","toNum","num","defaultValue","getPxValue","val","getVisibleArea","initArea","visibleArea","overflowClipMargin","borderTopWidth","borderBottomWidth","borderLeftWidth","borderRightWidth","eleRect","eleOutHeight","eleInnerHeight","eleOutWidth","eleInnerWidth","borderTopNum","borderBottomNum","borderLeftNum","borderRightNum","scaleX","scaleY","eleScrollWidth","eleScrollHeight","scaledBorderTopWidth","scaledBorderBottomWidth","scaledBorderLeftWidth","scaledBorderRightWidth","clipMarginWidth","clipMarginHeight","clipNum","eleLeft","eleTop","eleRight","eleBottom"],"mappings":"AAAA,SAASA,EAAWC,IAAK,CAAA,GAAIC,IAAK,CAAA,GAAIC,GAAc;AAClD,SAAIA,IACKF,EAAG,CAAC,MAAMC,EAAG,CAAC,IAEhBD,EAAG,CAAC,MAAMC,EAAG,CAAC,KAAKD,EAAG,CAAC,MAAMC,EAAG,CAAC;AAC1C;AACO,SAASE,EAAuBC,GAAmBC,GAAWC,GAAOJ,GAAc;AACxF,QAAM;AAAA,IACJ,QAAAK;AAAA,EACJ,IAAMD,GACEE,IAAa,OAAO,KAAKJ,CAAiB;AAChD,WAASK,IAAI,GAAGA,IAAID,EAAW,QAAQC,KAAK,GAAG;AAC7C,UAAMC,IAAYF,EAAWC,CAAC;AAC9B,QAAIV,EAAWK,EAAkBM,CAAS,GAAG,QAAQH,GAAQL,CAAY;AACvE,aAAO,GAAGG,CAAS,cAAcK,CAAS;AAAA,EAE9C;AACA,SAAO;AACT;AACO,SAASC,EAAOC,GAAK;AAC1B,SAAOA,EAAI,cAAc;AAC3B;AAOO,SAASC,EAAgBD,GAAK;AACnC,QAAME,IAAe,CAAA;AACrB,MAAIC,IAAUH,GAAK;AACnB,QAAMI,IAAc,CAAC,UAAU,UAAU,QAAQ,MAAM;AACvD,SAAOD,KAAS;AACd,UAAM;AAAA,MACJ,WAAAE;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,IACN,IAAQR,EAAOI,CAAO,EAAE,iBAAiBA,CAAO;AAC5C,IAAI,CAACE,GAAWC,GAAWC,CAAQ,EAAE,KAAK,CAAAC,MAAKJ,EAAY,SAASI,CAAC,CAAC,KACpEN,EAAa,KAAKC,CAAO,GAE3BA,IAA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AMkC,IAAU7B,EAAWK,CAAkB;AAC7C,MAAAsB,IAAkBE,IAAUV,GAC5BS,IAAmBC,IAAUT;AAAA,IAC/B;AAGA,UAAMU,IAAUpB,EAAQ,IAAIe,IAAwBE,GAC9CI,IAASrB,EAAQ,IAAIa,IAAuBK,GAC5CI,IAAWF,IAAUpB,EAAQ,QAAQ,IAAIiB,IAAkBF,IAAwBC,IAAyBL,GAC5GY,IAAYF,IAASrB,EAAQ,SAAS,IAAIkB,IAAmBL,IAAuBC,IAA0BF;AACpH,IAAAlB,EAAY,OAAO,KAAK,IAAIA,EAAY,MAAM0B,CAAO,GACrD1B,EAAY,MAAM,KAAK,IAAIA,EAAY,KAAK2B,CAAM,GAClD3B,EAAY,QAAQ,KAAK,IAAIA,EAAY,OAAO4B,CAAQ,GACxD5B,EAAY,SAAS,KAAK,IAAIA,EAAY,QAAQ6B,CAAS;AAAA,EAC7D,CAAC,GACM7B;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"util.js","sources":["../../../../../node_modules/@rc-component/trigger/es/util.js"],"sourcesContent":["function isPointsEq(a1 = [], a2 = [], isAlignPoint) {\n const getVal = (a, index) => a[index] || '';\n if (isAlignPoint) {\n return getVal(a1, 0) === getVal(a2, 0);\n }\n return getVal(a1, 0) === getVal(a2, 0) && getVal(a1, 1) === getVal(a2, 1);\n}\nexport function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n const {\n points\n } = align;\n const placements = Object.keys(builtinPlacements);\n for (let i = 0; i < placements.length; i += 1) {\n const placement = placements[i];\n if (isPointsEq(builtinPlacements[placement]?.points, points, isAlignPoint)) {\n return `${prefixCls}-placement-${placement}`;\n }\n }\n return '';\n}\nexport function getWin(ele) {\n return ele.ownerDocument.defaultView;\n}\n\n/**\n * Get all the scrollable parent elements of the element\n * @param ele The element to be detected\n * @param areaOnly Only return the parent which will cut visible area\n */\nexport function collectScroller(ele) {\n const scrollerList = [];\n let current = ele?.parentElement;\n const scrollStyle = ['hidden', 'scroll', 'clip', 'auto'];\n while (current) {\n const {\n overflowX,\n overflowY,\n overflow\n } = getWin(current).getComputedStyle(current);\n if ([overflowX, overflowY, overflow].some(o => scrollStyle.includes(o))) {\n scrollerList.push(current);\n }\n current = current.parentElement;\n }\n return scrollerList;\n}\nexport function toNum(num, defaultValue = 1) {\n return Number.isNaN(num) ? defaultValue : num;\n}\nfunction getPxValue(val) {\n return toNum(parseFloat(val), 0);\n}\n/**\n *\n *\n * **************************************\n * * Border *\n * * ************************** *\n * * * * * *\n * * B * * S * B *\n * * o * * c * o *\n * * r * Content * r * r *\n * * d * * o * d *\n * * e * * l * e *\n * * r ******************** l * r *\n * * * Scroll * *\n * * ************************** *\n * * Border *\n * **************************************\n *\n */\n/**\n * Get visible area of element\n */\nexport function getVisibleArea(initArea, scrollerList) {\n const visibleArea = {\n ...initArea\n };\n (scrollerList || []).forEach(ele => {\n if (ele instanceof HTMLBodyElement || ele instanceof HTMLHtmlElement) {\n return;\n }\n\n // Skip if static position which will not affect visible area\n const {\n overflow,\n overflowClipMargin,\n borderTopWidth,\n borderBottomWidth,\n borderLeftWidth,\n borderRightWidth\n } = getWin(ele).getComputedStyle(ele);\n const eleRect = ele.getBoundingClientRect();\n const {\n offsetHeight: eleOutHeight,\n clientHeight: eleInnerHeight,\n offsetWidth: eleOutWidth,\n clientWidth: eleInnerWidth\n } = ele;\n const borderTopNum = getPxValue(borderTopWidth);\n const borderBottomNum = getPxValue(borderBottomWidth);\n const borderLeftNum = getPxValue(borderLeftWidth);\n const borderRightNum = getPxValue(borderRightWidth);\n const scaleX = toNum(Math.round(eleRect.width / eleOutWidth * 1000) / 1000);\n const scaleY = toNum(Math.round(eleRect.height / eleOutHeight * 1000) / 1000);\n\n // Original visible area\n const eleScrollWidth = (eleOutWidth - eleInnerWidth - borderLeftNum - borderRightNum) * scaleX;\n const eleScrollHeight = (eleOutHeight - eleInnerHeight - borderTopNum - borderBottomNum) * scaleY;\n\n // Cut border size\n const scaledBorderTopWidth = borderTopNum * scaleY;\n const scaledBorderBottomWidth = borderBottomNum * scaleY;\n const scaledBorderLeftWidth = borderLeftNum * scaleX;\n const scaledBorderRightWidth = borderRightNum * scaleX;\n\n // Clip margin\n let clipMarginWidth = 0;\n let clipMarginHeight = 0;\n if (overflow === 'clip') {\n const clipNum = getPxValue(overflowClipMargin);\n clipMarginWidth = clipNum * scaleX;\n clipMarginHeight = clipNum * scaleY;\n }\n\n // Region\n const eleLeft = eleRect.x + scaledBorderLeftWidth - clipMarginWidth;\n const eleTop = eleRect.y + scaledBorderTopWidth - clipMarginHeight;\n const eleRight = eleLeft + eleRect.width + 2 * clipMarginWidth - scaledBorderLeftWidth - scaledBorderRightWidth - eleScrollWidth;\n const eleBottom = eleTop + eleRect.height + 2 * clipMarginHeight - scaledBorderTopWidth - scaledBorderBottomWidth - eleScrollHeight;\n visibleArea.left = Math.max(visibleArea.left, eleLeft);\n visibleArea.top = Math.max(visibleArea.top, eleTop);\n visibleArea.right = Math.min(visibleArea.right, eleRight);\n visibleArea.bottom = Math.min(visibleArea.bottom, eleBottom);\n });\n return visibleArea;\n}"],"names":["isPointsEq","a1","a2","isAlignPoint","getVal","a","index","getAlignPopupClassName","builtinPlacements","prefixCls","align","points","placements","i","placement","getWin","ele","collectScroller","scrollerList","current","scrollStyle","overflowX","overflowY","overflow","o","toNum","num","defaultValue","getPxValue","val","getVisibleArea","initArea","visibleArea","overflowClipMargin","borderTopWidth","borderBottomWidth","borderLeftWidth","borderRightWidth","eleRect","eleOutHeight","eleInnerHeight","eleOutWidth","eleInnerWidth","borderTopNum","borderBottomNum","borderLeftNum","borderRightNum","scaleX","scaleY","eleScrollWidth","eleScrollHeight","scaledBorderTopWidth","scaledBorderBottomWidth","scaledBorderLeftWidth","scaledBorderRightWidth","clipMarginWidth","clipMarginHeight","clipNum","eleLeft","eleTop","eleRight","eleBottom"],"mappings":"AAAA,SAASA,EAAWC,IAAK,CAAA,GAAIC,IAAK,CAAA,GAAIC,GAAc;AA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CI,IAAWF,IAAUpB,EAAQ,QAAQ,IAAIiB,IAAkBF,IAAwBC,IAAyBL,GAC5GY,IAAYF,IAASrB,EAAQ,SAAS,IAAIkB,IAAmBL,IAAuBC,IAA0BF;AACpH,IAAAlB,EAAY,OAAO,KAAK,IAAIA,EAAY,MAAM0B,CAAO,GACrD1B,EAAY,MAAM,KAAK,IAAIA,EAAY,KAAK2B,CAAM,GAClD3B,EAAY,QAAQ,KAAK,IAAIA,EAAY,OAAO4B,CAAQ,GACxD5B,EAAY,SAAS,KAAK,IAAIA,EAAY,QAAQ6B,CAAS;AAAA,EAC7D,CAAC,GACM7B;AACT;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { warningOnce as m } from "../../util/es/warning.js";
1
+ import m from "../../util/es/warning.js";
2
2
  const y = ((r, t) => {
3
3
  if (r && t) {
4
4
  const i = Array.isArray(t) ? t : t.split(","), p = r.name || "", n = r.type || "", c = n.replace(/\/.*$/, "");
@@ -1,30 +1,31 @@
1
- import c from "./isVisible.js";
2
- function u(t, n = !1) {
3
- if (c(t)) {
4
- const e = t.nodeName.toLowerCase(), s = (
1
+ import { useEffect as m } from "react";
2
+ import E from "./isVisible.js";
3
+ function f(t, e = !1) {
4
+ if (E(t)) {
5
+ const n = t.nodeName.toLowerCase(), s = (
5
6
  // Focusable element
6
- ["input", "select", "textarea", "button"].includes(e) || // Editable element
7
+ ["input", "select", "textarea", "button"].includes(n) || // Editable element
7
8
  t.isContentEditable || // Anchor with href element
8
- e === "a" && !!t.getAttribute("href")
9
- ), a = t.getAttribute("tabindex"), i = Number(a);
10
- let r = null;
11
- return a && !Number.isNaN(i) ? r = i : s && r === null && (r = 0), s && t.disabled && (r = null), r !== null && (r >= 0 || n && r < 0);
9
+ n === "a" && !!t.getAttribute("href")
10
+ ), u = t.getAttribute("tabindex"), r = Number(u);
11
+ let o = null;
12
+ return u && !Number.isNaN(r) ? o = r : s && o === null && (o = 0), s && t.disabled && (o = null), o !== null && (o >= 0 || e && o < 0);
12
13
  }
13
14
  return !1;
14
15
  }
15
- function f(t, n = !1) {
16
- const e = [...t.querySelectorAll("*")].filter((s) => u(s, n));
17
- return u(t, n) && e.unshift(t), e;
16
+ function d(t, e = !1) {
17
+ const n = [...t.querySelectorAll("*")].filter((s) => f(s, e));
18
+ return f(t, e) && n.unshift(t), n;
18
19
  }
19
- function o(t, n) {
20
+ function v(t, e) {
20
21
  if (!t) return;
21
- t.focus(n);
22
+ t.focus(e);
22
23
  const {
23
- cursor: e
24
- } = n || {};
25
- if (e && (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement)) {
24
+ cursor: n
25
+ } = e || {};
26
+ if (n && (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement)) {
26
27
  const s = t.value.length;
27
- switch (e) {
28
+ switch (n) {
28
29
  case "start":
29
30
  t.setSelectionRange(0, 0);
30
31
  break;
@@ -36,8 +37,52 @@ function o(t, n) {
36
37
  }
37
38
  }
38
39
  }
40
+ let c = null, i = [];
41
+ function b() {
42
+ return i[i.length - 1];
43
+ }
44
+ function w(t) {
45
+ const {
46
+ activeElement: e
47
+ } = document;
48
+ return t === e || t.contains(e);
49
+ }
50
+ function l() {
51
+ const t = b(), {
52
+ activeElement: e
53
+ } = document;
54
+ if (t && !w(t)) {
55
+ const n = d(t);
56
+ (n.includes(c) ? c : n[0])?.focus();
57
+ } else
58
+ c = e;
59
+ }
60
+ function a(t) {
61
+ if (t.key === "Tab") {
62
+ const {
63
+ activeElement: e
64
+ } = document, n = b(), s = d(n), u = s[s.length - 1];
65
+ t.shiftKey && e === s[0] ? c = u : !t.shiftKey && e === u && (c = s[0]);
66
+ }
67
+ }
68
+ function g(t) {
69
+ return t && (i = i.filter((e) => e !== t), i.push(t), window.addEventListener("focusin", l), window.addEventListener("keydown", a, !0), l()), () => {
70
+ c = null, i = i.filter((e) => e !== t), i.length === 0 && (window.removeEventListener("focusin", l), window.removeEventListener("keydown", a, !0));
71
+ };
72
+ }
73
+ function y(t, e) {
74
+ m(() => {
75
+ if (t) {
76
+ const n = e();
77
+ if (n)
78
+ return g(n);
79
+ }
80
+ }, [t]);
81
+ }
39
82
  export {
40
- f as getFocusNodeList,
41
- o as triggerFocus
83
+ d as getFocusNodeList,
84
+ g as lockFocus,
85
+ v as triggerFocus,
86
+ y as useLockFocus
42
87
  };
43
88
  //# sourceMappingURL=focus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focus.js","sources":["../../../../../../node_modules/@rc-component/util/es/Dom/focus.js"],"sourcesContent":["import { useEffect } from 'react';\nimport isVisible from \"./isVisible\";\nfunction focusable(node, includePositive = false) {\n if (isVisible(node)) {\n const nodeName = node.nodeName.toLowerCase();\n const isFocusableElement =\n // Focusable element\n ['input', 'select', 'textarea', 'button'].includes(nodeName) ||\n // Editable element\n node.isContentEditable ||\n // Anchor with href element\n nodeName === 'a' && !!node.getAttribute('href');\n\n // Get tabIndex\n const tabIndexAttr = node.getAttribute('tabindex');\n const tabIndexNum = Number(tabIndexAttr);\n\n // Parse as number if validate\n let tabIndex = null;\n if (tabIndexAttr && !Number.isNaN(tabIndexNum)) {\n tabIndex = tabIndexNum;\n } else if (isFocusableElement && tabIndex === null) {\n tabIndex = 0;\n }\n\n // Block focusable if disabled\n if (isFocusableElement && node.disabled) {\n tabIndex = null;\n }\n return tabIndex !== null && (tabIndex >= 0 || includePositive && tabIndex < 0);\n }\n return false;\n}\nexport function getFocusNodeList(node, includePositive = false) {\n const res = [...node.querySelectorAll('*')].filter(child => {\n return focusable(child, includePositive);\n });\n if (focusable(node, includePositive)) {\n res.unshift(node);\n }\n return res;\n}\n// Used for `rc-input` `rc-textarea` `rc-input-number`\n/**\n * Focus element and set cursor position for input/textarea elements.\n */\nexport function triggerFocus(element, option) {\n if (!element) return;\n element.focus(option);\n\n // Selection content\n const {\n cursor\n } = option || {};\n if (cursor && (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement)) {\n const len = element.value.length;\n switch (cursor) {\n case 'start':\n element.setSelectionRange(0, 0);\n break;\n case 'end':\n element.setSelectionRange(len, len);\n break;\n default:\n element.setSelectionRange(0, len);\n }\n }\n}\n\n// ======================================================\n// == Lock Focus ==\n// ======================================================\nlet lastFocusElement = null;\nlet focusElements = [];\nfunction getLastElement() {\n return focusElements[focusElements.length - 1];\n}\nfunction hasFocus(element) {\n const {\n activeElement\n } = document;\n return element === activeElement || element.contains(activeElement);\n}\nfunction syncFocus() {\n const lastElement = getLastElement();\n const {\n activeElement\n } = document;\n if (lastElement && !hasFocus(lastElement)) {\n const focusableList = getFocusNodeList(lastElement);\n const matchElement = focusableList.includes(lastFocusElement) ? lastFocusElement : focusableList[0];\n matchElement?.focus();\n } else {\n lastFocusElement = activeElement;\n }\n}\nfunction onWindowKeyDown(e) {\n if (e.key === 'Tab') {\n const {\n activeElement\n } = document;\n const lastElement = getLastElement();\n const focusableList = getFocusNodeList(lastElement);\n const last = focusableList[focusableList.length - 1];\n if (e.shiftKey && activeElement === focusableList[0]) {\n // Tab backward on first focusable element\n lastFocusElement = last;\n } else if (!e.shiftKey && activeElement === last) {\n // Tab forward on last focusable element\n lastFocusElement = focusableList[0];\n }\n }\n}\n\n/**\n * Lock focus in the element.\n * It will force back to the first focusable element when focus leaves the element.\n */\nexport function lockFocus(element) {\n if (element) {\n // Refresh focus elements\n focusElements = focusElements.filter(ele => ele !== element);\n focusElements.push(element);\n\n // Just add event since it will de-duplicate\n window.addEventListener('focusin', syncFocus);\n window.addEventListener('keydown', onWindowKeyDown, true);\n syncFocus();\n }\n\n // Always return unregister function\n return () => {\n lastFocusElement = null;\n focusElements = focusElements.filter(ele => ele !== element);\n if (focusElements.length === 0) {\n window.removeEventListener('focusin', syncFocus);\n window.removeEventListener('keydown', onWindowKeyDown, true);\n }\n };\n}\n\n/**\n * Lock focus within an element.\n * When locked, focus will be restricted to focusable elements within the specified element.\n * If multiple elements are locked, only the last locked element will be effective.\n */\nexport function useLockFocus(lock, getElement) {\n useEffect(() => {\n if (lock) {\n const element = getElement();\n if (element) {\n return lockFocus(element);\n }\n }\n }, [lock]);\n}"],"names":["focusable","node","includePositive","isVisible","nodeName","isFocusableElement","tabIndexAttr","tabIndexNum","tabIndex","getFocusNodeList","res","child","triggerFocus","element","option","cursor","len"],"mappings":";AAEA,SAASA,EAAUC,GAAMC,IAAkB,IAAO;AAChD,MAAIC,EAAUF,CAAI,GAAG;AACnB,UAAMG,IAAWH,EAAK,SAAS,YAAW,GACpCI;AAAA;AAAA,MAEN,CAAC,SAAS,UAAU,YAAY,QAAQ,EAAE,SAASD,CAAQ;AAAA,MAE3DH,EAAK;AAAA,MAELG,MAAa,OAAO,CAAC,CAACH,EAAK,aAAa,MAAM;AAAA,OAGxCK,IAAeL,EAAK,aAAa,UAAU,GAC3CM,IAAc,OAAOD,CAAY;AAGvC,QAAIE,IAAW;AACf,WAAIF,KAAgB,CAAC,OAAO,MAAMC,CAAW,IAC3CC,IAAWD,IACFF,KAAsBG,MAAa,SAC5CA,IAAW,IAITH,KAAsBJ,EAAK,aAC7BO,IAAW,OAENA,MAAa,SAASA,KAAY,KAAKN,KAAmBM,IAAW;AAAA,EAC9E;AACA,SAAO;AACT;AACO,SAASC,EAAiBR,GAAMC,IAAkB,IAAO;AAC9D,QAAMQ,IAAM,CAAC,GAAGT,EAAK,iBAAiB,GAAG,CAAC,EAAE,OAAO,CAAAU,MAC1CX,EAAUW,GAAOT,CAAe,CACxC;AACD,SAAIF,EAAUC,GAAMC,CAAe,KACjCQ,EAAI,QAAQT,CAAI,GAEXS;AACT;AAKO,SAASE,EAAaC,GAASC,GAAQ;AAC5C,MAAI,CAACD,EAAS;AACd,EAAAA,EAAQ,MAAMC,CAAM;AAGpB,QAAM;AAAA,IACJ,QAAAC;AAAA,EACJ,IAAMD,KAAU,CAAA;AACd,MAAIC,MAAWF,aAAmB,oBAAoBA,aAAmB,sBAAsB;AAC7F,UAAMG,IAAMH,EAAQ,MAAM;AAC1B,YAAQE,GAAM;AAAA,MACZ,KAAK;AACH,QAAAF,EAAQ,kBAAkB,GAAG,CAAC;AAC9B;AAAA,MACF,KAAK;AACH,QAAAA,EAAQ,kBAAkBG,GAAKA,CAAG;AAClC;AAAA,MACF;AACE,QAAAH,EAAQ,kBAAkB,GAAGG,CAAG;AAAA,IACxC;AAAA,EACE;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"focus.js","sources":["../../../../../../node_modules/@rc-component/util/es/Dom/focus.js"],"sourcesContent":["import { useEffect } from 'react';\nimport isVisible from \"./isVisible\";\nfunction focusable(node, includePositive = false) {\n if (isVisible(node)) {\n const nodeName = node.nodeName.toLowerCase();\n const isFocusableElement =\n // Focusable element\n ['input', 'select', 'textarea', 'button'].includes(nodeName) ||\n // Editable element\n node.isContentEditable ||\n // Anchor with href element\n nodeName === 'a' && !!node.getAttribute('href');\n\n // Get tabIndex\n const tabIndexAttr = node.getAttribute('tabindex');\n const tabIndexNum = Number(tabIndexAttr);\n\n // Parse as number if validate\n let tabIndex = null;\n if (tabIndexAttr && !Number.isNaN(tabIndexNum)) {\n tabIndex = tabIndexNum;\n } else if (isFocusableElement && tabIndex === null) {\n tabIndex = 0;\n }\n\n // Block focusable if disabled\n if (isFocusableElement && node.disabled) {\n tabIndex = null;\n }\n return tabIndex !== null && (tabIndex >= 0 || includePositive && tabIndex < 0);\n }\n return false;\n}\nexport function getFocusNodeList(node, includePositive = false) {\n const res = [...node.querySelectorAll('*')].filter(child => {\n return focusable(child, includePositive);\n });\n if (focusable(node, includePositive)) {\n res.unshift(node);\n }\n return res;\n}\n// Used for `rc-input` `rc-textarea` `rc-input-number`\n/**\n * Focus element and set cursor position for input/textarea elements.\n */\nexport function triggerFocus(element, option) {\n if (!element) return;\n element.focus(option);\n\n // Selection content\n const {\n cursor\n } = option || {};\n if (cursor && (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement)) {\n const len = element.value.length;\n switch (cursor) {\n case 'start':\n element.setSelectionRange(0, 0);\n break;\n case 'end':\n element.setSelectionRange(len, len);\n break;\n default:\n element.setSelectionRange(0, len);\n }\n }\n}\n\n// ======================================================\n// == Lock Focus ==\n// ======================================================\nlet lastFocusElement = null;\nlet focusElements = [];\nfunction getLastElement() {\n return focusElements[focusElements.length - 1];\n}\nfunction hasFocus(element) {\n const {\n activeElement\n } = document;\n return element === activeElement || element.contains(activeElement);\n}\nfunction syncFocus() {\n const lastElement = getLastElement();\n const {\n activeElement\n } = document;\n if (lastElement && !hasFocus(lastElement)) {\n const focusableList = getFocusNodeList(lastElement);\n const matchElement = focusableList.includes(lastFocusElement) ? lastFocusElement : focusableList[0];\n matchElement?.focus();\n } else {\n lastFocusElement = activeElement;\n }\n}\nfunction onWindowKeyDown(e) {\n if (e.key === 'Tab') {\n const {\n activeElement\n } = document;\n const lastElement = getLastElement();\n const focusableList = getFocusNodeList(lastElement);\n const last = focusableList[focusableList.length - 1];\n if (e.shiftKey && activeElement === focusableList[0]) {\n // Tab backward on first focusable element\n lastFocusElement = last;\n } else if (!e.shiftKey && activeElement === last) {\n // Tab forward on last focusable element\n lastFocusElement = focusableList[0];\n }\n }\n}\n\n/**\n * Lock focus in the element.\n * It will force back to the first focusable element when focus leaves the element.\n */\nexport function lockFocus(element) {\n if (element) {\n // Refresh focus elements\n focusElements = focusElements.filter(ele => ele !== element);\n focusElements.push(element);\n\n // Just add event since it will de-duplicate\n window.addEventListener('focusin', syncFocus);\n window.addEventListener('keydown', onWindowKeyDown, true);\n syncFocus();\n }\n\n // Always return unregister function\n return () => {\n lastFocusElement = null;\n focusElements = focusElements.filter(ele => ele !== element);\n if (focusElements.length === 0) {\n window.removeEventListener('focusin', syncFocus);\n window.removeEventListener('keydown', onWindowKeyDown, true);\n }\n };\n}\n\n/**\n * Lock focus within an element.\n * When locked, focus will be restricted to focusable elements within the specified element.\n * If multiple elements are locked, only the last locked element will be effective.\n */\nexport function useLockFocus(lock, getElement) {\n useEffect(() => {\n if (lock) {\n const element = getElement();\n if (element) {\n return lockFocus(element);\n }\n }\n }, [lock]);\n}"],"names":["focusable","node","includePositive","isVisible","nodeName","isFocusableElement","tabIndexAttr","tabIndexNum","tabIndex","getFocusNodeList","res","child","triggerFocus","element","option","cursor","len","lastFocusElement","focusElements","getLastElement","hasFocus","activeElement","syncFocus","lastElement","focusableList","onWindowKeyDown","e","last","lockFocus","ele","useLockFocus","lock","getElement","useEffect"],"mappings":";;AAEA,SAASA,EAAUC,GAAMC,IAAkB,IAAO;AAChD,MAAIC,EAAUF,CAAI,GAAG;AACnB,UAAMG,IAAWH,EAAK,SAAS,YAAW,GACpCI;AAAA;AAAA,MAEN,CAAC,SAAS,UAAU,YAAY,QAAQ,EAAE,SAASD,CAAQ;AAAA,MAE3DH,EAAK;AAAA,MAELG,MAAa,OAAO,CAAC,CAACH,EAAK,aAAa,MAAM;AAAA,OAGxCK,IAAeL,EAAK,aAAa,UAAU,GAC3CM,IAAc,OAAOD,CAAY;AAGvC,QAAIE,IAAW;AACf,WAAIF,KAAgB,CAAC,OAAO,MAAMC,CAAW,IAC3CC,IAAWD,IACFF,KAAsBG,MAAa,SAC5CA,IAAW,IAITH,KAAsBJ,EAAK,aAC7BO,IAAW,OAENA,MAAa,SAASA,KAAY,KAAKN,KAAmBM,IAAW;AAAA,EAC9E;AACA,SAAO;AACT;AACO,SAASC,EAAiBR,GAAMC,IAAkB,IAAO;AAC9D,QAAMQ,IAAM,CAAC,GAAGT,EAAK,iBAAiB,GAAG,CAAC,EAAE,OAAO,CAAAU,MAC1CX,EAAUW,GAAOT,CAAe,CACxC;AACD,SAAIF,EAAUC,GAAMC,CAAe,KACjCQ,EAAI,QAAQT,CAAI,GAEXS;AACT;AAKO,SAASE,EAAaC,GAASC,GAAQ;AAC5C,MAAI,CAACD,EAAS;AACd,EAAAA,EAAQ,MAAMC,CAAM;AAGpB,QAAM;AAAA,IACJ,QAAAC;AAAA,EACJ,IAAMD,KAAU,CAAA;AACd,MAAIC,MAAWF,aAAmB,oBAAoBA,aAAmB,sBAAsB;AAC7F,UAAMG,IAAMH,EAAQ,MAAM;A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,WAAWS,CAAS,GAC5C,OAAO,iBAAiB,WAAWG,GAAiB,EAAI,GACxDH,EAAS,IAIJ,MAAM;AACX,IAAAL,IAAmB,MACnBC,IAAgBA,EAAc,OAAO,CAAAW,MAAOA,MAAQhB,CAAO,GACvDK,EAAc,WAAW,MAC3B,OAAO,oBAAoB,WAAWI,CAAS,GAC/C,OAAO,oBAAoB,WAAWG,GAAiB,EAAI;AAAA,EAE/D;AACF;AAOO,SAASK,EAAaC,GAAMC,GAAY;AAC7C,EAAAC,EAAU,MAAM;AACd,QAAIF,GAAM;AACR,YAAMlB,IAAUmB,EAAU;AAC1B,UAAInB;AACF,eAAOe,EAAUf,CAAO;AAAA,IAE5B;AAAA,EACF,GAAG,CAACkB,CAAI,CAAC;AACX;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"KeyCode.js","sources":["../../../../../node_modules/@rc-component/util/es/KeyCode.js"],"sourcesContent":["/**\n * @ignore\n * some key-codes definition and utils from closure-library\n * @author yiminghe@gmail.com\n */\n\nconst KeyCode = {\n /**\n * MAC_ENTER\n */\n MAC_ENTER: 3,\n /**\n * BACKSPACE\n */\n BACKSPACE: 8,\n /**\n * TAB\n */\n TAB: 9,\n /**\n * NUMLOCK on FF/Safari Mac\n */\n NUM_CENTER: 12,\n // NUMLOCK on FF/Safari Mac\n /**\n * ENTER\n */\n ENTER: 13,\n /**\n * SHIFT\n */\n SHIFT: 16,\n /**\n * CTRL\n */\n CTRL: 17,\n /**\n * ALT\n */\n ALT: 18,\n /**\n * PAUSE\n */\n PAUSE: 19,\n /**\n * CAPS_LOCK\n */\n CAPS_LOCK: 20,\n /**\n * ESC\n */\n ESC: 27,\n /**\n * SPACE\n */\n SPACE: 32,\n /**\n * PAGE_UP\n */\n PAGE_UP: 33,\n // also NUM_NORTH_EAST\n /**\n * PAGE_DOWN\n */\n PAGE_DOWN: 34,\n // also NUM_SOUTH_EAST\n /**\n * END\n */\n END: 35,\n // also NUM_SOUTH_WEST\n /**\n * HOME\n */\n HOME: 36,\n // also NUM_NORTH_WEST\n /**\n * LEFT\n */\n LEFT: 37,\n // also NUM_WEST\n /**\n * UP\n */\n UP: 38,\n // also NUM_NORTH\n /**\n * RIGHT\n */\n RIGHT: 39,\n // also NUM_EAST\n /**\n * DOWN\n */\n DOWN: 40,\n // also NUM_SOUTH\n /**\n * PRINT_SCREEN\n */\n PRINT_SCREEN: 44,\n /**\n * INSERT\n */\n INSERT: 45,\n // also NUM_INSERT\n /**\n * DELETE\n */\n DELETE: 46,\n // also NUM_DELETE\n /**\n * ZERO\n */\n ZERO: 48,\n /**\n * ONE\n */\n ONE: 49,\n /**\n * TWO\n */\n TWO: 50,\n /**\n * THREE\n */\n THREE: 51,\n /**\n * FOUR\n */\n FOUR: 52,\n /**\n * FIVE\n */\n FIVE: 53,\n /**\n * SIX\n */\n SIX: 54,\n /**\n * SEVEN\n */\n SEVEN: 55,\n /**\n * EIGHT\n */\n EIGHT: 56,\n /**\n * NINE\n */\n NINE: 57,\n /**\n * QUESTION_MARK\n */\n QUESTION_MARK: 63,\n // needs localization\n /**\n * A\n */\n A: 65,\n /**\n * B\n */\n B: 66,\n /**\n * C\n */\n C: 67,\n /**\n * D\n */\n D: 68,\n /**\n * E\n */\n E: 69,\n /**\n * F\n */\n F: 70,\n /**\n * G\n */\n G: 71,\n /**\n * H\n */\n H: 72,\n /**\n * I\n */\n I: 73,\n /**\n * J\n */\n J: 74,\n /**\n * K\n */\n K: 75,\n /**\n * L\n */\n L: 76,\n /**\n * M\n */\n M: 77,\n /**\n * N\n */\n N: 78,\n /**\n * O\n */\n O: 79,\n /**\n * P\n */\n P: 80,\n /**\n * Q\n */\n Q: 81,\n /**\n * R\n */\n R: 82,\n /**\n * S\n */\n S: 83,\n /**\n * T\n */\n T: 84,\n /**\n * U\n */\n U: 85,\n /**\n * V\n */\n V: 86,\n /**\n * W\n */\n W: 87,\n /**\n * X\n */\n X: 88,\n /**\n * Y\n */\n Y: 89,\n /**\n * Z\n */\n Z: 90,\n /**\n * META\n */\n META: 91,\n // WIN_KEY_LEFT\n /**\n * WIN_KEY_RIGHT\n */\n WIN_KEY_RIGHT: 92,\n /**\n * CONTEXT_MENU\n */\n CONTEXT_MENU: 93,\n /**\n * NUM_ZERO\n */\n NUM_ZERO: 96,\n /**\n * NUM_ONE\n */\n NUM_ONE: 97,\n /**\n * NUM_TWO\n */\n NUM_TWO: 98,\n /**\n * NUM_THREE\n */\n NUM_THREE: 99,\n /**\n * NUM_FOUR\n */\n NUM_FOUR: 100,\n /**\n * NUM_FIVE\n */\n NUM_FIVE: 101,\n /**\n * NUM_SIX\n */\n NUM_SIX: 102,\n /**\n * NUM_SEVEN\n */\n NUM_SEVEN: 103,\n /**\n * NUM_EIGHT\n */\n NUM_EIGHT: 104,\n /**\n * NUM_NINE\n */\n NUM_NINE: 105,\n /**\n * NUM_MULTIPLY\n */\n NUM_MULTIPLY: 106,\n /**\n * NUM_PLUS\n */\n NUM_PLUS: 107,\n /**\n * NUM_MINUS\n */\n NUM_MINUS: 109,\n /**\n * NUM_PERIOD\n */\n NUM_PERIOD: 110,\n /**\n * NUM_DIVISION\n */\n NUM_DIVISION: 111,\n /**\n * F1\n */\n F1: 112,\n /**\n * F2\n */\n F2: 113,\n /**\n * F3\n */\n F3: 114,\n /**\n * F4\n */\n F4: 115,\n /**\n * F5\n */\n F5: 116,\n /**\n * F6\n */\n F6: 117,\n /**\n * F7\n */\n F7: 118,\n /**\n * F8\n */\n F8: 119,\n /**\n * F9\n */\n F9: 120,\n /**\n * F10\n */\n F10: 121,\n /**\n * F11\n */\n F11: 122,\n /**\n * F12\n */\n F12: 123,\n /**\n * NUMLOCK\n */\n NUMLOCK: 144,\n /**\n * SEMICOLON\n */\n SEMICOLON: 186,\n // needs localization\n /**\n * DASH\n */\n DASH: 189,\n // needs localization\n /**\n * EQUALS\n */\n EQUALS: 187,\n // needs localization\n /**\n * COMMA\n */\n COMMA: 188,\n // needs localization\n /**\n * PERIOD\n */\n PERIOD: 190,\n // needs localization\n /**\n * SLASH\n */\n SLASH: 191,\n // needs localization\n /**\n * APOSTROPHE\n */\n APOSTROPHE: 192,\n // needs localization\n /**\n * SINGLE_QUOTE\n */\n SINGLE_QUOTE: 222,\n // needs localization\n /**\n * OPEN_SQUARE_BRACKET\n */\n OPEN_SQUARE_BRACKET: 219,\n // needs localization\n /**\n * BACKSLASH\n */\n BACKSLASH: 220,\n // needs localization\n /**\n * CLOSE_SQUARE_BRACKET\n */\n CLOSE_SQUARE_BRACKET: 221,\n // needs localization\n /**\n * WIN_KEY\n */\n WIN_KEY: 224,\n /**\n * MAC_FF_META\n */\n MAC_FF_META: 224,\n // Firefox (Gecko) fires this for the meta key instead of 91\n /**\n * WIN_IME\n */\n WIN_IME: 229,\n // ======================== Function ========================\n /**\n * whether text and modified key is entered at the same time.\n */\n isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {\n const {\n keyCode\n } = e;\n if (e.altKey && !e.ctrlKey || e.metaKey ||\n // Function keys don't generate text\n keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {\n return false;\n }\n\n // The following keys are quite harmless, even in combination with\n // CTRL, ALT or SHIFT.\n switch (keyCode) {\n case KeyCode.ALT:\n case KeyCode.CAPS_LOCK:\n case KeyCode.CONTEXT_MENU:\n case KeyCode.CTRL:\n case KeyCode.DOWN:\n case KeyCode.END:\n case KeyCode.ESC:\n case KeyCode.HOME:\n case KeyCode.INSERT:\n case KeyCode.LEFT:\n case KeyCode.MAC_FF_META:\n case KeyCode.META:\n case KeyCode.NUMLOCK:\n case KeyCode.NUM_CENTER:\n case KeyCode.PAGE_DOWN:\n case KeyCode.PAGE_UP:\n case KeyCode.PAUSE:\n case KeyCode.PRINT_SCREEN:\n case KeyCode.RIGHT:\n case KeyCode.SHIFT:\n case KeyCode.UP:\n case KeyCode.WIN_KEY:\n case KeyCode.WIN_KEY_RIGHT:\n return false;\n default:\n return true;\n }\n },\n /**\n * whether character is entered.\n */\n isCharacterKey: function isCharacterKey(keyCode) {\n if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {\n return true;\n }\n if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {\n return true;\n }\n if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {\n return true;\n }\n\n // Safari sends zero key code for non-latin characters.\n if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {\n return true;\n }\n switch (keyCode) {\n case KeyCode.SPACE:\n case KeyCode.QUESTION_MARK:\n case KeyCode.NUM_PLUS:\n case KeyCode.NUM_MINUS:\n case KeyCode.NUM_PERIOD:\n case KeyCode.NUM_DIVISION:\n case KeyCode.SEMICOLON:\n case KeyCode.DASH:\n case KeyCode.EQUALS:\n case KeyCode.COMMA:\n case KeyCode.PERIOD:\n case KeyCode.SLASH:\n case KeyCode.APOSTROPHE:\n case KeyCode.SINGLE_QUOTE:\n case KeyCode.OPEN_SQUARE_BRACKET:\n case KeyCode.BACKSLASH:\n case KeyCode.CLOSE_SQUARE_BRACKET:\n return true;\n default:\n return false;\n }\n }\n};\nexport default KeyCode;"],"names":["KeyCode"],"mappings":"AAMK,MAACA,IAAU;AAAA;AAAA;AAAA;AAAA,EAQd,WAAW;AAAA;AAAA;AAAA;AAAA,EAIX,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EASL,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,MAAM;AAAA;AAAA;AAAA;AAAA,EAIN,KAAK;AAAA;AAAA;AAAA;AAAA,EAQL,WAAW;AAAA;AAAA;AAAA;AAAA,EAIX,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAcP,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,EAKL,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAKJ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKP,MAAM;AAAA;AAAA;AAAA;AAAA,EAoHN,GAAG;AAAA;AAAA;AAAA;AAAA,EAQH,GAAG;AAAA;AAAA;AAAA;AAAA,EA4CH,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,eAAe;AAAA;AAAA;AAAA;AAAA,EAIf,cAAc;AAAA;AAAA;AAAA;AAAA,EAgEd,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,KAAK;AAAA;AAAA;AAAA;AAAA,EAQL,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA,EAUX,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EA6CR,SAAS;AAgGX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"KeyCode.js","sources":["../../../../../node_modules/@rc-component/util/es/KeyCode.js"],"sourcesContent":["/**\n * @ignore\n * some key-codes definition and utils from closure-library\n * @author yiminghe@gmail.com\n */\n\nconst KeyCode = {\n /**\n * MAC_ENTER\n */\n MAC_ENTER: 3,\n /**\n * BACKSPACE\n */\n BACKSPACE: 8,\n /**\n * TAB\n */\n TAB: 9,\n /**\n * NUMLOCK on FF/Safari Mac\n */\n NUM_CENTER: 12,\n // NUMLOCK on FF/Safari Mac\n /**\n * ENTER\n */\n ENTER: 13,\n /**\n * SHIFT\n */\n SHIFT: 16,\n /**\n * CTRL\n */\n CTRL: 17,\n /**\n * ALT\n */\n ALT: 18,\n /**\n * PAUSE\n */\n PAUSE: 19,\n /**\n * CAPS_LOCK\n */\n CAPS_LOCK: 20,\n /**\n * ESC\n */\n ESC: 27,\n /**\n * SPACE\n */\n SPACE: 32,\n /**\n * PAGE_UP\n */\n PAGE_UP: 33,\n // also NUM_NORTH_EAST\n /**\n * PAGE_DOWN\n */\n PAGE_DOWN: 34,\n // also NUM_SOUTH_EAST\n /**\n * END\n */\n END: 35,\n // also NUM_SOUTH_WEST\n /**\n * HOME\n */\n HOME: 36,\n // also NUM_NORTH_WEST\n /**\n * LEFT\n */\n LEFT: 37,\n // also NUM_WEST\n /**\n * UP\n */\n UP: 38,\n // also NUM_NORTH\n /**\n * RIGHT\n */\n RIGHT: 39,\n // also NUM_EAST\n /**\n * DOWN\n */\n DOWN: 40,\n // also NUM_SOUTH\n /**\n * PRINT_SCREEN\n */\n PRINT_SCREEN: 44,\n /**\n * INSERT\n */\n INSERT: 45,\n // also NUM_INSERT\n /**\n * DELETE\n */\n DELETE: 46,\n // also NUM_DELETE\n /**\n * ZERO\n */\n ZERO: 48,\n /**\n * ONE\n */\n ONE: 49,\n /**\n * TWO\n */\n TWO: 50,\n /**\n * THREE\n */\n THREE: 51,\n /**\n * FOUR\n */\n FOUR: 52,\n /**\n * FIVE\n */\n FIVE: 53,\n /**\n * SIX\n */\n SIX: 54,\n /**\n * SEVEN\n */\n SEVEN: 55,\n /**\n * EIGHT\n */\n EIGHT: 56,\n /**\n * NINE\n */\n NINE: 57,\n /**\n * QUESTION_MARK\n */\n QUESTION_MARK: 63,\n // needs localization\n /**\n * A\n */\n A: 65,\n /**\n * B\n */\n B: 66,\n /**\n * C\n */\n C: 67,\n /**\n * D\n */\n D: 68,\n /**\n * E\n */\n E: 69,\n /**\n * F\n */\n F: 70,\n /**\n * G\n */\n G: 71,\n /**\n * H\n */\n H: 72,\n /**\n * I\n */\n I: 73,\n /**\n * J\n */\n J: 74,\n /**\n * K\n */\n K: 75,\n /**\n * L\n */\n L: 76,\n /**\n * M\n */\n M: 77,\n /**\n * N\n */\n N: 78,\n /**\n * O\n */\n O: 79,\n /**\n * P\n */\n P: 80,\n /**\n * Q\n */\n Q: 81,\n /**\n * R\n */\n R: 82,\n /**\n * S\n */\n S: 83,\n /**\n * T\n */\n T: 84,\n /**\n * U\n */\n U: 85,\n /**\n * V\n */\n V: 86,\n /**\n * W\n */\n W: 87,\n /**\n * X\n */\n X: 88,\n /**\n * Y\n */\n Y: 89,\n /**\n * Z\n */\n Z: 90,\n /**\n * META\n */\n META: 91,\n // WIN_KEY_LEFT\n /**\n * WIN_KEY_RIGHT\n */\n WIN_KEY_RIGHT: 92,\n /**\n * CONTEXT_MENU\n */\n CONTEXT_MENU: 93,\n /**\n * NUM_ZERO\n */\n NUM_ZERO: 96,\n /**\n * NUM_ONE\n */\n NUM_ONE: 97,\n /**\n * NUM_TWO\n */\n NUM_TWO: 98,\n /**\n * NUM_THREE\n */\n NUM_THREE: 99,\n /**\n * NUM_FOUR\n */\n NUM_FOUR: 100,\n /**\n * NUM_FIVE\n */\n NUM_FIVE: 101,\n /**\n * NUM_SIX\n */\n NUM_SIX: 102,\n /**\n * NUM_SEVEN\n */\n NUM_SEVEN: 103,\n /**\n * NUM_EIGHT\n */\n NUM_EIGHT: 104,\n /**\n * NUM_NINE\n */\n NUM_NINE: 105,\n /**\n * NUM_MULTIPLY\n */\n NUM_MULTIPLY: 106,\n /**\n * NUM_PLUS\n */\n NUM_PLUS: 107,\n /**\n * NUM_MINUS\n */\n NUM_MINUS: 109,\n /**\n * NUM_PERIOD\n */\n NUM_PERIOD: 110,\n /**\n * NUM_DIVISION\n */\n NUM_DIVISION: 111,\n /**\n * F1\n */\n F1: 112,\n /**\n * F2\n */\n F2: 113,\n /**\n * F3\n */\n F3: 114,\n /**\n * F4\n */\n F4: 115,\n /**\n * F5\n */\n F5: 116,\n /**\n * F6\n */\n F6: 117,\n /**\n * F7\n */\n F7: 118,\n /**\n * F8\n */\n F8: 119,\n /**\n * F9\n */\n F9: 120,\n /**\n * F10\n */\n F10: 121,\n /**\n * F11\n */\n F11: 122,\n /**\n * F12\n */\n F12: 123,\n /**\n * NUMLOCK\n */\n NUMLOCK: 144,\n /**\n * SEMICOLON\n */\n SEMICOLON: 186,\n // needs localization\n /**\n * DASH\n */\n DASH: 189,\n // needs localization\n /**\n * EQUALS\n */\n EQUALS: 187,\n // needs localization\n /**\n * COMMA\n */\n COMMA: 188,\n // needs localization\n /**\n * PERIOD\n */\n PERIOD: 190,\n // needs localization\n /**\n * SLASH\n */\n SLASH: 191,\n // needs localization\n /**\n * APOSTROPHE\n */\n APOSTROPHE: 192,\n // needs localization\n /**\n * SINGLE_QUOTE\n */\n SINGLE_QUOTE: 222,\n // needs localization\n /**\n * OPEN_SQUARE_BRACKET\n */\n OPEN_SQUARE_BRACKET: 219,\n // needs localization\n /**\n * BACKSLASH\n */\n BACKSLASH: 220,\n // needs localization\n /**\n * CLOSE_SQUARE_BRACKET\n */\n CLOSE_SQUARE_BRACKET: 221,\n // needs localization\n /**\n * WIN_KEY\n */\n WIN_KEY: 224,\n /**\n * MAC_FF_META\n */\n MAC_FF_META: 224,\n // Firefox (Gecko) fires this for the meta key instead of 91\n /**\n * WIN_IME\n */\n WIN_IME: 229,\n // ======================== Function ========================\n /**\n * whether text and modified key is entered at the same time.\n */\n isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {\n const {\n keyCode\n } = e;\n if (e.altKey && !e.ctrlKey || e.metaKey ||\n // Function keys don't generate text\n keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {\n return false;\n }\n\n // The following keys are quite harmless, even in combination with\n // CTRL, ALT or SHIFT.\n switch (keyCode) {\n case KeyCode.ALT:\n case KeyCode.CAPS_LOCK:\n case KeyCode.CONTEXT_MENU:\n case KeyCode.CTRL:\n case KeyCode.DOWN:\n case KeyCode.END:\n case KeyCode.ESC:\n case KeyCode.HOME:\n case KeyCode.INSERT:\n case KeyCode.LEFT:\n case KeyCode.MAC_FF_META:\n case KeyCode.META:\n case KeyCode.NUMLOCK:\n case KeyCode.NUM_CENTER:\n case KeyCode.PAGE_DOWN:\n case KeyCode.PAGE_UP:\n case KeyCode.PAUSE:\n case KeyCode.PRINT_SCREEN:\n case KeyCode.RIGHT:\n case KeyCode.SHIFT:\n case KeyCode.UP:\n case KeyCode.WIN_KEY:\n case KeyCode.WIN_KEY_RIGHT:\n return false;\n default:\n return true;\n }\n },\n /**\n * whether character is entered.\n */\n isCharacterKey: function isCharacterKey(keyCode) {\n if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {\n return true;\n }\n if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {\n return true;\n }\n if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {\n return true;\n }\n\n // Safari sends zero key code for non-latin characters.\n if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {\n return true;\n }\n switch (keyCode) {\n case KeyCode.SPACE:\n case KeyCode.QUESTION_MARK:\n case KeyCode.NUM_PLUS:\n case KeyCode.NUM_MINUS:\n case KeyCode.NUM_PERIOD:\n case KeyCode.NUM_DIVISION:\n case KeyCode.SEMICOLON:\n case KeyCode.DASH:\n case KeyCode.EQUALS:\n case KeyCode.COMMA:\n case KeyCode.PERIOD:\n case KeyCode.SLASH:\n case KeyCode.APOSTROPHE:\n case KeyCode.SINGLE_QUOTE:\n case KeyCode.OPEN_SQUARE_BRACKET:\n case KeyCode.BACKSLASH:\n case KeyCode.CLOSE_SQUARE_BRACKET:\n return true;\n default:\n return false;\n }\n },\n isEditableTarget: function isEditableTarget(e) {\n const target = e.target;\n if (!(target instanceof HTMLElement)) {\n return false;\n }\n const tagName = target.tagName;\n if (tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT' || target.isContentEditable) {\n return true;\n }\n return false;\n }\n};\nexport default KeyCode;"],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AAAA;AAAA,EAIL,KAAK;AAAA;AAAA;AAAA;AAAA,EAQL,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA,EAUX,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EA6CR,SAAS;AA2GX;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useId.js","sources":["../../../../../../node_modules/@rc-component/util/es/hooks/useId.js"],"sourcesContent":["import * as React from 'react';\nfunction getUseId() {\n // We need fully clone React function here to avoid webpack warning React 17 do not export `useId`\n const fullClone = {\n ...React\n };\n return fullClone.useId;\n}\nlet uuid = 0;\n\n/** @private Note only worked in develop env. Not work in production. */\nexport function resetUuid() {\n if (process.env.NODE_ENV !== 'production') {\n uuid = 0;\n }\n}\nconst useOriginId = getUseId();\nexport default useOriginId ?\n// Use React `useId`\nfunction useId(id) {\n const reactId = useOriginId();\n\n // Developer passed id is single source of truth\n if (id) {\n return id;\n }\n\n // Test env always return mock id\n if (process.env.NODE_ENV === 'test') {\n return 'test-id';\n }\n return reactId;\n} :\n// Use compatible of `useId`\nfunction useCompatId(id) {\n // Inner id for accessibility usage. Only work in client side\n const [innerId, setInnerId] = React.useState('ssr-id');\n React.useEffect(() => {\n const nextId = uuid;\n uuid += 1;\n setInnerId(`rc_unique_${nextId}`);\n }, []);\n\n // Developer passed id is single source of truth\n if (id) {\n return id;\n }\n\n // Test env always return mock id\n if (process.env.NODE_ENV === 'test') {\n return 'test-id';\n }\n\n // Return react native id or inner id\n return innerId;\n};"],"names":["getUseId","React","uuid","useOriginId","useId","id","reactId","process","innerId","setInnerId","nextId"],"mappings":";;AACA,SAASA,IAAW;AAKlB,SAHkB;AAAA,IAChB,GAAGC;AAAA,EACP,EACmB;AACnB;AACA,IAAIC,IAAO;AAQX,MAAMC,IAAcH,EAAQ,GAC5BI,IAAeD;AAAA;AAAA,EAEf,SAAeE,GAAI;AACjB,UAAMC,IAAUH,EAAW;AAG3B,WAAIE,MAKAE,EAAQ,IAAI,aAAa,SACpB,YAEFD;AAAA,EACT;AAAA;AAAA;AAAA,EAEA,SAAqBD,GAAI;AAEvB,UAAM,CAACG,GAASC,CAAU,IAAIR,EAAM,SAAS,QAAQ;AAQrD,WAPAA,EAAM,UAAU,MAAM;AACpB,YAAMS,IAASR;AACf,MAAAA,KAAQ,GACRO,EAAW,aAAaC,CAAM,EAAE;AAAA,IAClC,GAAG,CAAA,CAAE,GAGDL,MAKAE,EAAQ,IAAI,aAAa,SACpB,YAIFC;AAAA,EACT;AAAA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useId.js","sources":["../../../../../../node_modules/@rc-component/util/es/hooks/useId.js"],"sourcesContent":["import * as React from 'react';\nfunction getUseId() {\n // We need fully clone React function here to avoid webpack warning React 17 do not export `useId`\n const fullClone = {\n ...React\n };\n return fullClone.useId;\n}\nlet uuid = 0;\n\n/** @private Note only worked in develop env. Not work in production. */\nexport function resetUuid() {\n if (process.env.NODE_ENV !== 'production') {\n uuid = 0;\n }\n}\n\n/**\n * Generate a valid HTML id from prefix and key.\n * Sanitizes the key by replacing invalid characters with hyphens.\n * @param prefix - The prefix for the id\n * @param key - The key from React element, may contain spaces or invalid characters\n * @returns A valid HTML id string\n */\nexport function getId(prefix, key) {\n // React.Key can be string | number, convert to string first\n const keyStr = String(key);\n\n // Valid id characters: letters, digits, hyphen, underscore, colon, period\n // Replace all invalid characters (including spaces) with hyphens to preserve length\n const sanitizedKey = keyStr.replace(/[^a-zA-Z0-9_.:-]/g, '-');\n return `${prefix}-${sanitizedKey}`;\n}\nconst useOriginId = getUseId();\nexport default useOriginId ?\n// Use React `useId`\nfunction useId(id) {\n const reactId = useOriginId();\n\n // Developer passed id is single source of truth\n if (id) {\n return id;\n }\n\n // Test env always return mock id\n if (process.env.NODE_ENV === 'test') {\n return 'test-id';\n }\n return reactId;\n} :\n// Use compatible of `useId`\nfunction useCompatId(id) {\n // Inner id for accessibility usage. Only work in client side\n const [innerId, setInnerId] = React.useState('ssr-id');\n React.useEffect(() => {\n const nextId = uuid;\n uuid += 1;\n setInnerId(`rc_unique_${nextId}`);\n }, []);\n\n // Developer passed id is single source of truth\n if (id) {\n return id;\n }\n\n // Test env always return mock id\n if (process.env.NODE_ENV === 'test') {\n return 'test-id';\n }\n\n // Return react native id or inner id\n return innerId;\n};"],"names":["getUseId","React","uuid","useOriginId","useId","id","reactId","process","innerId","setInnerId","nextId"],"mappings":";;AACA,SAASA,IAAW;AAKlB,SAHkB;AAAA,IAChB,GAAGC;AAAA,EACP,EACmB;AACnB;AACA,IAAIC,IAAO;AAyBX,MAAMC,IAAcH,EAAQ,GAC5BI,IAAeD;AAAA;AAAA,EAEf,SAAeE,GAAI;AACjB,UAAMC,IAAUH,EAAW;AAG3B,WAAIE,MAKAE,EAAQ,IAAI,aAAa,SACpB,YAEFD;AAAA,EACT;AAAA;AAAA;AAAA,EAEA,SAAqBD,GAAI;AAEvB,UAAM,CAACG,GAASC,CAAU,IAAIR,EAAM,SAAS,QAAQ;AAQrD,WAPAA,EAAM,UAAU,MAAM;AACpB,YAAMS,IAASR;AACf,MAAAA,KAAQ,GACRO,EAAW,aAAaC,CAAM,EAAE;AAAA,IAClC,GAAG,CAAA,CAAE,GAGDL,MAKAE,EAAQ,IAAI,aAAa,SACpB,YAIFC;AAAA,EACT;AAAA;","x_google_ignoreList":[0]}
@@ -1,14 +1,14 @@
1
1
  import * as t from "react";
2
- function c(r) {
3
- const e = t.useRef(!1), [u, a] = t.useState(r);
2
+ const c = (r) => {
3
+ const e = t.useRef(!1), [u, s] = t.useState(r);
4
4
  t.useEffect(() => (e.current = !1, () => {
5
5
  e.current = !0;
6
6
  }), []);
7
- function f(s, n) {
8
- n && e.current || a(s);
7
+ function a(f, n) {
8
+ n && e.current || s(f);
9
9
  }
10
- return [u, f];
11
- }
10
+ return [u, a];
11
+ };
12
12
  export {
13
13
  c as default
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useState.js","sources":["../../../../../../node_modules/@rc-component/util/es/hooks/useState.js"],"sourcesContent":["import * as React from 'react';\n/**\n * Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.\n * We do not make this auto is to avoid real memory leak.\n * Developer should confirm it's safe to ignore themselves.\n */\nexport default function useSafeState(defaultValue) {\n const destroyRef = React.useRef(false);\n const [value, setValue] = React.useState(defaultValue);\n React.useEffect(() => {\n destroyRef.current = false;\n return () => {\n destroyRef.current = true;\n };\n }, []);\n function safeSetState(updater, ignoreDestroy) {\n if (ignoreDestroy && destroyRef.current) {\n return;\n }\n setValue(updater);\n }\n return [value, safeSetState];\n}"],"names":["useSafeState","defaultValue","destroyRef","React","value","setValue","safeSetState","updater","ignoreDestroy"],"mappings":";AAMe,SAASA,EAAaC,GAAc;AACjD,QAAMC,IAAaC,EAAM,OAAO,EAAK,GAC/B,CAACC,GAAOC,CAAQ,IAAIF,EAAM,SAASF,CAAY;AACrD,EAAAE,EAAM,UAAU,OACdD,EAAW,UAAU,IACd,MAAM;AACX,IAAAA,EAAW,UAAU;AAAA,EACvB,IACC,CAAA,CAAE;AACL,WAASI,EAAaC,GAASC,GAAe;AAC5C,IAAIA,KAAiBN,EAAW,WAGhCG,EAASE,CAAO;AAAA,EAClB;AACA,SAAO,CAACH,GAAOE,CAAY;AAC7B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useState.js","sources":["../../../../../../node_modules/@rc-component/util/es/hooks/useState.js"],"sourcesContent":["import * as React from 'react';\n/**\n * Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.\n * We do not make this auto is to avoid real memory leak.\n * Developer should confirm it's safe to ignore themselves.\n */\nconst useSafeState = defaultValue => {\n const destroyRef = React.useRef(false);\n const [value, setValue] = React.useState(defaultValue);\n React.useEffect(() => {\n destroyRef.current = false;\n return () => {\n destroyRef.current = true;\n };\n }, []);\n function safeSetState(updater, ignoreDestroy) {\n if (ignoreDestroy && destroyRef.current) {\n return;\n }\n setValue(updater);\n }\n return [value, safeSetState];\n};\nexport default useSafeState;"],"names":["useSafeState","defaultValue","destroyRef","React","value","setValue","safeSetState","updater","ignoreDestroy"],"mappings":";AAMK,MAACA,IAAe,CAAAC,MAAgB;AACnC,QAAMC,IAAaC,EAAM,OAAO,EAAK,GAC/B,CAACC,GAAOC,CAAQ,IAAIF,EAAM,SAASF,CAAY;AACrD,EAAAE,EAAM,UAAU,OACdD,EAAW,UAAU,IACd,MAAM;AACX,IAAAA,EAAW,UAAU;AAAA,EACvB,IACC,CAAA,CAAE;AACL,WAASI,EAAaC,GAASC,GAAe;AAC5C,IAAIA,KAAiBN,EAAW,WAGhCG,EAASE,CAAO;AAAA,EAClB;AACA,SAAO,CAACH,GAAOE,CAAY;AAC7B;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useSyncState.js","sources":["../../../../../../node_modules/@rc-component/util/es/hooks/useSyncState.js"],"sourcesContent":["import * as React from 'react';\nimport useEvent from \"./useEvent\";\n/**\n * Same as React.useState but will always get latest state.\n * This is useful when React merge multiple state updates into one.\n * e.g. onTransitionEnd trigger multiple event at once will be merged state update in React.\n */\nexport default function useSyncState(defaultValue) {\n const [, forceUpdate] = React.useReducer(x => x + 1, 0);\n const currentValueRef = React.useRef(defaultValue);\n const getValue = useEvent(() => {\n return currentValueRef.current;\n });\n const setValue = useEvent(updater => {\n currentValueRef.current = typeof updater === 'function' ? updater(currentValueRef.current) : updater;\n forceUpdate();\n });\n return [getValue, setValue];\n}"],"names":["useSyncState","defaultValue","forceUpdate","React","x","currentValueRef","getValue","useEvent","setValue","updater"],"mappings":";;AAOe,SAASA,EAAaC,GAAc;AACjD,QAAM,CAAA,EAAGC,CAAW,IAAIC,EAAM,WAAW,CAAAC,MAAKA,IAAI,GAAG,CAAC,GAChDC,IAAkBF,EAAM,OAAOF,CAAY,GAC3CK,IAAWC,EAAS,MACjBF,EAAgB,OACxB,GACKG,IAAWD,EAAS,CAAAE,MAAW;AACnC,IAAAJ,EAAgB,UAAU,OAAOI,KAAY,aAAaA,EAAQJ,EAAgB,OAAO,IAAII,GAC7FP,EAAW;AAAA,EACb,CAAC;AACD,SAAO,CAACI,GAAUE,CAAQ;AAC5B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useSyncState.js","sources":["../../../../../../node_modules/@rc-component/util/es/hooks/useSyncState.js"],"sourcesContent":["import * as React from 'react';\nimport useEvent from \"./useEvent\";\n/**\n * Same as React.useState but will always get latest state.\n * This is useful when React merge multiple state updates into one.\n * e.g. onTransitionEnd trigger multiple event at once will be merged state update in React.\n */\nfunction useSyncState(defaultValue) {\n const [, forceUpdate] = React.useReducer(x => x + 1, 0);\n const currentValueRef = React.useRef(defaultValue);\n const getValue = useEvent(() => {\n return currentValueRef.current;\n });\n const setValue = useEvent(updater => {\n currentValueRef.current = typeof updater === 'function' ? updater(currentValueRef.current) : updater;\n forceUpdate();\n });\n return [getValue, setValue];\n}\nexport default useSyncState;"],"names":["useSyncState","defaultValue","forceUpdate","React","x","currentValueRef","getValue","useEvent","setValue","updater"],"mappings":";;AAOA,SAASA,EAAaC,GAAc;AAClC,QAAM,CAAA,EAAGC,CAAW,IAAIC,EAAM,WAAW,CAAAC,MAAKA,IAAI,GAAG,CAAC,GAChDC,IAAkBF,EAAM,OAAOF,CAAY,GAC3CK,IAAWC,EAAS,MACjBF,EAAgB,OACxB,GACKG,IAAWD,EAAS,CAAAE,MAAW;AACnC,IAAAJ,EAAgB,UAAU,OAAOI,KAAY,aAAaA,EAAQJ,EAAgB,OAAO,IAAII,GAC7FP,EAAW;AAAA,EACb,CAAC;AACD,SAAO,CAACI,GAAUE,CAAQ;AAC5B;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { warningOnce as y } from "./warning.js";
1
+ import y from "./warning.js";
2
2
  function h(c, o, a = !1) {
3
3
  const f = /* @__PURE__ */ new Set();
4
4
  function n(e, r, s = 1) {
@@ -1,51 +1,51 @@
1
1
  import y from "./get.js";
2
- function p(e, n, o, f) {
3
- if (!n.length)
4
- return o;
5
- const [r, ...l] = n;
2
+ function b(e, o, c, f) {
3
+ if (!o.length)
4
+ return c;
5
+ const [r, ...l] = o;
6
6
  let t;
7
7
  return !e && typeof r == "number" ? t = [] : Array.isArray(e) ? t = [...e] : t = {
8
8
  ...e
9
- }, f && o === void 0 && l.length === 1 ? delete t[r][l[0]] : t[r] = p(t[r], l, o, f), t;
9
+ }, f && c === void 0 && l.length === 1 ? delete t[r][l[0]] : t[r] = b(t[r], l, c, f), t;
10
10
  }
11
- function a(e, n, o, f = !1) {
12
- return n.length && f && o === void 0 && !y(e, n.slice(0, -1)) ? e : p(e, n, o, f);
11
+ function a(e, o, c, f = !1) {
12
+ return o.length && f && c === void 0 && !y(e, o.slice(0, -1)) ? e : b(e, o, c, f);
13
13
  }
14
- function O(e) {
14
+ function d(e) {
15
15
  return typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype;
16
16
  }
17
17
  function A(e) {
18
18
  return Array.isArray(e) ? [] : {};
19
19
  }
20
20
  const j = typeof Reflect > "u" ? Object.keys : Reflect.ownKeys;
21
- function m(e, n = {}) {
21
+ function m(e, o = {}) {
22
22
  const {
23
- prepareArray: o
24
- } = n, f = o || (() => []);
23
+ prepareArray: c
24
+ } = o, f = c || (() => []);
25
25
  let r = A(e[0]);
26
26
  return e.forEach((l) => {
27
- function t(i, d) {
28
- const s = new Set(d), c = y(l, i), g = Array.isArray(c);
29
- if (g || O(c)) {
30
- if (!s.has(c)) {
31
- s.add(c);
27
+ function t(i, O) {
28
+ const s = new Set(O), n = y(l, i), g = Array.isArray(n);
29
+ if (g || d(n)) {
30
+ if (!s.has(n)) {
31
+ s.add(n);
32
32
  const u = y(r, i);
33
- g ? r = a(r, i, f(u, c)) : (!u || typeof u != "object") && (r = a(r, i, A(c))), j(c).forEach((b) => {
34
- t([...i, b], s);
33
+ g ? r = a(r, i, f(u, n)) : (!u || typeof u != "object") && (r = a(r, i, A(n))), j(n).forEach((p) => {
34
+ Object.getOwnPropertyDescriptor(n, p).enumerable && t([...i, p], s);
35
35
  });
36
36
  }
37
37
  } else
38
- r = a(r, i, c);
38
+ r = a(r, i, n);
39
39
  }
40
40
  t([]);
41
41
  }), r;
42
42
  }
43
- function P(...e) {
43
+ function w(...e) {
44
44
  return m(e);
45
45
  }
46
46
  export {
47
47
  a as default,
48
- P as merge,
48
+ w as merge,
49
49
  m as mergeWith
50
50
  };
51
51
  //# sourceMappingURL=set.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"set.js","sources":["../../../../../../node_modules/@rc-component/util/es/utils/set.js"],"sourcesContent":["import get from \"./get\";\nfunction internalSet(entity, paths, value, removeIfUndefined) {\n if (!paths.length) {\n return value;\n }\n const [path, ...restPath] = paths;\n let clone;\n if (!entity && typeof path === 'number') {\n clone = [];\n } else if (Array.isArray(entity)) {\n clone = [...entity];\n } else {\n clone = {\n ...entity\n };\n }\n\n // Delete prop if `removeIfUndefined` and value is undefined\n if (removeIfUndefined && value === undefined && restPath.length === 1) {\n delete clone[path][restPath[0]];\n } else {\n clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);\n }\n return clone;\n}\nexport default function set(entity, paths, value, removeIfUndefined = false) {\n // Do nothing if `removeIfUndefined` and parent object not exist\n if (paths.length && removeIfUndefined && value === undefined && !get(entity, paths.slice(0, -1))) {\n return entity;\n }\n return internalSet(entity, paths, value, removeIfUndefined);\n}\nfunction isObject(obj) {\n return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;\n}\nfunction createEmpty(source) {\n return Array.isArray(source) ? [] : {};\n}\nconst keys = typeof Reflect === 'undefined' ? Object.keys : Reflect.ownKeys;\n\n// ================================ Merge ================================\n\n/**\n * Merge multiple objects. Support custom merge logic.\n * @param sources object sources\n * @param config.prepareArray Customize array prepare function.\n * It will return empty [] by default.\n * So when match array, it will auto be override with next array in sources.\n */\nexport function mergeWith(sources, config = {}) {\n const {\n prepareArray\n } = config;\n const finalPrepareArray = prepareArray || (() => []);\n let clone = createEmpty(sources[0]);\n sources.forEach(src => {\n function internalMerge(path, parentLoopSet) {\n const loopSet = new Set(parentLoopSet);\n const value = get(src, path);\n const isArr = Array.isArray(value);\n if (isArr || isObject(value)) {\n // Only add not loop obj\n if (!loopSet.has(value)) {\n loopSet.add(value);\n const originValue = get(clone, path);\n if (isArr) {\n // Array will always be override\n clone = set(clone, path, finalPrepareArray(originValue, value));\n } else if (!originValue || typeof originValue !== 'object') {\n // Init container if not exist\n clone = set(clone, path, createEmpty(value));\n }\n keys(value).forEach(key => {\n internalMerge([...path, key], loopSet);\n });\n }\n } else {\n clone = set(clone, path, value);\n }\n }\n internalMerge([]);\n });\n return clone;\n}\n\n/**\n * Merge multiple objects into a new single object.\n * Arrays will be replaced by default.\n */\nexport function merge(...sources) {\n return mergeWith(sources);\n}"],"names":["internalSet","entity","paths","value","removeIfUndefined","path","restPath","clone","set","get","isObject","obj","createEmpty","source","keys","mergeWith","sources","config","prepareArray","finalPrepareArray","src","internalMerge","parentLoopSet","loopSet","isArr","originValue","key","merge"],"mappings":";AACA,SAASA,EAAYC,GAAQC,GAAOC,GAAOC,GAAmB;AAC5D,MAAI,CAACF,EAAM;AACT,WAAOC;AAET,QAAM,CAACE,GAAM,GAAGC,CAAQ,IAAIJ;AAC5B,MAAIK;AACJ,SAAI,CAACN,KAAU,OAAOI,KAAS,WAC7BE,IAAQ,CAAA,IACC,MAAM,QAAQN,CAAM,IAC7BM,IAAQ,CAAC,GAAGN,CAAM,IAElBM,IAAQ;AAAA,IACN,GAAGN;AAAA,EACT,GAIMG,KAAqBD,MAAU,UAAaG,EAAS,WAAW,IAClE,OAAOC,EAAMF,CAAI,EAAEC,EAAS,CAAC,CAAC,IAE9BC,EAAMF,CAAI,IAAIL,EAAYO,EAAMF,CAAI,GAAGC,GAAUH,GAAOC,CAAiB,GAEpEG;AACT;AACe,SAASC,EAAIP,GAAQC,GAAOC,GAAOC,IAAoB,IAAO;AAE3E,SAAIF,EAAM,UAAUE,KAAqBD,MAAU,UAAa,CAACM,EAAIR,GAAQC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AAAkB,EAAc,CAAA,CAAE;AAAA,EAClB,CAAC,GACMd;AACT;AAMO,SAASoB,KAASX,GAAS;AAChC,SAAOD,EAAUC,CAAO;AAC1B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"set.js","sources":["../../../../../../node_modules/@rc-component/util/es/utils/set.js"],"sourcesContent":["import get from \"./get\";\nfunction internalSet(entity, paths, value, removeIfUndefined) {\n if (!paths.length) {\n return value;\n }\n const [path, ...restPath] = paths;\n let clone;\n if (!entity && typeof path === 'number') {\n clone = [];\n } else if (Array.isArray(entity)) {\n clone = [...entity];\n } else {\n clone = {\n ...entity\n };\n }\n\n // Delete prop if `removeIfUndefined` and value is undefined\n if (removeIfUndefined && value === undefined && restPath.length === 1) {\n delete clone[path][restPath[0]];\n } else {\n clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);\n }\n return clone;\n}\nexport default function set(entity, paths, value, removeIfUndefined = false) {\n // Do nothing if `removeIfUndefined` and parent object not exist\n if (paths.length && removeIfUndefined && value === undefined && !get(entity, paths.slice(0, -1))) {\n return entity;\n }\n return internalSet(entity, paths, value, removeIfUndefined);\n}\nfunction isObject(obj) {\n return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;\n}\nfunction createEmpty(source) {\n return Array.isArray(source) ? [] : {};\n}\nconst keys = typeof Reflect === 'undefined' ? Object.keys : Reflect.ownKeys;\n\n// ================================ Merge ================================\n\n/**\n * Merge multiple objects. Support custom merge logic.\n * @param sources object sources\n * @param config.prepareArray Customize array prepare function.\n * It will return empty [] by default.\n * So when match array, it will auto be override with next array in sources.\n */\nexport function mergeWith(sources, config = {}) {\n const {\n prepareArray\n } = config;\n const finalPrepareArray = prepareArray || (() => []);\n let clone = createEmpty(sources[0]);\n sources.forEach(src => {\n function internalMerge(path, parentLoopSet) {\n const loopSet = new Set(parentLoopSet);\n const value = get(src, path);\n const isArr = Array.isArray(value);\n if (isArr || isObject(value)) {\n // Only add not loop obj\n if (!loopSet.has(value)) {\n loopSet.add(value);\n const originValue = get(clone, path);\n if (isArr) {\n // Array will always be override\n clone = set(clone, path, finalPrepareArray(originValue, value));\n } else if (!originValue || typeof originValue !== 'object') {\n // Init container if not exist\n clone = set(clone, path, createEmpty(value));\n }\n keys(value).forEach(key => {\n if (Object.getOwnPropertyDescriptor(value, key).enumerable) {\n internalMerge([...path, key], loopSet);\n }\n });\n }\n } else {\n clone = set(clone, path, value);\n }\n }\n internalMerge([]);\n });\n return clone;\n}\n\n/**\n * Merge multiple objects into a new single object.\n * Arrays will be replaced by default.\n */\nexport function merge(...sources) {\n return mergeWith(sources);\n}"],"names":["internalSet","entity","paths","value","removeIfUndefined","path","restPath","clone","set","get","isObject","obj","createEmpty","source","keys","mergeWith","sources","config","prepareArray","finalPrepareArray","src","internalMerge","parentLoopSet","loopSet","isArr","originValue","key","merge"],"mappings":";AACA,SAASA,EAAYC,GAAQC,GAAOC,GAAOC,GAAmB;AAC5D,MAAI,CAACF,EAAM;AACT,WAAOC;AAET,QAAM,CAACE,GAAM,GAAGC,CAAQ,IAAIJ;AAC5B,MAAIK;AACJ,SAAI,CAACN,KAAU,OAAOI,KAAS,WAC7BE,IAAQ,CAAA,IACC,MAAM,QAAQN,CAAM,IAC7BM,IAAQ,CAAC,GAAGN,CAAM,IAElBM,IAAQ;AAAA,IACN,GAAGN;AAAA,EACT,GAIMG,KAAqBD,MAAU,UAAaG,EAAS,WAAW,IAClE,OAAOC,EAAMF,CAAI,EAAEC,EAAS,CAAC,CAAC,IAE9BC,EAAMF,CAAI,IAAIL,EAAYO,EAAMF,CAAI,GAAGC,GAAUH,GAAOC,CAAiB,GAEpEG;AACT;AACe,SAASC,EAAIP,GAAQC,GAAOC,GAAOC,IAAoB,IAAO;AAE3E,SAAIF,EAAM,UAAUE,KAAqBD,MAAU,UAAa,CAACM,EAAIR,GAAQC,EAAM,MAAM,GAAG,EAAE,CAAC,IACtFD,IAEFD,EAAYC,GAAQC,GAAOC,GAAOC,CAAiB;AAC5D;A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ACMd;AACT;AAMO,SAASoB,KAASX,GAAS;AAChC,SAAOD,EAAUC,CAAO;AAC1B;","x_google_ignoreList":[0]}
@@ -2,7 +2,7 @@ import I from "../../../../vite-plugin-node-polyfills/shims/process/dist/index.j
2
2
  import * as y from "react";
3
3
  import L from "../../../util/es/raf.js";
4
4
  import N from "../../../util/es/hooks/useLayoutEffect.js";
5
- import { warningOnce as O } from "../../../util/es/warning.js";
5
+ import O from "../../../util/es/warning.js";
6
6
  const H = 10;
7
7
  function P(f, u, b, E, h, M, x, v) {
8
8
  const B = y.useRef(), [i, d] = y.useState(null);
@@ -1,6 +1,6 @@
1
1
  import d from "../../../vite-plugin-node-polyfills/shims/process/dist/index.js";
2
2
  import * as c from "react";
3
- import { warningOnce as p } from "../../../@rc-component/util/es/warning.js";
3
+ import p from "../../../@rc-component/util/es/warning.js";
4
4
  function u() {
5
5
  }
6
6
  const {