@cloudtower/eagle 0.0.0-config-rc-7 → 0.0.0-data-testid
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/dist/__test__/mockLineChart.d.ts +4 -0
- package/dist/cjs/UIKitProvider/index.js +15 -40
- package/dist/cjs/antd.js +14 -14
- package/dist/cjs/core/AccordionCard/index.js +4 -1
- package/dist/cjs/core/Alert/index.js +12 -4
- package/dist/cjs/core/Arch/index.js +5 -3
- package/dist/cjs/core/AutoComplete/AutoComplete.js +42 -0
- package/dist/cjs/core/Avatar/index.js +3 -1
- package/dist/cjs/core/Banner/banner.style.js +11 -0
- package/dist/cjs/core/Banner/index.js +45 -0
- package/dist/cjs/core/BasicCTError/BasicCTError.style.js +5 -0
- package/dist/cjs/core/BasicCTError/index.js +53 -0
- package/dist/cjs/core/Bit/index.js +5 -3
- package/dist/cjs/core/BitPerSecond/index.js +8 -6
- package/dist/cjs/core/BlankState/index.js +91 -0
- package/dist/cjs/core/BlankState/style.js +5 -0
- package/dist/cjs/core/Bps/index.js +5 -3
- package/dist/cjs/core/Breadcrumb/index.js +4 -1
- package/dist/cjs/core/Button/index.js +1 -2
- package/dist/cjs/core/ButtonGroup/index.js +3 -1
- package/dist/cjs/core/Byte/index.js +7 -5
- package/dist/cjs/core/BytePerSecond/index.js +46 -0
- package/dist/cjs/core/Card/index.js +7 -3
- package/dist/cjs/core/Cascader/cascader.widget.js +12 -11
- package/dist/cjs/core/Cascader/index.js +1 -1
- package/dist/cjs/core/Checkbox/index.js +1 -1
- package/dist/cjs/core/ConfigProvider/index.js +45 -1
- package/dist/cjs/core/DetailCard/index.js +7 -3
- package/dist/cjs/core/DonutChart/index.js +3 -1
- package/dist/cjs/core/DropdownMenu/index.js +9 -4
- package/dist/cjs/core/Duration/index.js +79 -0
- package/dist/cjs/core/Empty/index.js +6 -3
- package/dist/cjs/core/Error/index.js +4 -1
- package/dist/cjs/core/FailedLoad/index.js +4 -1
- package/dist/cjs/core/Fields/FieldsBoolean/index.js +11 -2
- package/dist/cjs/core/Fields/FieldsDateTime/index.js +5 -1
- package/dist/cjs/core/Fields/FieldsDateTimeRange/index.js +25 -5
- package/dist/cjs/core/Fields/FieldsEnum/index.js +6 -4
- package/dist/cjs/core/Fields/FieldsFloat/index.js +6 -3
- package/dist/cjs/core/Fields/FieldsInt/index.js +6 -3
- package/dist/cjs/core/Fields/FieldsInteger/index.js +6 -3
- package/dist/cjs/core/Fields/FieldsString/index.js +14 -4
- package/dist/cjs/core/Fields/FieldsTextArea/index.js +6 -3
- package/dist/cjs/core/Fields/FieldsTimePicker/index.js +10 -6
- package/dist/cjs/core/FormItem/index.js +15 -1
- package/dist/cjs/core/Frequency/index.js +5 -3
- package/dist/cjs/core/ImmersiveDialog/index.js +230 -0
- package/dist/cjs/core/ImmersiveDialog/styles.js +31 -0
- package/dist/cjs/core/Input/index.js +15 -3
- package/dist/cjs/core/InputInteger/index.js +15 -3
- package/dist/cjs/core/InputNumber/index.js +15 -3
- package/dist/cjs/core/InputPassword/index.js +15 -3
- package/dist/cjs/core/KitStoreProvider/index.js +10 -0
- package/dist/cjs/core/{Modal → LegacyModal}/index.js +60 -45
- package/dist/cjs/core/LegacySelect/index.js +203 -0
- package/dist/cjs/core/LegacySelect/select.style.js +5 -0
- package/dist/cjs/core/Legend/index.js +128 -0
- package/dist/cjs/core/LineChart/LineChartActions.js +52 -0
- package/dist/cjs/core/LineChart/LineChartLegend.js +120 -0
- package/dist/cjs/core/LineChart/LineChartToolBar.js +56 -0
- package/dist/cjs/core/LineChart/Pointer.js +45 -0
- package/dist/cjs/core/LineChart/RenderChart.js +317 -0
- package/dist/cjs/core/LineChart/TooltipFormatter.js +71 -0
- package/dist/cjs/core/LineChart/index.js +68 -0
- package/dist/cjs/core/LineChart/styled.js +35 -0
- package/dist/cjs/core/LineChart/type.js +30 -0
- package/dist/cjs/core/LineChart/utils.js +394 -0
- package/dist/cjs/core/Loading/index.js +23 -2
- package/dist/cjs/core/LocalUpload/LocalUpload.hooks.js +66 -0
- package/dist/cjs/core/LocalUpload/LocalUpload.js +116 -0
- package/dist/cjs/core/LocalUpload/LocalUpload.style.js +13 -0
- package/dist/cjs/core/LocalUpload/LocalUpload.widget.js +379 -0
- package/dist/cjs/core/MediumDialog/MediumDialog.js +57 -0
- package/dist/cjs/core/Metric/index.js +3 -1
- package/dist/cjs/core/ModalStack/index.js +6 -0
- package/dist/cjs/core/Nav/index.js +5 -2
- package/dist/cjs/core/Pagination/index.js +7 -1
- package/dist/cjs/core/Percent/index.js +4 -3
- package/dist/cjs/core/Progress/index.js +6 -4
- package/dist/cjs/core/Progress/progress.widgets.js +6 -7
- package/dist/cjs/core/Radio/index.js +15 -7
- package/dist/cjs/core/SearchInput/SearchInput.hook.js +124 -0
- package/dist/cjs/core/SearchInput/SearchInput.js +253 -0
- package/dist/cjs/core/SearchInput/SearchInput.style.js +13 -0
- package/dist/cjs/core/SearchInput/index.js +137 -28
- package/dist/cjs/core/Second/index.js +16 -5
- package/dist/cjs/core/SegmentControl/index.js +1 -1
- package/dist/cjs/core/Select/index.js +106 -117
- package/dist/cjs/core/Select/select.style.js +11 -0
- package/dist/cjs/core/Select/select.widgets.js +63 -0
- package/dist/cjs/core/SidebarMenu/SidebarMenu.js +1 -7
- package/dist/cjs/core/SimplePagination/index.js +8 -2
- package/dist/cjs/core/Skeleton/Content.js +30 -0
- package/dist/cjs/core/Skeleton/index.js +13 -0
- package/dist/cjs/core/SmallDialog/SmallDialog.js +172 -0
- package/dist/cjs/core/SmallDialog/SmallDialog.style.js +17 -0
- package/dist/cjs/core/SmallDialog/SmallDialog.widget.js +28 -0
- package/dist/cjs/core/Speed/index.js +5 -3
- package/dist/cjs/core/StepProgress/index.js +3 -1
- package/dist/cjs/core/Styled/index.js +2 -0
- package/dist/cjs/core/Switch/index.js +5 -3
- package/dist/cjs/core/Tab/Tab.js +118 -0
- package/dist/cjs/core/Tab/Tab.style.js +17 -0
- package/dist/cjs/core/Tab/Tab.type.js +9 -0
- package/dist/cjs/core/Tab/useTabAdaptiveLayout.js +73 -0
- package/dist/cjs/core/Table/index.js +7 -3
- package/dist/cjs/core/TableForm/AddRowButton.js +13 -5
- package/dist/cjs/core/TableForm/Columns/AffixColumn.js +1 -1
- package/dist/cjs/core/TableForm/Columns/CheckboxColumn.js +1 -1
- package/dist/cjs/core/TableForm/Columns/InputColumn.js +1 -0
- package/dist/cjs/core/TableForm/TableFormBodyCell.js +13 -17
- package/dist/cjs/core/TableForm/TableFormBodyRows.js +8 -3
- package/dist/cjs/core/TableForm/TableFormHeaderCell.js +42 -20
- package/dist/cjs/core/TableForm/index.js +41 -21
- package/dist/cjs/core/TextArea/index.js +21 -3
- package/dist/cjs/core/Time/index.js +9 -8
- package/dist/cjs/core/TimePicker/index.js +1 -9
- package/dist/cjs/core/TimeZoneSelect/index.js +4 -2
- package/dist/cjs/core/Timeline/Timeline.style.js +13 -0
- package/dist/cjs/core/Timeline/Timeline.widget.js +114 -0
- package/dist/cjs/core/Timeline/index.js +143 -0
- package/dist/cjs/core/Tooltip/EllipsisTooltipContent.js +55 -0
- package/dist/cjs/core/Tooltip/index.js +4 -1
- package/dist/cjs/core/Truncate/index.js +3 -1
- package/dist/cjs/core/WizardDialog/index.js +175 -0
- package/dist/cjs/core/WizardDialog/styles.js +11 -0
- package/dist/cjs/core/index.js +24 -18
- package/dist/cjs/core/message/index.js +5 -210
- package/dist/cjs/core/message/message.js +245 -0
- package/dist/cjs/core/message/useMessage.js +12 -0
- package/dist/cjs/core/message-group/index.js +3 -1
- package/dist/cjs/coreX/BarChart/index.js +77 -18
- package/dist/cjs/coreX/BatchOperation/index.js +4 -1
- package/dist/cjs/coreX/ChartWithTooltip/index.js +14 -12
- package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +9 -0
- package/dist/cjs/coreX/CheckPointList/index.js +118 -0
- package/dist/cjs/coreX/CircleLoading/index.js +66 -0
- package/dist/cjs/coreX/Copy/CopyButton.js +40 -0
- package/dist/cjs/coreX/Copy/CopyTooltip.js +66 -0
- package/dist/cjs/coreX/DateRangePicker/AbsoluteDate.js +2 -1
- package/dist/cjs/coreX/DateRangePicker/Calendar.js +82 -61
- package/dist/cjs/coreX/DateRangePicker/common.js +7 -5
- package/dist/cjs/coreX/DateRangePicker/index.js +25 -8
- package/dist/cjs/coreX/DateRangePicker/utils.js +5 -0
- package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +53 -0
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +137 -0
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.type.js +11 -0
- package/dist/cjs/coreX/InfoRowList/InfoRow.js +31 -0
- package/dist/cjs/coreX/InfoRowList/InfoRowList.js +60 -0
- package/dist/cjs/coreX/KubeConfigModal/KubeConfigModal.style.js +29 -0
- package/dist/cjs/coreX/KubeConfigModal/index.js +102 -0
- package/dist/cjs/coreX/KubeConfigModal/utils.js +25 -0
- package/dist/cjs/coreX/OverflowTooltip/index.js +21 -8
- package/dist/cjs/coreX/Show/index.js +20 -0
- package/dist/cjs/coreX/Sider/index.js +109 -0
- package/dist/cjs/coreX/SummaryTable/index.js +6 -3
- package/dist/cjs/coreX/UnderlineTootip/index.js +70 -0
- package/dist/cjs/coreX/UnitWithChart/index.js +14 -12
- package/dist/cjs/hooks/useAntdPatchEnLocales.js +35 -0
- package/dist/cjs/hooks/useCTErrorMsg.js +25 -0
- package/dist/cjs/hooks/useFormatDuration.js +35 -0
- package/dist/cjs/hooks/useLegacyComponentWarning.js +16 -0
- package/dist/cjs/index.js +376 -260
- package/dist/cjs/legacy-antd.js +58 -54
- package/dist/cjs/stats1.html +1 -1
- package/dist/cjs/store/modal.js +3 -0
- package/dist/cjs/styles/token/animation.js +22 -1
- package/dist/cjs/styles/token/color.js +24 -0
- package/dist/cjs/utils/constants.js +10 -6
- package/dist/cjs/utils/cterror.js +64 -0
- package/dist/cjs/utils/formatDuration.js +67 -0
- package/dist/cjs/utils/tower.js +98 -0
- package/dist/cjs/utils/unit.js +19 -0
- package/dist/components.css +6496 -61862
- package/dist/esm/UIKitProvider/index.js +9 -28
- package/dist/esm/antd.js +3 -3
- package/dist/esm/core/AccordionCard/index.js +4 -1
- package/dist/esm/core/Alert/index.js +12 -4
- package/dist/esm/core/Arch/index.js +5 -3
- package/dist/esm/core/AutoComplete/AutoComplete.js +35 -0
- package/dist/esm/core/Avatar/index.js +3 -1
- package/dist/esm/core/Banner/banner.style.js +6 -0
- package/dist/esm/core/Banner/index.js +38 -0
- package/dist/esm/core/BasicCTError/BasicCTError.style.js +3 -0
- package/dist/esm/core/BasicCTError/index.js +47 -0
- package/dist/esm/core/Bit/index.js +5 -3
- package/dist/esm/core/BitPerSecond/index.js +8 -6
- package/dist/esm/core/BlankState/index.js +85 -0
- package/dist/esm/core/BlankState/style.js +3 -0
- package/dist/esm/core/Bps/index.js +5 -3
- package/dist/esm/core/Breadcrumb/index.js +4 -1
- package/dist/esm/core/Button/index.js +1 -2
- package/dist/esm/core/ButtonGroup/index.js +3 -1
- package/dist/esm/core/Byte/index.js +7 -5
- package/dist/esm/core/BytePerSecond/index.js +40 -0
- package/dist/esm/core/Card/index.js +7 -3
- package/dist/esm/core/Cascader/cascader.widget.js +3 -2
- package/dist/esm/core/Cascader/index.js +2 -2
- package/dist/esm/core/Checkbox/index.js +1 -1
- package/dist/esm/core/ConfigProvider/index.js +40 -3
- package/dist/esm/core/DetailCard/index.js +7 -3
- package/dist/esm/core/DonutChart/index.js +3 -1
- package/dist/esm/core/DropdownMenu/index.js +9 -4
- package/dist/esm/core/Duration/index.js +73 -0
- package/dist/esm/core/Empty/index.js +6 -3
- package/dist/esm/core/Error/index.js +4 -1
- package/dist/esm/core/FailedLoad/index.js +4 -1
- package/dist/esm/core/Fields/FieldsBoolean/index.js +11 -2
- package/dist/esm/core/Fields/FieldsDateTime/index.js +5 -1
- package/dist/esm/core/Fields/FieldsDateTimeRange/index.js +25 -5
- package/dist/esm/core/Fields/FieldsEnum/index.js +8 -6
- package/dist/esm/core/Fields/FieldsFloat/index.js +6 -3
- package/dist/esm/core/Fields/FieldsInt/index.js +6 -3
- package/dist/esm/core/Fields/FieldsInteger/index.js +6 -3
- package/dist/esm/core/Fields/FieldsString/index.js +14 -4
- package/dist/esm/core/Fields/FieldsTextArea/index.js +6 -3
- package/dist/esm/core/Fields/FieldsTimePicker/index.js +8 -4
- package/dist/esm/core/FormItem/index.js +15 -1
- package/dist/esm/core/Frequency/index.js +5 -3
- package/dist/esm/core/ImmersiveDialog/index.js +223 -0
- package/dist/esm/core/ImmersiveDialog/styles.js +16 -0
- package/dist/esm/core/Input/index.js +15 -3
- package/dist/esm/core/InputInteger/index.js +15 -3
- package/dist/esm/core/InputNumber/index.js +15 -3
- package/dist/esm/core/InputPassword/index.js +15 -3
- package/dist/esm/core/KitStoreProvider/index.js +10 -1
- package/dist/esm/core/{Modal → LegacyModal}/index.js +62 -47
- package/dist/esm/core/LegacySelect/index.js +195 -0
- package/dist/esm/core/LegacySelect/select.style.js +3 -0
- package/dist/esm/core/Legend/index.js +117 -0
- package/dist/esm/core/LineChart/LineChartActions.js +46 -0
- package/dist/esm/core/LineChart/LineChartLegend.js +110 -0
- package/dist/esm/core/LineChart/LineChartToolBar.js +50 -0
- package/dist/esm/core/LineChart/Pointer.js +38 -0
- package/dist/esm/core/LineChart/RenderChart.js +309 -0
- package/dist/esm/core/LineChart/TooltipFormatter.js +64 -0
- package/dist/esm/core/LineChart/index.js +59 -0
- package/dist/esm/core/LineChart/styled.js +25 -0
- package/dist/esm/core/LineChart/type.js +26 -0
- package/dist/esm/core/LineChart/utils.js +369 -0
- package/dist/esm/core/Loading/index.js +22 -2
- package/dist/esm/core/LocalUpload/LocalUpload.hooks.js +63 -0
- package/dist/esm/core/LocalUpload/LocalUpload.js +110 -0
- package/dist/esm/core/LocalUpload/LocalUpload.style.js +10 -0
- package/dist/esm/core/LocalUpload/LocalUpload.widget.js +365 -0
- package/dist/esm/core/MediumDialog/MediumDialog.js +51 -0
- package/dist/esm/core/Metric/index.js +3 -1
- package/dist/esm/core/ModalStack/index.js +7 -1
- package/dist/esm/core/Nav/index.js +5 -2
- package/dist/esm/core/Pagination/index.js +7 -1
- package/dist/esm/core/Percent/index.js +4 -3
- package/dist/esm/core/Progress/index.js +7 -5
- package/dist/esm/core/Progress/progress.widgets.js +5 -6
- package/dist/esm/core/Radio/index.js +15 -7
- package/dist/esm/core/SearchInput/SearchInput.hook.js +117 -0
- package/dist/esm/core/SearchInput/SearchInput.js +247 -0
- package/dist/esm/core/SearchInput/SearchInput.style.js +7 -0
- package/dist/esm/core/SearchInput/index.js +137 -28
- package/dist/esm/core/Second/index.js +16 -5
- package/dist/esm/core/SegmentControl/index.js +2 -2
- package/dist/esm/core/Select/index.js +104 -116
- package/dist/esm/core/Select/select.style.js +6 -0
- package/dist/esm/core/Select/select.widgets.js +57 -0
- package/dist/esm/core/SidebarMenu/SidebarMenu.js +2 -8
- package/dist/esm/core/SimplePagination/index.js +8 -2
- package/dist/esm/core/Skeleton/Content.js +23 -0
- package/dist/esm/core/Skeleton/index.js +7 -0
- package/dist/esm/core/SmallDialog/SmallDialog.js +165 -0
- package/dist/esm/core/SmallDialog/SmallDialog.style.js +9 -0
- package/dist/esm/core/SmallDialog/SmallDialog.widget.js +20 -0
- package/dist/esm/core/Speed/index.js +5 -3
- package/dist/esm/core/StepProgress/index.js +3 -1
- package/dist/esm/core/Styled/index.js +2 -1
- package/dist/esm/core/Switch/index.js +5 -3
- package/dist/esm/core/Tab/Tab.js +112 -0
- package/dist/esm/core/Tab/Tab.style.js +12 -0
- package/dist/esm/core/Tab/Tab.type.js +7 -0
- package/dist/esm/core/Tab/useTabAdaptiveLayout.js +71 -0
- package/dist/esm/core/Table/index.js +7 -3
- package/dist/esm/core/TableForm/AddRowButton.js +13 -5
- package/dist/esm/core/TableForm/Columns/AffixColumn.js +1 -1
- package/dist/esm/core/TableForm/Columns/CheckboxColumn.js +1 -1
- package/dist/esm/core/TableForm/Columns/InputColumn.js +1 -0
- package/dist/esm/core/TableForm/TableFormBodyCell.js +14 -18
- package/dist/esm/core/TableForm/TableFormBodyRows.js +8 -3
- package/dist/esm/core/TableForm/TableFormHeaderCell.js +39 -17
- package/dist/esm/core/TableForm/index.js +42 -22
- package/dist/esm/core/TextArea/index.js +21 -3
- package/dist/esm/core/Time/index.js +9 -8
- package/dist/esm/core/TimePicker/index.js +1 -9
- package/dist/esm/core/TimeZoneSelect/index.js +5 -3
- package/dist/esm/core/Timeline/Timeline.style.js +7 -0
- package/dist/esm/core/Timeline/Timeline.widget.js +107 -0
- package/dist/esm/core/Timeline/index.js +136 -0
- package/dist/esm/core/Tooltip/EllipsisTooltipContent.js +49 -0
- package/dist/esm/core/Tooltip/index.js +4 -1
- package/dist/esm/core/Truncate/index.js +3 -1
- package/dist/esm/core/WizardDialog/index.js +169 -0
- package/dist/esm/core/WizardDialog/styles.js +6 -0
- package/dist/esm/core/index.js +6 -2
- package/dist/esm/core/message/index.js +4 -180
- package/dist/esm/core/message/message.js +209 -0
- package/dist/esm/core/message/useMessage.js +9 -0
- package/dist/esm/core/message-group/index.js +3 -1
- package/dist/esm/coreX/BarChart/index.js +77 -19
- package/dist/esm/coreX/BatchOperation/index.js +4 -1
- package/dist/esm/coreX/ChartWithTooltip/index.js +2 -0
- package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +5 -0
- package/dist/esm/coreX/CheckPointList/index.js +110 -0
- package/dist/esm/coreX/CircleLoading/index.js +59 -0
- package/dist/esm/coreX/Copy/CopyButton.js +34 -0
- package/dist/esm/coreX/Copy/CopyTooltip.js +59 -0
- package/dist/esm/coreX/DateRangePicker/AbsoluteDate.js +2 -1
- package/dist/esm/coreX/DateRangePicker/Calendar.js +83 -62
- package/dist/esm/coreX/DateRangePicker/common.js +7 -5
- package/dist/esm/coreX/DateRangePicker/index.js +26 -9
- package/dist/esm/coreX/DateRangePicker/utils.js +3 -0
- package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +47 -0
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +131 -0
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.type.js +9 -0
- package/dist/esm/coreX/InfoRowList/InfoRow.js +25 -0
- package/dist/esm/coreX/InfoRowList/InfoRowList.js +54 -0
- package/dist/esm/coreX/KubeConfigModal/KubeConfigModal.style.js +20 -0
- package/dist/esm/coreX/KubeConfigModal/index.js +96 -0
- package/dist/esm/coreX/KubeConfigModal/utils.js +22 -0
- package/dist/esm/coreX/OverflowTooltip/index.js +21 -8
- package/dist/esm/coreX/Show/index.js +14 -0
- package/dist/esm/coreX/Sider/index.js +102 -0
- package/dist/esm/coreX/SummaryTable/index.js +6 -3
- package/dist/esm/coreX/UnderlineTootip/index.js +61 -0
- package/dist/esm/coreX/UnitWithChart/index.js +2 -0
- package/dist/esm/hooks/useAntdPatchEnLocales.js +29 -0
- package/dist/esm/hooks/useCTErrorMsg.js +23 -0
- package/dist/esm/hooks/useFormatDuration.js +33 -0
- package/dist/esm/hooks/useLegacyComponentWarning.js +14 -0
- package/dist/esm/index.js +47 -10
- package/dist/esm/legacy-antd.js +10 -6
- package/dist/esm/stats1.html +1 -1
- package/dist/esm/store/modal.js +3 -0
- package/dist/esm/styles/token/animation.js +22 -2
- package/dist/esm/styles/token/color.js +24 -0
- package/dist/esm/utils/constants.js +6 -6
- package/dist/esm/utils/cterror.js +58 -0
- package/dist/esm/utils/formatDuration.js +65 -0
- package/dist/esm/utils/tower.js +93 -1
- package/dist/esm/utils/unit.js +17 -0
- package/dist/linaria.merged.scss +8642 -0
- package/dist/src/UIKitProvider/UIKitProvider.stories.d.ts +1 -2
- package/dist/src/UIKitProvider/index.d.ts +4 -6
- package/dist/src/antd.d.ts +3 -2
- package/dist/src/core/AccordionCard/accordionCard.type.d.ts +1 -0
- package/dist/src/core/Alert/alert.type.d.ts +6 -4
- package/dist/src/core/Antd5Flex/index.d.ts +2 -0
- package/dist/src/core/Antd5Tree/Antd5Tree.d.ts +1 -0
- package/dist/src/core/Antd5Tree/Antd5Tree.type.d.ts +4 -0
- package/dist/src/core/Antd5Tree/index.d.ts +2 -0
- package/dist/src/core/Arch/arch.type.d.ts +1 -0
- package/dist/src/core/AutoComplete/AutoComplete.d.ts +6 -0
- package/dist/src/core/AutoComplete/index.d.ts +1 -0
- package/dist/src/core/Avatar/avatar.type.d.ts +1 -0
- package/dist/src/core/Banner/banner.style.d.ts +4 -0
- package/dist/src/core/Banner/banner.types.d.ts +29 -0
- package/dist/src/core/Banner/index.d.ts +3 -0
- package/dist/src/core/BasicCTError/BasicCTError.style.d.ts +1 -0
- package/dist/src/core/BasicCTError/BasicCTError.type.d.ts +62 -0
- package/dist/src/core/BasicCTError/index.d.ts +3 -0
- package/dist/src/core/BitPerSecond/index.d.ts +2 -2
- package/dist/src/core/BlankState/index.d.ts +4 -0
- package/dist/src/core/BlankState/style.d.ts +1 -0
- package/dist/src/core/BlankState/type.d.ts +50 -0
- package/dist/src/core/Breadcrumb/breadcrumb.type.d.ts +2 -0
- package/dist/src/core/Button/button.type.d.ts +1 -0
- package/dist/src/core/BytePerSecond/index.d.ts +3 -0
- package/dist/src/core/Card/index.d.ts +8 -0
- package/dist/src/core/Cascader/cascader.type.d.ts +3 -1
- package/dist/src/core/Checkbox/index.d.ts +1 -1
- package/dist/src/core/ConfigProvider/index.d.ts +8 -1
- package/dist/src/core/DetailCard/detailCard.type.d.ts +1 -0
- package/dist/src/core/DonutChart/index.d.ts +1 -0
- package/dist/src/core/DropdownMenu/dropdownMenu.type.d.ts +2 -0
- package/dist/src/core/DropdownMenu/index.d.ts +1 -0
- package/dist/src/core/Duration/duration.type.d.ts +50 -0
- package/dist/src/core/Duration/index.d.ts +4 -0
- package/dist/src/core/Empty/index.d.ts +2 -1
- package/dist/src/core/Error/index.d.ts +2 -1
- package/dist/src/core/FailedLoad/index.d.ts +1 -0
- package/dist/src/core/Fields/FieldsBoolean/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsDateTime/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsEnum/fieldsEnum.type.d.ts +1 -0
- package/dist/src/core/Fields/FieldsEnum/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsFloat/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsInt/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsInteger/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsString/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsTextArea/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsTimePicker/index.d.ts +1 -1
- package/dist/src/core/Fields/__test__/data-testid.test.d.ts +1 -0
- package/dist/src/core/Fields/fields.type.d.ts +2 -1
- package/dist/src/core/Fields/index.d.ts +13 -9
- package/dist/src/core/FormItem/index.d.ts +3 -1
- package/dist/src/core/ImmersiveDialog/index.d.ts +3 -0
- package/dist/src/core/ImmersiveDialog/styles.d.ts +14 -0
- package/dist/src/core/ImmersiveDialog/type.d.ts +156 -0
- package/dist/src/core/Input/index.d.ts +2 -4
- package/dist/src/core/Input/input.type.d.ts +9 -0
- package/dist/src/core/InputPassword/index.d.ts +7 -2
- package/dist/src/core/KitStoreProvider/index.d.ts +1 -0
- package/dist/src/core/LegacyModal/LegacyModal.type.d.ts +71 -0
- package/dist/src/core/LegacyModal/index.d.ts +16 -0
- package/dist/src/core/LegacySelect/index.d.ts +4 -0
- package/dist/src/core/LegacySelect/select.style.d.ts +1 -0
- package/dist/src/core/LegacySelect/select.type.d.ts +32 -0
- package/dist/src/core/Legend/__test__/h5_css.test.d.ts +1 -0
- package/dist/src/core/Legend/index.d.ts +9 -0
- package/dist/src/core/Legend/legend.type.d.ts +27 -0
- package/dist/src/core/LineChart/LineChartActions.d.ts +7 -0
- package/dist/src/core/LineChart/LineChartLegend.d.ts +18 -0
- package/dist/src/core/LineChart/LineChartToolBar.d.ts +20 -0
- package/dist/src/core/LineChart/Pointer.d.ts +6 -0
- package/dist/src/core/LineChart/RenderChart.d.ts +45 -0
- package/dist/src/core/LineChart/TooltipFormatter.d.ts +10 -0
- package/dist/src/core/LineChart/__test__/h5_css.test.d.ts +1 -0
- package/dist/src/core/LineChart/index.d.ts +8 -0
- package/dist/src/core/LineChart/styled.d.ts +12 -0
- package/dist/src/core/LineChart/type.d.ts +196 -0
- package/dist/src/core/LineChart/utils.d.ts +56 -0
- package/dist/src/core/Loading/loading.type.d.ts +2 -2
- package/dist/src/core/LocalUpload/LocalUpload.d.ts +15 -0
- package/dist/src/core/LocalUpload/LocalUpload.hooks.d.ts +32 -0
- package/dist/src/core/LocalUpload/LocalUpload.style.d.ts +3 -0
- package/dist/src/core/LocalUpload/LocalUpload.type.d.ts +179 -0
- package/dist/src/core/LocalUpload/LocalUpload.widget.d.ts +23 -0
- package/dist/src/core/LocalUpload/index.d.ts +2 -0
- package/dist/src/core/MediumDialog/MediumDialog.d.ts +3 -0
- package/dist/src/core/MediumDialog/MediumDialog.type.d.ts +53 -0
- package/dist/src/core/MediumDialog/index.d.ts +1 -0
- package/dist/src/core/Metric/index.d.ts +1 -0
- package/dist/src/core/Metric/metric.d.ts +1 -1
- package/dist/src/core/Nav/nav.type.d.ts +2 -0
- package/dist/src/core/Pagination/pagination.type.d.ts +1 -0
- package/dist/src/core/Progress/progress.type.d.ts +4 -0
- package/dist/src/core/Radio/index.d.ts +3 -1
- package/dist/src/core/Radio/radio.type.d.ts +2 -0
- package/dist/src/core/SearchInput/SearchInput.d.ts +2 -0
- package/dist/src/core/SearchInput/SearchInput.hook.d.ts +9 -0
- package/dist/src/core/SearchInput/SearchInput.style.d.ts +5 -0
- package/dist/src/core/SearchInput/__test__/SearchInput.hook.test.d.ts +1 -0
- package/dist/src/core/SearchInput/index.d.ts +2 -4
- package/dist/src/core/SearchInput/searchInput.type.d.ts +149 -2
- package/dist/src/core/SegmentControl/__test__/data-testid.test.d.ts +1 -0
- package/dist/src/core/SegmentControl/segmentControl.type.d.ts +2 -0
- package/dist/src/core/Select/index.d.ts +1 -0
- package/dist/src/core/Select/select.style.d.ts +4 -0
- package/dist/src/core/Select/select.type.d.ts +6 -31
- package/dist/src/core/Select/select.widgets.d.ts +7 -0
- package/dist/src/core/SimplePagination/simplePagination.type.d.ts +1 -0
- package/dist/src/core/Skeleton/Content.d.ts +8 -0
- package/dist/src/core/Skeleton/index.d.ts +8 -0
- package/dist/src/core/SmallDialog/SmallDialog.d.ts +3 -0
- package/dist/src/core/SmallDialog/SmallDialog.style.d.ts +7 -0
- package/dist/src/core/SmallDialog/SmallDialog.type.d.ts +183 -0
- package/dist/src/core/SmallDialog/SmallDialog.widget.d.ts +8 -0
- package/dist/src/core/SmallDialog/index.d.ts +3 -0
- package/dist/src/core/StepProgress/stepProgress.type.d.ts +1 -0
- package/dist/src/core/Steps/steps.type.d.ts +1 -0
- package/dist/src/core/Styled/index.d.ts +7 -0
- package/dist/src/core/Switch/switch.type.d.ts +1 -0
- package/dist/src/core/Tab/Tab.d.ts +3 -0
- package/dist/src/core/Tab/Tab.style.d.ts +5 -0
- package/dist/src/core/Tab/Tab.type.d.ts +46 -0
- package/dist/src/core/Tab/index.d.ts +1 -0
- package/dist/src/core/Tab/useTabAdaptiveLayout.d.ts +23 -0
- package/dist/src/core/Table/table.type.d.ts +166 -7
- package/dist/src/core/TableForm/types.d.ts +260 -10
- package/dist/src/core/TextArea/textArea.type.d.ts +1 -0
- package/dist/src/core/Time/index.d.ts +1 -1
- package/dist/src/core/Time/time.type.d.ts +5 -0
- package/dist/src/core/TimePicker/index.d.ts +2 -0
- package/dist/src/core/TimeZoneSelect/timeZoneSelect.type.d.ts +1 -0
- package/dist/src/core/Timeline/Timeline.style.d.ts +5 -0
- package/dist/src/core/Timeline/Timeline.type.d.ts +231 -0
- package/dist/src/core/Timeline/Timeline.widget.d.ts +5 -0
- package/dist/src/core/Timeline/index.d.ts +14 -0
- package/dist/src/core/Tooltip/EllipsisTooltipContent.d.ts +4 -0
- package/dist/src/core/Tooltip/index.d.ts +7 -1
- package/dist/src/core/Tooltip/tooltip.type.d.ts +22 -0
- package/dist/src/core/Truncate/index.d.ts +1 -0
- package/dist/src/core/Units/units.type.d.ts +76 -0
- package/dist/src/core/WizardDialog/index.d.ts +3 -0
- package/dist/src/core/WizardDialog/styles.d.ts +4 -0
- package/dist/src/core/WizardDialog/type.d.ts +167 -0
- package/dist/src/core/__test__/data-testid.test.d.ts +1 -0
- package/dist/src/core/index.d.ts +31 -15
- package/dist/src/core/message/index.d.ts +4 -52
- package/dist/src/core/message/message.d.ts +58 -0
- package/dist/src/core/message/useMessage.d.ts +4 -0
- package/dist/src/coreX/BarChart/index.d.ts +2 -0
- package/dist/src/coreX/CheckPointList/checkpointlist.style.d.ts +3 -0
- package/dist/src/coreX/CheckPointList/checkpointlist.type.d.ts +113 -0
- package/dist/src/coreX/CheckPointList/index.d.ts +8 -0
- package/dist/src/coreX/CircleLoading/index.d.ts +3 -0
- package/dist/src/coreX/Copy/CopyButton.d.ts +5 -0
- package/dist/src/coreX/Copy/CopyButton.type.d.ts +8 -0
- package/dist/src/coreX/Copy/CopyTooltip.d.ts +5 -0
- package/dist/src/coreX/Copy/CopyTooltip.typs.d.ts +16 -0
- package/dist/src/coreX/Copy/index.d.ts +2 -0
- package/dist/src/coreX/DateRangePicker/__tests__/utils.test.d.ts +1 -0
- package/dist/src/coreX/DateRangePicker/dateRangePicker.type.d.ts +14 -1
- package/dist/src/coreX/DateRangePicker/utils.d.ts +7 -0
- package/dist/src/coreX/Dialogs/DeleteDialog/DeleteDialog.d.ts +3 -0
- package/dist/src/coreX/Dialogs/DeleteDialog/DeleteDialog.type.d.ts +116 -0
- package/dist/src/coreX/Dialogs/DeleteDialog/index.d.ts +2 -0
- package/dist/src/coreX/Dialogs/RejectDialog/RejectDialog.d.ts +3 -0
- package/dist/src/coreX/Dialogs/RejectDialog/RejectDialog.type.d.ts +181 -0
- package/dist/src/coreX/Dialogs/RejectDialog/index.d.ts +2 -0
- package/dist/src/coreX/Dialogs/index.d.ts +2 -0
- package/dist/src/coreX/InfoRowList/InfoRow.d.ts +7 -0
- package/dist/src/coreX/InfoRowList/InfoRowList.d.ts +3 -0
- package/dist/src/coreX/InfoRowList/InfoRowList.type.d.ts +63 -0
- package/dist/src/coreX/InfoRowList/index.d.ts +1 -0
- package/dist/src/coreX/KubeConfigModal/KubeConfigModal.style.d.ts +9 -0
- package/dist/src/coreX/KubeConfigModal/KubeConfigModal.type.d.ts +21 -0
- package/dist/src/coreX/KubeConfigModal/index.d.ts +4 -0
- package/dist/src/coreX/KubeConfigModal/utils.d.ts +2 -0
- package/dist/src/coreX/OverflowTooltip/overflowTooltip.type.d.ts +2 -1
- package/dist/src/coreX/Show/index.d.ts +3 -0
- package/dist/src/coreX/Show/show.type.d.ts +13 -0
- package/dist/src/coreX/Sider/Sider.type.d.ts +42 -0
- package/dist/src/coreX/Sider/index.d.ts +5 -0
- package/dist/src/coreX/SummaryTable/index.d.ts +1 -0
- package/dist/src/coreX/UnderlineTootip/index.d.ts +43 -0
- package/dist/src/coreX/UnitWithChart/index.d.ts +1 -0
- package/dist/src/coreX/index.d.ts +15 -0
- package/dist/src/hooks/__tests__/useCTErrorMsg.test.d.ts +1 -0
- package/dist/src/hooks/__tests__/useFormatDuration.test.d.ts +1 -0
- package/dist/src/hooks/index.d.ts +2 -0
- package/dist/src/hooks/useAntdPatchEnLocales.d.ts +431 -0
- package/dist/src/hooks/useCTErrorMsg.d.ts +7 -0
- package/dist/src/hooks/useFormatDuration.d.ts +31 -0
- package/dist/src/hooks/useLegacyComponentWarning.d.ts +2 -0
- package/dist/src/spec/base.d.ts +4 -2
- package/dist/src/store/modal.d.ts +8 -2
- package/dist/src/styles/token/animation.d.ts +6 -0
- package/dist/src/styles/token/color.d.ts +24 -0
- package/dist/src/utils/__test__/cterror.test.d.ts +1 -0
- package/dist/src/utils/__test__/formatDuration.spec.d.ts +1 -0
- package/dist/src/utils/__test__/unit.spec.d.ts +1 -0
- package/dist/src/utils/constants.d.ts +2 -6
- package/dist/src/utils/cterror.d.ts +29 -0
- package/dist/src/utils/formatDuration.d.ts +28 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/tower.d.ts +13 -0
- package/dist/src/utils/type.d.ts +32 -0
- package/dist/src/utils/unit.d.ts +14 -0
- package/dist/stories/docs/core/Alert.stories.d.ts +1 -0
- package/dist/stories/docs/core/Antd5Tree.stories.d.ts +44 -0
- package/dist/stories/docs/core/Arch.stories.d.ts +3 -0
- package/dist/stories/docs/core/AutoComplete.stories.d.ts +43 -0
- package/dist/stories/docs/core/Banner.stories.d.ts +53 -0
- package/dist/stories/docs/core/BasicCTError.stories.d.ts +47 -0
- package/dist/stories/docs/core/Bit.stories.d.ts +3 -0
- package/dist/stories/docs/core/BitPerSecond.stories.d.ts +3 -0
- package/dist/stories/docs/core/BlankState.stories.d.ts +43 -0
- package/dist/stories/docs/core/Bps.stories.d.ts +3 -0
- package/dist/stories/docs/core/Button.stories.d.ts +11 -0
- package/dist/stories/docs/core/Byte.stories.d.ts +3 -0
- package/dist/stories/docs/core/BytePerSecond.stories.d.ts +20 -0
- package/dist/stories/docs/core/Card.stories.d.ts +1 -0
- package/dist/stories/docs/core/Duration.stories.d.ts +88 -0
- package/dist/stories/docs/core/EllipsisTooltipContent.stories.d.ts +24 -0
- package/dist/stories/docs/core/FieldsBoolean.stories.d.ts +2 -0
- package/dist/stories/docs/core/FieldsDateTimeRange.stories.d.ts +1 -0
- package/dist/stories/docs/core/FieldsString.stories.d.ts +4 -0
- package/dist/stories/docs/core/FieldsTimePicker.stories.d.ts +2 -0
- package/dist/stories/docs/core/Frequency.stories.d.ts +3 -0
- package/dist/stories/docs/core/ImmersiveDialog.stories.d.ts +180 -0
- package/dist/stories/docs/core/Input.simple.stories.d.ts +1 -3
- package/dist/stories/docs/core/InputPassword.stories.d.ts +1 -3
- package/dist/stories/docs/core/KitStoreProvider.stories.d.ts +1 -1
- package/dist/stories/docs/core/LegacyModal.stories.d.ts +23 -0
- package/dist/stories/docs/core/{Select.Simple.stories.d.ts → LegacySelect.Simple.stories.d.ts} +3 -3
- package/dist/stories/docs/core/LegacySelect.stories.d.ts +16 -0
- package/dist/stories/docs/core/Legend.stories.d.ts +19 -0
- package/dist/stories/docs/core/LineChart.stories.d.ts +17 -0
- package/dist/stories/docs/core/Loading.stories.d.ts +2 -2
- package/dist/stories/docs/core/LocalUpload.stories.d.ts +74 -0
- package/dist/stories/docs/core/MediumDialog.stories.d.ts +85 -0
- package/dist/stories/docs/core/Percent.stories.d.ts +5 -0
- package/dist/stories/docs/core/SearchInput.stories.d.ts +52 -14
- package/dist/stories/docs/core/Second.stories.d.ts +57 -22
- package/dist/stories/docs/core/Select.stories.d.ts +94 -13
- package/dist/stories/docs/core/Sider.stories.d.ts +21 -0
- package/dist/stories/docs/core/SmallDialog.stories.d.ts +124 -0
- package/dist/stories/docs/core/Speed.stories.d.ts +3 -0
- package/dist/stories/docs/core/StatusCapsule.stories.d.ts +8 -0
- package/dist/stories/docs/core/Tab.stories.d.ts +65 -0
- package/dist/stories/docs/core/Table.stories.d.ts +35 -34
- package/dist/stories/docs/core/TableForm.stories.d.ts +61 -12
- package/dist/stories/docs/core/Timeline.stories.d.ts +41 -0
- package/dist/stories/docs/core/Tooltip.stories.d.ts +3 -1
- package/dist/stories/docs/core/WizardDialog.stories.d.ts +175 -0
- package/dist/stories/docs/core/message-group.stories.d.ts +5 -0
- package/dist/stories/docs/core/skeleton.stories.d.ts +13 -0
- package/dist/stories/docs/coreX/BarChart.stories.d.ts +1 -0
- package/dist/stories/docs/coreX/Calendar.stories.d.ts +11 -0
- package/dist/stories/docs/coreX/CheckPointList.stories.d.ts +82 -0
- package/dist/stories/docs/coreX/CircleLoading.stories.d.ts +20 -0
- package/dist/stories/docs/coreX/Copy/CopyButton.stories.d.ts +66 -0
- package/dist/stories/docs/coreX/Copy/CopyTooltip.stories.d.ts +66 -0
- package/dist/stories/docs/coreX/DateRangePicker.stories.d.ts +2 -0
- package/dist/stories/docs/coreX/Dialogs/DeleteDialog.stories.d.ts +49 -0
- package/dist/stories/docs/coreX/Dialogs/RejectDialog.stories.d.ts +103 -0
- package/dist/stories/docs/coreX/I18nNameTag.stories.d.ts +8 -0
- package/dist/stories/docs/coreX/InfoRowList.stories.d.ts +36 -0
- package/dist/stories/docs/coreX/KubeConfigModal.stories.d.ts +83 -0
- package/dist/stories/docs/coreX/OverflowTooltip.stories.d.ts +5 -0
- package/dist/stories/docs/coreX/Show.stories.d.ts +31 -0
- package/dist/stories/docs/coreX/UnserlineTooltip.stories.d.ts +11 -0
- package/dist/stories/utils.d.ts +12 -0
- package/dist/style.css +6829 -32785
- package/dist/token.css +20 -26
- package/dist/variables.scss +26 -0
- package/docs/core/ImmersiveDialog/guide.md +298 -0
- package/docs/core/LegacyModal/migrate-guide.md +422 -0
- package/docs/core/MediumDialog/guide.md +263 -0
- package/docs/core/SearchInput/guide.md +125 -0
- package/docs/core/SmallDialog/guide.md +224 -0
- package/docs/core/Table/guide.md +199 -0
- package/docs/core/TableForm/guide.md +195 -0
- package/docs/core/WizardDialog/guide.md +322 -0
- package/docs/coreX/DeleteDialog/guide.md +161 -0
- package/docs/coreX/RejectDialog/guide.md +185 -0
- package/docs/llms.txt +169 -0
- package/package.json +17 -14
- package/README.md +0 -64
- package/dist/src/core/Modal/index.d.ts +0 -5
- package/dist/src/core/Modal/modal.type.d.ts +0 -37
- package/dist/stories/docs/core/Modal.stories.d.ts +0 -16
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { ArrowChevronLeft16BoldBlueIcon } from '@cloudtower/icons-react';
|
|
2
|
+
import { cx } from '@linaria/core';
|
|
3
|
+
import Button from '../Button/index.js';
|
|
4
|
+
import { ImmersiveDialog } from '../ImmersiveDialog/index.js';
|
|
5
|
+
import Steps from '../Steps/index.js';
|
|
6
|
+
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
7
|
+
import React__default, { useState, useMemo, useEffect } from 'react';
|
|
8
|
+
import { StepContentStyle, PrevIconStyle, StepStyle, RightPanelStyle } from './styles.js';
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __defProps = Object.defineProperties;
|
|
12
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
13
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
14
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17
|
+
var __spreadValues = (a, b) => {
|
|
18
|
+
for (var prop in b || (b = {}))
|
|
19
|
+
if (__hasOwnProp.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
if (__getOwnPropSymbols)
|
|
22
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
23
|
+
if (__propIsEnum.call(b, prop))
|
|
24
|
+
__defNormalProp(a, prop, b[prop]);
|
|
25
|
+
}
|
|
26
|
+
return a;
|
|
27
|
+
};
|
|
28
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
29
|
+
var __objRest = (source, exclude) => {
|
|
30
|
+
var target = {};
|
|
31
|
+
for (var prop in source)
|
|
32
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
if (source != null && __getOwnPropSymbols)
|
|
35
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
36
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
37
|
+
target[prop] = source[prop];
|
|
38
|
+
}
|
|
39
|
+
return target;
|
|
40
|
+
};
|
|
41
|
+
function WizardDialog(props) {
|
|
42
|
+
const _a = props, {
|
|
43
|
+
className,
|
|
44
|
+
steps,
|
|
45
|
+
step,
|
|
46
|
+
children,
|
|
47
|
+
hideSteps,
|
|
48
|
+
destroyOtherStep,
|
|
49
|
+
prevText,
|
|
50
|
+
nextText,
|
|
51
|
+
onPrevStep,
|
|
52
|
+
onNextStep,
|
|
53
|
+
onStepChange,
|
|
54
|
+
left,
|
|
55
|
+
right,
|
|
56
|
+
rightClassName,
|
|
57
|
+
okText,
|
|
58
|
+
onOk,
|
|
59
|
+
"data-testid": dataTestId
|
|
60
|
+
} = _a, restProps = __objRest(_a, [
|
|
61
|
+
"className",
|
|
62
|
+
"steps",
|
|
63
|
+
"step",
|
|
64
|
+
"children",
|
|
65
|
+
"hideSteps",
|
|
66
|
+
"destroyOtherStep",
|
|
67
|
+
"prevText",
|
|
68
|
+
"nextText",
|
|
69
|
+
"onPrevStep",
|
|
70
|
+
"onNextStep",
|
|
71
|
+
"onStepChange",
|
|
72
|
+
"left",
|
|
73
|
+
"right",
|
|
74
|
+
"rightClassName",
|
|
75
|
+
"okText",
|
|
76
|
+
"onOk",
|
|
77
|
+
"data-testid"
|
|
78
|
+
]);
|
|
79
|
+
const { t } = useParrotTranslation();
|
|
80
|
+
const [_step, _setStep] = useState(step || 0);
|
|
81
|
+
const stepVal = useMemo(() => step != null ? step : _step, [step, _step]);
|
|
82
|
+
const content = useMemo(() => {
|
|
83
|
+
var _a2;
|
|
84
|
+
if (destroyOtherStep) {
|
|
85
|
+
return ((_a2 = steps == null ? void 0 : steps[stepVal]) == null ? void 0 : _a2.children) || children;
|
|
86
|
+
}
|
|
87
|
+
return (steps == null ? void 0 : steps.map((s, index) => /* @__PURE__ */ React__default.createElement(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
key: s.title,
|
|
91
|
+
className: StepContentStyle,
|
|
92
|
+
style: {
|
|
93
|
+
display: stepVal === index ? "block" : "none"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
s.children
|
|
97
|
+
))) || children;
|
|
98
|
+
}, [children, destroyOtherStep, steps, stepVal]);
|
|
99
|
+
const _confirmText = useMemo(() => {
|
|
100
|
+
let text = okText || t("common.confirm");
|
|
101
|
+
if (steps == null ? void 0 : steps.length) {
|
|
102
|
+
text = stepVal < steps.length - 1 ? nextText || t("common.next_step") : text;
|
|
103
|
+
}
|
|
104
|
+
return text;
|
|
105
|
+
}, [okText, t, steps == null ? void 0 : steps.length, stepVal, nextText]);
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
if (step) {
|
|
108
|
+
_setStep(step);
|
|
109
|
+
}
|
|
110
|
+
}, [step]);
|
|
111
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
112
|
+
ImmersiveDialog,
|
|
113
|
+
__spreadProps(__spreadValues({
|
|
114
|
+
className,
|
|
115
|
+
"data-testid": dataTestId,
|
|
116
|
+
footerLeftAction: stepVal > 0 ? /* @__PURE__ */ React__default.createElement(
|
|
117
|
+
Button,
|
|
118
|
+
{
|
|
119
|
+
type: "link",
|
|
120
|
+
"data-testid": dataTestId ? `${dataTestId}-prev` : void 0,
|
|
121
|
+
onClick: () => {
|
|
122
|
+
const newStep = stepVal - 1;
|
|
123
|
+
_setStep(newStep);
|
|
124
|
+
onPrevStep == null ? void 0 : onPrevStep(newStep);
|
|
125
|
+
onStepChange == null ? void 0 : onStepChange(newStep);
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
/* @__PURE__ */ React__default.createElement(ArrowChevronLeft16BoldBlueIcon, { className: PrevIconStyle }),
|
|
129
|
+
prevText || t("common.prev_step")
|
|
130
|
+
) : null,
|
|
131
|
+
left: left || (steps && steps.length > 0 && !hideSteps ? /* @__PURE__ */ React__default.createElement(
|
|
132
|
+
Steps,
|
|
133
|
+
{
|
|
134
|
+
containerClassname: StepStyle,
|
|
135
|
+
current: stepVal,
|
|
136
|
+
onChange: (value) => {
|
|
137
|
+
_setStep(value);
|
|
138
|
+
onStepChange == null ? void 0 : onStepChange(value);
|
|
139
|
+
},
|
|
140
|
+
direction: "vertical",
|
|
141
|
+
stepsConfig: steps.map((s) => ({
|
|
142
|
+
title: s.title,
|
|
143
|
+
"data-testid": s["data-testid"]
|
|
144
|
+
}))
|
|
145
|
+
}
|
|
146
|
+
) : null),
|
|
147
|
+
right,
|
|
148
|
+
okText: _confirmText,
|
|
149
|
+
onOk: (e) => {
|
|
150
|
+
if (stepVal < ((steps == null ? void 0 : steps.length) || 0) - 1) {
|
|
151
|
+
const newStep = stepVal + 1;
|
|
152
|
+
const prevent = (onNextStep == null ? void 0 : onNextStep(newStep)) === false;
|
|
153
|
+
if (!prevent) {
|
|
154
|
+
_setStep(newStep);
|
|
155
|
+
onStepChange == null ? void 0 : onStepChange(newStep);
|
|
156
|
+
}
|
|
157
|
+
} else {
|
|
158
|
+
onOk == null ? void 0 : onOk(e);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
rightClassName: cx(RightPanelStyle, rightClassName)
|
|
162
|
+
}, restProps), {
|
|
163
|
+
isContentFull: false
|
|
164
|
+
}),
|
|
165
|
+
content
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { WizardDialog };
|
package/dist/esm/core/index.js
CHANGED
|
@@ -2,6 +2,8 @@ import Bit from './Bit/index.js';
|
|
|
2
2
|
import BitPerSecond from './BitPerSecond/index.js';
|
|
3
3
|
import Bps from './Bps/index.js';
|
|
4
4
|
import Byte from './Byte/index.js';
|
|
5
|
+
import BytePerSecond from './BytePerSecond/index.js';
|
|
6
|
+
import Duration from './Duration/index.js';
|
|
5
7
|
import Frequency from './Frequency/index.js';
|
|
6
8
|
import Percent from './Percent/index.js';
|
|
7
9
|
import Second from './Second/index.js';
|
|
@@ -10,12 +12,14 @@ import Speed from './Speed/index.js';
|
|
|
10
12
|
const units = {
|
|
11
13
|
Percent,
|
|
12
14
|
Byte,
|
|
15
|
+
BytePerSecond,
|
|
13
16
|
Frequency,
|
|
14
17
|
Speed,
|
|
15
18
|
Bps,
|
|
16
19
|
BitPerSecond,
|
|
17
20
|
Bit,
|
|
18
|
-
Second
|
|
21
|
+
Second,
|
|
22
|
+
Duration
|
|
19
23
|
};
|
|
20
24
|
|
|
21
|
-
export { Bit, BitPerSecond, Bps, Byte, Frequency, Percent, Second, Speed, units as Units, units };
|
|
25
|
+
export { Bit, BitPerSecond, Bps, Byte, BytePerSecond, Duration, Frequency, Percent, Second, Speed, units as Units, units };
|
|
@@ -1,182 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
|
|
4
|
-
import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled';
|
|
5
|
-
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
|
|
6
|
-
import RCNotification from '@cloudtower/rc-notification';
|
|
7
|
-
import cs from 'classnames';
|
|
8
|
-
import * as React from 'react';
|
|
1
|
+
import _message from './message.js';
|
|
2
|
+
export { DEFAULT_DURATION, attachTypeApi, getKeyThenIncreaseKey } from './message.js';
|
|
9
3
|
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __defProps = Object.defineProperties;
|
|
12
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
13
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
|
-
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
17
|
-
var __spreadValues = (a, b) => {
|
|
18
|
-
for (var prop in b || (b = {}))
|
|
19
|
-
if (__hasOwnProp.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
if (__getOwnPropSymbols)
|
|
22
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
23
|
-
if (__propIsEnum.call(b, prop))
|
|
24
|
-
__defNormalProp(a, prop, b[prop]);
|
|
25
|
-
}
|
|
26
|
-
return a;
|
|
27
|
-
};
|
|
28
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
29
|
-
let messageInstance;
|
|
30
|
-
let defaultDuration = 3;
|
|
31
|
-
let defaultTop;
|
|
32
|
-
let key = 1;
|
|
33
|
-
let localPrefixCls = "ant-message";
|
|
34
|
-
let transitionName = "move-up";
|
|
35
|
-
let getContainer;
|
|
36
|
-
let maxCount;
|
|
37
|
-
let rtl = false;
|
|
38
|
-
function getKeyThenIncreaseKey() {
|
|
39
|
-
return key++;
|
|
40
|
-
}
|
|
41
|
-
function setMessageConfig(options) {
|
|
42
|
-
if (options.top !== void 0) {
|
|
43
|
-
defaultTop = options.top;
|
|
44
|
-
messageInstance = null;
|
|
45
|
-
}
|
|
46
|
-
if (options.duration !== void 0) {
|
|
47
|
-
defaultDuration = options.duration;
|
|
48
|
-
}
|
|
49
|
-
if (options.prefixCls !== void 0) {
|
|
50
|
-
localPrefixCls = options.prefixCls;
|
|
51
|
-
}
|
|
52
|
-
if (options.getContainer !== void 0) {
|
|
53
|
-
getContainer = options.getContainer;
|
|
54
|
-
}
|
|
55
|
-
if (options.transitionName !== void 0) {
|
|
56
|
-
transitionName = options.transitionName;
|
|
57
|
-
messageInstance = null;
|
|
58
|
-
}
|
|
59
|
-
if (options.maxCount !== void 0) {
|
|
60
|
-
maxCount = options.maxCount;
|
|
61
|
-
messageInstance = null;
|
|
62
|
-
}
|
|
63
|
-
if (options.rtl !== void 0) {
|
|
64
|
-
rtl = options.rtl;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
function getRCNotificationInstance(args, callback) {
|
|
68
|
-
const prefixCls = args.prefixCls || localPrefixCls;
|
|
69
|
-
if (messageInstance) {
|
|
70
|
-
callback({
|
|
71
|
-
prefixCls,
|
|
72
|
-
instance: messageInstance
|
|
73
|
-
});
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
RCNotification.newInstance(
|
|
77
|
-
{
|
|
78
|
-
prefixCls,
|
|
79
|
-
transitionName,
|
|
80
|
-
style: { top: defaultTop },
|
|
81
|
-
// 覆盖原来的样式
|
|
82
|
-
getContainer,
|
|
83
|
-
maxCount
|
|
84
|
-
},
|
|
85
|
-
(instance) => {
|
|
86
|
-
if (messageInstance) {
|
|
87
|
-
callback({
|
|
88
|
-
prefixCls,
|
|
89
|
-
instance: messageInstance
|
|
90
|
-
});
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
messageInstance = instance;
|
|
94
|
-
callback({
|
|
95
|
-
prefixCls,
|
|
96
|
-
instance
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
const typeToIcon = {
|
|
102
|
-
info: InfoCircleFilled,
|
|
103
|
-
success: CheckCircleFilled,
|
|
104
|
-
error: CloseCircleFilled,
|
|
105
|
-
warning: ExclamationCircleFilled,
|
|
106
|
-
loading: LoadingOutlined
|
|
107
|
-
};
|
|
108
|
-
function getRCNoticeProps(args, prefixCls) {
|
|
109
|
-
const duration = args.duration !== void 0 ? args.duration : defaultDuration;
|
|
110
|
-
const IconComponent = args.type != null ? typeToIcon[args.type] : void 0;
|
|
111
|
-
const messageClass = cs(`${prefixCls}-custom-content`, {
|
|
112
|
-
[`${prefixCls}-${args.type}`]: args.type,
|
|
113
|
-
[`${prefixCls}-rtl`]: rtl === true
|
|
114
|
-
});
|
|
115
|
-
return {
|
|
116
|
-
key: args.key,
|
|
117
|
-
duration,
|
|
118
|
-
style: args.style || {},
|
|
119
|
-
className: args.className,
|
|
120
|
-
content: /* @__PURE__ */ React.createElement("div", { className: messageClass }, args.icon || IconComponent && /* @__PURE__ */ React.createElement(IconComponent, null), /* @__PURE__ */ React.createElement("span", null, args.content)),
|
|
121
|
-
onClose: args.onClose
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
function notice(args) {
|
|
125
|
-
const target = args.key || key++;
|
|
126
|
-
const closePromise = new Promise((resolve) => {
|
|
127
|
-
const callback = () => {
|
|
128
|
-
if (typeof args.onClose === "function") {
|
|
129
|
-
args.onClose();
|
|
130
|
-
}
|
|
131
|
-
return resolve(true);
|
|
132
|
-
};
|
|
133
|
-
if (document.hidden) {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
getRCNotificationInstance(args, ({ prefixCls, instance }) => {
|
|
137
|
-
instance.notice(
|
|
138
|
-
getRCNoticeProps(__spreadProps(__spreadValues({}, args), { key: target, onClose: callback }), prefixCls)
|
|
139
|
-
);
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
const result = () => {
|
|
143
|
-
if (messageInstance) {
|
|
144
|
-
messageInstance.removeNotice(target);
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
result.then = (filled, rejected) => closePromise.then(filled, rejected);
|
|
148
|
-
result.promise = closePromise;
|
|
149
|
-
return result;
|
|
150
|
-
}
|
|
151
|
-
function isArgsProps(content) {
|
|
152
|
-
return Object.prototype.toString.call(content) === "[object Object]" && !!content.content;
|
|
153
|
-
}
|
|
154
|
-
const api = {
|
|
155
|
-
open: notice,
|
|
156
|
-
config: setMessageConfig,
|
|
157
|
-
destroy() {
|
|
158
|
-
if (messageInstance) {
|
|
159
|
-
messageInstance.destroy();
|
|
160
|
-
messageInstance = null;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
function attachTypeApi(originalApi, type) {
|
|
165
|
-
originalApi[type] = (content, duration, onClose) => {
|
|
166
|
-
if (isArgsProps(content)) {
|
|
167
|
-
return originalApi.open(__spreadProps(__spreadValues({}, content), { type }));
|
|
168
|
-
}
|
|
169
|
-
if (typeof duration === "function") {
|
|
170
|
-
onClose = duration;
|
|
171
|
-
duration = void 0;
|
|
172
|
-
}
|
|
173
|
-
return originalApi.open({ content, duration, type, onClose });
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
["success", "info", "warning", "error", "loading"].forEach(
|
|
177
|
-
(type) => attachTypeApi(api, type)
|
|
178
|
-
);
|
|
179
|
-
api.warn = api.warning;
|
|
180
|
-
var _message = api;
|
|
181
4
|
|
|
182
|
-
|
|
5
|
+
|
|
6
|
+
export { _message as default };
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import CheckCircleFilled from '@ant-design/icons/CheckCircleFilled';
|
|
2
|
+
import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
|
|
3
|
+
import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';
|
|
4
|
+
import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled';
|
|
5
|
+
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
|
|
6
|
+
import RCNotification from '@cloudtower/rc-notification';
|
|
7
|
+
import cs from 'classnames';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { ConfigProvider } from '../ConfigProvider/index.js';
|
|
10
|
+
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __defProps = Object.defineProperties;
|
|
13
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
14
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
17
|
+
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
18
|
+
var __spreadValues = (a, b) => {
|
|
19
|
+
for (var prop in b || (b = {}))
|
|
20
|
+
if (__hasOwnProp.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
if (__getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
24
|
+
if (__propIsEnum.call(b, prop))
|
|
25
|
+
__defNormalProp(a, prop, b[prop]);
|
|
26
|
+
}
|
|
27
|
+
return a;
|
|
28
|
+
};
|
|
29
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
30
|
+
var __objRest = (source, exclude) => {
|
|
31
|
+
var target = {};
|
|
32
|
+
for (var prop in source)
|
|
33
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34
|
+
target[prop] = source[prop];
|
|
35
|
+
if (source != null && __getOwnPropSymbols)
|
|
36
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
37
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
38
|
+
target[prop] = source[prop];
|
|
39
|
+
}
|
|
40
|
+
return target;
|
|
41
|
+
};
|
|
42
|
+
const DEFAULT_DURATION = 3;
|
|
43
|
+
const ConfigProviderWrapper = (props) => {
|
|
44
|
+
const _a = props, { children } = _a, configProps = __objRest(_a, ["children"]);
|
|
45
|
+
return /* @__PURE__ */ React.createElement(ConfigProvider, __spreadValues({}, configProps), children);
|
|
46
|
+
};
|
|
47
|
+
let messageInstance;
|
|
48
|
+
let defaultDuration = DEFAULT_DURATION;
|
|
49
|
+
let defaultTop;
|
|
50
|
+
let key = 1;
|
|
51
|
+
let localPrefixCls = "ant-message";
|
|
52
|
+
let transitionName = "move-up";
|
|
53
|
+
let getContainer;
|
|
54
|
+
let maxCount;
|
|
55
|
+
let rtl = false;
|
|
56
|
+
let globalConfigProviderProps = null;
|
|
57
|
+
function getKeyThenIncreaseKey() {
|
|
58
|
+
return key++;
|
|
59
|
+
}
|
|
60
|
+
function setMessageConfig(options) {
|
|
61
|
+
if (options.top !== void 0) {
|
|
62
|
+
defaultTop = options.top;
|
|
63
|
+
messageInstance = null;
|
|
64
|
+
}
|
|
65
|
+
if (options.duration !== void 0) {
|
|
66
|
+
defaultDuration = options.duration;
|
|
67
|
+
}
|
|
68
|
+
if (options.prefixCls !== void 0) {
|
|
69
|
+
localPrefixCls = options.prefixCls;
|
|
70
|
+
}
|
|
71
|
+
if (options.getContainer !== void 0) {
|
|
72
|
+
getContainer = options.getContainer;
|
|
73
|
+
}
|
|
74
|
+
if (options.transitionName !== void 0) {
|
|
75
|
+
transitionName = options.transitionName;
|
|
76
|
+
messageInstance = null;
|
|
77
|
+
}
|
|
78
|
+
if (options.maxCount !== void 0) {
|
|
79
|
+
maxCount = options.maxCount;
|
|
80
|
+
messageInstance = null;
|
|
81
|
+
}
|
|
82
|
+
if (options.rtl !== void 0) {
|
|
83
|
+
rtl = options.rtl;
|
|
84
|
+
}
|
|
85
|
+
if (options.configProviderProps !== void 0) {
|
|
86
|
+
globalConfigProviderProps = options.configProviderProps;
|
|
87
|
+
messageInstance = null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function getRCNotificationInstance(args, callback) {
|
|
91
|
+
const prefixCls = args.prefixCls || localPrefixCls;
|
|
92
|
+
if (messageInstance) {
|
|
93
|
+
callback({
|
|
94
|
+
prefixCls,
|
|
95
|
+
instance: messageInstance
|
|
96
|
+
});
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
RCNotification.newInstance(
|
|
100
|
+
{
|
|
101
|
+
prefixCls,
|
|
102
|
+
transitionName,
|
|
103
|
+
style: { top: defaultTop },
|
|
104
|
+
// 覆盖原来的样式
|
|
105
|
+
getContainer,
|
|
106
|
+
maxCount
|
|
107
|
+
},
|
|
108
|
+
(instance) => {
|
|
109
|
+
if (messageInstance) {
|
|
110
|
+
callback({
|
|
111
|
+
prefixCls,
|
|
112
|
+
instance: messageInstance
|
|
113
|
+
});
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
messageInstance = instance;
|
|
117
|
+
callback({
|
|
118
|
+
prefixCls,
|
|
119
|
+
instance
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
const typeToIcon = {
|
|
125
|
+
info: InfoCircleFilled,
|
|
126
|
+
success: CheckCircleFilled,
|
|
127
|
+
error: CloseCircleFilled,
|
|
128
|
+
warning: ExclamationCircleFilled,
|
|
129
|
+
loading: LoadingOutlined
|
|
130
|
+
};
|
|
131
|
+
function getRCNoticeProps(args, prefixCls) {
|
|
132
|
+
const duration = args.duration !== void 0 ? args.duration : defaultDuration;
|
|
133
|
+
const IconComponent = args.type != null ? typeToIcon[args.type] : void 0;
|
|
134
|
+
const messageClass = cs(`${prefixCls}-custom-content`, {
|
|
135
|
+
[`${prefixCls}-${args.type}`]: args.type,
|
|
136
|
+
[`${prefixCls}-rtl`]: rtl === true
|
|
137
|
+
});
|
|
138
|
+
const wrappedContent = globalConfigProviderProps ? /* @__PURE__ */ React.createElement(ConfigProviderWrapper, __spreadValues({}, globalConfigProviderProps), /* @__PURE__ */ React.createElement("div", { className: messageClass }, args.icon || IconComponent && /* @__PURE__ */ React.createElement(IconComponent, null), /* @__PURE__ */ React.createElement("span", null, args.content))) : /* @__PURE__ */ React.createElement("div", { className: messageClass }, args.icon || IconComponent && /* @__PURE__ */ React.createElement(IconComponent, null), /* @__PURE__ */ React.createElement("span", null, args.content));
|
|
139
|
+
return {
|
|
140
|
+
key: args.key,
|
|
141
|
+
duration,
|
|
142
|
+
style: args.style || {},
|
|
143
|
+
className: args.className,
|
|
144
|
+
content: wrappedContent,
|
|
145
|
+
onClose: args.onClose
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function notice(args) {
|
|
149
|
+
const target = args.key || key++;
|
|
150
|
+
const closePromise = new Promise((resolve) => {
|
|
151
|
+
const callback = () => {
|
|
152
|
+
if (typeof args.onClose === "function") {
|
|
153
|
+
args.onClose();
|
|
154
|
+
}
|
|
155
|
+
return resolve(true);
|
|
156
|
+
};
|
|
157
|
+
if (document.hidden) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
getRCNotificationInstance(args, ({ prefixCls, instance }) => {
|
|
161
|
+
instance.notice(
|
|
162
|
+
getRCNoticeProps(
|
|
163
|
+
__spreadProps(__spreadValues({}, args), { key: target, onClose: callback }),
|
|
164
|
+
prefixCls
|
|
165
|
+
)
|
|
166
|
+
);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
const result = () => {
|
|
170
|
+
if (messageInstance) {
|
|
171
|
+
messageInstance.removeNotice(target);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
result.then = (filled, rejected) => closePromise.then(filled, rejected);
|
|
175
|
+
result.promise = closePromise;
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
178
|
+
function isArgsProps(content) {
|
|
179
|
+
return Object.prototype.toString.call(content) === "[object Object]" && !!content.content;
|
|
180
|
+
}
|
|
181
|
+
const api = {
|
|
182
|
+
open: notice,
|
|
183
|
+
config: setMessageConfig,
|
|
184
|
+
destroy() {
|
|
185
|
+
if (messageInstance) {
|
|
186
|
+
messageInstance.destroy();
|
|
187
|
+
messageInstance = null;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
function attachTypeApi(originalApi, type) {
|
|
192
|
+
originalApi[type] = (content, duration, onClose) => {
|
|
193
|
+
if (isArgsProps(content)) {
|
|
194
|
+
return originalApi.open(__spreadProps(__spreadValues({}, content), { type }));
|
|
195
|
+
}
|
|
196
|
+
if (typeof duration === "function") {
|
|
197
|
+
onClose = duration;
|
|
198
|
+
duration = void 0;
|
|
199
|
+
}
|
|
200
|
+
return originalApi.open({ content, duration, type, onClose });
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
["success", "info", "warning", "error", "loading"].forEach(
|
|
204
|
+
(type) => attachTypeApi(api, type)
|
|
205
|
+
);
|
|
206
|
+
api.warn = api.warning;
|
|
207
|
+
var _message = api;
|
|
208
|
+
|
|
209
|
+
export { DEFAULT_DURATION, attachTypeApi, _message as default, getKeyThenIncreaseKey };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DEFAULT_DURATION } from '../message/message.js';
|
|
2
|
+
|
|
1
3
|
var __defProp = Object.defineProperty;
|
|
2
4
|
var __defProps = Object.defineProperties;
|
|
3
5
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -135,7 +137,7 @@ function normalizeContent(args, type) {
|
|
|
135
137
|
}
|
|
136
138
|
return {
|
|
137
139
|
content: c,
|
|
138
|
-
duration: typeof args[1] === "number" ? args[1] :
|
|
140
|
+
duration: typeof args[1] === "number" ? args[1] : DEFAULT_DURATION,
|
|
139
141
|
type: type === "warn" ? "warning" : type
|
|
140
142
|
};
|
|
141
143
|
}
|