@pinnacle0/web-ui 0.5.84 → 0.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/AdminApp/Default/NavigatorSide/index.js +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
|
@@ -1,76 +1,3 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
32
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
33
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
37
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
38
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
39
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
40
|
-
function step(op) {
|
|
41
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
42
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
43
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
44
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
45
|
-
switch (op[0]) {
|
|
46
|
-
case 0: case 1: t = op; break;
|
|
47
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
48
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
49
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
50
|
-
default:
|
|
51
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
52
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
53
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
54
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
55
|
-
if (t[2]) _.ops.pop();
|
|
56
|
-
_.trys.pop(); continue;
|
|
57
|
-
}
|
|
58
|
-
op = body.call(thisArg, _);
|
|
59
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
60
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
64
|
-
var t = {};
|
|
65
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
66
|
-
t[p] = s[p];
|
|
67
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
68
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
69
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
70
|
-
t[p[i]] = s[p[i]];
|
|
71
|
-
}
|
|
72
|
-
return t;
|
|
73
|
-
};
|
|
74
1
|
import React from "react";
|
|
75
2
|
import { Button } from "../Button";
|
|
76
3
|
import { classNames } from "../../util/ClassNames";
|
|
@@ -78,79 +5,64 @@ import { i18n } from "../../internal/i18n/core";
|
|
|
78
5
|
import { TextUtil } from "../../internal/TextUtil";
|
|
79
6
|
import { Input } from "../Input";
|
|
80
7
|
import "./index.less";
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
_this.setState({ nextSendRemainingSecond: nextSendRemainingSecond });
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
_this.onSend = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
96
|
-
var _a, nextSendInterval, onSend, sendSuccess;
|
|
97
|
-
var _this = this;
|
|
98
|
-
return __generator(this, function (_b) {
|
|
99
|
-
switch (_b.label) {
|
|
100
|
-
case 0:
|
|
101
|
-
_a = this.props, nextSendInterval = _a.nextSendInterval, onSend = _a.onSend;
|
|
102
|
-
_b.label = 1;
|
|
103
|
-
case 1:
|
|
104
|
-
_b.trys.push([1, , 3, 4]);
|
|
105
|
-
this.setState({ isSending: true });
|
|
106
|
-
return [4 /*yield*/, onSend()];
|
|
107
|
-
case 2:
|
|
108
|
-
sendSuccess = _b.sent();
|
|
109
|
-
if (sendSuccess) {
|
|
110
|
-
this.setState({ nextSendRemainingSecond: nextSendInterval }, function () {
|
|
111
|
-
_this.timer = window.setInterval(_this.updateNextSendRemainingSecond, 1000);
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
return [3 /*break*/, 4];
|
|
115
|
-
case 3:
|
|
116
|
-
this.setState({ isSending: false });
|
|
117
|
-
return [7 /*endfinally*/];
|
|
118
|
-
case 4: return [2 /*return*/];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}); };
|
|
122
|
-
_this.state = {
|
|
8
|
+
export class AuthenticationCodeInput extends React.PureComponent {
|
|
9
|
+
static displayName = "AuthenticationCodeInput";
|
|
10
|
+
static defaultProps = {
|
|
11
|
+
nextSendInterval: 60,
|
|
12
|
+
};
|
|
13
|
+
timer;
|
|
14
|
+
constructor(props) {
|
|
15
|
+
super(props);
|
|
16
|
+
this.state = {
|
|
123
17
|
isSending: false,
|
|
124
18
|
nextSendRemainingSecond: null,
|
|
125
19
|
};
|
|
126
|
-
return _this;
|
|
127
20
|
}
|
|
128
|
-
|
|
21
|
+
componentDidMount() {
|
|
129
22
|
if (this.props.autoSendOnMount) {
|
|
130
23
|
this.onSend();
|
|
131
24
|
}
|
|
132
|
-
}
|
|
133
|
-
|
|
25
|
+
}
|
|
26
|
+
componentWillUnmount() {
|
|
134
27
|
clearInterval(this.timer);
|
|
28
|
+
}
|
|
29
|
+
updateNextSendRemainingSecond = () => {
|
|
30
|
+
const nextSendRemainingSecond = this.state.nextSendRemainingSecond - 1;
|
|
31
|
+
if (nextSendRemainingSecond <= 0) {
|
|
32
|
+
clearInterval(this.timer);
|
|
33
|
+
this.setState({ nextSendRemainingSecond: null });
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.setState({ nextSendRemainingSecond });
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
onSend = async () => {
|
|
40
|
+
const { nextSendInterval, onSend } = this.props;
|
|
41
|
+
try {
|
|
42
|
+
this.setState({ isSending: true });
|
|
43
|
+
const sendSuccess = await onSend();
|
|
44
|
+
if (sendSuccess) {
|
|
45
|
+
this.setState({ nextSendRemainingSecond: nextSendInterval }, () => {
|
|
46
|
+
this.timer = window.setInterval(this.updateNextSendRemainingSecond, 1000);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
this.setState({ isSending: false });
|
|
52
|
+
}
|
|
135
53
|
};
|
|
136
|
-
|
|
137
|
-
|
|
54
|
+
render() {
|
|
55
|
+
const { sendButtonText,
|
|
138
56
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- not included in inputProps
|
|
139
|
-
onSend
|
|
57
|
+
onSend,
|
|
140
58
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- not included in inputProps
|
|
141
|
-
autoSendOnMount
|
|
59
|
+
autoSendOnMount,
|
|
142
60
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- not included in inputProps
|
|
143
|
-
nextSendInterval
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
return React.createElement(Input,
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
AuthenticationCodeInput.defaultProps = {
|
|
151
|
-
nextSendInterval: 60,
|
|
152
|
-
};
|
|
153
|
-
return AuthenticationCodeInput;
|
|
154
|
-
}(React.PureComponent));
|
|
155
|
-
export { AuthenticationCodeInput };
|
|
61
|
+
nextSendInterval, className, ...inputProps } = this.props;
|
|
62
|
+
const { isSending, nextSendRemainingSecond } = this.state;
|
|
63
|
+
const t = i18n();
|
|
64
|
+
const sendButton = (React.createElement(Button, { type: "primary", ghost: true, className: "g-auth-code-input-send-button", size: "small", disabled: inputProps.disabled || nextSendRemainingSecond !== null || isSending, onClick: this.onSend }, nextSendRemainingSecond ? TextUtil.interpolate(t.waitResendAuthCode, nextSendRemainingSecond.toString()) : sendButtonText || t.sendAuthCode));
|
|
65
|
+
return React.createElement(Input, { ...inputProps, className: classNames(className, "g-auth-code-input"), suffix: sendButton });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
156
68
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/AuthenticationCodeInput/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/AuthenticationCodeInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MA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AAC,kBAAkB,EAAE,uBAAuB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,YAAY,CACvI,CACZ,CAAC;QACF,OAAO,oBAAC,KAAK,OAAK,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,mBAAmB,CAAC,EAAE,MAAM,EAAE,UAAU,GAAI,CAAC;IAChH,CAAC"}
|
|
@@ -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 AntAutoComplete from "antd/es/auto-complete";
|
|
28
2
|
import React from "react";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
3
|
+
export class AutoCompleteInput extends React.PureComponent {
|
|
4
|
+
static displayName = "AutoCompleteInput";
|
|
5
|
+
static Option = AntAutoComplete.Option;
|
|
6
|
+
render() {
|
|
7
|
+
return React.createElement(AntAutoComplete, { ...this.props });
|
|
33
8
|
}
|
|
34
|
-
|
|
35
|
-
return React.createElement(AntAutoComplete, __assign({}, this.props));
|
|
36
|
-
};
|
|
37
|
-
AutoCompleteInput.displayName = "AutoCompleteInput";
|
|
38
|
-
AutoCompleteInput.Option = AntAutoComplete.Option;
|
|
39
|
-
return AutoCompleteInput;
|
|
40
|
-
}(React.PureComponent));
|
|
41
|
-
export { AutoCompleteInput };
|
|
9
|
+
}
|
|
42
10
|
//# sourceMappingURL=AutoCompleteInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoCompleteInput.js","sourceRoot":"","sources":["../../src/core/AutoCompleteInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutoCompleteInput.js","sourceRoot":"","sources":["../../src/core/AutoCompleteInput.tsx"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,OAAO,iBAAkB,SAAQ,KAAK,CAAC,aAAoB;IAC7D,MAAM,CAAC,WAAW,GAAG,mBAAmB,CAAC;IAEzC,MAAM,CAAC,MAAM,GAAkC,eAAe,CAAC,MAAM,CAAC;IAEtE,MAAM;QACF,OAAO,oBAAC,eAAe,OAAK,IAAI,CAAC,KAAK,GAAI,CAAC;IAC/C,CAAC"}
|
package/core/Badge.js
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
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
1
|
import React from "react";
|
|
13
2
|
import AntBadge from "antd/es/badge";
|
|
14
3
|
import { ReactUtil } from "../util/ReactUtil";
|
|
15
|
-
export
|
|
16
|
-
return React.createElement(AntBadge,
|
|
4
|
+
export const Badge = ReactUtil.memo("Badge", (props) => {
|
|
5
|
+
return React.createElement(AntBadge, { ...props });
|
|
17
6
|
});
|
|
18
7
|
//# sourceMappingURL=Badge.js.map
|
package/core/Badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../src/core/Badge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../src/core/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAI5C,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAY,EAAE,EAAE;IAC1D,OAAO,oBAAC,QAAQ,OAAK,KAAK,GAAI,CAAC;AACnC,CAAC,CAAC,CAAC"}
|
package/core/BoolRadio.js
CHANGED
|
@@ -1,74 +1,26 @@
|
|
|
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 { EnumRadio } from "./EnumRadio";
|
|
43
3
|
import { i18n } from "../internal/i18n/core";
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
var _a = this.props, trueOptionFirst = _a.trueOptionFirst, allowNull = _a.allowNull, value = _a.value, onChange = _a.onChange, useButtonMode = _a.useButtonMode, buttonStyle = _a.buttonStyle, disabled = _a.disabled, className = _a.className, style = _a.style;
|
|
59
|
-
var list = trueOptionFirst ? this.trueOptionFirstList : this.falseOptionFirstList;
|
|
4
|
+
export class BoolRadio extends React.PureComponent {
|
|
5
|
+
static displayName = "BoolRadio";
|
|
6
|
+
static defaultProps = {
|
|
7
|
+
trueOptionFirst: true,
|
|
8
|
+
};
|
|
9
|
+
trueOptionFirstList = [true, false];
|
|
10
|
+
falseOptionFirstList = [false, true];
|
|
11
|
+
translator = (_) => {
|
|
12
|
+
const t = i18n();
|
|
13
|
+
return _ ? (this.props.trueText ?? t.yes) : (this.props.falseText ?? t.no);
|
|
14
|
+
};
|
|
15
|
+
render() {
|
|
16
|
+
const { trueOptionFirst, allowNull, value, onChange, useButtonMode, buttonStyle, disabled, className, style } = this.props;
|
|
17
|
+
const list = trueOptionFirst ? this.trueOptionFirstList : this.falseOptionFirstList;
|
|
60
18
|
if (allowNull) {
|
|
61
19
|
return (React.createElement(EnumRadio.Nullable, { list: list, translator: this.translator, value: value, onChange: onChange, useButtonMode: useButtonMode, buttonStyle: buttonStyle, disabled: disabled, className: className, style: style }));
|
|
62
20
|
}
|
|
63
21
|
else {
|
|
64
22
|
return (React.createElement(EnumRadio, { list: list, translator: this.translator, value: value, onChange: onChange, useButtonMode: useButtonMode, buttonStyle: buttonStyle, disabled: disabled, className: className, style: style }));
|
|
65
23
|
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
BoolRadio.defaultProps = {
|
|
69
|
-
trueOptionFirst: true,
|
|
70
|
-
};
|
|
71
|
-
return BoolRadio;
|
|
72
|
-
}(React.PureComponent));
|
|
73
|
-
export { BoolRadio };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
74
26
|
//# sourceMappingURL=BoolRadio.js.map
|
package/core/BoolRadio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoolRadio.js","sourceRoot":"","sources":["../../src/core/BoolRadio.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoolRadio.js","sourceRoot":"","sources":["../../src/core/BoolRadio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAGtC,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAc3C,MAAM,OAAO,SAAqC,SAAQ,KAAK,CAAC,aAA+B;IAC3F,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,MAAM,CAAC,YAAY,GAA+B;QAC9C,eAAe,EAAE,IAAI;KACxB,CAAC;IAEe,mBAAmB,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpC,oBAAoB,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAEtD,UAAU,GAAG,CAAC,CAAU,EAAU,EAAE;QAChC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;QACjB,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/E,CAAC,CAAC;IAEF,MAAM;QACF,MAAM,EAAC,eAAe,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACzH,MAAM,IAAI,GAAG,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC;QACpF,IAAI,SAAS,EAAE,CAAC;YACZ,OAAO,CACH,oBAAC,SAAS,CAAC,QAAQ,IACf,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,KAAuB,EAC9B,QAAQ,EAAE,QAAuC,EACjD,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,GACd,CACL,CAAC;QACN,CAAC;aAAM,CAAC;YACJ,OAAO,CACH,oBAAC,SAAS,IACN,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,KAAgB,EACvB,QAAQ,EAAE,QAAgC,EAC1C,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,GACd,CACL,CAAC;QACN,CAAC;IACL,CAAC"}
|
package/core/BoolSelect.js
CHANGED
|
@@ -1,73 +1,26 @@
|
|
|
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 { EnumSelect } from "./EnumSelect";
|
|
43
3
|
import { i18n } from "../internal/i18n/core";
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
var list = trueOptionFirst ? this.trueOptionFirstList : this.falseOptionFirstList;
|
|
4
|
+
export class BoolSelect extends React.PureComponent {
|
|
5
|
+
static displayName = "BoolSelect";
|
|
6
|
+
static defaultProps = {
|
|
7
|
+
trueOptionFirst: true,
|
|
8
|
+
};
|
|
9
|
+
trueOptionFirstList = [true, false];
|
|
10
|
+
falseOptionFirstList = [false, true];
|
|
11
|
+
translator = (_) => {
|
|
12
|
+
const t = i18n();
|
|
13
|
+
return _ ? this.props.trueText || t.yes : this.props.falseText || t.no;
|
|
14
|
+
};
|
|
15
|
+
render() {
|
|
16
|
+
const { trueOptionFirst, allowNull, value, onChange, disabled, className, style } = this.props;
|
|
17
|
+
const list = trueOptionFirst ? this.trueOptionFirstList : this.falseOptionFirstList;
|
|
59
18
|
if (allowNull) {
|
|
60
19
|
return (React.createElement(EnumSelect.Nullable, { list: list, translator: this.translator, value: value, onChange: onChange, disabled: disabled, className: className, style: style }));
|
|
61
20
|
}
|
|
62
21
|
else {
|
|
63
22
|
return React.createElement(EnumSelect, { list: list, translator: this.translator, value: value, onChange: onChange, disabled: disabled, className: className, style: style });
|
|
64
23
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
BoolSelect.defaultProps = {
|
|
68
|
-
trueOptionFirst: true,
|
|
69
|
-
};
|
|
70
|
-
return BoolSelect;
|
|
71
|
-
}(React.PureComponent));
|
|
72
|
-
export { BoolSelect };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
73
26
|
//# sourceMappingURL=BoolSelect.js.map
|
package/core/BoolSelect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoolSelect.js","sourceRoot":"","sources":["../../src/core/BoolSelect.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoolSelect.js","sourceRoot":"","sources":["../../src/core/BoolSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAExC,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAY3C,MAAM,OAAO,UAAsC,SAAQ,KAAK,CAAC,aAA+B;IAC5F,MAAM,CAAC,WAAW,GAAG,YAAY,CAAC;IAClC,MAAM,CAAC,YAAY,GAA6B;QAC5C,eAAe,EAAE,IAAI;KACxB,CAAC;IAEe,mBAAmB,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpC,oBAAoB,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,C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ototypeOf ||
|
|
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 AntSwitch from "antd/es/switch";
|
|
28
2
|
import React from "react";
|
|
29
3
|
import { i18n } from "../internal/i18n/core";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
BoolSwitch.prototype.render = function () {
|
|
36
|
-
var _a = this.props, trueText = _a.trueText, falseText = _a.falseText, disabled = _a.disabled, loading = _a.loading, style = _a.style, value = _a.value, onChange = _a.onChange;
|
|
37
|
-
return React.createElement(AntSwitch, { loading: loading, style: style, checked: value, onChange: onChange, disabled: disabled, checkedChildren: trueText, unCheckedChildren: falseText });
|
|
38
|
-
};
|
|
39
|
-
BoolSwitch.displayName = "BoolSwitch";
|
|
40
|
-
BoolSwitch.YesNo = function (props) {
|
|
41
|
-
var t = i18n();
|
|
42
|
-
return React.createElement(BoolSwitch, __assign({ trueText: t.yes, falseText: t.no }, props));
|
|
4
|
+
export class BoolSwitch extends React.PureComponent {
|
|
5
|
+
static displayName = "BoolSwitch";
|
|
6
|
+
static YesNo = (props) => {
|
|
7
|
+
const t = i18n();
|
|
8
|
+
return React.createElement(BoolSwitch, { trueText: t.yes, falseText: t.no, ...props });
|
|
43
9
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return React.createElement(BoolSwitch,
|
|
10
|
+
static OnOff = (props) => {
|
|
11
|
+
const t = i18n();
|
|
12
|
+
return React.createElement(BoolSwitch, { trueText: t.on, falseText: t.off, ...props });
|
|
47
13
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return React.createElement(BoolSwitch,
|
|
14
|
+
static ActiveOrNot = (props) => {
|
|
15
|
+
const t = i18n();
|
|
16
|
+
return React.createElement(BoolSwitch, { trueText: t.active, falseText: t.inactive, ...props });
|
|
51
17
|
};
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
18
|
+
render() {
|
|
19
|
+
const { trueText, falseText, disabled, loading, style, value, onChange } = this.props;
|
|
20
|
+
return React.createElement(AntSwitch, { loading: loading, style: style, checked: value, onChange: onChange, disabled: disabled, checkedChildren: trueText, unCheckedChildren: falseText });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
55
23
|
//# sourceMappingURL=BoolSwitch.js.map
|
package/core/BoolSwitch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoolSwitch.js","sourceRoot":"","sources":["../../src/core/BoolSwitch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BoolSwitch.js","sourceRoot":"","sources":["../../src/core/BoolSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAU3C,MAAM,OAAO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