tntd 2.8.39 → 2.8.40
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 +1 -1
- package/es/_util/defaultRenderEmpty.js +1 -1
- package/es/_util/hooks/useFlexGapSupport.js +4 -4
- package/es/_util/hooks/useForceUpdate.js +4 -4
- package/es/_util/hooks/useScrollLock.js +4 -4
- package/es/_util/responsiveObserve.js +1 -1
- package/es/_util/styleChecker.js +1 -1
- package/es/actions/index.js +1 -1
- package/es/array-input/index.js +26 -13
- package/es/array-input/index.js.map +1 -1
- package/es/array-input/index.less +123 -1
- package/es/array-input/utils.js +71 -0
- package/es/array-input/utils.js.map +1 -0
- package/es/check-card/group.js +8 -8
- package/es/check-card/index.js +6 -6
- package/es/checkbox/checkbox-group.js +1 -1
- package/es/color-picker/ColorPicker.js +6 -6
- package/es/color-picker/index.js +1 -1
- package/es/columns/index.js +1 -1
- package/es/config-provider/config-provider.js +1 -1
- package/es/descriptions/descriptions.js +5 -5
- package/es/development-login/LoginModal.js +6 -6
- package/es/development-login/index.js +4 -4
- package/es/drawer/drawer.js +2 -2
- package/es/ellipsis/Svg/CopySVG.js +1 -1
- package/es/ellipsis/Svg/TickSVG.js +1 -1
- package/es/ellipsis/index.js +5 -5
- package/es/empty/empty.js +2 -2
- package/es/empty/empty.stories.js +2 -2
- package/es/exception/exception.js +1 -1
- package/es/form/form.js +2 -2
- package/es/grid-v4/col.js +2 -2
- package/es/grid-v4/hooks/useBreakpoint.js +1 -1
- package/es/grid-v4/index.js +1 -1
- package/es/grid-v4/row.js +6 -6
- package/es/handle/index.js +1 -1
- package/es/handle-icon/index.js +11 -11
- package/es/icon/IconFont.js +1 -1
- package/es/icon/components/Icon.js +9 -9
- package/es/icon/components/index.js +1 -1
- package/es/icon/components/utils.js +3 -3
- package/es/icon/index.js +7 -7
- package/es/icon/twoTonePrimaryColor.js +1 -1
- package/es/icon/utils.js +1 -1
- package/es/img/Contain.js +1 -1
- package/es/img/Cover.js +5 -5
- package/es/img/index.js +5 -5
- package/es/index.js +1 -1
- package/es/input/input.js +2 -2
- package/es/input-number/index.js +1 -1
- package/es/label/index.js +2 -2
- package/es/loading-button/index.js +5 -5
- package/es/locale/default.js +1 -1
- package/es/locale/en_US.js +1 -1
- package/es/locale/zh_CN.js +1 -1
- package/es/modal/modal.js +1 -1
- package/es/notification/assets/index.js +1 -1
- package/es/notification/index.js +1 -1
- package/es/notification/notification.js +1 -1
- package/es/page/Box.js +1 -1
- package/es/page/index.js +7 -7
- package/es/page-container/index.js +1 -1
- package/es/page-loading/index.js +1 -1
- package/es/preview-text/index.js +7 -7
- package/es/query-form/Field/Checkbox.js +1 -1
- package/es/query-form/Field/Select.js +6 -6
- package/es/query-form/Field/SelectInput.js +6 -6
- package/es/query-form/Field/fieldsMap.js +1 -1
- package/es/query-form/Field/index.js +10 -10
- package/es/query-form/createActions.js +1 -1
- package/es/query-form/index.js +10 -10
- package/es/query-form/useForm.js +1 -1
- package/es/query-list-scene/List.js +13 -13
- package/es/query-list-scene/QueryForm.js +10 -10
- package/es/query-list-scene/QueryListScene.js +10 -10
- package/es/query-list-scene/Title.js +1 -1
- package/es/query-list-scene/Toolbar.js +2 -2
- package/es/query-list-scene/createActions.js +1 -1
- package/es/query-list-scene/index.js +1 -1
- package/es/query-list-scene/useActions.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/radio/radio-group.js +1 -1
- package/es/render-empty/render-empty.js +1 -1
- package/es/segmented/index.js +2 -2
- package/es/select/select.js +2 -2
- package/es/steps/steps.js +2 -2
- package/es/svg-components/index.js +1 -1
- package/es/switch/switch.js +1 -1
- package/es/table/hooks/use-column-setting.js +4 -4
- package/es/table/hooks/use-expand-fixed.js +6 -6
- package/es/table/resizableTable/index.js +6 -6
- package/es/table/table-hoc.js +1 -1
- package/es/table/table.js +9 -9
- package/es/table/table.stories.js +2 -2
- package/es/table/total-shower.js +1 -1
- package/es/table/utils.js +1 -1
- package/es/table-container/index.js +1 -1
- package/es/tabs-container/index.js +1 -1
- package/es/tag/tag.js +2 -2
- package/es/title/index.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/context.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
- package/es/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
- package/es/tntd-cascader/AntdCascader/config/utils.js +2 -2
- package/es/tntd-cascader/AntdCascader/index.js +7 -7
- package/es/tntd-cascader/index.js +1 -1
- package/es/tntd-cascader/rc-cascader/Cascader.js +8 -8
- package/es/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js +7 -7
- package/es/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
- package/es/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
- package/es/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
- package/es/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
- package/es/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
- package/es/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
- package/es/tntd-cascader/rc-cascader/index.js +1 -1
- package/es/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
- package/es/tntd-form/ErrorList.js +7 -7
- package/es/tntd-form/Form.js +6 -6
- package/es/tntd-form/FormItem/ItemHolder.js +6 -6
- package/es/tntd-form/FormItem/index.js +8 -8
- package/es/tntd-form/FormItemInput.js +1 -1
- package/es/tntd-form/FormItemLabel.js +2 -2
- package/es/tntd-form/FormList.js +1 -1
- package/es/tntd-form/context.js +1 -1
- package/es/tntd-form/hooks/useDebounce.js +4 -4
- package/es/tntd-form/hooks/useForm.js +5 -5
- package/es/tntd-form/hooks/useFormItemStatus.js +1 -1
- package/es/tntd-form/hooks/useFrameState.js +5 -5
- package/es/tntd-form/index.js +1 -1
- package/es/tntd-icon/index.js +1 -1
- package/es/tntd-layout/AppList.js +6 -6
- package/es/tntd-layout/Application.js +6 -6
- package/es/tntd-layout/Avatar.js +2 -2
- package/es/tntd-layout/CompatibleLanguage.js +6 -6
- package/es/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
- package/es/tntd-layout/EnterpriseLayout/Language.js +6 -6
- package/es/tntd-layout/EnterpriseLayout/Theme.js +6 -6
- package/es/tntd-layout/EnterpriseLayout/index.js +1 -1
- package/es/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
- package/es/tntd-layout/GlobalNavigation/index.js +9 -9
- package/es/tntd-layout/Header.js +2 -2
- package/es/tntd-layout/HeaderActions.js +2 -2
- package/es/tntd-layout/HeaderNavs.js +6 -6
- package/es/tntd-layout/HeaderTabs.js +7 -7
- package/es/tntd-layout/Iconfont.js +1 -1
- package/es/tntd-layout/Language.js +6 -6
- package/es/tntd-layout/Layout.js +6 -6
- package/es/tntd-layout/Logo.js +2 -2
- package/es/tntd-layout/OrgAppList.js +6 -6
- package/es/tntd-layout/SideMenu.js +6 -6
- package/es/tntd-layout/Theme.js +6 -6
- package/es/tntd-layout/createActions.js +1 -1
- package/es/tntd-layout/images/index.js +1 -1
- package/es/tntd-layout/index.js +1 -1
- package/es/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
- package/es/tntd-layout/paaslayout/Header.js +2 -2
- package/es/tntd-layout/paaslayout/Logo.js +2 -2
- package/es/tntd-layout/paaslayout/SideMenu.js +6 -6
- package/es/tntd-layout/paaslayout/index.js +6 -6
- package/es/tntd-layout/storage.js +1 -1
- package/es/tntd-modal/index.js +6 -6
- package/es/tntd-rc-select/_util/PurePanel.js +5 -5
- package/es/tntd-rc-select/_util/context.js +1 -1
- package/es/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
- package/es/tntd-rc-select/_util/getIcons.js +1 -1
- package/es/tntd-rc-select/_util/useCompactItemContext.js +2 -2
- package/es/tntd-rc-select/index.js +2 -2
- package/es/tntd-reference/AHref/index.js +1 -1
- package/es/tntd-reference/ReferenceBatchCheck/index.js +1 -1
- package/es/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
- package/es/tntd-reference/ReferenceCheck/index.js +1 -1
- package/es/tntd-reference/ReferenceDrawer/index.js +5 -5
- package/es/tntd-reference/ReferenceInfo/index.js +1 -1
- package/es/tntd-reference/index.js +1 -1
- package/es/tntd-second-page/index.js +1 -1
- package/es/tntd-select/DropDownWrap.js +8 -8
- package/es/tntd-select/index.js +9 -10
- package/es/tntd-virtual-tree/index.js +8 -8
- package/es/tntd-virtual-tree/utils.js +28 -28
- package/es/tntd-virtual-tree-select/index.js +10 -10
- package/es/tntd-virtual-tree-select/utils.js +9 -9
- package/es/tooltip/tooltip.js +1 -1
- package/es/upload/index.js +6 -6
- package/es/upload/svg/UploadSVG.js +1 -1
- package/es/utils/checkAuth.js +4 -4
- package/es/utils/index.js +9 -9
- package/es/utils/lang.js +1 -1
- package/es/water-mark/index.js +5 -5
- package/lib/_util/context.js +3 -3
- package/lib/_util/defaultRenderEmpty.js +3 -3
- package/lib/_util/hooks/useFlexGapSupport.js +15 -14
- package/lib/_util/hooks/useForceUpdate.js +15 -14
- package/lib/_util/hooks/useScrollLock.js +15 -14
- package/lib/_util/responsiveObserve.js +13 -7
- package/lib/_util/styleChecker.js +3 -3
- package/lib/actions/index.js +3 -3
- package/lib/array-input/index.d.ts.map +1 -1
- package/lib/array-input/index.js +54 -34
- package/lib/array-input/index.js.map +1 -1
- package/lib/array-input/index.less +123 -1
- package/lib/array-input/utils.d.ts +2 -0
- package/lib/array-input/utils.d.ts.map +1 -0
- package/lib/array-input/utils.js +414 -0
- package/lib/array-input/utils.js.map +1 -0
- package/lib/check-card/group.js +24 -23
- package/lib/check-card/index.js +31 -24
- package/lib/checkbox/checkbox-group.js +3 -3
- package/lib/color-picker/ColorPicker.js +31 -24
- package/lib/color-picker/index.js +3 -3
- package/lib/columns/index.js +3 -3
- package/lib/config-provider/config-provider.js +3 -3
- package/lib/descriptions/descriptions.js +19 -13
- package/lib/development-login/LoginModal.js +31 -24
- package/lib/development-login/index.js +15 -14
- package/lib/drawer/drawer.js +16 -10
- package/lib/ellipsis/Svg/CopySVG.js +3 -3
- package/lib/ellipsis/Svg/TickSVG.js +3 -3
- package/lib/ellipsis/index.js +18 -17
- package/lib/empty/empty.js +16 -10
- package/lib/empty/empty.stories.js +9 -6
- package/lib/exception/exception.js +3 -3
- package/lib/form/form.js +16 -10
- package/lib/grid-v4/col.js +16 -10
- package/lib/grid-v4/hooks/useBreakpoint.js +3 -3
- package/lib/grid-v4/index.js +3 -3
- package/lib/grid-v4/row.js +31 -24
- package/lib/handle/index.js +3 -3
- package/lib/handle-icon/index.js +13 -13
- package/lib/icon/IconFont.js +3 -3
- package/lib/icon/components/Icon.js +70 -44
- package/lib/icon/components/index.js +3 -3
- package/lib/icon/components/utils.js +18 -10
- package/lib/icon/index.js +33 -26
- package/lib/icon/twoTonePrimaryColor.js +3 -3
- package/lib/icon/utils.js +3 -3
- package/lib/img/Contain.js +3 -3
- package/lib/img/Cover.js +18 -17
- package/lib/img/index.js +18 -17
- package/lib/index.js +3 -3
- package/lib/input/input.js +16 -10
- package/lib/input-number/index.js +3 -3
- package/lib/label/index.js +16 -10
- package/lib/loading-button/index.js +18 -17
- package/lib/locale/default.js +3 -3
- package/lib/locale/en_US.js +3 -3
- package/lib/locale/zh_CN.js +3 -3
- package/lib/modal/modal.js +3 -3
- package/lib/notification/assets/index.js +3 -3
- package/lib/notification/index.js +3 -3
- package/lib/notification/notification.js +3 -3
- package/lib/page/Box.js +3 -3
- package/lib/page/index.js +33 -26
- package/lib/page-container/index.js +3 -3
- package/lib/page-loading/index.js +3 -3
- package/lib/preview-text/index.js +9 -9
- package/lib/query-form/Field/Checkbox.js +3 -3
- package/lib/query-form/Field/Select.js +31 -24
- package/lib/query-form/Field/SelectInput.js +31 -24
- package/lib/query-form/Field/fieldsMap.js +3 -3
- package/lib/query-form/Field/index.js +73 -47
- package/lib/query-form/createActions.js +3 -3
- package/lib/query-form/index.js +70 -44
- package/lib/query-form/useForm.js +3 -3
- package/lib/query-list-scene/List.js +61 -41
- package/lib/query-list-scene/QueryForm.js +70 -44
- package/lib/query-list-scene/QueryListScene.js +70 -44
- package/lib/query-list-scene/Title.js +3 -3
- package/lib/query-list-scene/Toolbar.js +16 -10
- package/lib/query-list-scene/createActions.js +3 -3
- package/lib/query-list-scene/index.js +3 -3
- package/lib/query-list-scene/useActions.js +3 -3
- package/lib/radio/index.js +3 -3
- package/lib/radio/radio-group.js +3 -3
- package/lib/render-empty/render-empty.js +3 -3
- package/lib/segmented/index.js +16 -10
- package/lib/select/select.js +16 -10
- package/lib/steps/steps.js +16 -10
- package/lib/svg-components/index.js +3 -3
- package/lib/switch/switch.js +3 -3
- package/lib/table/hooks/use-column-setting.js +15 -14
- package/lib/table/hooks/use-expand-fixed.js +36 -30
- package/lib/table/resizableTable/index.js +31 -24
- package/lib/table/table-hoc.js +3 -3
- package/lib/table/table.js +34 -27
- package/lib/table/table.stories.js +16 -10
- package/lib/table/total-shower.js +3 -3
- package/lib/table/utils.js +3 -3
- package/lib/table-container/index.js +3 -3
- package/lib/tabs-container/index.js +3 -3
- package/lib/tag/tag.js +16 -10
- package/lib/title/index.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/context.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +3 -3
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +16 -10
- package/lib/tntd-cascader/AntdCascader/config/utils.js +16 -10
- package/lib/tntd-cascader/AntdCascader/index.js +33 -26
- package/lib/tntd-cascader/index.js +3 -3
- package/lib/tntd-cascader/rc-cascader/Cascader.js +24 -23
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +16 -10
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +33 -26
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +37 -30
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +18 -17
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +24 -23
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +17 -16
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +3 -3
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +30 -23
- package/lib/tntd-cascader/rc-cascader/index.js +3 -3
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +6 -6
- package/lib/tntd-form/ErrorList.js +33 -26
- package/lib/tntd-form/Form.js +31 -24
- package/lib/tntd-form/FormItem/ItemHolder.js +31 -24
- package/lib/tntd-form/FormItem/index.js +24 -23
- package/lib/tntd-form/FormItemInput.js +3 -3
- package/lib/tntd-form/FormItemLabel.js +16 -10
- package/lib/tntd-form/FormList.js +3 -3
- package/lib/tntd-form/context.js +3 -3
- package/lib/tntd-form/hooks/useDebounce.js +15 -14
- package/lib/tntd-form/hooks/useForm.js +18 -17
- package/lib/tntd-form/hooks/useFormItemStatus.js +3 -3
- package/lib/tntd-form/hooks/useFrameState.js +18 -17
- package/lib/tntd-form/index.js +3 -3
- package/lib/tntd-icon/index.js +3 -3
- package/lib/tntd-layout/AppList.js +24 -20
- package/lib/tntd-layout/Application.js +24 -20
- package/lib/tntd-layout/Avatar.js +9 -6
- package/lib/tntd-layout/CompatibleLanguage.js +24 -20
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +9 -6
- package/lib/tntd-layout/EnterpriseLayout/Language.js +24 -20
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +24 -20
- package/lib/tntd-layout/EnterpriseLayout/index.js +3 -3
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +24 -20
- package/lib/tntd-layout/GlobalNavigation/index.js +30 -26
- package/lib/tntd-layout/Header.js +9 -6
- package/lib/tntd-layout/HeaderActions.js +9 -6
- package/lib/tntd-layout/HeaderNavs.js +24 -20
- package/lib/tntd-layout/HeaderTabs.js +37 -27
- package/lib/tntd-layout/Iconfont.js +3 -3
- package/lib/tntd-layout/Language.js +24 -20
- package/lib/tntd-layout/Layout.js +24 -20
- package/lib/tntd-layout/Logo.js +9 -6
- package/lib/tntd-layout/OrgAppList.js +24 -20
- package/lib/tntd-layout/SideMenu.js +24 -20
- package/lib/tntd-layout/Theme.js +24 -20
- package/lib/tntd-layout/createActions.js +3 -3
- package/lib/tntd-layout/images/index.js +3 -3
- package/lib/tntd-layout/index.js +3 -3
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +24 -20
- package/lib/tntd-layout/paaslayout/Header.js +9 -6
- package/lib/tntd-layout/paaslayout/Logo.js +9 -6
- package/lib/tntd-layout/paaslayout/SideMenu.js +24 -20
- package/lib/tntd-layout/paaslayout/index.js +24 -20
- package/lib/tntd-layout/storage.js +3 -3
- package/lib/tntd-modal/index.js +31 -24
- package/lib/tntd-rc-select/_util/PurePanel.js +18 -17
- package/lib/tntd-rc-select/_util/context.js +3 -3
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +3 -3
- package/lib/tntd-rc-select/_util/getIcons.js +3 -3
- package/lib/tntd-rc-select/_util/useCompactItemContext.js +16 -10
- package/lib/tntd-rc-select/index.js +16 -10
- package/lib/tntd-reference/AHref/index.js +3 -3
- package/lib/tntd-reference/ReferenceBatchCheck/index.js +3 -3
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js +18 -17
- package/lib/tntd-reference/ReferenceCheck/index.js +3 -3
- package/lib/tntd-reference/ReferenceDrawer/index.js +18 -17
- package/lib/tntd-reference/ReferenceInfo/index.js +3 -3
- package/lib/tntd-reference/index.js +3 -3
- package/lib/tntd-second-page/index.js +3 -3
- package/lib/tntd-select/DropDownWrap.js +54 -34
- package/lib/tntd-select/index.js +57 -40
- package/lib/tntd-virtual-tree/index.js +24 -23
- package/lib/tntd-virtual-tree/utils.js +66 -62
- package/lib/tntd-virtual-tree-select/index.js +23 -22
- package/lib/tntd-virtual-tree-select/utils.js +21 -20
- package/lib/tooltip/tooltip.js +3 -3
- package/lib/upload/index.js +45 -41
- package/lib/upload/svg/UploadSVG.js +3 -3
- package/lib/utils/checkAuth.js +6 -6
- package/lib/utils/index.js +21 -20
- package/lib/utils/lang.js +3 -3
- package/lib/water-mark/index.js +18 -17
- package/package.json +2 -2
- package/es/alert/alert.js +0 -93
- package/es/alert/alert.js.map +0 -1
- package/es/anchor/anchor.js +0 -96
- package/es/anchor/anchor.js.map +0 -1
- package/es/array-input/icon.js +0 -32
- package/es/array-input/icon.js.map +0 -1
- package/es/cascader/cascader.js +0 -49
- package/es/cascader/cascader.js.map +0 -1
- package/es/checkbox/checkbox.js +0 -65
- package/es/checkbox/checkbox.js.map +0 -1
- package/es/date-picker/DatePicker.js +0 -128
- package/es/date-picker/DatePicker.js.map +0 -1
- package/es/input-number/inputNumber.js +0 -54
- package/es/input-number/inputNumber.js.map +0 -1
- package/es/page-loading/loading1.gif +0 -0
- package/es/popconfirm/popconfirm.js +0 -61
- package/es/popconfirm/popconfirm.js.map +0 -1
- package/es/popover/popover.js +0 -55
- package/es/popover/popover.js.map +0 -1
- package/es/progress/progress.js +0 -148
- package/es/progress/progress.js.map +0 -1
- package/es/query-form/Field/Composition/FieldPopover.js +0 -464
- package/es/query-form/Field/Composition/FieldPopover.js.map +0 -1
- package/es/query-form/Field/Composition/FieldPopover.less +0 -35
- package/es/query-form/Field/Composition/Select.js +0 -260
- package/es/query-form/Field/Composition/Select.js.map +0 -1
- package/es/query-form/Field/Composition/SelectInput.js +0 -112
- package/es/query-form/Field/Composition/SelectInput.js.map +0 -1
- package/es/query-form/Field/Composition/ValueTag.js +0 -240
- package/es/query-form/Field/Composition/ValueTag.js.map +0 -1
- package/es/query-form/Field/Composition/index.js +0 -448
- package/es/query-form/Field/Composition/index.js.map +0 -1
- package/es/query-form/Field/Composition/index.less +0 -145
- package/es/query-form/Field/Composition/utils.js +0 -173
- package/es/query-form/Field/Composition/utils.js.map +0 -1
- package/es/query-form-v2/index.less +0 -133
- package/es/radio/radio.js +0 -75
- package/es/radio/radio.js.map +0 -1
- package/es/scroll-bar/Bar.js +0 -169
- package/es/scroll-bar/Bar.js.map +0 -1
- package/es/scroll-bar/Context.js +0 -17
- package/es/scroll-bar/Context.js.map +0 -1
- package/es/scroll-bar/ScrollBar.js +0 -132
- package/es/scroll-bar/ScrollBar.js.map +0 -1
- package/es/scroll-bar/Thumb.js +0 -203
- package/es/scroll-bar/Thumb.js.map +0 -1
- package/es/scroll-bar/index.js +0 -14
- package/es/scroll-bar/index.js.map +0 -1
- package/es/scroll-bar/scrollBar.less +0 -59
- package/es/scroll-bar/util.js +0 -72
- package/es/scroll-bar/util.js.map +0 -1
- package/es/spin/spin.js +0 -44
- package/es/spin/spin.js.map +0 -1
- package/es/time-picker/TimePicker.js +0 -55
- package/es/time-picker/TimePicker.js.map +0 -1
- package/es/tntd-action/Action.js +0 -141
- package/es/tntd-action/Action.js.map +0 -1
- package/lib/alert/alert.d.ts +0 -12
- package/lib/alert/alert.d.ts.map +0 -1
- package/lib/alert/alert.js +0 -147
- package/lib/alert/alert.js.map +0 -1
- package/lib/anchor/anchor.d.ts +0 -15
- package/lib/anchor/anchor.d.ts.map +0 -1
- package/lib/anchor/anchor.js +0 -131
- package/lib/anchor/anchor.js.map +0 -1
- package/lib/array-input/icon.d.ts +0 -4
- package/lib/array-input/icon.d.ts.map +0 -1
- package/lib/array-input/icon.js +0 -36
- package/lib/array-input/icon.js.map +0 -1
- package/lib/cascader/cascader.d.ts +0 -10
- package/lib/cascader/cascader.d.ts.map +0 -1
- package/lib/cascader/cascader.js +0 -84
- package/lib/cascader/cascader.js.map +0 -1
- package/lib/checkbox/checkbox.d.ts +0 -16
- package/lib/checkbox/checkbox.d.ts.map +0 -1
- package/lib/checkbox/checkbox.js +0 -100
- package/lib/checkbox/checkbox.js.map +0 -1
- package/lib/date-picker/DatePicker.d.ts +0 -21
- package/lib/date-picker/DatePicker.d.ts.map +0 -1
- package/lib/date-picker/DatePicker.js +0 -163
- package/lib/date-picker/DatePicker.js.map +0 -1
- package/lib/input-number/inputNumber.d.ts +0 -10
- package/lib/input-number/inputNumber.d.ts.map +0 -1
- package/lib/input-number/inputNumber.js +0 -89
- package/lib/input-number/inputNumber.js.map +0 -1
- package/lib/page-loading/loading1.gif +0 -0
- package/lib/popconfirm/popconfirm.d.ts +0 -8
- package/lib/popconfirm/popconfirm.d.ts.map +0 -1
- package/lib/popconfirm/popconfirm.js +0 -96
- package/lib/popconfirm/popconfirm.js.map +0 -1
- package/lib/popover/popover.d.ts +0 -14
- package/lib/popover/popover.d.ts.map +0 -1
- package/lib/popover/popover.js +0 -90
- package/lib/popover/popover.js.map +0 -1
- package/lib/progress/progress.d.ts +0 -12
- package/lib/progress/progress.d.ts.map +0 -1
- package/lib/progress/progress.js +0 -179
- package/lib/progress/progress.js.map +0 -1
- package/lib/query-form/Field/Composition/FieldPopover.d.ts +0 -19
- package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/FieldPopover.js +0 -464
- package/lib/query-form/Field/Composition/FieldPopover.js.map +0 -1
- package/lib/query-form/Field/Composition/FieldPopover.less +0 -35
- package/lib/query-form/Field/Composition/Select.d.ts +0 -4
- package/lib/query-form/Field/Composition/Select.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/Select.js +0 -260
- package/lib/query-form/Field/Composition/Select.js.map +0 -1
- package/lib/query-form/Field/Composition/SelectInput.d.ts +0 -3
- package/lib/query-form/Field/Composition/SelectInput.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/SelectInput.js +0 -112
- package/lib/query-form/Field/Composition/SelectInput.js.map +0 -1
- package/lib/query-form/Field/Composition/ValueTag.d.ts +0 -13
- package/lib/query-form/Field/Composition/ValueTag.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/ValueTag.js +0 -240
- package/lib/query-form/Field/Composition/ValueTag.js.map +0 -1
- package/lib/query-form/Field/Composition/index.d.ts +0 -15
- package/lib/query-form/Field/Composition/index.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/index.js +0 -448
- package/lib/query-form/Field/Composition/index.js.map +0 -1
- package/lib/query-form/Field/Composition/index.less +0 -145
- package/lib/query-form/Field/Composition/utils.d.ts +0 -21
- package/lib/query-form/Field/Composition/utils.d.ts.map +0 -1
- package/lib/query-form/Field/Composition/utils.js +0 -173
- package/lib/query-form/Field/Composition/utils.js.map +0 -1
- package/lib/query-form-v2/index.less +0 -133
- package/lib/radio/radio.d.ts +0 -17
- package/lib/radio/radio.d.ts.map +0 -1
- package/lib/radio/radio.js +0 -110
- package/lib/radio/radio.js.map +0 -1
- package/lib/scroll-bar/Bar.d.ts +0 -4
- package/lib/scroll-bar/Bar.d.ts.map +0 -1
- package/lib/scroll-bar/Bar.js +0 -169
- package/lib/scroll-bar/Bar.js.map +0 -1
- package/lib/scroll-bar/Context.d.ts +0 -7
- package/lib/scroll-bar/Context.d.ts.map +0 -1
- package/lib/scroll-bar/Context.js +0 -17
- package/lib/scroll-bar/Context.js.map +0 -1
- package/lib/scroll-bar/ScrollBar.d.ts +0 -4
- package/lib/scroll-bar/ScrollBar.d.ts.map +0 -1
- package/lib/scroll-bar/ScrollBar.js +0 -132
- package/lib/scroll-bar/ScrollBar.js.map +0 -1
- package/lib/scroll-bar/Thumb.d.ts +0 -3
- package/lib/scroll-bar/Thumb.d.ts.map +0 -1
- package/lib/scroll-bar/Thumb.js +0 -203
- package/lib/scroll-bar/Thumb.js.map +0 -1
- package/lib/scroll-bar/index.d.ts +0 -3
- package/lib/scroll-bar/index.d.ts.map +0 -1
- package/lib/scroll-bar/index.js +0 -14
- package/lib/scroll-bar/index.js.map +0 -1
- package/lib/scroll-bar/scrollBar.less +0 -59
- package/lib/scroll-bar/util.d.ts +0 -40
- package/lib/scroll-bar/util.d.ts.map +0 -1
- package/lib/scroll-bar/util.js +0 -72
- package/lib/scroll-bar/util.js.map +0 -1
- package/lib/spin/spin.d.ts +0 -9
- package/lib/spin/spin.d.ts.map +0 -1
- package/lib/spin/spin.js +0 -79
- package/lib/spin/spin.js.map +0 -1
- package/lib/time-picker/TimePicker.d.ts +0 -9
- package/lib/time-picker/TimePicker.d.ts.map +0 -1
- package/lib/time-picker/TimePicker.js +0 -90
- package/lib/time-picker/TimePicker.js.map +0 -1
- package/lib/tntd-action/Action.d.ts +0 -6
- package/lib/tntd-action/Action.d.ts.map +0 -1
- package/lib/tntd-action/Action.js +0 -218
- package/lib/tntd-action/Action.js.map +0 -1
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export function highlightSubstring(str: any, substring: any): any;
|
|
2
|
-
export function getLabelByValue({ value, options, fieldNames, }: {
|
|
3
|
-
value: any;
|
|
4
|
-
options: any;
|
|
5
|
-
fieldNames?: {
|
|
6
|
-
label: string;
|
|
7
|
-
value: string;
|
|
8
|
-
} | undefined;
|
|
9
|
-
}): any;
|
|
10
|
-
export function formatLabel(reactDom: any): any;
|
|
11
|
-
export function parseObjectToArray(value: any, data: any): ({
|
|
12
|
-
key: string;
|
|
13
|
-
value: any;
|
|
14
|
-
} | null)[];
|
|
15
|
-
export function parseArrayToObject(value: any): any;
|
|
16
|
-
export function getLabel({ key, value }: {
|
|
17
|
-
key: any;
|
|
18
|
-
value: any;
|
|
19
|
-
}, data: any, locale: any): string | false | null;
|
|
20
|
-
export function isInput(type: any): boolean;
|
|
21
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/utils.js"],"names":[],"mappings":"AAIA,kEAGC;AAED;;;;;;;QAyBC;AAED,gDAWC;AAED;;;YAgBC;AAED,oDAKC;AAED;;;kDAyDC;AAEM,4CAC6F"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.formatLabel = formatLabel;
|
|
7
|
-
exports.getLabel = getLabel;
|
|
8
|
-
exports.getLabelByValue = getLabelByValue;
|
|
9
|
-
exports.highlightSubstring = highlightSubstring;
|
|
10
|
-
exports.isInput = void 0;
|
|
11
|
-
exports.parseArrayToObject = parseArrayToObject;
|
|
12
|
-
exports.parseObjectToArray = parseObjectToArray;
|
|
13
|
-
var _flatten2 = _interopRequireDefault(require("lodash/flatten"));
|
|
14
|
-
var _isString2 = _interopRequireDefault(require("lodash/isString"));
|
|
15
|
-
var _isArray2 = _interopRequireDefault(require("lodash/isArray"));
|
|
16
|
-
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
18
|
-
function _interopRequireDefault(obj) {
|
|
19
|
-
return obj && obj.__esModule ? obj : {
|
|
20
|
-
"default": obj
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function highlightSubstring(str, substring) {
|
|
24
|
-
var highlighted = "<span class=\"tnt-highlight\">".concat(substring, "</span>");
|
|
25
|
-
return str.replace(new RegExp(substring, 'g'), highlighted);
|
|
26
|
-
}
|
|
27
|
-
function getLabelByValue(_ref) {
|
|
28
|
-
var value = _ref.value,
|
|
29
|
-
options = _ref.options,
|
|
30
|
-
_ref$fieldNames = _ref.fieldNames,
|
|
31
|
-
fieldNames = _ref$fieldNames === void 0 ? {
|
|
32
|
-
label: 'label',
|
|
33
|
-
value: 'value'
|
|
34
|
-
} : _ref$fieldNames;
|
|
35
|
-
var getLabel = function getLabel(value) {
|
|
36
|
-
var target = options === null || options === void 0 ? void 0 : options.find(function (item) {
|
|
37
|
-
var valueKey = fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value;
|
|
38
|
-
var itemValue = item instanceof Object ? item[valueKey] : item;
|
|
39
|
-
return itemValue === value;
|
|
40
|
-
});
|
|
41
|
-
if (target) {
|
|
42
|
-
return target instanceof Object ? target === null || target === void 0 ? void 0 : target[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label] : target;
|
|
43
|
-
} else {
|
|
44
|
-
return value;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
if ((0, _isArray2["default"])(value)) {
|
|
48
|
-
return value.map(getLabel).join(' | ');
|
|
49
|
-
} else {
|
|
50
|
-
return getLabel(value);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function formatLabel(reactDom) {
|
|
54
|
-
return (0, _flatten2["default"])(_react["default"].Children.map(reactDom.props.children, function (child) {
|
|
55
|
-
if (_react["default"].isValidElement(child)) {
|
|
56
|
-
return formatLabel(child);
|
|
57
|
-
} else if ((0, _isString2["default"])(child)) {
|
|
58
|
-
return child;
|
|
59
|
-
}
|
|
60
|
-
return '';
|
|
61
|
-
})).join('');
|
|
62
|
-
}
|
|
63
|
-
function parseObjectToArray(value, data) {
|
|
64
|
-
var _a, _b;
|
|
65
|
-
return (_b = (_a = Object.keys(value || {})) === null || _a === void 0 ? void 0 : _a.map(function (key) {
|
|
66
|
-
var target = data === null || data === void 0 ? void 0 : data.find(function (item) {
|
|
67
|
-
var _a, _b;
|
|
68
|
-
return ((_a = item.props) === null || _a === void 0 ? void 0 : _a.name) === key || ((_b = item.props) === null || _b === void 0 ? void 0 : _b.pName) === key;
|
|
69
|
-
});
|
|
70
|
-
if (!target) return null;
|
|
71
|
-
var dataItem = (target === null || target === void 0 ? void 0 : target.props) || {};
|
|
72
|
-
var _ref2 = dataItem || {},
|
|
73
|
-
_ref2$type = _ref2.type,
|
|
74
|
-
type = _ref2$type === void 0 ? 'input' : _ref2$type,
|
|
75
|
-
component = _ref2.component,
|
|
76
|
-
setLabel = _ref2.setLabel;
|
|
77
|
-
if (!type && component && !setLabel) {
|
|
78
|
-
console.error('自定义组件需要传入setLabel()方法');
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
key: key,
|
|
82
|
-
value: value[key]
|
|
83
|
-
};
|
|
84
|
-
})) === null || _b === void 0 ? void 0 : _b.filter(function (item) {
|
|
85
|
-
return !!item;
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function parseArrayToObject(value) {
|
|
89
|
-
return value === null || value === void 0 ? void 0 : value.reduce(function (acc, v) {
|
|
90
|
-
acc[v.key] = v.value;
|
|
91
|
-
return acc;
|
|
92
|
-
}, {});
|
|
93
|
-
}
|
|
94
|
-
function getLabel(_ref3, data, locale) {
|
|
95
|
-
var key = _ref3.key,
|
|
96
|
-
value = _ref3.value;
|
|
97
|
-
var _a, _b, _c, _d;
|
|
98
|
-
var otherTarget = data === null || data === void 0 ? void 0 : data.find(function (item) {
|
|
99
|
-
var _a;
|
|
100
|
-
return ((_a = item.props) === null || _a === void 0 ? void 0 : _a.pName) === key;
|
|
101
|
-
});
|
|
102
|
-
if (otherTarget) {
|
|
103
|
-
// otherInput
|
|
104
|
-
var selectKey = (_a = Object.keys(value || {})) === null || _a === void 0 ? void 0 : _a[0];
|
|
105
|
-
if (!selectKey) {
|
|
106
|
-
// 17. inputSelect组件,初始值{},展示undefined:undefined
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
var otherTargetObj = data.find(function (item) {
|
|
110
|
-
return item.props.pName === key && item.props.cName === selectKey;
|
|
111
|
-
});
|
|
112
|
-
if (!otherTargetObj) {
|
|
113
|
-
return false;
|
|
114
|
-
}
|
|
115
|
-
return otherTargetObj.props.title + ':' + (value[selectKey] || '');
|
|
116
|
-
}
|
|
117
|
-
var target = data === null || data === void 0 ? void 0 : data.find(function (item) {
|
|
118
|
-
var _a;
|
|
119
|
-
return ((_a = item.props) === null || _a === void 0 ? void 0 : _a.name) === key;
|
|
120
|
-
});
|
|
121
|
-
if (!target) return null;
|
|
122
|
-
var dataItem = (target === null || target === void 0 ? void 0 : target.props) || {};
|
|
123
|
-
var _ref4 = dataItem || {},
|
|
124
|
-
_ref4$type = _ref4.type,
|
|
125
|
-
type = _ref4$type === void 0 ? 'input' : _ref4$type,
|
|
126
|
-
setLabel = _ref4.setLabel,
|
|
127
|
-
fieldProps = _ref4.props,
|
|
128
|
-
propsTitle = _ref4.propsTitle,
|
|
129
|
-
title = _ref4.title,
|
|
130
|
-
name = _ref4.name;
|
|
131
|
-
var _propsTitle = propsTitle || title || name;
|
|
132
|
-
var _ref5 = fieldProps || {},
|
|
133
|
-
options = _ref5.options,
|
|
134
|
-
format = _ref5.format;
|
|
135
|
-
var labelValue = value;
|
|
136
|
-
if (setLabel) {
|
|
137
|
-
// setLabel: 对于自定义组件,无法控制label的显示,可以通过setLabel方法控制
|
|
138
|
-
labelValue = setLabel(value);
|
|
139
|
-
} else if (options) {
|
|
140
|
-
if (type === 'selectInput') {
|
|
141
|
-
var _selectKey = (_b = Object.keys(value || {})) === null || _b === void 0 ? void 0 : _b[0];
|
|
142
|
-
if (!_selectKey) {
|
|
143
|
-
// 17. inputSelect组件,初始值{},展示undefined:undefined
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
var inputValue = value[_selectKey];
|
|
147
|
-
var selectLabel = (_c = options === null || options === void 0 ? void 0 : options.find(function (v) {
|
|
148
|
-
return v.value === _selectKey;
|
|
149
|
-
})) === null || _c === void 0 ? void 0 : _c.label;
|
|
150
|
-
return selectLabel + ':' + inputValue;
|
|
151
|
-
}
|
|
152
|
-
labelValue = getLabelByValue({
|
|
153
|
-
value: value,
|
|
154
|
-
options: options,
|
|
155
|
-
fieldNames: ((_d = dataItem === null || dataItem === void 0 ? void 0 : dataItem.props) === null || _d === void 0 ? void 0 : _d.fieldNames) || {
|
|
156
|
-
label: 'label',
|
|
157
|
-
value: 'value'
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
} else if (type === 'checkbox') {
|
|
161
|
-
labelValue = value ? locale.yes : locale.no;
|
|
162
|
-
} else if (type === 'dateRange' && format) {
|
|
163
|
-
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
164
|
-
labelValue = [(0, _moment["default"])(value === null || value === void 0 ? void 0 : value[0]).format(format), (0, _moment["default"])(value === null || value === void 0 ? void 0 : value[1]).format(format)].join('~');
|
|
165
|
-
}
|
|
166
|
-
} else if (type === 'date' && format) {
|
|
167
|
-
labelValue = value ? (0, _moment["default"])(value).format(format) : undefined;
|
|
168
|
-
}
|
|
169
|
-
return _propsTitle + ':' + (labelValue === undefined ? '' : labelValue);
|
|
170
|
-
}
|
|
171
|
-
var isInput = exports.isInput = function isInput(type) {
|
|
172
|
-
return ['input', 'string', 'search', 'aloneSearch', 'number', 'inputNumber', 'otherInput'].includes(type);
|
|
173
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/query-form/Field/Composition/utils.js"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAmD;AACnD,oDAA2B;AAE3B,SAAgB,kBAAkB,CAAC,GAAG,EAAE,SAAS;IAC/C,MAAM,WAAW,GAAG,+BAA+B,SAAS,SAAS,CAAA;IACrE,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,CAAA;AAC7D,CAAC;AAHD,gDAGC;AAED,SAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,OAAO,EACP,UAAU,GAAG;IACX,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf,GACF;IACC,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,EAAE;QACzB,MAAM,MAAM,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YACpC,MAAM,QAAQ,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,CAAA;YAClC,MAAM,SAAS,GAAG,IAAI,YAAY,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;YAChE,OAAO,SAAS,KAAK,KAAK,CAAA;QAC5B,CAAC,CAAC,CAAA;QACF,IAAI,MA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,CAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SAC9F;KACF;SAAM,IAAI,IAAI,KAAK,MAAM,IAAI,MAAM,EAAE;QACpC,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,IAAA,gBAAM,EAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;KAC9D;IACD,OAAO,WAAW,GAAG,GAAG,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;AACzE,CAAC;AAzDD,4BAyDC;AAEM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,EAAE,CAC9B,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;AADvF,QAAA,OAAO,WACgF","sourcesContent":["import React from 'react'\nimport { isArray, isString, flatten } from 'lodash'\nimport moment from 'moment'\n\nexport function highlightSubstring(str, substring) {\n const highlighted = `<span class=\"tnt-highlight\">${substring}</span>`\n return str.replace(new RegExp(substring, 'g'), highlighted)\n}\n\nexport function getLabelByValue({\n value,\n options,\n fieldNames = {\n label: 'label',\n value: 'value',\n },\n}) {\n const getLabel = (value) => {\n const target = options?.find((item) => {\n const valueKey = fieldNames?.value\n const itemValue = item instanceof Object ? item[valueKey] : item\n return itemValue === value\n })\n if (target) {\n return target instanceof Object ? target?.[fieldNames?.label] : target\n } else {\n return value\n }\n }\n if (isArray(value)) {\n return value.map(getLabel).join(' | ')\n } else {\n return getLabel(value)\n }\n}\n\nexport function formatLabel(reactDom) {\n return flatten(\n React.Children.map(reactDom.props.children, (child) => {\n if (React.isValidElement(child)) {\n return formatLabel(child)\n } else if (isString(child)) {\n return child\n }\n return ''\n })\n ).join('')\n}\n\nexport function parseObjectToArray(value, data) {\n return Object.keys(value || {})\n ?.map((key) => {\n const target = data?.find((item) => item.props?.name === key || item.props?.pName === key)\n if (!target) return null\n const dataItem = target?.props || {}\n const { type = 'input', component, setLabel } = dataItem || {}\n if (!type && component && !setLabel) {\n console.error('自定义组件需要传入setLabel()方法')\n }\n return {\n key,\n value: value[key],\n }\n })\n ?.filter((item) => !!item)\n}\n\nexport function parseArrayToObject(value) {\n return value?.reduce((acc, v) => {\n acc[v.key] = v.value\n return acc\n }, {})\n}\n\nexport function getLabel({ key, value }, data, locale) {\n const otherTarget = data?.find((item) => item.props?.pName === key)\n if (otherTarget) {\n // otherInput\n const selectKey = Object.keys(value || {})?.[0]\n if (!selectKey) {\n // 17. inputSelect组件,初始值{},展示undefined:undefined\n return false\n }\n const otherTargetObj = data.find(\n (item) => item.props.pName === key && item.props.cName === selectKey\n )\n if (!otherTargetObj) {\n return false\n }\n return otherTargetObj.props.title + ':' + (value[selectKey] || '')\n }\n\n const target = data?.find((item) => item.props?.name === key)\n if (!target) return null\n const dataItem = target?.props || {}\n const { type = 'input', setLabel, props: fieldProps, propsTitle, title, name } = dataItem || {}\n const _propsTitle = propsTitle || title || name\n const { options, format } = fieldProps || {}\n let labelValue = value\n if (setLabel) {\n // setLabel: 对于自定义组件,无法控制label的显示,可以通过setLabel方法控制\n labelValue = setLabel(value)\n } else if (options) {\n if (type === 'selectInput') {\n const selectKey = Object.keys(value || {})?.[0]\n if (!selectKey) {\n // 17. inputSelect组件,初始值{},展示undefined:undefined\n return false\n }\n const inputValue = value[selectKey]\n const selectLabel = options?.find((v) => v.value === selectKey)?.label\n return selectLabel + ':' + inputValue\n }\n labelValue = getLabelByValue({\n value,\n options,\n fieldNames: dataItem?.props?.fieldNames || {\n label: 'label',\n value: 'value',\n },\n })\n } else if (type === 'checkbox') {\n labelValue = value ? locale.yes : locale.no\n } else if (type === 'dateRange' && format) {\n if (value?.length) {\n labelValue = [moment(value?.[0]).format(format), moment(value?.[1]).format(format)].join('~')\n }\n } else if (type === 'date' && format) {\n labelValue = value ? moment(value).format(format) : undefined\n }\n return _propsTitle + ':' + (labelValue === undefined ? '' : labelValue)\n}\n\nexport const isInput = (type) =>\n ['input', 'string', 'search', 'aloneSearch', 'number', 'inputNumber', 'otherInput'].includes(type)\n"]}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
.tnt-queryform {
|
|
2
|
-
display: flex;
|
|
3
|
-
|
|
4
|
-
&-extra {
|
|
5
|
-
line-height: 32px;
|
|
6
|
-
margin-left: 12px;
|
|
7
|
-
& > * {
|
|
8
|
-
margin-left: 8px;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&-actions {
|
|
13
|
-
align-items: center;
|
|
14
|
-
display: inline-block;
|
|
15
|
-
height: 32px;
|
|
16
|
-
line-height: 32px;
|
|
17
|
-
|
|
18
|
-
& > *:not(.expand-link) {
|
|
19
|
-
margin-right: 10px;
|
|
20
|
-
}
|
|
21
|
-
& > .expand-link {
|
|
22
|
-
padding: 0;
|
|
23
|
-
margin-right: 0;
|
|
24
|
-
}
|
|
25
|
-
& > .ant-badge {
|
|
26
|
-
.tnt-icon {
|
|
27
|
-
margin-right: 8px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.ant-form {
|
|
33
|
-
display: inline-block;
|
|
34
|
-
margin-bottom: 12px;
|
|
35
|
-
display: flex;
|
|
36
|
-
flex: 1;
|
|
37
|
-
&.ant-form-inline {
|
|
38
|
-
flex-wrap: unset;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
& > div:nth-child(1) {
|
|
42
|
-
height: 32px;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
.ant-form-item-label {
|
|
45
|
-
label {
|
|
46
|
-
// bottom: 4px;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&.expanded {
|
|
52
|
-
& > div:nth-child(1) {
|
|
53
|
-
height: auto !important;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&.showMore {
|
|
58
|
-
& > div:nth-child(1) {
|
|
59
|
-
.ant-form-item {
|
|
60
|
-
margin-bottom: 12px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
& > div:nth-child(2) {
|
|
66
|
-
display: flex;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&.ant-form-inline .ant-form-item {
|
|
70
|
-
margin-right: 10px;
|
|
71
|
-
display: inline-block;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.ant-form-item-control {
|
|
75
|
-
// min-width: 160px;
|
|
76
|
-
line-height: unset;
|
|
77
|
-
.ant-calendar-picker-input {
|
|
78
|
-
padding: 0 11px;
|
|
79
|
-
}
|
|
80
|
-
.ant-form-item-children {
|
|
81
|
-
& > .ant-input,
|
|
82
|
-
& > .ant-input-affix-wrapper {
|
|
83
|
-
width: 160px;
|
|
84
|
-
// width: 200px;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&-drawer {
|
|
91
|
-
margin-top: 50px;
|
|
92
|
-
&.large-size {
|
|
93
|
-
margin-top: 60px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&.ant-drawer.ant-drawer-open {
|
|
97
|
-
.ant-drawer-mask {
|
|
98
|
-
opacity: 0;
|
|
99
|
-
background: unset;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
.ant-drawer-body {
|
|
103
|
-
.ant-form-item {
|
|
104
|
-
display: block;
|
|
105
|
-
margin-right: 0;
|
|
106
|
-
margin-bottom: 20px;
|
|
107
|
-
width: 100%;
|
|
108
|
-
}
|
|
109
|
-
.ant-form-item-label {
|
|
110
|
-
display: block;
|
|
111
|
-
text-align: left;
|
|
112
|
-
line-height: 22px;
|
|
113
|
-
margin-bottom: 10px;
|
|
114
|
-
}
|
|
115
|
-
.ant-form-item-control-wrapper,
|
|
116
|
-
.ant-form-item-control,
|
|
117
|
-
.ant-calendar-picker,
|
|
118
|
-
.ant-input {
|
|
119
|
-
min-width: 100%;
|
|
120
|
-
width: 100%;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
& > .ant-btn {
|
|
124
|
-
display: block;
|
|
125
|
-
width: 100%;
|
|
126
|
-
margin-bottom: 10px;
|
|
127
|
-
&.ant-btn-primary {
|
|
128
|
-
margin-top: 20px;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
package/lib/radio/radio.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { RadioGroupProps as AntdRadioGroupProps, RadioProps as AntdRadioProps } from 'antd/lib/radio';
|
|
2
|
-
import AntdRadio from 'antd/lib/radio';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export * from 'antd/lib/radio';
|
|
5
|
-
export declare type RadioProps = AntdRadioProps & {
|
|
6
|
-
desc?: string | React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
export declare type RadioGroupProps = AntdRadioGroupProps & {
|
|
9
|
-
readonly?: boolean;
|
|
10
|
-
};
|
|
11
|
-
interface RadioComponent extends React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<AntdRadio>> {
|
|
12
|
-
Group: React.FC<RadioGroupProps>;
|
|
13
|
-
Button: typeof AntdRadio.Button;
|
|
14
|
-
}
|
|
15
|
-
declare const Radio: RadioComponent;
|
|
16
|
-
export default Radio;
|
|
17
|
-
//# sourceMappingURL=radio.d.ts.map
|
package/lib/radio/radio.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../src/radio/radio.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,eAAe,IAAI,mBAAmB,EACtC,UAAU,IAAI,cAAc,EAC7B,MAAM,eAAe,CAAA;AACtB,OAAO,SAAS,MAAM,eAAe,CAAA;AAGrC,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,cAAc,eAAe,CAAA;AAE7B,oBAAY,UAAU,GAAG,cAAc,GAAG;IACxC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;CAChC,CAAA;AACD,oBAAY,eAAe,GAAG,mBAAmB,GAAG;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,UAAU,cACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,UAAU,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACpF,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,CAAA;IAChC,MAAM,EAAE,OAAO,SAAS,CAAC,MAAM,CAAA;CAChC;AAID,QAAA,MAAM,KAAK,gBAiBS,CAAA;AAqBpB,eAAe,KAAK,CAAA"}
|
package/lib/radio/radio.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) {
|
|
4
|
-
"@babel/helpers - typeof";
|
|
5
|
-
|
|
6
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
-
return typeof o;
|
|
8
|
-
} : function (o) {
|
|
9
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
-
}, _typeof(o);
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(exports, "__esModule", {
|
|
13
|
-
value: true
|
|
14
|
-
});
|
|
15
|
-
var _exportNames = {};
|
|
16
|
-
exports["default"] = void 0;
|
|
17
|
-
var _configProvider = require("antd/lib/config-provider");
|
|
18
|
-
var _radio = _interopRequireWildcard(require("antd/lib/radio"));
|
|
19
|
-
Object.keys(_radio).forEach(function (key) {
|
|
20
|
-
if (key === "default" || key === "__esModule") return;
|
|
21
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
22
|
-
if (key in exports && exports[key] === _radio[key]) return;
|
|
23
|
-
Object.defineProperty(exports, key, {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function get() {
|
|
26
|
-
return _radio[key];
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
31
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
32
|
-
var _connect = require("../connect");
|
|
33
|
-
var _previewText = require("../preview-text");
|
|
34
|
-
function _interopRequireDefault(e) {
|
|
35
|
-
return e && e.__esModule ? e : {
|
|
36
|
-
"default": e
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function _getRequireWildcardCache(e) {
|
|
40
|
-
if ("function" != typeof WeakMap) return null;
|
|
41
|
-
var r = new WeakMap(),
|
|
42
|
-
t = new WeakMap();
|
|
43
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
44
|
-
return e ? t : r;
|
|
45
|
-
})(e);
|
|
46
|
-
}
|
|
47
|
-
function _interopRequireWildcard(e, r) {
|
|
48
|
-
if (!r && e && e.__esModule) return e;
|
|
49
|
-
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
50
|
-
"default": e
|
|
51
|
-
};
|
|
52
|
-
var t = _getRequireWildcardCache(r);
|
|
53
|
-
if (t && t.has(e)) return t.get(e);
|
|
54
|
-
var n = {
|
|
55
|
-
__proto__: null
|
|
56
|
-
},
|
|
57
|
-
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
58
|
-
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
59
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
60
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
61
|
-
}
|
|
62
|
-
return n["default"] = e, t && t.set(e, n), n;
|
|
63
|
-
}
|
|
64
|
-
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
65
|
-
var t = {};
|
|
66
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
67
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
68
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
69
|
-
}
|
|
70
|
-
return t;
|
|
71
|
-
};
|
|
72
|
-
/*
|
|
73
|
-
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
74
|
-
* @Date: 2024-03-14 16:55:05
|
|
75
|
-
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
76
|
-
* @LastEditTime: 2024-03-14 17:00:03
|
|
77
|
-
* @FilePath: /tntd/packages/tntd/src/radio/radio.tsx
|
|
78
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
var tntPrefixCls = 'tnt-radio';
|
|
82
|
-
var Radio = (0, _react.forwardRef)(function (_a, ref) {
|
|
83
|
-
var className = _a.className,
|
|
84
|
-
children = _a.children,
|
|
85
|
-
desc = _a.desc,
|
|
86
|
-
rest = __rest(_a, ["className", "children", "desc"]);
|
|
87
|
-
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
88
|
-
return _react["default"].createElement(_radio["default"], Object.assign({}, rest, {
|
|
89
|
-
ref: ref,
|
|
90
|
-
className: (0, _classnames["default"])(className, tntPrefixCls)
|
|
91
|
-
}), children ? _react["default"].createElement("span", {
|
|
92
|
-
className: "".concat(tntPrefixCls, "-children")
|
|
93
|
-
}, _react["default"].createElement("span", null, children), !!desc && _react["default"].createElement("span", {
|
|
94
|
-
className: "".concat(tntPrefixCls, "-desc")
|
|
95
|
-
}, desc)) : undefined);
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
var RadioGroup = (0, _react.forwardRef)(function (_a, ref) {
|
|
99
|
-
var className = _a.className,
|
|
100
|
-
rest = __rest(_a, ["className"]);
|
|
101
|
-
return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
|
|
102
|
-
return _react["default"].createElement(_radio["default"].Group, Object.assign({}, rest, {
|
|
103
|
-
ref: ref,
|
|
104
|
-
className: (0, _classnames["default"])(className, "".concat(tntPrefixCls, "-group"))
|
|
105
|
-
}));
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
Radio.Group = (0, _connect.connectReadonlyComponent)(RadioGroup, _previewText.PreviewText.Select);
|
|
109
|
-
Radio.Button = _radio["default"].Button;
|
|
110
|
-
var _default = exports["default"] = Radio;
|
package/lib/radio/radio.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sourceRoot":"","sources":["../../src/radio/radio.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,6DAAwD;AAKxD,0DAAqC;AAErC,4DAAmC;AACnC,+CAAyC;AACzC,wCAAqD;AACrD,kDAA6C;AAE7C,gDAA6B;AAe7B,MAAM,YAAY,GAAG,WAAW,CAAA;AAEhC,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAwB,CAAC,EAAsC,EAAE,GAAG,EAAE,EAAE;QAA/C,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,OAAW,EAAN,IAAI,cAApC,iCAAsC,CAAF;IACnF,OAAO,CACL,8BAAC,gCAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,8BAAC,eAAS,oBAAK,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE,YAAY,CAAC,KAC1E,QAAQ,CAAC,CAAC,CAAC,CACV,wCAAM,SAAS,EAAE,GAAG,YAAY,WAAW;YACzC,4CAAO,QAAQ,CAAQ;YACtB,CAAC,CAAC,IAAI,IAAI,wCAAM,SAAS,EAAE,GAAG,YAAY,OAAO,IAAG,IAAI,CAAQ,CAC5D,CACR,CAAC,CAAC,CAAC,SAAS,CACH,CACb,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAmB,CAAA;AAEpB,MAAM,UAAU,GAAG,IAAA,kBAAU,EAAkC,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IAClF,OAAO,CACL,8BAAC,gCAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,8BAAC,eAAS,CAAC,KAAK,oBACV,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE,GAAG,YAAY,QAAQ,CAAC,IACzD,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,KAAK,CAAC,KAAK,GAAG,IAAA,kCAAwB,EAAC,UAAU,EAAE,0BAAW,CAAC,MAAM,CAAC,CAAA;AACtE,KAAK,CAAC,MAAM,GAAG,eAAS,CAAC,MAAM,CAAA;AAE/B,kBAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-03-14 16:55:05\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-03-14 17:00:03\n * @FilePath: /tntd/packages/tntd/src/radio/radio.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport type {\n RadioGroupProps as AntdRadioGroupProps,\n RadioProps as AntdRadioProps,\n} from 'antd/lib/radio'\nimport AntdRadio from 'antd/lib/radio'\nimport type AntdRadioGroup from 'antd/lib/radio/group'\nimport classNames from 'classnames'\nimport React, { forwardRef } from 'react'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\n\nexport * from 'antd/lib/radio'\n\nexport type RadioProps = AntdRadioProps & {\n desc?: string | React.ReactNode\n}\nexport type RadioGroupProps = AntdRadioGroupProps & {\n readonly?: boolean\n}\n\ninterface RadioComponent\n extends React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<AntdRadio>> {\n Group: React.FC<RadioGroupProps>\n Button: typeof AntdRadio.Button\n}\n\nconst tntPrefixCls = 'tnt-radio'\n\nconst Radio = forwardRef<AntdRadio, RadioProps>(({ className, children, desc, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdRadio {...rest} ref={ref} className={classNames(className, tntPrefixCls)}>\n {children ? (\n <span className={`${tntPrefixCls}-children`}>\n <span>{children}</span>\n {!!desc && <span className={`${tntPrefixCls}-desc`}>{desc}</span>}\n </span>\n ) : undefined}\n </AntdRadio>\n )\n }}\n </ConfigConsumer>\n )\n}) as RadioComponent\n\nconst RadioGroup = forwardRef<AntdRadioGroup, RadioGroupProps>(({ className, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdRadio.Group\n {...rest}\n ref={ref}\n className={classNames(className, `${tntPrefixCls}-group`)}\n />\n )\n }}\n </ConfigConsumer>\n )\n})\n\nRadio.Group = connectReadonlyComponent(RadioGroup, PreviewText.Select)\nRadio.Button = AntdRadio.Button\n\nexport default Radio\n"]}
|
package/lib/scroll-bar/Bar.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../src/scroll-bar/Bar.js"],"names":[],"mappings":""}
|
package/lib/scroll-bar/Bar.js
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) {
|
|
4
|
-
"@babel/helpers - typeof";
|
|
5
|
-
|
|
6
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
-
return typeof o;
|
|
8
|
-
} : function (o) {
|
|
9
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
-
}, _typeof(o);
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(exports, "__esModule", {
|
|
13
|
-
value: true
|
|
14
|
-
});
|
|
15
|
-
exports["default"] = void 0;
|
|
16
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
var _Context = _interopRequireDefault(require("./Context"));
|
|
18
|
-
var _Thumb = _interopRequireDefault(require("./Thumb"));
|
|
19
|
-
var _util = require("./util");
|
|
20
|
-
function _interopRequireDefault(obj) {
|
|
21
|
-
return obj && obj.__esModule ? obj : {
|
|
22
|
-
"default": obj
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
function _getRequireWildcardCache(e) {
|
|
26
|
-
if ("function" != typeof WeakMap) return null;
|
|
27
|
-
var r = new WeakMap(),
|
|
28
|
-
t = new WeakMap();
|
|
29
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
30
|
-
return e ? t : r;
|
|
31
|
-
})(e);
|
|
32
|
-
}
|
|
33
|
-
function _interopRequireWildcard(e, r) {
|
|
34
|
-
if (!r && e && e.__esModule) return e;
|
|
35
|
-
if (null === e || "object" != _typeof(e) && "function" != typeof e) return {
|
|
36
|
-
"default": e
|
|
37
|
-
};
|
|
38
|
-
var t = _getRequireWildcardCache(r);
|
|
39
|
-
if (t && t.has(e)) return t.get(e);
|
|
40
|
-
var n = {
|
|
41
|
-
__proto__: null
|
|
42
|
-
},
|
|
43
|
-
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
44
|
-
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
45
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
46
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
47
|
-
}
|
|
48
|
-
return n["default"] = e, t && t.set(e, n), n;
|
|
49
|
-
}
|
|
50
|
-
function _slicedToArray(arr, i) {
|
|
51
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
52
|
-
}
|
|
53
|
-
function _nonIterableRest() {
|
|
54
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
55
|
-
}
|
|
56
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
57
|
-
if (!o) return;
|
|
58
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
59
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
60
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
61
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
62
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
63
|
-
}
|
|
64
|
-
function _arrayLikeToArray(arr, len) {
|
|
65
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
66
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
67
|
-
return arr2;
|
|
68
|
-
}
|
|
69
|
-
function _iterableToArrayLimit(r, l) {
|
|
70
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
71
|
-
if (null != t) {
|
|
72
|
-
var e,
|
|
73
|
-
n,
|
|
74
|
-
i,
|
|
75
|
-
u,
|
|
76
|
-
a = [],
|
|
77
|
-
f = !0,
|
|
78
|
-
o = !1;
|
|
79
|
-
try {
|
|
80
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
81
|
-
if (Object(t) !== t) return;
|
|
82
|
-
f = !1;
|
|
83
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
84
|
-
} catch (r) {
|
|
85
|
-
o = !0, n = r;
|
|
86
|
-
} finally {
|
|
87
|
-
try {
|
|
88
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
89
|
-
} finally {
|
|
90
|
-
if (o) throw n;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return a;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function _arrayWithHoles(arr) {
|
|
97
|
-
if (Array.isArray(arr)) return arr;
|
|
98
|
-
}
|
|
99
|
-
var _default = exports["default"] = (0, _react.forwardRef)(function (props, ref) {
|
|
100
|
-
var _useContext = (0, _react.useContext)(_Context["default"]),
|
|
101
|
-
wrapElement = _useContext.wrapElement;
|
|
102
|
-
var _useState = (0, _react.useState)(0),
|
|
103
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
104
|
-
moveX = _useState2[0],
|
|
105
|
-
setMoveX = _useState2[1];
|
|
106
|
-
var _useState3 = (0, _react.useState)(0),
|
|
107
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
108
|
-
moveY = _useState4[0],
|
|
109
|
-
setMoveY = _useState4[1];
|
|
110
|
-
var _useState5 = (0, _react.useState)(0),
|
|
111
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
112
|
-
sizeWidth = _useState6[0],
|
|
113
|
-
setSizeWidth = _useState6[1];
|
|
114
|
-
var _useState7 = (0, _react.useState)(0),
|
|
115
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
116
|
-
sizeHeight = _useState8[0],
|
|
117
|
-
setSizeHeight = _useState8[1];
|
|
118
|
-
var _useState9 = (0, _react.useState)(1),
|
|
119
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
120
|
-
ratioX = _useState10[0],
|
|
121
|
-
setRatioX = _useState10[1];
|
|
122
|
-
var _useState11 = (0, _react.useState)(1),
|
|
123
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
124
|
-
ratioY = _useState12[0],
|
|
125
|
-
setRatioY = _useState12[1];
|
|
126
|
-
(0, _react.useImperativeHandle)(ref, function () {
|
|
127
|
-
return {
|
|
128
|
-
update: update,
|
|
129
|
-
handleScroll: handleScroll
|
|
130
|
-
};
|
|
131
|
-
});
|
|
132
|
-
function handleScroll() {
|
|
133
|
-
var wrap = wrapElement.current;
|
|
134
|
-
if (!wrap) return;
|
|
135
|
-
var offsetHeight = wrap.offsetHeight - _util.GAP;
|
|
136
|
-
var offsetWidth = wrap.offsetWidth - _util.GAP;
|
|
137
|
-
setMoveY(wrap.scrollTop * 100 / offsetHeight * ratioY);
|
|
138
|
-
setMoveX(wrap.scrollLeft * 100 / offsetWidth * ratioX);
|
|
139
|
-
}
|
|
140
|
-
function update() {
|
|
141
|
-
var wrap = wrapElement.current;
|
|
142
|
-
if (!wrap) return;
|
|
143
|
-
// 滚动窗口的高度
|
|
144
|
-
var offsetHeight = wrap.offsetHeight - _util.GAP;
|
|
145
|
-
var offsetWidth = wrap.offsetWidth - _util.GAP;
|
|
146
|
-
// 滚动条的逻辑高度
|
|
147
|
-
var originalHeight = Math.pow(offsetHeight, 2) / wrap.scrollHeight;
|
|
148
|
-
var originalWidth = Math.pow(offsetWidth, 2) / wrap.scrollWidth;
|
|
149
|
-
// 滚动条的实际高度,因为如果内容太长会导致滚动条非常短,可能难以点击拖拽,所以设置了最小高度
|
|
150
|
-
var height = Math.max(originalHeight, props.minSize);
|
|
151
|
-
var width = Math.max(originalWidth, props.minSize);
|
|
152
|
-
setRatioY(originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height)));
|
|
153
|
-
setRatioX(originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width)));
|
|
154
|
-
setSizeHeight(height + _util.GAP < offsetHeight ? height : 0);
|
|
155
|
-
setSizeWidth(width + _util.GAP < offsetWidth ? width : 0);
|
|
156
|
-
}
|
|
157
|
-
return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_Thumb["default"], {
|
|
158
|
-
always: props.always,
|
|
159
|
-
move: moveX,
|
|
160
|
-
size: sizeWidth,
|
|
161
|
-
ratio: ratioX
|
|
162
|
-
}), _react["default"].createElement(_Thumb["default"], {
|
|
163
|
-
always: props.always,
|
|
164
|
-
move: moveY,
|
|
165
|
-
size: sizeHeight,
|
|
166
|
-
ratio: ratioY,
|
|
167
|
-
vertical: true
|
|
168
|
-
}));
|
|
169
|
-
});
|