tntd 2.7.30 → 2.7.31
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/es/ellipsis/index.js +2 -0
- package/es/ellipsis/index.js.map +1 -1
- package/lib/ellipsis/index.d.ts.map +1 -1
- package/lib/ellipsis/index.js +2 -0
- package/lib/ellipsis/index.js.map +1 -1
- package/package.json +1 -1
- package/themes/common/index.less +3 -3
- package/es/affix/style/index.less +0 -6
- package/es/alert/style/index.less +0 -188
- package/es/anchor/style/index.less +0 -82
- package/es/auto-complete/style/index.less +0 -92
- package/es/avatar/style/index.less +0 -59
- package/es/back-top/style/index.less +0 -42
- package/es/back-top/style/responsive.less +0 -11
- package/es/badge/style/index.less +0 -190
- package/es/breadcrumb/style/index.less +0 -51
- package/es/button/style/index.less +0 -224
- package/es/button/style/mixin.less +0 -357
- package/es/calendar/style/index.less +0 -278
- package/es/card/style/index.less +0 -263
- package/es/card/style/size.less +0 -25
- package/es/carousel/style/index.less +0 -238
- package/es/cascader/style/index.less +0 -227
- package/es/checkbox/style/index.less +0 -4
- package/es/checkbox/style/mixin.less +0 -220
- package/es/collapse/style/index.less +0 -134
- package/es/comment/style/index.less +0 -93
- package/es/config-provider/style/index.less +0 -2
- package/es/date-picker/style/Calendar.less +0 -402
- package/es/date-picker/style/DecadePanel.less +0 -81
- package/es/date-picker/style/MonthPanel.less +0 -86
- package/es/date-picker/style/MonthPicker.less +0 -11
- package/es/date-picker/style/Picker.less +0 -113
- package/es/date-picker/style/RangePicker.less +0 -248
- package/es/date-picker/style/TimePicker.less +0 -151
- package/es/date-picker/style/WeekPicker.less +0 -21
- package/es/date-picker/style/YearPanel.less +0 -85
- package/es/date-picker/style/index.less +0 -17
- package/es/descriptions/style/index.less +0 -144
- package/es/divider/style/index.less +0 -109
- package/es/drawer/style/drawer.less +0 -230
- package/es/drawer/style/index.less +0 -3
- package/es/dropdown/style/index.less +0 -282
- package/es/empty/style/index.less +0 -52
- package/es/form/style/index.less +0 -653
- package/es/form/style/mixin.less +0 -126
- package/es/grid-v4/style/index.less +0 -124
- package/es/grid-v4/style/mixin.less +0 -57
- package/es/grid-v4/style/rtl.less +0 -69
- package/es/handle/handle.js +0 -138
- package/es/handle/handle.js.map +0 -1
- package/es/icon/style/index.less +0 -4
- package/es/input/style/index.less +0 -57
- package/es/input/style/mixin.less +0 -449
- package/es/input/style/search-input.less +0 -34
- package/es/input-number/style/index.less +0 -179
- package/es/layout/style/index.less +0 -124
- package/es/layout/style/light.less +0 -15
- package/es/list/style/bordered.less +0 -41
- package/es/list/style/index.less +0 -234
- package/es/list/style/responsive.less +0 -40
- package/es/locale-provider/style/index.less +0 -2
- package/es/mention/index.js +0 -4
- package/es/mention/index.js.map +0 -1
- package/es/mentions/style/index.less +0 -164
- package/es/menu/style/dark.less +0 -139
- package/es/menu/style/index.less +0 -515
- package/es/message/style/index.less +0 -75
- package/es/modal/style/confirm.less +0 -78
- package/es/modal/style/index.less +0 -4
- package/es/modal/style/modal.less +0 -165
- package/es/notification/style/index.less +0 -199
- package/es/page-header/style/index.less +0 -119
- package/es/pagination/style/index.less +0 -400
- package/es/popover/style/index.less +0 -205
- package/es/progress/style/index.less +0 -182
- package/es/radio/style/index.less +0 -327
- package/es/rate/style/index.less +0 -85
- package/es/result/style/index.less +0 -71
- package/es/select/style/index.less +0 -604
- package/es/skeleton/style/index.less +0 -130
- package/es/slider/style/index.less +0 -197
- package/es/spin/style/index.less +0 -214
- package/es/statistic/style/index.less +0 -40
- package/es/steps/style/compatibility.less +0 -50
- package/es/steps/style/custom-icon.less +0 -31
- package/es/steps/style/label-placement.less +0 -38
- package/es/steps/style/progress-dot.less +0 -80
- package/es/steps/style/vertical.less +0 -74
- package/es/style/color/bezierEasing.less +0 -110
- package/es/style/color/colorPalette.less +0 -75
- package/es/style/color/colors.less +0 -149
- package/es/style/color/tinyColor.less +0 -1184
- package/es/style/core/base.less +0 -510
- package/es/style/core/iconfont.less +0 -19
- package/es/style/core/index.less +0 -4
- package/es/style/core/motion/fade.less +0 -31
- package/es/style/core/motion/move.less +0 -120
- package/es/style/core/motion/other.less +0 -40
- package/es/style/core/motion/slide.less +0 -120
- package/es/style/core/motion/swing.less +0 -34
- package/es/style/core/motion/zoom.less +0 -162
- package/es/style/core/motion.less +0 -20
- package/es/style/index.less +0 -2
- package/es/style/mixins/clearfix.less +0 -13
- package/es/style/mixins/compatibility.less +0 -22
- package/es/style/mixins/iconfont.less +0 -43
- package/es/style/mixins/index.less +0 -10
- package/es/style/mixins/motion.less +0 -35
- package/es/style/mixins/operation-unit.less +0 -18
- package/es/style/mixins/reset.less +0 -13
- package/es/style/mixins/size.less +0 -10
- package/es/style/mixins/typography.less +0 -49
- package/es/style/themes/default.less +0 -699
- package/es/style/themes/index.less +0 -1
- package/es/style/v2-compatible-reset.less +0 -51
- package/es/switch/style/index.less +0 -178
- package/es/table/style/index.less +0 -800
- package/es/table/style/size.less +0 -179
- package/es/tabs/style/card-style.less +0 -186
- package/es/tabs/style/index.less +0 -436
- package/es/tag/style/index.less +0 -106
- package/es/time-picker/style/index.less +0 -246
- package/es/timeline/style/index.less +0 -167
- package/es/tntd-form/TntdForm/components/Item.js +0 -55
- package/es/tntd-form/TntdForm/components/Item.js.map +0 -1
- package/es/tntd-form/TntdForm/components/ItemComp.js +0 -186
- package/es/tntd-form/TntdForm/components/ItemComp.js.map +0 -1
- package/es/tntd-form/TntdForm/components/List.js +0 -102
- package/es/tntd-form/TntdForm/components/List.js.map +0 -1
- package/es/tntd-form/TntdForm/index.js +0 -55
- package/es/tntd-form/TntdForm/index.js.map +0 -1
- package/es/tntd-form/TntdForm/interface.js +0 -1
- package/es/tntd-form/TntdForm/interface.js.map +0 -1
- package/es/tntd-form/TntdForm/store.js +0 -2
- package/es/tntd-form/TntdForm/store.js.map +0 -1
- package/es/tntd-form/TntdForm/utils.js +0 -219
- package/es/tntd-form/TntdForm/utils.js.map +0 -1
- package/es/tntd-form/_util/motion.js +0 -47
- package/es/tntd-form/_util/motion.js.map +0 -1
- package/es/tntd-form/_util/reactNode.js +0 -16
- package/es/tntd-form/_util/reactNode.js.map +0 -1
- package/es/tntd-form/_util/scrollTo.js +0 -35
- package/es/tntd-form/_util/scrollTo.js.map +0 -1
- package/es/tntd-form/_util/type.js +0 -3
- package/es/tntd-form/_util/type.js.map +0 -1
- package/es/tntd-form/_util/warning.js +0 -5
- package/es/tntd-form/_util/warning.js.map +0 -1
- package/es/tntd-form/_util/wave.js +0 -168
- package/es/tntd-form/_util/wave.js.map +0 -1
- package/es/tntd-form/tntd-form.stories.js +0 -836
- package/es/tntd-form/tntd-form.stories.js.map +0 -1
- package/es/tntd-select/_util/DisabledContext.js +0 -12
- package/es/tntd-select/_util/DisabledContext.js.map +0 -1
- package/es/tntd-select/_util/FormItemInputContext.js +0 -2
- package/es/tntd-select/_util/FormItemInputContext.js.map +0 -1
- package/es/tntd-select/_util/PurePanel.js +0 -66
- package/es/tntd-select/_util/PurePanel.js.map +0 -1
- package/es/tntd-select/_util/SizeContext.js +0 -2
- package/es/tntd-select/_util/SizeContext.js.map +0 -1
- package/es/tntd-select/_util/context.js +0 -12
- package/es/tntd-select/_util/context.js.map +0 -1
- package/es/tntd-select/_util/defaultRenderEmpty.js +0 -31
- package/es/tntd-select/_util/defaultRenderEmpty.js.map +0 -1
- package/es/tntd-select/_util/getIcons.js +0 -74
- package/es/tntd-select/_util/getIcons.js.map +0 -1
- package/es/tntd-select/_util/interface.js +0 -4
- package/es/tntd-select/_util/interface.js.map +0 -1
- package/es/tntd-select/_util/motion.js +0 -47
- package/es/tntd-select/_util/motion.js.map +0 -1
- package/es/tntd-select/_util/type.js +0 -3
- package/es/tntd-select/_util/type.js.map +0 -1
- package/es/tntd-select/_util/useCompactItemContext.js +0 -26
- package/es/tntd-select/_util/useCompactItemContext.js.map +0 -1
- package/es/tntd-select/_util/warning.js +0 -14
- package/es/tntd-select/_util/warning.js.map +0 -1
- package/es/tntd-select/rc-select/BaseSelect.js +0 -524
- package/es/tntd-select/rc-select/BaseSelect.js.map +0 -1
- package/es/tntd-select/rc-select/OptGroup.js +0 -4
- package/es/tntd-select/rc-select/OptGroup.js.map +0 -1
- package/es/tntd-select/rc-select/Option.js +0 -4
- package/es/tntd-select/rc-select/Option.js.map +0 -1
- package/es/tntd-select/rc-select/OptionList.js +0 -346
- package/es/tntd-select/rc-select/OptionList.js.map +0 -1
- package/es/tntd-select/rc-select/Select.js +0 -440
- package/es/tntd-select/rc-select/Select.js.map +0 -1
- package/es/tntd-select/rc-select/SelectContext.js +0 -3
- package/es/tntd-select/rc-select/SelectContext.js.map +0 -1
- package/es/tntd-select/rc-select/SelectTrigger.js +0 -130
- package/es/tntd-select/rc-select/SelectTrigger.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/Input.js +0 -103
- package/es/tntd-select/rc-select/Selector/Input.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js +0 -171
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/SingleSelector.js +0 -98
- package/es/tntd-select/rc-select/Selector/SingleSelector.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/index.js +0 -158
- package/es/tntd-select/rc-select/Selector/index.js.map +0 -1
- package/es/tntd-select/rc-select/TransBtn.js +0 -36
- package/es/tntd-select/rc-select/TransBtn.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useAllowClear.js +0 -24
- package/es/tntd-select/rc-select/hooks/useAllowClear.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useBaseProps.js +0 -9
- package/es/tntd-select/rc-select/hooks/useBaseProps.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useCache.js +0 -38
- package/es/tntd-select/rc-select/hooks/useCache.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useDelayReset.js +0 -23
- package/es/tntd-select/rc-select/hooks/useDelayReset.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useFilterOptions.js +0 -55
- package/es/tntd-select/rc-select/hooks/useFilterOptions.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useId.js +0 -26
- package/es/tntd-select/rc-select/hooks/useId.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js +0 -16
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useLock.js +0 -25
- package/es/tntd-select/rc-select/hooks/useLock.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useOptions.js +0 -43
- package/es/tntd-select/rc-select/hooks/useOptions.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useRefFunc.js +0 -13
- package/es/tntd-select/rc-select/hooks/useRefFunc.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js +0 -28
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +0 -1
- package/es/tntd-select/rc-select/index.js +0 -7
- package/es/tntd-select/rc-select/index.js.map +0 -1
- package/es/tntd-select/rc-select/interface.js +0 -1
- package/es/tntd-select/rc-select/interface.js.map +0 -1
- package/es/tntd-select/rc-select/utils/commonUtil.js +0 -30
- package/es/tntd-select/rc-select/utils/commonUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/keyUtil.js +0 -9
- package/es/tntd-select/rc-select/utils/keyUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/legacyUtil.js +0 -55
- package/es/tntd-select/rc-select/utils/legacyUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/platformUtil.js +0 -4
- package/es/tntd-select/rc-select/utils/platformUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/valueUtil.js +0 -112
- package/es/tntd-select/rc-select/utils/valueUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js +0 -112
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
- package/es/tooltip/style/index.less +0 -187
- package/es/transfer/style/customize.less +0 -62
- package/es/transfer/style/index.less +0 -191
- package/es/tree/style/directory.less +0 -95
- package/es/tree/style/index.less +0 -280
- package/es/tree/style/mixin.less +0 -29
- package/es/tree-select/style/index.less +0 -191
- package/es/typography/style/index.less +0 -204
- package/es/upload/style/index.less +0 -542
- package/lib/affix/style/index.less +0 -6
- package/lib/alert/style/index.less +0 -188
- package/lib/anchor/style/index.less +0 -82
- package/lib/auto-complete/style/index.less +0 -92
- package/lib/avatar/style/index.less +0 -59
- package/lib/back-top/style/index.less +0 -42
- package/lib/back-top/style/responsive.less +0 -11
- package/lib/badge/style/index.less +0 -190
- package/lib/breadcrumb/style/index.less +0 -51
- package/lib/button/style/index.less +0 -224
- package/lib/button/style/mixin.less +0 -357
- package/lib/calendar/style/index.less +0 -278
- package/lib/card/style/index.less +0 -263
- package/lib/card/style/size.less +0 -25
- package/lib/carousel/style/index.less +0 -238
- package/lib/cascader/style/index.less +0 -227
- package/lib/checkbox/style/index.less +0 -4
- package/lib/checkbox/style/mixin.less +0 -220
- package/lib/collapse/style/index.less +0 -134
- package/lib/comment/style/index.less +0 -93
- package/lib/config-provider/style/index.less +0 -2
- package/lib/date-picker/style/Calendar.less +0 -402
- package/lib/date-picker/style/DecadePanel.less +0 -81
- package/lib/date-picker/style/MonthPanel.less +0 -86
- package/lib/date-picker/style/MonthPicker.less +0 -11
- package/lib/date-picker/style/Picker.less +0 -113
- package/lib/date-picker/style/RangePicker.less +0 -248
- package/lib/date-picker/style/TimePicker.less +0 -151
- package/lib/date-picker/style/WeekPicker.less +0 -21
- package/lib/date-picker/style/YearPanel.less +0 -85
- package/lib/date-picker/style/index.less +0 -17
- package/lib/descriptions/style/index.less +0 -144
- package/lib/divider/style/index.less +0 -109
- package/lib/drawer/style/drawer.less +0 -230
- package/lib/drawer/style/index.less +0 -3
- package/lib/dropdown/style/index.less +0 -282
- package/lib/empty/style/index.less +0 -52
- package/lib/form/style/index.less +0 -653
- package/lib/form/style/mixin.less +0 -126
- package/lib/grid-v4/style/index.less +0 -124
- package/lib/grid-v4/style/mixin.less +0 -57
- package/lib/grid-v4/style/rtl.less +0 -69
- package/lib/handle/handle.d.ts +0 -3
- package/lib/handle/handle.d.ts.map +0 -1
- package/lib/handle/handle.js +0 -181
- package/lib/handle/handle.js.map +0 -1
- package/lib/icon/style/index.less +0 -4
- package/lib/input/style/index.less +0 -57
- package/lib/input/style/mixin.less +0 -449
- package/lib/input/style/search-input.less +0 -34
- package/lib/input-number/style/index.less +0 -179
- package/lib/layout/style/index.less +0 -124
- package/lib/layout/style/light.less +0 -15
- package/lib/list/style/bordered.less +0 -41
- package/lib/list/style/index.less +0 -234
- package/lib/list/style/responsive.less +0 -40
- package/lib/locale-provider/style/index.less +0 -2
- package/lib/mention/index.js +0 -25
- package/lib/mentions/style/index.less +0 -164
- package/lib/menu/style/dark.less +0 -139
- package/lib/menu/style/index.less +0 -515
- package/lib/message/style/index.less +0 -75
- package/lib/modal/style/confirm.less +0 -78
- package/lib/modal/style/index.less +0 -4
- package/lib/modal/style/modal.less +0 -165
- package/lib/notification/style/index.less +0 -199
- package/lib/page-header/style/index.less +0 -119
- package/lib/pagination/style/index.less +0 -400
- package/lib/popover/style/index.less +0 -205
- package/lib/progress/style/index.less +0 -182
- package/lib/radio/style/index.less +0 -327
- package/lib/rate/style/index.less +0 -85
- package/lib/result/style/index.less +0 -71
- package/lib/select/style/index.less +0 -604
- package/lib/skeleton/style/index.less +0 -130
- package/lib/slider/style/index.less +0 -197
- package/lib/spin/style/index.less +0 -214
- package/lib/statistic/style/index.less +0 -40
- package/lib/steps/style/compatibility.less +0 -50
- package/lib/steps/style/custom-icon.less +0 -31
- package/lib/steps/style/label-placement.less +0 -38
- package/lib/steps/style/progress-dot.less +0 -80
- package/lib/steps/style/vertical.less +0 -74
- package/lib/style/color/bezierEasing.less +0 -110
- package/lib/style/color/colorPalette.less +0 -75
- package/lib/style/color/colors.less +0 -149
- package/lib/style/color/tinyColor.less +0 -1184
- package/lib/style/core/base.less +0 -510
- package/lib/style/core/iconfont.less +0 -19
- package/lib/style/core/index.less +0 -4
- package/lib/style/core/motion/fade.less +0 -31
- package/lib/style/core/motion/move.less +0 -120
- package/lib/style/core/motion/other.less +0 -40
- package/lib/style/core/motion/slide.less +0 -120
- package/lib/style/core/motion/swing.less +0 -34
- package/lib/style/core/motion/zoom.less +0 -162
- package/lib/style/core/motion.less +0 -20
- package/lib/style/index.less +0 -2
- package/lib/style/mixins/clearfix.less +0 -13
- package/lib/style/mixins/compatibility.less +0 -22
- package/lib/style/mixins/iconfont.less +0 -43
- package/lib/style/mixins/index.less +0 -10
- package/lib/style/mixins/motion.less +0 -35
- package/lib/style/mixins/operation-unit.less +0 -18
- package/lib/style/mixins/reset.less +0 -13
- package/lib/style/mixins/size.less +0 -10
- package/lib/style/mixins/typography.less +0 -49
- package/lib/style/themes/default.less +0 -699
- package/lib/style/themes/index.less +0 -1
- package/lib/style/v2-compatible-reset.less +0 -51
- package/lib/switch/style/index.less +0 -178
- package/lib/table/style/index.less +0 -800
- package/lib/table/style/size.less +0 -179
- package/lib/tabs/style/card-style.less +0 -186
- package/lib/tabs/style/index.less +0 -436
- package/lib/tag/style/index.less +0 -106
- package/lib/time-picker/style/index.less +0 -246
- package/lib/timeline/style/index.less +0 -167
- package/lib/tntd-form/TntdForm/components/Item.js +0 -65
- package/lib/tntd-form/TntdForm/components/ItemComp.js +0 -215
- package/lib/tntd-form/TntdForm/components/List.js +0 -123
- package/lib/tntd-form/TntdForm/index.js +0 -72
- package/lib/tntd-form/TntdForm/interface.js +0 -5
- package/lib/tntd-form/TntdForm/store.js +0 -10
- package/lib/tntd-form/TntdForm/utils.js +0 -239
- package/lib/tntd-form/_util/motion.d.ts +0 -9
- package/lib/tntd-form/_util/motion.d.ts.map +0 -1
- package/lib/tntd-form/_util/motion.js +0 -59
- package/lib/tntd-form/_util/motion.js.map +0 -1
- package/lib/tntd-form/_util/reactNode.d.ts +0 -9
- package/lib/tntd-form/_util/reactNode.d.ts.map +0 -1
- package/lib/tntd-form/_util/reactNode.js +0 -27
- package/lib/tntd-form/_util/reactNode.js.map +0 -1
- package/lib/tntd-form/_util/scrollTo.d.ts +0 -1
- package/lib/tntd-form/_util/scrollTo.d.ts.map +0 -1
- package/lib/tntd-form/_util/scrollTo.js +0 -35
- package/lib/tntd-form/_util/scrollTo.js.map +0 -1
- package/lib/tntd-form/_util/type.d.ts +0 -4
- package/lib/tntd-form/_util/type.d.ts.map +0 -1
- package/lib/tntd-form/_util/type.js +0 -21
- package/lib/tntd-form/_util/type.js.map +0 -1
- package/lib/tntd-form/_util/warning.d.ts +0 -5
- package/lib/tntd-form/_util/warning.d.ts.map +0 -1
- package/lib/tntd-form/_util/warning.js +0 -20
- package/lib/tntd-form/_util/warning.js.map +0 -1
- package/lib/tntd-form/_util/wave.d.ts +0 -1
- package/lib/tntd-form/_util/wave.d.ts.map +0 -1
- package/lib/tntd-form/_util/wave.js +0 -168
- package/lib/tntd-form/_util/wave.js.map +0 -1
- package/lib/tntd-form/tntd-form.stories.d.ts +0 -33
- package/lib/tntd-form/tntd-form.stories.d.ts.map +0 -1
- package/lib/tntd-form/tntd-form.stories.js +0 -943
- package/lib/tntd-form/tntd-form.stories.js.map +0 -1
- package/lib/tntd-select/_util/DisabledContext.d.ts +0 -10
- package/lib/tntd-select/_util/DisabledContext.d.ts.map +0 -1
- package/lib/tntd-select/_util/DisabledContext.js +0 -22
- package/lib/tntd-select/_util/DisabledContext.js.map +0 -1
- package/lib/tntd-select/_util/FormItemInputContext.d.ts +0 -4
- package/lib/tntd-select/_util/FormItemInputContext.d.ts.map +0 -1
- package/lib/tntd-select/_util/FormItemInputContext.js +0 -12
- package/lib/tntd-select/_util/FormItemInputContext.js.map +0 -1
- package/lib/tntd-select/_util/PurePanel.d.ts +0 -9
- package/lib/tntd-select/_util/PurePanel.d.ts.map +0 -1
- package/lib/tntd-select/_util/PurePanel.js +0 -90
- package/lib/tntd-select/_util/PurePanel.js.map +0 -1
- package/lib/tntd-select/_util/SizeContext.d.ts +0 -4
- package/lib/tntd-select/_util/SizeContext.d.ts.map +0 -1
- package/lib/tntd-select/_util/SizeContext.js +0 -12
- package/lib/tntd-select/_util/SizeContext.js.map +0 -1
- package/lib/tntd-select/_util/context.d.ts +0 -42
- package/lib/tntd-select/_util/context.d.ts.map +0 -1
- package/lib/tntd-select/_util/context.js +0 -22
- package/lib/tntd-select/_util/context.js.map +0 -1
- package/lib/tntd-select/_util/defaultRenderEmpty.d.ts +0 -5
- package/lib/tntd-select/_util/defaultRenderEmpty.d.ts.map +0 -1
- package/lib/tntd-select/_util/defaultRenderEmpty.js +0 -44
- package/lib/tntd-select/_util/defaultRenderEmpty.js.map +0 -1
- package/lib/tntd-select/_util/getIcons.d.ts +0 -25
- package/lib/tntd-select/_util/getIcons.d.ts.map +0 -1
- package/lib/tntd-select/_util/getIcons.js +0 -84
- package/lib/tntd-select/_util/getIcons.js.map +0 -1
- package/lib/tntd-select/_util/interface.d.ts +0 -25
- package/lib/tntd-select/_util/interface.d.ts.map +0 -1
- package/lib/tntd-select/_util/interface.js +0 -16
- package/lib/tntd-select/_util/interface.js.map +0 -1
- package/lib/tntd-select/_util/motion.d.ts +0 -9
- package/lib/tntd-select/_util/motion.d.ts.map +0 -1
- package/lib/tntd-select/_util/motion.js +0 -59
- package/lib/tntd-select/_util/motion.js.map +0 -1
- package/lib/tntd-select/_util/type.d.ts +0 -10
- package/lib/tntd-select/_util/type.d.ts.map +0 -1
- package/lib/tntd-select/_util/type.js +0 -21
- package/lib/tntd-select/_util/type.js.map +0 -1
- package/lib/tntd-select/_util/useCompactItemContext.d.ts +0 -9
- package/lib/tntd-select/_util/useCompactItemContext.d.ts.map +0 -1
- package/lib/tntd-select/_util/useCompactItemContext.js +0 -35
- package/lib/tntd-select/_util/useCompactItemContext.js.map +0 -1
- package/lib/tntd-select/_util/warning.d.ts +0 -4
- package/lib/tntd-select/_util/warning.d.ts.map +0 -1
- package/lib/tntd-select/_util/warning.js +0 -24
- package/lib/tntd-select/_util/warning.js.map +0 -1
- package/lib/tntd-select/rc-select/BaseSelect.d.ts +0 -114
- package/lib/tntd-select/rc-select/BaseSelect.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/BaseSelect.js +0 -566
- package/lib/tntd-select/rc-select/BaseSelect.js.map +0 -1
- package/lib/tntd-select/rc-select/OptGroup.d.ts +0 -13
- package/lib/tntd-select/rc-select/OptGroup.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/OptGroup.js +0 -13
- package/lib/tntd-select/rc-select/OptGroup.js.map +0 -1
- package/lib/tntd-select/rc-select/Option.d.ts +0 -15
- package/lib/tntd-select/rc-select/Option.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Option.js +0 -13
- package/lib/tntd-select/rc-select/Option.js.map +0 -1
- package/lib/tntd-select/rc-select/OptionList.d.ts +0 -11
- package/lib/tntd-select/rc-select/OptionList.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/OptionList.js +0 -372
- package/lib/tntd-select/rc-select/OptionList.js.map +0 -1
- package/lib/tntd-select/rc-select/Select.d.ts +0 -115
- package/lib/tntd-select/rc-select/Select.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Select.js +0 -509
- package/lib/tntd-select/rc-select/Select.js.map +0 -1
- package/lib/tntd-select/rc-select/SelectContext.d.ts +0 -23
- package/lib/tntd-select/rc-select/SelectContext.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/SelectContext.js +0 -13
- package/lib/tntd-select/rc-select/SelectContext.js.map +0 -1
- package/lib/tntd-select/rc-select/SelectTrigger.d.ts +0 -31
- package/lib/tntd-select/rc-select/SelectTrigger.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/SelectTrigger.js +0 -149
- package/lib/tntd-select/rc-select/SelectTrigger.js.map +0 -1
- package/lib/tntd-select/rc-select/Selector/Input.d.ts +0 -27
- package/lib/tntd-select/rc-select/Selector/Input.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Selector/Input.js +0 -110
- package/lib/tntd-select/rc-select/Selector/Input.js.map +0 -1
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts +0 -17
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.js +0 -193
- package/lib/tntd-select/rc-select/Selector/MultipleSelector.js.map +0 -1
- package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts +0 -9
- package/lib/tntd-select/rc-select/Selector/SingleSelector.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Selector/SingleSelector.js +0 -116
- package/lib/tntd-select/rc-select/Selector/SingleSelector.js.map +0 -1
- package/lib/tntd-select/rc-select/Selector/index.d.ts +0 -83
- package/lib/tntd-select/rc-select/Selector/index.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/Selector/index.js +0 -159
- package/lib/tntd-select/rc-select/Selector/index.js.map +0 -1
- package/lib/tntd-select/rc-select/TransBtn.d.ts +0 -13
- package/lib/tntd-select/rc-select/TransBtn.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/TransBtn.js +0 -48
- package/lib/tntd-select/rc-select/TransBtn.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts +0 -9
- package/lib/tntd-select/rc-select/hooks/useAllowClear.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useAllowClear.js +0 -35
- package/lib/tntd-select/rc-select/hooks/useAllowClear.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts +0 -14
- package/lib/tntd-select/rc-select/hooks/useBaseProps.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useBaseProps.js +0 -21
- package/lib/tntd-select/rc-select/hooks/useBaseProps.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useCache.d.ts +0 -8
- package/lib/tntd-select/rc-select/hooks/useCache.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useCache.js +0 -49
- package/lib/tntd-select/rc-select/hooks/useCache.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts +0 -6
- package/lib/tntd-select/rc-select/hooks/useDelayReset.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useDelayReset.js +0 -44
- package/lib/tntd-select/rc-select/hooks/useDelayReset.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts +0 -4
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.js +0 -72
- package/lib/tntd-select/rc-select/hooks/useFilterOptions.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useId.d.ts +0 -6
- package/lib/tntd-select/rc-select/hooks/useId.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useId.js +0 -48
- package/lib/tntd-select/rc-select/hooks/useId.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts +0 -6
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js +0 -26
- package/lib/tntd-select/rc-select/hooks/useLayoutEffect.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useLock.d.ts +0 -8
- package/lib/tntd-select/rc-select/hooks/useLock.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useLock.js +0 -39
- package/lib/tntd-select/rc-select/hooks/useLock.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useOptions.d.ts +0 -12
- package/lib/tntd-select/rc-select/hooks/useOptions.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useOptions.js +0 -53
- package/lib/tntd-select/rc-select/hooks/useOptions.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts +0 -6
- package/lib/tntd-select/rc-select/hooks/useRefFunc.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useRefFunc.js +0 -22
- package/lib/tntd-select/rc-select/hooks/useRefFunc.js.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts +0 -2
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js +0 -43
- package/lib/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +0 -1
- package/lib/tntd-select/rc-select/index.d.ts +0 -11
- package/lib/tntd-select/rc-select/index.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/index.js +0 -38
- package/lib/tntd-select/rc-select/index.js.map +0 -1
- package/lib/tntd-select/rc-select/interface.d.ts +0 -23
- package/lib/tntd-select/rc-select/interface.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/interface.js +0 -5
- package/lib/tntd-select/rc-select/interface.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/commonUtil.d.ts +0 -10
- package/lib/tntd-select/rc-select/utils/commonUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/commonUtil.js +0 -43
- package/lib/tntd-select/rc-select/utils/commonUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/keyUtil.d.ts +0 -3
- package/lib/tntd-select/rc-select/utils/keyUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/keyUtil.js +0 -16
- package/lib/tntd-select/rc-select/utils/keyUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts +0 -4
- package/lib/tntd-select/rc-select/utils/legacyUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/legacyUtil.js +0 -60
- package/lib/tntd-select/rc-select/utils/legacyUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/platformUtil.d.ts +0 -2
- package/lib/tntd-select/rc-select/utils/platformUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/platformUtil.js +0 -10
- package/lib/tntd-select/rc-select/utils/platformUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/valueUtil.d.ts +0 -24
- package/lib/tntd-select/rc-select/utils/valueUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/valueUtil.js +0 -132
- package/lib/tntd-select/rc-select/utils/valueUtil.js.map +0 -1
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts +0 -5
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.d.ts.map +0 -1
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.js +0 -127
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
- package/lib/tooltip/style/index.less +0 -187
- package/lib/transfer/style/customize.less +0 -62
- package/lib/transfer/style/index.less +0 -191
- package/lib/tree/style/directory.less +0 -95
- package/lib/tree/style/index.less +0 -280
- package/lib/tree/style/mixin.less +0 -29
- package/lib/tree-select/style/index.less +0 -191
- package/lib/typography/style/index.less +0 -204
- package/lib/upload/style/index.less +0 -542
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
9
|
-
var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _utils = require("../utils");
|
|
12
|
-
var _store = require("../store");
|
|
13
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
17
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
20
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
21
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
22
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
-
var List = function List(_ref) {
|
|
24
|
-
var name = _ref.name,
|
|
25
|
-
children = _ref.children;
|
|
26
|
-
var maxRef = (0, _react.useRef)(-1);
|
|
27
|
-
var _useContext = (0, _react.useContext)(_store.FormContext),
|
|
28
|
-
form = _useContext.form,
|
|
29
|
-
initialValues = _useContext.initialValues,
|
|
30
|
-
compsRefs = _useContext.compsRefs,
|
|
31
|
-
updateRefs = _useContext.updateRefs;
|
|
32
|
-
var _useState = (0, _react.useState)([]),
|
|
33
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
-
dataLevel = _useState2[0],
|
|
35
|
-
setDataLevel = _useState2[1];
|
|
36
|
-
/** 根据一开始记录的渲染shouldUpdate 和 dependencies组件 */
|
|
37
|
-
var updateRender = function updateRender() {
|
|
38
|
-
if (Array.isArray(updateRefs.current.shouldUpdateList)) {
|
|
39
|
-
updateRefs.current.shouldUpdateList.forEach(function (i) {
|
|
40
|
-
var _a, _b;
|
|
41
|
-
(_b = (_a = compsRefs === null || compsRefs === void 0 ? void 0 : compsRefs.current) === null || _a === void 0 ? void 0 : _a[i]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
var list = updateRefs.current.dependencies[(0, _utils.getNames)(name).join('.')];
|
|
45
|
-
if (Array.isArray(list)) {
|
|
46
|
-
list.forEach(function (i) {
|
|
47
|
-
var _a, _b;
|
|
48
|
-
(_b = (_a = compsRefs === null || compsRefs === void 0 ? void 0 : compsRefs.current) === null || _a === void 0 ? void 0 : _a[i]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
/** 根据默认数值自动生成dataLevel */
|
|
53
|
-
(0, _react.useEffect)(function () {
|
|
54
|
-
var dataSource = initialValues;
|
|
55
|
-
var attrs = (0, _utils.getNames)(name);
|
|
56
|
-
var key = Array.isArray(name) ? name === null || name === void 0 ? void 0 : name[0] : name;
|
|
57
|
-
var _iterator = _createForOfIteratorHelper(attrs),
|
|
58
|
-
_step;
|
|
59
|
-
try {
|
|
60
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
61
|
-
var _key = _step.value;
|
|
62
|
-
dataSource = (dataSource === null || dataSource === void 0 ? void 0 : dataSource[_key]) || [{}];
|
|
63
|
-
}
|
|
64
|
-
} catch (err) {
|
|
65
|
-
_iterator.e(err);
|
|
66
|
-
} finally {
|
|
67
|
-
_iterator.f();
|
|
68
|
-
}
|
|
69
|
-
if (Array.isArray(dataSource)) {
|
|
70
|
-
var _level = dataSource.map(function (i, index) {
|
|
71
|
-
return {
|
|
72
|
-
key: index,
|
|
73
|
-
name: "".concat(attrs.join('.'), ".").concat(index)
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
|
-
setDataLevel(_level);
|
|
77
|
-
maxRef.current = dataSource.length - 1;
|
|
78
|
-
if (form) {
|
|
79
|
-
form.dataLevel[key] = _level;
|
|
80
|
-
}
|
|
81
|
-
updateRender();
|
|
82
|
-
}
|
|
83
|
-
}, [form, initialValues, name]);
|
|
84
|
-
/** 新增一列 */
|
|
85
|
-
var handleAdd = function handleAdd(index) {
|
|
86
|
-
var tempDataLevel = (0, _cloneDeep2["default"])(dataLevel);
|
|
87
|
-
var key = Array.isArray(name) ? name === null || name === void 0 ? void 0 : name[0] : name;
|
|
88
|
-
maxRef.current++;
|
|
89
|
-
var attrs = (0, _utils.getNames)(name);
|
|
90
|
-
tempDataLevel.splice(index + 1, 0, {
|
|
91
|
-
key: maxRef.current,
|
|
92
|
-
name: "".concat(attrs === null || attrs === void 0 ? void 0 : attrs.join('.'), ".").concat(maxRef.current)
|
|
93
|
-
});
|
|
94
|
-
setDataLevel(tempDataLevel);
|
|
95
|
-
if (form) {
|
|
96
|
-
form.dataLevel[key] = tempDataLevel;
|
|
97
|
-
}
|
|
98
|
-
updateRender();
|
|
99
|
-
};
|
|
100
|
-
/** 删除一列 */
|
|
101
|
-
var handleDel = function handleDel(index) {
|
|
102
|
-
var temp = (0, _cloneDeep2["default"])(dataLevel);
|
|
103
|
-
var key = Array.isArray(name) ? name === null || name === void 0 ? void 0 : name[0] : name;
|
|
104
|
-
temp.splice(index, 1);
|
|
105
|
-
setDataLevel(temp);
|
|
106
|
-
if (form) {
|
|
107
|
-
form.dataLevel[key] = temp;
|
|
108
|
-
}
|
|
109
|
-
updateRender();
|
|
110
|
-
};
|
|
111
|
-
return _react["default"].createElement(_react["default"].Fragment, null, children === null || children === void 0 ? void 0 : children(dataLevel, {
|
|
112
|
-
add: handleAdd,
|
|
113
|
-
remove: handleDel
|
|
114
|
-
}));
|
|
115
|
-
};
|
|
116
|
-
// name 没有改变就不需要重复render
|
|
117
|
-
var _default = (0, _react.memo)(List, function (nextProps, prevProps) {
|
|
118
|
-
if ((0, _isEqual2["default"])(nextProps.name, prevProps.name) && !!prevProps.name) {
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
return false;
|
|
122
|
-
});
|
|
123
|
-
exports["default"] = _default;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _utils = require("./utils");
|
|
10
|
-
var _store = require("./store");
|
|
11
|
-
var _List = _interopRequireDefault(require("./components/List"));
|
|
12
|
-
var _Item = _interopRequireDefault(require("./components/Item"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
/*
|
|
17
|
-
* @Descripttion: 高性能动态增删form表单
|
|
18
|
-
* @Author: 郑泳健
|
|
19
|
-
* @Date: 2023-02-16 10:43:03
|
|
20
|
-
* @LastEditors: 郑泳健
|
|
21
|
-
* @LastEditTime: 2023-04-06 15:32:07
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
var TntdForm = function TntdForm(_ref) {
|
|
25
|
-
var form = _ref.form,
|
|
26
|
-
initialValues = _ref.initialValues,
|
|
27
|
-
children = _ref.children;
|
|
28
|
-
var updateRefs = (0, _react.useRef)({
|
|
29
|
-
shouldUpdateList: [],
|
|
30
|
-
dependencies: {}
|
|
31
|
-
});
|
|
32
|
-
var compsRefs = (0, _react.useRef)({});
|
|
33
|
-
return _react["default"].createElement(_store.FormContext.Provider, {
|
|
34
|
-
value: {
|
|
35
|
-
form: form,
|
|
36
|
-
initialValues: initialValues,
|
|
37
|
-
updateRefs: updateRefs,
|
|
38
|
-
compsRefs: compsRefs
|
|
39
|
-
}
|
|
40
|
-
}, children);
|
|
41
|
-
};
|
|
42
|
-
TntdForm.useForm = function () {
|
|
43
|
-
var form = (0, _react.useRef)({
|
|
44
|
-
dataLevel: {},
|
|
45
|
-
formData: {},
|
|
46
|
-
validateFields: function validateFields() {
|
|
47
|
-
return (0, _utils.validateFields)(form.current);
|
|
48
|
-
},
|
|
49
|
-
getFieldsValue: function getFieldsValue() {
|
|
50
|
-
return (0, _utils.getFieldsValue)(form.current);
|
|
51
|
-
},
|
|
52
|
-
getFieldValue: function getFieldValue(field) {
|
|
53
|
-
return (0, _utils.getFieldValue)(form.current, field);
|
|
54
|
-
},
|
|
55
|
-
setFieldsValue: function setFieldsValue(obj) {
|
|
56
|
-
for (var i in obj) {
|
|
57
|
-
if (Object.prototype.hasOwnProperty.call(obj, i)) {
|
|
58
|
-
var prefix = (i === null || i === void 0 ? void 0 : i.split('.')) || [];
|
|
59
|
-
var attr = prefix.pop();
|
|
60
|
-
if (attr && form.current.formData[prefix.join('.')][attr]) {
|
|
61
|
-
form.current.formData[prefix.join('.')][attr].setItemValue(obj[i]);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
return [form.current];
|
|
68
|
-
};
|
|
69
|
-
TntdForm.List = _List["default"];
|
|
70
|
-
TntdForm.Item = _Item["default"];
|
|
71
|
-
var _default = TntdForm;
|
|
72
|
-
exports["default"] = _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.FormContext = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
var FormContext = _react["default"].createContext({});
|
|
10
|
-
exports.FormContext = FormContext;
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.validateFields = exports.recursionSort = exports.recursionCheck = exports.isValidKey = exports.handleCheckItem = exports.getNames = exports.getInitValue = exports.getFieldsValue = exports.getFieldValue = void 0;
|
|
7
|
-
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
|
|
8
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
11
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
var isValidKey = function isValidKey(key, object) {
|
|
14
|
-
return key in object;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* 将xx.xx.xx 转换为数组
|
|
18
|
-
* @param {*} name
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
exports.isValidKey = isValidKey;
|
|
22
|
-
var getNames = function getNames(name) {
|
|
23
|
-
var attrs = [];
|
|
24
|
-
if (Array.isArray(name)) {
|
|
25
|
-
var _name = _toArray(name),
|
|
26
|
-
str = _name[0],
|
|
27
|
-
rest = _name.slice(1);
|
|
28
|
-
attrs = str.split('.').concat(rest);
|
|
29
|
-
} else {
|
|
30
|
-
attrs = typeof name === 'string' ? name.split('.') : [];
|
|
31
|
-
}
|
|
32
|
-
return attrs;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* 对数据进行校验
|
|
36
|
-
* @param {*} list
|
|
37
|
-
* @param {*} dataLevel
|
|
38
|
-
* @param {*} formData
|
|
39
|
-
* @returns
|
|
40
|
-
*/
|
|
41
|
-
exports.getNames = getNames;
|
|
42
|
-
var recursionCheck = function recursionCheck(list, dataLevel, formData) {
|
|
43
|
-
var errorList = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
44
|
-
try {
|
|
45
|
-
if (Array.isArray(list)) {
|
|
46
|
-
list.forEach(function (item) {
|
|
47
|
-
var key = item.name;
|
|
48
|
-
var attrs = Object.keys(formData[key]);
|
|
49
|
-
attrs.forEach(function (attr) {
|
|
50
|
-
var _a;
|
|
51
|
-
var error = (_a = formData[item.name][attr]) === null || _a === void 0 ? void 0 : _a.checkItem();
|
|
52
|
-
if (error) {
|
|
53
|
-
errorList.push("".concat([item.name + '.' + attr], ":"), error);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
if (dataLevel[key]) {
|
|
57
|
-
recursionCheck(dataLevel[key], dataLevel, formData, errorList);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
return errorList;
|
|
62
|
-
} catch (e) {
|
|
63
|
-
if (typeof e === 'string') {
|
|
64
|
-
throw e.toUpperCase();
|
|
65
|
-
} else if (e instanceof Error) {
|
|
66
|
-
throw e.message;
|
|
67
|
-
}
|
|
68
|
-
throw e;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* 将数据进行排序
|
|
73
|
-
* @param {*} list
|
|
74
|
-
* @param {*} dataLevel
|
|
75
|
-
* @param {*} formData
|
|
76
|
-
* @param {*} errorList
|
|
77
|
-
* @returns
|
|
78
|
-
*/
|
|
79
|
-
exports.recursionCheck = recursionCheck;
|
|
80
|
-
var recursionSort = function recursionSort(list, dataLevel, formData) {
|
|
81
|
-
try {
|
|
82
|
-
if (Array.isArray(list)) {
|
|
83
|
-
var values = list.reduce(function (total, item, index) {
|
|
84
|
-
var attrObj = {};
|
|
85
|
-
var key = item.name;
|
|
86
|
-
var prefixs = key.split('.');
|
|
87
|
-
var attrs = formData[key] ? Object.keys(formData[key]) : [];
|
|
88
|
-
attrs.forEach(function (attr) {
|
|
89
|
-
var _a;
|
|
90
|
-
attrObj[attr] = (_a = formData[key][attr]) === null || _a === void 0 ? void 0 : _a.value;
|
|
91
|
-
});
|
|
92
|
-
var children = [];
|
|
93
|
-
if (dataLevel[key]) {
|
|
94
|
-
children = recursionSort(dataLevel[key], dataLevel, formData);
|
|
95
|
-
}
|
|
96
|
-
var len = prefixs.length - 2;
|
|
97
|
-
if (total[prefixs[len]]) {
|
|
98
|
-
total[prefixs[len]][index] = Object.assign(Object.assign({}, attrObj), children || []);
|
|
99
|
-
} else {
|
|
100
|
-
total[prefixs[len]] = [Object.assign(Object.assign({}, attrObj), children || [])];
|
|
101
|
-
}
|
|
102
|
-
return total;
|
|
103
|
-
}, {});
|
|
104
|
-
return values;
|
|
105
|
-
}
|
|
106
|
-
} catch (e) {
|
|
107
|
-
if (typeof e === 'string') {
|
|
108
|
-
console.error(e.toUpperCase());
|
|
109
|
-
throw e.toUpperCase();
|
|
110
|
-
} else if (e instanceof Error) {
|
|
111
|
-
console.error(e.message);
|
|
112
|
-
throw e.message;
|
|
113
|
-
}
|
|
114
|
-
throw e;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* 获取form表单的value
|
|
119
|
-
* @param {*} formCurrent
|
|
120
|
-
* @returns
|
|
121
|
-
*/
|
|
122
|
-
exports.recursionSort = recursionSort;
|
|
123
|
-
var getFieldsValue = function getFieldsValue(formCurrent) {
|
|
124
|
-
try {
|
|
125
|
-
var formData = formCurrent.formData,
|
|
126
|
-
dataLevel = formCurrent.dataLevel;
|
|
127
|
-
var firstKey = '';
|
|
128
|
-
// 这里不直接用Object.keys的原因是Object.keys并不能保证一定是按照属性顺序
|
|
129
|
-
for (var i in dataLevel) {
|
|
130
|
-
if (Object.prototype.hasOwnProperty.call(dataLevel, i)) {
|
|
131
|
-
firstKey = i;
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
var recursionStart = dataLevel[firstKey];
|
|
136
|
-
var values = recursionSort(recursionStart, dataLevel, formData);
|
|
137
|
-
return values;
|
|
138
|
-
} catch (e) {
|
|
139
|
-
if (typeof e === 'string') {
|
|
140
|
-
console.error(e.toUpperCase());
|
|
141
|
-
return e.toUpperCase();
|
|
142
|
-
} else if (e instanceof Error) {
|
|
143
|
-
console.error(e.message);
|
|
144
|
-
return e.message;
|
|
145
|
-
}
|
|
146
|
-
return e;
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
/**
|
|
150
|
-
* 获取form表单的value
|
|
151
|
-
* @param {*} formCurrent
|
|
152
|
-
* @returns
|
|
153
|
-
*/
|
|
154
|
-
exports.getFieldsValue = getFieldsValue;
|
|
155
|
-
var getFieldValue = function getFieldValue(formCurrent, field) {
|
|
156
|
-
var _a, _b;
|
|
157
|
-
try {
|
|
158
|
-
var formData = formCurrent.formData;
|
|
159
|
-
return formData && ((_b = (_a = formData === null || formData === void 0 ? void 0 : formData[field[0]]) === null || _a === void 0 ? void 0 : _a[field[1]]) === null || _b === void 0 ? void 0 : _b.value);
|
|
160
|
-
} catch (e) {
|
|
161
|
-
if (typeof e === 'string') {
|
|
162
|
-
return e.toUpperCase();
|
|
163
|
-
} else if (e instanceof Error) {
|
|
164
|
-
return e.message;
|
|
165
|
-
}
|
|
166
|
-
return e;
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* 提交时候校验的方法
|
|
171
|
-
* @param {*} formCurrent
|
|
172
|
-
* @returns
|
|
173
|
-
*/
|
|
174
|
-
exports.getFieldValue = getFieldValue;
|
|
175
|
-
var validateFields = function validateFields(formCurrent) {
|
|
176
|
-
return new Promise(function (resolve) {
|
|
177
|
-
var formData = formCurrent.formData,
|
|
178
|
-
dataLevel = formCurrent.dataLevel;
|
|
179
|
-
var firstKey = '';
|
|
180
|
-
// 这里不直接用Object.keys的原因是Object.keys并不能保证一定是按照属性顺序
|
|
181
|
-
for (var i in dataLevel) {
|
|
182
|
-
if (Object.prototype.hasOwnProperty.call(dataLevel, i)) {
|
|
183
|
-
firstKey = i;
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
var recursionStart = dataLevel[firstKey];
|
|
188
|
-
var errorList = recursionCheck(recursionStart, dataLevel, formData);
|
|
189
|
-
if (Array.isArray(errorList) && errorList.length) {
|
|
190
|
-
console.error(JSON.stringify(errorList));
|
|
191
|
-
} else {
|
|
192
|
-
resolve(recursionSort(recursionStart, dataLevel, formData));
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
|
-
/** 获取初始化的值 */
|
|
197
|
-
exports.validateFields = validateFields;
|
|
198
|
-
var getInitValue = function getInitValue(initialValues, names) {
|
|
199
|
-
var keys = [];
|
|
200
|
-
if (Array.isArray(names)) {
|
|
201
|
-
var _names = _toArray(names),
|
|
202
|
-
str = _names[0],
|
|
203
|
-
rest = _names.slice(1);
|
|
204
|
-
keys = str.split('.').concat(rest);
|
|
205
|
-
}
|
|
206
|
-
if (Array.isArray(keys) && !!keys.length) {
|
|
207
|
-
keys.forEach(function (i) {
|
|
208
|
-
initialValues = ['', null, undefined].includes(initialValues === null || initialValues === void 0 ? void 0 : initialValues[i]) ? undefined : initialValues === null || initialValues === void 0 ? void 0 : initialValues[i];
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
return initialValues;
|
|
212
|
-
};
|
|
213
|
-
/** 校验表单是否正确的方法 */
|
|
214
|
-
exports.getInitValue = getInitValue;
|
|
215
|
-
var handleCheckItem = function handleCheckItem(value, rules) {
|
|
216
|
-
try {
|
|
217
|
-
if (Array.isArray(rules)) {
|
|
218
|
-
rules.forEach(function (i) {
|
|
219
|
-
// @ts-ignore
|
|
220
|
-
if (i.required && ['', null, undefined].includes(value)) {
|
|
221
|
-
throw new Error((i === null || i === void 0 ? void 0 : i.message) || 'error');
|
|
222
|
-
}
|
|
223
|
-
if (i === null || i === void 0 ? void 0 : i.validator) {
|
|
224
|
-
i.validator(rules, value, function (_errorMsg) {
|
|
225
|
-
throw new Error(_errorMsg);
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
return;
|
|
231
|
-
} catch (e) {
|
|
232
|
-
if (typeof e === 'string') {
|
|
233
|
-
return e.toUpperCase();
|
|
234
|
-
} else if (e instanceof Error) {
|
|
235
|
-
return e.message;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
exports.handleCheckItem = handleCheckItem;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CSSMotionProps } from 'rc-motion';
|
|
2
|
-
declare const collapseMotion: CSSMotionProps;
|
|
3
|
-
declare const SelectPlacements: ["bottomLeft", "bottomRight", "topLeft", "topRight"];
|
|
4
|
-
export declare type SelectCommonPlacement = typeof SelectPlacements[number];
|
|
5
|
-
declare const getTransitionDirection: (placement: SelectCommonPlacement | undefined) => "slide-down" | "slide-up";
|
|
6
|
-
declare const getTransitionName: (rootPrefixCls: string, motion: string, transitionName?: string | undefined) => string;
|
|
7
|
-
export { getTransitionName, getTransitionDirection };
|
|
8
|
-
export default collapseMotion;
|
|
9
|
-
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../../src/tntd-form/_util/motion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA6C,MAAM,WAAW,CAAA;AAc1F,QAAA,MAAM,cAAc,EAAE,cAYrB,CAAA;AAED,QAAA,MAAM,gBAAgB,sDAA4D,CAAA;AAClF,oBAAY,qBAAqB,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAA;AAEnE,QAAA,MAAM,sBAAsB,cAAe,qBAAqB,GAAG,SAAS,8BAK3E,CAAA;AAED,QAAA,MAAM,iBAAiB,kBAAmB,MAAM,UAAU,MAAM,gDAK/D,CAAA;AACD,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAA;AACpD,eAAe,cAAc,CAAA"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getTransitionName = exports.getTransitionDirection = exports["default"] = void 0;
|
|
7
|
-
var _type = require("./type");
|
|
8
|
-
// ================== Collapse Motion ==================
|
|
9
|
-
var getCollapsedHeight = function getCollapsedHeight() {
|
|
10
|
-
return {
|
|
11
|
-
height: 0,
|
|
12
|
-
opacity: 0
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
var getRealHeight = function getRealHeight(node) {
|
|
16
|
-
var scrollHeight = node.scrollHeight;
|
|
17
|
-
return {
|
|
18
|
-
height: scrollHeight,
|
|
19
|
-
opacity: 1
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
var getCurrentHeight = function getCurrentHeight(node) {
|
|
23
|
-
return {
|
|
24
|
-
height: node ? node.offsetHeight : 0
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
var skipOpacityTransition = function skipOpacityTransition(_, event) {
|
|
28
|
-
return (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';
|
|
29
|
-
};
|
|
30
|
-
var collapseMotion = {
|
|
31
|
-
motionName: 'ant-motion-collapse',
|
|
32
|
-
onAppearStart: getCollapsedHeight,
|
|
33
|
-
onEnterStart: getCollapsedHeight,
|
|
34
|
-
onAppearActive: getRealHeight,
|
|
35
|
-
onEnterActive: getRealHeight,
|
|
36
|
-
onLeaveStart: getCurrentHeight,
|
|
37
|
-
onLeaveActive: getCollapsedHeight,
|
|
38
|
-
onAppearEnd: skipOpacityTransition,
|
|
39
|
-
onEnterEnd: skipOpacityTransition,
|
|
40
|
-
onLeaveEnd: skipOpacityTransition,
|
|
41
|
-
motionDeadline: 500
|
|
42
|
-
};
|
|
43
|
-
var SelectPlacements = (0, _type.tuple)('bottomLeft', 'bottomRight', 'topLeft', 'topRight');
|
|
44
|
-
var getTransitionDirection = function getTransitionDirection(placement) {
|
|
45
|
-
if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {
|
|
46
|
-
return "slide-down";
|
|
47
|
-
}
|
|
48
|
-
return "slide-up";
|
|
49
|
-
};
|
|
50
|
-
exports.getTransitionDirection = getTransitionDirection;
|
|
51
|
-
var getTransitionName = function getTransitionName(rootPrefixCls, motion, transitionName) {
|
|
52
|
-
if (transitionName !== undefined) {
|
|
53
|
-
return transitionName;
|
|
54
|
-
}
|
|
55
|
-
return "".concat(rootPrefixCls, "-").concat(motion);
|
|
56
|
-
};
|
|
57
|
-
exports.getTransitionName = getTransitionName;
|
|
58
|
-
var _default = collapseMotion;
|
|
59
|
-
exports["default"] = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"motion.js","sourceRoot":"","sources":["../../../src/tntd-form/_util/motion.tsx"],"names":[],"mappings":";;;AAEA,iCAA8B;AAE9B,wDAAwD;AACxD,MAAM,kBAAkB,GAAuB,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;AAChF,MAAM,aAAa,GAAuB,CAAC,IAAI,EAAE,EAAE;IACjD,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAA;IAC7B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAA;AAC7C,CAAC,CAAA;AACD,MAAM,gBAAgB,GAAuB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACjG,MAAM,qBAAqB,GAA0B,CAAC,CAAC,EAAE,KAAkB,EAAE,EAAE,CAC7E,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,MAAK,IAAI,IAAK,KAAyB,CAAC,YAAY,KAAK,QAAQ,CAAA;AAElF,MAAM,cAAc,GAAmB;IACrC,UAAU,EAAE,qBAAqB;IACjC,aAAa,EAAE,kBAAkB;IACjC,YAAY,EAAE,kBAAkB;IAChC,cAAc,EAAE,aAAa;IAC7B,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,gBAAgB;IAC9B,aAAa,EAAE,kBAAkB;IACjC,WAAW,EAAE,qBAAqB;IAClC,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,qBAAqB;IACjC,cAAc,EAAE,GAAG;CACpB,CAAA;AAED,MAAM,gBAAgB,GAAG,IAAA,YAAK,EAAC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;AAGlF,MAAM,sBAAsB,GAAG,CAAC,SAA4C,EAAE,EAAE;IAC9E,IAAI,SAAS,KAAK,SAAS,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,UAAU,CAAC,EAAE;QACpF,OAAO,YAAY,CAAA;KACpB;IACD,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA;AAQ2B,wDAAsB;AANlD,MAAM,iBAAiB,GAAG,CAAC,aAAqB,EAAE,MAAc,EAAE,cAAuB,EAAE,EAAE;IAC3F,IAAI,cAAc,KAAK,SAAS,EAAE;QAChC,OAAO,cAAc,CAAA;KACtB;IACD,OAAO,GAAG,aAAa,IAAI,MAAM,EAAE,CAAA;AACrC,CAAC,CAAA;AACQ,8CAAiB;AAC1B,kBAAe,cAAc,CAAA","sourcesContent":["import type { CSSMotionProps, MotionEndEventHandler, MotionEventHandler } from 'rc-motion'\nimport type { MotionEvent } from 'rc-motion/lib/interface'\nimport { tuple } from './type'\n\n// ================== Collapse Motion ==================\nconst getCollapsedHeight: MotionEventHandler = () => ({ height: 0, opacity: 0 })\nconst getRealHeight: MotionEventHandler = (node) => {\n const { scrollHeight } = node\n return { height: scrollHeight, opacity: 1 }\n}\nconst getCurrentHeight: MotionEventHandler = (node) => ({ height: node ? node.offsetHeight : 0 })\nconst skipOpacityTransition: MotionEndEventHandler = (_, event: MotionEvent) =>\n event?.deadline === true || (event as TransitionEvent).propertyName === 'height'\n\nconst collapseMotion: CSSMotionProps = {\n motionName: 'ant-motion-collapse',\n onAppearStart: getCollapsedHeight,\n onEnterStart: getCollapsedHeight,\n onAppearActive: getRealHeight,\n onEnterActive: getRealHeight,\n onLeaveStart: getCurrentHeight,\n onLeaveActive: getCollapsedHeight,\n onAppearEnd: skipOpacityTransition,\n onEnterEnd: skipOpacityTransition,\n onLeaveEnd: skipOpacityTransition,\n motionDeadline: 500,\n}\n\nconst SelectPlacements = tuple('bottomLeft', 'bottomRight', 'topLeft', 'topRight')\nexport type SelectCommonPlacement = typeof SelectPlacements[number]\n\nconst getTransitionDirection = (placement: SelectCommonPlacement | undefined) => {\n if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {\n return `slide-down`\n }\n return `slide-up`\n}\n\nconst getTransitionName = (rootPrefixCls: string, motion: string, transitionName?: string) => {\n if (transitionName !== undefined) {\n return transitionName\n }\n return `${rootPrefixCls}-${motion}`\n}\nexport { getTransitionName, getTransitionDirection }\nexport default collapseMotion\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare const isValidElement: typeof React.isValidElement;
|
|
3
|
-
export declare function isFragment(child: any): boolean;
|
|
4
|
-
declare type AnyObject = Record<PropertyKey, any>;
|
|
5
|
-
declare type RenderProps = AnyObject | ((originProps: AnyObject) => AnyObject | void);
|
|
6
|
-
export declare function replaceElement(element: React.ReactNode, replacement: React.ReactNode, props?: RenderProps): React.ReactNode;
|
|
7
|
-
export declare function cloneElement(element: React.ReactNode, props?: RenderProps): React.ReactElement;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=reactNode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reactNode.d.ts","sourceRoot":"","sources":["../../../src/tntd-form/_util/reactNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,eAAO,MAAQ,cAAc,6BAAU,CAAA;AAEvC,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAE9C;AAED,aAAK,SAAS,GAAG,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAA;AAEzC,aAAK,WAAW,GAAG,SAAS,GAAG,CAAC,CAAC,WAAW,EAAE,SAAS,KAAK,SAAS,GAAG,IAAI,CAAC,CAAA;AAE7E,wBAAgB,cAAc,CAC5B,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,WAAW,EAAE,KAAK,CAAC,SAAS,EAC5B,KAAK,CAAC,EAAE,WAAW,GAClB,KAAK,CAAC,SAAS,CAQjB;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAE9F"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.cloneElement = cloneElement;
|
|
8
|
-
exports.isFragment = isFragment;
|
|
9
|
-
exports.isValidElement = void 0;
|
|
10
|
-
exports.replaceElement = replaceElement;
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
var isValidElement = React.isValidElement;
|
|
15
|
-
exports.isValidElement = isValidElement;
|
|
16
|
-
function isFragment(child) {
|
|
17
|
-
return child && isValidElement(child) && child.type === React.Fragment;
|
|
18
|
-
}
|
|
19
|
-
function replaceElement(element, replacement, props) {
|
|
20
|
-
if (!isValidElement(element)) {
|
|
21
|
-
return replacement;
|
|
22
|
-
}
|
|
23
|
-
return React.cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);
|
|
24
|
-
}
|
|
25
|
-
function cloneElement(element, props) {
|
|
26
|
-
return replaceElement(element, element, props);
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reactNode.js","sourceRoot":"","sources":["../../../src/tntd-form/_util/reactNode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAEf,sBAAc,GAAK,KAAK,gBAAA;AAEvC,SAAgB,UAAU,CAAC,KAAU;IACnC,OAAO,KAAK,IAAI,IAAA,sBAAc,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAA;AACxE,CAAC;AAFD,gCAEC;AAMD,SAAgB,cAAc,CAC5B,OAAwB,EACxB,WAA4B,EAC5B,KAAmB;IAEnB,IAAI,CAAC,IAAA,sBAAc,EAAC,OAAO,CAAC,EAAE;QAC5B,OAAO,WAAW,CAAA;KACnB;IACD,OAAO,KAAK,CAAC,YAAY,CACvB,OAAO,EACP,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CACjE,CAAA;AACH,CAAC;AAZD,wCAYC;AAED,SAAgB,YAAY,CAAC,OAAwB,EAAE,KAAmB;IACxE,OAAO,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAuB,CAAA;AACtE,CAAC;AAFD,oCAEC","sourcesContent":["import * as React from 'react'\n\nexport const { isValidElement } = React\n\nexport function isFragment(child: any): boolean {\n return child && isValidElement(child) && child.type === React.Fragment\n}\n\ntype AnyObject = Record<PropertyKey, any>\n\ntype RenderProps = AnyObject | ((originProps: AnyObject) => AnyObject | void)\n\nexport function replaceElement(\n element: React.ReactNode,\n replacement: React.ReactNode,\n props?: RenderProps\n): React.ReactNode {\n if (!isValidElement(element)) {\n return replacement\n }\n return React.cloneElement(\n element,\n typeof props === 'function' ? props(element.props || {}) : props\n )\n}\n\nexport function cloneElement(element: React.ReactNode, props?: RenderProps): React.ReactElement {\n return replaceElement(element, element, props) as React.ReactElement\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=scrollTo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scrollTo.d.ts","sourceRoot":"","sources":["../../../src/tntd-form/_util/scrollTo.ts"],"names":[],"mappings":""}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// import raf from 'raf';
|
|
4
|
-
// import getScroll from './getScroll';
|
|
5
|
-
// import { easeInOutCubic } from './easings';
|
|
6
|
-
// interface ScrollToOptions {
|
|
7
|
-
// /** Scroll container, default as window */
|
|
8
|
-
// getContainer?: () => HTMLElement | Window;
|
|
9
|
-
// /** Scroll end callback */
|
|
10
|
-
// callback?: () => any;
|
|
11
|
-
// /** Animation duration, default as 450 */
|
|
12
|
-
// duration?: number;
|
|
13
|
-
// }
|
|
14
|
-
// export default function scrollTo(y: number, options: ScrollToOptions = {}) {
|
|
15
|
-
// const { getContainer = () => window, callback, duration = 450 } = options;
|
|
16
|
-
// const container = getContainer();
|
|
17
|
-
// const scrollTop = getScroll(container, true);
|
|
18
|
-
// const startTime = Date.now();
|
|
19
|
-
// const frameFunc = () => {
|
|
20
|
-
// const timestamp = Date.now();
|
|
21
|
-
// const time = timestamp - startTime;
|
|
22
|
-
// const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);
|
|
23
|
-
// if (container === window) {
|
|
24
|
-
// window.scrollTo(window.pageXOffset, nextScrollTop);
|
|
25
|
-
// } else {
|
|
26
|
-
// (container as HTMLElement).scrollTop = nextScrollTop;
|
|
27
|
-
// }
|
|
28
|
-
// if (time < duration) {
|
|
29
|
-
// raf(frameFunc);
|
|
30
|
-
// } else if (typeof callback === 'function') {
|
|
31
|
-
// callback();
|
|
32
|
-
// }
|
|
33
|
-
// };
|
|
34
|
-
// raf(frameFunc);
|
|
35
|
-
// }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scrollTo.js","sourceRoot":"","sources":["../../../src/tntd-form/_util/scrollTo.ts"],"names":[],"mappings":";AAAA,yBAAyB;AACzB,uCAAuC;AACvC,8CAA8C;AAE9C,8BAA8B;AAC9B,+CAA+C;AAC/C,+CAA+C;AAC/C,+BAA+B;AAC/B,0BAA0B;AAC1B,8CAA8C;AAC9C,uBAAuB;AACvB,IAAI;AAEJ,+EAA+E;AAC/E,+EAA+E;AAE/E,sCAAsC;AACtC,kDAAkD;AAClD,kCAAkC;AAElC,8BAA8B;AAC9B,oCAAoC;AACpC,0CAA0C;AAC1C,uGAAuG;AACvG,kCAAkC;AAClC,4DAA4D;AAC5D,eAAe;AACf,8DAA8D;AAC9D,QAAQ;AACR,6BAA6B;AAC7B,wBAAwB;AACxB,mDAAmD;AACnD,oBAAoB;AACpB,QAAQ;AACR,OAAO;AACP,oBAAoB;AACpB,IAAI","sourcesContent":["// import raf from 'raf';\n// import getScroll from './getScroll';\n// import { easeInOutCubic } from './easings';\n\n// interface ScrollToOptions {\n// /** Scroll container, default as window */\n// getContainer?: () => HTMLElement | Window;\n// /** Scroll end callback */\n// callback?: () => any;\n// /** Animation duration, default as 450 */\n// duration?: number;\n// }\n\n// export default function scrollTo(y: number, options: ScrollToOptions = {}) {\n// const { getContainer = () => window, callback, duration = 450 } = options;\n\n// const container = getContainer();\n// const scrollTop = getScroll(container, true);\n// const startTime = Date.now();\n\n// const frameFunc = () => {\n// const timestamp = Date.now();\n// const time = timestamp - startTime;\n// const nextScrollTop = easeInOutCubic(time > duration ? duration : time, scrollTop, y, duration);\n// if (container === window) {\n// window.scrollTo(window.pageXOffset, nextScrollTop);\n// } else {\n// (container as HTMLElement).scrollTop = nextScrollTop;\n// }\n// if (time < duration) {\n// raf(frameFunc);\n// } else if (typeof callback === 'function') {\n// callback();\n// }\n// };\n// raf(frameFunc);\n// }\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/tntd-form/_util/type.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAErE,eAAO,MAAM,KAAK,uCAA2C,CAAA;AAE7D,eAAO,MAAM,QAAQ,uCAA2C,CAAA"}
|