@pinnacle0/web-ui 0.5.84 → 0.6.0-beta.1
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 +14 -50
- package/admin/AdminApp/Default/NavigatorSide/index.js.map +1 -1
- package/admin/AdminApp/Default/SoundSwitch.js +15 -34
- package/admin/AdminApp/Default/SoundSwitch.js.map +1 -1
- package/admin/AdminApp/Default/SquareLogo/index.js +8 -29
- package/admin/AdminApp/Default/SquareLogo/index.js.map +1 -1
- package/admin/AdminApp/Menu.js +40 -82
- package/admin/AdminApp/Menu.js.map +1 -1
- package/admin/AdminApp/Navigator.js +57 -83
- package/admin/AdminApp/Navigator.js.map +1 -1
- package/admin/AdminApp/NotFound.js +8 -30
- package/admin/AdminApp/NotFound.js.map +1 -1
- package/admin/AdminApp/RouteSwitch.js +21 -53
- package/admin/AdminApp/RouteSwitch.js.map +1 -1
- package/admin/AdminApp/WithErrorBoundary.js +13 -33
- package/admin/AdminApp/WithErrorBoundary.js.map +1 -1
- package/admin/AdminApp/context.js +3 -3
- package/admin/AdminApp/context.js.map +1 -1
- package/admin/AdminApp/index.js +26 -43
- package/admin/AdminApp/index.js.map +1 -1
- package/admin/AdminPage/Filter.js +20 -38
- package/admin/AdminPage/Filter.js.map +1 -1
- package/admin/AdminPage/Result.js +15 -62
- package/admin/AdminPage/Result.js.map +1 -1
- package/admin/AdminPage/SaveBar.js +7 -28
- package/admin/AdminPage/SaveBar.js.map +1 -1
- package/admin/AdminPage/Summary.js +6 -27
- package/admin/AdminPage/Summary.js.map +1 -1
- package/admin/AdminPage/TopBar.js +6 -27
- package/admin/AdminPage/TopBar.js.map +1 -1
- package/admin/AdminPage/index.js +11 -32
- package/admin/AdminPage/index.js.map +1 -1
- package/admin/AdminPermissionSelector.js +147 -195
- package/admin/AdminPermissionSelector.js.map +1 -1
- package/core/Amount/AmountPercentage.js +7 -50
- package/core/Amount/AmountPercentage.js.map +1 -1
- package/core/Amount/index.js +15 -36
- package/core/Amount/index.js.map +1 -1
- package/core/AmountConditionInput.js +27 -74
- package/core/AmountConditionInput.js.map +1 -1
- package/core/AmountRangeInput.js +17 -75
- package/core/AmountRangeInput.js.map +1 -1
- package/core/Animated/AnimatePresence.js +35 -87
- package/core/Animated/AnimatePresence.js.map +1 -1
- package/core/Animated/createAnimatedComponent.js +28 -50
- package/core/Animated/createAnimatedComponent.js.map +1 -1
- package/core/Animated/index.js +5 -5
- package/core/Animated/index.js.map +1 -1
- package/core/AuthenticationCodeInput/index.js +48 -136
- package/core/AuthenticationCodeInput/index.js.map +1 -1
- package/core/AutoCompleteInput.js +6 -38
- package/core/AutoCompleteInput.js.map +1 -1
- package/core/Badge.js +2 -13
- package/core/Badge.js.map +1 -1
- package/core/BoolRadio.js +16 -64
- package/core/BoolRadio.js.map +1 -1
- package/core/BoolSelect.js +16 -63
- package/core/BoolSelect.js.map +1 -1
- package/core/BoolSwitch.js +16 -48
- package/core/BoolSwitch.js.map +1 -1
- package/core/Breadcrumb/index.js +18 -66
- package/core/Breadcrumb/index.js.map +1 -1
- package/core/Button.js +2 -25
- package/core/Button.js.map +1 -1
- package/core/Card.js +6 -38
- package/core/Card.js.map +1 -1
- package/core/Carousel.js +6 -49
- package/core/Carousel.js.map +1 -1
- package/core/Carousel3D/index.js +64 -83
- package/core/Carousel3D/index.js.map +1 -1
- package/core/Cascader/InitialNullable.js +7 -50
- package/core/Cascader/InitialNullable.js.map +1 -1
- package/core/Cascader/Nullable.js +11 -81
- package/core/Cascader/Nullable.js.map +1 -1
- package/core/Cascader/index.js +38 -109
- package/core/Cascader/index.js.map +1 -1
- package/core/Checkbox.js +9 -67
- package/core/Checkbox.js.map +1 -1
- package/core/Collapse.js +5 -37
- package/core/Collapse.js.map +1 -1
- package/core/Countdown/SlidingDigit.js +12 -32
- package/core/Countdown/SlidingDigit.js.map +1 -1
- package/core/Countdown/index.js +56 -74
- package/core/Countdown/index.js.map +1 -1
- package/core/DarkOverlay/index.js +6 -27
- package/core/DarkOverlay/index.js.map +1 -1
- package/core/DateCalendar.js +48 -96
- package/core/DateCalendar.js.map +1 -1
- package/core/DatePicker.js +26 -73
- package/core/DatePicker.js.map +1 -1
- package/core/DateRangePicker.js +44 -64
- package/core/DateRangePicker.js.map +1 -1
- package/core/DateTimePicker.js +30 -78
- package/core/DateTimePicker.js.map +1 -1
- package/core/DateTimeRangePicker/index.js +48 -68
- package/core/DateTimeRangePicker/index.js.map +1 -1
- package/core/Descriptions/index.js +11 -69
- package/core/Descriptions/index.js.map +1 -1
- package/core/DocumentTitle.js +25 -43
- package/core/DocumentTitle.js.map +1 -1
- package/core/Drawer.js +4 -36
- package/core/Drawer.js.map +1 -1
- package/core/Dropdown.js +3 -7
- package/core/Dropdown.js.map +1 -1
- package/core/EnumCheckboxGroup/Map.js +8 -51
- package/core/EnumCheckboxGroup/Map.js.map +1 -1
- package/core/EnumCheckboxGroup/index.js +8 -29
- package/core/EnumCheckboxGroup/index.js.map +1 -1
- package/core/EnumRadio/InitialNullable.js +9 -78
- package/core/EnumRadio/InitialNullable.js.map +1 -1
- package/core/EnumRadio/Map.js +8 -51
- package/core/EnumRadio/Map.js.map +1 -1
- package/core/EnumRadio/Nullable.js +13 -83
- package/core/EnumRadio/Nullable.js.map +1 -1
- package/core/EnumRadio/index.js +16 -63
- package/core/EnumRadio/index.js.map +1 -1
- package/core/EnumSelect/InitialNullable.js +7 -50
- package/core/EnumSelect/InitialNullable.js.map +1 -1
- package/core/EnumSelect/Map.js +8 -51
- package/core/EnumSelect/Map.js.map +1 -1
- package/core/EnumSelect/Nullable.js +13 -83
- package/core/EnumSelect/Nullable.js.map +1 -1
- package/core/EnumSelect/index.js +37 -86
- package/core/EnumSelect/index.js.map +1 -1
- package/core/FlatList/Content/Footer/index.js +5 -6
- package/core/FlatList/Content/Footer/index.js.map +1 -1
- package/core/FlatList/Content/index.js +28 -51
- package/core/FlatList/Content/index.js.map +1 -1
- package/core/FlatList/FloatingLoader/index.js +2 -3
- package/core/FlatList/FloatingLoader/index.js.map +1 -1
- package/core/FlatList/Refresh/index.js +2 -3
- package/core/FlatList/Refresh/index.js.map +1 -1
- package/core/FlatList/hook/useRefreshing.js +7 -23
- package/core/FlatList/hook/useRefreshing.js.map +1 -1
- package/core/FlatList/hook/useScrollListSwipe.js +22 -40
- package/core/FlatList/hook/useScrollListSwipe.js.map +1 -1
- package/core/FlatList/index.js +19 -52
- package/core/FlatList/index.js.map +1 -1
- package/core/FlatList/shared/Loader/index.js +1 -1
- package/core/FlatList/shared/Loader/index.js.map +1 -1
- package/core/Form/Item.js +31 -91
- package/core/Form/Item.js.map +1 -1
- package/core/Form/context.js +4 -4
- package/core/Form/context.js.map +1 -1
- package/core/Form/index.js +52 -124
- package/core/Form/index.js.map +1 -1
- package/core/Grid.js +2 -2
- package/core/Grid.js.map +1 -1
- package/core/HTMLContent/index.js +6 -27
- package/core/HTMLContent/index.js.map +1 -1
- package/core/Image.js +5 -37
- package/core/Image.js.map +1 -1
- package/core/ImageUploader/index.js +44 -156
- package/core/ImageUploader/index.js.map +1 -1
- package/core/Input.js +34 -120
- package/core/Input.js.map +1 -1
- package/core/LabelledSelect.js +6 -38
- package/core/LabelledSelect.js.map +1 -1
- package/core/Link.js +7 -28
- package/core/Link.js.map +1 -1
- package/core/LocalImporter.js +22 -84
- package/core/LocalImporter.js.map +1 -1
- package/core/LocaleSelect.js +17 -64
- package/core/LocaleSelect.js.map +1 -1
- package/core/Markdown/index.js +30 -78
- package/core/Markdown/index.js.map +1 -1
- package/core/Modal/index.js +11 -54
- package/core/Modal/index.js.map +1 -1
- package/core/MultipleCascader/index.js +55 -135
- package/core/MultipleCascader/index.js.map +1 -1
- package/core/MultipleEnumSelect.js +13 -60
- package/core/MultipleEnumSelect.js.map +1 -1
- package/core/MultipleSelector/TablePopover.js +37 -85
- package/core/MultipleSelector/TablePopover.js.map +1 -1
- package/core/MultipleSelector/index.js +41 -88
- package/core/MultipleSelector/index.js.map +1 -1
- package/core/MutableTable/index.js +71 -125
- package/core/MutableTable/index.js.map +1 -1
- package/core/NumberInput/NumberInputPercentage.js +24 -93
- package/core/NumberInput/NumberInputPercentage.js.map +1 -1
- package/core/NumberInput/index.js +80 -115
- package/core/NumberInput/index.js.map +1 -1
- package/core/NumberInput/util.js +9 -9
- package/core/NumberInput/util.js.map +1 -1
- package/core/OrientationContext.js +4 -21
- package/core/OrientationContext.js.map +1 -1
- package/core/OverflowableText/index.js +19 -49
- package/core/OverflowableText/index.js.map +1 -1
- package/core/PagedList/index.js +18 -35
- package/core/PagedList/index.js.map +1 -1
- package/core/Pagination/index.js +19 -66
- package/core/Pagination/index.js.map +1 -1
- package/core/Popover/index.js +7 -29
- package/core/Popover/index.js.map +1 -1
- package/core/Progress/index.js +5 -37
- package/core/Progress/index.js.map +1 -1
- package/core/Progress.js +5 -37
- package/core/Progress.js.map +1 -1
- package/core/Radio.d.ts +2 -2
- package/core/Radio.js +7 -39
- package/core/Radio.js.map +1 -1
- package/core/RelativeTime.js +27 -45
- package/core/RelativeTime.js.map +1 -1
- package/core/Resizable/Resizer.js +4 -16
- package/core/Resizable/Resizer.js.map +1 -1
- package/core/Resizable/index.js +32 -55
- package/core/Resizable/index.js.map +1 -1
- package/core/SearchableSelect.js +6 -38
- package/core/SearchableSelect.js.map +1 -1
- package/core/Select.js +7 -39
- package/core/Select.js.map +1 -1
- package/core/SignedAmountInput.js +23 -70
- package/core/SignedAmountInput.js.map +1 -1
- package/core/Skeleton.js +6 -49
- package/core/Skeleton.js.map +1 -1
- package/core/Slider/RangeSlider.js +6 -49
- package/core/Slider/RangeSlider.js.map +1 -1
- package/core/Slider/index.js +24 -94
- package/core/Slider/index.js.map +1 -1
- package/core/Space.js +6 -38
- package/core/Space.js.map +1 -1
- package/core/Spin.js +6 -49
- package/core/Spin.js.map +1 -1
- package/core/StepFormContainer/index.js +17 -64
- package/core/StepFormContainer/index.js.map +1 -1
- package/core/Steps.js +5 -37
- package/core/Steps.js.map +1 -1
- package/core/Table.js +83 -116
- package/core/Table.js.map +1 -1
- package/core/Tabs/Single.js +6 -49
- package/core/Tabs/Single.js.map +1 -1
- package/core/Tabs/index.js +29 -100
- package/core/Tabs/index.js.map +1 -1
- package/core/Tag.js +5 -37
- package/core/Tag.js.map +1 -1
- package/core/TagInput/index.js +50 -95
- package/core/TagInput/index.js.map +1 -1
- package/core/Tags.js +13 -60
- package/core/Tags.js.map +1 -1
- package/core/TimePicker.js +17 -64
- package/core/TimePicker.js.map +1 -1
- package/core/TimeRangePicker.js +28 -47
- package/core/TimeRangePicker.js.map +1 -1
- package/core/Tooltip.js +7 -29
- package/core/Tooltip.js.map +1 -1
- package/core/TypedTabs/index.js +13 -75
- package/core/TypedTabs/index.js.map +1 -1
- package/core/UIProvider.js +4 -27
- package/core/UIProvider.js.map +1 -1
- package/core/Uploader.js +54 -85
- package/core/Uploader.js.map +1 -1
- package/core/VerticalMarquee/index.js +18 -35
- package/core/VerticalMarquee/index.js.map +1 -1
- package/core/VirtualList/index.js +19 -20
- package/core/VirtualList/index.js.map +1 -1
- package/core/VirtualTable/TableHeader.js +7 -9
- package/core/VirtualTable/TableHeader.js.map +1 -1
- package/core/VirtualTable/TableRow.js +12 -13
- package/core/VirtualTable/TableRow.js.map +1 -1
- package/core/VirtualTable/hooks/useColumnWidths.js +20 -36
- package/core/VirtualTable/hooks/useColumnWidths.js.map +1 -1
- package/core/VirtualTable/hooks/useColumnsStickyPosition.js +9 -9
- package/core/VirtualTable/hooks/useColumnsStickyPosition.js.map +1 -1
- package/core/VirtualTable/hooks/useRowSelection.js +28 -54
- package/core/VirtualTable/hooks/useRowSelection.js.map +1 -1
- package/core/VirtualTable/hooks/useScroll.js +13 -29
- package/core/VirtualTable/hooks/useScroll.js.map +1 -1
- package/core/VirtualTable/hooks/useScrollBarSize.js +6 -22
- package/core/VirtualTable/hooks/useScrollBarSize.js.map +1 -1
- package/core/VirtualTable/index.js +24 -25
- package/core/VirtualTable/index.js.map +1 -1
- package/core/WithExplanation/index.js +11 -32
- package/core/WithExplanation/index.js.map +1 -1
- package/core/WithTooltipList.js +17 -66
- package/core/WithTooltipList.js.map +1 -1
- package/core/YearMonthSelector.js +28 -76
- package/core/YearMonthSelector.js.map +1 -1
- package/hooks/useAPI.js +8 -44
- package/hooks/useAPI.js.map +1 -1
- package/hooks/useBool.js +4 -21
- package/hooks/useBool.js.map +1 -1
- package/hooks/useCompositeRef.js +4 -8
- package/hooks/useCompositeRef.js.map +1 -1
- package/hooks/useDebounce.js +6 -35
- package/hooks/useDebounce.js.map +1 -1
- package/hooks/useDelayed.js +7 -8
- package/hooks/useDelayed.js.map +1 -1
- package/hooks/useDidMountEffect.js +1 -1
- package/hooks/useDidMountEffect.js.map +1 -1
- package/hooks/useDraggable/DragController.js +37 -45
- package/hooks/useDraggable/DragController.js.map +1 -1
- package/hooks/useDraggable/index.js +25 -53
- package/hooks/useDraggable/index.js.map +1 -1
- package/hooks/useDraggable/useDrag.js +5 -5
- package/hooks/useDraggable/useDrag.js.map +1 -1
- package/hooks/useExtended.js +8 -8
- package/hooks/useExtended.js.map +1 -1
- package/hooks/useForceUpdate.js +2 -18
- package/hooks/useForceUpdate.js.map +1 -1
- package/hooks/useOrientation.js +2 -18
- package/hooks/useOrientation.js.map +1 -1
- package/hooks/usePrevious.js +1 -1
- package/hooks/usePrevious.js.map +1 -1
- package/hooks/useResizeObserver.js +7 -9
- package/hooks/useResizeObserver.js.map +1 -1
- package/hooks/useSwipe/controller.js +68 -75
- package/hooks/useSwipe/controller.js.map +1 -1
- package/hooks/useSwipe/index.js +6 -14
- package/hooks/useSwipe/index.js.map +1 -1
- package/hooks/useThunk.js +9 -36
- package/hooks/useThunk.js.map +1 -1
- package/hooks/useTransform.js +18 -30
- package/hooks/useTransform.js.map +1 -1
- package/hooks/useWhyDidYouUpdate.js +10 -19
- package/hooks/useWhyDidYouUpdate.js.map +1 -1
- package/hooks/useWillUnmountEffect.js +1 -1
- package/hooks/useWillUnmountEffect.js.map +1 -1
- package/internal/ArrayUtil.js +13 -38
- package/internal/ArrayUtil.js.map +1 -1
- package/internal/ExpirableLocalStorage.js +70 -74
- package/internal/ExpirableLocalStorage.js.map +1 -1
- package/internal/NumberUtil.js +11 -11
- package/internal/NumberUtil.js.map +1 -1
- package/internal/StorageHelper.js +62 -65
- package/internal/StorageHelper.js.map +1 -1
- package/internal/TextUtil.js +6 -10
- package/internal/TextUtil.js.map +1 -1
- package/internal/i18n/admin/en.js +1 -1
- package/internal/i18n/admin/en.js.map +1 -1
- package/internal/i18n/admin/index.js +3 -3
- package/internal/i18n/admin/index.js.map +1 -1
- package/internal/i18n/admin/zh.js +1 -1
- package/internal/i18n/admin/zh.js.map +1 -1
- package/internal/i18n/core/en.js +1 -1
- package/internal/i18n/core/en.js.map +1 -1
- package/internal/i18n/core/index.js +3 -3
- package/internal/i18n/core/index.js.map +1 -1
- package/internal/i18n/core/zh.js +1 -1
- package/internal/i18n/core/zh.js.map +1 -1
- package/internal/i18n/util/en.js +1 -1
- package/internal/i18n/util/en.js.map +1 -1
- package/internal/i18n/util/index.js +3 -3
- package/internal/i18n/util/index.js.map +1 -1
- package/internal/i18n/util/zh.js +1 -1
- package/internal/i18n/util/zh.js.map +1 -1
- package/package.json +6 -6
- package/util/AdminNavigationUtil.js +22 -64
- package/util/AdminNavigationUtil.js.map +1 -1
- package/util/BrowserBookmarkUtil.js +5 -5
- package/util/BrowserBookmarkUtil.js.map +1 -1
- package/util/BrowserUtil/index.js +29 -68
- package/util/BrowserUtil/index.js.map +1 -1
- package/util/CanvasUtil.js +22 -61
- package/util/CanvasUtil.js.map +1 -1
- package/util/Clipboard.js +25 -85
- package/util/Clipboard.js.map +1 -1
- package/util/ExpirableLocalStorageUtil.js +1 -1
- package/util/ExpirableLocalStorageUtil.js.map +1 -1
- package/util/ExportUtil.js +13 -13
- package/util/ExportUtil.js.map +1 -1
- package/util/ImportUtil.js +34 -86
- package/util/ImportUtil.js.map +1 -1
- package/util/LocalStorageUtil.js +1 -1
- package/util/LocalStorageUtil.js.map +1 -1
- package/util/LocaleUtil.js +16 -19
- package/util/LocaleUtil.js.map +1 -1
- package/util/MediaUtil/index.js +15 -15
- package/util/MediaUtil/index.js.map +1 -1
- package/util/MessageUtil.js +5 -16
- package/util/MessageUtil.js.map +1 -1
- package/util/ModalUtil/index.js +46 -68
- package/util/ModalUtil/index.js.map +1 -1
- package/util/NotificationUtil.js +8 -24
- package/util/NotificationUtil.js.map +1 -1
- package/util/OrientationUtil.js +8 -8
- package/util/OrientationUtil.js.map +1 -1
- package/util/PromptUtil/PromptBody.js +24 -88
- package/util/PromptUtil/PromptBody.js.map +1 -1
- package/util/PromptUtil/index.js +20 -33
- package/util/PromptUtil/index.js.map +1 -1
- package/util/ReactUtil.js +20 -54
- package/util/ReactUtil.js.map +1 -1
- package/util/RecentUsedStorageUtil/index.js +14 -15
- package/util/RecentUsedStorageUtil/index.js.map +1 -1
- package/util/RecentUsedStorageUtil/pushToList.js +3 -28
- package/util/RecentUsedStorageUtil/pushToList.js.map +1 -1
- package/util/SessionStorageUtil.js +1 -1
- package/util/SessionStorageUtil.js.map +1 -1
- package/util/SwipeUtil.js +9 -9
- package/util/SwipeUtil.js.map +1 -1
- package/util/UploadUtil/index.js +29 -30
- package/util/UploadUtil/index.js.map +1 -1
package/core/Resizable/index.js
CHANGED
|
@@ -1,103 +1,80 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
import React from "react";
|
|
24
2
|
import { Resizer } from "./Resizer";
|
|
25
3
|
import { classNames } from "../../util/ClassNames";
|
|
26
4
|
import "./index.less";
|
|
27
5
|
import { useCompositeRef } from "../../hooks/useCompositeRef";
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var onResizeStart = function () {
|
|
6
|
+
export const Resizable = React.forwardRef(({ initialHeight, initialWidth, x, y, className, style, gap, children, maxHeight = window.innerHeight, maxWidth = window.innerWidth, minHeight = 0, minWidth = 0, ...restProps }, ref) => {
|
|
7
|
+
const resizableRef = React.useRef(null);
|
|
8
|
+
const startRect = React.useRef({ top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 });
|
|
9
|
+
const compositeRef = useCompositeRef(resizableRef, ref);
|
|
10
|
+
const onResizeStart = () => {
|
|
34
11
|
if (resizableRef.current) {
|
|
35
|
-
|
|
36
|
-
startRect.current = { top
|
|
12
|
+
const { top, right, bottom, left, width, height } = resizableRef.current.getBoundingClientRect();
|
|
13
|
+
startRect.current = { top, right, bottom, left, width, height };
|
|
37
14
|
}
|
|
38
15
|
};
|
|
39
|
-
|
|
16
|
+
const onResizeTop = (state) => {
|
|
40
17
|
if (resizableRef.current) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
18
|
+
const { top, height } = startRect.current;
|
|
19
|
+
const deltaY = state.delta[1];
|
|
20
|
+
const transformedHeight = height - deltaY;
|
|
44
21
|
if (transformedHeight < minHeight || transformedHeight > maxHeight) {
|
|
45
22
|
return;
|
|
46
23
|
}
|
|
47
|
-
resizableRef.current.style.top =
|
|
48
|
-
resizableRef.current.style.height =
|
|
24
|
+
resizableRef.current.style.top = `${top + deltaY}px`;
|
|
25
|
+
resizableRef.current.style.height = `${transformedHeight}px`;
|
|
49
26
|
}
|
|
50
27
|
};
|
|
51
|
-
|
|
28
|
+
const onResizeRight = (state) => {
|
|
52
29
|
if (resizableRef.current) {
|
|
53
|
-
|
|
54
|
-
|
|
30
|
+
const { width } = startRect.current;
|
|
31
|
+
const transformedWidth = width + state.delta[0];
|
|
55
32
|
if (transformedWidth < minWidth || transformedWidth > maxWidth) {
|
|
56
33
|
return;
|
|
57
34
|
}
|
|
58
|
-
resizableRef.current.style.width =
|
|
35
|
+
resizableRef.current.style.width = `${transformedWidth}px`;
|
|
59
36
|
}
|
|
60
37
|
};
|
|
61
|
-
|
|
38
|
+
const onResizeBottom = (state) => {
|
|
62
39
|
if (resizableRef.current) {
|
|
63
|
-
|
|
64
|
-
|
|
40
|
+
const { height } = startRect.current;
|
|
41
|
+
const transformedHeight = height + state.delta[1];
|
|
65
42
|
if (transformedHeight < minHeight || transformedHeight > maxHeight) {
|
|
66
43
|
return;
|
|
67
44
|
}
|
|
68
|
-
resizableRef.current.style.height =
|
|
45
|
+
resizableRef.current.style.height = `${transformedHeight}px`;
|
|
69
46
|
}
|
|
70
47
|
};
|
|
71
|
-
|
|
48
|
+
const onResizeLeft = (state) => {
|
|
72
49
|
if (resizableRef.current) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
const { left, width } = startRect.current;
|
|
51
|
+
const deltaX = state.delta[0];
|
|
52
|
+
const transformedWidth = width - deltaX;
|
|
76
53
|
if (transformedWidth < minWidth || transformedWidth > maxWidth) {
|
|
77
54
|
return;
|
|
78
55
|
}
|
|
79
|
-
resizableRef.current.style.left =
|
|
80
|
-
resizableRef.current.style.width =
|
|
56
|
+
resizableRef.current.style.left = `${left + deltaX}px`;
|
|
57
|
+
resizableRef.current.style.width = `${transformedWidth}px`;
|
|
81
58
|
}
|
|
82
59
|
};
|
|
83
|
-
return (React.createElement("div",
|
|
60
|
+
return (React.createElement("div", { className: classNames("g-resizable", className), ref: compositeRef, style: { ...style, height: initialHeight, width: initialWidth, top: y, left: x }, ...restProps },
|
|
84
61
|
React.createElement(Resizer, { className: "top", onResizeStart: onResizeStart, onResize: onResizeTop, gap: gap }),
|
|
85
|
-
React.createElement(Resizer, { className: "top-right", gap: gap, onResizeStart: onResizeStart, onResize:
|
|
62
|
+
React.createElement(Resizer, { className: "top-right", gap: gap, onResizeStart: onResizeStart, onResize: state => {
|
|
86
63
|
onResizeTop(state);
|
|
87
64
|
onResizeRight(state);
|
|
88
65
|
} }),
|
|
89
66
|
React.createElement(Resizer, { className: "right", gap: gap, onResizeStart: onResizeStart, onResize: onResizeRight }),
|
|
90
|
-
React.createElement(Resizer, { className: "bottom-right", gap: gap, onResizeStart: onResizeStart, onResize:
|
|
67
|
+
React.createElement(Resizer, { className: "bottom-right", gap: gap, onResizeStart: onResizeStart, onResize: state => {
|
|
91
68
|
onResizeRight(state);
|
|
92
69
|
onResizeBottom(state);
|
|
93
70
|
} }),
|
|
94
71
|
React.createElement(Resizer, { className: "bottom", gap: gap, onResizeStart: onResizeStart, onResize: onResizeBottom }),
|
|
95
|
-
React.createElement(Resizer, { className: "bottom-left", gap: gap, onResizeStart: onResizeStart, onResize:
|
|
72
|
+
React.createElement(Resizer, { className: "bottom-left", gap: gap, onResizeStart: onResizeStart, onResize: state => {
|
|
96
73
|
onResizeBottom(state);
|
|
97
74
|
onResizeLeft(state);
|
|
98
75
|
} }),
|
|
99
76
|
React.createElement(Resizer, { className: "left", gap: gap, onResizeStart: onResizeStart, onResize: onResizeLeft }),
|
|
100
|
-
React.createElement(Resizer, { className: "top-left", gap: gap, onResizeStart: onResizeStart, onResize:
|
|
77
|
+
React.createElement(Resizer, { className: "top-left", gap: gap, onResizeStart: onResizeStart, onResize: state => {
|
|
101
78
|
onResizeTop(state);
|
|
102
79
|
onResizeLeft(state);
|
|
103
80
|
} }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Resizable/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Resizable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEjD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAC;AAuB5D,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACrC,CAAC,EAAC,aAAa,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,WAAW,EAAE,QAAQ,GAAG,MAAM,CAAC,UAAU,EAAE,SAAS,GAAG,CAAC,EAAE,QAAQ,GAAG,CAAC,EAAE,GAAG,SAAS,EAAC,EAAE,GAAG,EAAE,EAAE;IACnL,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAO,EAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;IAClG,MAAM,YAAY,GAAG,eAAe,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IAExD,MAAM,aAAa,GAAG,GAAG,EAAE;Q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G,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,GAAI;QAC5F,oBAAC,OAAO,IACJ,SAAS,EAAC,UAAU,EACpB,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,KAAK,CAAC,EAAE;gBACd,WAAW,CAAC,KAAK,CAAC,CAAC;gBACnB,YAAY,CAAC,KAAK,CAAC,CAAC;YACxB,CAAC,GACH;QACF,6BAAK,SAAS,EAAC,kBAAkB,IAAE,QAAQ,CAAO,CAChD,CACT,CAAC;AACN,CAAC,CACJ,CAAC"}
|
package/core/SearchableSelect.js
CHANGED
|
@@ -1,42 +1,10 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
1
|
import { Select } from "./Select";
|
|
28
2
|
import React from "react";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
3
|
+
export class SearchableSelect extends React.PureComponent {
|
|
4
|
+
static displayName = "SearchableSelect";
|
|
5
|
+
static Option = Select.Option;
|
|
6
|
+
render() {
|
|
7
|
+
return React.createElement(Select, { optionFilterProp: this.props.options ? "label" : "children", showSearch: true, ...this.props });
|
|
33
8
|
}
|
|
34
|
-
|
|
35
|
-
return React.createElement(Select, __assign({ optionFilterProp: this.props.options ? "label" : "children", showSearch: true }, this.props));
|
|
36
|
-
};
|
|
37
|
-
SearchableSelect.displayName = "SearchableSelect";
|
|
38
|
-
SearchableSelect.Option = Select.Option;
|
|
39
|
-
return SearchableSelect;
|
|
40
|
-
}(React.PureComponent));
|
|
41
|
-
export { SearchableSelect };
|
|
9
|
+
}
|
|
42
10
|
//# sourceMappingURL=SearchableSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchableSelect.js","sourceRoot":"","sources":["../../src/core/SearchableSelect.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchableSelect.js","sourceRoot":"","sources":["../../src/core/SearchableSelect.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,OAAO,gBAAgD,SAAQ,KAAK,CAAC,aAA+B;IACtG,MAAM,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAExC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAqE,CAAC;IAE7F,MAAM;QACF,OAAO,oBAAC,MAAM,IAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,EAAE,UAAU,WAAK,IAAI,CAAC,KAAK,GAAI,CAAC;IAC9G,CAAC"}
|
package/core/Select.js
CHANGED
|
@@ -1,43 +1,11 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
1
|
import AntSelect from "antd/es/select";
|
|
28
2
|
import React from "react";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
3
|
+
export class Select extends React.PureComponent {
|
|
4
|
+
static displayName = "Select";
|
|
5
|
+
static Option = AntSelect.Option;
|
|
6
|
+
static OptGroup = AntSelect.OptGroup;
|
|
7
|
+
render() {
|
|
8
|
+
return React.createElement(AntSelect, { ...this.props });
|
|
33
9
|
}
|
|
34
|
-
|
|
35
|
-
return React.createElement(AntSelect, __assign({}, this.props));
|
|
36
|
-
};
|
|
37
|
-
Select.displayName = "Select";
|
|
38
|
-
Select.Option = AntSelect.Option;
|
|
39
|
-
Select.OptGroup = AntSelect.OptGroup;
|
|
40
|
-
return Select;
|
|
41
|
-
}(React.PureComponent));
|
|
42
|
-
export { Select };
|
|
10
|
+
}
|
|
43
11
|
//# sourceMappingURL=Select.js.map
|
package/core/Select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/core/Select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/core/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,OAAO,MAAsC,SAAQ,KAAK,CAAC,aAA+B;IAC5F,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;IAE9B,MAAM,CAAC,MAAM,GAA4B,SAAS,CAAC,MAAM,CAAC;IAE1D,MAAM,CAAC,QAAQ,GAA8B,SAAS,CAAC,QAAQ,CAAC;IAEhE,MAAM;QACF,OAAO,oBAAC,SAAS,OAAK,IAAI,CAAC,KAAK,GAAI,CAAC;IACzC,CAAC"}
|
|
@@ -1,81 +1,34 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
17
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
18
|
-
if (!m) return o;
|
|
19
|
-
var i = m.call(o), r, ar = [], e;
|
|
20
|
-
try {
|
|
21
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
22
|
-
}
|
|
23
|
-
catch (error) { e = { error: error }; }
|
|
24
|
-
finally {
|
|
25
|
-
try {
|
|
26
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
27
|
-
}
|
|
28
|
-
finally { if (e) throw e.error; }
|
|
29
|
-
}
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
32
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
33
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
34
|
-
if (ar || !(i in from)) {
|
|
35
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
36
|
-
ar[i] = from[i];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
40
|
-
};
|
|
41
1
|
import React from "react";
|
|
42
2
|
import { Space } from "./Space";
|
|
43
3
|
import { NumberInput } from "./NumberInput";
|
|
44
4
|
import { Select } from "./Select";
|
|
45
5
|
import { i18n } from "../internal/i18n/core";
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var _a = this.props, value = _a.value, labels = _a.labels, scale = _a.scale, max = _a.max;
|
|
68
|
-
var t = i18n();
|
|
69
|
-
var safeScale = scale || 2;
|
|
70
|
-
var min = Number(Math.pow(0.1, safeScale).toFixed(safeScale));
|
|
6
|
+
export class SignedAmountInput extends React.PureComponent {
|
|
7
|
+
static displayName = "SignedAmountInput";
|
|
8
|
+
selectStyle = { width: 96 };
|
|
9
|
+
inputStyle = { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 };
|
|
10
|
+
onInputChange = (amount) => {
|
|
11
|
+
const { value, onChange } = this.props;
|
|
12
|
+
onChange({ isIncrease: value.isIncrease, amount });
|
|
13
|
+
};
|
|
14
|
+
onSelectChange = (newValue) => {
|
|
15
|
+
const isIncrease = newValue === "+";
|
|
16
|
+
const { value, onChange, onSignChange } = this.props;
|
|
17
|
+
onChange({ isIncrease, amount: value.amount });
|
|
18
|
+
if (onSignChange) {
|
|
19
|
+
onSignChange(isIncrease);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
render() {
|
|
23
|
+
const { value, labels, scale, max } = this.props;
|
|
24
|
+
const t = i18n();
|
|
25
|
+
const safeScale = scale || 2;
|
|
26
|
+
const min = Number(Math.pow(0.1, safeScale).toFixed(safeScale));
|
|
71
27
|
return (React.createElement(Space.Compact, null,
|
|
72
28
|
React.createElement(Select, { onChange: this.onSelectChange, value: value.isIncrease ? "+" : "-", style: this.selectStyle },
|
|
73
29
|
React.createElement(Select.Option, { key: "+", value: "+" }, labels[0] || t.depositPositive + " (+)"),
|
|
74
30
|
React.createElement(Select.Option, { key: "-", value: "-" }, labels[1] || t.depositNegative + " (-)")),
|
|
75
31
|
React.createElement(NumberInput, { allowNull: true, value: value.amount, min: min, max: max, scale: scale, onChange: this.onInputChange, inputStyle: this.inputStyle })));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return SignedAmountInput;
|
|
79
|
-
}(React.PureComponent));
|
|
80
|
-
export { SignedAmountInput };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
81
34
|
//# sourceMappingURL=SignedAmountInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignedAmountInput.js","sourceRoot":"","sources":["../../src/core/SignedAmountInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignedAmountInput.js","sourceRoot":"","sources":["../../src/core/SignedAmountInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAc3C,MAAM,OAAO,iBAAkB,SAAQ,KAAK,CAAC,aAAoB;IAC7D,MAAM,CAAC,WAAW,GAAG,mBAAmB,CAAC;IAExB,WAAW,GAAwB,EAAC,KAAK,EAAE,EAAE,EAAC,CAAC;IAC/C,UAAU,GAAwB,EAAC,mBAAmB,EAAE,CAAC,EAAE,sBAAsB,EAAE,CAAC,EAAC,CAAC;IAEvG,aAAa,GAAG,CAAC,MAAqB,EAAE,EAAE;QACtC,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACrC,QAAQ,CAAC,EAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAC,CAAC,CAAC;IACrD,CAAC,CAAC;IAEF,cAAc,GAAG,CAAC,QAAmB,EAAE,EAAE;QACrC,MAAM,UAAU,GAAG,QAAQ,KAAK,GAAG,CAAC;QACpC,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACnD,QAAQ,CAAC,EAAC,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAC,CAAC,CAAC;QAC7C,IAAI,YAAY,EAAE,CAAC;Y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-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
-
var t = {};
|
|
29
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
-
t[p] = s[p];
|
|
31
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
-
t[p[i]] = s[p[i]];
|
|
35
|
-
}
|
|
36
|
-
return t;
|
|
37
|
-
};
|
|
38
1
|
import React from "react";
|
|
39
2
|
import AntSkeleton from "antd/es/skeleton";
|
|
40
3
|
import { classNames } from "../util/ClassNames";
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
4
|
+
export class Skeleton extends React.PureComponent {
|
|
5
|
+
static displayName = "Skeleton";
|
|
6
|
+
render() {
|
|
7
|
+
const { className, ...restProps } = this.props;
|
|
8
|
+
return React.createElement(AntSkeleton, { className: classNames("g-skeleton", className), ...restProps });
|
|
45
9
|
}
|
|
46
|
-
|
|
47
|
-
var _a = this.props, className = _a.className, restProps = __rest(_a, ["className"]);
|
|
48
|
-
return React.createElement(AntSkeleton, __assign({ className: classNames("g-skeleton", className) }, restProps));
|
|
49
|
-
};
|
|
50
|
-
Skeleton.displayName = "Skeleton";
|
|
51
|
-
return Skeleton;
|
|
52
|
-
}(React.PureComponent));
|
|
53
|
-
export { Skeleton };
|
|
10
|
+
}
|
|
54
11
|
//# sourceMappingURL=Skeleton.js.map
|
package/core/Skeleton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../src/core/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../src/core/Skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAI9C,MAAM,OAAO,QAAS,SAAQ,KAAK,CAAC,aAAoB;IACpD,MAAM,CAAC,WAAW,GAAG,UAAU,CAAC;IAEhC,MAAM;QACF,MAAM,EAAC,SAAS,EAAE,GAAG,SAAS,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7C,OAAO,oBAAC,WAAW,IAAC,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,KAAM,SAAS,GAAI,CAAC;IAC1F,CAAC"}
|
|
@@ -1,53 +1,10 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
-
var t = {};
|
|
29
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
-
t[p] = s[p];
|
|
31
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
-
t[p[i]] = s[p[i]];
|
|
35
|
-
}
|
|
36
|
-
return t;
|
|
37
|
-
};
|
|
38
1
|
import React from "react";
|
|
39
2
|
import AntSlider from "antd/es/slider";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
3
|
+
export class RangeSlider extends React.PureComponent {
|
|
4
|
+
static displayName = "RangeSlider";
|
|
5
|
+
render() {
|
|
6
|
+
const { draggable, onChange, ...rest } = this.props;
|
|
7
|
+
return React.createElement(AntSlider, { range: { draggableTrack: draggable }, onChange: (x) => onChange(x), ...rest });
|
|
44
8
|
}
|
|
45
|
-
|
|
46
|
-
var _a = this.props, draggable = _a.draggable, onChange = _a.onChange, rest = __rest(_a, ["draggable", "onChange"]);
|
|
47
|
-
return React.createElement(AntSlider, __assign({ range: { draggableTrack: draggable }, onChange: function (x) { return onChange(x); } }, rest));
|
|
48
|
-
};
|
|
49
|
-
RangeSlider.displayName = "RangeSlider";
|
|
50
|
-
return RangeSlider;
|
|
51
|
-
}(React.PureComponent));
|
|
52
|
-
export { RangeSlider };
|
|
9
|
+
}
|
|
53
10
|
//# sourceMappingURL=RangeSlider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeSlider.js","sourceRoot":"","sources":["../../../src/core/Slider/RangeSlider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RangeSlider.js","sourceRoot":"","sources":["../../../src/core/Slider/RangeSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAOvC,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,aAAyB;IAC5D,MAAM,CAAC,WAAW,GAAG,aAAa,CAAC;IAEnC,MAAM;QACF,MAAM,EAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAClD,OAAO,oBAAC,SAAS,IAAC,KAAK,EAAE,EAAC,cAAc,EAAE,SAAS,EAAC,EAAE,QAAQ,EAAE,CAAC,CAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAqB,CAAC,KAAM,IAAI,GAAI,CAAC;IACnI,CAAC"}
|