@aloudata/aloudata-design 0.4.0-beta.10 → 0.4.0-beta.12
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/Avatar/component/Avatar/index.d.ts +1 -1
- package/es/Avatar/component/Avatar/index.js +12 -16
- package/es/Breadcrumb/index.js +14 -18
- package/es/Button/index.d.ts +2 -2
- package/es/Button/index.js +16 -39
- package/es/Button/style/index.less +1 -1
- package/es/Checkbox/component/CheckboxGroup/index.d.ts +0 -1
- package/es/Checkbox/component/CheckboxGroup/index.js +11 -11
- package/es/Checkbox/index.js +8 -8
- package/es/Checkbox/type.d.ts +1 -1
- package/es/Checkbox/type.js +0 -1
- package/es/ConfigProvider/defaultRenderEmpty.d.ts +2 -2
- package/es/ConfigProvider/defaultRenderEmpty.js +0 -6
- package/es/ConfigProvider/sizeContext.d.ts +2 -2
- package/es/ConfigProvider/sizeContext.js +1 -1
- package/es/Divider/index.js +7 -3
- package/es/Dropdown/Button.d.ts +1 -1
- package/es/Dropdown/Button.js +16 -14
- package/es/Dropdown/index.d.ts +3 -3
- package/es/Dropdown/index.js +10 -10
- package/es/Empty/image/Authority.d.ts +0 -1
- package/es/Empty/image/Authority.js +0 -2
- package/es/Empty/image/Dataspace.d.ts +0 -1
- package/es/Empty/image/Dataspace.js +0 -2
- package/es/Empty/image/Search.d.ts +0 -1
- package/es/Empty/image/Search.js +0 -2
- package/es/Empty/image/Simple.d.ts +0 -1
- package/es/Empty/image/Simple.js +0 -2
- package/es/Empty/image/Worksheet.d.ts +0 -1
- package/es/Empty/image/Worksheet.js +0 -2
- package/es/Empty/image/empty.d.ts +0 -1
- package/es/Empty/image/empty.js +0 -2
- package/es/Empty/index.d.ts +1 -1
- package/es/Empty/index.js +16 -24
- package/es/Icon/components/Icon.js +14 -12
- package/es/Icon/components/createFromScripts.js +2 -8
- package/es/Icon/icons/AddLine.js +17 -23
- package/es/Icon/icons/AlertFill.js +17 -23
- package/es/Icon/icons/ArrowsDownLine.js +17 -23
- package/es/Icon/icons/CancelFill.js +17 -23
- package/es/Icon/icons/CheckFill.js +17 -23
- package/es/Icon/icons/CheckLine.js +17 -23
- package/es/Icon/icons/CloseLine.js +17 -23
- package/es/Icon/icons/DatabaseLine.js +17 -23
- package/es/Icon/icons/Deleteline.js +17 -23
- package/es/Icon/icons/DownloadLine.js +17 -23
- package/es/Icon/icons/ErrorFill.js +17 -23
- package/es/Icon/icons/EyeOffLine.js +17 -23
- package/es/Icon/icons/EyeOnLine.js +17 -23
- package/es/Icon/icons/FileLine.js +17 -23
- package/es/Icon/icons/HomeFill.js +17 -23
- package/es/Icon/icons/LightningLine.js +17 -23
- package/es/Icon/icons/Loading.js +17 -23
- package/es/Icon/icons/More.js +17 -23
- package/es/Icon/icons/NewWindowsLine.js +17 -23
- package/es/Icon/icons/SearchLine.js +17 -23
- package/es/Icon/icons/SortAscendingLine.js +17 -23
- package/es/Icon/icons/SortDescendingLine.js +17 -23
- package/es/Icon/icons/TextLine.js +17 -23
- package/es/Icon/icons/UserLine.js +17 -23
- package/es/Icon/icons.js +1658 -1588
- package/es/Input/components/Group/index.js +11 -9
- package/es/Input/components/Input/index.d.ts +2 -2
- package/es/Input/components/Input/index.js +10 -9
- package/es/Input/components/Password/index.js +14 -12
- package/es/Input/components/TextArea/index.js +13 -11
- package/es/InputNumber/index.js +10 -12
- package/es/Menu/Divider.js +7 -1
- package/es/Menu/MenuItem.js +7 -1
- package/es/Menu/SubMenu.js +8 -6
- package/es/Menu/index.d.ts +1 -1
- package/es/Menu/index.js +8 -6
- package/es/Modal/index.d.ts +1 -1
- package/es/Modal/index.js +18 -28
- package/es/Modal/locale.js +4 -6
- package/es/Modal/style/index.less +6 -1
- package/es/Navigator/components/Header/index.js +0 -2
- package/es/Navigator/components/Menu/index.js +14 -18
- package/es/Navigator/components/MenuItem/index.js +6 -9
- package/es/Navigator/index.js +5 -7
- package/es/Popconfirm/index.d.ts +89 -2
- package/es/Popconfirm/index.js +105 -1
- package/es/Popconfirm/style/index.less +58 -0
- package/es/Popover/index.js +9 -9
- package/es/Radio/components/Group/index.d.ts +1 -1
- package/es/Radio/components/Group/index.js +23 -32
- package/es/Radio/components/Radio/index.js +10 -19
- package/es/Radio/interface/radioGroup.d.ts +3 -3
- package/es/Select/index.d.ts +4 -4
- package/es/Select/index.js +53 -70
- package/es/Select/rc-select/BaseSelect.d.ts +7 -7
- package/es/Select/rc-select/BaseSelect.js +155 -245
- package/es/Select/rc-select/OptGroup.js +0 -1
- package/es/Select/rc-select/Option.js +0 -1
- package/es/Select/rc-select/OptionList.d.ts +2 -2
- package/es/Select/rc-select/OptionList.js +76 -128
- package/es/Select/rc-select/Select.d.ts +8 -8
- package/es/Select/rc-select/Select.js +137 -205
- package/es/Select/rc-select/SelectTrigger.js +30 -42
- package/es/Select/rc-select/Selector/Input.d.ts +1 -1
- package/es/Select/rc-select/Selector/Input.js +29 -37
- package/es/Select/rc-select/Selector/MultipleSelector.js +72 -97
- package/es/Select/rc-select/Selector/SingleSelector.js +28 -43
- package/es/Select/rc-select/Selector/index.js +33 -58
- package/es/Select/rc-select/TransBtn.js +5 -10
- package/es/Select/rc-select/hooks/useBaseProps.js +0 -1
- package/es/Select/rc-select/hooks/useCache.d.ts +1 -1
- package/es/Select/rc-select/hooks/useCache.js +9 -12
- package/es/Select/rc-select/hooks/useDelayReset.js +4 -18
- package/es/Select/rc-select/hooks/useFilterOptions.d.ts +1 -1
- package/es/Select/rc-select/hooks/useFilterOptions.js +8 -17
- package/es/Select/rc-select/hooks/useId.js +6 -17
- package/es/Select/rc-select/hooks/useLayoutEffect.js +0 -1
- package/es/Select/rc-select/hooks/useLock.js +2 -6
- package/es/Select/rc-select/hooks/useOptions.d.ts +2 -2
- package/es/Select/rc-select/hooks/useOptions.js +2 -10
- package/es/Select/rc-select/hooks/useRefFunc.js +0 -1
- package/es/Select/rc-select/hooks/useSelectTriggerControl.js +0 -5
- package/es/Select/rc-select/utils/commonUtil.js +0 -2
- package/es/Select/rc-select/utils/keyUtil.js +4 -3
- package/es/Select/rc-select/utils/legacyUtil.js +13 -22
- package/es/Select/rc-select/utils/valueUtil.js +18 -50
- package/es/Select/rc-select/utils/warningPropsUtil.js +30 -47
- package/es/Select/style/index.js +2 -1
- package/es/Select/style/status.less +3 -1
- package/es/Select/utils/iconUtil.d.ts +3 -3
- package/es/Select/utils/iconUtil.js +16 -26
- package/es/Space/index.js +1 -1
- package/es/Spin/index.d.ts +2 -2
- package/es/Steps/components/Step/index.d.ts +1 -1
- package/es/Steps/components/Step/index.js +9 -8
- package/es/Steps/index.d.ts +8 -2
- package/es/Steps/index.js +64 -10
- package/es/Steps/style/index.less +11 -12
- package/es/Switch/index.js +17 -30
- package/es/Table/Table.js +115 -191
- package/es/Table/components/Empty/index.js +0 -2
- package/es/Table/components/Loading/index.js +0 -2
- package/es/Table/components/TableBodyRowList/index.js +20 -39
- package/es/Table/components/TableHead/index.js +57 -94
- package/es/Table/interface.d.ts +1 -1
- package/es/Table/style/index.less +8 -4
- package/es/Table/utils.js +8 -29
- package/es/Tabs/index.d.ts +22 -7
- package/es/Tabs/index.js +12 -19
- package/es/Tooltip/index.d.ts +1 -1
- package/es/Tooltip/index.js +12 -12
- package/es/_utils/hooks/useControlledState.d.ts +1 -1
- package/es/_utils/hooks/useControlledState.js +8 -21
- package/es/_utils/hooks/useId.js +2 -6
- package/es/_utils/hooks/usePrefixCls.d.ts +1 -1
- package/es/_utils/hooks/usePrefixCls.js +2 -5
- package/es/index.d.ts +1 -1
- package/es/locale-provider/context.d.ts +1 -1
- package/es/locale-provider/index.js +10 -32
- package/lib/Alert/index.js +0 -4
- package/lib/Alert/style/index.js +0 -1
- package/lib/Avatar/component/Avatar/index.d.ts +1 -1
- package/lib/Avatar/component/Avatar/index.js +11 -24
- package/lib/Avatar/index.js +0 -4
- package/lib/Avatar/style/index.js +0 -1
- package/lib/Breadcrumb/index.js +14 -23
- package/lib/Breadcrumb/style/index.js +0 -1
- package/lib/Button/index.d.ts +2 -2
- package/lib/Button/index.js +16 -47
- package/lib/Button/style/index.js +0 -1
- package/lib/Button/style/index.less +1 -1
- package/lib/Card/index.js +0 -4
- package/lib/Card/style/index.js +0 -1
- package/lib/Checkbox/component/CheckboxGroup/index.d.ts +0 -1
- package/lib/Checkbox/component/CheckboxGroup/index.js +9 -16
- package/lib/Checkbox/index.js +8 -14
- package/lib/Checkbox/style/index.js +0 -1
- package/lib/Checkbox/type.d.ts +1 -1
- package/lib/Checkbox/type.js +0 -1
- package/lib/Col/index.js +0 -4
- package/lib/Col/style/index.js +0 -1
- package/lib/ConfigProvider/defaultRenderEmpty.d.ts +2 -2
- package/lib/ConfigProvider/defaultRenderEmpty.js +0 -13
- package/lib/ConfigProvider/index.js +0 -5
- package/lib/ConfigProvider/sizeContext.d.ts +2 -2
- package/lib/ConfigProvider/sizeContext.js +1 -8
- package/lib/ConfigProvider/style/index.js +0 -1
- package/lib/DatePicker/index.js +0 -4
- package/lib/DatePicker/style/index.js +0 -1
- package/lib/Divider/index.js +7 -8
- package/lib/Divider/style/index.js +0 -1
- package/lib/Drawer/index.js +0 -4
- package/lib/Drawer/style/index.js +0 -1
- package/lib/Dropdown/Button.d.ts +1 -1
- package/lib/Dropdown/Button.js +14 -20
- package/lib/Dropdown/index.d.ts +3 -3
- package/lib/Dropdown/index.js +10 -17
- package/lib/Dropdown/style/index.js +0 -2
- package/lib/Empty/image/Authority.d.ts +0 -1
- package/lib/Empty/image/Authority.js +0 -6
- package/lib/Empty/image/Dataspace.d.ts +0 -1
- package/lib/Empty/image/Dataspace.js +0 -6
- package/lib/Empty/image/Search.d.ts +0 -1
- package/lib/Empty/image/Search.js +0 -6
- package/lib/Empty/image/Simple.d.ts +0 -1
- package/lib/Empty/image/Simple.js +0 -6
- package/lib/Empty/image/Worksheet.d.ts +0 -1
- package/lib/Empty/image/Worksheet.js +0 -6
- package/lib/Empty/image/empty.d.ts +0 -1
- package/lib/Empty/image/empty.js +0 -6
- package/lib/Empty/index.d.ts +1 -1
- package/lib/Empty/index.js +15 -37
- package/lib/Form/index.js +0 -4
- package/lib/Form/style/index.js +0 -1
- package/lib/Icon/antdIconfont.js +0 -1
- package/lib/Icon/components/Icon.js +14 -16
- package/lib/Icon/components/createFromScripts.js +2 -8
- package/lib/Icon/icons/AddLine.js +16 -30
- package/lib/Icon/icons/AlertFill.js +16 -30
- package/lib/Icon/icons/ArrowsDownLine.js +16 -30
- package/lib/Icon/icons/CancelFill.js +16 -30
- package/lib/Icon/icons/CheckFill.js +16 -30
- package/lib/Icon/icons/CheckLine.js +16 -30
- package/lib/Icon/icons/CloseLine.js +16 -30
- package/lib/Icon/icons/DatabaseLine.js +16 -30
- package/lib/Icon/icons/Deleteline.js +16 -30
- package/lib/Icon/icons/DownloadLine.js +16 -30
- package/lib/Icon/icons/ErrorFill.js +16 -30
- package/lib/Icon/icons/EyeOffLine.js +16 -30
- package/lib/Icon/icons/EyeOnLine.js +16 -30
- package/lib/Icon/icons/FileLine.js +16 -30
- package/lib/Icon/icons/HomeFill.js +16 -30
- package/lib/Icon/icons/LightningLine.js +16 -30
- package/lib/Icon/icons/Loading.js +16 -30
- package/lib/Icon/icons/More.js +16 -30
- package/lib/Icon/icons/NewWindowsLine.js +16 -30
- package/lib/Icon/icons/SearchLine.js +16 -30
- package/lib/Icon/icons/SortAscendingLine.js +16 -30
- package/lib/Icon/icons/SortDescendingLine.js +16 -30
- package/lib/Icon/icons/TextLine.js +16 -30
- package/lib/Icon/icons/UserLine.js +16 -30
- package/lib/Icon/icons.js +1658 -1588
- package/lib/Icon/index.js +0 -3
- package/lib/Input/components/Group/index.js +11 -16
- package/lib/Input/components/Input/index.d.ts +2 -2
- package/lib/Input/components/Input/index.js +10 -16
- package/lib/Input/components/Password/index.js +12 -21
- package/lib/Input/components/TextArea/index.js +13 -18
- package/lib/Input/index.js +0 -6
- package/lib/Input/style/index.js +0 -2
- package/lib/InputNumber/index.js +10 -18
- package/lib/InputNumber/style/index.js +0 -1
- package/lib/Layout/index.js +0 -4
- package/lib/Layout/style/index.js +0 -1
- package/lib/Menu/Divider.js +7 -7
- package/lib/Menu/MenuItem.js +7 -7
- package/lib/Menu/SubMenu.js +8 -13
- package/lib/Menu/index.d.ts +1 -1
- package/lib/Menu/index.js +8 -16
- package/lib/Menu/style/index.js +0 -2
- package/lib/Modal/index.d.ts +1 -1
- package/lib/Modal/index.js +17 -45
- package/lib/Modal/locale.js +4 -9
- package/lib/Modal/style/index.js +0 -1
- package/lib/Modal/style/index.less +6 -1
- package/lib/Navigator/components/Header/index.js +0 -4
- package/lib/Navigator/components/Menu/index.js +13 -24
- package/lib/Navigator/components/MenuItem/index.js +6 -15
- package/lib/Navigator/index.js +5 -15
- package/lib/Navigator/style/index.js +0 -1
- package/lib/PageHeader/index.js +0 -4
- package/lib/PageHeader/style/index.js +0 -1
- package/lib/Popconfirm/index.d.ts +89 -2
- package/lib/Popconfirm/index.js +106 -5
- package/lib/Popconfirm/style/index.js +0 -1
- package/lib/Popconfirm/style/index.less +58 -0
- package/lib/Popover/index.js +9 -14
- package/lib/Popover/style/index.js +0 -1
- package/lib/Progress/index.js +0 -3
- package/lib/Progress/style/index.js +0 -1
- package/lib/Radio/components/Group/index.d.ts +1 -1
- package/lib/Radio/components/Group/index.js +22 -41
- package/lib/Radio/components/Radio/index.js +10 -30
- package/lib/Radio/index.js +0 -4
- package/lib/Radio/interface/radioGroup.d.ts +3 -3
- package/lib/Radio/style/index.js +0 -1
- package/lib/Row/index.js +0 -4
- package/lib/Row/style/index.js +0 -1
- package/lib/Select/index.d.ts +4 -4
- package/lib/Select/index.js +52 -87
- package/lib/Select/rc-select/BaseSelect.d.ts +7 -7
- package/lib/Select/rc-select/BaseSelect.js +155 -266
- package/lib/Select/rc-select/OptGroup.js +0 -2
- package/lib/Select/rc-select/Option.js +0 -2
- package/lib/Select/rc-select/OptionList.d.ts +2 -2
- package/lib/Select/rc-select/OptionList.js +75 -146
- package/lib/Select/rc-select/Select.d.ts +8 -8
- package/lib/Select/rc-select/Select.js +137 -224
- package/lib/Select/rc-select/SelectContext.js +1 -5
- package/lib/Select/rc-select/SelectTrigger.js +29 -49
- package/lib/Select/rc-select/Selector/Input.d.ts +1 -1
- package/lib/Select/rc-select/Selector/Input.js +29 -46
- package/lib/Select/rc-select/Selector/MultipleSelector.js +71 -109
- package/lib/Select/rc-select/Selector/SingleSelector.js +28 -50
- package/lib/Select/rc-select/Selector/index.js +32 -67
- package/lib/Select/rc-select/TransBtn.js +5 -16
- package/lib/Select/rc-select/hooks/useBaseProps.js +1 -7
- package/lib/Select/rc-select/hooks/useCache.d.ts +1 -1
- package/lib/Select/rc-select/hooks/useCache.js +9 -18
- package/lib/Select/rc-select/hooks/useDelayReset.js +4 -22
- package/lib/Select/rc-select/hooks/useFilterOptions.d.ts +1 -1
- package/lib/Select/rc-select/hooks/useFilterOptions.js +8 -25
- package/lib/Select/rc-select/hooks/useId.js +6 -26
- package/lib/Select/rc-select/hooks/useLayoutEffect.js +0 -6
- package/lib/Select/rc-select/hooks/useLock.js +2 -10
- package/lib/Select/rc-select/hooks/useOptions.d.ts +2 -2
- package/lib/Select/rc-select/hooks/useOptions.js +2 -15
- package/lib/Select/rc-select/hooks/useRefFunc.js +0 -5
- package/lib/Select/rc-select/hooks/useSelectTriggerControl.js +1 -10
- package/lib/Select/rc-select/index.js +0 -7
- package/lib/Select/rc-select/utils/commonUtil.js +0 -4
- package/lib/Select/rc-select/utils/keyUtil.js +4 -5
- package/lib/Select/rc-select/utils/legacyUtil.js +12 -28
- package/lib/Select/rc-select/utils/platformUtil.js +0 -1
- package/lib/Select/rc-select/utils/valueUtil.js +18 -55
- package/lib/Select/rc-select/utils/warningPropsUtil.js +30 -56
- package/lib/Select/style/index.js +0 -2
- package/lib/Select/style/status.less +3 -1
- package/lib/Select/utils/iconUtil.d.ts +3 -3
- package/lib/Select/utils/iconUtil.js +16 -39
- package/lib/Skeleton/index.js +0 -3
- package/lib/Skeleton/style/index.js +0 -1
- package/lib/Space/index.js +2 -9
- package/lib/Space/style/index.js +0 -1
- package/lib/Spin/index.d.ts +2 -2
- package/lib/Spin/index.js +0 -3
- package/lib/Spin/style/index.js +0 -1
- package/lib/Steps/components/ProcessIcon/index.js +0 -4
- package/lib/Steps/components/Step/index.d.ts +1 -1
- package/lib/Steps/components/Step/index.js +9 -18
- package/lib/Steps/index.d.ts +8 -2
- package/lib/Steps/index.js +63 -17
- package/lib/Steps/style/index.js +0 -1
- package/lib/Steps/style/index.less +11 -12
- package/lib/Switch/index.js +17 -37
- package/lib/Switch/style/index.js +0 -1
- package/lib/Table/Table.js +117 -216
- package/lib/Table/components/Empty/index.js +0 -6
- package/lib/Table/components/Loading/index.js +0 -7
- package/lib/Table/components/TableBodyRowList/index.js +19 -47
- package/lib/Table/components/TableHead/index.js +56 -108
- package/lib/Table/index.js +0 -3
- package/lib/Table/interface.d.ts +1 -1
- package/lib/Table/style/index.js +0 -1
- package/lib/Table/style/index.less +8 -4
- package/lib/Table/utils.js +8 -33
- package/lib/Tabs/index.d.ts +22 -7
- package/lib/Tabs/index.js +10 -28
- package/lib/Tabs/style/index.js +0 -2
- package/lib/Tooltip/index.d.ts +1 -1
- package/lib/Tooltip/index.js +12 -17
- package/lib/Tooltip/style/index.js +0 -1
- package/lib/Tree/index.js +0 -3
- package/lib/Tree/style/index.js +0 -1
- package/lib/Typography/index.js +0 -4
- package/lib/Typography/style/index.js +0 -1
- package/lib/Upload/index.js +0 -4
- package/lib/Upload/style/index.js +0 -1
- package/lib/_utils/hooks/useControlledState.d.ts +1 -1
- package/lib/_utils/hooks/useControlledState.js +8 -23
- package/lib/_utils/hooks/useId.js +3 -10
- package/lib/_utils/hooks/usePrefixCls.d.ts +1 -1
- package/lib/_utils/hooks/usePrefixCls.js +2 -10
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -42
- package/lib/locale/default.js +0 -3
- package/lib/locale/en_US.js +1 -6
- package/lib/locale/zh_CN.js +1 -6
- package/lib/locale-provider/LocaleReceiver.js +0 -5
- package/lib/locale-provider/context.d.ts +1 -1
- package/lib/locale-provider/context.js +0 -2
- package/lib/locale-provider/default.js +0 -3
- package/lib/locale-provider/en_US.js +0 -3
- package/lib/locale-provider/index.js +8 -37
- package/lib/locale-provider/zh_CN.js +0 -3
- package/lib/message/index.js +0 -4
- package/lib/message/style/index.js +0 -1
- package/lib/notification/index.js +0 -4
- package/lib/notification/style/index.js +0 -1
- package/package.json +4 -3
- package/es/Table/hooks/useFrame.d.ts +0 -7
- package/es/Table/hooks/useFrame.js +0 -90
- package/es/Tabs/TabPane.d.ts +0 -21
- package/es/Tabs/TabPane.js +0 -6
- package/lib/Table/hooks/useFrame.d.ts +0 -7
- package/lib/Table/hooks/useFrame.js +0 -98
- package/lib/Tabs/TabPane.d.ts +0 -21
- package/lib/Tabs/TabPane.js +0 -18
package/lib/Table/utils.js
CHANGED
|
@@ -13,8 +13,8 @@ exports.isSpecificPxWidth = isSpecificPxWidth;
|
|
|
13
13
|
var ZERO = 0;
|
|
14
14
|
var NOT_SET = -1;
|
|
15
15
|
var COLUMN_MIN_WIDTH = 80;
|
|
16
|
-
var HUNDRED = 100;
|
|
17
|
-
|
|
16
|
+
var HUNDRED = 100;
|
|
17
|
+
// TODO: 添加单侧
|
|
18
18
|
function getColumnsWidthMap(columns, clientWidth, lastWidthMap) {
|
|
19
19
|
var settedTotalWidth = ZERO;
|
|
20
20
|
var unsetWidthIndex = [];
|
|
@@ -23,64 +23,53 @@ function getColumnsWidthMap(columns, clientWidth, lastWidthMap) {
|
|
|
23
23
|
columns.forEach(function (item, index) {
|
|
24
24
|
var key = index.toString();
|
|
25
25
|
var widthFlex = item.widthFlex;
|
|
26
|
-
var width = getWidthByColumnsWidth(clientWidth, item.width, widthFlex);
|
|
27
|
-
|
|
26
|
+
var width = getWidthByColumnsWidth(clientWidth, item.width, widthFlex);
|
|
27
|
+
// 首先判断是否是否是容器宽度的变化
|
|
28
28
|
var isSpecific;
|
|
29
|
-
|
|
30
29
|
if (widthFlex) {
|
|
31
30
|
isSpecific = false;
|
|
32
31
|
} else {
|
|
33
32
|
var _lastWidthMap$get;
|
|
34
|
-
|
|
35
33
|
isSpecific = lastWidthMap ? (_lastWidthMap$get = lastWidthMap.get(key)) === null || _lastWidthMap$get === void 0 ? void 0 : _lastWidthMap$get.isSpecific : isSpecificWidth(item.width);
|
|
36
34
|
}
|
|
37
|
-
|
|
38
35
|
if (lastWidthMap && isSpecific) {
|
|
39
36
|
var _lastWidthMap$get2;
|
|
40
|
-
|
|
41
37
|
width = (_lastWidthMap$get2 = lastWidthMap.get(key)) === null || _lastWidthMap$get2 === void 0 ? void 0 : _lastWidthMap$get2.width;
|
|
42
38
|
}
|
|
43
|
-
|
|
44
39
|
if (width === NOT_SET) {
|
|
45
40
|
unsetWidthIndex.push(key);
|
|
46
41
|
} else {
|
|
47
42
|
settedTotalWidth += width;
|
|
48
43
|
}
|
|
49
|
-
|
|
50
44
|
widthMap.set(key, {
|
|
51
45
|
width: width,
|
|
52
46
|
isSpecific: isSpecific
|
|
53
47
|
});
|
|
54
|
-
});
|
|
55
|
-
|
|
48
|
+
});
|
|
49
|
+
// 设定宽度大于容器宽度时
|
|
56
50
|
if (settedTotalWidth < clientWidth) {
|
|
57
51
|
unsetWidthIndex.map(function (item) {
|
|
58
52
|
var _widthMap$get;
|
|
59
|
-
|
|
60
53
|
return widthMap.set(item, {
|
|
61
54
|
isSpecific: (_widthMap$get = widthMap.get(item)) === null || _widthMap$get === void 0 ? void 0 : _widthMap$get.isSpecific,
|
|
62
55
|
width: COLUMN_MIN_WIDTH
|
|
63
56
|
});
|
|
64
57
|
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
}
|
|
59
|
+
// 设定宽度小于容器宽度时
|
|
68
60
|
if (unsetWidthIndex.length > ZERO) {
|
|
69
61
|
var leftWidth = clientWidth - settedTotalWidth;
|
|
70
62
|
var average = getValidWidthByNumber(leftWidth / unsetWidthIndex.length);
|
|
71
63
|
unsetWidthIndex.map(function (item) {
|
|
72
64
|
var _widthMap$get2;
|
|
73
|
-
|
|
74
65
|
return widthMap.set(item, {
|
|
75
66
|
isSpecific: (_widthMap$get2 = widthMap.get(item)) === null || _widthMap$get2 === void 0 ? void 0 : _widthMap$get2.isSpecific,
|
|
76
67
|
width: average
|
|
77
68
|
});
|
|
78
69
|
});
|
|
79
70
|
}
|
|
80
|
-
|
|
81
71
|
columns.forEach(function (item, index) {
|
|
82
72
|
var _widthMap$get3;
|
|
83
|
-
|
|
84
73
|
var key = index.toString();
|
|
85
74
|
var width = (_widthMap$get3 = widthMap.get(key)) === null || _widthMap$get3 === void 0 ? void 0 : _widthMap$get3.width;
|
|
86
75
|
totalColumnWidth += width;
|
|
@@ -90,47 +79,36 @@ function getColumnsWidthMap(columns, clientWidth, lastWidthMap) {
|
|
|
90
79
|
totalColumnWidth: totalColumnWidth
|
|
91
80
|
};
|
|
92
81
|
}
|
|
93
|
-
|
|
94
82
|
function getWidthByColumnsWidth(clientWidth, width, widthFlex) {
|
|
95
83
|
if (width === undefined || widthFlex) {
|
|
96
84
|
return NOT_SET;
|
|
97
85
|
}
|
|
98
|
-
|
|
99
86
|
if (typeof width === 'number') {
|
|
100
87
|
return getValidWidthByNumber(width);
|
|
101
88
|
}
|
|
102
|
-
|
|
103
89
|
if (isPercentageWidth(width)) {
|
|
104
90
|
return getPercentageValue(width, clientWidth);
|
|
105
91
|
}
|
|
106
|
-
|
|
107
92
|
if (isSpecificPxWidth(width)) {
|
|
108
93
|
var specificNum = getPxValue(width);
|
|
109
94
|
return getValidWidthByNumber(specificNum);
|
|
110
95
|
}
|
|
111
|
-
|
|
112
96
|
return NOT_SET;
|
|
113
97
|
}
|
|
114
|
-
|
|
115
98
|
function isPercentageWidth(width) {
|
|
116
99
|
return /[0-9]{1,}%$/.test(width);
|
|
117
100
|
}
|
|
118
|
-
|
|
119
101
|
function isSpecificPxWidth(width) {
|
|
120
102
|
return /[0-9]{1,}(px)$/.test(width);
|
|
121
103
|
}
|
|
122
|
-
|
|
123
104
|
function isSpecificWidth(width) {
|
|
124
105
|
return typeof width === 'number' || !!(width && isSpecificPxWidth(width));
|
|
125
106
|
}
|
|
126
|
-
|
|
127
107
|
function getValidWidthByNumber(width) {
|
|
128
108
|
return width < COLUMN_MIN_WIDTH ? COLUMN_MIN_WIDTH : width;
|
|
129
109
|
}
|
|
130
|
-
|
|
131
110
|
function getValidScrollThreshold(height, clientHeight) {
|
|
132
111
|
var scrollThreshold = ZERO;
|
|
133
|
-
|
|
134
112
|
if (typeof height === 'string') {
|
|
135
113
|
if (isPercentageWidth(height)) {
|
|
136
114
|
scrollThreshold = getPercentageValue(height, clientHeight);
|
|
@@ -140,15 +118,12 @@ function getValidScrollThreshold(height, clientHeight) {
|
|
|
140
118
|
} else {
|
|
141
119
|
scrollThreshold = height;
|
|
142
120
|
}
|
|
143
|
-
|
|
144
121
|
return scrollThreshold;
|
|
145
122
|
}
|
|
146
|
-
|
|
147
123
|
function getPercentageValue(percentage, containerNum) {
|
|
148
124
|
var percent = Number(percentage.replace('%', '')) / HUNDRED;
|
|
149
125
|
return getValidWidthByNumber(containerNum * percent);
|
|
150
126
|
}
|
|
151
|
-
|
|
152
127
|
function getPxValue(px) {
|
|
153
128
|
return Number(px.replace('px', ''));
|
|
154
129
|
}
|
package/lib/Tabs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { TabsProps } from 'antd';
|
|
3
|
-
export
|
|
3
|
+
export type TabsSize = 'default' | 'large';
|
|
4
4
|
export interface ITabsProps extends Omit<TabsProps, 'size'> {
|
|
5
5
|
/**
|
|
6
6
|
* @description 大小
|
|
@@ -38,10 +38,25 @@ export interface ITabsProps extends Omit<TabsProps, 'size'> {
|
|
|
38
38
|
*/
|
|
39
39
|
tabPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
40
40
|
className?: string;
|
|
41
|
-
|
|
41
|
+
items: ITabItem[];
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
export default function Tabs(props: ITabsProps): JSX.Element;
|
|
44
|
+
export interface ITabItem {
|
|
45
|
+
/**
|
|
46
|
+
* @description 被隐藏时是否渲染 DOM 结构
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
forceRender?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* @description 对应 activeKey
|
|
52
|
+
* @default -
|
|
53
|
+
*/
|
|
54
|
+
key: string;
|
|
55
|
+
/**
|
|
56
|
+
* @description 选项卡头显示的内容
|
|
57
|
+
* @default -
|
|
58
|
+
*/
|
|
59
|
+
label: ReactNode;
|
|
60
|
+
className?: string;
|
|
61
|
+
children?: ReactNode;
|
|
46
62
|
}
|
|
47
|
-
export default Tabs;
|
package/lib/Tabs/index.js
CHANGED
|
@@ -1,52 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = Tabs;
|
|
7
|
-
|
|
8
8
|
require("@aloudata/icons-react/styles/index.less");
|
|
9
|
-
|
|
10
9
|
var _MoreFill2 = _interopRequireDefault(require("@aloudata/icons-react/es/icons/MoreFill"));
|
|
11
|
-
|
|
12
10
|
require("antd/es/tabs/style");
|
|
13
|
-
|
|
14
11
|
var _tabs = _interopRequireDefault(require("antd/es/tabs"));
|
|
15
|
-
|
|
16
12
|
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
|
|
18
|
-
var _TabPane = _interopRequireDefault(require("./TabPane"));
|
|
19
|
-
|
|
20
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
-
|
|
22
14
|
var _excluded = ["size", "className", "popupClassName", "adaptHeight"];
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
-
|
|
28
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
18
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
32
21
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
33
|
-
|
|
34
22
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
35
|
-
|
|
36
23
|
function Tabs(props) {
|
|
37
24
|
var size = props.size,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
25
|
+
className = props.className,
|
|
26
|
+
popupClassName = props.popupClassName,
|
|
27
|
+
adaptHeight = props.adaptHeight,
|
|
28
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
43
29
|
var tabsProps = _objectSpread({}, otherProps);
|
|
44
|
-
|
|
45
30
|
if (size === 'large') {
|
|
46
31
|
tabsProps.size = size;
|
|
47
32
|
}
|
|
48
|
-
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_tabs.default, Object.assign({
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_tabs.default, _objectSpread({
|
|
50
34
|
moreIcon: /*#__PURE__*/_react.default.createElement("div", {
|
|
51
35
|
className: "ald-tabs-moreIcon"
|
|
52
36
|
}, /*#__PURE__*/_react.default.createElement(_MoreFill2.default, {
|
|
@@ -59,6 +43,4 @@ function Tabs(props) {
|
|
|
59
43
|
'ald-tabs-default': size !== 'large'
|
|
60
44
|
})
|
|
61
45
|
}, tabsProps));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
Tabs.TabPane = _TabPane.default;
|
|
46
|
+
}
|
package/lib/Tabs/style/index.js
CHANGED
package/lib/Tooltip/index.d.ts
CHANGED
package/lib/Tooltip/index.js
CHANGED
|
@@ -4,29 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = Tooltip;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _tooltip = _interopRequireDefault(require("antd/lib/tooltip"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function Tooltip(props) {
|
|
17
12
|
var children = props.children,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
title = props.title,
|
|
14
|
+
open = props.open,
|
|
15
|
+
onOpenChange = props.onOpenChange,
|
|
16
|
+
trigger = props.trigger,
|
|
17
|
+
zIndex = props.zIndex,
|
|
18
|
+
placement = props.placement,
|
|
19
|
+
mouseEnterDelay = props.mouseEnterDelay,
|
|
20
|
+
mouseLeaveDelay = props.mouseLeaveDelay,
|
|
21
|
+
getPopupContainer = props.getPopupContainer,
|
|
22
|
+
destroyTooltipOnHide = props.destroyTooltipOnHide,
|
|
23
|
+
getTooltipContainer = props.getTooltipContainer,
|
|
24
|
+
overlayClassName = props.overlayClassName;
|
|
30
25
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
31
26
|
title: title,
|
|
32
27
|
overlayClassName: (0, _classnames.default)('ald-tooltip-overlay', overlayClassName),
|
package/lib/Tree/index.js
CHANGED
|
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _tree = _interopRequireDefault(require("antd/es/tree"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = _tree.default;
|
|
13
10
|
exports.default = _default;
|
package/lib/Tree/style/index.js
CHANGED
package/lib/Typography/index.js
CHANGED
|
@@ -4,12 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
require("antd/es/typography/style");
|
|
9
|
-
|
|
10
8
|
var _typography = _interopRequireDefault(require("antd/es/typography"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var _default = _typography.default;
|
|
15
11
|
exports.default = _default;
|
package/lib/Upload/index.js
CHANGED
|
@@ -4,12 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
require("antd/es/upload/style");
|
|
9
|
-
|
|
10
8
|
var _upload = _interopRequireDefault(require("antd/es/upload"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var _default = _upload.default;
|
|
15
11
|
exports.default = _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useControlledState: <T>(outerState: T | (() => T) | undefined, defaultOuterState: T, callback?: ((state: T | (() => T)) => void) | undefined) => [T, (state: T | (() => T), force?: boolean
|
|
1
|
+
declare const useControlledState: <T>(outerState: T | (() => T) | undefined, defaultOuterState: T, callback?: ((state: T | (() => T)) => void) | undefined) => [T, (state: T | (() => T), force?: boolean) => void];
|
|
2
2
|
export default useControlledState;
|
|
@@ -4,52 +4,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _lodash = require("lodash");
|
|
11
|
-
|
|
12
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
-
|
|
14
10
|
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."); }
|
|
15
|
-
|
|
16
11
|
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); }
|
|
17
|
-
|
|
18
12
|
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; }
|
|
19
|
-
|
|
20
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
21
|
-
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
22
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
-
|
|
24
15
|
function format(_ref) {
|
|
25
16
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
innerState = _ref2[0],
|
|
18
|
+
outerState = _ref2[1];
|
|
29
19
|
var isControlled = (0, _lodash.isUndefined)(outerState) ? 'uncontrolled' : 'controlled';
|
|
30
20
|
var value = (0, _lodash.isUndefined)(outerState) ? innerState : outerState;
|
|
31
21
|
return "State is ".concat(isControlled, " | Value is ").concat(value);
|
|
32
22
|
}
|
|
33
|
-
|
|
34
23
|
var useControlledState = function useControlledState(outerState, defaultOuterState, callback) {
|
|
35
24
|
// if (outerState === undefined && defaultOuterState === undefined) {
|
|
36
25
|
// throw new TypeError('Either "value" or "defaultValue" variable must be set. Now both are undefined');
|
|
37
26
|
// }
|
|
38
27
|
var _useState = (0, _react.useState)((0, _lodash.isUndefined)(outerState) ? defaultOuterState : outerState),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
innerState = _useState2[0],
|
|
30
|
+
setInnerState = _useState2[1];
|
|
43
31
|
var setState = (0, _react.useRef)(function (state) {
|
|
44
32
|
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
45
|
-
|
|
46
33
|
if ((0, _lodash.isUndefined)(outerState) || force) {
|
|
47
34
|
setInnerState(state);
|
|
48
35
|
}
|
|
49
|
-
|
|
50
36
|
callback === null || callback === void 0 ? void 0 : callback(state);
|
|
51
|
-
}).current;
|
|
52
|
-
|
|
37
|
+
}).current;
|
|
38
|
+
// @ts-ignore
|
|
53
39
|
(0, _react.useDebugValue)([innerState, outerState], format);
|
|
54
40
|
(0, _react.useEffect)(function () {
|
|
55
41
|
if (!(0, _lodash.isUndefined)(outerState)) {
|
|
@@ -58,6 +44,5 @@ var useControlledState = function useControlledState(outerState, defaultOuterSta
|
|
|
58
44
|
}, [outerState]);
|
|
59
45
|
return [innerState, setState];
|
|
60
46
|
};
|
|
61
|
-
|
|
62
47
|
var _default = useControlledState;
|
|
63
48
|
exports.default = _default;
|
|
@@ -5,32 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getUUID = getUUID;
|
|
7
7
|
exports.isBrowserClient = void 0;
|
|
8
|
-
|
|
9
8
|
var _canUseDom = _interopRequireDefault(require("rc-util/lib/Dom/canUseDom"));
|
|
10
|
-
|
|
11
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
10
|
// @ts-nocheck
|
|
11
|
+
|
|
14
12
|
var uuid = 0;
|
|
15
13
|
/** Is client side and not jsdom */
|
|
16
14
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
17
|
-
|
|
18
15
|
var isBrowserClient = process.env.NODE_ENV !== 'test' && (0, _canUseDom.default)();
|
|
19
16
|
/** Get unique id for accessibility usage */
|
|
20
|
-
|
|
21
17
|
exports.isBrowserClient = isBrowserClient;
|
|
22
|
-
|
|
23
18
|
function getUUID() {
|
|
24
|
-
var retId;
|
|
25
|
-
|
|
19
|
+
var retId;
|
|
20
|
+
// Test never reach
|
|
26
21
|
/* istanbul ignore if */
|
|
27
|
-
|
|
28
22
|
if (isBrowserClient) {
|
|
29
23
|
retId = uuid;
|
|
30
24
|
uuid += 1;
|
|
31
25
|
} else {
|
|
32
26
|
retId = 'TEST_OR_SSR';
|
|
33
27
|
}
|
|
34
|
-
|
|
35
28
|
return retId;
|
|
36
29
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const usePrefixCls: (subPrefixCls?: string
|
|
1
|
+
declare const usePrefixCls: (subPrefixCls?: string, customRootPrefixCls?: string) => string;
|
|
2
2
|
export default usePrefixCls;
|
|
@@ -4,24 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
require("antd/es/config-provider/style");
|
|
9
|
-
|
|
10
8
|
var _configProvider = _interopRequireDefault(require("antd/es/config-provider"));
|
|
11
|
-
|
|
12
9
|
var _react = require("react");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
var ConfigContext = _configProvider.default.ConfigContext;
|
|
17
|
-
|
|
18
12
|
var usePrefixCls = function usePrefixCls(subPrefixCls, customRootPrefixCls) {
|
|
19
13
|
var _useContext = (0, _react.useContext)(ConfigContext),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
rootPrefixCls = _useContext.rootPrefixCls,
|
|
15
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
23
16
|
return getPrefixCls(subPrefixCls, customRootPrefixCls !== null && customRootPrefixCls !== void 0 ? customRootPrefixCls : rootPrefixCls);
|
|
24
17
|
};
|
|
25
|
-
|
|
26
18
|
var _default = usePrefixCls;
|
|
27
19
|
exports.default = _default;
|
package/lib/index.d.ts
CHANGED
|
@@ -77,5 +77,5 @@ export type { IAvatarProps as AvatarProps } from './Avatar';
|
|
|
77
77
|
export { default as Icon } from './Icon';
|
|
78
78
|
export type { PageHeaderProps } from './PageHeader';
|
|
79
79
|
export { default as PageHeader } from './PageHeader';
|
|
80
|
-
export type { PopconfirmProps } from './Popconfirm';
|
|
80
|
+
export type { IPopconfirmProps as PopconfirmProps } from './Popconfirm';
|
|
81
81
|
export { default as Popconfirm } from './Popconfirm';
|
package/lib/index.js
CHANGED
|
@@ -249,87 +249,45 @@ Object.defineProperty(exports, "notification", {
|
|
|
249
249
|
return _notification.default;
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
|
-
|
|
253
252
|
var _Button = _interopRequireDefault(require("./Button"));
|
|
254
|
-
|
|
255
253
|
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
256
|
-
|
|
257
254
|
var _Menu = _interopRequireDefault(require("./Menu"));
|
|
258
|
-
|
|
259
255
|
var _Input = _interopRequireDefault(require("./Input"));
|
|
260
|
-
|
|
261
256
|
var _Tabs = _interopRequireDefault(require("./Tabs"));
|
|
262
|
-
|
|
263
257
|
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
264
|
-
|
|
265
258
|
var _Select = _interopRequireDefault(require("./Select"));
|
|
266
|
-
|
|
267
259
|
var _Table = _interopRequireDefault(require("./Table"));
|
|
268
|
-
|
|
269
260
|
var _Navigator = _interopRequireDefault(require("./Navigator"));
|
|
270
|
-
|
|
271
261
|
var _Alert = _interopRequireDefault(require("./Alert"));
|
|
272
|
-
|
|
273
262
|
var _Card = _interopRequireDefault(require("./Card"));
|
|
274
|
-
|
|
275
263
|
var _Col = _interopRequireDefault(require("./Col"));
|
|
276
|
-
|
|
277
264
|
var _Typography = _interopRequireDefault(require("./Typography"));
|
|
278
|
-
|
|
279
265
|
var _Upload = _interopRequireDefault(require("./Upload"));
|
|
280
|
-
|
|
281
266
|
var _ConfigProvider = _interopRequireDefault(require("./ConfigProvider"));
|
|
282
|
-
|
|
283
267
|
var _DatePicker = _interopRequireDefault(require("./DatePicker"));
|
|
284
|
-
|
|
285
268
|
var _Layout = _interopRequireDefault(require("./Layout"));
|
|
286
|
-
|
|
287
269
|
var _message = _interopRequireDefault(require("./message"));
|
|
288
|
-
|
|
289
270
|
var _notification = _interopRequireDefault(require("./notification"));
|
|
290
|
-
|
|
291
271
|
var _Tree = _interopRequireDefault(require("./Tree"));
|
|
292
|
-
|
|
293
272
|
var _Skeleton = _interopRequireDefault(require("./Skeleton"));
|
|
294
|
-
|
|
295
273
|
var _Row = _interopRequireDefault(require("./Row"));
|
|
296
|
-
|
|
297
274
|
var _Space = _interopRequireDefault(require("./Space"));
|
|
298
|
-
|
|
299
275
|
var _Spin = _interopRequireDefault(require("./Spin"));
|
|
300
|
-
|
|
301
276
|
var _Progress = _interopRequireDefault(require("./Progress"));
|
|
302
|
-
|
|
303
277
|
var _Switch = _interopRequireDefault(require("./Switch"));
|
|
304
|
-
|
|
305
278
|
var _Steps = _interopRequireDefault(require("./Steps"));
|
|
306
|
-
|
|
307
279
|
var _Form = _interopRequireDefault(require("./Form"));
|
|
308
|
-
|
|
309
280
|
var _Divider = _interopRequireDefault(require("./Divider"));
|
|
310
|
-
|
|
311
281
|
var _Drawer = _interopRequireDefault(require("./Drawer"));
|
|
312
|
-
|
|
313
282
|
var _Radio = _interopRequireDefault(require("./Radio"));
|
|
314
|
-
|
|
315
283
|
var _Checkbox = _interopRequireDefault(require("./Checkbox"));
|
|
316
|
-
|
|
317
284
|
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
318
|
-
|
|
319
285
|
var _Popover = _interopRequireDefault(require("./Popover"));
|
|
320
|
-
|
|
321
286
|
var _InputNumber = _interopRequireDefault(require("./InputNumber"));
|
|
322
|
-
|
|
323
287
|
var _Breadcrumb = _interopRequireDefault(require("./Breadcrumb"));
|
|
324
|
-
|
|
325
288
|
var _Empty = _interopRequireDefault(require("./Empty"));
|
|
326
|
-
|
|
327
289
|
var _Avatar = _interopRequireDefault(require("./Avatar"));
|
|
328
|
-
|
|
329
290
|
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
330
|
-
|
|
331
291
|
var _PageHeader = _interopRequireDefault(require("./PageHeader"));
|
|
332
|
-
|
|
333
292
|
var _Popconfirm = _interopRequireDefault(require("./Popconfirm"));
|
|
334
|
-
|
|
335
293
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/lib/locale/default.js
CHANGED
|
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _zh_CN = _interopRequireDefault(require("./zh_CN"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = _zh_CN.default;
|
|
13
10
|
exports.default = _default;
|
package/lib/locale/en_US.js
CHANGED
|
@@ -4,18 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _en_US = _interopRequireDefault(require("rc-pagination/lib/locale/en_US"));
|
|
9
|
-
|
|
10
8
|
var _en_US2 = _interopRequireDefault(require("antd/es/calendar/locale/en_US"));
|
|
11
|
-
|
|
12
9
|
var _en_US3 = _interopRequireDefault(require("antd/es/date-picker/locale/en_US"));
|
|
13
|
-
|
|
14
10
|
var _en_US4 = _interopRequireDefault(require("antd/es/time-picker/locale/en_US"));
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
/* eslint-disable no-template-curly-in-string */
|
|
13
|
+
|
|
19
14
|
var typeTemplate = '${label} is not a valid ${type}';
|
|
20
15
|
var localeValues = {
|
|
21
16
|
locale: 'en',
|