@pinnacle0/web-ui 0.6.46 → 0.7.0-beta.2
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/admin/AdminApp/Default/NavigatorSide/index.js +1 -1
- package/admin/AdminApp/Default/NavigatorSide/index.js.map +1 -1
- package/core/Amount/AmountPercentage.d.ts +1 -4
- package/core/Amount/AmountPercentage.js +5 -8
- package/core/Amount/AmountPercentage.js.map +1 -1
- package/core/Amount/index.d.ts +3 -8
- package/core/Amount/index.js +27 -35
- package/core/Amount/index.js.map +1 -1
- package/core/AuthenticationCodeInput/index.less +1 -1
- package/core/AutoCompleteInput/index.d.ts +2 -5
- package/core/AutoCompleteInput/index.js +5 -7
- package/core/AutoCompleteInput/index.js.map +1 -1
- package/core/BoolSwitch/index.d.ts +5 -7
- package/core/BoolSwitch/index.js +11 -13
- package/core/BoolSwitch/index.js.map +1 -1
- package/core/Breadcrumb/index.d.ts +1 -5
- package/core/Breadcrumb/index.js +8 -16
- package/core/Breadcrumb/index.js.map +1 -1
- package/core/Button/index.d.ts +2 -2
- package/core/Button/index.js +3 -2
- package/core/Button/index.js.map +1 -1
- package/core/Card/index.d.ts +3 -6
- package/core/Card/index.js +4 -7
- package/core/Card/index.js.map +1 -1
- package/core/Carousel/index.d.ts +1 -4
- package/core/Carousel/index.js +4 -7
- package/core/Carousel/index.js.map +1 -1
- package/core/Carousel3D/index.d.ts +1 -21
- package/core/Carousel3D/index.js +76 -83
- package/core/Carousel3D/index.js.map +1 -1
- package/core/Cascader/InitialNullable.d.ts +1 -4
- package/core/Cascader/InitialNullable.js +5 -8
- package/core/Cascader/InitialNullable.js.map +1 -1
- package/core/Cascader/Nullable.d.ts +2 -7
- package/core/Cascader/Nullable.js +10 -12
- package/core/Cascader/Nullable.js.map +1 -1
- package/core/Cascader/index.d.ts +4 -13
- package/core/Cascader/index.js +18 -20
- package/core/Cascader/index.js.map +1 -1
- package/core/Checkbox/index.d.ts +4 -7
- package/core/Checkbox/index.js +4 -9
- package/core/Checkbox/index.js.map +1 -1
- package/core/Collapse/index.d.ts +2 -7
- package/core/Collapse/index.js +4 -6
- package/core/Collapse/index.js.map +1 -1
- package/core/Countdown/SlidingDigit.d.ts +1 -10
- package/core/Countdown/SlidingDigit.js +16 -21
- package/core/Countdown/SlidingDigit.js.map +1 -1
- package/core/Countdown/index.d.ts +1 -18
- package/core/Countdown/index.js +53 -74
- package/core/Countdown/index.js.map +1 -1
- package/core/DarkOverlay/index.d.ts +1 -4
- package/core/DarkOverlay/index.js +4 -7
- package/core/DarkOverlay/index.js.map +1 -1
- package/core/DateCalendar/index.d.ts +2 -13
- package/core/DateCalendar/index.js +12 -14
- package/core/DateCalendar/index.js.map +1 -1
- package/core/DatePicker/index.d.ts +1 -7
- package/core/DatePicker/index.js +9 -16
- package/core/DatePicker/index.js.map +1 -1
- package/core/DateRangePicker/index.d.ts +1 -14
- package/core/DateRangePicker/index.js +25 -34
- package/core/DateRangePicker/index.js.map +1 -1
- package/core/DateTimePicker/index.d.ts +1 -7
- package/core/DateTimePicker/index.js +12 -21
- package/core/DateTimePicker/index.js.map +1 -1
- package/core/DateTimeRangePicker/index.d.ts +1 -17
- package/core/DateTimeRangePicker/index.js +21 -31
- package/core/DateTimeRangePicker/index.js.map +1 -1
- package/core/Descriptions/index.d.ts +3 -8
- package/core/Descriptions/index.js +7 -13
- package/core/Descriptions/index.js.map +1 -1
- package/core/Descriptions/index.less +0 -8
- package/core/DocumentTitle/index.d.ts +4 -13
- package/core/DocumentTitle/index.js +18 -31
- package/core/DocumentTitle/index.js.map +1 -1
- package/core/Drawer/index.d.ts +1 -3
- package/core/Drawer/index.js +4 -5
- package/core/Drawer/index.js.map +1 -1
- package/core/Dropdown/index.d.ts +3 -4
- package/core/Dropdown/index.js +4 -3
- package/core/Dropdown/index.js.map +1 -1
- package/core/EnumCheckboxGroup/Map.d.ts +1 -4
- package/core/EnumCheckboxGroup/Map.js +5 -9
- package/core/EnumCheckboxGroup/Map.js.map +1 -1
- package/core/EnumCheckboxGroup/index.d.ts +3 -4
- package/core/EnumCheckboxGroup/index.js +11 -12
- package/core/EnumCheckboxGroup/index.js.map +1 -1
- package/core/EnumRadio/InitialNullable.d.ts +1 -5
- package/core/EnumRadio/InitialNullable.js +6 -9
- package/core/EnumRadio/InitialNullable.js.map +1 -1
- package/core/EnumRadio/Map.d.ts +1 -4
- package/core/EnumRadio/Map.js +6 -9
- package/core/EnumRadio/Map.js.map +1 -1
- package/core/EnumRadio/Nullable.d.ts +1 -5
- package/core/EnumRadio/Nullable.js +12 -14
- package/core/EnumRadio/Nullable.js.map +1 -1
- package/core/EnumRadio/index.d.ts +5 -12
- package/core/EnumRadio/index.js +9 -17
- package/core/EnumRadio/index.js.map +1 -1
- package/core/EnumSelect/InitialNullable.d.ts +1 -4
- package/core/EnumSelect/InitialNullable.js +4 -8
- package/core/EnumSelect/InitialNullable.js.map +1 -1
- package/core/EnumSelect/Map.d.ts +1 -4
- package/core/EnumSelect/Map.js +6 -9
- package/core/EnumSelect/Map.js.map +1 -1
- package/core/EnumSelect/Nullable.d.ts +1 -5
- package/core/EnumSelect/Nullable.js +12 -14
- package/core/EnumSelect/Nullable.js.map +1 -1
- package/core/EnumSelect/index.d.ts +5 -15
- package/core/EnumSelect/index.js +19 -27
- package/core/EnumSelect/index.js.map +1 -1
- package/core/EnumSelect/index.less +1 -1
- package/core/FlatList/Content/Footer/index.js +3 -2
- package/core/FlatList/Content/Footer/index.js.map +1 -1
- package/core/FlatList/Content/index.d.ts +1 -1
- package/core/FlatList/Content/index.js +10 -8
- package/core/FlatList/Content/index.js.map +1 -1
- package/core/FlatList/FloatingLoader/index.js +3 -2
- package/core/FlatList/FloatingLoader/index.js.map +1 -1
- package/core/FlatList/Refresh/index.js +3 -2
- package/core/FlatList/Refresh/index.js.map +1 -1
- package/core/FlatList/index.d.ts +1 -1
- package/core/FlatList/index.js +10 -9
- package/core/FlatList/index.js.map +1 -1
- package/core/FlatList/shared/Loader/index.js +3 -2
- package/core/FlatList/shared/Loader/index.js.map +1 -1
- package/core/Form/Item.d.ts +1 -16
- package/core/Form/Item.js +28 -40
- package/core/Form/Item.js.map +1 -1
- package/core/Form/index.d.ts +6 -17
- package/core/Form/index.js +29 -46
- package/core/Form/index.js.map +1 -1
- package/core/Form/index.less +1 -1
- package/core/Grid/index.d.ts +2 -2
- package/core/Grid/index.js +2 -1
- package/core/Grid/index.js.map +1 -1
- package/core/HTMLContent/index.d.ts +1 -4
- package/core/HTMLContent/index.js +4 -7
- package/core/HTMLContent/index.js.map +1 -1
- package/core/Image/index.d.ts +3 -6
- package/core/Image/index.js +6 -7
- package/core/Image/index.js.map +1 -1
- package/core/ImageUploader/index.d.ts +2 -11
- package/core/ImageUploader/index.js +17 -25
- package/core/ImageUploader/index.js.map +1 -1
- package/core/Input/index.d.ts +12 -18
- package/core/Input/index.js +37 -41
- package/core/Input/index.js.map +1 -1
- package/core/LabelledSelect/index.d.ts +3 -5
- package/core/LabelledSelect/index.js +4 -7
- package/core/LabelledSelect/index.js.map +1 -1
- package/core/Link/index.d.ts +1 -4
- package/core/Link/index.js +16 -19
- package/core/Link/index.js.map +1 -1
- package/core/LocalImporter/index.d.ts +1 -10
- package/core/LocalImporter/index.js +11 -18
- package/core/LocalImporter/index.js.map +1 -1
- package/core/LocaleSelect/index.d.ts +1 -10
- package/core/LocaleSelect/index.js +16 -18
- package/core/LocaleSelect/index.js.map +1 -1
- package/core/Markdown/index.d.ts +1 -7
- package/core/Markdown/index.js +13 -16
- package/core/Markdown/index.js.map +1 -1
- package/core/Modal/index.less +1 -1
- package/core/MultipleCascader/index.d.ts +1 -9
- package/core/MultipleCascader/index.js +15 -19
- package/core/MultipleCascader/index.js.map +1 -1
- package/core/MultipleEnumSelect/index.d.ts +1 -8
- package/core/MultipleEnumSelect/index.js +9 -15
- package/core/MultipleEnumSelect/index.js.map +1 -1
- package/core/MultipleSelector/TablePopover.d.ts +1 -7
- package/core/MultipleSelector/TablePopover.js +23 -26
- package/core/MultipleSelector/TablePopover.js.map +1 -1
- package/core/MultipleSelector/index.d.ts +1 -9
- package/core/MultipleSelector/index.js +18 -26
- package/core/MultipleSelector/index.js.map +1 -1
- package/core/MutableTable/index.d.ts +1 -13
- package/core/MutableTable/index.js +25 -35
- package/core/MutableTable/index.js.map +1 -1
- package/core/NumberInput/NumberInputPercentage.d.ts +1 -8
- package/core/NumberInput/NumberInputPercentage.js +8 -25
- package/core/NumberInput/NumberInputPercentage.js.map +1 -1
- package/core/NumberInput/index.d.ts +5 -33
- package/core/NumberInput/index.js +44 -72
- package/core/NumberInput/index.js.map +1 -1
- package/core/OverflowableText/index.d.ts +1 -12
- package/core/OverflowableText/index.js +11 -28
- package/core/OverflowableText/index.js.map +1 -1
- package/core/Pagination/index.d.ts +1 -7
- package/core/Pagination/index.js +17 -19
- package/core/Pagination/index.js.map +1 -1
- package/core/Popover/index.d.ts +0 -1
- package/core/Popover/index.js +2 -5
- package/core/Popover/index.js.map +1 -1
- package/core/Progress/index.d.ts +1 -4
- package/core/Progress/index.js +4 -6
- package/core/Progress/index.js.map +1 -1
- package/core/Radio/index.d.ts +5 -7
- package/core/Radio/index.js +2 -8
- package/core/Radio/index.js.map +1 -1
- package/core/RelativeTime/index.d.ts +1 -15
- package/core/RelativeTime/index.js +17 -31
- package/core/RelativeTime/index.js.map +1 -1
- package/core/Resizable/index.js +3 -2
- package/core/Resizable/index.js.map +1 -1
- package/core/SearchableSelect/index.d.ts +3 -5
- package/core/SearchableSelect/index.js +4 -7
- package/core/SearchableSelect/index.js.map +1 -1
- package/core/Select/index.d.ts +8 -7
- package/core/Select/index.js +8 -8
- package/core/Select/index.js.map +1 -1
- package/core/SignedAmountInput/index.d.ts +1 -8
- package/core/SignedAmountInput/index.js +16 -24
- package/core/SignedAmountInput/index.js.map +1 -1
- package/core/Skeleton/index.d.ts +1 -4
- package/core/Skeleton/index.js +4 -7
- package/core/Skeleton/index.js.map +1 -1
- package/core/Slider/RangeSlider.d.ts +2 -6
- package/core/Slider/RangeSlider.js +4 -7
- package/core/Slider/RangeSlider.js.map +1 -1
- package/core/Slider/index.d.ts +3 -7
- package/core/Slider/index.js +15 -20
- package/core/Slider/index.js.map +1 -1
- package/core/Space/index.d.ts +3 -5
- package/core/Space/index.js +4 -7
- package/core/Space/index.js.map +1 -1
- package/core/Spin/index.d.ts +3 -6
- package/core/Spin/index.js +4 -7
- package/core/Spin/index.js.map +1 -1
- package/core/StepFormContainer/index.d.ts +2 -7
- package/core/StepFormContainer/index.js +13 -17
- package/core/StepFormContainer/index.js.map +1 -1
- package/core/Steps/index.d.ts +3 -6
- package/core/Steps/index.js +4 -6
- package/core/Steps/index.js.map +1 -1
- package/core/Table/index.d.ts +6 -34
- package/core/Table/index.js +64 -80
- package/core/Table/index.js.map +1 -1
- package/core/Tabs/Single.d.ts +1 -4
- package/core/Tabs/Single.js +4 -7
- package/core/Tabs/Single.js.map +1 -1
- package/core/Tabs/index.d.ts +3 -13
- package/core/Tabs/index.js +27 -35
- package/core/Tabs/index.js.map +1 -1
- package/core/Tag/index.d.ts +2 -5
- package/core/Tag/index.js +4 -6
- package/core/Tag/index.js.map +1 -1
- package/core/TagInput/index.d.ts +2 -15
- package/core/TagInput/index.js +25 -41
- package/core/TagInput/index.js.map +1 -1
- package/core/Tags/index.d.ts +1 -6
- package/core/Tags/index.js +9 -13
- package/core/Tags/index.js.map +1 -1
- package/core/TimePicker/index.d.ts +1 -7
- package/core/TimePicker/index.js +8 -11
- package/core/TimePicker/index.js.map +1 -1
- package/core/TimeRangePicker/index.d.ts +1 -14
- package/core/TimeRangePicker/index.js +21 -27
- package/core/TimeRangePicker/index.js.map +1 -1
- package/core/Tooltip/index.d.ts +3 -4
- package/core/Tooltip/index.js +2 -5
- package/core/Tooltip/index.js.map +1 -1
- package/core/TypedTabs/index.d.ts +1 -4
- package/core/TypedTabs/index.js +16 -18
- package/core/TypedTabs/index.js.map +1 -1
- package/core/Uploader/index.d.ts +1 -17
- package/core/Uploader/index.js +25 -31
- package/core/Uploader/index.js.map +1 -1
- package/core/VirtualList/index.d.ts +1 -1
- package/core/VirtualList/index.js +3 -2
- package/core/VirtualList/index.js.map +1 -1
- package/core/VirtualTable/{TableHeader.js → OldVirtualTable/TableHeader.js} +2 -2
- package/core/VirtualTable/OldVirtualTable/TableHeader.js.map +1 -0
- package/core/VirtualTable/{TableRow.js → OldVirtualTable/TableRow.js} +2 -2
- package/core/VirtualTable/OldVirtualTable/TableRow.js.map +1 -0
- package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useColumnWidths.js +1 -1
- package/core/VirtualTable/OldVirtualTable/hooks/useColumnWidths.js.map +1 -0
- package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useColumnsStickyPosition.js +1 -1
- package/core/VirtualTable/OldVirtualTable/hooks/useColumnsStickyPosition.js.map +1 -0
- package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useRowSelection.d.ts +1 -1
- package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useRowSelection.js +2 -2
- package/core/VirtualTable/OldVirtualTable/hooks/useRowSelection.js.map +1 -0
- package/core/VirtualTable/OldVirtualTable/hooks/useScroll.js.map +1 -0
- package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useScrollBarSize.js +1 -1
- package/core/VirtualTable/OldVirtualTable/hooks/useScrollBarSize.js.map +1 -0
- package/core/VirtualTable/OldVirtualTable/index.d.ts +28 -0
- package/core/VirtualTable/OldVirtualTable/index.js +58 -0
- package/core/VirtualTable/OldVirtualTable/index.js.map +1 -0
- package/core/VirtualTable/OldVirtualTable/index.old.less +160 -0
- package/core/VirtualTable/OldVirtualTable/type.js.map +1 -0
- package/core/VirtualTable/index.d.ts +24 -23
- package/core/VirtualTable/index.js +36 -50
- package/core/VirtualTable/index.js.map +1 -1
- package/core/VirtualTable/index.less +28 -140
- package/core/WithExplanation/index.d.ts +1 -6
- package/core/WithExplanation/index.js +11 -20
- package/core/WithExplanation/index.js.map +1 -1
- package/core/WithTooltipList/index.d.ts +1 -9
- package/core/WithTooltipList/index.js +28 -27
- package/core/WithTooltipList/index.js.map +1 -1
- package/core/YearMonthSelector/index.d.ts +1 -7
- package/core/YearMonthSelector/index.js +9 -15
- package/core/YearMonthSelector/index.js.map +1 -1
- package/css/global.less +0 -9
- package/hooks/useParentResizeObserver/index.d.ts +2 -0
- package/hooks/useParentResizeObserver/index.js +17 -0
- package/hooks/useParentResizeObserver/index.js.map +1 -0
- package/hooks/useResizeObserver/index.d.ts +1 -1
- package/hooks/useResizeObserver/index.js +6 -10
- package/hooks/useResizeObserver/index.js.map +1 -1
- package/package.json +6 -6
- package/util/ModalUtil/index.less +1 -1
- package/util/OrientationUtil/index.js +22 -37
- package/util/OrientationUtil/index.js.map +1 -1
- package/util/PromptUtil/PromptBody.d.ts +4 -13
- package/util/PromptUtil/PromptBody.js +19 -28
- package/util/PromptUtil/PromptBody.js.map +1 -1
- package/util/PromptUtil/index.js +1 -1
- package/util/PromptUtil/index.js.map +1 -1
- package/util/ReactUtil/index.d.ts +20 -0
- package/util/ReactUtil/index.js +35 -0
- package/util/ReactUtil/index.js.map +1 -1
- package/core/VirtualTable/TableHeader.js.map +0 -1
- package/core/VirtualTable/TableRow.js.map +0 -1
- package/core/VirtualTable/hooks/useColumnWidths.js.map +0 -1
- package/core/VirtualTable/hooks/useColumnsStickyPosition.js.map +0 -1
- package/core/VirtualTable/hooks/useRowSelection.js.map +0 -1
- package/core/VirtualTable/hooks/useScroll.js.map +0 -1
- package/core/VirtualTable/hooks/useScrollBarSize.js.map +0 -1
- package/core/VirtualTable/type.js.map +0 -1
- /package/core/VirtualTable/{TableHeader.d.ts → OldVirtualTable/TableHeader.d.ts} +0 -0
- /package/core/VirtualTable/{TableRow.d.ts → OldVirtualTable/TableRow.d.ts} +0 -0
- /package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useColumnWidths.d.ts +0 -0
- /package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useColumnsStickyPosition.d.ts +0 -0
- /package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useScroll.d.ts +0 -0
- /package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useScroll.js +0 -0
- /package/core/VirtualTable/{hooks → OldVirtualTable/hooks}/useScrollBarSize.d.ts +0 -0
- /package/core/VirtualTable/{type.d.ts → OldVirtualTable/type.d.ts} +0 -0
- /package/core/VirtualTable/{type.js → OldVirtualTable/type.js} +0 -0
package/core/Tabs/Single.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Tabs } from "./index";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return React.createElement(Tabs, { ...rest, items: [{ label: title, key: title, children }] });
|
|
8
|
-
}
|
|
9
|
-
}
|
|
3
|
+
import { ReactUtil } from "../../util/ReactUtil";
|
|
4
|
+
export const Single = ReactUtil.memo("Single", ({ children, title, ...rest }) => {
|
|
5
|
+
return React.createElement(Tabs, { ...rest, items: [{ label: title, key: title, children }] });
|
|
6
|
+
});
|
|
10
7
|
//# sourceMappingURL=Single.js.map
|
package/core/Tabs/Single.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Single.js","sourceRoot":"","sources":["../../../src/core/Tabs/Single.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Single.js","sourceRoot":"","sources":["../../../src/core/Tabs/Single.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAE7B,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAO/C,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAQ,EAAE,EAAE;IACjF,OAAO,oBAAC,IAAI,OAAK,IAAI,EAAE,KAAK,EAAE,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAC,CAAC,GAAI,CAAC;AAC7E,CAAC,CAAC,CAAC"}
|
package/core/Tabs/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Single } from "./Single";
|
|
3
2
|
import type { TabsProps } from "antd/es/tabs";
|
|
4
|
-
import type { PickOptional } from "../../internal/type";
|
|
5
3
|
export interface Props extends Omit<TabsProps, "tabBarExtraContent"> {
|
|
6
4
|
tabBarPrefix?: React.ReactNode;
|
|
7
5
|
tabBarSuffix?: React.ReactNode;
|
|
@@ -31,14 +29,6 @@ export interface TabItem {
|
|
|
31
29
|
active?: boolean;
|
|
32
30
|
destroyInactiveTabPane?: boolean;
|
|
33
31
|
}
|
|
34
|
-
export declare
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
static defaultProps: PickOptional<Props>;
|
|
38
|
-
private tabBarRef;
|
|
39
|
-
componentDidMount(): void;
|
|
40
|
-
componentWillUnmount(): void;
|
|
41
|
-
resizeTabs: () => void;
|
|
42
|
-
tabBarCallBackRef: (tabBar: HTMLDivElement | null) => HTMLDivElement | null;
|
|
43
|
-
render(): React.JSX.Element;
|
|
44
|
-
}
|
|
32
|
+
export declare const Tabs: ((props: Props) => React.JSX.Element) & {
|
|
33
|
+
Single: ({ children, title, ...rest }: import("./Single").Props) => React.JSX.Element;
|
|
34
|
+
};
|
package/core/Tabs/index.js
CHANGED
|
@@ -2,46 +2,38 @@ import React from "react";
|
|
|
2
2
|
import AntTabs from "antd/es/tabs";
|
|
3
3
|
import { classNames } from "../../util/ClassNames";
|
|
4
4
|
import { Single } from "./Single";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
tabBarRef = null;
|
|
12
|
-
componentDidMount() {
|
|
13
|
-
this.resizeTabs();
|
|
14
|
-
window.addEventListener("resize", this.resizeTabs);
|
|
15
|
-
}
|
|
16
|
-
componentWillUnmount() {
|
|
17
|
-
window.removeEventListener("resize", this.resizeTabs);
|
|
18
|
-
}
|
|
19
|
-
resizeTabs = () => {
|
|
20
|
-
const { initialMaxVisibleTabCount } = this.props;
|
|
5
|
+
import { ReactUtil } from "../../util/ReactUtil";
|
|
6
|
+
export const Tabs = ReactUtil.compound("Tabs", { Single }, (props) => {
|
|
7
|
+
const { tabBarPrefix, tabBarSuffix, initialMaxVisibleTabCount, className, renderTabBar, type = "card", animated, ...restProps } = props;
|
|
8
|
+
const tabBarRef = React.useRef(null);
|
|
9
|
+
const resizeTabs = React.useCallback(() => {
|
|
21
10
|
if (initialMaxVisibleTabCount && initialMaxVisibleTabCount >= 1) {
|
|
22
|
-
const tabBarWidth =
|
|
23
|
-
const tabNodes =
|
|
11
|
+
const tabBarWidth = tabBarRef.current?.getBoundingClientRect().width;
|
|
12
|
+
const tabNodes = tabBarRef.current?.querySelectorAll(".ant-tabs-nav-list > .ant-tabs-tab");
|
|
24
13
|
if (tabBarWidth && tabNodes && tabNodes.length > initialMaxVisibleTabCount) {
|
|
25
14
|
const singleTabWidth = tabBarWidth / initialMaxVisibleTabCount;
|
|
26
15
|
Array.from(tabNodes).forEach(tabNode => (tabNode.style.width = `${singleTabWidth}px`));
|
|
27
16
|
}
|
|
28
17
|
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
18
|
+
}, [initialMaxVisibleTabCount]);
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
resizeTabs();
|
|
21
|
+
window.addEventListener("resize", resizeTabs);
|
|
22
|
+
return () => {
|
|
23
|
+
window.removeEventListener("resize", resizeTabs);
|
|
24
|
+
};
|
|
25
|
+
}, [resizeTabs]);
|
|
26
|
+
// Passing {} or {left:undefined} to <AntTabs tabBarExtraContent> will lead to error
|
|
27
|
+
let tabBarExtraContent;
|
|
28
|
+
if (tabBarPrefix || tabBarSuffix) {
|
|
29
|
+
tabBarExtraContent = {};
|
|
30
|
+
if (tabBarPrefix)
|
|
31
|
+
tabBarExtraContent.left = tabBarPrefix;
|
|
32
|
+
if (tabBarSuffix)
|
|
33
|
+
tabBarExtraContent.right = tabBarSuffix;
|
|
45
34
|
}
|
|
46
|
-
}
|
|
35
|
+
return (React.createElement(AntTabs, { className: classNames("g-tabs", className, { "with-max-visible-tab-count": initialMaxVisibleTabCount }), animated: animated === undefined ? type === "line" : animated, type: type, tabBarExtraContent: tabBarExtraContent,
|
|
36
|
+
// DefaultTabBar is a React.ForwardRef component but mark as a React.ComponentType by antd, needed to change the type to 'any' in order to assign ref
|
|
37
|
+
renderTabBar: renderTabBar || ((oldProps, DefaultTabBar) => React.createElement(DefaultTabBar, { ...oldProps, ref: (ref) => (tabBarRef.current = ref) })), ...restProps }));
|
|
38
|
+
});
|
|
47
39
|
//# sourceMappingURL=index.js.map
|
package/core/Tabs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1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;QACjB,UAAU,EAAE,CAAC;QACb,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC9C,OAAO,GAAG,EAAE;YACR,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACrD,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,oFAAoF;IACpF,IAAI,kBAAmD,CAAC;IACxD,IAAI,YAAY,IAAI,YAAY,EAAE,CAAC;QAC/B,kBAAkB,GAAG,EAAE,CAAC;QACxB,IAAI,YAAY;YAAE,kBAAkB,CAAC,IAAI,GAAG,YAAY,CAAC;QACzD,IAAI,YAAY;YAAE,kBAAkB,CAAC,KAAK,GAAG,YAAY,CAAC;IAC9D,CAAC;IAED,OAAO,CACH,oBAAC,OAAO,IACJ,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAC,4BAA4B,EAAE,yBAAyB,EAAC,CAAC,EACrG,QAAQ,EAAE,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,EAC7D,IAAI,EAAE,IAAI,EACV,kBAAkB,EAAE,kBAAkB;QACtC,sJAAsJ;QACtJ,YAAY,EAAE,YAAY,IAAI,CAAC,CAAC,QAAQ,EAAE,aAAkB,EAAE,EAAE,CAAC,oBAAC,aAAa,OAAK,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAQ,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,OAAO,GAAG,GAAG,CAAC,GAAI,CAAC,KAC3I,SAAS,GACf,CACL,CAAC;AACN,CAAC,CAAC,CAAC"}
|
package/core/Tag/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { TagProps } from "antd/es/tag";
|
|
3
3
|
import type { PresetColorType, PresetStatusColorType } from "antd/es/_util/colors";
|
|
4
|
+
export type TagColor = PresetColorType | PresetStatusColorType;
|
|
4
5
|
export interface Props extends TagProps {
|
|
5
6
|
}
|
|
6
|
-
export declare
|
|
7
|
-
static displayName: string;
|
|
8
|
-
render(): React.JSX.Element;
|
|
9
|
-
}
|
|
10
|
-
export type TagColor = PresetColorType | PresetStatusColorType;
|
|
7
|
+
export declare const Tag: ({ variant, ...props }: Props) => React.JSX.Element;
|
package/core/Tag/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import AntTag from "antd/es/tag";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
}
|
|
3
|
+
import { ReactUtil } from "../../util/ReactUtil";
|
|
4
|
+
export const Tag = ReactUtil.memo("Tag", ({ variant = "outlined", ...props }) => {
|
|
5
|
+
return React.createElement(AntTag, { variant: variant, ...props });
|
|
6
|
+
});
|
|
9
7
|
//# sourceMappingURL=index.js.map
|
package/core/Tag/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Tag/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Tag/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAK/C,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAC,OAAO,GAAG,UAAU,EAAE,GAAG,KAAK,EAAQ,EAAE,EAAE;IACjF,OAAO,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,KAAM,KAAK,GAAI,CAAC;AACnD,CAAC,CAAC,CAAC"}
|
package/core/TagInput/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { ControlledFormValue
|
|
2
|
+
import type { ControlledFormValue } from "../../internal/type";
|
|
3
3
|
import "./index.less";
|
|
4
4
|
interface Props<T> extends ControlledFormValue<T[]> {
|
|
5
5
|
parser: (rawString: string) => T[];
|
|
@@ -10,18 +10,5 @@ interface Props<T> extends ControlledFormValue<T[]> {
|
|
|
10
10
|
placeholder?: React.ReactElement | string | number | null;
|
|
11
11
|
autoFocus?: boolean;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
inputText: string;
|
|
15
|
-
}
|
|
16
|
-
export declare class TagInput<T> extends React.PureComponent<Props<T>, State> {
|
|
17
|
-
static displayName: string;
|
|
18
|
-
static defaultProps: PickOptional<Props<string>>;
|
|
19
|
-
constructor(props: Props<T>);
|
|
20
|
-
removeTag: (index: number) => void;
|
|
21
|
-
addTagsByInput: (input: string) => void;
|
|
22
|
-
onKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
23
|
-
onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
24
|
-
onBlur: () => void;
|
|
25
|
-
render(): React.JSX.Element;
|
|
26
|
-
}
|
|
13
|
+
export declare const TagInput: <T>(props: Props<T>) => React.JSX.Element;
|
|
27
14
|
export {};
|
package/core/TagInput/index.js
CHANGED
|
@@ -1,62 +1,46 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { classNames } from "../../util/ClassNames";
|
|
3
3
|
import "./index.less";
|
|
4
|
+
import { ReactUtil } from "../../util/ReactUtil";
|
|
4
5
|
const separators = [" ", ";", "|", "*", "Tab", "Enter"];
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
constructor(props) {
|
|
11
|
-
super(props);
|
|
12
|
-
this.state = { inputText: "" };
|
|
13
|
-
}
|
|
14
|
-
removeTag = (index) => {
|
|
15
|
-
const { onChange, value, disabled } = this.props;
|
|
16
|
-
if (disabled) {
|
|
6
|
+
export const TagInput = ReactUtil.memo("TagInput", (props) => {
|
|
7
|
+
const { value, renderTag = item => item, className, style, disabled, placeholder, autoFocus = true, onChange, parser } = props;
|
|
8
|
+
const [inputText, setInputText] = React.useState("");
|
|
9
|
+
const removeTag = (index) => {
|
|
10
|
+
if (disabled)
|
|
17
11
|
return;
|
|
18
|
-
}
|
|
19
12
|
const newTags = [...value];
|
|
20
13
|
newTags.splice(index, 1);
|
|
21
14
|
onChange(newTags);
|
|
22
15
|
};
|
|
23
|
-
addTagsByInput = (input) => {
|
|
24
|
-
if (
|
|
16
|
+
const addTagsByInput = (input) => {
|
|
17
|
+
if (disabled)
|
|
25
18
|
return;
|
|
26
|
-
}
|
|
27
19
|
if (input) {
|
|
28
|
-
|
|
29
|
-
this.setState({ inputText: "" });
|
|
20
|
+
setInputText("");
|
|
30
21
|
onChange([...value, ...parser(input)]);
|
|
31
22
|
}
|
|
32
23
|
};
|
|
33
|
-
onKeyDown = (event) => {
|
|
24
|
+
const onKeyDown = (event) => {
|
|
34
25
|
// Ref: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (!inputText.length) {
|
|
38
|
-
this.removeTag(this.props.value.length - 1);
|
|
39
|
-
}
|
|
26
|
+
if (event.key === "Backspace" && !inputText.length) {
|
|
27
|
+
removeTag(value.length - 1);
|
|
40
28
|
}
|
|
41
29
|
else if (separators.includes(event.key)) {
|
|
42
30
|
event.preventDefault();
|
|
43
|
-
|
|
31
|
+
addTagsByInput(inputText);
|
|
44
32
|
}
|
|
45
33
|
};
|
|
46
|
-
|
|
47
|
-
onBlur = () =>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
React.createElement("div", { className: "text-area-wrapper" },
|
|
59
|
-
React.createElement("textarea", { disabled: disabled, onBlur: this.onBlur, onChange: this.onChange, onKeyDown: this.onKeyDown, value: inputText, autoFocus: autoFocus }))));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
34
|
+
const onInputChange = (event) => setInputText(event.target.value);
|
|
35
|
+
const onBlur = () => addTagsByInput(inputText);
|
|
36
|
+
return (React.createElement("div", { className: classNames("g-tag-input", { "ant-input-disabled": disabled }), style: style },
|
|
37
|
+
value.map((tag, index) => {
|
|
38
|
+
return (React.createElement("div", { className: classNames("g-tag-input-label", className?.(tag)), key: index },
|
|
39
|
+
renderTag(tag),
|
|
40
|
+
React.createElement("i", { onClick: () => removeTag(index) }, "\u00D7")));
|
|
41
|
+
}),
|
|
42
|
+
!value.length && !inputText && React.createElement("div", { className: "placeholder" }, placeholder),
|
|
43
|
+
React.createElement("div", { className: "text-area-wrapper" },
|
|
44
|
+
React.createElement("textarea", { disabled: disabled, onBlur: onBlur, onChange: onInputChange, onKeyDown: onKeyDown, value: inputText, autoFocus: autoFocus }))));
|
|
45
|
+
});
|
|
62
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/TagInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEjD,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/TagInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEjD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAY/C,MAAM,UAAU,GAAG,C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actElement | string | number | null;
|
|
16
16
|
}
|
|
17
|
-
export declare
|
|
18
|
-
static displayName: string;
|
|
19
|
-
private readonly singleTagStyle;
|
|
20
|
-
renderTag: (item: React.ReactElement | string | number | null, index: number) => React.JSX.Element;
|
|
21
|
-
render(): React.JSX.Element;
|
|
22
|
-
}
|
|
17
|
+
export declare const Tags: ({ items, maxWidth, extraContent, color, onClose, useItemsAsKey }: Props) => React.JSX.Element;
|
package/core/Tags/index.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Tag } from "../Tag";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
renderTag = (item, index) => {
|
|
7
|
-
const { color, onClose, useItemsAsKey } = this.props;
|
|
3
|
+
import { ReactUtil } from "../../util/ReactUtil";
|
|
4
|
+
const singleTagStyle = { marginRight: 5, marginBottom: 4 };
|
|
5
|
+
export const Tags = ReactUtil.memo("Tags", ({ items, maxWidth, extraContent, color, onClose, useItemsAsKey }) => {
|
|
6
|
+
const renderTag = (item, index) => {
|
|
8
7
|
const tagColor = typeof color === "function" ? color(item, index) : color;
|
|
9
8
|
const key = (typeof item === "string" || typeof item === "number") && useItemsAsKey ? item : null;
|
|
10
|
-
return (React.createElement(Tag, { color: tagColor, key: key, style:
|
|
9
|
+
return (React.createElement(Tag, { color: tagColor, key: key || index, style: singleTagStyle, closable: onClose !== undefined, onClose: () => onClose?.(index) }, item));
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
extraContent && extraContent));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
11
|
+
return (React.createElement("div", { style: { maxWidth } },
|
|
12
|
+
items.map(renderTag),
|
|
13
|
+
extraContent && extraContent));
|
|
14
|
+
});
|
|
19
15
|
//# sourceMappingURL=index.js.map
|
package/core/Tags/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceR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AEF,OAAO,CACH,6BAAK,KAAK,EAAE,EAAC,QAAQ,EAAC;QACjB,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC;QACpB,YAAY,IAAI,YAAY,CAC3B,CACT,CAAC;AACN,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Dayjs } from "dayjs";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import type { ControlledFormValue } from "../../internal/type";
|
|
4
3
|
export interface Props<T extends boolean> extends ControlledFormValue<T extends false ? string : string | null> {
|
|
@@ -9,9 +8,4 @@ export interface Props<T extends boolean> extends ControlledFormValue<T extends
|
|
|
9
8
|
preserveInvalidOnBlur?: boolean;
|
|
10
9
|
showSecond?: boolean;
|
|
11
10
|
}
|
|
12
|
-
export declare
|
|
13
|
-
static displayName: string;
|
|
14
|
-
private readonly timeFormatter;
|
|
15
|
-
onTimeChange: (time: Dayjs | null) => void;
|
|
16
|
-
render(): React.JSX.Element;
|
|
17
|
-
}
|
|
11
|
+
export declare const TimePicker: <T extends boolean>(props: Props<T>) => React.JSX.Element;
|
package/core/TimePicker/index.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import DatePicker from "antd/es/date-picker";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { ReactUtil } from "../../util/ReactUtil";
|
|
5
|
+
const TIME_FORMATTER = "HH:mm:ss";
|
|
6
|
+
export const TimePicker = ReactUtil.memo("TimePicker", (props) => {
|
|
7
|
+
const { value, allowNull, placeholder, disabled, className, showSecond, preserveInvalidOnBlur = true, onChange } = props;
|
|
8
|
+
const onTimeChange = (time) => {
|
|
9
9
|
const typedOnChange = onChange;
|
|
10
10
|
if (time) {
|
|
11
|
-
typedOnChange(time.format(
|
|
11
|
+
typedOnChange(time.format(TIME_FORMATTER));
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
14
14
|
typedOnChange(null);
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return (React.createElement(DatePicker, { picker: "time", mode: undefined, className: className, placeholder: placeholder, value: value ? dayjs(value, this.timeFormatter) : null, onChange: this.onTimeChange, allowClear: allowNull, disabled: disabled, preserveInvalidOnBlur: preserveInvalidOnBlur, needConfirm: false, showSecond: showSecond }));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
17
|
+
return (React.createElement(DatePicker, { picker: "time", mode: undefined, className: className, placeholder: placeholder, value: value ? dayjs(value, TIME_FORMATTER) : null, onChange: onTimeChange, allowClear: allowNull, disabled: disabled, preserveInvalidOnBlur: preserveInvalidOnBlur, needConfirm: false, showSecond: showSecond }));
|
|
18
|
+
});
|
|
22
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/TimePicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/TimePicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAW/C,MAAM,cAAc,GAAG,UAAU,CAAC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,YAAY,EAAE,CAAoB,KAAe,EAAE,EAAE;IAC1F,MAAM,EAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,qBAAqB,GAAG,IAAI,EAAE,QAAQ,EAAC,GAAG,KAAK,CAAC;IAEvH,MAAM,YAAY,GAAG,CAAC,IAAkB,EAAE,EAAE;QACxC,MAAM,aAAa,GAAG,QAA0C,CAAC;QACjE,IAAI,IAAI,EAAE,CAAC;YACP,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACJ,aAAa,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACH,oBAAC,UAAU,IACP,MAAM,EAAC,MAAM,EACb,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,EAClD,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,SAAS,EACrB,QAAQ,EAAE,QAAQ,EAClB,qBAAqB,EAAE,qBAAqB,EAC5C,WAAW,EAAE,KAAK,EAClB,UAAU,EAAE,UAAU,GACxB,CACL,CAAC;AACN,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { Dayjs } from "dayjs";
|
|
3
2
|
import type { ControlledFormValue } from "../../internal/type";
|
|
4
3
|
export interface Props<T extends boolean> extends ControlledFormValue<T extends false ? [string, string] : [string | null, string | null]> {
|
|
5
4
|
allowNull: T;
|
|
@@ -9,16 +8,4 @@ export interface Props<T extends boolean> extends ControlledFormValue<T extends
|
|
|
9
8
|
preserveInvalidOnBlur?: boolean;
|
|
10
9
|
showSecond?: boolean;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
shouldCheckDateRangeValid: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare class TimeRangePicker<T extends boolean> extends React.PureComponent<Props<T>, State> {
|
|
16
|
-
static displayName: string;
|
|
17
|
-
private readonly timeFormatter;
|
|
18
|
-
constructor(props: Props<T>);
|
|
19
|
-
onChange: (dates: [Dayjs | null, Dayjs | null] | null) => void;
|
|
20
|
-
onOpenChange: (open: boolean) => void;
|
|
21
|
-
componentDidUpdate(): void;
|
|
22
|
-
render(): React.JSX.Element;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
11
|
+
export declare const TimeRangePicker: <T extends boolean>(props: Props<T>) => React.JSX.Element;
|
|
@@ -1,40 +1,34 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
3
|
import DatePicker from "antd/es/date-picker";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
import { ReactUtil } from "../../util/ReactUtil";
|
|
5
|
+
const TIME_FORMATTER = "HH:mm:ss";
|
|
6
|
+
export const TimeRangePicker = ReactUtil.memo("TimeRangePicker", (props) => {
|
|
7
|
+
const { value, disabled, className, allowNull, order, showSecond, preserveInvalidOnBlur = true, onChange } = props;
|
|
8
|
+
const [shouldCheckDateRangeValid, setShouldCheckDateRangeValid] = React.useState(false);
|
|
9
|
+
React.useEffect(() => {
|
|
10
|
+
if (shouldCheckDateRangeValid && value[0] && value[1]) {
|
|
11
|
+
const typedOnChange = onChange;
|
|
12
|
+
if (value[0] > value[1]) {
|
|
13
|
+
typedOnChange([value[1], value[0]]);
|
|
14
|
+
}
|
|
15
|
+
setShouldCheckDateRangeValid(false);
|
|
16
|
+
}
|
|
17
|
+
}, [onChange, shouldCheckDateRangeValid, value]);
|
|
18
|
+
const onAntChange = (dates) => {
|
|
19
|
+
const typedOnChange = onChange;
|
|
13
20
|
if (dates) {
|
|
14
21
|
const start = dates[0];
|
|
15
22
|
const end = dates[1];
|
|
16
|
-
typedOnChange([start ? start.format(
|
|
23
|
+
typedOnChange([start ? start.format(TIME_FORMATTER) : null, end ? end.format(TIME_FORMATTER) : null]);
|
|
17
24
|
}
|
|
18
25
|
else {
|
|
19
26
|
typedOnChange([null, null]);
|
|
20
27
|
}
|
|
21
28
|
};
|
|
22
|
-
onOpenChange = (open) => {
|
|
23
|
-
|
|
29
|
+
const onOpenChange = (open) => {
|
|
30
|
+
setShouldCheckDateRangeValid(!open);
|
|
24
31
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (this.state.shouldCheckDateRangeValid && dates[0] && dates[1]) {
|
|
28
|
-
const typedOnChange = this.props.onChange;
|
|
29
|
-
if (dates[0] > dates[1]) {
|
|
30
|
-
typedOnChange([dates[1], dates[0]]);
|
|
31
|
-
}
|
|
32
|
-
this.setState({ shouldCheckDateRangeValid: false });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
const { value, disabled, className, allowNull, order, showSecond, preserveInvalidOnBlur = true } = this.props;
|
|
37
|
-
return (React.createElement(DatePicker.RangePicker, { picker: "time", mode: undefined, className: className, value: [value[0] ? dayjs(value[0], this.timeFormatter) : null, value[1] ? dayjs(value[1], this.timeFormatter) : null], onCalendarChange: this.onChange, disabled: disabled, allowClear: allowNull, order: order, preserveInvalidOnBlur: preserveInvalidOnBlur, onOpenChange: this.onOpenChange, showSecond: showSecond }));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
32
|
+
return (React.createElement(DatePicker.RangePicker, { picker: "time", mode: undefined, className: className, value: [value[0] ? dayjs(value[0], TIME_FORMATTER) : null, value[1] ? dayjs(value[1], TIME_FORMATTER) : null], onCalendarChange: onAntChange, disabled: disabled, allowClear: allowNull, order: order, preserveInvalidOnBlur: preserveInvalidOnBlur, onOpenChange: onOpenChange, showSecond: showSecond }));
|
|
33
|
+
});
|
|
40
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/TimeRangePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,K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ACL,CAAC;AACN,CAAC,CAAC,CAAC"}
|
package/core/Tooltip/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { TooltipPlacement, TooltipProps } from "antd/es/tooltip";
|
|
2
2
|
import React from "react";
|
|
3
|
-
export type
|
|
3
|
+
export type { TooltipPlacement };
|
|
4
|
+
export interface Props extends TooltipProps {
|
|
4
5
|
childContainerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
5
|
-
|
|
6
|
-
};
|
|
6
|
+
}
|
|
7
7
|
export declare const Tooltip: (props: Props) => React.JSX.Element;
|
|
8
|
-
export type { TooltipPlacement };
|
package/core/Tooltip/index.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import AntTooltip from "antd/es/tooltip";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ReactUtil } from "../../util/ReactUtil";
|
|
4
|
-
const inlineChildStyle = { display: "inline" };
|
|
5
4
|
export const Tooltip = ReactUtil.memo("Tooltip", (props) => {
|
|
6
|
-
const { children, childContainerProps
|
|
7
|
-
const { style, ...restChildContainerProps } = childContainerProps;
|
|
8
|
-
const combinedChildContainerStyle = isInline ? { ...style, ...inlineChildStyle } : style;
|
|
5
|
+
const { children, childContainerProps, ...restProps } = props;
|
|
9
6
|
return (React.createElement(AntTooltip, { ...restProps },
|
|
10
|
-
React.createElement("div", { ...
|
|
7
|
+
React.createElement("div", { ...childContainerProps }, children)));
|
|
11
8
|
});
|
|
12
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Tooltip/index.tsx"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Tooltip/index.tsx"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAO/C,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,KAAY,EAAE,EAAE;IAC9D,MAAM,EAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,SAAS,EAAC,GAAG,KAAK,CAAC;IAE5D,OAAO,CACH,oBAAC,UAAU,OAAK,SAAS;QACrB,gCAAS,mBAAmB,IAAG,QAAQ,CAAO,CACrC,CAChB,CAAC;AACN,CAAC,CAAC,CAAC"}
|
|
@@ -16,7 +16,4 @@ export interface Props<T extends string> extends Omit<TabsProps, "onChange"> {
|
|
|
16
16
|
activeKey: T;
|
|
17
17
|
onChange: (tab: T) => void;
|
|
18
18
|
}
|
|
19
|
-
export declare
|
|
20
|
-
static displayName: string;
|
|
21
|
-
render(): React.JSX.Element;
|
|
22
|
-
}
|
|
19
|
+
export declare const TypedTabs: <T extends string>(props: Props<T>) => React.JSX.Element;
|