ods-component-lib 1.22.2 → 1.22.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.
- package/dist/_virtual/index5.js +2 -3
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +3 -2
- package/dist/_virtual/index6.js.map +1 -1
- package/dist/components/antd/currencyInput/CurrencySelect.js +15 -14
- package/dist/components/antd/currencyInput/CurrencySelect.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js +6 -6
- package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js +20 -20
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js +101 -98
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/util/index.js +29 -27
- package/dist/node_modules/@ant-design/cssinjs/es/util/index.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/index.js +20 -20
- package/dist/node_modules/@rc-component/async-validator/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/messages.js +1 -0
- package/dist/node_modules/@rc-component/async-validator/es/messages.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/rule/type.js +18 -8
- package/dist/node_modules/@rc-component/async-validator/es/rule/type.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/util.js +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/util.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/validator/index.js +1 -0
- package/dist/node_modules/@rc-component/async-validator/es/validator/index.js.map +1 -1
- package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js +88 -68
- package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js +75 -96
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js +22 -20
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js +92 -100
- package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js +40 -29
- package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/hooks/useForm.js +115 -100
- package/dist/node_modules/@rc-component/form/es/hooks/useForm.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/NameMap.js +28 -22
- package/dist/node_modules/@rc-component/form/es/utils/NameMap.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/messages.js +1 -0
- package/dist/node_modules/@rc-component/form/es/utils/messages.js.map +1 -1
- package/dist/node_modules/@rc-component/image/es/Preview/index.js +111 -105
- package/dist/node_modules/@rc-component/image/es/Preview/index.js.map +1 -1
- package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js +42 -22
- package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js +18 -54
- package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js +50 -0
- package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js.map +1 -0
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js +50 -50
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/SelectInput/index.js +85 -80
- package/dist/node_modules/@rc-component/select/es/SelectInput/index.js.map +1 -1
- package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js +85 -80
- package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/Popup/index.js +74 -72
- package/dist/node_modules/@rc-component/trigger/es/Popup/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js +10 -9
- package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js +27 -27
- package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/index.js +150 -140
- package/dist/node_modules/@rc-component/trigger/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/Dom/focus.js +65 -20
- package/dist/node_modules/@rc-component/util/es/Dom/focus.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/ref.js +1 -1
- package/dist/node_modules/antd/es/_util/wave/WaveEffect.js +53 -48
- package/dist/node_modules/antd/es/_util/wave/WaveEffect.js.map +1 -1
- package/dist/node_modules/antd/es/_util/wave/style.js +8 -7
- package/dist/node_modules/antd/es/_util/wave/style.js.map +1 -1
- package/dist/node_modules/antd/es/alert/Alert.js +133 -128
- package/dist/node_modules/antd/es/alert/Alert.js.map +1 -1
- package/dist/node_modules/antd/es/badge/Badge.js +29 -28
- package/dist/node_modules/antd/es/badge/Badge.js.map +1 -1
- package/dist/node_modules/antd/es/badge/style/index.js +1 -1
- package/dist/node_modules/antd/es/badge/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/button/buttonHelpers.js +47 -41
- package/dist/node_modules/antd/es/button/buttonHelpers.js.map +1 -1
- package/dist/node_modules/antd/es/button/style/variant.js +132 -132
- package/dist/node_modules/antd/es/button/style/variant.js.map +1 -1
- package/dist/node_modules/antd/es/calendar/generateCalendar.js +55 -57
- package/dist/node_modules/antd/es/calendar/generateCalendar.js.map +1 -1
- package/dist/node_modules/antd/es/calendar/style/index.js +18 -18
- package/dist/node_modules/antd/es/calendar/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/card/CardGrid.js.map +1 -1
- package/dist/node_modules/antd/es/card/style/index.js +15 -7
- package/dist/node_modules/antd/es/card/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/checkbox/Group.js +32 -30
- package/dist/node_modules/antd/es/checkbox/Group.js.map +1 -1
- package/dist/node_modules/antd/es/collapse/Collapse.js +61 -61
- package/dist/node_modules/antd/es/collapse/Collapse.js.map +1 -1
- package/dist/node_modules/antd/es/config-provider/index.js +76 -71
- package/dist/node_modules/antd/es/config-provider/index.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js +29 -31
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js +7 -9
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/{SuffixIcon.js → useSuffixIcon.js} +4 -4
- package/dist/node_modules/antd/es/date-picker/generatePicker/useSuffixIcon.js.map +1 -0
- package/dist/node_modules/antd/es/date-picker/style/panel.js +4 -4
- package/dist/node_modules/antd/es/date-picker/style/panel.js.map +1 -1
- package/dist/node_modules/antd/es/drawer/useFocusable.js +14 -0
- package/dist/node_modules/antd/es/drawer/useFocusable.js.map +1 -0
- package/dist/node_modules/antd/es/form/style/index.js +24 -24
- package/dist/node_modules/antd/es/form/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/grid/col.js +56 -54
- package/dist/node_modules/antd/es/grid/col.js.map +1 -1
- package/dist/node_modules/antd/es/grid/style/index.js +50 -50
- package/dist/node_modules/antd/es/grid/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/input/style/index.js +1 -0
- package/dist/node_modules/antd/es/input/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/input-number/index.js +91 -91
- package/dist/node_modules/antd/es/input-number/index.js.map +1 -1
- package/dist/node_modules/antd/es/input-number/style/index.js +80 -79
- package/dist/node_modules/antd/es/input-number/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/layout/style/sider.js +9 -9
- package/dist/node_modules/antd/es/layout/style/sider.js.map +1 -1
- package/dist/node_modules/antd/es/menu/MenuItem.js +6 -6
- package/dist/node_modules/antd/es/menu/MenuItem.js.map +1 -1
- package/dist/node_modules/antd/es/menu/SubMenu.js +8 -8
- package/dist/node_modules/antd/es/menu/SubMenu.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/horizontal.js +1 -1
- package/dist/node_modules/antd/es/menu/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/index.js +58 -58
- package/dist/node_modules/antd/es/menu/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/vertical.js +1 -1
- package/dist/node_modules/antd/es/menu/style/vertical.js.map +1 -1
- package/dist/node_modules/antd/es/modal/ConfirmDialog.js +117 -112
- package/dist/node_modules/antd/es/modal/ConfirmDialog.js.map +1 -1
- package/dist/node_modules/antd/es/modal/Modal.js +115 -109
- package/dist/node_modules/antd/es/modal/Modal.js.map +1 -1
- package/dist/node_modules/antd/es/modal/style/index.js +83 -80
- package/dist/node_modules/antd/es/modal/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/Pagination.js +85 -81
- package/dist/node_modules/antd/es/pagination/Pagination.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/style/bordered.js +2 -2
- package/dist/node_modules/antd/es/pagination/style/bordered.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/style/index.js +98 -132
- package/dist/node_modules/antd/es/pagination/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/popover/index.js +77 -82
- package/dist/node_modules/antd/es/popover/index.js.map +1 -1
- package/dist/node_modules/antd/es/popover/style/index.js +65 -63
- package/dist/node_modules/antd/es/popover/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/radio/context.js +3 -3
- package/dist/node_modules/antd/es/radio/context.js.map +1 -1
- package/dist/node_modules/antd/es/radio/group.js +31 -29
- package/dist/node_modules/antd/es/radio/group.js.map +1 -1
- package/dist/node_modules/antd/es/radio/style/index.js +1 -1
- package/dist/node_modules/antd/es/radio/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/dropdown.js +1 -1
- package/dist/node_modules/antd/es/select/style/dropdown.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/select-input-multiple.js +71 -69
- package/dist/node_modules/antd/es/select/style/select-input-multiple.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/select-input.js +104 -98
- package/dist/node_modules/antd/es/select/style/select-input.js.map +1 -1
- package/dist/node_modules/antd/es/space/Item.js +2 -2
- package/dist/node_modules/antd/es/space/Item.js.map +1 -1
- package/dist/node_modules/antd/es/space/index.js +4 -4
- package/dist/node_modules/antd/es/space/index.js.map +1 -1
- package/dist/node_modules/antd/es/space/style/addon.js +47 -46
- package/dist/node_modules/antd/es/space/style/addon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/PanelArrow.js +2 -2
- package/dist/node_modules/antd/es/steps/PanelArrow.js.map +1 -1
- package/dist/node_modules/antd/es/steps/ProgressIcon.js +12 -10
- package/dist/node_modules/antd/es/steps/ProgressIcon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/index.js +108 -106
- package/dist/node_modules/antd/es/steps/index.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/horizontal.js +13 -11
- package/dist/node_modules/antd/es/steps/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/icon.js +23 -18
- package/dist/node_modules/antd/es/steps/style/icon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/index.js +41 -41
- package/dist/node_modules/antd/es/steps/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/inline.js +28 -23
- package/dist/node_modules/antd/es/steps/style/inline.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/label-placement.js +44 -39
- package/dist/node_modules/antd/es/steps/style/label-placement.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/nav.js +29 -27
- package/dist/node_modules/antd/es/steps/style/nav.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/panel.js +61 -56
- package/dist/node_modules/antd/es/steps/style/panel.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/progress-dot.js +28 -26
- package/dist/node_modules/antd/es/steps/style/progress-dot.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/progress.js +24 -57
- package/dist/node_modules/antd/es/steps/style/progress.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/rtl.js +10 -8
- package/dist/node_modules/antd/es/steps/style/rtl.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/small.js +21 -16
- package/dist/node_modules/antd/es/steps/style/small.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/status.js +187 -176
- package/dist/node_modules/antd/es/steps/style/status.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/util.js +18 -16
- package/dist/node_modules/antd/es/steps/style/util.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/vertical.js +21 -16
- package/dist/node_modules/antd/es/steps/style/vertical.js.map +1 -1
- package/dist/node_modules/antd/es/style/placementArrow.js +31 -29
- package/dist/node_modules/antd/es/style/placementArrow.js.map +1 -1
- package/dist/node_modules/antd/es/table/InternalTable.js +65 -62
- package/dist/node_modules/antd/es/table/InternalTable.js.map +1 -1
- package/dist/node_modules/antd/es/table/TableMeasureRowContext.js +6 -0
- package/dist/node_modules/antd/es/table/TableMeasureRowContext.js.map +1 -0
- package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js +145 -137
- package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/index.js +3 -3
- package/dist/node_modules/antd/es/table/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/radius.js +10 -0
- package/dist/node_modules/antd/es/table/style/radius.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/virtual.js +5 -5
- package/dist/node_modules/antd/es/table/style/virtual.js.map +1 -1
- package/dist/node_modules/antd/es/theme/util/genStyleUtils.js +29 -32
- package/dist/node_modules/antd/es/theme/util/genStyleUtils.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/Timeline.js +76 -74
- package/dist/node_modules/antd/es/timeline/Timeline.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/style/horizontal.js +21 -18
- package/dist/node_modules/antd/es/timeline/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/style/index.js +85 -70
- package/dist/node_modules/antd/es/timeline/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/useItems.js +38 -37
- package/dist/node_modules/antd/es/timeline/useItems.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/PurePanel.js +27 -27
- package/dist/node_modules/antd/es/tooltip/PurePanel.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js +17 -22
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js +27 -26
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/index.js +50 -50
- package/dist/node_modules/antd/es/tooltip/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/style/index.js +55 -52
- package/dist/node_modules/antd/es/tooltip/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/util.js +13 -12
- package/dist/node_modules/antd/es/tooltip/util.js.map +1 -1
- package/dist/node_modules/antd/es/tree/DirectoryTree.js +42 -41
- package/dist/node_modules/antd/es/tree/DirectoryTree.js.map +1 -1
- package/dist/node_modules/antd/es/version/version.js +1 -1
- package/dist/node_modules/antd/es/version/version.js.map +1 -1
- package/dist/node_modules/canvg/lib/index.es.js +84 -84
- package/dist/node_modules/canvg/lib/index.es.js.map +1 -1
- package/dist/node_modules/compute-scroll-into-view/dist/index.js +17 -17
- package/dist/node_modules/compute-scroll-into-view/dist/index.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.js +217 -223
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
- package/dist/node_modules/fflate/esm/browser.js +295 -335
- package/dist/node_modules/fflate/esm/browser.js.map +1 -1
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js +1771 -1781
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js.map +1 -1
- package/dist/node_modules/raf/index.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +6 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/package.json +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/SuffixIcon.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/antd/es/tooltip/index.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport RcTooltip from '@rc-component/tooltip';\nimport { useControlledState } from '@rc-component/util';\nimport { clsx } from 'clsx';\nimport ContextIsolator from '../_util/ContextIsolator';\nimport { useMergeSemantic, useZIndex } from '../_util/hooks';\nimport { getTransitionName } from '../_util/motion';\nimport getPlacements from '../_util/placements';\nimport { cloneElement, isFragment } from '../_util/reactNode';\nimport { devUseWarning } from '../_util/warning';\nimport zIndexContext from '../_util/zindexContext';\nimport { useComponentConfig } from '../config-provider/context';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport { useToken } from '../theme/internal';\nimport useMergedArrow from './hook/useMergedArrow';\nimport PurePanel from './PurePanel';\nimport useStyle from './style';\nimport UniqueProvider from './UniqueProvider';\nimport { parseColor } from './util';\nconst InternalTooltip = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n openClassName,\n getTooltipContainer,\n color,\n children,\n afterOpenChange,\n arrow: tooltipArrow,\n destroyTooltipOnHide,\n destroyOnHidden,\n title,\n overlay,\n trigger,\n builtinPlacements,\n autoAdjustOverflow = true,\n motion,\n getPopupContainer,\n placement = 'top',\n mouseEnterDelay = 0.1,\n mouseLeaveDelay = 0.1,\n rootClassName,\n styles,\n classNames,\n onOpenChange,\n // Legacy\n overlayInnerStyle,\n overlayStyle,\n overlayClassName,\n ...restProps\n } = props;\n const [, token] = useToken();\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n direction,\n className: contextClassName,\n style: contextStyle,\n classNames: contextClassNames,\n styles: contextStyles,\n arrow: contextArrow,\n trigger: contextTrigger\n } = useComponentConfig('tooltip');\n const mergedArrow = useMergedArrow(tooltipArrow, contextArrow);\n const mergedShowArrow = mergedArrow.show;\n const mergedTrigger = trigger || contextTrigger || 'hover';\n // ============================== Ref ===============================\n const warning = devUseWarning('Tooltip');\n const tooltipRef = React.useRef(null);\n const forceAlign = () => {\n tooltipRef.current?.forceAlign();\n };\n React.useImperativeHandle(ref, () => ({\n forceAlign,\n nativeElement: tooltipRef.current?.nativeElement,\n popupElement: tooltipRef.current?.popupElement\n }));\n // ============================== Warn ==============================\n if (process.env.NODE_ENV !== 'production') {\n [['overlayStyle', 'styles.root'], ['overlayInnerStyle', 'styles.container'], ['overlayClassName', 'classNames.root'], ['destroyTooltipOnHide', 'destroyOnHidden']].forEach(([deprecatedName, newName]) => {\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n process.env.NODE_ENV !== \"production\" ? warning(!destroyTooltipOnHide || typeof destroyTooltipOnHide === 'boolean', 'usage', '`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly.') : void 0;\n }\n // ============================== Open ==============================\n const [open, setOpen] = useControlledState(props.defaultOpen ?? false, props.open);\n const noTitle = !title && !overlay && title !== 0; // overlay for old version compatibility\n const onInternalOpenChange = vis => {\n setOpen(noTitle ? false : vis);\n if (!noTitle && onOpenChange) {\n onOpenChange(vis);\n }\n };\n const tooltipPlacements = React.useMemo(() => {\n return builtinPlacements || getPlacements({\n arrowPointAtCenter: mergedArrow?.pointAtCenter ?? false,\n autoAdjustOverflow,\n arrowWidth: mergedShowArrow ? token.sizePopupArrow : 0,\n borderRadius: token.borderRadius,\n offset: token.marginXXS,\n visibleFirst: true\n });\n }, [mergedArrow, builtinPlacements, token, mergedShowArrow, autoAdjustOverflow]);\n const memoOverlay = React.useMemo(() => {\n if (title === 0) {\n return title;\n }\n return overlay || title || '';\n }, [overlay, title]);\n const memoOverlayWrapper = /*#__PURE__*/React.createElement(ContextIsolator, {\n space: true\n }, typeof memoOverlay === 'function' ? memoOverlay() : memoOverlay);\n // =========== Merged Props for Semantic ===========\n const mergedProps = {\n ...props,\n trigger: mergedTrigger,\n color,\n placement,\n builtinPlacements,\n openClassName,\n arrow: tooltipArrow,\n autoAdjustOverflow,\n getPopupContainer,\n children,\n destroyTooltipOnHide,\n destroyOnHidden\n };\n const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, classNames], [contextStyles, styles], {\n props: mergedProps\n });\n const prefixCls = getPrefixCls('tooltip', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const injectFromPopover = props['data-popover-inject'];\n let tempOpen = open;\n // Hide tooltip when there is no title\n if (!('open' in props) && noTitle) {\n tempOpen = false;\n }\n // ============================= Render =============================\n const child = /*#__PURE__*/React.isValidElement(children) && !isFragment(children) ? children : /*#__PURE__*/React.createElement(\"span\", null, children);\n const childProps = child.props;\n const childCls = !childProps.className || typeof childProps.className === 'string' ? clsx(childProps.className, openClassName || `${prefixCls}-open`) : childProps.className;\n // Style\n const rootCls = useCSSVarCls(prefixCls);\n const [hashId, cssVarCls] = useStyle(prefixCls, rootCls, !injectFromPopover);\n // Color\n const colorInfo = parseColor(prefixCls, color);\n const arrowContentStyle = colorInfo.arrowStyle;\n const themeCls = clsx(rootCls, hashId, cssVarCls);\n const rootClassNames = clsx(overlayClassName, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, colorInfo.className, rootClassName, themeCls, contextClassName, mergedClassNames.root);\n // ============================ zIndex ============================\n const [zIndex, contextZIndex] = useZIndex('Tooltip', restProps.zIndex);\n const containerStyle = {\n ...mergedStyles.container,\n ...overlayInnerStyle,\n ...colorInfo.overlayStyle\n };\n const content = /*#__PURE__*/React.createElement(RcTooltip, {\n unique: true,\n ...restProps,\n trigger: mergedTrigger,\n zIndex: zIndex,\n showArrow: mergedShowArrow,\n placement: placement,\n mouseEnterDelay: mouseEnterDelay,\n mouseLeaveDelay: mouseLeaveDelay,\n prefixCls: prefixCls,\n classNames: {\n root: rootClassNames,\n container: mergedClassNames.container,\n arrow: mergedClassNames.arrow,\n uniqueContainer: clsx(themeCls, mergedClassNames.container)\n },\n styles: {\n root: {\n ...arrowContentStyle,\n ...mergedStyles.root,\n ...contextStyle,\n ...overlayStyle\n },\n container: containerStyle,\n uniqueContainer: containerStyle,\n arrow: mergedStyles.arrow\n },\n getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer,\n ref: tooltipRef,\n builtinPlacements: tooltipPlacements,\n overlay: memoOverlayWrapper,\n visible: tempOpen,\n onVisibleChange: onInternalOpenChange,\n afterVisibleChange: afterOpenChange,\n arrowContent: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-arrow-content`\n }),\n motion: {\n motionName: getTransitionName(rootPrefixCls, 'zoom-big-fast', typeof motion?.motionName === 'string' ? motion?.motionName : undefined),\n motionDeadline: 1000\n },\n destroyOnHidden: destroyOnHidden ?? !!destroyTooltipOnHide\n }, tempOpen ? cloneElement(child, {\n className: childCls\n }) : child);\n return /*#__PURE__*/React.createElement(zIndexContext.Provider, {\n value: contextZIndex\n }, content);\n});\nconst Tooltip = InternalTooltip;\nif (process.env.NODE_ENV !== 'production') {\n Tooltip.displayName = 'Tooltip';\n}\nTooltip._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nTooltip.UniqueProvider = UniqueProvider;\nexport default Tooltip;"],"names":["InternalTooltip","React","props","ref","customizePrefixCls","openClassName","getTooltipContainer","color","children","afterOpenChange","tooltipArrow","destroyTooltipOnHide","destroyOnHidden","title","overlay","trigger","builtinPlacements","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","rootClassName","styles","classNames","onOpenChange","overlayInnerStyle","overlayStyle","overlayClassName","restProps","token","useToken","getContextPopupContainer","getPrefixCls","direction","contextClassName","contextStyle","contextClassNames","contextStyles","contextArrow","contextTrigger","useComponentConfig","mergedArrow","useMergedArrow","mergedShowArrow","mergedTrigger","warning","devUseWarning","tooltipRef","forceAlign","process","deprecatedName","newName","open","setOpen","useControlledState","noTitle","onInternalOpenChange","vis","tooltipPlacements","getPlacements","memoOverlay","memoOverlayWrapper","ContextIsolator","mergedProps","mergedClassNames","mergedStyles","useMergeSemantic","prefixCls","rootPrefixCls","injectFromPopover","tempOpen","child","isFragment","childProps","childCls","clsx","rootCls","useCSSVarCls","hashId","cssVarCls","useStyle","colorInfo","parseColor","arrowContentStyle","themeCls","rootClassNames","zIndex","contextZIndex","useZIndex","containerStyle","content","RcTooltip","getTransitionName","cloneElement","zIndexContext","Tooltip","PurePanel","UniqueProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAMA,KAA+B,gBAAAC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AAC,GACKK,IAAUjG;AACZmD,EAAQ,IAAI,aAAa,iBAC3B8C,EAAQ,cAAc;AAExBA,EAAQ,yCAAyCC;AACjDD,EAAQ,iBAAiBE;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/antd/es/tooltip/index.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport RcTooltip from '@rc-component/tooltip';\nimport { useControlledState } from '@rc-component/util';\nimport { clsx } from 'clsx';\nimport ContextIsolator from '../_util/ContextIsolator';\nimport { useMergeSemantic, useZIndex } from '../_util/hooks';\nimport { getTransitionName } from '../_util/motion';\nimport getPlacements from '../_util/placements';\nimport { cloneElement, isFragment } from '../_util/reactNode';\nimport { devUseWarning } from '../_util/warning';\nimport zIndexContext from '../_util/zindexContext';\nimport { useComponentConfig } from '../config-provider/context';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport { useToken } from '../theme/internal';\nimport useMergedArrow from './hook/useMergedArrow';\nimport PurePanel from './PurePanel';\nimport useStyle from './style';\nimport UniqueProvider from './UniqueProvider';\nimport { parseColor } from './util';\nconst InternalTooltip = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n openClassName,\n getTooltipContainer,\n color,\n children,\n afterOpenChange,\n arrow: tooltipArrow,\n destroyTooltipOnHide,\n destroyOnHidden,\n title,\n overlay,\n trigger,\n builtinPlacements,\n autoAdjustOverflow = true,\n motion,\n getPopupContainer,\n placement = 'top',\n mouseEnterDelay = 0.1,\n mouseLeaveDelay = 0.1,\n rootClassName,\n styles,\n classNames,\n onOpenChange,\n // Legacy\n overlayInnerStyle,\n overlayStyle,\n overlayClassName,\n ...restProps\n } = props;\n const [, token] = useToken();\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n direction,\n className: contextClassName,\n style: contextStyle,\n classNames: contextClassNames,\n styles: contextStyles,\n arrow: contextArrow,\n trigger: contextTrigger\n } = useComponentConfig('tooltip');\n const mergedArrow = useMergedArrow(tooltipArrow, contextArrow);\n const mergedShowArrow = mergedArrow.show;\n const mergedTrigger = trigger || contextTrigger || 'hover';\n // ============================== Ref ===============================\n const warning = devUseWarning('Tooltip');\n const tooltipRef = React.useRef(null);\n const forceAlign = () => {\n tooltipRef.current?.forceAlign();\n };\n React.useImperativeHandle(ref, () => ({\n forceAlign,\n nativeElement: tooltipRef.current?.nativeElement,\n popupElement: tooltipRef.current?.popupElement\n }));\n // ============================== Warn ==============================\n if (process.env.NODE_ENV !== 'production') {\n [['overlayStyle', 'styles.root'], ['overlayInnerStyle', 'styles.container'], ['overlayClassName', 'classNames.root'], ['destroyTooltipOnHide', 'destroyOnHidden']].forEach(([deprecatedName, newName]) => {\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n process.env.NODE_ENV !== \"production\" ? warning(!destroyTooltipOnHide || typeof destroyTooltipOnHide === 'boolean', 'usage', '`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly.') : void 0;\n }\n // ============================== Open ==============================\n const [open, setOpen] = useControlledState(props.defaultOpen ?? false, props.open);\n const noTitle = !title && !overlay && title !== 0; // overlay for old version compatibility\n const onInternalOpenChange = vis => {\n setOpen(noTitle ? false : vis);\n if (!noTitle && onOpenChange) {\n onOpenChange(vis);\n }\n };\n const tooltipPlacements = React.useMemo(() => {\n return builtinPlacements || getPlacements({\n arrowPointAtCenter: mergedArrow?.pointAtCenter ?? false,\n autoAdjustOverflow,\n arrowWidth: mergedShowArrow ? token.sizePopupArrow : 0,\n borderRadius: token.borderRadius,\n offset: token.marginXXS,\n visibleFirst: true\n });\n }, [mergedArrow, builtinPlacements, token, mergedShowArrow, autoAdjustOverflow]);\n const memoOverlay = React.useMemo(() => {\n if (title === 0) {\n return title;\n }\n return overlay || title || '';\n }, [overlay, title]);\n const memoOverlayWrapper = /*#__PURE__*/React.createElement(ContextIsolator, {\n space: true\n }, typeof memoOverlay === 'function' ? memoOverlay() : memoOverlay);\n // =========== Merged Props for Semantic ===========\n const mergedProps = {\n ...props,\n trigger: mergedTrigger,\n color,\n placement,\n builtinPlacements,\n openClassName,\n arrow: tooltipArrow,\n autoAdjustOverflow,\n getPopupContainer,\n children,\n destroyTooltipOnHide,\n destroyOnHidden\n };\n const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, classNames], [contextStyles, styles], {\n props: mergedProps\n });\n const prefixCls = getPrefixCls('tooltip', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n const injectFromPopover = props['data-popover-inject'];\n let tempOpen = open;\n // Hide tooltip when there is no title\n if (!('open' in props) && noTitle) {\n tempOpen = false;\n }\n // ============================= Render =============================\n const child = /*#__PURE__*/React.isValidElement(children) && !isFragment(children) ? children : /*#__PURE__*/React.createElement(\"span\", null, children);\n const childProps = child.props;\n const childCls = !childProps.className || typeof childProps.className === 'string' ? clsx(childProps.className, openClassName || `${prefixCls}-open`) : childProps.className;\n // Style\n const rootCls = useCSSVarCls(prefixCls);\n const [hashId, cssVarCls] = useStyle(prefixCls, rootCls, !injectFromPopover);\n // Color\n const colorInfo = parseColor(rootPrefixCls, prefixCls, color);\n const arrowContentStyle = colorInfo.arrowStyle;\n const themeCls = clsx(rootCls, hashId, cssVarCls);\n const rootClassNames = clsx(overlayClassName, {\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, colorInfo.className, rootClassName, themeCls, contextClassName, mergedClassNames.root);\n // ============================ zIndex ============================\n const [zIndex, contextZIndex] = useZIndex('Tooltip', restProps.zIndex);\n const containerStyle = {\n ...mergedStyles.container,\n ...overlayInnerStyle,\n ...colorInfo.overlayStyle\n };\n const content = /*#__PURE__*/React.createElement(RcTooltip, {\n unique: true,\n ...restProps,\n trigger: mergedTrigger,\n zIndex: zIndex,\n showArrow: mergedShowArrow,\n placement: placement,\n mouseEnterDelay: mouseEnterDelay,\n mouseLeaveDelay: mouseLeaveDelay,\n prefixCls: prefixCls,\n classNames: {\n root: rootClassNames,\n container: mergedClassNames.container,\n arrow: mergedClassNames.arrow,\n uniqueContainer: clsx(themeCls, mergedClassNames.container)\n },\n styles: {\n root: {\n ...arrowContentStyle,\n ...mergedStyles.root,\n ...contextStyle,\n ...overlayStyle\n },\n container: containerStyle,\n uniqueContainer: containerStyle,\n arrow: mergedStyles.arrow\n },\n getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer,\n ref: tooltipRef,\n builtinPlacements: tooltipPlacements,\n overlay: memoOverlayWrapper,\n visible: tempOpen,\n onVisibleChange: onInternalOpenChange,\n afterVisibleChange: afterOpenChange,\n arrowContent: /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-arrow-content`\n }),\n motion: {\n motionName: getTransitionName(rootPrefixCls, 'zoom-big-fast', typeof motion?.motionName === 'string' ? motion?.motionName : undefined),\n motionDeadline: 1000\n },\n destroyOnHidden: destroyOnHidden ?? !!destroyTooltipOnHide\n }, tempOpen ? cloneElement(child, {\n className: childCls\n }) : child);\n return /*#__PURE__*/React.createElement(zIndexContext.Provider, {\n value: contextZIndex\n }, content);\n});\nconst Tooltip = InternalTooltip;\nif (process.env.NODE_ENV !== 'production') {\n Tooltip.displayName = 'Tooltip';\n}\nTooltip._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nTooltip.UniqueProvider = UniqueProvider;\nexport default Tooltip;"],"names":["InternalTooltip","React","props","ref","customizePrefixCls","openClassName","getTooltipContainer","color","children","afterOpenChange","tooltipArrow","destroyTooltipOnHide","destroyOnHidden","title","overlay","trigger","builtinPlacements","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","rootClassName","styles","classNames","onOpenChange","overlayInnerStyle","overlayStyle","overlayClassName","restProps","token","useToken","getContextPopupContainer","getPrefixCls","direction","contextClassName","contextStyle","contextClassNames","contextStyles","contextArrow","contextTrigger","useComponentConfig","mergedArrow","useMergedArrow","mergedShowArrow","mergedTrigger","warning","devUseWarning","tooltipRef","forceAlign","process","deprecatedName","newName","open","setOpen","useControlledState","noTitle","onInternalOpenChange","vis","tooltipPlacements","getPlacements","memoOverlay","memoOverlayWrapper","ContextIsolator","mergedProps","mergedClassNames","mergedStyles","useMergeSemantic","prefixCls","rootPrefixCls","injectFromPopover","tempOpen","child","isFragment","childProps","childCls","clsx","rootCls","useCSSVarCls","hashId","cssVarCls","useStyle","colorInfo","parseColor","arrowContentStyle","themeCls","rootClassNames","zIndex","contextZIndex","useZIndex","containerStyle","content","RcTooltip","getTransitionName","cloneElement","zIndexContext","Tooltip","PurePanel","UniqueProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAMA,KAA+B,gBAAAC,EAAM,WAAW,CAACC,GAAOC,MAAQ;AACpE,QAAM;AAAA,IACJ,WAAWC;AAAA,IACX,eAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,OAAOC;AAAA,IACP,sBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,oBAAAC,IAAqB;AAAA,IACrB,QAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,iBAAAC,IAAkB;AAAA,IAClB,iBAAAC,IAAkB;AAAA,IAClB,eAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA;AAAA,IAEA,mBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAM5B,GACE,CAAA,EAAG6B,CAAK,IAAIC,GAAQ,GACpB;AAAA,IACJ,mBAAmBC;AAAA,IACnB,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAWC;AAAA,IACX,OAAOC;AAAA,IACP,YAAYC;AAAA,IACZ,QAAQC;AAAA,IACR,OAAOC;AAAA,IACP,SAASC;AAAA,EACb,IAAMC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oE,CAAS;AAAA,IAC7B,CAAK;AAAA,IACD,QAAQ;AAAA,MACN,YAAYyB,GAAkBxB,GAAe,iBAAiB,OAAOpD,GAAQ,cAAe,WAAWA,GAAQ,aAAa,MAAS;AAAA,MACrI,gBAAgB;AAAA,IACtB;AAAA,IACI,iBAAiBN,KAAmB,CAAC,CAACD;AAAA,EAC1C,GAAK6D,IAAWuB,GAAatB,GAAO;AAAA,IAChC,WAAWG;AAAA,EACf,CAAG,IAAIH,CAAK;AACV,SAAoB,gBAAAxE,EAAM,cAAc+F,GAAc,UAAU;AAAA,IAC9D,OAAOP;AAAA,EACX,GAAKG,EAAO;AACZ,CAAC,GACKK,IAAUjG;AACZmD,EAAQ,IAAI,aAAa,iBAC3B8C,EAAQ,cAAc;AAExBA,EAAQ,yCAAyCC;AACjDD,EAAQ,iBAAiBE;","x_google_ignoreList":[0]}
|
|
@@ -1,62 +1,63 @@
|
|
|
1
|
-
import { unit as
|
|
2
|
-
import { resetComponent as
|
|
3
|
-
import { initFadeMotion as
|
|
4
|
-
import { initZoomMotion as
|
|
5
|
-
import
|
|
6
|
-
import { getArrowToken as
|
|
7
|
-
import { genStyleHooks as
|
|
8
|
-
import
|
|
9
|
-
import { merge as
|
|
10
|
-
const
|
|
1
|
+
import { unit as b } from "../../../../@ant-design/cssinjs/es/util/index.js";
|
|
2
|
+
import { resetComponent as T } from "../../style/index.js";
|
|
3
|
+
import { initFadeMotion as v } from "../../style/motion/fade.js";
|
|
4
|
+
import { initZoomMotion as C } from "../../style/motion/zoom.js";
|
|
5
|
+
import W, { getArrowOffsetToken as z, MAX_VERTICAL_CONTENT_RADIUS as B } from "../../style/placementArrow.js";
|
|
6
|
+
import { getArrowToken as M } from "../../style/roundedArrow.js";
|
|
7
|
+
import { genStyleHooks as I, genCssVar as O } from "../../theme/util/genStyleUtils.js";
|
|
8
|
+
import q from "../../theme/util/genPresetColor.js";
|
|
9
|
+
import { merge as x } from "../../../../@ant-design/cssinjs-utils/es/util/statistic.js";
|
|
10
|
+
const f = "50%", L = (o) => {
|
|
11
11
|
const {
|
|
12
12
|
calc: e,
|
|
13
13
|
componentCls: t,
|
|
14
14
|
// ant-tooltip
|
|
15
|
-
tooltipMaxWidth:
|
|
15
|
+
tooltipMaxWidth: c,
|
|
16
16
|
tooltipColor: i,
|
|
17
17
|
tooltipBg: n,
|
|
18
18
|
tooltipBorderRadius: r,
|
|
19
19
|
zIndexPopup: a,
|
|
20
|
-
controlHeight:
|
|
21
|
-
boxShadowSecondary:
|
|
22
|
-
paddingSM:
|
|
23
|
-
paddingXS:
|
|
24
|
-
arrowOffsetHorizontal:
|
|
25
|
-
sizePopupArrow:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
controlHeight: d,
|
|
21
|
+
boxShadowSecondary: s,
|
|
22
|
+
paddingSM: w,
|
|
23
|
+
paddingXS: S,
|
|
24
|
+
arrowOffsetHorizontal: y,
|
|
25
|
+
sizePopupArrow: m,
|
|
26
|
+
antCls: R
|
|
27
|
+
} = o, [p, l] = O(R, "tooltip"), $ = e(r).add(m).add(y).equal(), u = {
|
|
28
|
+
minWidth: e(r).mul(2).add(m).equal(),
|
|
29
|
+
minHeight: d,
|
|
30
|
+
padding: `${b(o.calc(w).div(2).equal())} ${b(S)}`,
|
|
31
|
+
color: l("overlay-color", i),
|
|
31
32
|
textAlign: "start",
|
|
32
33
|
textDecoration: "none",
|
|
33
34
|
wordWrap: "break-word",
|
|
34
35
|
backgroundColor: n,
|
|
35
36
|
borderRadius: r,
|
|
36
|
-
boxShadow:
|
|
37
|
+
boxShadow: s,
|
|
37
38
|
boxSizing: "border-box"
|
|
38
|
-
},
|
|
39
|
+
}, g = {
|
|
39
40
|
// When use `autoArrow`, origin will follow the arrow position
|
|
40
|
-
"
|
|
41
|
-
transformOrigin: ["
|
|
41
|
+
[p("valid-offset-x")]: l("arrow-offset-horizontal", "var(--arrow-x)"),
|
|
42
|
+
transformOrigin: [l("valid-offset-x", f), `var(--arrow-y, ${f})`].join(" ")
|
|
42
43
|
};
|
|
43
44
|
return [
|
|
44
45
|
{
|
|
45
46
|
[t]: {
|
|
46
|
-
...
|
|
47
|
+
...T(o),
|
|
47
48
|
position: "absolute",
|
|
48
49
|
zIndex: a,
|
|
49
50
|
display: "block",
|
|
50
51
|
width: "max-content",
|
|
51
|
-
maxWidth:
|
|
52
|
+
maxWidth: c,
|
|
52
53
|
visibility: "visible",
|
|
53
|
-
...
|
|
54
|
+
...g,
|
|
54
55
|
"&-hidden": {
|
|
55
56
|
display: "none"
|
|
56
57
|
},
|
|
57
|
-
"
|
|
58
|
+
[p("arrow-background-color")]: n,
|
|
58
59
|
// Wrapper for the tooltip content
|
|
59
|
-
[`${t}-container`]: [
|
|
60
|
+
[`${t}-container`]: [u, v(o, !0)],
|
|
60
61
|
[`&:has(~ ${t}-unique-container)`]: {
|
|
61
62
|
[`${t}-container`]: {
|
|
62
63
|
border: "none",
|
|
@@ -66,27 +67,27 @@ const B = (o) => {
|
|
|
66
67
|
},
|
|
67
68
|
// Align placement should have another min width
|
|
68
69
|
[["&-placement-topLeft", "&-placement-topRight", "&-placement-bottomLeft", "&-placement-bottomRight"].join(",")]: {
|
|
69
|
-
minWidth:
|
|
70
|
+
minWidth: $
|
|
70
71
|
},
|
|
71
72
|
// Limit left and right placement radius
|
|
72
73
|
[["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
|
|
73
74
|
[`${t}-inner`]: {
|
|
74
|
-
borderRadius: o.min(r,
|
|
75
|
+
borderRadius: o.min(r, B)
|
|
75
76
|
}
|
|
76
77
|
},
|
|
77
78
|
[`${t}-content`]: {
|
|
78
79
|
position: "relative"
|
|
79
80
|
},
|
|
80
81
|
// generator for preset color
|
|
81
|
-
...
|
|
82
|
-
darkColor:
|
|
82
|
+
...q(o, (A, {
|
|
83
|
+
darkColor: h
|
|
83
84
|
}) => ({
|
|
84
|
-
[`&${t}-${
|
|
85
|
+
[`&${t}-${A}`]: {
|
|
85
86
|
[`${t}-container`]: {
|
|
86
|
-
backgroundColor:
|
|
87
|
+
backgroundColor: h
|
|
87
88
|
},
|
|
88
89
|
[`${t}-arrow`]: {
|
|
89
|
-
"
|
|
90
|
+
[p("arrow-background-color")]: h
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
})),
|
|
@@ -97,7 +98,7 @@ const B = (o) => {
|
|
|
97
98
|
}
|
|
98
99
|
},
|
|
99
100
|
// Arrow Style
|
|
100
|
-
|
|
101
|
+
W(o, l("arrow-background-color")),
|
|
101
102
|
// Pure Render
|
|
102
103
|
{
|
|
103
104
|
[`${t}-pure`]: {
|
|
@@ -109,8 +110,8 @@ const B = (o) => {
|
|
|
109
110
|
// Unique Body
|
|
110
111
|
{
|
|
111
112
|
[`${t}-unique-container`]: {
|
|
112
|
-
...
|
|
113
|
-
...
|
|
113
|
+
...u,
|
|
114
|
+
...g,
|
|
114
115
|
position: "absolute",
|
|
115
116
|
zIndex: e(a).sub(1).equal(),
|
|
116
117
|
"&-hidden": {
|
|
@@ -122,35 +123,37 @@ const B = (o) => {
|
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
];
|
|
125
|
-
},
|
|
126
|
+
}, P = (o) => ({
|
|
126
127
|
zIndexPopup: o.zIndexPopupBase + 70,
|
|
127
|
-
|
|
128
|
+
maxWidth: 250,
|
|
129
|
+
...z({
|
|
128
130
|
contentRadius: o.borderRadius,
|
|
129
131
|
limitVerticalRadius: !0
|
|
130
132
|
}),
|
|
131
|
-
...
|
|
133
|
+
...M(x(o, {
|
|
132
134
|
borderRadiusOuter: Math.min(o.borderRadiusOuter, 4)
|
|
133
135
|
}))
|
|
134
|
-
}),
|
|
136
|
+
}), K = (o, e, t = !0) => I("Tooltip", (i) => {
|
|
135
137
|
const {
|
|
136
138
|
borderRadius: n,
|
|
137
139
|
colorTextLightSolid: r,
|
|
138
|
-
colorBgSpotlight: a
|
|
139
|
-
|
|
140
|
+
colorBgSpotlight: a,
|
|
141
|
+
maxWidth: d
|
|
142
|
+
} = i, s = x(i, {
|
|
140
143
|
// default variables
|
|
141
|
-
tooltipMaxWidth:
|
|
144
|
+
tooltipMaxWidth: d,
|
|
142
145
|
tooltipColor: r,
|
|
143
146
|
tooltipBorderRadius: n,
|
|
144
147
|
tooltipBg: a
|
|
145
148
|
});
|
|
146
|
-
return [
|
|
147
|
-
},
|
|
149
|
+
return [L(s), C(i, "zoom-big-fast")];
|
|
150
|
+
}, P, {
|
|
148
151
|
resetStyle: !1,
|
|
149
152
|
// Popover use Tooltip as internal component. We do not need to handle this.
|
|
150
153
|
injectStyle: t
|
|
151
154
|
})(o, e);
|
|
152
155
|
export {
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
K as default,
|
|
157
|
+
P as prepareComponentToken
|
|
155
158
|
};
|
|
156
159
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/antd/es/tooltip/style/index.js"],"sourcesContent":["import { unit } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { initFadeMotion, initZoomMotion } from '../../style/motion';\nimport getArrowStyle, { getArrowOffsetToken, MAX_VERTICAL_CONTENT_RADIUS } from '../../style/placementArrow';\nimport { getArrowToken } from '../../style/roundedArrow';\nimport { genPresetColor, genStyleHooks, mergeToken } from '../../theme/internal';\nconst genTooltipStyle = token => {\n const {\n calc,\n componentCls,\n // ant-tooltip\n tooltipMaxWidth,\n tooltipColor,\n tooltipBg,\n tooltipBorderRadius,\n zIndexPopup,\n controlHeight,\n boxShadowSecondary,\n paddingSM,\n paddingXS,\n arrowOffsetHorizontal,\n sizePopupArrow\n } = token;\n // arrowOffsetHorizontal + arrowWidth + borderRadius\n const edgeAlignMinWidth = calc(tooltipBorderRadius).add(sizePopupArrow).add(arrowOffsetHorizontal).equal();\n // borderRadius * 2 + arrowWidth\n const centerAlignMinWidth = calc(tooltipBorderRadius).mul(2).add(sizePopupArrow).equal();\n const sharedBodyStyle = {\n minWidth: centerAlignMinWidth,\n minHeight: controlHeight,\n padding: `${unit(token.calc(paddingSM).div(2).equal())} ${unit(paddingXS)}`,\n color:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/antd/es/tooltip/style/index.js"],"sourcesContent":["import { unit } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { initFadeMotion, initZoomMotion } from '../../style/motion';\nimport getArrowStyle, { getArrowOffsetToken, MAX_VERTICAL_CONTENT_RADIUS } from '../../style/placementArrow';\nimport { getArrowToken } from '../../style/roundedArrow';\nimport { genPresetColor, genStyleHooks, mergeToken } from '../../theme/internal';\nimport { genCssVar } from '../../theme/util/genStyleUtils';\nconst FALL_BACK_ORIGIN = '50%';\nconst genTooltipStyle = token => {\n const {\n calc,\n componentCls,\n // ant-tooltip\n tooltipMaxWidth,\n tooltipColor,\n tooltipBg,\n tooltipBorderRadius,\n zIndexPopup,\n controlHeight,\n boxShadowSecondary,\n paddingSM,\n paddingXS,\n arrowOffsetHorizontal,\n sizePopupArrow,\n antCls\n } = token;\n const [varName, varRef] = genCssVar(antCls, 'tooltip');\n // arrowOffsetHorizontal + arrowWidth + borderRadius\n const edgeAlignMinWidth = calc(tooltipBorderRadius).add(sizePopupArrow).add(arrowOffsetHorizontal).equal();\n // borderRadius * 2 + arrowWidth\n const centerAlignMinWidth = calc(tooltipBorderRadius).mul(2).add(sizePopupArrow).equal();\n const sharedBodyStyle = {\n minWidth: centerAlignMinWidth,\n minHeight: controlHeight,\n padding: `${unit(token.calc(paddingSM).div(2).equal())} ${unit(paddingXS)}`,\n color: varRef('overlay-color', tooltipColor),\n textAlign: 'start',\n textDecoration: 'none',\n wordWrap: 'break-word',\n backgroundColor: tooltipBg,\n borderRadius: tooltipBorderRadius,\n boxShadow: boxShadowSecondary,\n boxSizing: 'border-box'\n };\n const sharedTransformOrigin = {\n // When use `autoArrow`, origin will follow the arrow position\n [varName('valid-offset-x')]: varRef('arrow-offset-horizontal', 'var(--arrow-x)'),\n transformOrigin: [varRef('valid-offset-x', FALL_BACK_ORIGIN), `var(--arrow-y, ${FALL_BACK_ORIGIN})`].join(' ')\n };\n return [{\n [componentCls]: {\n ...resetComponent(token),\n position: 'absolute',\n zIndex: zIndexPopup,\n display: 'block',\n width: 'max-content',\n maxWidth: tooltipMaxWidth,\n visibility: 'visible',\n ...sharedTransformOrigin,\n '&-hidden': {\n display: 'none'\n },\n [varName('arrow-background-color')]: tooltipBg,\n // Wrapper for the tooltip content\n [`${componentCls}-container`]: [sharedBodyStyle, initFadeMotion(token, true)],\n [`&:has(~ ${componentCls}-unique-container)`]: {\n [`${componentCls}-container`]: {\n border: 'none',\n background: 'transparent',\n boxShadow: 'none'\n }\n },\n // Align placement should have another min width\n [[`&-placement-topLeft`, `&-placement-topRight`, `&-placement-bottomLeft`, `&-placement-bottomRight`].join(',')]: {\n minWidth: edgeAlignMinWidth\n },\n // Limit left and right placement radius\n [[`&-placement-left`, `&-placement-leftTop`, `&-placement-leftBottom`, `&-placement-right`, `&-placement-rightTop`, `&-placement-rightBottom`].join(',')]: {\n [`${componentCls}-inner`]: {\n borderRadius: token.min(tooltipBorderRadius, MAX_VERTICAL_CONTENT_RADIUS)\n }\n },\n [`${componentCls}-content`]: {\n position: 'relative'\n },\n // generator for preset color\n ...genPresetColor(token, (colorKey, {\n darkColor\n }) => ({\n [`&${componentCls}-${colorKey}`]: {\n [`${componentCls}-container`]: {\n backgroundColor: darkColor\n },\n [`${componentCls}-arrow`]: {\n [varName('arrow-background-color')]: darkColor\n }\n }\n })),\n // RTL\n '&-rtl': {\n direction: 'rtl'\n }\n }\n },\n // Arrow Style\n getArrowStyle(token, varRef('arrow-background-color')),\n // Pure Render\n {\n [`${componentCls}-pure`]: {\n position: 'relative',\n maxWidth: 'none',\n margin: token.sizePopupArrow\n }\n },\n // Unique Body\n {\n [`${componentCls}-unique-container`]: {\n ...sharedBodyStyle,\n ...sharedTransformOrigin,\n position: 'absolute',\n zIndex: calc(zIndexPopup).sub(1).equal(),\n '&-hidden': {\n display: 'none'\n },\n '&-visible': {\n transition: `all ${token.motionDurationSlow}`\n }\n }\n }];\n};\n// ============================== Export ==============================\nexport const prepareComponentToken = token => ({\n zIndexPopup: token.zIndexPopupBase + 70,\n maxWidth: 250,\n ...getArrowOffsetToken({\n contentRadius: token.borderRadius,\n limitVerticalRadius: true\n }),\n ...getArrowToken(mergeToken(token, {\n borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)\n }))\n});\nexport default (prefixCls, rootCls, injectStyle = true) => {\n const useStyle = genStyleHooks('Tooltip', token => {\n const {\n borderRadius,\n colorTextLightSolid,\n colorBgSpotlight,\n maxWidth\n } = token;\n const TooltipToken = mergeToken(token, {\n // default variables\n tooltipMaxWidth: maxWidth,\n tooltipColor: colorTextLightSolid,\n tooltipBorderRadius: borderRadius,\n tooltipBg: colorBgSpotlight\n });\n return [genTooltipStyle(TooltipToken), initZoomMotion(token, 'zoom-big-fast')];\n }, prepareComponentToken, {\n resetStyle: false,\n // Popover use Tooltip as internal component. We do not need to handle this.\n injectStyle\n });\n return useStyle(prefixCls, rootCls);\n};"],"names":["FALL_BACK_ORIGIN","genTooltipStyle","token","calc","componentCls","tooltipMaxWidth","tooltipColor","tooltipBg","tooltipBorderRadius","zIndexPopup","controlHeight","boxShadowSecondary","paddingSM","paddingXS","arrowOffsetHorizontal","sizePopupArrow","antCls","varName","varRef","genCssVar","edgeAlignMinWidth","sharedBodyStyle","unit","sharedTransformOrigin","resetComponent","initFadeMotion","MAX_VERTICAL_CONTENT_RADIUS","genPresetColor","colorKey","darkColor","getArrowStyle","prepareComponentToken","getArrowOffsetToken","getArrowToken","mergeToken","useStyle","prefixCls","rootCls","injectStyle","genStyleHooks","borderRadius","colorTextLightSolid","colorBgSpotlight","maxWidth","TooltipToken","initZoomMotion"],"mappings":";;;;;;;;;AAOA,MAAMA,IAAmB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Y,GAAGC,EAAe3C,GAAO,eAAe,CAAC;AAC/E,GAAG6B,GAAuB;AAAA,EACxB,YAAY;AAAA;AAAA,EAEZ,aAAAO;AACJ,CAAG,EACeF,GAAWC,CAAO;","x_google_ignoreList":[0]}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { clsx as i } from "../../../clsx/dist/clsx.js";
|
|
2
|
-
import { isPresetColor as
|
|
3
|
-
import { generateColor as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { isPresetColor as g } from "../_util/colors.js";
|
|
3
|
+
import { generateColor as p } from "../color-picker/util.js";
|
|
4
|
+
import { genCssVar as C } from "../theme/util/genStyleUtils.js";
|
|
5
|
+
const x = (a, m, o) => {
|
|
6
|
+
const n = g(o), [e] = C(a, "tooltip"), c = i({
|
|
7
|
+
[`${m}-${o}`]: o && n
|
|
8
|
+
}), r = {}, s = {}, t = p(o).toRgb(), l = (0.299 * t.r + 0.587 * t.g + 0.114 * t.b) / 255 < 0.5 ? "#FFF" : "#000";
|
|
9
|
+
return o && !n && (r.background = o, r[e("overlay-color")] = l, s[e("arrow-background-color")] = o), {
|
|
10
|
+
className: c,
|
|
11
|
+
overlayStyle: r,
|
|
12
|
+
arrowStyle: s
|
|
12
13
|
};
|
|
13
|
-
}
|
|
14
|
+
};
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
x as parseColor
|
|
16
17
|
};
|
|
17
18
|
//# sourceMappingURL=util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sources":["../../../../../node_modules/antd/es/tooltip/util.js"],"sourcesContent":["import { clsx } from 'clsx';\nimport { isPresetColor } from '../_util/colors';\nimport { generateColor } from '../color-picker/util';\nexport
|
|
1
|
+
{"version":3,"file":"util.js","sources":["../../../../../node_modules/antd/es/tooltip/util.js"],"sourcesContent":["import { clsx } from 'clsx';\nimport { isPresetColor } from '../_util/colors';\nimport { generateColor } from '../color-picker/util';\nimport { genCssVar } from '../theme/util/genStyleUtils';\nexport const parseColor = (rootPrefixCls, prefixCls, color) => {\n const isInternalColor = isPresetColor(color);\n const [varName] = genCssVar(rootPrefixCls, 'tooltip');\n const className = clsx({\n [`${prefixCls}-${color}`]: color && isInternalColor\n });\n const overlayStyle = {};\n const arrowStyle = {};\n const rgb = generateColor(color).toRgb();\n const luminance = (0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b) / 255;\n const textColor = luminance < 0.5 ? '#FFF' : '#000';\n if (color && !isInternalColor) {\n overlayStyle.background = color;\n overlayStyle[varName('overlay-color')] = textColor;\n arrowStyle[varName('arrow-background-color')] = color;\n }\n return {\n className,\n overlayStyle,\n arrowStyle\n };\n};"],"names":["parseColor","rootPrefixCls","prefixCls","color","isInternalColor","isPresetColor","varName","genCssVar","className","clsx","overlayStyle","arrowStyle","rgb","generateColor","textColor"],"mappings":";;;;AAIY,MAACA,IAAa,CAACC,GAAeC,GAAWC,MAAU;AAC7D,QAAMC,IAAkBC,EAAcF,CAAK,GACrC,CAACG,CAAO,IAAIC,EAAUN,GAAe,SAAS,GAC9CO,IAAYC,EAAK;AAAA,IACrB,CAAC,GAAGP,CAAS,IAAIC,CAAK,EAAE,GAAGA,KAASC;AAAA,EACxC,CAAG,GACKM,IAAe,CAAA,GACfC,IAAa,CAAA,GACbC,IAAMC,EAAcV,CAAK,EAAE,MAAK,GAEhCW,KADa,QAAQF,EAAI,IAAI,QAAQA,EAAI,IAAI,QAAQA,EAAI,KAAK,MACtC,MAAM,SAAS;AAC7C,SAAIT,KAAS,CAACC,MACZM,EAAa,aAAaP,GAC1BO,EAAaJ,EAAQ,eAAe,CAAC,IAAIQ,GACzCH,EAAWL,EAAQ,wBAAwB,CAAC,IAAIH,IAE3C;AAAA,IACL,WAAAK;AAAA,IACA,cAAAE;AAAA,IACA,YAAAC;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
|
|
@@ -9,88 +9,89 @@ import { convertDataToEntities as G, convertTreeToData as H } from "../../../@rc
|
|
|
9
9
|
import { clsx as J } from "../../../clsx/dist/clsx.js";
|
|
10
10
|
import "../config-provider/index.js";
|
|
11
11
|
import M from "./Tree.js";
|
|
12
|
-
import { convertDirectoryKeysToNodes as
|
|
12
|
+
import { convertDirectoryKeysToNodes as E, calcRangeKeys as Q } from "./utils/dictUtil.js";
|
|
13
13
|
import { ConfigContext as U } from "../config-provider/context.js";
|
|
14
|
-
function W(
|
|
14
|
+
function W(r) {
|
|
15
15
|
const {
|
|
16
16
|
isLeaf: o,
|
|
17
|
-
expanded:
|
|
18
|
-
} =
|
|
19
|
-
return o ? /* @__PURE__ */ t.createElement(L, null) :
|
|
17
|
+
expanded: m
|
|
18
|
+
} = r;
|
|
19
|
+
return o ? /* @__PURE__ */ t.createElement(L, null) : m ? /* @__PURE__ */ t.createElement(V, null) : /* @__PURE__ */ t.createElement(q, null);
|
|
20
20
|
}
|
|
21
21
|
function T({
|
|
22
|
-
treeData:
|
|
22
|
+
treeData: r,
|
|
23
23
|
children: o
|
|
24
24
|
}) {
|
|
25
|
-
return
|
|
25
|
+
return r || H(o);
|
|
26
26
|
}
|
|
27
27
|
const X = ({
|
|
28
|
-
defaultExpandAll:
|
|
28
|
+
defaultExpandAll: r,
|
|
29
29
|
defaultExpandParent: o,
|
|
30
|
-
defaultExpandedKeys:
|
|
30
|
+
defaultExpandedKeys: m,
|
|
31
31
|
...e
|
|
32
32
|
}, R) => {
|
|
33
|
-
const
|
|
33
|
+
const y = t.useRef(null), u = t.useRef(null), g = () => {
|
|
34
34
|
const {
|
|
35
|
-
keyEntities:
|
|
35
|
+
keyEntities: s
|
|
36
36
|
} = G(T(e), {
|
|
37
37
|
fieldNames: e.fieldNames
|
|
38
38
|
});
|
|
39
39
|
let c;
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const d = e.expandedKeys || m || [];
|
|
41
|
+
return r ? c = Object.keys(s) : o ? c = B(d, s) : c = d, c;
|
|
42
|
+
}, [w, N] = t.useState(e.selectedKeys || e.defaultSelectedKeys || []), [S, C] = t.useState(() => g());
|
|
42
43
|
t.useEffect(() => {
|
|
43
|
-
"selectedKeys" in e &&
|
|
44
|
+
"selectedKeys" in e && N(e.selectedKeys);
|
|
44
45
|
}, [e.selectedKeys]), t.useEffect(() => {
|
|
45
|
-
"expandedKeys" in e &&
|
|
46
|
+
"expandedKeys" in e && C(e.expandedKeys);
|
|
46
47
|
}, [e.expandedKeys]);
|
|
47
|
-
const
|
|
48
|
+
const I = (s, c) => ("expandedKeys" in e || C(s), e.onExpand?.(s, c)), k = (s, c) => {
|
|
48
49
|
const {
|
|
49
|
-
multiple:
|
|
50
|
-
fieldNames:
|
|
50
|
+
multiple: d,
|
|
51
|
+
fieldNames: i
|
|
51
52
|
} = e, {
|
|
52
53
|
node: _,
|
|
53
|
-
nativeEvent:
|
|
54
|
+
nativeEvent: x
|
|
54
55
|
} = c, {
|
|
55
56
|
key: l = ""
|
|
56
57
|
} = _, a = T(e), f = {
|
|
57
58
|
...c,
|
|
58
59
|
selected: !0
|
|
59
60
|
// Directory selected always true
|
|
60
|
-
}, j =
|
|
61
|
+
}, j = x?.ctrlKey || x?.metaKey, z = x?.shiftKey;
|
|
61
62
|
let n;
|
|
62
|
-
|
|
63
|
+
d && j ? (n = s, y.current = l, u.current = n, f.selectedNodes = E(a, n, i)) : d && z ? (n = Array.from(new Set([].concat(D(u.current || []), D(Q({
|
|
63
64
|
treeData: a,
|
|
64
|
-
expandedKeys:
|
|
65
|
+
expandedKeys: S,
|
|
65
66
|
startKey: l,
|
|
66
|
-
endKey:
|
|
67
|
-
fieldNames:
|
|
68
|
-
}))))), f.selectedNodes =
|
|
67
|
+
endKey: y.current,
|
|
68
|
+
fieldNames: i
|
|
69
|
+
}))))), f.selectedNodes = E(a, n, i)) : (n = [l], y.current = l, u.current = n, f.selectedNodes = E(a, n, i)), e.onSelect?.(n, f), "selectedKeys" in e || N(n);
|
|
69
70
|
}, {
|
|
70
|
-
getPrefixCls:
|
|
71
|
+
getPrefixCls: p,
|
|
71
72
|
direction: v
|
|
72
73
|
} = t.useContext(U), {
|
|
73
74
|
prefixCls: P,
|
|
74
|
-
className:
|
|
75
|
-
showIcon:
|
|
76
|
-
expandAction:
|
|
77
|
-
...
|
|
78
|
-
} = e,
|
|
79
|
-
[`${
|
|
80
|
-
},
|
|
75
|
+
className: h,
|
|
76
|
+
showIcon: $ = !0,
|
|
77
|
+
expandAction: A = "click",
|
|
78
|
+
...b
|
|
79
|
+
} = e, K = p("tree", P), O = J(`${K}-directory`, {
|
|
80
|
+
[`${K}-directory-rtl`]: v === "rtl"
|
|
81
|
+
}, h);
|
|
81
82
|
return /* @__PURE__ */ t.createElement(M, {
|
|
82
83
|
icon: W,
|
|
83
84
|
ref: R,
|
|
84
85
|
blockNode: !0,
|
|
85
|
-
...
|
|
86
|
-
showIcon:
|
|
87
|
-
expandAction:
|
|
88
|
-
prefixCls:
|
|
86
|
+
...b,
|
|
87
|
+
showIcon: $,
|
|
88
|
+
expandAction: A,
|
|
89
|
+
prefixCls: K,
|
|
89
90
|
className: O,
|
|
90
|
-
expandedKeys:
|
|
91
|
-
selectedKeys:
|
|
92
|
-
onSelect:
|
|
93
|
-
onExpand:
|
|
91
|
+
expandedKeys: S,
|
|
92
|
+
selectedKeys: w,
|
|
93
|
+
onSelect: k,
|
|
94
|
+
onExpand: I
|
|
94
95
|
});
|
|
95
96
|
}, Y = /* @__PURE__ */ t.forwardRef(X);
|
|
96
97
|
F.env.NODE_ENV !== "production" && (Y.displayName = "DirectoryTree");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DirectoryTree.js","sources":["../../../../../node_modules/antd/es/tree/DirectoryTree.js"],"sourcesContent":["\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport FileOutlined from \"@ant-design/icons/es/icons/FileOutlined\";\nimport FolderOpenOutlined from \"@ant-design/icons/es/icons/FolderOpenOutlined\";\nimport FolderOutlined from \"@ant-design/icons/es/icons/FolderOutlined\";\nimport { conductExpandParent } from \"@rc-component/tree/es/util\";\nimport { convertDataToEntities, convertTreeToData } from \"@rc-component/tree/es/utils/treeUtil\";\nimport { clsx } from 'clsx';\nimport { ConfigContext } from '../config-provider';\nimport Tree from './Tree';\nimport { calcRangeKeys, convertDirectoryKeysToNodes } from './utils/dictUtil';\nfunction getIcon(props) {\n const {\n isLeaf,\n expanded\n } = props;\n if (isLeaf) {\n return /*#__PURE__*/React.createElement(FileOutlined, null);\n }\n return expanded ? /*#__PURE__*/React.createElement(FolderOpenOutlined, null) : /*#__PURE__*/React.createElement(FolderOutlined, null);\n}\nfunction getTreeData({\n treeData,\n children\n}) {\n return treeData || convertTreeToData(children);\n}\nconst DirectoryTree = ({\n defaultExpandAll,\n defaultExpandParent,\n defaultExpandedKeys,\n ...props\n}, ref) => {\n // Shift click usage\n const lastSelectedKey = React.useRef(null);\n const cachedSelectedKeys = React.useRef(null);\n const getInitExpandedKeys = () => {\n const {\n keyEntities\n } = convertDataToEntities(getTreeData(props), {\n fieldNames: props.fieldNames\n });\n let initExpandedKeys;\n // Expanded keys\n if (defaultExpandAll) {\n initExpandedKeys = Object.keys(keyEntities);\n } else if (defaultExpandParent) {\n initExpandedKeys = conductExpandParent(
|
|
1
|
+
{"version":3,"file":"DirectoryTree.js","sources":["../../../../../node_modules/antd/es/tree/DirectoryTree.js"],"sourcesContent":["\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport FileOutlined from \"@ant-design/icons/es/icons/FileOutlined\";\nimport FolderOpenOutlined from \"@ant-design/icons/es/icons/FolderOpenOutlined\";\nimport FolderOutlined from \"@ant-design/icons/es/icons/FolderOutlined\";\nimport { conductExpandParent } from \"@rc-component/tree/es/util\";\nimport { convertDataToEntities, convertTreeToData } from \"@rc-component/tree/es/utils/treeUtil\";\nimport { clsx } from 'clsx';\nimport { ConfigContext } from '../config-provider';\nimport Tree from './Tree';\nimport { calcRangeKeys, convertDirectoryKeysToNodes } from './utils/dictUtil';\nfunction getIcon(props) {\n const {\n isLeaf,\n expanded\n } = props;\n if (isLeaf) {\n return /*#__PURE__*/React.createElement(FileOutlined, null);\n }\n return expanded ? /*#__PURE__*/React.createElement(FolderOpenOutlined, null) : /*#__PURE__*/React.createElement(FolderOutlined, null);\n}\nfunction getTreeData({\n treeData,\n children\n}) {\n return treeData || convertTreeToData(children);\n}\nconst DirectoryTree = ({\n defaultExpandAll,\n defaultExpandParent,\n defaultExpandedKeys,\n ...props\n}, ref) => {\n // Shift click usage\n const lastSelectedKey = React.useRef(null);\n const cachedSelectedKeys = React.useRef(null);\n const getInitExpandedKeys = () => {\n const {\n keyEntities\n } = convertDataToEntities(getTreeData(props), {\n fieldNames: props.fieldNames\n });\n let initExpandedKeys;\n const mergedExpandedKeys = props.expandedKeys || defaultExpandedKeys || [];\n // Expanded keys\n if (defaultExpandAll) {\n initExpandedKeys = Object.keys(keyEntities);\n } else if (defaultExpandParent) {\n initExpandedKeys = conductExpandParent(mergedExpandedKeys, keyEntities);\n } else {\n initExpandedKeys = mergedExpandedKeys;\n }\n return initExpandedKeys;\n };\n const [selectedKeys, setSelectedKeys] = React.useState(props.selectedKeys || props.defaultSelectedKeys || []);\n const [expandedKeys, setExpandedKeys] = React.useState(() => getInitExpandedKeys());\n React.useEffect(() => {\n if ('selectedKeys' in props) {\n setSelectedKeys(props.selectedKeys);\n }\n }, [props.selectedKeys]);\n React.useEffect(() => {\n if ('expandedKeys' in props) {\n setExpandedKeys(props.expandedKeys);\n }\n }, [props.expandedKeys]);\n const onExpand = (keys, info) => {\n if (!('expandedKeys' in props)) {\n setExpandedKeys(keys);\n }\n // Call origin function\n return props.onExpand?.(keys, info);\n };\n const onSelect = (keys, event) => {\n const {\n multiple,\n fieldNames\n } = props;\n const {\n node,\n nativeEvent\n } = event;\n const {\n key = ''\n } = node;\n const treeData = getTreeData(props);\n // We need wrap this event since some value is not same\n const newEvent = {\n ...event,\n selected: true // Directory selected always true\n };\n // Windows / Mac single pick\n const ctrlPick = nativeEvent?.ctrlKey || nativeEvent?.metaKey;\n const shiftPick = nativeEvent?.shiftKey;\n // Generate new selected keys\n let newSelectedKeys;\n if (multiple && ctrlPick) {\n // Control click\n newSelectedKeys = keys;\n lastSelectedKey.current = key;\n cachedSelectedKeys.current = newSelectedKeys;\n newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);\n } else if (multiple && shiftPick) {\n // Shift click\n newSelectedKeys = Array.from(new Set([].concat(_toConsumableArray(cachedSelectedKeys.current || []), _toConsumableArray(calcRangeKeys({\n treeData,\n expandedKeys,\n startKey: key,\n endKey: lastSelectedKey.current,\n fieldNames\n })))));\n newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);\n } else {\n // Single click\n newSelectedKeys = [key];\n lastSelectedKey.current = key;\n cachedSelectedKeys.current = newSelectedKeys;\n newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);\n }\n props.onSelect?.(newSelectedKeys, newEvent);\n if (!('selectedKeys' in props)) {\n setSelectedKeys(newSelectedKeys);\n }\n };\n const {\n getPrefixCls,\n direction\n } = React.useContext(ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n className,\n showIcon = true,\n expandAction = 'click',\n ...restProps\n } = props;\n const prefixCls = getPrefixCls('tree', customizePrefixCls);\n const connectClassName = clsx(`${prefixCls}-directory`, {\n [`${prefixCls}-directory-rtl`]: direction === 'rtl'\n }, className);\n return /*#__PURE__*/React.createElement(Tree, {\n icon: getIcon,\n ref: ref,\n blockNode: true,\n ...restProps,\n showIcon: showIcon,\n expandAction: expandAction,\n prefixCls: prefixCls,\n className: connectClassName,\n expandedKeys: expandedKeys,\n selectedKeys: selectedKeys,\n onSelect: onSelect,\n onExpand: onExpand\n });\n};\nconst ForwardDirectoryTree = /*#__PURE__*/React.forwardRef(DirectoryTree);\nif (process.env.NODE_ENV !== 'production') {\n ForwardDirectoryTree.displayName = 'DirectoryTree';\n}\nexport default ForwardDirectoryTree;"],"names":["getIcon","props","isLeaf","expanded","React","FileOutlined","FolderOpenOutlined","FolderOutlined","getTreeData","treeData","children","convertTreeToData","DirectoryTree","defaultExpandAll","defaultExpandParent","defaultExpandedKeys","ref","lastSelectedKey","cachedSelectedKeys","getInitExpandedKeys","keyEntities","convertDataToEntities","initExpandedKeys","mergedExpandedKeys","conductExpandParent","selectedKeys","setSelectedKeys","expandedKeys","setExpandedKeys","onExpand","keys","info","onSelect","event","multiple","fieldNames","node","nativeEvent","key","newEvent","ctrlPick","shiftPick","newSelectedKeys","convertDirectoryKeysToNodes","_toConsumableArray","calcRangeKeys","getPrefixCls","direction","ConfigContext","customizePrefixCls","className","showIcon","expandAction","restProps","prefixCls","connectClassName","clsx","Tree","ForwardDirectoryTree","process"],"mappings":";;;;;;;;;;;;;AAaA,SAASA,EAAQC,GAAO;AACtB,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,EACJ,IAAMF;AACJ,SAAIC,IACkB,gBAAAE,EAAM,cAAcC,GAAc,IAAI,IAErDF,IAAwB,gBAAAC,EAAM,cAAcE,GAAoB,IAAI,IAAiB,gBAAAF,EAAM,cAAcG,GAAgB,IAAI;AACtI;AACA,SAASC,EAAY;AAAA,EACnB,UAAAC;AAAA,EACA,UAAAC;AACF,GAAG;AACD,SAAOD,KAAYE,EAAkBD,CAAQ;AAC/C;AACA,MAAME,IAAgB,CAAC;AAAA,EACrB,kBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,GAAGd;AACL,GAAGe,MAAQ;AAET,QAAMC,IAAkBb,EAAM,OAAO,IAAI,GACnCc,IAAqBd,EAAM,OAAO,IAAI,GACtCe,IAAsB,MAAM;AAChC,UAAM;AAAA,MACJ,aAAAC;AAAA,IACN,IAAQC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,UAAUH;AAAA,EACd,CAAG;AACH,GACM6B,IAAoC,gBAAAtD,EAAM,WAAWQ,CAAa;AACpE+C,EAAQ,IAAI,aAAa,iBAC3BD,EAAqB,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../../../node_modules/antd/es/version/version.js"],"sourcesContent":["export default '6.1
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../../../node_modules/antd/es/version/version.js"],"sourcesContent":["export default '6.2.1';"],"names":["version"],"mappings":"AAAA,MAAAA,IAAe;","x_google_ignoreList":[0]}
|