@pinnacle0/web-ui 0.5.83 → 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.d.ts +0 -1
- package/util/BrowserUtil/index.js +29 -80
- 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/Drawer.js
CHANGED
|
@@ -1,40 +1,8 @@
|
|
|
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 React from "react";
|
|
28
2
|
import AntdDrawer from "antd/es/drawer";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3
|
+
export class Drawer extends React.PureComponent {
|
|
4
|
+
render() {
|
|
5
|
+
return React.createElement(AntdDrawer, { ...this.props });
|
|
33
6
|
}
|
|
34
|
-
|
|
35
|
-
return React.createElement(AntdDrawer, __assign({}, this.props));
|
|
36
|
-
};
|
|
37
|
-
return Drawer;
|
|
38
|
-
}(React.PureComponent));
|
|
39
|
-
export { Drawer };
|
|
7
|
+
}
|
|
40
8
|
//# sourceMappingURL=Drawer.js.map
|
package/core/Drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../src/core/Drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../src/core/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,gBAAgB,CAAC;AAKxC,MAAM,OAAO,MAAO,SAAQ,KAAK,CAAC,aAAoB;IAClD,MAAM;QACF,OAAO,oBAAC,UAAU,OAAK,IAAI,CAAC,KAAK,GAAI,CAAC;IAC1C,CAAC;CACJ"}
|
package/core/Dropdown.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import AntdDropdown from "antd/es/dropdown";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Dropdown.Button = AntdDropdown.Button;
|
|
6
|
-
return Dropdown;
|
|
7
|
-
}());
|
|
8
|
-
export { Dropdown };
|
|
2
|
+
export class Dropdown {
|
|
3
|
+
static Button = AntdDropdown.Button;
|
|
4
|
+
}
|
|
9
5
|
//# sourceMappingURL=Dropdown.js.map
|
package/core/Dropdown.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../src/core/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAM5C;
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../src/core/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAM5C,MAAM,OAAO,QAAQ;IACjB,MAAM,CAAC,MAAM,GAA+B,YAAY,CAAC,MAAM,CAAC"}
|
|
@@ -1,55 +1,12 @@
|
|
|
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 { EnumCheckboxGroup } from "./index";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
3
|
+
export class Map extends React.PureComponent {
|
|
4
|
+
static displayName = "EnumCheckboxGroup.Map";
|
|
5
|
+
render() {
|
|
6
|
+
const { map, ...restProps } = this.props;
|
|
7
|
+
const list = Object.keys(map);
|
|
8
|
+
const translator = (_) => map[_];
|
|
9
|
+
return React.createElement(EnumCheckboxGroup, { list: list, translator: translator, ...restProps });
|
|
44
10
|
}
|
|
45
|
-
|
|
46
|
-
var _a = this.props, map = _a.map, restProps = __rest(_a, ["map"]);
|
|
47
|
-
var list = Object.keys(map);
|
|
48
|
-
var translator = function (_) { return map[_]; };
|
|
49
|
-
return React.createElement(EnumCheckboxGroup, __assign({ list: list, translator: translator }, restProps));
|
|
50
|
-
};
|
|
51
|
-
Map.displayName = "EnumCheckboxGroup.Map";
|
|
52
|
-
return Map;
|
|
53
|
-
}(React.PureComponent));
|
|
54
|
-
export { Map };
|
|
11
|
+
}
|
|
55
12
|
//# sourceMappingURL=Map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.js","sourceRoot":"","sources":["../../../src/core/EnumCheckboxGroup/Map.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Map.js","sourceRoot":"","sources":["../../../src/core/EnumCheckboxGroup/Map.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAQ1C,MAAM,OAAO,GAAyB,SAAQ,KAAK,CAAC,aAA0B;IAC1E,MAAM,CAAC,WAAW,GAAG,uBAAuB,CAAC;IAE7C,MAAM;QACF,MAAM,EAAC,GAAG,EAAE,GAAG,SAAS,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAEvC,MAAM,IAAI,GAAW,MAAM,CAAC,IAAI,CAAC,GAAG,CAAW,CAAC;QAChD,MAAM,UAAU,GAAG,CAAC,CAAO,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEvC,OAAO,oBAAC,iBAAiB,IAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,KAAM,SAAS,GAAI,CAAC;IACpF,CAAC"}
|
|
@@ -1,36 +1,15 @@
|
|
|
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
1
|
import React from "react";
|
|
17
2
|
import { Checkbox } from "../Checkbox";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
EnumCheckboxGroup.prototype.render = function () {
|
|
24
|
-
var _a = this.props, list = _a.list, translator = _a.translator, disabledItems = _a.disabledItems, value = _a.value, onChange = _a.onChange;
|
|
25
|
-
var options = list.map(function (_) { return ({
|
|
3
|
+
export class EnumCheckboxGroup extends React.PureComponent {
|
|
4
|
+
static displayName = "EnumCheckboxGroup";
|
|
5
|
+
render() {
|
|
6
|
+
const { list, translator, disabledItems, value, onChange } = this.props;
|
|
7
|
+
const options = list.map(_ => ({
|
|
26
8
|
label: translator ? translator(_) : _.toString(),
|
|
27
9
|
value: _,
|
|
28
10
|
disabled: disabledItems ? disabledItems === "all" || disabledItems.includes(_) : false,
|
|
29
|
-
})
|
|
11
|
+
}));
|
|
30
12
|
return React.createElement(Checkbox.Group, { options: options, value: value, onChange: onChange });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return EnumCheckboxGroup;
|
|
34
|
-
}(React.PureComponent));
|
|
35
|
-
export { EnumCheckboxGroup };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
36
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/EnumCheckboxGroup/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/EnumCheckboxGroup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AASrC,MAAM,OAAO,iBAA0D,SAAQ,KAAK,CAAC,aAA0B;IAC3G,MAAM,CAAC,WAAW,GAAG,mBAAmB,CAAC;IAEzC,MAAM;QACF,MAAM,EAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACtE,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC3B,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YAChD,KAAK,EAAE,CAAC;YACR,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,aAAa,KAAK,KAAK,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK;SACzF,CAAC,CAAC,CAAC;QACJ,OAAO,oBAAC,QAAQ,CAAC,KAAK,IAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAe,GAAI,CAAC;IACzF,CAAC"}
|
|
@@ -1,81 +1,12 @@
|
|
|
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
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
-
if (!m) return o;
|
|
41
|
-
var i = m.call(o), r, ar = [], e;
|
|
42
|
-
try {
|
|
43
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
-
}
|
|
45
|
-
catch (error) { e = { error: error }; }
|
|
46
|
-
finally {
|
|
47
|
-
try {
|
|
48
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
-
}
|
|
50
|
-
finally { if (e) throw e.error; }
|
|
51
|
-
}
|
|
52
|
-
return ar;
|
|
53
|
-
};
|
|
54
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
55
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
56
|
-
if (ar || !(i in from)) {
|
|
57
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
58
|
-
ar[i] = from[i];
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
62
|
-
};
|
|
63
1
|
import React from "react";
|
|
64
2
|
import { EnumRadio } from "./index";
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var wrappedValue = (value === null ? this.nullValue : value); // nullValue does not exist in list, so no Radio will be selected
|
|
75
|
-
return React.createElement(EnumRadio, __assign({ value: wrappedValue }, restProps));
|
|
76
|
-
};
|
|
77
|
-
InitialNullable.displayName = "EnumRadio.InitialNullable";
|
|
78
|
-
return InitialNullable;
|
|
79
|
-
}(React.PureComponent));
|
|
80
|
-
export { InitialNullable };
|
|
3
|
+
export class InitialNullable extends React.PureComponent {
|
|
4
|
+
static displayName = "EnumRadio.InitialNullable";
|
|
5
|
+
nullValue = "@@NULL";
|
|
6
|
+
render() {
|
|
7
|
+
const { value, ...restProps } = this.props;
|
|
8
|
+
const wrappedValue = (value === null ? this.nullValue : value); // nullValue does not exist in list, so no Radio will be selected
|
|
9
|
+
return React.createElement(EnumRadio, { value: wrappedValue, ...restProps });
|
|
10
|
+
}
|
|
11
|
+
}
|
|
81
12
|
//# sourceMappingURL=InitialNullable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitialNullable.js","sourceRoot":"","sources":["../../../src/core/EnumRadio/InitialNullable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InitialNullable.js","sourceRoot":"","sources":["../../../src/core/EnumRadio/InitialNullable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AASlC,MAAM,OAAO,eAAwD,SAAQ,KAAK,CAAC,aAA0B;IACzG,MAAM,CAAC,WAAW,GAAG,2BAA2B,CAAC;IAEhC,SAAS,GAAa,QAAQ,CAAC;IAEhD,MAAM;QACF,MAAM,EAAC,KAAK,EAAE,GAAG,SAAS,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzC,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAS,CAAC,CAAC,iEAAiE;QAEzI,OAAO,oBAAC,SAAS,IAAC,KAAK,EAAE,YAAY,KAAM,SAAS,GAAI,CAAC;IAC7D,CAAC"}
|
package/core/EnumRadio/Map.js
CHANGED
|
@@ -1,55 +1,12 @@
|
|
|
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 { EnumRadio } from "./index";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
3
|
+
export class Map extends React.PureComponent {
|
|
4
|
+
static displayName = "EnumRadio.Map";
|
|
5
|
+
render() {
|
|
6
|
+
const { map, ...restProps } = this.props;
|
|
7
|
+
const list = Object.keys(map);
|
|
8
|
+
const translator = (_) => map[_];
|
|
9
|
+
return React.createElement(EnumRadio, { list: list, translator: translator, ...restProps });
|
|
44
10
|
}
|
|
45
|
-
|
|
46
|
-
var _a = this.props, map = _a.map, restProps = __rest(_a, ["map"]);
|
|
47
|
-
var list = Object.keys(map);
|
|
48
|
-
var translator = function (_) { return map[_]; };
|
|
49
|
-
return React.createElement(EnumRadio, __assign({ list: list, translator: translator }, restProps));
|
|
50
|
-
};
|
|
51
|
-
Map.displayName = "EnumRadio.Map";
|
|
52
|
-
return Map;
|
|
53
|
-
}(React.PureComponent));
|
|
54
|
-
export { Map };
|
|
11
|
+
}
|
|
55
12
|
//# sourceMappingURL=Map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.js","sourceRoot":"","sources":["../../../src/core/EnumRadio/Map.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Map.js","sourceRoot":"","sources":["../../../src/core/EnumRadio/Map.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAOlC,MAAM,OAAO,GAAyB,SAAQ,KAAK,CAAC,aAA0B;IAC1E,MAAM,CAAC,WAAW,GAAG,eAAe,CAAC;IAErC,MAAM;QACF,MAAM,EAAC,GAAG,EAAE,GAAG,SAAS,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAEvC,MAAM,IAAI,GAAW,MAAM,CAAC,IAAI,CAAC,GAAG,CAAW,CAAC;QAChD,MAAM,UAAU,GAAG,CAAC,CAAO,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEvC,OAAO,oBAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,KAAM,SAAS,GAAI,CAAC;IAC5E,CAAC"}
|
|
@@ -1,88 +1,18 @@
|
|
|
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
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
-
if (!m) return o;
|
|
41
|
-
var i = m.call(o), r, ar = [], e;
|
|
42
|
-
try {
|
|
43
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
-
}
|
|
45
|
-
catch (error) { e = { error: error }; }
|
|
46
|
-
finally {
|
|
47
|
-
try {
|
|
48
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
-
}
|
|
50
|
-
finally { if (e) throw e.error; }
|
|
51
|
-
}
|
|
52
|
-
return ar;
|
|
53
|
-
};
|
|
54
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
55
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
56
|
-
if (ar || !(i in from)) {
|
|
57
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
58
|
-
ar[i] = from[i];
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
62
|
-
};
|
|
63
1
|
import React from "react";
|
|
64
2
|
import { EnumRadio } from "./index";
|
|
65
3
|
import { i18n } from "../../internal/i18n/core";
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
var _a = this.props, value = _a.value, onChange = _a.onChange, nullText = _a.nullText, nullPositionIndex = _a.nullPositionIndex, list = _a.list, translator = _a.translator, restProps = __rest(_a, ["value", "onChange", "nullText", "nullPositionIndex", "list", "translator"]);
|
|
76
|
-
var t = i18n();
|
|
77
|
-
var wrappedValue = value === null ? this.nullValue : value;
|
|
78
|
-
var wrappedOnChange = function (value) { return onChange(value === _this.nullValue ? null : value); };
|
|
79
|
-
var wrappedList = __spreadArray([], __read(list), false);
|
|
4
|
+
export class Nullable extends React.PureComponent {
|
|
5
|
+
static displayName = "EnumRadio.Nullable";
|
|
6
|
+
nullValue = "@@NULL";
|
|
7
|
+
render() {
|
|
8
|
+
const { value, onChange, nullText, nullPositionIndex, list, translator, ...restProps } = this.props;
|
|
9
|
+
const t = i18n();
|
|
10
|
+
const wrappedValue = value === null ? this.nullValue : value;
|
|
11
|
+
const wrappedOnChange = (value) => onChange(value === this.nullValue ? null : value);
|
|
12
|
+
const wrappedList = [...list];
|
|
80
13
|
wrappedList.splice(nullPositionIndex || 0, 0, this.nullValue);
|
|
81
|
-
|
|
82
|
-
return React.createElement(EnumRadio,
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return Nullable;
|
|
86
|
-
}(React.PureComponent));
|
|
87
|
-
export { Nullable };
|
|
14
|
+
const wrappedTranslator = (value) => (value === this.nullValue ? (nullText ?? t.all) : translator ? translator(value) : value.toString());
|
|
15
|
+
return React.createElement(EnumRadio, { value: wrappedValue, onChange: wrappedOnChange, list: wrappedList, translator: wrappedTranslator, ...restProps });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
88
18
|
//# sourceMappingURL=Nullable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Nullable.js","sourceRoot":"","sources":["../../../src/core/EnumRadio/Nullable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Nullable.js","sourceRoot":"","sources":["../../../src/core/EnumRadio/Nullable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAElC,OAAO,EAAC,IAAI,EAAC,MAAM,0BAA0B,CAAC;AAS9C,MAAM,OAAO,QAAiD,SAAQ,KAAK,CAAC,aAA0B;IAClG,MAAM,CAAC,WAAW,GAAG,oBAAoB,CAAC;IAEzB,SAAS,GAAa,QAAQ,CAAC;IAEhD,MAAM;QACF,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,SAAS,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAClG,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;QAEjB,MAAM,YAAY,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;QAC7D,MAAM,eAAe,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACtG,MAAM,WAAW,GAA2B,CAAC,GAAG,IAAI,CAAC,CAAC;QACtD,WAAW,CAAC,MAAM,CAAC,iBAAiB,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE3J,OAAO,oBAAC,SAAS,IAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,KAAM,SAAS,GAAI,CAAC;IAC1I,CAAC"}
|
package/core/EnumRadio/index.js
CHANGED
|
@@ -1,70 +1,23 @@
|
|
|
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 { Radio } from "../Radio";
|
|
43
3
|
import { Nullable } from "./Nullable";
|
|
44
4
|
import { InitialNullable } from "./InitialNullable";
|
|
45
5
|
import { Map } from "./Map";
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return _this;
|
|
55
|
-
}
|
|
56
|
-
EnumRadio.prototype.render = function () {
|
|
57
|
-
var _a = this.props, list = _a.list, translator = _a.translator, value = _a.value, useButtonMode = _a.useButtonMode, buttonStyle = _a.buttonStyle, disabled = _a.disabled, className = _a.className, style = _a.style;
|
|
58
|
-
var RadioItem = useButtonMode ? Radio.Button : Radio;
|
|
59
|
-
return (React.createElement(Radio.Group, { value: value, onChange: this.onChange, disabled: disabled, className: className, style: style, optionType: useButtonMode ? "button" : undefined, buttonStyle: buttonStyle }, list.map(function (_) { return (
|
|
60
|
-
// RadioItem can accept any type as value, and emit the exact type while onChange
|
|
61
|
-
React.createElement(RadioItem, { key: _.toString(), value: _ }, translator ? translator(_) : _.toString())); })));
|
|
6
|
+
export class EnumRadio extends React.PureComponent {
|
|
7
|
+
static displayName = "EnumRadio";
|
|
8
|
+
static Nullable = Nullable;
|
|
9
|
+
static InitialNullable = InitialNullable;
|
|
10
|
+
static Map = Map;
|
|
11
|
+
onChange = (event) => {
|
|
12
|
+
const enumValue = event.target.value;
|
|
13
|
+
this.props.onChange(enumValue);
|
|
62
14
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}(
|
|
69
|
-
|
|
15
|
+
render() {
|
|
16
|
+
const { list, translator, value, useButtonMode, buttonStyle, disabled, className, style } = this.props;
|
|
17
|
+
const RadioItem = useButtonMode ? Radio.Button : Radio;
|
|
18
|
+
return (React.createElement(Radio.Group, { value: value, onChange: this.onChange, disabled: disabled, className: className, style: style, optionType: useButtonMode ? "button" : undefined, buttonStyle: buttonStyle }, list.map(_ => (
|
|
19
|
+
// RadioItem can accept any type as value, and emit the exact type while onChange
|
|
20
|
+
React.createElement(RadioItem, { key: _.toString(), value: _ }, translator ? translator(_) : _.toString())))));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
70
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/EnumRadio/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/EnumRadio/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAe1B,MAAM,OAAO,SAAkD,SAAQ,KAAK,CAAC,aAA0B;IACnG,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;IAEjB,QAAQ,GAAG,CAAC,KAAuB,EAAE,EAAE;QACnC,MAAM,SAAS,GAAS,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,MAAM;QACF,MAAM,EAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACrG,MAAM,SAAS,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;QACvD,OAAO,CACH,oBAAC,KAAK,CAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,IACjL,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACX,iFAAiF;QACjF,oBAAC,SAAS,IAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,IACjC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAClC,CACf,CAAC,CACQ,CACjB,CAAC;IACN,CAAC"}
|
|
@@ -1,54 +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
|
-
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 { EnumSelect } from "./index";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
3
|
+
export class InitialNullable extends React.PureComponent {
|
|
4
|
+
static displayName = "EnumSelect.InitialNullable";
|
|
5
|
+
render() {
|
|
6
|
+
const { value, ...restProps } = this.props;
|
|
7
|
+
const wrappedValue = value;
|
|
8
|
+
return React.createElement(EnumSelect, { value: wrappedValue, ...restProps });
|
|
44
9
|
}
|
|
45
|
-
|
|
46
|
-
var _a = this.props, value = _a.value, restProps = __rest(_a, ["value"]);
|
|
47
|
-
var wrappedValue = value;
|
|
48
|
-
return React.createElement(EnumSelect, __assign({ value: wrappedValue }, restProps));
|
|
49
|
-
};
|
|
50
|
-
InitialNullable.displayName = "EnumSelect.InitialNullable";
|
|
51
|
-
return InitialNullable;
|
|
52
|
-
}(React.PureComponent));
|
|
53
|
-
export { InitialNullable };
|
|
10
|
+
}
|
|
54
11
|
//# sourceMappingURL=InitialNullable.js.map
|