@unicom-cloud/ui 0.8.96 → 0.8.98
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/Affix.js +1 -1
- package/Carousel.js +1 -1
- package/LiquidFill.js +4 -0
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/QrCode.js +57 -0
- package/Tour.js +63 -0
- package/Trigger.js +1 -1
- package/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +4 -0
- package/affix/index.js +70 -72
- package/alert/index.js +56 -56
- package/anchor/Anchor.js +55 -55
- package/anchor/Link.js +34 -34
- package/anchor/util.js +5 -5
- package/auto-complete/index.js +116 -122
- package/avatar/Avatar.js +33 -33
- package/avatar/Group.js +26 -26
- package/back-top/index.js +58 -61
- package/badge/index.js +46 -46
- package/breadcrumb/Item.js +42 -43
- package/breadcrumb/index.js +47 -47
- package/button/Group.js +6 -6
- package/button/index.js +91 -91
- package/calendar/Month.js +75 -75
- package/calendar/Year.js +35 -35
- package/calendar/header/index.js +25 -25
- package/calendar/index.js +103 -103
- package/card/Grid.js +8 -8
- package/card/Meta.js +16 -16
- package/card/index.js +49 -49
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +26 -26
- package/carousel/index.js +108 -108
- package/cascader/Cascader.js +178 -191
- package/cascader/base/node.js +133 -136
- package/cascader/base/store.js +82 -85
- package/cascader/panel/List.js +125 -129
- package/cascader/panel/Search.js +79 -81
- package/cascader/util.js +13 -13
- package/checkbox/Checkbox.js +94 -96
- package/checkbox/Group.js +54 -56
- package/checkbox/GroupBlock.js +28 -29
- package/collapse/Collapse.js +45 -45
- package/collapse/Item.js +53 -55
- package/color-picker/ControlBar.js +43 -43
- package/color-picker/InputAlpha.js +12 -12
- package/color-picker/InputHex.js +30 -31
- package/color-picker/InputRgb.js +24 -24
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +122 -125
- package/color-picker/hooks/useColorPicker.js +85 -88
- package/color-picker/hooks/useControlBlock.js +38 -40
- package/color-picker/index.js +47 -47
- package/comment/index.js +29 -29
- package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
- package/components/common/hooks/useId.js +8 -8
- package/components/common/hooks/useInView.js +16 -16
- package/components/common/hooks/useIntersectionObserver.js +1 -1
- package/components/common/hooks/useKeyboardEvent.js +9 -10
- package/components/common/hooks/useOverflowHidden.js +1 -4
- package/components/common/hooks/usePersistCallback.js +7 -7
- package/components/common/hooks/useStateCallback.js +9 -10
- package/components/common/hooks/useWindowSize.js +8 -8
- package/components/common/space/index.js +9 -7
- package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/components/common/utils/dom.js +27 -29
- package/components/common/utils/findScrollParent.js +17 -0
- package/components/common/utils/intersectionObserver.js +21 -0
- package/components/common/utils/is.js +99 -109
- package/components/common/utils/mutationObserver.js +19 -0
- package/components/common/utils/reactDOM.js +34 -34
- package/components/common/utils/resizeObserver.js +21 -0
- package/copy/index.js +38 -40
- package/date-picker/Picker.js +290 -295
- package/date-picker/RangePicker.js +367 -372
- package/date-picker/index.js +33 -35
- package/date-picker/panel/Body.js +46 -47
- package/date-picker/panel/Header.js +33 -33
- package/date-picker/panel/Shortcut.js +31 -31
- package/date-picker/panel/date/index.js +85 -85
- package/date-picker/panel/month/index.js +59 -59
- package/date-picker/panel/quarter/index.js +67 -70
- package/date-picker/panel/range/index.js +101 -101
- package/date-picker/panel/year/index.js +39 -39
- package/date-picker/util.js +17 -18
- package/descriptions/index.js +62 -62
- package/details/index.js +53 -55
- package/development/index.js +9 -9
- package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
- package/dist/validate/src/index.js +5 -5
- package/dist/validate/src/util.js +1 -1
- package/divider/index.js +21 -21
- package/draggable/Item.js +35 -35
- package/draggable/index.js +22 -22
- package/drawer/Drawer.js +142 -147
- package/dropdown/Button.js +48 -48
- package/dropdown/index.js +88 -92
- package/empty/index.js +16 -16
- package/form/Control.js +211 -225
- package/form/Form.js +109 -113
- package/form/FormItem.js +118 -120
- package/form/FormList.js +60 -66
- package/form/FormProvider.js +31 -34
- package/form/hook/useContext.js +17 -19
- package/form/hook/useState.js +22 -23
- package/form/hook/useWatch.js +26 -27
- package/form/promisify.js +14 -18
- package/form/store.js +304 -316
- package/form/util.js +14 -15
- package/grid/Col.js +64 -64
- package/grid/Grid.js +51 -51
- package/grid/GridItem.js +48 -48
- package/grid/Row.js +39 -39
- package/hooks/useVerificationCode.js +41 -43
- package/hooks/useWatermark.js +89 -92
- package/icon/index.js +23 -24
- package/icon-hover/index.js +16 -16
- package/icons/file.js +11 -11
- package/image/Image.js +140 -141
- package/image/ImagePreview.js +252 -255
- package/image/ImagePreviewArrow.js +25 -25
- package/image/ImagePreviewGroup.js +62 -62
- package/image/util/getScale.js +25 -28
- package/index.js +684 -675
- package/input/Button.js +48 -50
- package/input/Group.js +9 -9
- package/input/Input.js +145 -154
- package/input/InputElement.js +108 -115
- package/input/Password.js +38 -38
- package/input/Search.js +51 -55
- package/input/Textarea.js +80 -81
- package/input/useComposition.js +23 -23
- package/input-number/decimal.js +59 -62
- package/input-number/index.js +139 -141
- package/input-tag/InputTag.js +222 -230
- package/layout/Content.js +6 -6
- package/layout/Footer.js +8 -8
- package/layout/Header.js +7 -7
- package/layout/Sider.js +88 -90
- package/layout/index.js +30 -30
- package/link/index.js +45 -46
- package/liquid-fill/LiquidFill.js +226 -0
- package/liquid-fill/LiquidFill2.js +3 -0
- package/liquid-fill/index.js +4 -0
- package/list/Item.js +28 -28
- package/list/Meta.js +12 -12
- package/list/index.js +146 -148
- package/mentions/index.js +75 -76
- package/menu/Item.js +58 -58
- package/menu/Menu.js +125 -127
- package/menu/OverflowWrap.js +39 -40
- package/menu/sub-menu/Inline.js +45 -45
- package/menu/util.js +26 -28
- package/message/index.js +96 -99
- package/message/useMessage.js +26 -27
- package/modal/Confirm.js +47 -49
- package/modal/Modal.js +250 -257
- package/modal/use-modal/Hook.js +26 -28
- package/modal/use-modal/index.js +46 -49
- package/notice/index.js +89 -90
- package/notification/index.js +60 -65
- package/notification/withNotification.js +35 -35
- package/overflow-ellipsis/OverflowItem.js +19 -20
- package/overflow-ellipsis/index.js +45 -46
- package/package.json +1 -1
- package/page-header/index.js +45 -45
- package/pagination/PageItem.js +87 -91
- package/pagination/PageJumper.js +40 -41
- package/pagination/PageOption.js +31 -35
- package/pagination/Pagination.js +162 -163
- package/picker/Input.js +90 -96
- package/picker/InputRange.js +115 -122
- package/popconfirm/index.js +98 -100
- package/popover/index.js +28 -28
- package/portal/Portal.js +10 -11
- package/progress/index.js +36 -36
- package/qr-code/index.js +99 -0
- package/qr-code/interface.js +1 -0
- package/radio/Group.js +48 -48
- package/radio/GroupBlock.js +32 -33
- package/radio/Radio.js +62 -64
- package/rate/index.js +88 -88
- package/resize-box/ResizeTrigger.js +39 -39
- package/resize-box/Split.js +92 -96
- package/resize-box/SplitGroup.js +116 -122
- package/resize-box/index.js +112 -115
- package/result/index.js +44 -44
- package/select/Option.js +53 -56
- package/select/Select.js +365 -381
- package/select/util.js +95 -99
- package/select-view/Core.js +159 -160
- package/skeleton/index.js +23 -23
- package/slider/Button.js +84 -92
- package/slider/Input.js +47 -49
- package/slider/Tick.js +28 -31
- package/slider/index.js +107 -107
- package/space/index.js +26 -26
- package/space-/index.js +51 -51
- package/spin/DotLoading.js +8 -8
- package/spin/index.js +47 -47
- package/statistic/Countdown.js +37 -37
- package/statistic/index.js +58 -58
- package/steps/Step.js +42 -42
- package/steps/index.js +54 -54
- package/style.css +1 -1
- package/switch/index.js +77 -78
- package/table/ColGroup.js +36 -37
- package/table/Table.js +447 -450
- package/table/hook/useExpand.js +24 -24
- package/table/hook/useRowSelection.js +62 -62
- package/table/summary/Row.js +16 -17
- package/table/tbody/Td.js +119 -118
- package/table/tbody/Tr.js +119 -121
- package/table/tbody/index.js +62 -63
- package/table/th-resizable/index.js +30 -30
- package/table/thead/Column.js +148 -148
- package/table/thead/index.js +87 -88
- package/tabs/Tab.js +55 -55
- package/tabs/TabContent.js +8 -8
- package/tabs/TabPane.js +15 -15
- package/tabs/hook/useHeaderScroll.js +36 -36
- package/tabs/tab-header/TabInk.js +31 -33
- package/tabs/tab-header/TabNavIcon.js +34 -35
- package/tabs/tab-header/index.js +192 -195
- package/tag/index.js +94 -97
- package/time-picker/Picker.js +167 -172
- package/time-picker/RangePicker.js +28 -28
- package/time-picker/TimePicker.js +146 -146
- package/timeline/Item.js +46 -46
- package/timeline/Timeline.js +52 -52
- package/tooltip/index.js +89 -95
- package/tour/index.js +289 -0
- package/transfer/Item.js +54 -54
- package/transfer/List.js +134 -136
- package/transfer/index.js +91 -91
- package/tree/Animation.js +49 -52
- package/tree/Node.js +114 -122
- package/tree/NodeList.js +51 -51
- package/tree/Tree.js +386 -393
- package/tree-select/List.js +71 -72
- package/tree-select/Select.js +135 -143
- package/tree-select/hook/useKeyCache.js +39 -39
- package/tree-select/hook/useStateValue.js +12 -12
- package/trigger/getPopupStyle.js +60 -61
- package/trigger/index.js +337 -346
- package/types/common/space/interface.d.ts +1 -1
- package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/common/utils/findScrollParent.d.ts +2 -0
- package/types/common/utils/index.d.ts +5 -0
- package/types/common/utils/intersectionObserver.d.ts +2 -0
- package/types/common/utils/mutationObserver.d.ts +2 -0
- package/types/common/utils/resizeObserver.d.ts +2 -0
- package/types/pc/config-provider/interface.d.ts +6 -0
- package/types/pc/index.d.ts +3 -0
- package/types/pc/liquid-fill/LiquidFill.d.ts +115 -0
- package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
- package/types/pc/liquid-fill/index.d.ts +2 -0
- package/types/pc/qr-code/index.d.ts +34 -0
- package/types/pc/qr-code/interface.d.ts +39 -0
- package/types/pc/table/interface.d.ts +2 -2
- package/types/pc/tour/index.d.ts +42 -0
- package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/pc/utils/findScrollParent.d.ts +2 -0
- package/types/pc/utils/index.d.ts +5 -0
- package/types/pc/utils/intersectionObserver.d.ts +2 -0
- package/types/pc/utils/mutationObserver.d.ts +2 -0
- package/types/pc/utils/names.d.ts +18 -0
- package/types/pc/utils/resizeObserver.d.ts +2 -0
- package/typography/Base.js +79 -81
- package/typography/EditContent.js +30 -33
- package/typography/Ellipsis.js +77 -73
- package/typography/Operations.js +50 -52
- package/typography/Paragraph.js +7 -7
- package/typography/Typography.js +7 -7
- package/typography/useEllipsis.js +105 -106
- package/upload/TriggerNode.js +69 -76
- package/upload/Upload.js +84 -87
- package/upload/Uploader.js +115 -118
- package/upload/list/PictureItem.js +61 -71
- package/upload/list/TextItem.js +61 -67
- package/upload/list/UploadProgress.js +42 -49
- package/upload/list/index.js +48 -49
- package/upload/request_.js +37 -38
- package/upload/util.js +39 -39
- package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/utils/findScrollParent.js +4 -0
- package/utils/index.js +281 -278
- package/utils/intersectionObserver.js +4 -0
- package/utils/mutationObserver.js +4 -0
- package/utils/names.js +12 -0
- package/utils/resizeObserver.js +4 -0
- package/verification-code/VerificationCode.js +50 -51
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +243 -244
- package/virtual-list/util/item.js +3 -4
- package/watermark/Watermark.js +27 -31
- package/components/common/utils/resizeObserverEffect.js +0 -23
- package/types/common/utils/resizeObserverEffect.d.ts +0 -2
- package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
- package/utils/resizeObserverEffect.js +0 -4
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useContext as
|
|
1
|
+
import { jsx as n, jsxs as l, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import pe from "lodash/isPlainObject";
|
|
3
|
+
import { useContext as I } from "react";
|
|
4
4
|
import "../../../config-provider/ConfigProvider.js";
|
|
5
5
|
import me from "../../context.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { getNow as
|
|
12
|
-
import { getFormatByIndex as
|
|
6
|
+
import F from "../date/index.js";
|
|
7
|
+
import Q from "../month/index.js";
|
|
8
|
+
import Y from "../quarter/index.js";
|
|
9
|
+
import q from "../week/index.js";
|
|
10
|
+
import z from "../year/index.js";
|
|
11
|
+
import { getNow as B, getDayjsValue as de, methods as k } from "../../../components/common/utils/dayjs.js";
|
|
12
|
+
import { getFormatByIndex as E } from "../../util.js";
|
|
13
13
|
import ue from "../../../config-provider/context.js";
|
|
14
|
-
function
|
|
14
|
+
function O(w, a) {
|
|
15
15
|
const c = [];
|
|
16
|
-
for (let
|
|
17
|
-
c.push(
|
|
16
|
+
for (let p = w; p < a; p++)
|
|
17
|
+
c.push(p);
|
|
18
18
|
return c;
|
|
19
19
|
}
|
|
20
20
|
function Ve(w) {
|
|
21
21
|
const {
|
|
22
22
|
mode: a = "date",
|
|
23
23
|
showTime: c,
|
|
24
|
-
disabledDate:
|
|
25
|
-
disabledTime:
|
|
24
|
+
disabledDate: p,
|
|
25
|
+
disabledTime: L,
|
|
26
26
|
format: D,
|
|
27
|
-
dateRender:
|
|
28
|
-
value:
|
|
29
|
-
timeValues:
|
|
30
|
-
icons:
|
|
31
|
-
locale:
|
|
32
|
-
pageShowDates:
|
|
33
|
-
onMouseEnterCell:
|
|
34
|
-
onMouseLeaveCell:
|
|
35
|
-
onTimePickerSelect:
|
|
36
|
-
onSelectPanel:
|
|
37
|
-
onPrev:
|
|
27
|
+
dateRender: W,
|
|
28
|
+
value: $,
|
|
29
|
+
timeValues: T,
|
|
30
|
+
icons: A,
|
|
31
|
+
locale: G,
|
|
32
|
+
pageShowDates: v,
|
|
33
|
+
onMouseEnterCell: J,
|
|
34
|
+
onMouseLeaveCell: K,
|
|
35
|
+
onTimePickerSelect: M,
|
|
36
|
+
onSelectPanel: U,
|
|
37
|
+
onPrev: X,
|
|
38
38
|
onSuperPrev: d,
|
|
39
|
-
onNext:
|
|
39
|
+
onNext: Z,
|
|
40
40
|
onSuperNext: u,
|
|
41
|
-
localeName:
|
|
42
|
-
popupVisible:
|
|
43
|
-
timePickerProps:
|
|
44
|
-
getHeaderOperations:
|
|
41
|
+
localeName: _,
|
|
42
|
+
popupVisible: ee,
|
|
43
|
+
timePickerProps: te,
|
|
44
|
+
getHeaderOperations: V,
|
|
45
45
|
setRangePageShowDates: s,
|
|
46
46
|
disabledTimePickerIndex: b,
|
|
47
|
-
hideNotInViewDates:
|
|
48
|
-
isTimePanel:
|
|
49
|
-
valueShowHover:
|
|
47
|
+
hideNotInViewDates: oe,
|
|
48
|
+
isTimePanel: re,
|
|
49
|
+
valueShowHover: ne,
|
|
50
50
|
panelModes: P,
|
|
51
|
-
setPanelModes:
|
|
52
|
-
} = w, { getPrefixCls:
|
|
51
|
+
setPanelModes: C
|
|
52
|
+
} = w, { getPrefixCls: ae } = I(ue), N = ae?.("picker-range"), { utcOffset: y, timezone: j } = I(me), R = v[0] || B(y, j), H = v[1] || B(y, j), h = {
|
|
53
53
|
isRangePicker: !0,
|
|
54
|
-
rangeValues: de(
|
|
55
|
-
onMouseEnterCell:
|
|
56
|
-
onMouseLeaveCell:
|
|
57
|
-
locale:
|
|
58
|
-
disabledDate:
|
|
59
|
-
onSelect:
|
|
60
|
-
dateRender:
|
|
61
|
-
getHeaderOperations:
|
|
62
|
-
icons:
|
|
63
|
-
valueShowHover:
|
|
54
|
+
rangeValues: de($, D),
|
|
55
|
+
onMouseEnterCell: J,
|
|
56
|
+
onMouseLeaveCell: K,
|
|
57
|
+
locale: G,
|
|
58
|
+
disabledDate: p,
|
|
59
|
+
onSelect: U,
|
|
60
|
+
dateRender: W,
|
|
61
|
+
getHeaderOperations: V,
|
|
62
|
+
icons: A,
|
|
63
|
+
valueShowHover: ne
|
|
64
64
|
}, f = {
|
|
65
|
-
pageShowDate:
|
|
65
|
+
pageShowDate: R,
|
|
66
66
|
panelMode: P[0],
|
|
67
|
-
setPanelMode: (r) =>
|
|
68
|
-
format:
|
|
69
|
-
},
|
|
70
|
-
pageShowDate:
|
|
67
|
+
setPanelMode: (r) => C([r, P[1]]),
|
|
68
|
+
format: E(D, 0)
|
|
69
|
+
}, g = {
|
|
70
|
+
pageShowDate: H,
|
|
71
71
|
panelMode: P[1],
|
|
72
|
-
setPanelMode: (r) =>
|
|
73
|
-
format:
|
|
72
|
+
setPanelMode: (r) => C([P[0], r]),
|
|
73
|
+
format: E(D, 1)
|
|
74
74
|
};
|
|
75
75
|
function se() {
|
|
76
76
|
const r = {
|
|
77
|
-
onPrev:
|
|
77
|
+
onPrev: X,
|
|
78
78
|
onSuperPrev: d
|
|
79
79
|
}, i = {
|
|
80
|
-
onNext:
|
|
80
|
+
onNext: Z,
|
|
81
81
|
onSuperNext: u
|
|
82
82
|
}, o = {
|
|
83
83
|
...h,
|
|
84
|
-
localeName:
|
|
85
|
-
popupVisible:
|
|
86
|
-
timePickerProps:
|
|
87
|
-
getHeaderOperations:
|
|
88
|
-
hideNotInViewDates:
|
|
89
|
-
isTimePanel:
|
|
84
|
+
localeName: _,
|
|
85
|
+
popupVisible: ee,
|
|
86
|
+
timePickerProps: te,
|
|
87
|
+
getHeaderOperations: V,
|
|
88
|
+
hideNotInViewDates: oe,
|
|
89
|
+
isTimePanel: re
|
|
90
90
|
};
|
|
91
91
|
if (a === "week")
|
|
92
|
-
return /* @__PURE__ */
|
|
92
|
+
return /* @__PURE__ */ l(m, { children: [
|
|
93
93
|
/* @__PURE__ */ n(
|
|
94
|
-
|
|
94
|
+
q,
|
|
95
95
|
{
|
|
96
96
|
setPageShowDate: (e) => s([e, e], 0),
|
|
97
97
|
...r,
|
|
@@ -100,61 +100,61 @@ function Ve(w) {
|
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
102
|
/* @__PURE__ */ n(
|
|
103
|
-
|
|
103
|
+
q,
|
|
104
104
|
{
|
|
105
105
|
setPageShowDate: (e) => s([k.subtract(e, 1, "month"), e], 1),
|
|
106
106
|
...i,
|
|
107
107
|
...o,
|
|
108
|
-
...
|
|
108
|
+
...g
|
|
109
109
|
}
|
|
110
110
|
)
|
|
111
111
|
] });
|
|
112
112
|
const t = {
|
|
113
|
-
disabledTime:
|
|
113
|
+
disabledTime: L,
|
|
114
114
|
showTime: c
|
|
115
|
-
},
|
|
116
|
-
if (typeof b == "number" && (
|
|
117
|
-
disabledHours: () =>
|
|
118
|
-
disabledMinutes: () =>
|
|
119
|
-
disabledSeconds: () =>
|
|
120
|
-
}),
|
|
115
|
+
}, S = {};
|
|
116
|
+
if (typeof b == "number" && (S.disabledTime = () => ({
|
|
117
|
+
disabledHours: () => O(0, 24),
|
|
118
|
+
disabledMinutes: () => O(0, 60),
|
|
119
|
+
disabledSeconds: () => O(0, 60)
|
|
120
|
+
}), pe(c))) {
|
|
121
121
|
const e = { ...c, defaultValue: void 0 };
|
|
122
|
-
|
|
122
|
+
S.showTime = {
|
|
123
123
|
...e,
|
|
124
124
|
hideDisabledOptions: !1
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
return /* @__PURE__ */
|
|
127
|
+
return /* @__PURE__ */ l(m, { children: [
|
|
128
128
|
/* @__PURE__ */ n(
|
|
129
|
-
|
|
129
|
+
F,
|
|
130
130
|
{
|
|
131
131
|
...r,
|
|
132
132
|
...o,
|
|
133
133
|
...t,
|
|
134
|
-
...b === 0 ?
|
|
135
|
-
onTimePickerSelect: (e,
|
|
136
|
-
|
|
134
|
+
...b === 0 ? S : {},
|
|
135
|
+
onTimePickerSelect: (e, x) => {
|
|
136
|
+
M(0, e, x);
|
|
137
137
|
},
|
|
138
138
|
index: 0,
|
|
139
139
|
setPageShowDate: (e) => s([e, e], 0),
|
|
140
|
-
timeValue:
|
|
140
|
+
timeValue: T[0],
|
|
141
141
|
...f
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
144
|
/* @__PURE__ */ n(
|
|
145
|
-
|
|
145
|
+
F,
|
|
146
146
|
{
|
|
147
147
|
...i,
|
|
148
148
|
...o,
|
|
149
149
|
...t,
|
|
150
|
-
...b === 1 ?
|
|
151
|
-
onTimePickerSelect: (e,
|
|
152
|
-
|
|
150
|
+
...b === 1 ? S : {},
|
|
151
|
+
onTimePickerSelect: (e, x) => {
|
|
152
|
+
M(1, e, x);
|
|
153
153
|
},
|
|
154
154
|
index: 1,
|
|
155
155
|
setPageShowDate: (e) => s([k.subtract(e, 1, "month"), e], 1),
|
|
156
|
-
timeValue:
|
|
157
|
-
...
|
|
156
|
+
timeValue: T[1],
|
|
157
|
+
...g
|
|
158
158
|
}
|
|
159
159
|
)
|
|
160
160
|
] });
|
|
@@ -165,9 +165,9 @@ function Ve(w) {
|
|
|
165
165
|
}, i = {
|
|
166
166
|
onSuperNext: u
|
|
167
167
|
}, o = h;
|
|
168
|
-
return /* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ l(m, { children: [
|
|
169
169
|
/* @__PURE__ */ n(
|
|
170
|
-
|
|
170
|
+
Q,
|
|
171
171
|
{
|
|
172
172
|
setPageShowDate: (t) => s([t, t], 0),
|
|
173
173
|
...r,
|
|
@@ -176,12 +176,12 @@ function Ve(w) {
|
|
|
176
176
|
}
|
|
177
177
|
),
|
|
178
178
|
/* @__PURE__ */ n(
|
|
179
|
-
|
|
179
|
+
Q,
|
|
180
180
|
{
|
|
181
181
|
setPageShowDate: (t) => s([k.subtract(t, 1, "year"), t], 1),
|
|
182
182
|
...i,
|
|
183
183
|
...o,
|
|
184
|
-
...
|
|
184
|
+
...g
|
|
185
185
|
}
|
|
186
186
|
)
|
|
187
187
|
] });
|
|
@@ -192,34 +192,34 @@ function Ve(w) {
|
|
|
192
192
|
}, i = {
|
|
193
193
|
onSuperNext: u
|
|
194
194
|
}, o = h;
|
|
195
|
-
return /* @__PURE__ */
|
|
195
|
+
return /* @__PURE__ */ l(m, { children: [
|
|
196
196
|
/* @__PURE__ */ n(
|
|
197
|
-
|
|
197
|
+
z,
|
|
198
198
|
{
|
|
199
199
|
...r,
|
|
200
200
|
...o,
|
|
201
|
-
pageShowDate:
|
|
201
|
+
pageShowDate: R
|
|
202
202
|
}
|
|
203
203
|
),
|
|
204
204
|
/* @__PURE__ */ n(
|
|
205
|
-
|
|
205
|
+
z,
|
|
206
206
|
{
|
|
207
207
|
...i,
|
|
208
208
|
...o,
|
|
209
|
-
pageShowDate:
|
|
209
|
+
pageShowDate: H
|
|
210
210
|
}
|
|
211
211
|
)
|
|
212
212
|
] });
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function le() {
|
|
215
215
|
const r = {
|
|
216
216
|
onSuperPrev: d
|
|
217
217
|
}, i = {
|
|
218
218
|
onSuperNext: u
|
|
219
219
|
}, o = h;
|
|
220
|
-
return /* @__PURE__ */
|
|
220
|
+
return /* @__PURE__ */ l(m, { children: [
|
|
221
221
|
/* @__PURE__ */ n(
|
|
222
|
-
|
|
222
|
+
Y,
|
|
223
223
|
{
|
|
224
224
|
setPageShowDate: (t) => s([t, t], 0),
|
|
225
225
|
...r,
|
|
@@ -228,21 +228,21 @@ function Ve(w) {
|
|
|
228
228
|
}
|
|
229
229
|
),
|
|
230
230
|
/* @__PURE__ */ n(
|
|
231
|
-
|
|
231
|
+
Y,
|
|
232
232
|
{
|
|
233
233
|
setPageShowDate: (t) => s([k.subtract(t, 1, "year"), t], 1),
|
|
234
234
|
...i,
|
|
235
235
|
...o,
|
|
236
|
-
...
|
|
236
|
+
...g
|
|
237
237
|
}
|
|
238
238
|
)
|
|
239
239
|
] });
|
|
240
240
|
}
|
|
241
|
-
return /* @__PURE__ */ n("div", { className:
|
|
241
|
+
return /* @__PURE__ */ n("div", { className: N, children: /* @__PURE__ */ l("div", { className: `${N}-wrapper`, children: [
|
|
242
242
|
(a === "date" || a === "week") && se(),
|
|
243
243
|
a === "month" && ie(),
|
|
244
244
|
a === "year" && ce(),
|
|
245
|
-
a === "quarter" &&
|
|
245
|
+
a === "quarter" && le()
|
|
246
246
|
] }) });
|
|
247
247
|
}
|
|
248
248
|
export {
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
import { jsxs as I, jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import K from "lodash/merge";
|
|
3
|
-
import { useContext as
|
|
3
|
+
import { useContext as i } from "react";
|
|
4
4
|
import "../../../config-provider/ConfigProvider.js";
|
|
5
5
|
import z from "../../context.js";
|
|
6
6
|
import B from "../Body.js";
|
|
7
7
|
import H from "../Header.js";
|
|
8
8
|
import V from "@unicom-cloud/utils/class-name";
|
|
9
|
-
import { newArray as
|
|
9
|
+
import { newArray as c } from "../../../utils/constant.js";
|
|
10
10
|
import { getNow as j, dayjs as q } from "../../../components/common/utils/dayjs.js";
|
|
11
11
|
import F from "../../../config-provider/context.js";
|
|
12
|
-
function se(
|
|
12
|
+
function se(l) {
|
|
13
13
|
const {
|
|
14
14
|
pageShowDate: n,
|
|
15
|
-
style:
|
|
16
|
-
onMouseEnterCell:
|
|
17
|
-
onMouseLeaveCell:
|
|
18
|
-
dateRender:
|
|
19
|
-
disabledDate:
|
|
20
|
-
value:
|
|
21
|
-
locale:
|
|
22
|
-
isRangePicker:
|
|
23
|
-
onSelect:
|
|
24
|
-
rangeValues:
|
|
25
|
-
onSuperPrev:
|
|
26
|
-
onSuperNext:
|
|
27
|
-
format:
|
|
28
|
-
icons:
|
|
29
|
-
...
|
|
30
|
-
} =
|
|
31
|
-
name: s +
|
|
32
|
-
time: q(`${s +
|
|
33
|
-
isPrev:
|
|
34
|
-
isNext:
|
|
15
|
+
style: p,
|
|
16
|
+
onMouseEnterCell: f,
|
|
17
|
+
onMouseLeaveCell: C,
|
|
18
|
+
dateRender: d,
|
|
19
|
+
disabledDate: u,
|
|
20
|
+
value: x,
|
|
21
|
+
locale: y,
|
|
22
|
+
isRangePicker: P,
|
|
23
|
+
onSelect: g,
|
|
24
|
+
rangeValues: E,
|
|
25
|
+
onSuperPrev: L,
|
|
26
|
+
onSuperNext: A,
|
|
27
|
+
format: D,
|
|
28
|
+
icons: N,
|
|
29
|
+
...S
|
|
30
|
+
} = l, { locale: Y, getPrefixCls: t, rtl: k } = i(F), w = K(Y.DatePicker, y).Calendar, { utcOffset: O, timezone: R } = i(z), _ = t?.("panel-year"), h = V(_), v = P ? { rangeValues: E } : { value: x }, b = n ? n.year() : j(O, R).year(), s = Math.floor(b / 10) * 10 - 1, M = c(3).map((r) => ""), a = c(4).map((r) => M).map((r, e) => r.map((J, o) => ({
|
|
31
|
+
name: s + e * 3 + o,
|
|
32
|
+
time: q(`${s + e * 3 + o}`, "YYYY").endOf("year"),
|
|
33
|
+
isPrev: e === 0 && o === 0,
|
|
34
|
+
isNext: e === 3 && o === 2
|
|
35
35
|
})));
|
|
36
36
|
function T() {
|
|
37
37
|
return /* @__PURE__ */ m(
|
|
38
38
|
B,
|
|
39
39
|
{
|
|
40
|
-
...
|
|
41
|
-
...
|
|
42
|
-
prefixCls:
|
|
40
|
+
...S,
|
|
41
|
+
...v,
|
|
42
|
+
prefixCls: t?.("picker"),
|
|
43
43
|
rows: a,
|
|
44
|
-
onSelectDate:
|
|
45
|
-
isSameTime: (r,
|
|
46
|
-
onMouseEnterCell:
|
|
47
|
-
onMouseLeaveCell:
|
|
48
|
-
dateRender:
|
|
49
|
-
disabledDate:
|
|
50
|
-
CALENDAR_LOCALE:
|
|
44
|
+
onSelectDate: g,
|
|
45
|
+
isSameTime: (r, e) => r.isSame(e, "year"),
|
|
46
|
+
onMouseEnterCell: f,
|
|
47
|
+
onMouseLeaveCell: C,
|
|
48
|
+
dateRender: d,
|
|
49
|
+
disabledDate: u,
|
|
50
|
+
CALENDAR_LOCALE: w,
|
|
51
51
|
mode: "year",
|
|
52
|
-
format:
|
|
52
|
+
format: D
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
-
const $ = { onSuperPrev:
|
|
57
|
-
return /* @__PURE__ */ I("div", { className:
|
|
56
|
+
const $ = { onSuperPrev: L, onSuperNext: A };
|
|
57
|
+
return /* @__PURE__ */ I("div", { className: h, style: p, children: [
|
|
58
58
|
/* @__PURE__ */ m(
|
|
59
59
|
H,
|
|
60
60
|
{
|
|
61
|
-
prefixCls:
|
|
62
|
-
icons:
|
|
61
|
+
prefixCls: t?.("picker"),
|
|
62
|
+
icons: N,
|
|
63
63
|
title: `${a[0][1].name} - ${a[3][2].name}`,
|
|
64
|
-
rtl:
|
|
64
|
+
rtl: k,
|
|
65
65
|
...$
|
|
66
66
|
}
|
|
67
67
|
),
|
package/date-picker/util.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import y, { isDayjs as a } from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import { methods as
|
|
4
|
-
function
|
|
2
|
+
import h from "lodash/isArray";
|
|
3
|
+
import { methods as i } from "../components/common/utils/dayjs.js";
|
|
4
|
+
function u(t) {
|
|
5
5
|
return a(t) && t.format("HH:mm:ss");
|
|
6
6
|
}
|
|
7
7
|
function j(t, r) {
|
|
8
|
-
return
|
|
8
|
+
return u(t[0]) !== u(r[0]) || u(t[1]) !== u(r[1]);
|
|
9
9
|
}
|
|
10
10
|
function p(t) {
|
|
11
|
-
return t &&
|
|
11
|
+
return t && h(t) ? a(t[0]) && a(t[1]) ? 2 : !a(t[0]) && !a(t[1]) ? 0 : 1 : 0;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function c(t, r, m) {
|
|
14
14
|
if (typeof r != "function")
|
|
15
15
|
return !1;
|
|
16
|
-
const
|
|
16
|
+
const f = (n, o, g) => {
|
|
17
17
|
let s = o;
|
|
18
18
|
for (; s <= g; ) {
|
|
19
19
|
let e;
|
|
20
20
|
switch (n) {
|
|
21
21
|
case "date": {
|
|
22
|
-
if (e =
|
|
22
|
+
if (e = i.set(t, "date", s), !r(e))
|
|
23
23
|
return !1;
|
|
24
24
|
break;
|
|
25
25
|
}
|
|
26
26
|
case "month": {
|
|
27
|
-
if (e =
|
|
27
|
+
if (e = i.set(t, "month", s), !c(e, r, "month"))
|
|
28
28
|
return !1;
|
|
29
29
|
break;
|
|
30
30
|
}
|
|
31
31
|
case "year": {
|
|
32
|
-
if (e =
|
|
32
|
+
if (e = i.set(t, "year", s), !c(e, r, "year"))
|
|
33
33
|
return !1;
|
|
34
34
|
break;
|
|
35
35
|
}
|
|
@@ -38,39 +38,38 @@ function h(t, r, u) {
|
|
|
38
38
|
}
|
|
39
39
|
return !0;
|
|
40
40
|
};
|
|
41
|
-
switch (
|
|
41
|
+
switch (m) {
|
|
42
42
|
case "date":
|
|
43
43
|
case "week":
|
|
44
44
|
return r(t);
|
|
45
45
|
case "month": {
|
|
46
46
|
const o = t.endOf("month").get("date");
|
|
47
|
-
return
|
|
47
|
+
return f("date", 1, o);
|
|
48
48
|
}
|
|
49
49
|
case "quarter": {
|
|
50
50
|
const n = Math.floor(t.get("month") / 3) * 3, o = n + 2;
|
|
51
|
-
return
|
|
51
|
+
return f("month", n, o);
|
|
52
52
|
}
|
|
53
53
|
case "year":
|
|
54
|
-
return
|
|
54
|
+
return f("month", 0, 11);
|
|
55
55
|
default:
|
|
56
56
|
return !1;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
function A(t) {
|
|
60
|
-
|
|
61
|
-
return ((u = (r = y.Ls) == null ? void 0 : r[t]) == null ? void 0 : u.weekStart) || 0;
|
|
60
|
+
return y.Ls?.[t]?.weekStart || 0;
|
|
62
61
|
}
|
|
63
62
|
function F(t, r) {
|
|
64
63
|
return t && t.locale(r);
|
|
65
64
|
}
|
|
66
65
|
function L(t, r) {
|
|
67
|
-
return
|
|
66
|
+
return h(t) ? t[r] : t;
|
|
68
67
|
}
|
|
69
68
|
export {
|
|
70
69
|
p as getAvailableDayjsLength,
|
|
71
70
|
A as getDefaultWeekStart,
|
|
72
71
|
L as getFormatByIndex,
|
|
73
72
|
F as getLocaleDayjsValue,
|
|
74
|
-
|
|
73
|
+
c as isDisabledDate,
|
|
75
74
|
j as isTimeArrayChange
|
|
76
75
|
};
|