@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
|
@@ -1,47 +1,35 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
2
|
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."); }
|
|
4
|
-
|
|
5
3
|
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); }
|
|
6
|
-
|
|
7
4
|
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; }
|
|
8
|
-
|
|
9
|
-
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; }
|
|
10
|
-
|
|
5
|
+
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; } }
|
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
7
|
import { useState, useEffect, useRef, useDebugValue } from 'react';
|
|
14
8
|
import { isUndefined } from 'lodash';
|
|
15
|
-
|
|
16
9
|
function format(_ref) {
|
|
17
10
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
innerState = _ref2[0],
|
|
12
|
+
outerState = _ref2[1];
|
|
21
13
|
var isControlled = isUndefined(outerState) ? 'uncontrolled' : 'controlled';
|
|
22
14
|
var value = isUndefined(outerState) ? innerState : outerState;
|
|
23
15
|
return "State is ".concat(isControlled, " | Value is ").concat(value);
|
|
24
16
|
}
|
|
25
|
-
|
|
26
17
|
var useControlledState = function useControlledState(outerState, defaultOuterState, callback) {
|
|
27
18
|
// if (outerState === undefined && defaultOuterState === undefined) {
|
|
28
19
|
// throw new TypeError('Either "value" or "defaultValue" variable must be set. Now both are undefined');
|
|
29
20
|
// }
|
|
30
21
|
var _useState = useState(isUndefined(outerState) ? defaultOuterState : outerState),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
innerState = _useState2[0],
|
|
24
|
+
setInnerState = _useState2[1];
|
|
35
25
|
var setState = useRef(function (state) {
|
|
36
26
|
var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
37
|
-
|
|
38
27
|
if (isUndefined(outerState) || force) {
|
|
39
28
|
setInnerState(state);
|
|
40
29
|
}
|
|
41
|
-
|
|
42
30
|
callback === null || callback === void 0 ? void 0 : callback(state);
|
|
43
|
-
}).current;
|
|
44
|
-
|
|
31
|
+
}).current;
|
|
32
|
+
// @ts-ignore
|
|
45
33
|
useDebugValue([innerState, outerState], format);
|
|
46
34
|
useEffect(function () {
|
|
47
35
|
if (!isUndefined(outerState)) {
|
|
@@ -50,5 +38,4 @@ var useControlledState = function useControlledState(outerState, defaultOuterSta
|
|
|
50
38
|
}, [outerState]);
|
|
51
39
|
return [innerState, setState];
|
|
52
40
|
};
|
|
53
|
-
|
|
54
41
|
export default useControlledState;
|
package/es/_utils/hooks/useId.js
CHANGED
|
@@ -3,21 +3,17 @@ import canUseDom from 'rc-util/lib/Dom/canUseDom';
|
|
|
3
3
|
var uuid = 0;
|
|
4
4
|
/** Is client side and not jsdom */
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
6
|
-
|
|
7
6
|
export var isBrowserClient = process.env.NODE_ENV !== 'test' && canUseDom();
|
|
8
7
|
/** Get unique id for accessibility usage */
|
|
9
|
-
|
|
10
8
|
export function getUUID() {
|
|
11
|
-
var retId;
|
|
12
|
-
|
|
9
|
+
var retId;
|
|
10
|
+
// Test never reach
|
|
13
11
|
/* istanbul ignore if */
|
|
14
|
-
|
|
15
12
|
if (isBrowserClient) {
|
|
16
13
|
retId = uuid;
|
|
17
14
|
uuid += 1;
|
|
18
15
|
} else {
|
|
19
16
|
retId = 'TEST_OR_SSR';
|
|
20
17
|
}
|
|
21
|
-
|
|
22
18
|
return retId;
|
|
23
19
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const usePrefixCls: (subPrefixCls?: string
|
|
1
|
+
declare const usePrefixCls: (subPrefixCls?: string, customRootPrefixCls?: string) => string;
|
|
2
2
|
export default usePrefixCls;
|
|
@@ -2,13 +2,10 @@ import "antd/es/config-provider/style";
|
|
|
2
2
|
import _ConfigProvider from "antd/es/config-provider";
|
|
3
3
|
import { useContext } from 'react';
|
|
4
4
|
var ConfigContext = _ConfigProvider.ConfigContext;
|
|
5
|
-
|
|
6
5
|
var usePrefixCls = function usePrefixCls(subPrefixCls, customRootPrefixCls) {
|
|
7
6
|
var _useContext = useContext(ConfigContext),
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
rootPrefixCls = _useContext.rootPrefixCls,
|
|
8
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
11
9
|
return getPrefixCls(subPrefixCls, customRootPrefixCls !== null && customRootPrefixCls !== void 0 ? customRootPrefixCls : rootPrefixCls);
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
export default usePrefixCls;
|
package/es/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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Locale } from '.';
|
|
3
|
-
export
|
|
3
|
+
export type LocaleContextProps = Partial<Locale> & {
|
|
4
4
|
exist?: boolean;
|
|
5
5
|
};
|
|
6
6
|
declare const LocaleContext: import("react").Context<LocaleContextProps | undefined>;
|
|
@@ -1,35 +1,21 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
|
|
3
2
|
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; }
|
|
4
|
-
|
|
5
3
|
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; }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
4
|
+
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; }
|
|
9
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
|
-
|
|
11
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
12
|
-
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
13
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
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); }
|
|
15
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
16
|
-
|
|
17
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
18
|
-
|
|
19
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
20
|
-
|
|
21
13
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
22
|
-
|
|
23
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24
|
-
|
|
25
15
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
-
|
|
27
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
28
|
-
|
|
29
17
|
/* eslint-disable react/static-property-placement */
|
|
30
|
-
|
|
31
18
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
32
|
-
|
|
33
19
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
34
20
|
import memoizeOne from 'memoize-one';
|
|
35
21
|
import * as React from 'react';
|
|
@@ -37,17 +23,12 @@ import warning from 'antd/es/_util/warning';
|
|
|
37
23
|
import { changeConfirmLocale } from 'antd/es/modal/locale';
|
|
38
24
|
import LocaleContext from './context';
|
|
39
25
|
export var ANT_MARK = 'internalMark';
|
|
40
|
-
|
|
41
26
|
var LocaleProvider = /*#__PURE__*/function (_React$Component) {
|
|
42
27
|
_inherits(LocaleProvider, _React$Component);
|
|
43
|
-
|
|
44
28
|
var _super = _createSuper(LocaleProvider);
|
|
45
|
-
|
|
46
29
|
function LocaleProvider(props) {
|
|
47
30
|
var _this;
|
|
48
|
-
|
|
49
31
|
_classCallCheck(this, LocaleProvider);
|
|
50
|
-
|
|
51
32
|
_this = _super.call(this, props);
|
|
52
33
|
_this.getMemoizedContextValue = memoizeOne(function (localeValue) {
|
|
53
34
|
return _objectSpread(_objectSpread({}, localeValue), {}, {
|
|
@@ -55,11 +36,11 @@ var LocaleProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
55
36
|
});
|
|
56
37
|
});
|
|
57
38
|
changeConfirmLocale(props.locale && props.locale.Modal);
|
|
58
|
-
warning(
|
|
39
|
+
warning(
|
|
40
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
59
41
|
props._ANT_MARK__ === ANT_MARK, 'LocaleProvider', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale');
|
|
60
42
|
return _this;
|
|
61
43
|
}
|
|
62
|
-
|
|
63
44
|
_createClass(LocaleProvider, [{
|
|
64
45
|
key: "componentDidMount",
|
|
65
46
|
value: function componentDidMount() {
|
|
@@ -69,7 +50,6 @@ var LocaleProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
69
50
|
key: "componentDidUpdate",
|
|
70
51
|
value: function componentDidUpdate(prevProps) {
|
|
71
52
|
var locale = this.props.locale;
|
|
72
|
-
|
|
73
53
|
if (prevProps.locale !== locale) {
|
|
74
54
|
changeConfirmLocale(locale && locale.Modal);
|
|
75
55
|
}
|
|
@@ -83,20 +63,18 @@ var LocaleProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
83
63
|
key: "render",
|
|
84
64
|
value: function render() {
|
|
85
65
|
var _this$props = this.props,
|
|
86
|
-
|
|
87
|
-
|
|
66
|
+
locale = _this$props.locale,
|
|
67
|
+
children = _this$props.children;
|
|
88
68
|
var contextValue = this.getMemoizedContextValue(locale);
|
|
89
69
|
return /*#__PURE__*/React.createElement(LocaleContext.Provider, {
|
|
90
70
|
value: contextValue
|
|
91
71
|
}, children);
|
|
92
72
|
}
|
|
93
73
|
}]);
|
|
94
|
-
|
|
95
74
|
return LocaleProvider;
|
|
96
75
|
}(React.Component);
|
|
97
|
-
|
|
98
|
-
export { LocaleProvider as default };
|
|
99
76
|
LocaleProvider.defaultProps = {
|
|
100
77
|
// eslint-disable-next-line react/default-props-match-prop-types
|
|
101
78
|
locale: {}
|
|
102
|
-
};
|
|
79
|
+
};
|
|
80
|
+
export { LocaleProvider as default };
|
package/lib/Alert/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/alert/style");
|
|
9
|
-
|
|
10
8
|
var _alert = _interopRequireDefault(require("antd/es/alert"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var _default = _alert.default;
|
|
15
11
|
exports.default = _default;
|
package/lib/Alert/style/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { AvatarProps as antdAvatarProps } from 'antd/es/avatar/avatar';
|
|
3
3
|
import Group from 'antd/es/avatar/group';
|
|
4
4
|
export type { GroupProps } from 'antd/es/avatar/group';
|
|
5
|
-
|
|
5
|
+
type TSize = 'large' | 'middle' | 'small' | number;
|
|
6
6
|
export interface IAvatarProps extends Omit<antdAvatarProps, 'size'> {
|
|
7
7
|
/**
|
|
8
8
|
* @description 指定头像的形状
|
|
@@ -1,61 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _avatar = _interopRequireDefault(require("antd/es/avatar/avatar"));
|
|
13
|
-
|
|
14
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
11
|
var _excluded = ["size", "showFullValue", "children"];
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
-
|
|
22
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
24
20
|
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; }
|
|
25
|
-
|
|
26
21
|
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; }
|
|
27
|
-
|
|
28
22
|
var ZERO = 0;
|
|
29
|
-
|
|
30
23
|
var Avatar = function Avatar(props) {
|
|
31
24
|
var _props$size = props.size,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
26
|
+
_props$showFullValue = props.showFullValue,
|
|
27
|
+
showFullValue = _props$showFullValue === void 0 ? false : _props$showFullValue,
|
|
28
|
+
children = props.children,
|
|
29
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
38
30
|
var getSizeClass = function getSizeClass(avatarSize) {
|
|
39
31
|
if (['large', 'small', 'mini'].includes("".concat(avatarSize))) {
|
|
40
32
|
return (0, _classnames.default)('ald-avatar', "ald-avatar-".concat(avatarSize));
|
|
41
33
|
}
|
|
42
|
-
|
|
43
34
|
return (0, _classnames.default)('ald-avatar', 'ald-avatar-middle');
|
|
44
35
|
};
|
|
45
|
-
|
|
46
36
|
var getChildren = function getChildren() {
|
|
47
37
|
if (!showFullValue && typeof children === 'string') {
|
|
48
38
|
return children[ZERO].toLocaleUpperCase();
|
|
49
39
|
}
|
|
50
|
-
|
|
51
40
|
return children;
|
|
52
41
|
};
|
|
53
|
-
|
|
54
|
-
return /*#__PURE__*/React.createElement(_avatar.default, Object.assign({
|
|
42
|
+
return /*#__PURE__*/React.createElement(_avatar.default, _objectSpread({
|
|
55
43
|
size: typeof size === 'number' ? size : undefined,
|
|
56
44
|
className: getSizeClass(size)
|
|
57
45
|
}, restProps), getChildren());
|
|
58
46
|
};
|
|
59
|
-
|
|
60
47
|
var _default = Avatar;
|
|
61
48
|
exports.default = _default;
|
package/lib/Avatar/index.js
CHANGED
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _group = _interopRequireDefault(require("antd/es/avatar/group"));
|
|
9
|
-
|
|
10
8
|
var _Avatar = _interopRequireDefault(require("./component/Avatar"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
_Avatar.default.Group = _group.default;
|
|
15
11
|
var _default = _Avatar.default;
|
|
16
12
|
exports.default = _default;
|
package/lib/Breadcrumb/index.js
CHANGED
|
@@ -1,58 +1,49 @@
|
|
|
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 = void 0;
|
|
7
|
-
|
|
8
8
|
require("antd/es/breadcrumb/style");
|
|
9
|
-
|
|
10
9
|
var _breadcrumb = _interopRequireDefault(require("antd/es/breadcrumb"));
|
|
11
|
-
|
|
12
10
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
12
|
var _excluded = ["className", "separator"],
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
_excluded2 = ["className"];
|
|
19
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
21
20
|
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; }
|
|
22
|
-
|
|
23
21
|
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; }
|
|
24
|
-
|
|
25
22
|
var Breadcrumb = function Breadcrumb(props) {
|
|
26
23
|
var className = props.className,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
separator = props.separator,
|
|
25
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
30
26
|
var getSeparator = function getSeparator() {
|
|
31
27
|
if (separator === null) {
|
|
32
28
|
return separator;
|
|
33
29
|
}
|
|
34
|
-
|
|
35
30
|
return separator || /*#__PURE__*/_react.default.createElement("span", {
|
|
36
31
|
className: "default-separator"
|
|
37
32
|
});
|
|
38
33
|
};
|
|
39
|
-
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(_breadcrumb.default, Object.assign({}, restProps, {
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_breadcrumb.default, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
41
35
|
separator: getSeparator(),
|
|
42
36
|
className: (0, _classnames.default)('ald-breadcrumb', className)
|
|
43
37
|
}));
|
|
44
38
|
};
|
|
45
|
-
|
|
46
39
|
var BreadcrumbItem = function BreadcrumbItem(props) {
|
|
47
40
|
var className = props.className,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement(_breadcrumb.default.Item, Object.assign({}, restProps, {
|
|
41
|
+
restProps = _objectWithoutProperties(props, _excluded2);
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_breadcrumb.default.Item, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
51
43
|
className: (0, _classnames.default)('ald-breadcrumb-item', className)
|
|
52
44
|
}));
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
};
|
|
46
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
56
47
|
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
|
|
57
48
|
Breadcrumb.Item = BreadcrumbItem;
|
|
58
49
|
var _default = Breadcrumb;
|
package/lib/Button/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ButtonProps as AntdButtonProps } from 'antd/lib/button';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ButtonType = 'primary' | 'secondary' | 'dangerous' | 'text' | 'link';
|
|
4
|
+
export type Size = 'small' | 'default' | 'large';
|
|
5
5
|
export interface IButtonProps extends Omit<AntdButtonProps, 'type' | 'size' | 'dangerous' | 'shape' | 'icon' | 'href' | 'target' | 'onClick' | 'loading'> {
|
|
6
6
|
/**
|
|
7
7
|
* @description 类型
|
package/lib/Button/index.js
CHANGED
|
@@ -1,105 +1,79 @@
|
|
|
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 = void 0;
|
|
7
|
-
|
|
8
8
|
require("antd/es/button/style");
|
|
9
|
-
|
|
10
9
|
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
11
|
-
|
|
12
10
|
require("@aloudata/icons-react/styles/index.less");
|
|
13
|
-
|
|
14
11
|
var _LoadingLine2 = _interopRequireDefault(require("@aloudata/icons-react/es/icons/LoadingLine"));
|
|
15
|
-
|
|
16
12
|
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
|
|
18
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
-
|
|
20
14
|
var _excluded = ["type", "size", "shape", "loading", "disabled", "icon", "className"];
|
|
21
|
-
|
|
22
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
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; }
|
|
25
|
-
|
|
26
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; }
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
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); }
|
|
30
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; }
|
|
31
|
-
|
|
32
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; }
|
|
33
|
-
|
|
34
23
|
var iconPrefixCls = 'aldicon';
|
|
35
24
|
var ICON_LARGE = 24;
|
|
36
25
|
var ICON_MIDDLE = 20;
|
|
37
26
|
var ICON_SMALL = 16;
|
|
38
|
-
|
|
39
27
|
function Button(props) {
|
|
40
28
|
var prefix = 'ald-btn';
|
|
41
|
-
|
|
42
29
|
var _props$type = props.type,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
30
|
+
type = _props$type === void 0 ? 'secondary' : _props$type,
|
|
31
|
+
_props$size = props.size,
|
|
32
|
+
size = _props$size === void 0 ? 'default' : _props$size,
|
|
33
|
+
_props$shape = props.shape,
|
|
34
|
+
shape = _props$shape === void 0 ? 'default' : _props$shape,
|
|
35
|
+
_props$loading = props.loading,
|
|
36
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
37
|
+
disabled = props.disabled,
|
|
38
|
+
icon = props.icon,
|
|
39
|
+
className = props.className,
|
|
40
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
55
41
|
function getButtonType(buttonType) {
|
|
56
42
|
if (!['primary', 'secondary', 'dangerous', 'text', 'link'].includes(buttonType)) {
|
|
57
43
|
return 'default';
|
|
58
44
|
}
|
|
59
|
-
|
|
60
45
|
if (buttonType === 'dangerous') {
|
|
61
46
|
return 'primary';
|
|
62
47
|
}
|
|
63
|
-
|
|
64
48
|
if (buttonType === 'secondary') {
|
|
65
49
|
return 'default';
|
|
66
50
|
}
|
|
67
|
-
|
|
68
51
|
return buttonType;
|
|
69
52
|
}
|
|
70
|
-
|
|
71
53
|
function getDangerStatus(buttonType) {
|
|
72
54
|
if (buttonType === 'dangerous') {
|
|
73
55
|
return true;
|
|
74
56
|
}
|
|
75
|
-
|
|
76
57
|
return false;
|
|
77
58
|
}
|
|
78
|
-
|
|
79
59
|
function getButtonSizeClass(ButtonSize) {
|
|
80
60
|
return ButtonSize === 'default' || undefined ? "".concat(prefix, "-middle") : "".concat(prefix, "-").concat(ButtonSize);
|
|
81
61
|
}
|
|
82
|
-
|
|
83
62
|
function getIconSize(ButtonSize) {
|
|
84
63
|
if (ButtonSize === 'large') {
|
|
85
64
|
return ICON_LARGE;
|
|
86
65
|
}
|
|
87
|
-
|
|
88
66
|
if (ButtonSize === 'small') {
|
|
89
67
|
return ICON_SMALL;
|
|
90
68
|
}
|
|
91
|
-
|
|
92
69
|
return ICON_MIDDLE;
|
|
93
70
|
}
|
|
94
|
-
|
|
95
71
|
function getShape(ButtonShape) {
|
|
96
72
|
if (ButtonShape === 'circle') {
|
|
97
73
|
return ButtonShape;
|
|
98
74
|
}
|
|
99
|
-
|
|
100
75
|
return 'default';
|
|
101
76
|
}
|
|
102
|
-
|
|
103
77
|
var setIcon = function setIcon(iconNode) {
|
|
104
78
|
if (iconNode) {
|
|
105
79
|
var p = _objectSpread({
|
|
@@ -107,12 +81,10 @@ function Button(props) {
|
|
|
107
81
|
size: ICON_LARGE,
|
|
108
82
|
fill: 'currentColor'
|
|
109
83
|
}, iconNode.props);
|
|
110
|
-
|
|
111
84
|
p.className = (0, _classnames.default)("".concat(iconPrefixCls, "-icon-left"), p.className, iconPrefixCls);
|
|
112
85
|
p.size = getIconSize(size);
|
|
113
86
|
return /*#__PURE__*/_react.default.cloneElement(iconNode, p);
|
|
114
87
|
}
|
|
115
|
-
|
|
116
88
|
if (loading) {
|
|
117
89
|
return /*#__PURE__*/_react.default.createElement(_LoadingLine2.default, {
|
|
118
90
|
spin: true,
|
|
@@ -121,11 +93,9 @@ function Button(props) {
|
|
|
121
93
|
fill: "currentColor"
|
|
122
94
|
});
|
|
123
95
|
}
|
|
124
|
-
|
|
125
96
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
126
97
|
};
|
|
127
|
-
|
|
128
|
-
return /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({}, rest, {
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_button.default, _objectSpread(_objectSpread({}, rest), {}, {
|
|
129
99
|
disabled: loading ? true : disabled,
|
|
130
100
|
icon: setIcon(icon),
|
|
131
101
|
type: getButtonType(type),
|
|
@@ -134,6 +104,5 @@ function Button(props) {
|
|
|
134
104
|
shape: getShape(shape)
|
|
135
105
|
}), props.children);
|
|
136
106
|
}
|
|
137
|
-
|
|
138
107
|
var _default = Button;
|
|
139
108
|
exports.default = _default;
|
package/lib/Card/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/card/style");
|
|
9
|
-
|
|
10
8
|
var _card = _interopRequireDefault(require("antd/es/card"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var _default = _card.default;
|
|
15
11
|
exports.default = _default;
|