tntd 2.7.28 → 2.7.29
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/_util/context.js +12 -0
- package/es/_util/context.js.map +1 -0
- package/es/_util/defaultRenderEmpty.js +31 -0
- package/es/_util/defaultRenderEmpty.js.map +1 -0
- package/es/_util/hooks/useFlexGapSupport.js +9 -0
- package/es/_util/hooks/useFlexGapSupport.js.map +1 -0
- package/es/_util/hooks/useForceUpdate.js +5 -0
- package/es/_util/hooks/useForceUpdate.js.map +1 -0
- package/es/_util/motion.js +41 -10
- package/es/_util/motion.js.map +1 -1
- package/es/_util/reactNode.js +16 -0
- package/es/_util/reactNode.js.map +1 -0
- package/es/_util/responsiveObserve.js +59 -0
- package/es/_util/responsiveObserve.js.map +1 -0
- package/es/_util/styleChecker.js +26 -0
- package/es/_util/styleChecker.js.map +1 -0
- package/es/_util/type.js +1 -2
- package/es/_util/type.js.map +1 -1
- package/es/_util/warning.js +3 -4
- package/es/_util/warning.js.map +1 -1
- package/es/actions/index.js +22 -8
- package/es/affix/index.js +1 -2
- package/es/alert/index.js +1 -2
- package/es/anchor/index.js +1 -2
- package/es/array-input/icon.js +24 -6
- package/es/array-input/index.js +203 -119
- package/es/auth-context/index.js +1 -2
- package/es/auto-complete/index.js +1 -2
- package/es/avatar/index.js +1 -2
- package/es/back-top/index.js +1 -2
- package/es/badge/index.js +1 -2
- package/es/breadcrumb/index.js +1 -2
- package/es/button/button.js +28 -23
- package/es/button/index.js +1 -2
- package/es/calendar/index.js +1 -2
- package/es/card/card.js +19 -15
- package/es/card/index.js +1 -2
- package/es/carousel/index.js +1 -2
- package/es/cascader/index.js +1 -2
- package/es/check-card/group.js +186 -138
- package/es/check-card/index.js +150 -107
- package/es/checkbox/checkbox-group.js +1 -2
- package/es/checkbox/index.js +1 -2
- package/es/col/index.js +1 -2
- package/es/collapse/index.js +1 -2
- package/es/color-picker/ColorPicker.js +126 -80
- package/es/color-picker/index.js +8 -5
- package/es/columns/index.js +66 -30
- package/es/columns/style/index.js +1 -2
- package/es/comment/index.js +1 -2
- package/es/config-provider/DisabledContext.js +9 -5
- package/es/config-provider/SizeContext.js +7 -3
- package/es/config-provider/config-provider.js +1 -2
- package/es/config-provider/index.js +1 -2
- package/es/connect/index.js +23 -20
- package/es/date-picker/index.js +9 -6
- package/es/descriptions/descriptions.js +38 -30
- package/es/descriptions/index.js +1 -2
- package/es/development-login/LoginModal.js +81 -46
- package/es/development-login/index.js +17 -8
- package/es/divider/index.js +1 -2
- package/es/drawer/drawer.js +27 -20
- package/es/drawer/index.js +1 -2
- package/es/dropdown/index.js +1 -2
- package/es/ellipsis/Svg/CopySVG.js +63 -16
- package/es/ellipsis/Svg/TickSVG.js +41 -11
- package/es/ellipsis/index.js +137 -99
- package/es/empty/empty.js +58 -48
- package/es/empty/empty.stories.js +5 -6
- package/es/empty/index.js +1 -2
- package/es/exception/exception.js +32 -19
- package/es/exception/index.js +1 -2
- package/es/form/form.js +63 -55
- package/es/form/index.js +1 -2
- package/es/grid/RowContext.js +3 -0
- package/es/grid/RowContext.js.map +1 -0
- package/es/grid/col.js +103 -0
- package/es/grid/col.js.map +1 -0
- package/es/grid/hooks/useBreakpoint.js +18 -0
- package/es/grid/hooks/useBreakpoint.js.map +1 -0
- package/es/grid/index.js +14 -0
- package/es/grid/index.js.map +1 -0
- package/es/grid/row.js +154 -0
- package/es/grid/row.js.map +1 -0
- package/es/grid/style/index.js +2 -0
- package/es/grid/style/index.js.map +1 -0
- package/es/grid/style/index.less +124 -0
- package/es/grid/style/mixin.less +57 -0
- package/es/grid/style/rtl.less +69 -0
- package/es/handle/index.js +131 -91
- package/es/icon/index.js +1 -2
- package/es/icon-list/index.js +1 -120
- package/es/img/Contain.js +60 -39
- package/es/img/Cover.js +98 -72
- package/es/img/index.js +48 -32
- package/es/index.js +3 -2
- package/es/index.js.map +1 -1
- package/es/input/index.js +1 -2
- package/es/input/input.js +93 -46
- package/es/input-number/index.js +1 -2
- package/es/label/index.js +115 -98
- package/es/layout/index.js +1 -2
- package/es/list/index.js +1 -2
- package/es/loading-button/index.js +33 -28
- package/es/locale/default.js +3 -4
- package/es/locale/en_US.js +41 -42
- package/es/locale/index.js +1 -2
- package/es/locale/zh_CN.js +34 -35
- package/es/locale-provider/index.js +2 -3
- package/es/mentions/index.js +1 -2
- package/es/menu/index.js +1 -2
- package/es/message/index.js +1 -2
- package/es/modal/index.js +1 -2
- package/es/modal/modal.js +24 -15
- package/es/notification/index.js +1 -2
- package/es/page/Box.js +49 -33
- package/es/page/index.js +120 -84
- package/es/page/utils.js +12 -14
- package/es/page-header/index.js +1 -2
- package/es/pagination/index.js +1 -2
- package/es/popconfirm/index.js +1 -2
- package/es/popover/index.js +1 -2
- package/es/prev-locale.js +49 -47
- package/es/preview-text/index.js +247 -177
- package/es/progress/index.js +1 -2
- package/es/query-form/Field/Checkbox.js +20 -17
- package/es/query-form/Field/Select.js +54 -39
- package/es/query-form/Field/SelectInput.js +65 -45
- package/es/query-form/Field/fieldsMap.js +19 -20
- package/es/query-form/Field/index.js +108 -67
- package/es/query-form/createActions.js +46 -46
- package/es/query-form/index.js +327 -247
- package/es/query-form/useForm.js +3 -4
- package/es/query-list-scene/List.js +321 -255
- package/es/query-list-scene/QueryForm.js +132 -94
- package/es/query-list-scene/QueryListScene.js +29 -21
- package/es/query-list-scene/Title.js +6 -4
- package/es/query-list-scene/Toolbar.js +21 -15
- package/es/query-list-scene/createActions.js +60 -60
- package/es/query-list-scene/index.js +1 -2
- package/es/query-list-scene/useActions.js +3 -4
- package/es/radio/index.js +1 -2
- package/es/radio/radio-group.js +1 -2
- package/es/rate/index.js +1 -2
- package/es/render-empty/index.js +1 -2
- package/es/render-empty/render-empty.js +19 -16
- package/es/result/index.js +1 -2
- package/es/row/index.js +1 -2
- package/es/segmented/index.js +55 -38
- package/es/select/index.js +1 -2
- package/es/select/select.js +43 -27
- package/es/skeleton/index.js +1 -2
- package/es/slider/index.js +1 -2
- package/es/spin/index.js +1 -2
- package/es/statistic/index.js +1 -2
- package/es/steps/index.js +1 -2
- package/es/steps/steps.js +51 -35
- package/es/svg-components/illustration-403.js +206 -58
- package/es/svg-components/illustration-404.js +290 -75
- package/es/svg-components/illustration-500.js +321 -83
- package/es/svg-components/illustration-empty.js +54 -15
- package/es/svg-components/illustration-failure.js +112 -36
- package/es/svg-components/illustration-no-access.js +114 -35
- package/es/svg-components/illustration-no-chart.js +134 -37
- package/es/svg-components/illustration-no-result.js +92 -32
- package/es/svg-components/illustration-offline.js +131 -43
- package/es/svg-components/illustration-success.js +137 -43
- package/es/svg-components/index.js +1 -2
- package/es/switch/index.js +1 -2
- package/es/switch/switch.js +4 -3
- package/es/table/assets/image-loading-background.js +45 -17
- package/es/table/assets/image-loading.js +26 -5
- package/es/table/constants.js +1 -2
- package/es/table/context.js +1 -2
- package/es/table/hooks/index.js +1 -2
- package/es/table/hooks/use-column-setting.js +13 -16
- package/es/table/index.js +1 -2
- package/es/table/table.js +162 -129
- package/es/table/table.stories.js +148 -139
- package/es/table/total-shower.js +8 -4
- package/es/table/utils.js +17 -18
- package/es/tabs/index.js +1 -2
- package/es/tabs/tabPane.js +1 -2
- package/es/tabs/tabs.js +35 -27
- package/es/tag/index.js +1 -2
- package/es/time-picker/index.js +1 -2
- package/es/timeline/index.js +1 -2
- package/es/title/index.js +32 -20
- package/es/tntd-cascader/AntdCascader/component/DisabledContext.js +9 -5
- package/es/tntd-cascader/AntdCascader/component/FormItemInputContext.js +1 -2
- package/es/tntd-cascader/AntdCascader/component/SizeContext.js +1 -2
- package/es/tntd-cascader/AntdCascader/component/context.js +5 -7
- package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +22 -10
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +72 -50
- package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +22 -20
- package/es/tntd-cascader/AntdCascader/config/utils.js +17 -18
- package/es/tntd-cascader/AntdCascader/config/warning.js +9 -10
- package/es/tntd-cascader/AntdCascader/index.js +189 -118
- package/es/tntd-cascader/AntdCascader/interface.js +1 -2
- package/es/tntd-cascader/index.js +1 -2
- package/es/tntd-cascader/rc-cascader/Cascader.js +256 -239
- package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +21 -11
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js +175 -116
- package/es/tntd-cascader/rc-cascader/OptionList/index.js +180 -128
- package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +22 -19
- package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +144 -137
- package/es/tntd-cascader/rc-cascader/context.js +1 -2
- package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +44 -37
- package/es/tntd-cascader/rc-cascader/hooks/useEntities.js +25 -24
- package/es/tntd-cascader/rc-cascader/hooks/useMissingValues.js +15 -17
- package/es/tntd-cascader/rc-cascader/hooks/useRefFunc.js +7 -8
- package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +20 -21
- package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +51 -41
- package/es/tntd-cascader/rc-cascader/index.js +1 -2
- package/es/tntd-cascader/rc-cascader/utils/commonUtil.js +33 -27
- package/es/tntd-cascader/rc-cascader/utils/treeUtil.js +29 -32
- package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +26 -23
- package/es/tntd-form/ErrorList.js +76 -42
- package/es/tntd-form/ErrorList.js.map +1 -1
- package/es/tntd-form/Form.js +118 -97
- package/es/tntd-form/FormItem/ItemHolder.js +127 -118
- package/es/tntd-form/FormItem/ItemHolder.js.map +1 -1
- package/es/tntd-form/FormItem/index.js +235 -209
- package/es/tntd-form/FormItem/index.js.map +1 -1
- package/es/tntd-form/FormItemInput.js +73 -32
- package/es/tntd-form/FormItemInput.js.map +1 -1
- package/es/tntd-form/FormItemLabel.js +88 -63
- package/es/tntd-form/FormItemLabel.js.map +1 -1
- package/es/tntd-form/FormList.js +34 -28
- package/es/tntd-form/FormList.js.map +1 -1
- package/es/tntd-form/_util/context.js +12 -0
- package/es/tntd-form/_util/context.js.map +1 -0
- package/es/tntd-form/_util/defaultRenderEmpty.js +31 -0
- package/es/tntd-form/_util/defaultRenderEmpty.js.map +1 -0
- package/es/tntd-form/_util/hooks/useFlexGapSupport.js +9 -0
- package/es/tntd-form/_util/hooks/useFlexGapSupport.js.map +1 -0
- package/es/tntd-form/_util/hooks/useForceUpdate.js +5 -0
- package/es/tntd-form/_util/hooks/useForceUpdate.js.map +1 -0
- package/es/tntd-form/_util/motion.js +36 -27
- package/es/tntd-form/_util/reactNode.js +10 -9
- package/es/tntd-form/_util/responsiveObserve.js +59 -0
- package/es/tntd-form/_util/responsiveObserve.js.map +1 -0
- package/es/tntd-form/_util/scrollTo.js +2 -2
- package/es/tntd-form/_util/styleChecker.js +26 -0
- package/es/tntd-form/_util/styleChecker.js.map +1 -0
- package/es/tntd-form/_util/type.js +1 -2
- package/es/tntd-form/_util/warning.js +3 -4
- package/es/tntd-form/_util/wave.js +2 -2
- package/es/tntd-form/context.js +29 -24
- package/es/tntd-form/grid/RowContext.js +3 -0
- package/es/tntd-form/grid/RowContext.js.map +1 -0
- package/es/tntd-form/grid/col.js +104 -0
- package/es/tntd-form/grid/col.js.map +1 -0
- package/es/tntd-form/grid/hooks/useBreakpoint.js +18 -0
- package/es/tntd-form/grid/hooks/useBreakpoint.js.map +1 -0
- package/es/tntd-form/grid/index.js +14 -0
- package/es/tntd-form/grid/index.js.map +1 -0
- package/es/tntd-form/grid/row.js +153 -0
- package/es/tntd-form/grid/row.js.map +1 -0
- package/es/tntd-form/grid/style/index.js +2 -0
- package/es/tntd-form/grid/style/index.js.map +1 -0
- package/es/tntd-form/hooks/useDebounce.js +11 -12
- package/es/tntd-form/hooks/useForm.js +33 -28
- package/es/tntd-form/hooks/useFormInstance.js +5 -4
- package/es/tntd-form/hooks/useFormItemStatus.js +9 -6
- package/es/tntd-form/hooks/useFormItemStatus.js.map +1 -1
- package/es/tntd-form/hooks/useFrameState.js +32 -33
- package/es/tntd-form/hooks/useItemRef.js +15 -14
- package/es/tntd-form/index.js +1 -3
- package/es/tntd-form/index.js.map +1 -1
- package/es/tntd-form/interface.js +1 -2
- package/es/tntd-form/style/index.js +1 -2
- package/es/tntd-form/tntd-form.stories.js +781 -383
- package/es/tntd-form/util.js +10 -13
- package/es/tntd-form/validateMessagesContext.js +1 -2
- package/es/tntd-icon/fonts/iconfont.js +36 -53
- package/es/tntd-icon/index.js +23 -17
- package/es/tntd-layout/ActionsContext.js +1 -2
- package/es/tntd-layout/AppList.js +135 -77
- package/es/tntd-layout/Application.js +42 -29
- package/es/tntd-layout/Avatar.js +80 -42
- package/es/tntd-layout/CompatibleLanguage.js +93 -56
- package/es/tntd-layout/EnterpriseLayout/Avatar.js +93 -47
- package/es/tntd-layout/EnterpriseLayout/Language.js +56 -34
- package/es/tntd-layout/EnterpriseLayout/Theme.js +45 -24
- package/es/tntd-layout/EnterpriseLayout/index.js +17 -9
- package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +212 -153
- package/es/tntd-layout/GlobalNavigation/index.js +84 -50
- package/es/tntd-layout/Header.js +59 -26
- package/es/tntd-layout/HeaderActions.js +84 -34
- package/es/tntd-layout/HeaderNavs.js +46 -35
- package/es/tntd-layout/HeaderTabs.js +176 -140
- package/es/tntd-layout/Iconfont.js +1 -2
- package/es/tntd-layout/Language.js +55 -33
- package/es/tntd-layout/Layout.js +176 -78
- package/es/tntd-layout/Logo.js +52 -40
- package/es/tntd-layout/OrgAppList.js +208 -139
- package/es/tntd-layout/SideMenu.js +230 -160
- package/es/tntd-layout/Theme.js +47 -29
- package/es/tntd-layout/createActions.js +28 -29
- package/es/tntd-layout/images/index.js +31 -32
- package/es/tntd-layout/index.js +92 -60
- package/es/tntd-layout/paaslayout/CompactSideMenu.js +109 -65
- package/es/tntd-layout/paaslayout/Header.js +37 -14
- package/es/tntd-layout/paaslayout/Logo.js +2 -3
- package/es/tntd-layout/paaslayout/SideMenu.js +109 -63
- package/es/tntd-layout/paaslayout/index.js +159 -79
- package/es/tntd-layout/storage.js +18 -11
- package/es/tntd-modal/index.js +73 -32
- package/es/tntd-rc-select/_util/DisabledContext.js +9 -5
- package/es/tntd-rc-select/_util/FormItemInputContext.js +1 -2
- package/es/tntd-rc-select/_util/PurePanel.js +59 -48
- package/es/tntd-rc-select/_util/SizeContext.js +1 -2
- package/es/tntd-rc-select/_util/context.js +5 -7
- package/es/tntd-rc-select/_util/defaultRenderEmpty.js +21 -10
- package/es/tntd-rc-select/_util/getIcons.js +72 -50
- package/es/tntd-rc-select/_util/interface.js +1 -2
- package/es/tntd-rc-select/_util/motion.js +36 -27
- package/es/tntd-rc-select/_util/type.js +1 -2
- package/es/tntd-rc-select/_util/useCompactItemContext.js +22 -20
- package/es/tntd-rc-select/_util/warning.js +9 -10
- package/es/tntd-rc-select/index.js +131 -76
- package/es/tntd-second-page/index.js +47 -24
- package/es/tntd-select/DropDownWrap.js +73 -52
- package/es/tntd-select/index.js +593 -505
- package/es/tooltip/index.js +1 -2
- package/es/transfer/index.js +1 -2
- package/es/tree/index.js +1 -2
- package/es/tree-select/index.js +1 -2
- package/es/typography/index.js +1 -2
- package/es/upload/index.js +4 -3
- package/es/utils/checkAuth.js +24 -21
- package/es/utils/findMenuInfoByPath.js +33 -30
- package/es/utils/index.js +71 -65
- package/es/utils/lang.js +58 -108
- package/es/utils/simple-template.js +2 -3
- package/es/version/index.js +1 -2
- package/es/water-mark/index.js +98 -87
- package/lib/_util/context.d.ts.map +1 -0
- package/lib/_util/context.js +22 -0
- package/lib/_util/context.js.map +1 -0
- package/lib/_util/defaultRenderEmpty.d.ts.map +1 -0
- package/lib/_util/defaultRenderEmpty.js +44 -0
- package/lib/_util/defaultRenderEmpty.js.map +1 -0
- package/lib/_util/hooks/useFlexGapSupport.d.ts +3 -0
- package/lib/_util/hooks/useFlexGapSupport.d.ts.map +1 -0
- package/lib/_util/hooks/useFlexGapSupport.js +28 -0
- package/lib/_util/hooks/useFlexGapSupport.js.map +1 -0
- package/lib/_util/hooks/useForceUpdate.d.ts +3 -0
- package/lib/_util/hooks/useForceUpdate.d.ts.map +1 -0
- package/lib/_util/hooks/useForceUpdate.js +24 -0
- package/lib/_util/hooks/useForceUpdate.js.map +1 -0
- package/lib/_util/motion.d.ts +3 -0
- package/lib/_util/motion.d.ts.map +1 -1
- package/lib/_util/motion.js +54 -15
- package/lib/_util/motion.js.map +1 -1
- package/lib/_util/reactNode.d.ts +9 -0
- package/lib/_util/reactNode.d.ts.map +1 -0
- package/lib/{mention/index.js → _util/reactNode.js} +19 -17
- package/lib/_util/reactNode.js.map +1 -0
- package/lib/_util/responsiveObserve.d.ts +22 -0
- package/lib/_util/responsiveObserve.d.ts.map +1 -0
- package/lib/_util/responsiveObserve.js +73 -0
- package/lib/_util/responsiveObserve.js.map +1 -0
- package/lib/_util/styleChecker.d.ts +5 -0
- package/lib/_util/styleChecker.d.ts.map +1 -0
- package/lib/_util/styleChecker.js +42 -0
- package/lib/_util/styleChecker.js.map +1 -0
- package/lib/_util/type.d.ts.map +1 -1
- package/lib/_util/type.js +17 -5
- package/lib/_util/type.js.map +1 -1
- package/lib/_util/warning.d.ts.map +1 -1
- package/lib/_util/warning.js +17 -29
- package/lib/_util/warning.js.map +1 -1
- package/lib/actions/index.js +31 -14
- package/lib/affix/index.d.ts +3 -3
- package/lib/affix/index.js +23 -22
- package/lib/affix/index.js.map +1 -1
- package/lib/alert/index.d.ts +3 -3
- package/lib/alert/index.js +23 -22
- package/lib/alert/index.js.map +1 -1
- package/lib/anchor/index.d.ts +3 -3
- package/lib/anchor/index.js +23 -22
- package/lib/anchor/index.js.map +1 -1
- package/lib/array-input/icon.js +33 -12
- package/lib/array-input/index.js +254 -150
- package/lib/auth-context/index.js +10 -4
- package/lib/auto-complete/index.d.ts +3 -3
- package/lib/auto-complete/index.js +23 -22
- package/lib/auto-complete/index.js.map +1 -1
- package/lib/avatar/index.d.ts +3 -3
- package/lib/avatar/index.js +23 -22
- package/lib/avatar/index.js.map +1 -1
- package/lib/back-top/index.d.ts +3 -3
- package/lib/back-top/index.js +23 -22
- package/lib/back-top/index.js.map +1 -1
- package/lib/badge/index.d.ts +3 -3
- package/lib/badge/index.js +23 -22
- package/lib/badge/index.js.map +1 -1
- package/lib/breadcrumb/index.d.ts +3 -3
- package/lib/breadcrumb/index.js +23 -22
- package/lib/breadcrumb/index.js.map +1 -1
- package/lib/button/button.d.ts +4 -4
- package/lib/button/button.js +62 -59
- package/lib/button/button.js.map +1 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/button/index.js +20 -19
- package/lib/button/index.js.map +1 -1
- package/lib/calendar/index.d.ts +3 -3
- package/lib/calendar/index.js +23 -22
- package/lib/calendar/index.js.map +1 -1
- package/lib/card/card.d.ts +3 -3
- package/lib/card/card.js +45 -51
- package/lib/card/card.js.map +1 -1
- package/lib/card/index.d.ts +1 -1
- package/lib/card/index.js +20 -19
- package/lib/card/index.js.map +1 -1
- package/lib/carousel/index.d.ts +3 -3
- package/lib/carousel/index.js +23 -22
- package/lib/carousel/index.js.map +1 -1
- package/lib/cascader/index.d.ts +3 -3
- package/lib/cascader/index.js +29 -26
- package/lib/cascader/index.js.map +1 -1
- package/lib/check-card/group.js +228 -171
- package/lib/check-card/index.js +171 -141
- package/lib/checkbox/checkbox-group.d.ts +1 -1
- package/lib/checkbox/checkbox-group.js +11 -9
- package/lib/checkbox/checkbox-group.js.map +1 -1
- package/lib/checkbox/index.d.ts +3 -3
- package/lib/checkbox/index.js +37 -25
- package/lib/checkbox/index.js.map +1 -1
- package/lib/col/index.d.ts +3 -3
- package/lib/col/index.js +23 -22
- package/lib/col/index.js.map +1 -1
- package/lib/collapse/index.d.ts +3 -3
- package/lib/collapse/index.js +24 -23
- package/lib/collapse/index.js.map +1 -1
- package/lib/color-picker/ColorPicker.js +156 -113
- package/lib/color-picker/index.js +18 -14
- package/lib/color-picker/index.js.map +1 -1
- package/lib/columns/index.js +81 -41
- package/lib/columns/style/index.js +1 -2
- package/lib/comment/index.d.ts +3 -3
- package/lib/comment/index.js +23 -22
- package/lib/comment/index.js.map +1 -1
- package/lib/config-provider/DisabledContext.js +18 -31
- package/lib/config-provider/SizeContext.js +19 -28
- package/lib/config-provider/config-provider.d.ts +1 -1
- package/lib/config-provider/config-provider.js +12 -8
- package/lib/config-provider/config-provider.js.map +1 -1
- package/lib/config-provider/index.d.ts +4 -4
- package/lib/config-provider/index.js +35 -23
- package/lib/config-provider/index.js.map +1 -1
- package/lib/connect/index.js +44 -26
- package/lib/date-picker/index.d.ts +4 -4
- package/lib/date-picker/index.js +48 -32
- package/lib/date-picker/index.js.map +1 -1
- package/lib/descriptions/descriptions.d.ts +3 -3
- package/lib/descriptions/descriptions.js +64 -55
- package/lib/descriptions/descriptions.js.map +1 -1
- package/lib/descriptions/index.d.ts +1 -1
- package/lib/descriptions/index.js +23 -22
- package/lib/descriptions/index.js.map +1 -1
- package/lib/development-login/LoginModal.js +110 -79
- package/lib/development-login/index.js +42 -35
- package/lib/divider/index.d.ts +3 -3
- package/lib/divider/index.js +23 -22
- package/lib/divider/index.js.map +1 -1
- package/lib/drawer/drawer.d.ts +1 -1
- package/lib/drawer/drawer.js +41 -30
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/index.d.ts +2 -2
- package/lib/drawer/index.js +22 -20
- package/lib/drawer/index.js.map +1 -1
- package/lib/dropdown/index.d.ts +3 -3
- package/lib/dropdown/index.js +23 -22
- package/lib/dropdown/index.js.map +1 -1
- package/lib/ellipsis/Svg/CopySVG.js +70 -20
- package/lib/ellipsis/Svg/TickSVG.js +48 -15
- package/lib/ellipsis/index.js +176 -137
- package/lib/empty/empty.d.ts +2 -2
- package/lib/empty/empty.js +90 -75
- package/lib/empty/empty.js.map +1 -1
- package/lib/empty/empty.stories.js +19 -18
- package/lib/empty/index.d.ts +1 -1
- package/lib/empty/index.js +20 -19
- package/lib/empty/index.js.map +1 -1
- package/lib/exception/exception.js +46 -31
- package/lib/exception/exception.js.map +1 -1
- package/lib/exception/index.js +19 -18
- package/lib/form/form.d.ts +5 -5
- package/lib/form/form.js +90 -92
- package/lib/form/form.js.map +1 -1
- package/lib/form/index.d.ts +1 -1
- package/lib/form/index.js +20 -19
- package/lib/form/index.js.map +1 -1
- package/lib/grid/RowContext.d.ts +9 -0
- package/lib/grid/RowContext.d.ts.map +1 -0
- package/lib/grid/RowContext.js +10 -0
- package/lib/grid/RowContext.js.map +1 -0
- package/lib/grid/col.d.ts +29 -0
- package/lib/grid/col.d.ts.map +1 -0
- package/lib/grid/col.js +105 -0
- package/lib/grid/col.js.map +1 -0
- package/lib/grid/hooks/useBreakpoint.d.ts +4 -0
- package/lib/grid/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/grid/hooks/useBreakpoint.js +29 -0
- package/lib/grid/hooks/useBreakpoint.js.map +1 -0
- package/lib/grid/index.d.ts +12 -0
- package/lib/grid/index.d.ts.map +1 -0
- package/lib/grid/index.js +31 -0
- package/lib/grid/index.js.map +1 -0
- package/lib/grid/row.d.ts +21 -0
- package/lib/grid/row.d.ts.map +1 -0
- package/lib/grid/row.js +187 -0
- package/lib/grid/row.js.map +1 -0
- package/lib/grid/style/index.d.ts +2 -0
- package/lib/grid/style/index.d.ts.map +1 -0
- package/lib/grid/style/index.js +3 -0
- package/lib/grid/style/index.js.map +1 -0
- package/lib/grid/style/index.less +124 -0
- package/lib/grid/style/mixin.less +57 -0
- package/lib/grid/style/rtl.less +69 -0
- package/lib/handle/index.js +166 -125
- package/lib/handle/index.js.map +1 -1
- package/lib/icon/index.d.ts +3 -3
- package/lib/icon/index.js +23 -22
- package/lib/icon/index.js.map +1 -1
- package/lib/icon-list/index.js +7 -121
- package/lib/img/Contain.js +69 -44
- package/lib/img/Cover.js +117 -78
- package/lib/img/index.js +74 -60
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +662 -197
- package/lib/index.js.map +1 -1
- package/lib/input/index.d.ts +1 -1
- package/lib/input/index.js +21 -20
- package/lib/input/index.js.map +1 -1
- package/lib/input/input.d.ts +5 -5
- package/lib/input/input.js +100 -90
- package/lib/input/input.js.map +1 -1
- package/lib/input-number/index.d.ts +3 -3
- package/lib/input-number/index.js +26 -24
- package/lib/input-number/index.js.map +1 -1
- package/lib/label/index.d.ts +2 -2
- package/lib/label/index.js +134 -137
- package/lib/label/index.js.map +1 -1
- package/lib/layout/index.d.ts +3 -3
- package/lib/layout/index.js +23 -22
- package/lib/layout/index.js.map +1 -1
- package/lib/list/index.d.ts +3 -3
- package/lib/list/index.js +23 -22
- package/lib/list/index.js.map +1 -1
- package/lib/loading-button/index.js +58 -55
- package/lib/locale/default.js +12 -10
- package/lib/locale/default.js.map +1 -1
- package/lib/locale/en_US.js +50 -47
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/index.js +36 -18
- package/lib/locale/zh_CN.js +42 -40
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/locale-provider/index.d.ts +3 -3
- package/lib/locale-provider/index.js +26 -25
- package/lib/locale-provider/index.js.map +1 -1
- package/lib/mentions/index.d.ts +3 -3
- package/lib/mentions/index.js +23 -22
- package/lib/mentions/index.js.map +1 -1
- package/lib/menu/index.d.ts +3 -3
- package/lib/menu/index.js +23 -22
- package/lib/menu/index.js.map +1 -1
- package/lib/message/index.d.ts +3 -3
- package/lib/message/index.js +23 -22
- package/lib/message/index.js.map +1 -1
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/index.js +22 -21
- package/lib/modal/index.js.map +1 -1
- package/lib/modal/modal.d.ts +4 -4
- package/lib/modal/modal.js +59 -59
- package/lib/modal/modal.js.map +1 -1
- package/lib/notification/index.d.ts +3 -3
- package/lib/notification/index.js +23 -22
- package/lib/notification/index.js.map +1 -1
- package/lib/page/Box.js +66 -40
- package/lib/page/index.js +148 -95
- package/lib/page/utils.js +22 -16
- package/lib/page-header/index.d.ts +3 -3
- package/lib/page-header/index.js +23 -22
- package/lib/page-header/index.js.map +1 -1
- package/lib/pagination/index.d.ts +3 -3
- package/lib/pagination/index.js +23 -22
- package/lib/pagination/index.js.map +1 -1
- package/lib/popconfirm/index.d.ts +3 -3
- package/lib/popconfirm/index.js +23 -22
- package/lib/popconfirm/index.js.map +1 -1
- package/lib/popover/index.d.ts +3 -3
- package/lib/popover/index.js +23 -22
- package/lib/popover/index.js.map +1 -1
- package/lib/prev-locale.js +68 -54
- package/lib/preview-text/index.d.ts +4 -4
- package/lib/preview-text/index.js +263 -209
- package/lib/preview-text/index.js.map +1 -1
- package/lib/progress/index.d.ts +3 -3
- package/lib/progress/index.js +23 -22
- package/lib/progress/index.js.map +1 -1
- package/lib/query-form/Field/Checkbox.js +28 -22
- package/lib/query-form/Field/Select.js +79 -68
- package/lib/query-form/Field/SelectInput.js +87 -73
- package/lib/query-form/Field/fieldsMap.d.ts +2 -2
- package/lib/query-form/Field/fieldsMap.js +34 -32
- package/lib/query-form/Field/index.js +143 -96
- package/lib/query-form/createActions.js +53 -50
- package/lib/query-form/index.js +377 -286
- package/lib/query-form/useForm.js +11 -11
- package/lib/query-list-scene/List.js +360 -289
- package/lib/query-list-scene/QueryForm.js +161 -103
- package/lib/query-list-scene/QueryListScene.js +66 -31
- package/lib/query-list-scene/Title.js +15 -9
- package/lib/query-list-scene/Toolbar.js +31 -20
- package/lib/query-list-scene/createActions.js +79 -64
- package/lib/query-list-scene/index.js +28 -24
- package/lib/query-list-scene/useActions.js +11 -11
- package/lib/radio/index.d.ts +3 -3
- package/lib/radio/index.js +26 -24
- package/lib/radio/index.js.map +1 -1
- package/lib/radio/radio-group.d.ts +1 -1
- package/lib/radio/radio-group.js +11 -9
- package/lib/radio/radio-group.js.map +1 -1
- package/lib/rate/index.d.ts +3 -3
- package/lib/rate/index.js +23 -22
- package/lib/rate/index.js.map +1 -1
- package/lib/render-empty/index.js +8 -4
- package/lib/render-empty/render-empty.js +28 -22
- package/lib/render-empty/render-empty.js.map +1 -1
- package/lib/result/index.d.ts +3 -3
- package/lib/result/index.js +23 -22
- package/lib/result/index.js.map +1 -1
- package/lib/row/index.d.ts +3 -3
- package/lib/row/index.js +23 -22
- package/lib/row/index.js.map +1 -1
- package/lib/segmented/index.d.ts +1 -1
- package/lib/segmented/index.js +71 -69
- package/lib/select/index.d.ts +2 -2
- package/lib/select/index.js +22 -20
- package/lib/select/index.js.map +1 -1
- package/lib/select/select.d.ts +2 -2
- package/lib/select/select.js +61 -64
- package/lib/select/select.js.map +1 -1
- package/lib/skeleton/index.d.ts +3 -3
- package/lib/skeleton/index.js +23 -22
- package/lib/skeleton/index.js.map +1 -1
- package/lib/slider/index.d.ts +3 -3
- package/lib/slider/index.js +23 -22
- package/lib/slider/index.js.map +1 -1
- package/lib/spin/index.d.ts +3 -3
- package/lib/spin/index.js +23 -22
- package/lib/spin/index.js.map +1 -1
- package/lib/statistic/index.d.ts +3 -3
- package/lib/statistic/index.js +23 -22
- package/lib/statistic/index.js.map +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/steps/index.js +20 -19
- package/lib/steps/index.js.map +1 -1
- package/lib/steps/steps.d.ts +3 -3
- package/lib/steps/steps.js +72 -59
- package/lib/steps/steps.js.map +1 -1
- package/lib/svg-components/illustration-403.d.ts +1 -1
- package/lib/svg-components/illustration-403.js +217 -84
- package/lib/svg-components/illustration-404.d.ts +1 -1
- package/lib/svg-components/illustration-404.js +301 -101
- package/lib/svg-components/illustration-500.d.ts +1 -1
- package/lib/svg-components/illustration-500.js +332 -109
- package/lib/svg-components/illustration-empty.d.ts +1 -1
- package/lib/svg-components/illustration-empty.js +65 -41
- package/lib/svg-components/illustration-failure.d.ts +1 -1
- package/lib/svg-components/illustration-failure.js +123 -62
- package/lib/svg-components/illustration-no-access.d.ts +1 -1
- package/lib/svg-components/illustration-no-access.js +125 -61
- package/lib/svg-components/illustration-no-chart.d.ts +1 -1
- package/lib/svg-components/illustration-no-chart.js +145 -63
- package/lib/svg-components/illustration-no-result.d.ts +1 -1
- package/lib/svg-components/illustration-no-result.js +103 -58
- package/lib/svg-components/illustration-offline.d.ts +1 -1
- package/lib/svg-components/illustration-offline.js +142 -69
- package/lib/svg-components/illustration-success.d.ts +1 -1
- package/lib/svg-components/illustration-success.js +148 -69
- package/lib/svg-components/index.js +75 -26
- package/lib/switch/index.js +22 -21
- package/lib/switch/switch.d.ts +3 -3
- package/lib/switch/switch.js +35 -27
- package/lib/switch/switch.js.map +1 -1
- package/lib/table/assets/image-loading-background.d.ts +1 -1
- package/lib/table/assets/image-loading-background.js +56 -43
- package/lib/table/assets/image-loading.d.ts +1 -1
- package/lib/table/assets/image-loading.js +37 -31
- package/lib/table/constants.js +6 -3
- package/lib/table/context.js +7 -4
- package/lib/table/hooks/index.js +14 -16
- package/lib/table/hooks/use-column-setting.d.ts +1 -1
- package/lib/table/hooks/use-column-setting.js +37 -20
- package/lib/table/hooks/use-column-setting.js.map +1 -1
- package/lib/table/index.d.ts +1 -1
- package/lib/table/index.js +20 -19
- package/lib/table/index.js.map +1 -1
- package/lib/table/table.d.ts +3 -3
- package/lib/table/table.js +201 -174
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.stories.js +182 -154
- package/lib/table/total-shower.d.ts +2 -2
- package/lib/table/total-shower.js +14 -10
- package/lib/table/total-shower.js.map +1 -1
- package/lib/table/utils.d.ts +1 -1
- package/lib/table/utils.js +24 -25
- package/lib/table/utils.js.map +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/index.js +20 -19
- package/lib/tabs/index.js.map +1 -1
- package/lib/tabs/tabPane.js +1 -2
- package/lib/tabs/tabs.d.ts +3 -3
- package/lib/tabs/tabs.js +61 -62
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tag/index.d.ts +3 -3
- package/lib/tag/index.js +23 -22
- package/lib/tag/index.js.map +1 -1
- package/lib/time-picker/index.d.ts +3 -3
- package/lib/time-picker/index.js +25 -24
- package/lib/time-picker/index.js.map +1 -1
- package/lib/timeline/index.d.ts +3 -3
- package/lib/timeline/index.js +23 -22
- package/lib/timeline/index.js.map +1 -1
- package/lib/title/index.js +44 -27
- package/lib/tntd-cascader/AntdCascader/component/DisabledContext.js +18 -31
- package/lib/tntd-cascader/AntdCascader/component/FormItemInputContext.js +9 -26
- package/lib/tntd-cascader/AntdCascader/component/SizeContext.js +9 -26
- package/lib/tntd-cascader/AntdCascader/component/context.js +18 -16
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +36 -39
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +81 -75
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +31 -50
- package/lib/tntd-cascader/AntdCascader/config/utils.js +29 -27
- package/lib/tntd-cascader/AntdCascader/config/warning.js +19 -35
- package/lib/tntd-cascader/AntdCascader/index.js +216 -162
- package/lib/tntd-cascader/AntdCascader/interface.js +13 -6
- package/lib/tntd-cascader/img/no-data-s.png +0 -0
- package/lib/tntd-cascader/index.js +12 -8
- package/lib/tntd-cascader/rc-cascader/Cascader.js +325 -284
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +30 -41
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +198 -152
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +223 -163
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +40 -48
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +179 -166
- package/lib/tntd-cascader/rc-cascader/context.js +11 -27
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +62 -63
- package/lib/tntd-cascader/rc-cascader/hooks/useEntities.js +39 -49
- package/lib/tntd-cascader/rc-cascader/hooks/useMissingValues.js +26 -41
- package/lib/tntd-cascader/rc-cascader/hooks/useRefFunc.js +16 -33
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +30 -51
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +75 -65
- package/lib/tntd-cascader/rc-cascader/index.js +9 -7
- package/lib/tntd-cascader/rc-cascader/utils/commonUtil.js +49 -38
- package/lib/tntd-cascader/rc-cascader/utils/treeUtil.js +42 -39
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +34 -30
- package/lib/tntd-form/ErrorList.js +99 -77
- package/lib/tntd-form/ErrorList.js.map +1 -1
- package/lib/tntd-form/Form.js +169 -139
- package/lib/tntd-form/FormItem/ItemHolder.js +154 -155
- package/lib/tntd-form/FormItem/ItemHolder.js.map +1 -1
- package/lib/tntd-form/FormItem/index.js +287 -252
- package/lib/tntd-form/FormItem/index.js.map +1 -1
- package/lib/tntd-form/FormItemInput.d.ts +1 -1
- package/lib/tntd-form/FormItemInput.d.ts.map +1 -1
- package/lib/tntd-form/FormItemInput.js +88 -62
- package/lib/tntd-form/FormItemInput.js.map +1 -1
- package/lib/tntd-form/FormItemLabel.d.ts +1 -1
- package/lib/tntd-form/FormItemLabel.d.ts.map +1 -1
- package/lib/tntd-form/FormItemLabel.js +99 -94
- package/lib/tntd-form/FormItemLabel.js.map +1 -1
- package/lib/tntd-form/FormList.js +52 -58
- package/lib/tntd-form/FormList.js.map +1 -1
- package/lib/tntd-form/_util/context.d.ts +42 -0
- package/lib/tntd-form/_util/context.d.ts.map +1 -0
- package/lib/tntd-form/_util/context.js +22 -0
- package/lib/tntd-form/_util/context.js.map +1 -0
- package/lib/tntd-form/_util/defaultRenderEmpty.d.ts +5 -0
- package/lib/tntd-form/_util/defaultRenderEmpty.d.ts.map +1 -0
- package/lib/tntd-form/_util/defaultRenderEmpty.js +44 -0
- package/lib/tntd-form/_util/defaultRenderEmpty.js.map +1 -0
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts +3 -0
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.d.ts.map +1 -0
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.js +28 -0
- package/lib/tntd-form/_util/hooks/useFlexGapSupport.js.map +1 -0
- package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts +3 -0
- package/lib/tntd-form/_util/hooks/useForceUpdate.d.ts.map +1 -0
- package/lib/tntd-form/_util/hooks/useForceUpdate.js +24 -0
- package/lib/tntd-form/_util/hooks/useForceUpdate.js.map +1 -0
- package/lib/tntd-form/_util/motion.js +51 -34
- package/lib/tntd-form/_util/reactNode.js +20 -37
- package/lib/tntd-form/_util/responsiveObserve.d.ts +22 -0
- package/lib/tntd-form/_util/responsiveObserve.d.ts.map +1 -0
- package/lib/tntd-form/_util/responsiveObserve.js +73 -0
- package/lib/tntd-form/_util/responsiveObserve.js.map +1 -0
- package/lib/tntd-form/_util/scrollTo.js +2 -2
- package/lib/tntd-form/_util/styleChecker.d.ts +5 -0
- package/lib/tntd-form/_util/styleChecker.d.ts.map +1 -0
- package/lib/tntd-form/_util/styleChecker.js +42 -0
- package/lib/tntd-form/_util/styleChecker.js.map +1 -0
- package/lib/tntd-form/_util/type.js +17 -5
- package/lib/tntd-form/_util/warning.js +17 -29
- package/lib/tntd-form/_util/wave.js +2 -2
- package/lib/tntd-form/context.js +47 -59
- package/lib/tntd-form/grid/RowContext.d.ts +9 -0
- package/lib/tntd-form/grid/RowContext.d.ts.map +1 -0
- package/lib/tntd-form/grid/RowContext.js +10 -0
- package/lib/tntd-form/grid/RowContext.js.map +1 -0
- package/lib/tntd-form/grid/col.d.ts +29 -0
- package/lib/tntd-form/grid/col.d.ts.map +1 -0
- package/lib/tntd-form/grid/col.js +105 -0
- package/lib/tntd-form/grid/col.js.map +1 -0
- package/lib/tntd-form/grid/hooks/useBreakpoint.d.ts +4 -0
- package/lib/tntd-form/grid/hooks/useBreakpoint.d.ts.map +1 -0
- package/lib/tntd-form/grid/hooks/useBreakpoint.js +29 -0
- package/lib/tntd-form/grid/hooks/useBreakpoint.js.map +1 -0
- package/lib/tntd-form/grid/index.d.ts +12 -0
- package/lib/tntd-form/grid/index.d.ts.map +1 -0
- package/lib/tntd-form/grid/index.js +31 -0
- package/lib/tntd-form/grid/index.js.map +1 -0
- package/lib/tntd-form/grid/row.d.ts +21 -0
- package/lib/tntd-form/grid/row.d.ts.map +1 -0
- package/lib/tntd-form/grid/row.js +186 -0
- package/lib/tntd-form/grid/row.js.map +1 -0
- package/lib/tntd-form/grid/style/index.d.ts +3 -0
- package/lib/tntd-form/grid/style/index.d.ts.map +1 -0
- package/lib/tntd-form/grid/style/index.js +4 -0
- package/lib/tntd-form/grid/style/index.js.map +1 -0
- package/lib/tntd-form/hooks/useDebounce.js +28 -37
- package/lib/tntd-form/hooks/useForm.js +56 -57
- package/lib/tntd-form/hooks/useFormInstance.js +11 -8
- package/lib/tntd-form/hooks/useFormItemStatus.js +18 -13
- package/lib/tntd-form/hooks/useFormItemStatus.js.map +1 -1
- package/lib/tntd-form/hooks/useFrameState.js +51 -63
- package/lib/tntd-form/hooks/useItemRef.js +24 -41
- package/lib/tntd-form/index.d.ts.map +1 -1
- package/lib/tntd-form/index.js +24 -43
- package/lib/tntd-form/index.js.map +1 -1
- package/lib/tntd-form/interface.js +6 -4
- package/lib/tntd-form/style/index.js +2 -4
- package/lib/tntd-form/tntd-form.stories.d.ts +1 -1
- package/lib/tntd-form/tntd-form.stories.js +913 -437
- package/lib/tntd-form/util.js +18 -19
- package/lib/tntd-form/validateMessagesContext.js +8 -4
- package/lib/tntd-icon/fonts/iconfont.js +36 -53
- package/lib/tntd-icon/index.js +40 -25
- package/lib/tntd-layout/ActionsContext.js +8 -4
- package/lib/tntd-layout/AppList.js +173 -224
- package/lib/tntd-layout/Application.js +75 -111
- package/lib/tntd-layout/Avatar.js +100 -135
- package/lib/tntd-layout/CompatibleLanguage.js +128 -180
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +117 -146
- package/lib/tntd-layout/EnterpriseLayout/Language.js +73 -90
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +69 -102
- package/lib/tntd-layout/EnterpriseLayout/index.js +28 -17
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +283 -276
- package/lib/tntd-layout/GlobalNavigation/index.js +108 -115
- package/lib/tntd-layout/Header.js +77 -136
- package/lib/tntd-layout/HeaderActions.js +106 -106
- package/lib/tntd-layout/HeaderNavs.js +78 -107
- package/lib/tntd-layout/HeaderTabs.js +224 -316
- package/lib/tntd-layout/Iconfont.js +11 -7
- package/lib/tntd-layout/Language.js +69 -76
- package/lib/tntd-layout/Layout.js +214 -171
- package/lib/tntd-layout/Logo.js +69 -144
- package/lib/tntd-layout/OrgAppList.js +238 -388
- package/lib/tntd-layout/SideMenu.js +269 -408
- package/lib/tntd-layout/Theme.js +75 -93
- package/lib/tntd-layout/createActions.js +45 -34
- package/lib/tntd-layout/images/avatar/empty.png +0 -0
- package/lib/tntd-layout/images/avatar/female1.png +0 -0
- package/lib/tntd-layout/images/avatar/female2.png +0 -0
- package/lib/tntd-layout/images/avatar/female3.png +0 -0
- package/lib/tntd-layout/images/avatar/female4.png +0 -0
- package/lib/tntd-layout/images/avatar/female5.png +0 -0
- package/lib/tntd-layout/images/avatar/female6.png +0 -0
- package/lib/tntd-layout/images/avatar/male1.png +0 -0
- package/lib/tntd-layout/images/avatar/male2.png +0 -0
- package/lib/tntd-layout/images/avatar/male3.png +0 -0
- package/lib/tntd-layout/images/avatar/male4.png +0 -0
- package/lib/tntd-layout/images/avatar/male5.png +0 -0
- package/lib/tntd-layout/images/avatar/male6.png +0 -0
- package/lib/tntd-layout/images/index.js +68 -66
- package/lib/tntd-layout/index.js +137 -95
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +131 -182
- package/lib/tntd-layout/paaslayout/Header.js +51 -79
- package/lib/tntd-layout/paaslayout/Logo.js +15 -30
- package/lib/tntd-layout/paaslayout/SideMenu.js +131 -147
- package/lib/tntd-layout/paaslayout/index.js +205 -141
- package/lib/tntd-layout/storage.js +58 -30
- package/lib/tntd-modal/index.js +98 -62
- package/lib/tntd-rc-select/_util/DisabledContext.js +18 -31
- package/lib/tntd-rc-select/_util/FormItemInputContext.js +9 -26
- package/lib/tntd-rc-select/_util/PurePanel.js +84 -78
- package/lib/tntd-rc-select/_util/SizeContext.js +9 -26
- package/lib/tntd-rc-select/_util/context.js +18 -16
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +35 -39
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.js.map +1 -1
- package/lib/tntd-rc-select/_util/getIcons.js +81 -75
- package/lib/tntd-rc-select/_util/interface.js +13 -6
- package/lib/tntd-rc-select/_util/motion.js +51 -34
- package/lib/tntd-rc-select/_util/type.js +17 -5
- package/lib/tntd-rc-select/_util/useCompactItemContext.js +31 -50
- package/lib/tntd-rc-select/_util/warning.js +19 -35
- package/lib/tntd-rc-select/img/no-data-s.png +0 -0
- package/lib/tntd-rc-select/index.js +152 -123
- package/lib/tntd-second-page/index.js +60 -33
- package/lib/tntd-second-page/index.js.map +1 -1
- package/lib/tntd-select/DropDownWrap.js +102 -78
- package/lib/tntd-select/index.d.ts +2 -2
- package/lib/tntd-select/index.js +638 -543
- package/lib/tooltip/index.d.ts +3 -3
- package/lib/tooltip/index.js +23 -22
- package/lib/tooltip/index.js.map +1 -1
- package/lib/transfer/index.d.ts +3 -3
- package/lib/transfer/index.js +23 -22
- package/lib/transfer/index.js.map +1 -1
- package/lib/tree/index.d.ts +3 -3
- package/lib/tree/index.js +23 -22
- package/lib/tree/index.js.map +1 -1
- package/lib/tree-select/index.d.ts +5 -5
- package/lib/tree-select/index.js +30 -27
- package/lib/tree-select/index.js.map +1 -1
- package/lib/typography/index.d.ts +3 -3
- package/lib/typography/index.js +23 -22
- package/lib/typography/index.js.map +1 -1
- package/lib/upload/index.d.ts +2 -2
- package/lib/upload/index.js +32 -26
- package/lib/upload/index.js.map +1 -1
- package/lib/utils/checkAuth.js +34 -23
- package/lib/utils/findMenuInfoByPath.js +41 -34
- package/lib/utils/index.js +151 -90
- package/lib/utils/lang.js +76 -120
- package/lib/utils/simple-template.js +11 -7
- package/lib/version/index.d.ts +3 -3
- package/lib/version/index.js +23 -22
- package/lib/version/index.js.map +1 -1
- package/lib/water-mark/index.js +130 -117
- package/package.json +1 -1
- package/es/handle/handle.js +0 -102
- package/es/handle/handle.js.map +0 -1
- package/es/mention/index.js +0 -4
- package/es/mention/index.js.map +0 -1
- 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-select/_util/DisabledContext.js +0 -8
- package/es/tntd-select/_util/DisabledContext.js.map +0 -1
- package/es/tntd-select/_util/FormItemInputContext.js +0 -3
- package/es/tntd-select/_util/FormItemInputContext.js.map +0 -1
- package/es/tntd-select/_util/PurePanel.js +0 -55
- package/es/tntd-select/_util/PurePanel.js.map +0 -1
- package/es/tntd-select/_util/SizeContext.js +0 -3
- package/es/tntd-select/_util/SizeContext.js.map +0 -1
- package/es/tntd-select/_util/context.js +0 -14
- package/es/tntd-select/_util/context.js.map +0 -1
- package/es/tntd-select/_util/defaultRenderEmpty.js +0 -20
- package/es/tntd-select/_util/defaultRenderEmpty.js.map +0 -1
- package/es/tntd-select/_util/getIcons.js +0 -52
- package/es/tntd-select/_util/getIcons.js.map +0 -1
- package/es/tntd-select/_util/interface.js +0 -5
- package/es/tntd-select/_util/interface.js.map +0 -1
- package/es/tntd-select/_util/motion.js +0 -38
- package/es/tntd-select/_util/motion.js.map +0 -1
- package/es/tntd-select/_util/type.js +0 -4
- package/es/tntd-select/_util/type.js.map +0 -1
- package/es/tntd-select/_util/useCompactItemContext.js +0 -24
- package/es/tntd-select/_util/useCompactItemContext.js.map +0 -1
- package/es/tntd-select/_util/warning.js +0 -15
- package/es/tntd-select/_util/warning.js.map +0 -1
- package/es/tntd-select/rc-select/BaseSelect.js +0 -429
- package/es/tntd-select/rc-select/BaseSelect.js.map +0 -1
- package/es/tntd-select/rc-select/OptGroup.js +0 -5
- package/es/tntd-select/rc-select/OptGroup.js.map +0 -1
- package/es/tntd-select/rc-select/Option.js +0 -5
- package/es/tntd-select/rc-select/Option.js.map +0 -1
- package/es/tntd-select/rc-select/OptionList.js +0 -257
- package/es/tntd-select/rc-select/OptionList.js.map +0 -1
- package/es/tntd-select/rc-select/Select.js +0 -428
- package/es/tntd-select/rc-select/Select.js.map +0 -1
- package/es/tntd-select/rc-select/SelectContext.js +0 -4
- package/es/tntd-select/rc-select/SelectContext.js.map +0 -1
- package/es/tntd-select/rc-select/SelectTrigger.js +0 -91
- package/es/tntd-select/rc-select/SelectTrigger.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/Input.js +0 -47
- package/es/tntd-select/rc-select/Selector/Input.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js +0 -97
- package/es/tntd-select/rc-select/Selector/MultipleSelector.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/SingleSelector.js +0 -45
- package/es/tntd-select/rc-select/Selector/SingleSelector.js.map +0 -1
- package/es/tntd-select/rc-select/Selector/index.js +0 -136
- package/es/tntd-select/rc-select/Selector/index.js.map +0 -1
- package/es/tntd-select/rc-select/TransBtn.js +0 -22
- package/es/tntd-select/rc-select/TransBtn.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useAllowClear.js +0 -25
- package/es/tntd-select/rc-select/hooks/useAllowClear.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useBaseProps.js +0 -10
- package/es/tntd-select/rc-select/hooks/useBaseProps.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useCache.js +0 -34
- package/es/tntd-select/rc-select/hooks/useCache.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useDelayReset.js +0 -24
- 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 -28
- package/es/tntd-select/rc-select/hooks/useId.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js +0 -18
- package/es/tntd-select/rc-select/hooks/useLayoutEffect.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useLock.js +0 -26
- package/es/tntd-select/rc-select/hooks/useLock.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useOptions.js +0 -45
- package/es/tntd-select/rc-select/hooks/useOptions.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useRefFunc.js +0 -14
- package/es/tntd-select/rc-select/hooks/useRefFunc.js.map +0 -1
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js +0 -32
- package/es/tntd-select/rc-select/hooks/useSelectTriggerControl.js.map +0 -1
- package/es/tntd-select/rc-select/index.js +0 -8
- package/es/tntd-select/rc-select/index.js.map +0 -1
- package/es/tntd-select/rc-select/interface.js +0 -2
- package/es/tntd-select/rc-select/interface.js.map +0 -1
- package/es/tntd-select/rc-select/utils/commonUtil.js +0 -32
- package/es/tntd-select/rc-select/utils/commonUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/keyUtil.js +0 -34
- package/es/tntd-select/rc-select/utils/keyUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/legacyUtil.js +0 -32
- package/es/tntd-select/rc-select/utils/legacyUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/platformUtil.js +0 -5
- package/es/tntd-select/rc-select/utils/platformUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/valueUtil.js +0 -99
- package/es/tntd-select/rc-select/utils/valueUtil.js.map +0 -1
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js +0 -100
- package/es/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
- package/lib/handle/handle.d.ts +0 -3
- package/lib/handle/handle.d.ts.map +0 -1
- package/lib/handle/handle.js +0 -130
- package/lib/handle/handle.js.map +0 -1
- 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-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 -35
- 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 -29
- 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 -84
- 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 -29
- package/lib/tntd-select/_util/SizeContext.js.map +0 -1
- package/lib/tntd-select/_util/context.d.ts.map +0 -1
- package/lib/tntd-select/_util/context.js +0 -20
- package/lib/tntd-select/_util/context.js.map +0 -1
- package/lib/tntd-select/_util/defaultRenderEmpty.d.ts.map +0 -1
- package/lib/tntd-select/_util/defaultRenderEmpty.js +0 -48
- 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 -78
- 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 -9
- 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 -42
- 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 -9
- 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 -54
- 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 -40
- 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 -459
- 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 -7
- 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 -7
- 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 -285
- 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 -456
- 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 -29
- 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 -119
- 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 -75
- 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 -125
- 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 -73
- 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 -164
- 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 -50
- 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 -32
- 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 -37
- 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 -59
- 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 -50
- 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 -80
- 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 -59
- 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 -44
- 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 -52
- 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 -71
- 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 -40
- 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 -58
- 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 -17
- 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 -3
- 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 -39
- 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 -41
- 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 -62
- 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 -9
- 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 -109
- 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 -130
- package/lib/tntd-select/rc-select/utils/warningPropsUtil.js.map +0 -1
- /package/lib/{tntd-select/_util → _util}/context.d.ts +0 -0
- /package/lib/{tntd-select/_util → _util}/defaultRenderEmpty.d.ts +0 -0
|
@@ -1,467 +1,943 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
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
|
|
17
6
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
var
|
|
26
|
-
var t = {};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
7
|
+
exports["default"] = exports.UseWatchHooks = exports.UnblockValidate = exports.NestValidatorForm = exports.FormMethodInvoke = exports.FormLayoutDemo = exports.FormInModal = exports.FormDisabledReadonly = exports.DynamicItemsComplex = exports.DynamicAddRemoveFields = exports.Basic = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
10
|
+
var _index2 = require("../index");
|
|
11
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
16
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
18
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
|
+
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."); }
|
|
20
|
+
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); }
|
|
21
|
+
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; }
|
|
22
|
+
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; } }
|
|
23
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
25
|
+
var t = {};
|
|
26
|
+
for (var p in s) {
|
|
27
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
28
|
+
}
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
30
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
31
|
+
}
|
|
32
|
+
return t;
|
|
35
33
|
};
|
|
36
|
-
var
|
|
37
|
-
|
|
34
|
+
var Option = _index2.Select.Option;
|
|
35
|
+
var TreeNode = _index2.TreeSelect.TreeNode;
|
|
36
|
+
var options = [{
|
|
37
|
+
label: 'Apple',
|
|
38
|
+
value: 'apple'
|
|
39
|
+
}, {
|
|
40
|
+
label: 'Pear',
|
|
41
|
+
value: 'pear'
|
|
42
|
+
}];
|
|
43
|
+
var _default = {
|
|
44
|
+
title: 'TntdForm',
|
|
45
|
+
component: _index["default"]
|
|
46
|
+
}; //👇 We create a “template” of how args map to rendering
|
|
47
|
+
exports["default"] = _default;
|
|
48
|
+
var Template = function Template(args) {
|
|
49
|
+
return _react["default"].createElement(_index["default"], Object.assign({}, args));
|
|
38
50
|
};
|
|
39
|
-
|
|
40
|
-
exports.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
var Basic = Template.bind({});
|
|
52
|
+
exports.Basic = Basic;
|
|
53
|
+
Basic.args = {
|
|
54
|
+
//👇 The args you need here will depend on your component
|
|
55
|
+
initialValues: {
|
|
56
|
+
username: 'zhang san',
|
|
57
|
+
remember: true
|
|
58
|
+
},
|
|
59
|
+
name: 'Basic',
|
|
60
|
+
disabled: false,
|
|
61
|
+
labelCol: {
|
|
62
|
+
span: 4
|
|
63
|
+
},
|
|
64
|
+
wrapperCol: {
|
|
65
|
+
span: 20
|
|
66
|
+
},
|
|
67
|
+
onFinish: function onFinish(values) {
|
|
68
|
+
console.log('Success:', values);
|
|
69
|
+
},
|
|
70
|
+
onFinishFailed: function onFinishFailed(errorInfo) {
|
|
71
|
+
console.log('Failed:', errorInfo);
|
|
72
|
+
},
|
|
73
|
+
autoComplete: 'off',
|
|
74
|
+
children: _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_index["default"].Item, {
|
|
75
|
+
label: "Username",
|
|
76
|
+
name: "username",
|
|
77
|
+
rules: [{
|
|
78
|
+
required: true,
|
|
79
|
+
message: 'Please input your username!'
|
|
80
|
+
}]
|
|
81
|
+
}, _react["default"].createElement(_index2.Input, null)), _react["default"].createElement(_index["default"].Item, {
|
|
82
|
+
label: "Password",
|
|
83
|
+
name: "password",
|
|
84
|
+
rules: [{
|
|
85
|
+
required: true,
|
|
86
|
+
message: 'Please input your password!'
|
|
87
|
+
}]
|
|
88
|
+
}, _react["default"].createElement(_index2.Input.Password, null)), _react["default"].createElement(_index["default"].Item, {
|
|
89
|
+
label: "TreeSelect",
|
|
90
|
+
name: "treeSelect",
|
|
91
|
+
rules: [{
|
|
92
|
+
required: true,
|
|
93
|
+
message: 'Please select one node'
|
|
94
|
+
}]
|
|
95
|
+
}, _react["default"].createElement(_index2.TreeSelect, {
|
|
96
|
+
showSearch: true,
|
|
97
|
+
treeDefaultExpandAll: true,
|
|
98
|
+
allowClear: true
|
|
99
|
+
}, _react["default"].createElement(TreeNode, {
|
|
100
|
+
value: "parent 1",
|
|
101
|
+
title: "parent 1",
|
|
102
|
+
key: "0-1"
|
|
103
|
+
}, _react["default"].createElement(TreeNode, {
|
|
104
|
+
value: "parent 1-0",
|
|
105
|
+
title: "parent 1-0",
|
|
106
|
+
key: "0-1-1"
|
|
107
|
+
}, _react["default"].createElement(TreeNode, {
|
|
108
|
+
value: "leaf1",
|
|
109
|
+
title: "my leaf",
|
|
110
|
+
key: "random"
|
|
111
|
+
}), _react["default"].createElement(TreeNode, {
|
|
112
|
+
value: "leaf2",
|
|
113
|
+
title: "your leaf",
|
|
114
|
+
key: "random1"
|
|
115
|
+
})), _react["default"].createElement(TreeNode, {
|
|
116
|
+
value: "parent 1-1",
|
|
117
|
+
title: "parent 1-1",
|
|
118
|
+
key: "random2"
|
|
119
|
+
}, _react["default"].createElement(TreeNode, {
|
|
120
|
+
value: "sss",
|
|
121
|
+
title: _react["default"].createElement("b", {
|
|
122
|
+
style: {
|
|
123
|
+
color: '#08c'
|
|
124
|
+
}
|
|
125
|
+
}, "sss"),
|
|
126
|
+
key: "random3"
|
|
127
|
+
}))))), _react["default"].createElement(_index["default"].Item, {
|
|
128
|
+
name: "remember",
|
|
129
|
+
valuePropName: "checked",
|
|
130
|
+
wrapperCol: {
|
|
131
|
+
offset: 8,
|
|
132
|
+
span: 16
|
|
133
|
+
}
|
|
134
|
+
}, _react["default"].createElement(_index2.Checkbox, null, "Remember me")), _react["default"].createElement(_index["default"].Item, {
|
|
135
|
+
wrapperCol: {
|
|
136
|
+
offset: 8,
|
|
137
|
+
span: 16
|
|
138
|
+
}
|
|
139
|
+
}, _react["default"].createElement(_index2.Button, {
|
|
140
|
+
type: "primary",
|
|
141
|
+
htmlType: "submit"
|
|
142
|
+
}, "Submit")))
|
|
58
143
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
name: 'Basic',
|
|
67
|
-
disabled: false,
|
|
68
|
-
labelCol: { span: 4 },
|
|
69
|
-
wrapperCol: { span: 20 },
|
|
70
|
-
onFinish: (values) => {
|
|
71
|
-
console.log('Success:', values);
|
|
72
|
-
},
|
|
73
|
-
onFinishFailed(errorInfo) {
|
|
74
|
-
console.log('Failed:', errorInfo);
|
|
144
|
+
var FormMethodsTemplate = function FormMethodsTemplate(args) {
|
|
145
|
+
var _Form$useForm = _index["default"].useForm(),
|
|
146
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
147
|
+
form = _Form$useForm2[0];
|
|
148
|
+
var layout = {
|
|
149
|
+
labelCol: {
|
|
150
|
+
span: 8
|
|
75
151
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
react_1.default.createElement(TreeNode, { value: "sss", title: react_1.default.createElement("b", { style: { color: '#08c' } }, "sss"), key: "random3" }))))),
|
|
90
|
-
react_1.default.createElement(index_1.default.Item, { name: "remember", valuePropName: "checked", wrapperCol: { offset: 8, span: 16 } },
|
|
91
|
-
react_1.default.createElement(index_2.Checkbox, null, "Remember me")),
|
|
92
|
-
react_1.default.createElement(index_1.default.Item, { wrapperCol: { offset: 8, span: 16 } },
|
|
93
|
-
react_1.default.createElement(index_2.Button, { type: "primary", htmlType: "submit" }, "Submit")))),
|
|
94
|
-
};
|
|
95
|
-
const FormMethodsTemplate = (args) => {
|
|
96
|
-
const [form] = index_1.default.useForm();
|
|
97
|
-
const layout = {
|
|
98
|
-
labelCol: { span: 8 },
|
|
99
|
-
wrapperCol: { span: 16 },
|
|
100
|
-
};
|
|
101
|
-
const tailLayout = {
|
|
102
|
-
wrapperCol: { offset: 8, span: 16 },
|
|
103
|
-
};
|
|
104
|
-
const onGenderChange = (value) => {
|
|
105
|
-
switch (value) {
|
|
106
|
-
case 'male':
|
|
107
|
-
form.setFieldsValue({ note: 'Hi, man!' });
|
|
108
|
-
return;
|
|
109
|
-
case 'female':
|
|
110
|
-
form.setFieldsValue({ note: 'Hi, lady!' });
|
|
111
|
-
return;
|
|
112
|
-
case 'other':
|
|
113
|
-
form.setFieldsValue({ note: 'Hi there!' });
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
const onFinish = (values) => {
|
|
117
|
-
console.log(values);
|
|
118
|
-
};
|
|
119
|
-
const onReset = () => {
|
|
120
|
-
form.resetFields();
|
|
121
|
-
};
|
|
122
|
-
const onFill = () => {
|
|
152
|
+
wrapperCol: {
|
|
153
|
+
span: 16
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
var tailLayout = {
|
|
157
|
+
wrapperCol: {
|
|
158
|
+
offset: 8,
|
|
159
|
+
span: 16
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
var onGenderChange = function onGenderChange(value) {
|
|
163
|
+
switch (value) {
|
|
164
|
+
case 'male':
|
|
123
165
|
form.setFieldsValue({
|
|
124
|
-
|
|
125
|
-
gender: 'male',
|
|
166
|
+
note: 'Hi, man!'
|
|
126
167
|
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
168
|
+
return;
|
|
169
|
+
case 'female':
|
|
170
|
+
form.setFieldsValue({
|
|
171
|
+
note: 'Hi, lady!'
|
|
172
|
+
});
|
|
173
|
+
return;
|
|
174
|
+
case 'other':
|
|
175
|
+
form.setFieldsValue({
|
|
176
|
+
note: 'Hi there!'
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
var onFinish = function onFinish(values) {
|
|
181
|
+
console.log(values);
|
|
182
|
+
};
|
|
183
|
+
var onReset = function onReset() {
|
|
184
|
+
form.resetFields();
|
|
185
|
+
};
|
|
186
|
+
var onFill = function onFill() {
|
|
187
|
+
form.setFieldsValue({
|
|
188
|
+
note: 'Hello world!',
|
|
189
|
+
gender: 'male'
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
return _react["default"].createElement(_index["default"], Object.assign({}, layout, {
|
|
193
|
+
form: form,
|
|
194
|
+
name: "control-hooks",
|
|
195
|
+
onFinish: onFinish
|
|
196
|
+
}, args), _react["default"].createElement(_index["default"].Item, {
|
|
197
|
+
name: "note",
|
|
198
|
+
label: "Note",
|
|
199
|
+
rules: [{
|
|
200
|
+
required: true
|
|
201
|
+
}]
|
|
202
|
+
}, _react["default"].createElement(_index2.Input, null)), _react["default"].createElement(_index["default"].Item, {
|
|
203
|
+
name: "gender",
|
|
204
|
+
label: "Gender",
|
|
205
|
+
rules: [{
|
|
206
|
+
required: true
|
|
207
|
+
}]
|
|
208
|
+
}, _react["default"].createElement(_index2.Select, {
|
|
209
|
+
placeholder: "Select a option and change input text above",
|
|
210
|
+
onChange: onGenderChange,
|
|
211
|
+
allowClear: true
|
|
212
|
+
}, _react["default"].createElement(Option, {
|
|
213
|
+
value: "male"
|
|
214
|
+
}, "male"), _react["default"].createElement(Option, {
|
|
215
|
+
value: "female"
|
|
216
|
+
}, "female"), _react["default"].createElement(Option, {
|
|
217
|
+
value: "other"
|
|
218
|
+
}, "other"))), _react["default"].createElement(_index["default"].Item, {
|
|
219
|
+
noStyle: true,
|
|
220
|
+
shouldUpdate: function shouldUpdate(prevValues, currentValues) {
|
|
221
|
+
return prevValues.gender !== currentValues.gender;
|
|
222
|
+
}
|
|
223
|
+
}, function (_ref) {
|
|
224
|
+
var getFieldValue = _ref.getFieldValue;
|
|
225
|
+
return getFieldValue('gender') === 'other' ? _react["default"].createElement(_index["default"].Item, {
|
|
226
|
+
name: "customizeGender",
|
|
227
|
+
label: "Customize Gender",
|
|
228
|
+
rules: [{
|
|
229
|
+
required: true
|
|
230
|
+
}]
|
|
231
|
+
}, _react["default"].createElement(_index2.Input, null)) : null;
|
|
232
|
+
}), _react["default"].createElement(_index["default"].Item, Object.assign({}, tailLayout), _react["default"].createElement(_index2.Button, {
|
|
233
|
+
type: "primary",
|
|
234
|
+
htmlType: "submit",
|
|
235
|
+
style: {
|
|
236
|
+
marginRight: 12
|
|
237
|
+
}
|
|
238
|
+
}, "Submit"), _react["default"].createElement(_index2.Button, {
|
|
239
|
+
htmlType: "button",
|
|
240
|
+
onClick: onReset
|
|
241
|
+
}, "Reset"), _react["default"].createElement(_index2.Button, {
|
|
242
|
+
type: "link",
|
|
243
|
+
htmlType: "button",
|
|
244
|
+
onClick: onFill
|
|
245
|
+
}, "Fill form")));
|
|
142
246
|
};
|
|
143
247
|
// 表单方法调用
|
|
144
|
-
|
|
145
|
-
exports.FormMethodInvoke
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
248
|
+
var FormMethodInvoke = FormMethodsTemplate.bind({});
|
|
249
|
+
exports.FormMethodInvoke = FormMethodInvoke;
|
|
250
|
+
FormMethodInvoke.args = {};
|
|
251
|
+
var FormLayoutTemplate = function FormLayoutTemplate() {
|
|
252
|
+
var _Form$useForm3 = _index["default"].useForm(),
|
|
253
|
+
_Form$useForm4 = _slicedToArray(_Form$useForm3, 1),
|
|
254
|
+
form = _Form$useForm4[0];
|
|
255
|
+
var _useState = (0, _react.useState)('horizontal'),
|
|
256
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
257
|
+
formLayout = _useState2[0],
|
|
258
|
+
setFormLayout = _useState2[1];
|
|
259
|
+
var onFormLayoutChange = function onFormLayoutChange(_ref2) {
|
|
260
|
+
var layout = _ref2.layout;
|
|
261
|
+
setFormLayout(layout);
|
|
262
|
+
};
|
|
263
|
+
var formItemLayout = formLayout === 'horizontal' ? {
|
|
264
|
+
labelCol: {
|
|
265
|
+
span: 4
|
|
266
|
+
},
|
|
267
|
+
wrapperCol: {
|
|
268
|
+
span: 14
|
|
269
|
+
}
|
|
270
|
+
} : null;
|
|
271
|
+
var buttonItemLayout = formLayout === 'horizontal' ? {
|
|
272
|
+
wrapperCol: {
|
|
273
|
+
span: 14,
|
|
274
|
+
offset: 4
|
|
275
|
+
}
|
|
276
|
+
} : null;
|
|
277
|
+
return _react["default"].createElement(_index["default"], Object.assign({}, formItemLayout, {
|
|
278
|
+
layout: formLayout,
|
|
279
|
+
form: form,
|
|
280
|
+
initialValues: {
|
|
281
|
+
layout: formLayout
|
|
282
|
+
},
|
|
283
|
+
onValuesChange: onFormLayoutChange
|
|
284
|
+
}), _react["default"].createElement(_index["default"].Item, {
|
|
285
|
+
label: "Form Layout",
|
|
286
|
+
name: "layout"
|
|
287
|
+
}, _react["default"].createElement(_index2.Radio.Group, {
|
|
288
|
+
value: formLayout
|
|
289
|
+
}, _react["default"].createElement(_index2.Radio.Button, {
|
|
290
|
+
value: "horizontal"
|
|
291
|
+
}, "Horizontal"), _react["default"].createElement(_index2.Radio.Button, {
|
|
292
|
+
value: "vertical"
|
|
293
|
+
}, "Vertical"), _react["default"].createElement(_index2.Radio.Button, {
|
|
294
|
+
value: "inline"
|
|
295
|
+
}, "Inline"))), _react["default"].createElement(_index["default"].Item, {
|
|
296
|
+
label: "Field A"
|
|
297
|
+
}, _react["default"].createElement(_index2.Input, {
|
|
298
|
+
placeholder: "input placeholder"
|
|
299
|
+
})), _react["default"].createElement(_index["default"].Item, {
|
|
300
|
+
label: "Field B"
|
|
301
|
+
}, _react["default"].createElement(_index2.Input, {
|
|
302
|
+
placeholder: "input placeholder"
|
|
303
|
+
})), _react["default"].createElement(_index["default"].Item, Object.assign({}, buttonItemLayout), _react["default"].createElement(_index2.Button, {
|
|
304
|
+
type: "primary"
|
|
305
|
+
}, "Submit")));
|
|
175
306
|
};
|
|
176
|
-
|
|
307
|
+
var FormLayoutDemo = FormLayoutTemplate.bind({});
|
|
177
308
|
// 非阻塞校验
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
309
|
+
exports.FormLayoutDemo = FormLayoutDemo;
|
|
310
|
+
var UnblockValidateTemplate = function UnblockValidateTemplate() {
|
|
311
|
+
var _Form$useForm5 = _index["default"].useForm(),
|
|
312
|
+
_Form$useForm6 = _slicedToArray(_Form$useForm5, 1),
|
|
313
|
+
form = _Form$useForm6[0];
|
|
314
|
+
var onFinish = function onFinish() {
|
|
315
|
+
void _index2.message.success('Submit success!');
|
|
316
|
+
};
|
|
317
|
+
var onFinishFailed = function onFinishFailed() {
|
|
318
|
+
void _index2.message.error('Submit failed!');
|
|
319
|
+
};
|
|
320
|
+
var onFill = function onFill() {
|
|
321
|
+
form.setFieldsValue({
|
|
322
|
+
url: 'https://taobao.com/'
|
|
323
|
+
});
|
|
324
|
+
};
|
|
325
|
+
return _react["default"].createElement(_index["default"], {
|
|
326
|
+
form: form,
|
|
327
|
+
onFinish: onFinish,
|
|
328
|
+
onFinishFailed: onFinishFailed,
|
|
329
|
+
autoComplete: "off"
|
|
330
|
+
}, _react["default"].createElement(_index["default"].Item, {
|
|
331
|
+
name: "url",
|
|
332
|
+
label: "URL",
|
|
333
|
+
rules: [{
|
|
334
|
+
required: true
|
|
335
|
+
}, {
|
|
336
|
+
type: 'url',
|
|
337
|
+
warningOnly: true
|
|
338
|
+
}, {
|
|
339
|
+
type: 'string',
|
|
340
|
+
min: 6
|
|
341
|
+
}]
|
|
342
|
+
}, _react["default"].createElement(_index2.Input, {
|
|
343
|
+
placeholder: "input placeholder"
|
|
344
|
+
})), _react["default"].createElement(_index["default"].Item, null, _react["default"].createElement(_index2.Button, {
|
|
345
|
+
type: "primary",
|
|
346
|
+
htmlType: "submit",
|
|
347
|
+
style: {
|
|
348
|
+
marginRight: 12
|
|
349
|
+
}
|
|
350
|
+
}, "Submit"), _react["default"].createElement(_index2.Button, {
|
|
351
|
+
htmlType: "button",
|
|
352
|
+
onClick: onFill
|
|
353
|
+
}, "Fill")));
|
|
197
354
|
};
|
|
198
|
-
|
|
355
|
+
var UnblockValidate = UnblockValidateTemplate.bind({});
|
|
199
356
|
// 字段监听hooks
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
357
|
+
exports.UnblockValidate = UnblockValidate;
|
|
358
|
+
var UseWatchTemplate = function UseWatchTemplate() {
|
|
359
|
+
var _Form$useForm7 = _index["default"].useForm(),
|
|
360
|
+
_Form$useForm8 = _slicedToArray(_Form$useForm7, 1),
|
|
361
|
+
form = _Form$useForm8[0];
|
|
362
|
+
var nameValue = _index["default"].useWatch('name', form);
|
|
363
|
+
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_index["default"], {
|
|
364
|
+
form: form,
|
|
365
|
+
layout: "vertical",
|
|
366
|
+
autoComplete: "off"
|
|
367
|
+
}, _react["default"].createElement(_index["default"].Item, {
|
|
368
|
+
name: "name",
|
|
369
|
+
label: "Name (Watch to trigger rerender)"
|
|
370
|
+
}, _react["default"].createElement(_index2.Input, null)), _react["default"].createElement(_index["default"].Item, {
|
|
371
|
+
name: "age",
|
|
372
|
+
label: "Age (Not Watch)"
|
|
373
|
+
}, _react["default"].createElement(_index2.InputNumber, null))), _react["default"].createElement("pre", null, "Name Value: ", nameValue));
|
|
212
374
|
};
|
|
213
|
-
|
|
375
|
+
var UseWatchHooks = UseWatchTemplate.bind({});
|
|
214
376
|
// 动态增减标单项
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
377
|
+
exports.UseWatchHooks = UseWatchHooks;
|
|
378
|
+
var formItemLayout = {
|
|
379
|
+
labelCol: {
|
|
380
|
+
xs: {
|
|
381
|
+
span: 24
|
|
219
382
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
383
|
+
sm: {
|
|
384
|
+
span: 4
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
wrapperCol: {
|
|
388
|
+
xs: {
|
|
389
|
+
span: 24
|
|
223
390
|
},
|
|
391
|
+
sm: {
|
|
392
|
+
span: 20
|
|
393
|
+
}
|
|
394
|
+
}
|
|
224
395
|
};
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
396
|
+
var formItemLayoutWithOutLabel = {
|
|
397
|
+
wrapperCol: {
|
|
398
|
+
xs: {
|
|
399
|
+
span: 24,
|
|
400
|
+
offset: 0
|
|
229
401
|
},
|
|
402
|
+
sm: {
|
|
403
|
+
span: 20,
|
|
404
|
+
offset: 4
|
|
405
|
+
}
|
|
406
|
+
}
|
|
230
407
|
};
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
408
|
+
var DynamicAddRemoveFieldsTpl = function DynamicAddRemoveFieldsTpl() {
|
|
409
|
+
var onFinish = function onFinish(values) {
|
|
410
|
+
console.log('Received values of form:', values);
|
|
411
|
+
};
|
|
412
|
+
return _react["default"].createElement(_index["default"], Object.assign({
|
|
413
|
+
name: "dynamic_form_item"
|
|
414
|
+
}, formItemLayoutWithOutLabel, {
|
|
415
|
+
onFinish: onFinish
|
|
416
|
+
}), _react["default"].createElement(_index["default"].List, {
|
|
417
|
+
name: "names",
|
|
418
|
+
rules: [{
|
|
419
|
+
validator: function () {
|
|
420
|
+
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, names) {
|
|
421
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
422
|
+
while (1) {
|
|
423
|
+
switch (_context.prev = _context.next) {
|
|
424
|
+
case 0:
|
|
425
|
+
if (!(!names || names.length < 2)) {
|
|
426
|
+
_context.next = 2;
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
return _context.abrupt("return", Promise.reject(new Error('At least 2 passengers')));
|
|
430
|
+
case 2:
|
|
431
|
+
case "end":
|
|
432
|
+
return _context.stop();
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}, _callee);
|
|
436
|
+
}));
|
|
437
|
+
function validator(_x2, _x3) {
|
|
438
|
+
return _validator.apply(this, arguments);
|
|
439
|
+
}
|
|
440
|
+
return validator;
|
|
441
|
+
}()
|
|
442
|
+
}]
|
|
443
|
+
}, function (fields, _ref3, _ref4) {
|
|
444
|
+
var add = _ref3.add,
|
|
445
|
+
remove = _ref3.remove;
|
|
446
|
+
var errors = _ref4.errors;
|
|
447
|
+
return _react["default"].createElement(_react["default"].Fragment, null, fields.map(function (field, index) {
|
|
448
|
+
return _react["default"].createElement(_index["default"].Item, Object.assign({}, index === 0 ? formItemLayout : formItemLayoutWithOutLabel, {
|
|
449
|
+
label: index === 0 ? 'Passengers' : '',
|
|
450
|
+
required: false,
|
|
451
|
+
key: field.key
|
|
452
|
+
}), _react["default"].createElement(_index["default"].Item, Object.assign({}, field, {
|
|
453
|
+
validateTrigger: ['onChange', 'onBlur'],
|
|
454
|
+
rules: [{
|
|
455
|
+
required: true,
|
|
456
|
+
whitespace: true,
|
|
457
|
+
message: "Please input passenger's name or delete this field."
|
|
458
|
+
}],
|
|
459
|
+
noStyle: true
|
|
460
|
+
}), _react["default"].createElement(_index2.Input, {
|
|
461
|
+
placeholder: "passenger name",
|
|
462
|
+
style: {
|
|
463
|
+
width: '60%'
|
|
464
|
+
}
|
|
465
|
+
})), fields.length > 1 ? _react["default"].createElement(_index2.Icon, {
|
|
466
|
+
type: "minus-circle",
|
|
467
|
+
className: "dynamic-delete-button",
|
|
468
|
+
onClick: function onClick() {
|
|
469
|
+
return remove(field.name);
|
|
470
|
+
}
|
|
471
|
+
}) : null);
|
|
472
|
+
}), _react["default"].createElement(_index["default"].Item, null, _react["default"].createElement(_index2.Button, {
|
|
473
|
+
type: "dashed",
|
|
474
|
+
onClick: function onClick() {
|
|
475
|
+
return add();
|
|
476
|
+
},
|
|
477
|
+
style: {
|
|
478
|
+
width: '60%'
|
|
479
|
+
},
|
|
480
|
+
icon: "plus-circle"
|
|
481
|
+
}, "Add field"), _react["default"].createElement(_index2.Button, {
|
|
482
|
+
type: "dashed",
|
|
483
|
+
onClick: function onClick() {
|
|
484
|
+
add('The head item', 0);
|
|
485
|
+
},
|
|
486
|
+
style: {
|
|
487
|
+
width: '60%',
|
|
488
|
+
marginTop: '20px'
|
|
489
|
+
},
|
|
490
|
+
icon: "plus-circle"
|
|
491
|
+
}, "Add field at head"), _react["default"].createElement(_index["default"].ErrorList, {
|
|
492
|
+
errors: errors
|
|
493
|
+
})));
|
|
494
|
+
}), _react["default"].createElement(_index["default"].Item, null, _react["default"].createElement(_index2.Button, {
|
|
495
|
+
type: "primary",
|
|
496
|
+
htmlType: "submit"
|
|
497
|
+
}, "Submit")));
|
|
263
498
|
};
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
499
|
+
var DynamicAddRemoveFields = DynamicAddRemoveFieldsTpl.bind({});
|
|
500
|
+
exports.DynamicAddRemoveFields = DynamicAddRemoveFields;
|
|
501
|
+
var areas = [{
|
|
502
|
+
label: 'Beijing',
|
|
503
|
+
value: 'Beijing'
|
|
504
|
+
}, {
|
|
505
|
+
label: 'Shanghai',
|
|
506
|
+
value: 'Shanghai'
|
|
507
|
+
}];
|
|
508
|
+
var sights = {
|
|
509
|
+
Beijing: ['Tiananmen', 'Great Wall'],
|
|
510
|
+
Shanghai: ['Oriental Pearl', 'The Bund']
|
|
272
511
|
};
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
512
|
+
var DynamicItemsComplexTpl = function DynamicItemsComplexTpl() {
|
|
513
|
+
var _Form$useForm9 = _index["default"].useForm(),
|
|
514
|
+
_Form$useForm10 = _slicedToArray(_Form$useForm9, 1),
|
|
515
|
+
form = _Form$useForm10[0];
|
|
516
|
+
var onFinish = function onFinish(values) {
|
|
517
|
+
console.log('Received values of form:', values);
|
|
518
|
+
};
|
|
519
|
+
var handleChange = function handleChange() {
|
|
520
|
+
form.setFieldsValue({
|
|
521
|
+
sights: []
|
|
522
|
+
});
|
|
523
|
+
};
|
|
524
|
+
return _react["default"].createElement(_index["default"], {
|
|
525
|
+
form: form,
|
|
526
|
+
name: "dynamic_form_complex",
|
|
527
|
+
onFinish: onFinish,
|
|
528
|
+
autoComplete: "off"
|
|
529
|
+
}, _react["default"].createElement(_index["default"].Item, {
|
|
530
|
+
name: "area",
|
|
531
|
+
label: "Area",
|
|
532
|
+
rules: [{
|
|
533
|
+
required: true,
|
|
534
|
+
message: 'Missing area'
|
|
535
|
+
}]
|
|
536
|
+
}, _react["default"].createElement(_index2.Select, {
|
|
537
|
+
onChange: handleChange
|
|
538
|
+
}, areas.map(function (_ref5) {
|
|
539
|
+
var label = _ref5.label,
|
|
540
|
+
value = _ref5.value;
|
|
541
|
+
return _react["default"].createElement(_index2.Select.Option, {
|
|
542
|
+
key: value,
|
|
543
|
+
value: value
|
|
544
|
+
}, label);
|
|
545
|
+
}))), _react["default"].createElement(_index["default"].List, {
|
|
546
|
+
name: "sights"
|
|
547
|
+
}, function (fields, _ref6) {
|
|
548
|
+
var add = _ref6.add,
|
|
549
|
+
remove = _ref6.remove;
|
|
550
|
+
return _react["default"].createElement(_react["default"].Fragment, null, fields.map(function (field) {
|
|
551
|
+
return _react["default"].createElement(_index2.Row, {
|
|
552
|
+
key: field.key,
|
|
553
|
+
style: {
|
|
554
|
+
display: 'flex'
|
|
555
|
+
}
|
|
556
|
+
}, _react["default"].createElement(_index["default"].Item, {
|
|
557
|
+
noStyle: true,
|
|
558
|
+
shouldUpdate: function shouldUpdate(prevValues, curValues) {
|
|
559
|
+
return prevValues.area !== curValues.area || prevValues.sights !== curValues.sights;
|
|
560
|
+
}
|
|
561
|
+
}, function () {
|
|
562
|
+
return _react["default"].createElement(_index["default"].Item, Object.assign({}, field, {
|
|
563
|
+
label: "Sight",
|
|
564
|
+
name: [field.name, 'sight'],
|
|
565
|
+
rules: [{
|
|
566
|
+
required: true,
|
|
567
|
+
message: 'Missing sight'
|
|
568
|
+
}]
|
|
569
|
+
}), _react["default"].createElement(_index2.Select, {
|
|
570
|
+
disabled: !form.getFieldValue('area'),
|
|
571
|
+
style: {
|
|
572
|
+
width: 130
|
|
573
|
+
}
|
|
574
|
+
}, (sights[form.getFieldValue('area')] || []).map(function (item) {
|
|
575
|
+
return _react["default"].createElement(Option, {
|
|
576
|
+
key: item,
|
|
577
|
+
value: item
|
|
578
|
+
}, item);
|
|
579
|
+
})));
|
|
580
|
+
}), _react["default"].createElement(_index["default"].Item, Object.assign({}, field, {
|
|
581
|
+
label: "Price",
|
|
582
|
+
name: [field.name, 'price'],
|
|
583
|
+
rules: [{
|
|
584
|
+
required: true,
|
|
585
|
+
message: 'Missing price'
|
|
586
|
+
}]
|
|
587
|
+
}), _react["default"].createElement(_index2.Input, null)), _react["default"].createElement(_index2.Icon, {
|
|
588
|
+
type: "minus-circle",
|
|
589
|
+
onClick: function onClick() {
|
|
590
|
+
return remove(field.name);
|
|
591
|
+
}
|
|
592
|
+
}));
|
|
593
|
+
}), _react["default"].createElement(_index["default"].Item, null, _react["default"].createElement(_index2.Button, {
|
|
594
|
+
type: "dashed",
|
|
595
|
+
onClick: function onClick() {
|
|
596
|
+
return add();
|
|
597
|
+
},
|
|
598
|
+
block: true,
|
|
599
|
+
icon: "plus-circle"
|
|
600
|
+
}, "Add sights")));
|
|
601
|
+
}), _react["default"].createElement(_index["default"].Item, null, _react["default"].createElement(_index2.Button, {
|
|
602
|
+
type: "primary",
|
|
603
|
+
htmlType: "submit"
|
|
604
|
+
}, "Submit")));
|
|
295
605
|
};
|
|
296
|
-
|
|
606
|
+
var DynamicItemsComplex = DynamicItemsComplexTpl.bind({});
|
|
297
607
|
// 弹窗中表单
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
608
|
+
exports.DynamicItemsComplex = DynamicItemsComplex;
|
|
609
|
+
var FormInModalTpl = function FormInModalTpl() {
|
|
610
|
+
var _useState3 = (0, _react.useState)({}),
|
|
611
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
612
|
+
data = _useState4[0],
|
|
613
|
+
setData = _useState4[1];
|
|
614
|
+
var _useState5 = (0, _react.useState)(true),
|
|
615
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
616
|
+
destroyOnClose = _useState6[0],
|
|
617
|
+
setDestroyOnClose = _useState6[1];
|
|
618
|
+
var _useState7 = (0, _react.useState)('modal'),
|
|
619
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
620
|
+
popupType = _useState8[0],
|
|
621
|
+
setPopupType = _useState8[1];
|
|
622
|
+
var PopupCom = {
|
|
623
|
+
modal: _index2.Modal,
|
|
624
|
+
drawer: _index2.Drawer
|
|
625
|
+
}[popupType];
|
|
626
|
+
var close = function close() {
|
|
627
|
+
return setData(null);
|
|
628
|
+
};
|
|
629
|
+
var _Form$useForm11 = _index["default"].useForm(),
|
|
630
|
+
_Form$useForm12 = _slicedToArray(_Form$useForm11, 1),
|
|
631
|
+
form = _Form$useForm12[0];
|
|
632
|
+
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_index2.Button, {
|
|
633
|
+
type: "primary",
|
|
634
|
+
onClick: function onClick() {
|
|
635
|
+
return setData({});
|
|
636
|
+
},
|
|
637
|
+
style: {
|
|
638
|
+
marginRight: 12
|
|
639
|
+
}
|
|
640
|
+
}, "\u65B0\u5EFA"), _react["default"].createElement(_index2.Button, {
|
|
641
|
+
type: "primary",
|
|
642
|
+
style: {
|
|
643
|
+
marginRight: 12,
|
|
644
|
+
marginBottom: 12
|
|
645
|
+
},
|
|
646
|
+
onClick: function onClick() {
|
|
647
|
+
return setData({
|
|
648
|
+
id: 1,
|
|
649
|
+
name: 'Hello',
|
|
650
|
+
desc: 'Hello World'
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
}, "\u7F16\u8F91"), _react["default"].createElement("br", null), _react["default"].createElement(_index2.Radio.Group, {
|
|
654
|
+
value: popupType,
|
|
655
|
+
onChange: function onChange(evt) {
|
|
656
|
+
return setPopupType(evt.target.value);
|
|
657
|
+
}
|
|
658
|
+
}, _react["default"].createElement(_index2.Radio.Button, {
|
|
659
|
+
value: "modal"
|
|
660
|
+
}, "\u5F39\u7A97"), _react["default"].createElement(_index2.Radio.Button, {
|
|
661
|
+
value: "drawer"
|
|
662
|
+
}, "\u62BD\u5C49")), _react["default"].createElement(_index2.Switch, {
|
|
663
|
+
onClick: function onClick() {
|
|
664
|
+
return setDestroyOnClose(!destroyOnClose);
|
|
665
|
+
},
|
|
666
|
+
checked: destroyOnClose,
|
|
667
|
+
checkedChildren: "\u5173\u95ED\u65F6\u9500\u6BC1\u5B50\u5143\u7D20",
|
|
668
|
+
unCheckedChildren: "\u5173\u95ED\u65F6\u4E0D\u9500\u6BC1\u5B50\u5143\u7D20"
|
|
669
|
+
}), _react["default"].createElement(PopupCom, {
|
|
670
|
+
title: "".concat((data === null || data === void 0 ? void 0 : data.id) ? '编辑' : '新建'),
|
|
671
|
+
visible: !!data,
|
|
672
|
+
width: "40%",
|
|
673
|
+
destroyOnClose: destroyOnClose,
|
|
674
|
+
onClose: close,
|
|
675
|
+
onCancel: close,
|
|
676
|
+
onOk: close
|
|
677
|
+
}, _react["default"].createElement(_index["default"], {
|
|
678
|
+
initialValues: data,
|
|
679
|
+
form: form
|
|
680
|
+
}, _react["default"].createElement(_index["default"].Item, {
|
|
681
|
+
name: "name",
|
|
682
|
+
label: "\u540D\u79F0"
|
|
683
|
+
}, _react["default"].createElement(_index2.Input, null)), _react["default"].createElement(_index["default"].Item, {
|
|
684
|
+
name: "desc",
|
|
685
|
+
label: "\u63CF\u8FF0"
|
|
686
|
+
}, _react["default"].createElement(_index2.Input.TextArea, null)))));
|
|
326
687
|
};
|
|
327
|
-
|
|
688
|
+
var FormInModal = FormInModalTpl.bind({});
|
|
328
689
|
// 表单禁用/只读
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
(
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
690
|
+
exports.FormInModal = FormInModal;
|
|
691
|
+
var RangePicker = _index2.DatePicker.RangePicker,
|
|
692
|
+
MonthPicker = _index2.DatePicker.MonthPicker,
|
|
693
|
+
WeekPicker = _index2.DatePicker.WeekPicker;
|
|
694
|
+
var TextArea = _index2.Input.TextArea;
|
|
695
|
+
var FormDisabledTpl = function FormDisabledTpl() {
|
|
696
|
+
var _useState9 = (0, _react.useState)(true),
|
|
697
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
698
|
+
componentDisabled = _useState10[0],
|
|
699
|
+
setComponentDisabled = _useState10[1];
|
|
700
|
+
var _useState11 = (0, _react.useState)(false),
|
|
701
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
702
|
+
componentReadonly = _useState12[0],
|
|
703
|
+
setComponentReadonly = _useState12[1];
|
|
704
|
+
var inputRef = (0, _react.useRef)(null);
|
|
705
|
+
var onFormLayoutChange = function onFormLayoutChange(_a) {
|
|
706
|
+
var disabled = _a.disabled,
|
|
707
|
+
values = __rest(_a, ["disabled"]);
|
|
708
|
+
console.log(values);
|
|
709
|
+
setComponentDisabled(disabled);
|
|
710
|
+
};
|
|
711
|
+
(0, _react.useEffect)(function () {
|
|
712
|
+
if (inputRef.current) {
|
|
713
|
+
inputRef.current.focus();
|
|
714
|
+
}
|
|
715
|
+
}, [componentDisabled, componentReadonly]);
|
|
716
|
+
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_index2.Checkbox, {
|
|
717
|
+
checked: componentDisabled,
|
|
718
|
+
onChange: function onChange(e) {
|
|
719
|
+
return setComponentDisabled(e.target.checked);
|
|
720
|
+
}
|
|
721
|
+
}, "Form disabled"), _react["default"].createElement(_index2.Checkbox, {
|
|
722
|
+
checked: componentReadonly,
|
|
723
|
+
onChange: function onChange(e) {
|
|
724
|
+
return setComponentReadonly(e.target.checked);
|
|
725
|
+
}
|
|
726
|
+
}, "Form readonly"), _react["default"].createElement(_index["default"], {
|
|
727
|
+
labelCol: {
|
|
728
|
+
span: 4
|
|
729
|
+
},
|
|
730
|
+
wrapperCol: {
|
|
731
|
+
span: 14
|
|
732
|
+
},
|
|
733
|
+
layout: "horizontal",
|
|
734
|
+
onValuesChange: onFormLayoutChange,
|
|
735
|
+
disabled: componentDisabled,
|
|
736
|
+
readonly: componentReadonly,
|
|
737
|
+
initialValues: {
|
|
738
|
+
disabled: true,
|
|
739
|
+
"switch": true,
|
|
740
|
+
input: 'Hello World',
|
|
741
|
+
select: 'demo',
|
|
742
|
+
select2: 'demo',
|
|
743
|
+
checkboxGroup: ['apple', 'pear'],
|
|
744
|
+
radioGroup: 'apple',
|
|
745
|
+
radioGroup2: 'apple',
|
|
746
|
+
treeSelect: 'bamboo',
|
|
747
|
+
cascader: ['zhejiang', 'hangzhou'],
|
|
748
|
+
datePicker: (0, _moment["default"])(new Date()),
|
|
749
|
+
datePicker2: (0, _moment["default"])(new Date()),
|
|
750
|
+
rangePicker: [(0, _moment["default"])(new Date()).subtract(7, 'days'), (0, _moment["default"])(new Date())],
|
|
751
|
+
monthPicker: (0, _moment["default"])(),
|
|
752
|
+
weekPicker: (0, _moment["default"])(),
|
|
753
|
+
timePicker: (0, _moment["default"])('13:30:56', 'HH:mm:ss'),
|
|
754
|
+
inputNumber: 88,
|
|
755
|
+
textArea: 'Hello Input.TextArea:)'
|
|
756
|
+
}
|
|
757
|
+
}, _react["default"].createElement(_index["default"].Item, {
|
|
758
|
+
label: "Chekbox",
|
|
759
|
+
name: "disabled",
|
|
760
|
+
valuePropName: "checked"
|
|
761
|
+
}, _react["default"].createElement(_index2.Checkbox, null, "Checkbox")), _react["default"].createElement(_index["default"].Item, {
|
|
762
|
+
label: "Radio",
|
|
763
|
+
name: "radioGroup"
|
|
764
|
+
}, _react["default"].createElement(_index2.Radio.Group, null, _react["default"].createElement(_index2.Radio, {
|
|
765
|
+
value: "apple"
|
|
766
|
+
}, " Apple "), _react["default"].createElement(_index2.Radio, {
|
|
767
|
+
value: "pear"
|
|
768
|
+
}, " Pear "))), _react["default"].createElement(_index["default"].Item, {
|
|
769
|
+
label: "Radio",
|
|
770
|
+
name: "radioGroup2"
|
|
771
|
+
}, _react["default"].createElement(_index2.Radio.Group, {
|
|
772
|
+
options: options
|
|
773
|
+
}, _react["default"].createElement(_index2.Radio, {
|
|
774
|
+
value: "apple"
|
|
775
|
+
}, " Apple "), _react["default"].createElement(_index2.Radio, {
|
|
776
|
+
value: "pear"
|
|
777
|
+
}, " Pear "))), _react["default"].createElement(_index["default"].Item, {
|
|
778
|
+
label: "Input",
|
|
779
|
+
name: "input"
|
|
780
|
+
}, _react["default"].createElement(_index2.Input, {
|
|
781
|
+
ref: inputRef
|
|
782
|
+
})), _react["default"].createElement(_index["default"].Item, {
|
|
783
|
+
label: "ChekboxGroup",
|
|
784
|
+
name: "checkboxGroup"
|
|
785
|
+
}, _react["default"].createElement(_index2.Checkbox.Group, {
|
|
786
|
+
options: options
|
|
787
|
+
})), _react["default"].createElement(_index["default"].Item, {
|
|
788
|
+
label: "Select",
|
|
789
|
+
name: "select"
|
|
790
|
+
}, _react["default"].createElement(_index2.Select, null, _react["default"].createElement(_index2.Select.Option, {
|
|
791
|
+
value: "demo"
|
|
792
|
+
}, "Demo"))), _react["default"].createElement(_index["default"].Item, {
|
|
793
|
+
label: "Select",
|
|
794
|
+
name: "select2"
|
|
795
|
+
}, _react["default"].createElement(_index2.Select, {
|
|
796
|
+
options: [{
|
|
797
|
+
label: 'Demo',
|
|
798
|
+
value: 'demo'
|
|
799
|
+
}]
|
|
800
|
+
}, _react["default"].createElement(_index2.Select.Option, {
|
|
801
|
+
value: "demo"
|
|
802
|
+
}, "Demo"))), _react["default"].createElement(_index["default"].Item, {
|
|
803
|
+
label: "TreeSelect",
|
|
804
|
+
name: "treeSelect"
|
|
805
|
+
}, _react["default"].createElement(_index2.TreeSelect, {
|
|
806
|
+
treeData: [{
|
|
807
|
+
title: 'Light',
|
|
808
|
+
value: 'light',
|
|
809
|
+
children: [{
|
|
810
|
+
title: 'Bamboo',
|
|
811
|
+
value: 'bamboo'
|
|
812
|
+
}]
|
|
813
|
+
}],
|
|
814
|
+
treeDefaultExpandAll: true
|
|
815
|
+
})), _react["default"].createElement(_index["default"].Item, {
|
|
816
|
+
label: "Cascader",
|
|
817
|
+
name: "cascader"
|
|
818
|
+
}, _react["default"].createElement(_index2.Cascader, {
|
|
819
|
+
options: [{
|
|
820
|
+
value: 'zhejiang',
|
|
821
|
+
label: 'Zhejiang',
|
|
822
|
+
children: [{
|
|
823
|
+
value: 'hangzhou',
|
|
824
|
+
label: 'Hangzhou'
|
|
825
|
+
}]
|
|
826
|
+
}]
|
|
827
|
+
})), _react["default"].createElement(_index["default"].Item, {
|
|
828
|
+
label: "DatePicker",
|
|
829
|
+
name: "datePicker"
|
|
830
|
+
}, _react["default"].createElement(_index2.DatePicker, null)), _react["default"].createElement(_index["default"].Item, {
|
|
831
|
+
label: "DatePicker2",
|
|
832
|
+
name: "datePicker2"
|
|
833
|
+
}, _react["default"].createElement(_index2.DatePicker, {
|
|
834
|
+
showTime: true
|
|
835
|
+
})), _react["default"].createElement(_index["default"].Item, {
|
|
836
|
+
label: "RangePicker",
|
|
837
|
+
name: "rangePicker"
|
|
838
|
+
}, _react["default"].createElement(RangePicker, null)), _react["default"].createElement(_index["default"].Item, {
|
|
839
|
+
label: "MonthPicker",
|
|
840
|
+
name: "monthPicker"
|
|
841
|
+
}, _react["default"].createElement(MonthPicker, null)), _react["default"].createElement(_index["default"].Item, {
|
|
842
|
+
label: "WeekPicker",
|
|
843
|
+
name: "weekPicker"
|
|
844
|
+
}, _react["default"].createElement(WeekPicker, null)), _react["default"].createElement(_index["default"].Item, {
|
|
845
|
+
label: "TimePicker",
|
|
846
|
+
name: "timePicker"
|
|
847
|
+
}, _react["default"].createElement(_index2.TimePicker, null)), _react["default"].createElement(_index["default"].Item, {
|
|
848
|
+
label: "InputNumber",
|
|
849
|
+
name: "inputNumber"
|
|
850
|
+
}, _react["default"].createElement(_index2.InputNumber, null)), _react["default"].createElement(_index["default"].Item, {
|
|
851
|
+
label: "TextArea",
|
|
852
|
+
name: "textArea"
|
|
853
|
+
}, _react["default"].createElement(TextArea, {
|
|
854
|
+
rows: 4
|
|
855
|
+
})), _react["default"].createElement(_index["default"].Item, {
|
|
856
|
+
label: "Switch",
|
|
857
|
+
name: "switch",
|
|
858
|
+
valuePropName: "checked"
|
|
859
|
+
}, _react["default"].createElement(_index2.Switch, null)), _react["default"].createElement(_index["default"].Item, {
|
|
860
|
+
label: "Upload",
|
|
861
|
+
name: "upload"
|
|
862
|
+
}, _react["default"].createElement(_index2.Upload, {
|
|
863
|
+
listType: "picture-card",
|
|
864
|
+
beforeUpload: function beforeUpload() {
|
|
865
|
+
return false;
|
|
866
|
+
}
|
|
867
|
+
}, _react["default"].createElement("div", null, _react["default"].createElement(_index2.Icon, {
|
|
868
|
+
type: "plus"
|
|
869
|
+
}), _react["default"].createElement("div", {
|
|
870
|
+
style: {
|
|
871
|
+
marginTop: 8
|
|
872
|
+
}
|
|
873
|
+
}, "Upload")))), _react["default"].createElement(_index["default"].Item, {
|
|
874
|
+
label: "Button"
|
|
875
|
+
}, _react["default"].createElement(_index2.Button, null, "Button"))));
|
|
430
876
|
};
|
|
431
|
-
|
|
877
|
+
var FormDisabledReadonly = FormDisabledTpl.bind({});
|
|
432
878
|
// 嵌套结构与校验信息
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
879
|
+
exports.FormDisabledReadonly = FormDisabledReadonly;
|
|
880
|
+
var NestValidatorFormTpl = function NestValidatorFormTpl() {
|
|
881
|
+
var layout = {
|
|
882
|
+
labelCol: {
|
|
883
|
+
span: 2
|
|
884
|
+
},
|
|
885
|
+
wrapperCol: {
|
|
886
|
+
span: 12
|
|
887
|
+
}
|
|
888
|
+
};
|
|
889
|
+
/* eslint-disable no-template-curly-in-string */
|
|
890
|
+
var validateMessages = {
|
|
891
|
+
required: '${label} is required!',
|
|
892
|
+
types: {
|
|
893
|
+
email: '${label} is not a valid email!',
|
|
894
|
+
number: '${label} is not a valid number!'
|
|
895
|
+
},
|
|
896
|
+
number: {
|
|
897
|
+
range: '${label} must be between ${min} and ${max}'
|
|
898
|
+
}
|
|
899
|
+
};
|
|
900
|
+
var onFinish = function onFinish(values) {
|
|
901
|
+
console.log(values);
|
|
902
|
+
};
|
|
903
|
+
return _react["default"].createElement(_index["default"], Object.assign({}, layout, {
|
|
904
|
+
name: "nest-messages",
|
|
905
|
+
onFinish: onFinish,
|
|
906
|
+
validateMessages: validateMessages
|
|
907
|
+
}), _react["default"].createElement(_index["default"].Item, {
|
|
908
|
+
name: ['user', 'name'],
|
|
909
|
+
label: "Name",
|
|
910
|
+
rules: [{
|
|
911
|
+
required: true
|
|
912
|
+
}]
|
|
913
|
+
}, _react["default"].createElement(_index2.Input, null)), _react["default"].createElement(_index["default"].Item, {
|
|
914
|
+
name: ['user', 'email'],
|
|
915
|
+
label: "Email",
|
|
916
|
+
rules: [{
|
|
917
|
+
type: 'email'
|
|
918
|
+
}]
|
|
919
|
+
}, _react["default"].createElement(_index2.Input, null)), _react["default"].createElement(_index["default"].Item, {
|
|
920
|
+
name: ['user', 'age'],
|
|
921
|
+
label: "Age",
|
|
922
|
+
rules: [{
|
|
923
|
+
type: 'number',
|
|
924
|
+
min: 0,
|
|
925
|
+
max: 99
|
|
926
|
+
}]
|
|
927
|
+
}, _react["default"].createElement(_index2.InputNumber, null)), _react["default"].createElement(_index["default"].Item, {
|
|
928
|
+
name: ['user', 'website'],
|
|
929
|
+
label: "Website"
|
|
930
|
+
}, _react["default"].createElement(_index2.Input, null)), _react["default"].createElement(_index["default"].Item, {
|
|
931
|
+
name: ['user', 'introduction'],
|
|
932
|
+
label: "Introduction"
|
|
933
|
+
}, _react["default"].createElement(_index2.Input.TextArea, null)), _react["default"].createElement(_index["default"].Item, {
|
|
934
|
+
wrapperCol: Object.assign(Object.assign({}, layout.wrapperCol), {
|
|
935
|
+
offset: 8
|
|
936
|
+
})
|
|
937
|
+
}, _react["default"].createElement(_index2.Button, {
|
|
938
|
+
type: "primary",
|
|
939
|
+
htmlType: "submit"
|
|
940
|
+
}, "Submit")));
|
|
465
941
|
};
|
|
466
|
-
|
|
467
|
-
|
|
942
|
+
var NestValidatorForm = NestValidatorFormTpl.bind({});
|
|
943
|
+
exports.NestValidatorForm = NestValidatorForm;
|