@unicom-cloud/ui 0.8.112 → 0.8.114
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 +2 -2
- package/Alert.js +2 -2
- package/AutoComplete.js +1 -1
- package/BackTop.js +3 -3
- package/Badge.js +2 -2
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +3 -47
- package/Countdown.js +17 -51
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +15 -51
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +2 -2
- package/Empty.js +1 -1
- package/Flex.js +16 -52
- package/Form.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/LiquidFill.js +17 -52
- package/List.js +1 -1
- package/Loading.js +15 -51
- package/Marquee.js +24 -46
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +2 -2
- package/Modal.js +1 -1
- package/Notice.js +14 -50
- package/Notification.js +2 -2
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/QrCode.js +16 -53
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +2 -2
- package/Result.js +1 -1
- package/RichText.js +12 -13
- package/Segmented.js +16 -51
- package/Skeleton.js +1 -1
- package/Slider.js +2 -2
- package/Space.js +16 -52
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +2 -2
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Tour.js +18 -54
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +3 -3
- package/affix/index.js +2 -2
- package/alert/index.js +2 -2
- package/anchor/Anchor.js +3 -3
- package/anchor/Link.js +1 -1
- package/app/App.js +2 -2
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +3 -3
- package/badge/Count.js +1 -1
- package/badge/index.js +2 -2
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +2 -2
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +1 -1
- package/cascader/Cascader.js +3 -3
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{BiZSULcr.js → BGb_jT2S.js} +640 -672
- package/chunk/{C6A94b7f.js → BcWPf1id.js} +1 -1
- package/chunk/BcdTSJks.js +48 -0
- package/chunk/{CrOzsnI0.js → Bl3hZtxi.js} +1 -1
- package/chunk/{RjJoagzL.js → CEAeR6xB.js} +1 -1
- package/chunk/{Cx92e1S8.js → CKojyqln.js} +5 -5
- package/chunk/{C3kH2ES3.js → CRgtPpMG.js} +1 -1
- package/chunk/CVMFAeSw.js +39 -0
- package/chunk/{0BhDjhcd.js → CVjWKHBo.js} +1 -1
- package/chunk/{DfbO4QTS.js → CYPFoLks.js} +4 -4
- package/chunk/{BfVlSL8A.js → Ch4iApRQ.js} +4 -4
- package/chunk/ClNkxEcR.js +154 -0
- package/chunk/{CYssV-zz.js → Cs9GrNJa.js} +66 -100
- package/chunk/{DfUcAhyT.js → CwLSam2p.js} +2 -2
- package/chunk/CxbF1opI.js +231 -0
- package/chunk/Cy26_CKq.js +33 -0
- package/chunk/{CRdegvoa.js → D3F0iWPu.js} +1 -1
- package/chunk/{CylbdYce.js → D6I1_o6O.js} +1 -1
- package/chunk/{CtCFA4ht.js → DPDyV8yt.js} +4 -4
- package/chunk/{B--6x-RL.js → DQ8_XXrH.js} +1 -1
- package/chunk/{hc_ufgVf.js → DmHIX8hU.js} +166 -121
- package/chunk/{C1vY8016.js → DstheLSK.js} +79 -110
- package/chunk/{KPBMJlOB.js → HFPyZ48d.js} +37 -35
- package/chunk/{DhAvt6tJ.js → efH9HX0H.js} +3 -3
- package/chunk/exc7v_Hl.js +53 -0
- package/chunk/gJsdBcpG.js +10 -0
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +22 -66
- package/countdown/index.js +42 -76
- package/date-picker/Picker.js +1 -1
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +1 -1
- package/details/index.js +47 -83
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +89 -93
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +2 -2
- package/empty/index.js +1 -1
- package/flex/index.js +38 -72
- package/form/Control.js +115 -103
- package/form/Form.js +2 -2
- package/form/FormItem.js +2 -2
- package/form/index.js +1 -1
- package/form/promisify.js +10 -19
- package/form/store.js +3 -3
- package/form/util.js +62 -52
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/hooks/index.js +9 -9
- package/hooks/useId.js +1 -1
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/useResizeObserver.js +7 -50
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useWatermark.js +1 -1
- package/hooks/useWindowSize.js +1 -1
- package/icon/addFromIconFontCn.js +1 -1
- package/icon/index.js +2 -2
- package/icon-hover/index.js +1 -1
- package/icons/file.js +1 -1
- package/image/Image.js +3 -3
- package/image/ImagePreview.js +18 -53
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +703 -690
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +2 -2
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input/autoSizeTextAreaHeight.js +29 -20
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +2 -2
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/liquid-fill/index.js +57 -92
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/loading/index.js +27 -63
- package/locale/en-US.js +5 -3
- package/locale/tr-TR.js +5 -3
- package/marquee/index.js +71 -93
- package/marquee-/index.js +74 -96
- package/mentions/index.js +1 -1
- package/menu/Menu.js +3 -3
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +2 -2
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +5 -5
- package/modal/index.js +2 -2
- package/notice/index.js +14 -50
- package/notification/index.js +2 -2
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +1 -1
- package/overflow-ellipsis/index.js +1 -1
- package/package.json +1 -1
- package/page-header/index.js +1 -1
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/CircleProgress.js +1 -1
- package/progress/index.js +1 -1
- package/qr-code/index.js +1243 -92
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +1 -1
- package/resize-box/Split.js +2 -2
- package/resize-box/SplitGroup.js +2 -2
- package/resize-box/index.js +2 -2
- package/result/index.js +1 -1
- package/rich-text/index.js +6332 -77
- package/rich-text/lib/diff/index.d.ts +21 -0
- package/row-col/Col-.js +1 -1
- package/row-col/Col.js +1 -1
- package/row-col/Row.js +1 -1
- package/segmented/index.js +126 -161
- package/select/Option.js +44 -41
- package/select/Select.js +10 -12
- package/select-view/Core.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +2 -2
- package/slider/index.js +2 -2
- package/space/index.js +24 -60
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/splitter/Panel.js +1 -1
- package/splitter/SplitBar.js +2 -2
- package/splitter/Splitter.js +2 -2
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style.css +1 -1
- package/switch/index.js +2 -2
- package/table/Table.js +14 -53
- package/table/index.js +77 -120
- package/tabs/Tab.js +3 -3
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +1 -1
- package/tour/index.js +81 -117
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +1 -1
- package/tree/Animation.js +3 -3
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +3 -3
- package/tree-select/index.js +1 -1
- package/trigger/getPopupStyle.js +1 -1
- package/trigger/index.js +145 -145
- package/types/common/hooks/src/use-theme/index.d.ts +2 -2
- package/types/common/hooks/useStateWithPromise.d.ts +1 -1
- package/types/common/hooks/useWindowSize.d.ts +4 -4
- package/types/common/utils/dom.d.ts +13 -1
- package/types/common/utils/lodash.d.ts +2 -1
- package/types/common/utils/reactDOM.d.ts +10 -1
- package/types/common/utils/validate.d.ts +2 -1
- package/types/pc/carousel/interface.d.ts +2 -2
- package/types/pc/color-picker/Panel.d.ts +1 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/form/interface.d.ts +6 -1
- package/types/pc/form/promisify.d.ts +5 -0
- package/types/pc/form/store.d.ts +1 -1
- package/types/pc/form/util.d.ts +1 -1
- package/types/pc/index.d.ts +1 -1
- package/types/pc/input/autoSizeTextAreaHeight.d.ts +4 -2
- package/types/pc/list/interface.d.ts +2 -2
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/qr-code/examples/demo.d.ts +1 -0
- package/types/pc/qr-code/examples/download.d.ts +2 -0
- package/types/pc/qr-code/examples/full.d.ts +2 -0
- package/types/pc/qr-code/examples/image.d.ts +2 -0
- package/types/pc/qr-code/index.d.ts +2 -0
- package/types/pc/qr-code/src/index.d.ts +116 -0
- package/types/pc/qr-code/src/qrcodegen.d.ts +95 -0
- package/types/pc/qr-code/src/qrcodegen2.d.ts +325 -0
- package/types/pc/rich-text/index.d.ts +7 -4
- package/types/pc/rich-text/interface.d.ts +3 -2
- package/types/pc/rich-text/{core → lib/core}/editor.d.ts +1 -1
- package/types/pc/rich-text/{core → lib/core}/rich.d.ts +3 -7
- package/types/pc/rich-text/{core → lib/core}/selection.d.ts +1 -0
- package/types/pc/rich-text/{core.d.ts → lib/core.d.ts} +1 -1
- package/types/pc/rich-text/lib/delta/AttributeMap.d.ts +15 -0
- package/types/pc/rich-text/lib/delta/Op.d.ts +13 -0
- package/types/pc/rich-text/lib/delta/OpIterator.d.ts +14 -0
- package/types/pc/rich-text/lib/delta/index.d.ts +53 -0
- package/types/pc/rich-text/lib/diff/index.d.ts +40 -0
- package/types/pc/rich-text/{formats → lib/formats}/bold.d.ts +1 -1
- package/types/pc/rich-text/{formats → lib/formats}/font.d.ts +1 -1
- package/types/pc/rich-text/lib/formats/hr.d.ts +5 -0
- package/types/pc/rich-text/lib/formats/image-resize/index.d.ts +27 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/BaseModule.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/DisplaySize.d.ts +5 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/Resize.d.ts +13 -0
- package/types/pc/rich-text/lib/formats/image-resize/options.d.ts +7 -0
- package/types/pc/rich-text/lib/formats/liOl.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/liUl.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/lineHeight.d.ts +3 -0
- package/types/pc/rich-text/{formats → lib/formats}/list.d.ts +1 -0
- package/types/pc/rich-text/{formats → lib/formats}/table.d.ts +3 -3
- package/types/pc/rich-text/{modules → lib/modules}/clipboard.d.ts +2 -2
- package/types/pc/rich-text/{modules → lib/modules}/history.d.ts +1 -1
- package/types/pc/rich-text/{modules → lib/modules}/keyboard.d.ts +1 -1
- package/types/pc/rich-text/{modules → lib/modules}/syntax.d.ts +2 -2
- package/types/pc/rich-text/{modules → lib/modules}/tableEmbed.d.ts +3 -3
- package/types/pc/rich-text/{modules → lib/modules}/toolbar.d.ts +1 -1
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/attributor.d.ts +3 -3
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/style.d.ts +2 -2
- package/types/pc/rich-text/{ui → lib/ui}/icons.d.ts +5 -1
- package/types/pc/rich-text/{ui → lib/ui}/picker.d.ts +1 -0
- package/types/pc/tabs/hook/useDomSize.d.ts +2 -2
- package/types/pc/tabs/hook/useHeaderScroll.d.ts +2 -2
- package/types/pc/tree-select/hook/useStateValue.d.ts +2 -2
- package/types/pc/utils/date.d.ts +1 -0
- package/types/pc/utils/index.d.ts +2 -2
- package/types/pc/utils/validate.d.ts +1 -1
- package/typography/Base.js +1 -1
- package/typography/Ellipsis.js +70 -114
- package/typography/Operations.js +29 -74
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +2 -2
- package/upload/Uploader.js +1 -1
- package/upload/request_.js +1972 -41
- package/utils/PqbCSSTransition.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/date.js +1 -0
- package/utils/dom.js +1 -1
- package/utils/index.js +248 -236
- package/utils/lodash.js +33 -32
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/validate.js +15 -5
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +218 -217
- package/watermark/Watermark.js +1 -1
- package/chunk/BCmfDFV4.js +0 -4237
- package/chunk/BG6j6Ct7.js +0 -30
- package/chunk/C5CbL5ku.js +0 -56
- package/chunk/CXrVhA6-.js +0 -54
- package/chunk/DMv8Hn4u.js +0 -231
- package/chunk/DsuIQH0F.js +0 -200
- package/chunk/d1c9z8T1.js +0 -49
- package/chunk/vP3qfmKM.js +0 -84
- package/rich-text/core.js +0 -11
- package/rich-text/rich.js +0 -1347
- package/types/common/utils/index.d.ts +0 -47
- package/types/common/utils/keyboardCode.d.ts +0 -4
- package/types/common/utils/math.d.ts +0 -1
- package/types/common/utils/reactTransitionGroup.d.ts +0 -1
- package/types/common/utils/uuid.d.ts +0 -1
- package/types/pc/rich-text/delta/AttributeMap.d.ts +0 -10
- package/types/pc/rich-text/delta/Op.d.ts +0 -11
- package/types/pc/rich-text/delta/OpIterator.d.ts +0 -13
- package/types/pc/rich-text/delta/index.d.ts +0 -45
- package/types/common/hooks/src/utils/{index.d.ts → is.d.ts} +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/block.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/break.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/container.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/cursor.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/embed.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/inline.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/scroll.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/text.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/composition.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/emitter.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/instances.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/logger.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/module.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/theme.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/utils/createRegistryWithFormats.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/utils/scrollRectIntoView.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/align.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/background.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/blockquote.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/code.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/color.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/direction.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/formula.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/header.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/image.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/indent.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/italic.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/link.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/script.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/size.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/strike.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/underline.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/video.d.ts +0 -0
- package/types/pc/rich-text/{rich.d.ts → lib/index.d.ts} +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/input.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/index.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/googleDocs.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/msWord.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/table.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/uiNode.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/uploader.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/class.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/store.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/blot.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/container.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/leaf.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/parent.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/shadow.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/block.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/embed.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/inline.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/scroll.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/text.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-list.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-node.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/error.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/index.d.ts +1 -1
- /package/types/pc/rich-text/{parchment → lib/parchment}/registry.d.ts +0 -0
- /package/types/pc/rich-text/{parchment → lib/parchment}/scope.d.ts +0 -0
- /package/types/pc/rich-text/{themes → lib/themes}/base.d.ts +0 -0
- /package/types/pc/rich-text/{themes → lib/themes}/pqb.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/color-picker.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/icon-picker.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/tooltip.d.ts +0 -0
package/flex/index.js
CHANGED
|
@@ -4,60 +4,26 @@ import { UI_COMMON_PREFIX as M } from "@unicom-cloud/utils/constant/ui";
|
|
|
4
4
|
import { u as j } from "../chunk/FgWHhRFz.js";
|
|
5
5
|
import w from "@unicom-cloud/utils/class-name";
|
|
6
6
|
import "../chunk/DsaQZE4X.js";
|
|
7
|
-
import { G as N, a as S } from "../chunk/
|
|
7
|
+
import { G as N, a as S } from "../chunk/DstheLSK.js";
|
|
8
8
|
import { isBoolean as _, isArray as A, isString as h } from "@unicom-cloud/utils/is";
|
|
9
|
-
import "@unicom-cloud/utils/date";
|
|
10
|
-
import "@unicom-cloud/utils/case-name";
|
|
11
|
-
import "@unicom-cloud/utils/clipboard-copy";
|
|
12
|
-
import "../chunk/DS_deHpN.js";
|
|
13
|
-
import "../chunk/d1c9z8T1.js";
|
|
14
|
-
import "@unicom-cloud/utils/emitter";
|
|
15
|
-
import "@unicom-cloud/utils/file/fileToURL";
|
|
16
|
-
import "lodash/escapeRegExp";
|
|
17
|
-
import "lodash/isArray";
|
|
18
|
-
import "lodash/isNumber";
|
|
19
|
-
import "lodash/isString";
|
|
20
|
-
import "lodash/isFunction";
|
|
21
|
-
import "lodash/throttle";
|
|
22
|
-
import "lodash/camelCase";
|
|
23
|
-
import "lodash/capitalize";
|
|
24
|
-
import "lodash/cloneDeep";
|
|
25
|
-
import "lodash/debounce";
|
|
26
|
-
import "lodash/get";
|
|
27
|
-
import "lodash/has";
|
|
28
|
-
import "lodash/kebabCase";
|
|
29
|
-
import "lodash/merge";
|
|
30
|
-
import "lodash/mergeWith";
|
|
31
|
-
import "lodash/set";
|
|
32
|
-
import "lodash/setWith";
|
|
33
|
-
import "lodash/snakeCase";
|
|
34
|
-
import "lodash/startCase";
|
|
35
|
-
import "lodash/uniq";
|
|
36
|
-
import "lodash/upperFirst";
|
|
37
|
-
import "@unicom-cloud/utils/math";
|
|
38
|
-
import "lodash/isPlainObject";
|
|
39
|
-
import "@unicom-cloud/utils/pinyin";
|
|
40
|
-
import "../chunk/BJ9_azwQ.js";
|
|
41
|
-
import "../chunk/CXrVhA6-.js";
|
|
42
|
-
import "@unicom-cloud/utils/file/saveAs";
|
|
43
|
-
import "@unicom-cloud/utils/screenfull";
|
|
44
|
-
import "@unicom-cloud/utils/constant/ui.js";
|
|
45
|
-
import "@unicom-cloud/utils/tinycolor";
|
|
46
|
-
import "@unicom-cloud/utils/ui-color";
|
|
47
|
-
import "react-is";
|
|
48
|
-
import "@unicom-cloud/utils/tree";
|
|
49
|
-
import "uuid";
|
|
50
|
-
import "../chunk/hc_ufgVf.js";
|
|
51
|
-
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
52
9
|
import "@unicom-cloud/utils/constant/platform";
|
|
53
10
|
import "../chunk/CdXR6dj7.js";
|
|
54
11
|
import "@unicom-cloud/utils/js-cookie";
|
|
55
12
|
import "dayjs";
|
|
56
|
-
import "
|
|
13
|
+
import "lodash/debounce";
|
|
14
|
+
import "@unicom-cloud/utils/screenfull";
|
|
15
|
+
import "../chunk/ClNkxEcR.js";
|
|
16
|
+
import "lodash/throttle";
|
|
17
|
+
import "lodash/isPlainObject";
|
|
57
18
|
import "@unicom-cloud/utils/query-string";
|
|
58
19
|
import "react-router";
|
|
59
20
|
import "lodash/isEqualWith";
|
|
60
|
-
import "
|
|
21
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
22
|
+
import "lodash/isNumber";
|
|
23
|
+
import "lodash/merge";
|
|
24
|
+
import "../chunk/BcdTSJks.js";
|
|
25
|
+
import "../chunk/CEAeR6xB.js";
|
|
26
|
+
import "../chunk/exc7v_Hl.js";
|
|
61
27
|
import "@unicom-cloud/utils/constant";
|
|
62
28
|
function g(o, t, i) {
|
|
63
29
|
if (i === void 0)
|
|
@@ -72,41 +38,41 @@ const E = {
|
|
|
72
38
|
gap: "small"
|
|
73
39
|
}, u = c((o, t) => {
|
|
74
40
|
const i = j(o, E, {}), {
|
|
75
|
-
className:
|
|
41
|
+
className: e,
|
|
76
42
|
style: f,
|
|
77
43
|
flex: x,
|
|
78
44
|
gap: d,
|
|
79
45
|
children: $,
|
|
80
|
-
direction:
|
|
81
|
-
justify:
|
|
82
|
-
align:
|
|
46
|
+
direction: n,
|
|
47
|
+
justify: p,
|
|
48
|
+
align: m,
|
|
83
49
|
component: O = "div",
|
|
84
50
|
wrap: C,
|
|
85
51
|
rtl: P,
|
|
86
52
|
inline: F,
|
|
87
53
|
...b
|
|
88
|
-
} = i,
|
|
54
|
+
} = i, s = `${M}-flex`, r = {
|
|
89
55
|
display: F ? "inline-flex" : "flex"
|
|
90
56
|
};
|
|
91
57
|
if ("wrap" in i) {
|
|
92
|
-
let
|
|
93
|
-
_(
|
|
58
|
+
let l = C;
|
|
59
|
+
_(l) ? l = l ? "wrap" : "nowrap" : l = C, r.flexWrap = l;
|
|
94
60
|
}
|
|
95
|
-
return "flex" in i && (
|
|
61
|
+
return "flex" in i && (r.flex = x), m && (r.alignItems = m), p && (r.justifyContent = p), n && (r.flexDirection = n), Object.assign(r, z({}, d), f), /* @__PURE__ */ a(
|
|
96
62
|
O,
|
|
97
63
|
{
|
|
98
64
|
ref: t,
|
|
99
|
-
style:
|
|
65
|
+
style: r,
|
|
100
66
|
className: w(
|
|
101
|
-
|
|
67
|
+
s,
|
|
102
68
|
{
|
|
103
|
-
[`${
|
|
104
|
-
[`${
|
|
69
|
+
[`${s}-rtl`]: P,
|
|
70
|
+
[`${s}-inline`]: F
|
|
105
71
|
},
|
|
106
|
-
!!
|
|
107
|
-
!!
|
|
108
|
-
!!
|
|
109
|
-
|
|
72
|
+
!!n && `${s}-flex-direction-${n}`,
|
|
73
|
+
!!p && `${s}-justify-content-${p}`,
|
|
74
|
+
!!m && `${s}-align-items-${m}`,
|
|
75
|
+
e
|
|
110
76
|
),
|
|
111
77
|
...b,
|
|
112
78
|
children: $
|
|
@@ -116,8 +82,8 @@ const E = {
|
|
|
116
82
|
u.displayName = "Flex";
|
|
117
83
|
const V = c(
|
|
118
84
|
(o, t) => {
|
|
119
|
-
const { direction: i = "column", ...
|
|
120
|
-
return /* @__PURE__ */ a(u, { ...
|
|
85
|
+
const { direction: i = "column", ...e } = o;
|
|
86
|
+
return /* @__PURE__ */ a(u, { ...e, ref: t, direction: i });
|
|
121
87
|
}
|
|
122
88
|
);
|
|
123
89
|
V.displayName = "FlexVertical";
|
|
@@ -126,16 +92,16 @@ const R = Object.assign(u, {
|
|
|
126
92
|
}), B = {
|
|
127
93
|
children: void 0
|
|
128
94
|
}, y = c((o, t) => {
|
|
129
|
-
const { getPrefixCls: i, componentConfig:
|
|
95
|
+
const { getPrefixCls: i, componentConfig: e, rtl: f } = I(S), x = j(
|
|
130
96
|
o,
|
|
131
97
|
B,
|
|
132
|
-
|
|
133
|
-
), { className: d, ...$ } = x,
|
|
98
|
+
e?.Flex
|
|
99
|
+
), { className: d, ...$ } = x, n = i?.("flex");
|
|
134
100
|
return /* @__PURE__ */ a(
|
|
135
101
|
R,
|
|
136
102
|
{
|
|
137
103
|
ref: t,
|
|
138
|
-
className: w(
|
|
104
|
+
className: w(n, d),
|
|
139
105
|
rtl: f,
|
|
140
106
|
...$
|
|
141
107
|
}
|
|
@@ -143,14 +109,14 @@ const R = Object.assign(u, {
|
|
|
143
109
|
});
|
|
144
110
|
y.displayName = "Flex";
|
|
145
111
|
const G = c((o, t) => {
|
|
146
|
-
const { direction: i = "column", ...
|
|
147
|
-
return /* @__PURE__ */ a(y, { ...
|
|
112
|
+
const { direction: i = "column", ...e } = o;
|
|
113
|
+
return /* @__PURE__ */ a(y, { ...e, ref: t, direction: i });
|
|
148
114
|
});
|
|
149
115
|
G.displayName = "FlexVertical";
|
|
150
|
-
const
|
|
116
|
+
const ft = Object.assign(y, {
|
|
151
117
|
Vertical: G
|
|
152
118
|
});
|
|
153
119
|
export {
|
|
154
120
|
G as FlexVertical,
|
|
155
|
-
|
|
121
|
+
ft as default
|
|
156
122
|
};
|
package/form/Control.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as m, jsxs as I } from "react/jsx-runtime";
|
|
2
2
|
import E from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
3
3
|
import w from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
4
4
|
import b from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
@@ -7,7 +7,7 @@ import f from "lodash/get";
|
|
|
7
7
|
import V from "lodash/isArray";
|
|
8
8
|
import M from "lodash/isBoolean";
|
|
9
9
|
import S from "lodash/isEqualWith";
|
|
10
|
-
import
|
|
10
|
+
import p from "lodash/isFunction";
|
|
11
11
|
import U from "lodash/isNil";
|
|
12
12
|
import k from "lodash/set";
|
|
13
13
|
import F, { Component as N, isValidElement as P } from "react";
|
|
@@ -16,96 +16,108 @@ import C from "../utils/warning.js";
|
|
|
16
16
|
import { FormItemContext as W } from "./context.js";
|
|
17
17
|
import { isFieldMatch as v, schemaValidate as x, isSyntheticEvent as $, ID_INPUT_SUFFIX as _ } from "./util.js";
|
|
18
18
|
class it extends N {
|
|
19
|
-
constructor(l,
|
|
19
|
+
constructor(l, u) {
|
|
20
20
|
super(l), this.errors = null, this.warnings = null, this.isDestroyed = !1, this.childrenElement = null, this.triggerStateCollect = () => {
|
|
21
|
-
const { innerCollectFormState:
|
|
22
|
-
|
|
23
|
-
}, this.toggleValidateStatus = (
|
|
24
|
-
this.validateStatus =
|
|
25
|
-
}, this.toggleTouched = (
|
|
26
|
-
this.touched = M(
|
|
27
|
-
}, this.setWarnings = (
|
|
28
|
-
this.warnings =
|
|
29
|
-
}, this.setErrors = (
|
|
30
|
-
this.errors =
|
|
31
|
-
}, this.getErrors = () => this.errors, this.getWarnings = () => this.warnings || [], this.isTouched = () => this.touched, this.getValidateStatus = () => this.props.validateStatus ? this.props.validateStatus : this.validateStatus, this.hasFieldProps = () => !!this.props.field, this.clearFormItemError = (
|
|
32
|
-
const { updateFormItem:
|
|
33
|
-
|
|
21
|
+
const { innerCollectFormState: t } = this.context.store.getInnerMethods(!0);
|
|
22
|
+
t();
|
|
23
|
+
}, this.toggleValidateStatus = (t) => {
|
|
24
|
+
this.validateStatus = t, this.triggerStateCollect();
|
|
25
|
+
}, this.toggleTouched = (t) => {
|
|
26
|
+
this.touched = M(t) ? t : !this.touched, this.triggerStateCollect();
|
|
27
|
+
}, this.setWarnings = (t) => {
|
|
28
|
+
this.warnings = t, this.triggerStateCollect();
|
|
29
|
+
}, this.setErrors = (t) => {
|
|
30
|
+
this.errors = t, this.triggerStateCollect();
|
|
31
|
+
}, this.getErrors = () => this.errors, this.getWarnings = () => this.warnings || [], this.isTouched = () => this.touched, this.getValidateStatus = () => this.props.validateStatus ? this.props.validateStatus : this.validateStatus, this.hasFieldProps = () => !!this.props.field, this.clearFormItemError = (t = this.props.field) => {
|
|
32
|
+
const { updateFormItem: e } = this.context;
|
|
33
|
+
e?.(t, { errors: null, warnings: null });
|
|
34
34
|
}, this.updateFormItem = () => {
|
|
35
35
|
if (this.isDestroyed) return;
|
|
36
36
|
this.forceUpdate();
|
|
37
|
-
const { updateFormItem:
|
|
38
|
-
|
|
37
|
+
const { updateFormItem: t } = this.context;
|
|
38
|
+
t?.(this.props.field, {
|
|
39
39
|
errors: this.errors,
|
|
40
40
|
warnings: this.warnings
|
|
41
41
|
});
|
|
42
42
|
}, this.getFieldValue = () => {
|
|
43
|
-
const
|
|
44
|
-
return
|
|
45
|
-
}, this.onStoreChange = (
|
|
46
|
-
const i = V(
|
|
47
|
-
if (
|
|
48
|
-
V(
|
|
49
|
-
else if (
|
|
43
|
+
const t = this.props.field, e = this.context.store;
|
|
44
|
+
return t ? e.getInnerMethods(!0).innerGetFieldValue(t) : void 0;
|
|
45
|
+
}, this.onStoreChange = (t, e) => {
|
|
46
|
+
const i = V(e.field) ? e.field : [e.field], { field: o, shouldUpdate: s, dependencies: r } = this.props, a = (d) => {
|
|
47
|
+
if (r && s && C(!0, "`shouldUpdate` of the `Form.Item` will be ignored."), r)
|
|
48
|
+
V(r) && r.some((n) => v(n, i)) && this.isTouched() && this.validateField();
|
|
49
|
+
else if (s) {
|
|
50
50
|
let n = !1;
|
|
51
|
-
|
|
52
|
-
field:
|
|
53
|
-
...
|
|
54
|
-
}) : n = !S(
|
|
51
|
+
p(s) ? n = s(e.prev, e.current, {
|
|
52
|
+
field: e.field,
|
|
53
|
+
...d
|
|
54
|
+
}) : n = !S(e.prev, e.current), n && this.updateFormItem();
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
switch (
|
|
57
|
+
switch (t) {
|
|
58
58
|
case "reset":
|
|
59
|
-
this.toggleTouched(!1), this.toggleValidateStatus(void 0), this.setErrors(null), this.setWarnings(null),
|
|
59
|
+
this.toggleTouched(!1), this.toggleValidateStatus(void 0), this.setErrors(null), this.setWarnings(null), r || s ? a() : this.updateFormItem();
|
|
60
60
|
break;
|
|
61
61
|
case "innerSetValue":
|
|
62
|
-
if (v(
|
|
62
|
+
if (v(o, i)) {
|
|
63
63
|
this.toggleTouched(!0), this.updateFormItem();
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
a({
|
|
67
67
|
isInner: !0,
|
|
68
|
-
isFormList:
|
|
68
|
+
isFormList: e.isFormList
|
|
69
69
|
});
|
|
70
70
|
break;
|
|
71
71
|
case "setFieldValue":
|
|
72
|
-
if (v(
|
|
73
|
-
this.toggleTouched(!0),
|
|
74
|
-
U(
|
|
75
|
-
),
|
|
72
|
+
if (v(o, i)) {
|
|
73
|
+
this.toggleTouched(!0), e.data && "touched" in e.data && this.toggleTouched(e.data.touched), e.data && "warnings" in e.data && this.setWarnings(
|
|
74
|
+
U(e.data.warnings) ? [] : [].concat(e.data.warnings)
|
|
75
|
+
), e.data && "errors" in e.data ? this.setErrors(e.data.errors) : S(f(e.prev, o), f(e.current, o)) || this.setErrors(null), this.updateFormItem();
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
a();
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
|
-
}, this.innerSetFieldValue = (
|
|
82
|
-
if (!
|
|
81
|
+
}, this.innerSetFieldValue = (t, e) => {
|
|
82
|
+
if (!t) return;
|
|
83
83
|
const { store: i } = this.context;
|
|
84
|
-
i.getInnerMethods(!0).innerSetFieldValue(
|
|
85
|
-
const
|
|
86
|
-
k(
|
|
84
|
+
i.getInnerMethods(!0).innerSetFieldValue(t, e);
|
|
85
|
+
const s = {};
|
|
86
|
+
k(s, t, e), this.props?.onValuesChange?.(s, {
|
|
87
87
|
...i.getFieldsValue()
|
|
88
88
|
});
|
|
89
89
|
}, this.validateFieldOnly = () => {
|
|
90
|
-
const { validateMessages: e } = this.context, { field:
|
|
91
|
-
return x(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
90
|
+
const { validateMessages: t, schemaOptions: e } = this.context, { field: i, rules: o } = this.props, s = this.getFieldValue();
|
|
91
|
+
return x(
|
|
92
|
+
i,
|
|
93
|
+
s,
|
|
94
|
+
o,
|
|
95
|
+
t,
|
|
96
|
+
e
|
|
97
|
+
).then(({ error: r, warning: a }) => Promise.resolve({ error: r, value: s, warning: a, field: i }));
|
|
98
|
+
}, this.validateField = (t) => {
|
|
99
|
+
const {
|
|
100
|
+
validateTrigger: e,
|
|
101
|
+
validateMessages: i,
|
|
102
|
+
schemaOptions: o
|
|
103
|
+
} = this.context, { field: s, rules: r, validateTrigger: a } = this.props, d = this.getFieldValue(), n = () => {
|
|
104
|
+
const c = this.errors || this.warnings?.length;
|
|
105
|
+
this.toggleValidateStatus("validating"), this.setErrors(null), this.setWarnings(null), c && this.updateFormItem();
|
|
106
|
+
}, h = t ? (r || []).filter((c) => [].concat(
|
|
107
|
+
c.validateTrigger || a || e
|
|
108
|
+
).indexOf(t) > -1) : r;
|
|
109
|
+
return h && h.length && s ? (n(), x(
|
|
110
|
+
s,
|
|
111
|
+
d,
|
|
112
|
+
h,
|
|
113
|
+
i,
|
|
114
|
+
o
|
|
115
|
+
).then(({ error: c, warning: g }) => (this.setErrors(c ? c[s] : null), this.setWarnings(g || null), this.toggleValidateStatus(
|
|
116
|
+
this.errors ? "error" : this.warnings?.length ? "warning" : "success"
|
|
117
|
+
), this.updateFormItem(), Promise.resolve({ error: c, value: d, field: s })))) : Promise.resolve({ error: null, value: d, field: s });
|
|
118
|
+
}, this.handleTrigger = (t, ...e) => {
|
|
119
|
+
const i = this.childrenElement || this.props.children, { store: o } = this.context, { field: s, trigger: r, normalize: a, getValueFromEvent: d } = this.props, n = p(d) ? d(t, ...e) : t;
|
|
120
|
+
let h = n;
|
|
109
121
|
if ($(n)) {
|
|
110
122
|
C(
|
|
111
123
|
!0,
|
|
@@ -113,23 +125,23 @@ class it extends N {
|
|
|
113
125
|
), n.stopPropagation();
|
|
114
126
|
return;
|
|
115
127
|
}
|
|
116
|
-
typeof
|
|
117
|
-
...
|
|
118
|
-
})), this.toggleTouched(!0), this.innerSetFieldValue(
|
|
128
|
+
typeof a == "function" && (h = a(n, o.getFieldValue(s), {
|
|
129
|
+
...o.getFieldsValue()
|
|
130
|
+
})), this.toggleTouched(!0), this.innerSetFieldValue(s, h), this.validateField(r), P(i) && i.props && i.props[r] && (this.props.isFormList || i.props[r](h, ...e));
|
|
119
131
|
}, this.getChild = () => {
|
|
120
|
-
const { children:
|
|
121
|
-
let i =
|
|
122
|
-
return
|
|
123
|
-
|
|
132
|
+
const { children: t } = this.props, { store: e } = this.context;
|
|
133
|
+
let i = t;
|
|
134
|
+
return p(t) && (i = t(
|
|
135
|
+
e.getFields(),
|
|
124
136
|
{
|
|
125
|
-
...
|
|
137
|
+
...e
|
|
126
138
|
},
|
|
127
139
|
this.props.isFormList && {
|
|
128
140
|
value: this.getFieldValue(),
|
|
129
141
|
onChange: this.handleTrigger
|
|
130
142
|
}
|
|
131
143
|
)), this.childrenElement = i, i;
|
|
132
|
-
}, "initialValue" in l && this.hasFieldProps() &&
|
|
144
|
+
}, "initialValue" in l && this.hasFieldProps() && u?.store?.getInnerMethods?.(!0)?.innerSetInitialValue?.(l.field, l.initialValue);
|
|
133
145
|
}
|
|
134
146
|
static {
|
|
135
147
|
this.defaultProps = {
|
|
@@ -146,8 +158,8 @@ class it extends N {
|
|
|
146
158
|
componentDidMount() {
|
|
147
159
|
const { store: l } = this.context ?? {};
|
|
148
160
|
if (l) {
|
|
149
|
-
const
|
|
150
|
-
this.removeRegisterField =
|
|
161
|
+
const u = l.getInnerMethods(!0);
|
|
162
|
+
this.removeRegisterField = u.registerField(this);
|
|
151
163
|
}
|
|
152
164
|
this.isDestroyed = !1;
|
|
153
165
|
}
|
|
@@ -162,46 +174,46 @@ class it extends N {
|
|
|
162
174
|
* 收集rules里的validateTrigger字段
|
|
163
175
|
*/
|
|
164
176
|
getValidateTrigger() {
|
|
165
|
-
const l = this.props.validateTrigger || this.context.validateTrigger || "onChange",
|
|
166
|
-
let
|
|
167
|
-
return
|
|
168
|
-
|
|
169
|
-
}), Array.from(new Set(
|
|
177
|
+
const l = this.props.validateTrigger || this.context.validateTrigger || "onChange", u = this.props.rules || [];
|
|
178
|
+
let t = [];
|
|
179
|
+
return u.map((e) => {
|
|
180
|
+
t = t.concat(e.validateTrigger || l);
|
|
181
|
+
}), Array.from(new Set(t));
|
|
170
182
|
}
|
|
171
|
-
renderControl(l,
|
|
183
|
+
renderControl(l, u) {
|
|
172
184
|
const {
|
|
173
|
-
field:
|
|
174
|
-
trigger:
|
|
185
|
+
field: t,
|
|
186
|
+
trigger: e = "onChange",
|
|
175
187
|
triggerPropName: i = "value",
|
|
176
|
-
validateStatus:
|
|
177
|
-
formatter:
|
|
178
|
-
} = this.props, { store:
|
|
188
|
+
validateStatus: o,
|
|
189
|
+
formatter: s
|
|
190
|
+
} = this.props, { store: r, disabled: a } = this.context, d = "disabled" in this.props ? this.props.disabled : a, n = F.Children.only(l), h = {
|
|
179
191
|
// used by label
|
|
180
|
-
id: D(n.props?.id || { [`${
|
|
192
|
+
id: D(n.props?.id || { [`${u}${_}`]: u })
|
|
181
193
|
};
|
|
182
|
-
this.getValidateTrigger().forEach((
|
|
183
|
-
|
|
184
|
-
this.validateField(
|
|
194
|
+
this.getValidateTrigger().forEach((g) => {
|
|
195
|
+
h[g] = (T) => {
|
|
196
|
+
this.validateField(g), n.props?.[g]?.(T);
|
|
185
197
|
};
|
|
186
|
-
}),
|
|
187
|
-
let
|
|
188
|
-
return
|
|
198
|
+
}), h[e] = this.handleTrigger, d !== void 0 && !("disabled" in n.props) && (h.disabled = d);
|
|
199
|
+
let c = f(r.getInnerMethods(!0).innerGetStore(), t);
|
|
200
|
+
return p(s) && (c = s(c)), h[i] = c, !o && this.errors && (h.error = !0), F.cloneElement(n, h);
|
|
189
201
|
}
|
|
190
202
|
render() {
|
|
191
|
-
const { noStyle: l, field:
|
|
192
|
-
let
|
|
193
|
-
const
|
|
194
|
-
return this.hasFieldProps() && !
|
|
195
|
-
|
|
196
|
-
i &&
|
|
203
|
+
const { noStyle: l, field: u, isFormList: t, hasFeedback: e } = this.props, i = this.getValidateStatus(), { prefixCls: o, getFormElementId: s } = this.context;
|
|
204
|
+
let r = this.getChild();
|
|
205
|
+
const a = this.hasFieldProps() ? s?.(u) : void 0;
|
|
206
|
+
return this.hasFieldProps() && !t && F.Children.count(r) === 1 && (r = this.renderControl(r, a)), l ? r : /* @__PURE__ */ m("div", { className: `${o}-item-control-wrapper`, children: /* @__PURE__ */ m("div", { className: `${o}-item-control`, id: a, children: /* @__PURE__ */ I("div", { className: `${o}-item-control-children`, children: [
|
|
207
|
+
r,
|
|
208
|
+
i && e && /* @__PURE__ */ I(
|
|
197
209
|
"div",
|
|
198
210
|
{
|
|
199
|
-
className: `${
|
|
211
|
+
className: `${o}-item-feedback ${o}-item-feedback-${i}`,
|
|
200
212
|
children: [
|
|
201
|
-
i === "warning" && /* @__PURE__ */
|
|
202
|
-
i === "success" && /* @__PURE__ */
|
|
203
|
-
i === "error" && /* @__PURE__ */
|
|
204
|
-
i === "validating" && /* @__PURE__ */
|
|
213
|
+
i === "warning" && /* @__PURE__ */ m(b, {}),
|
|
214
|
+
i === "success" && /* @__PURE__ */ m(E, {}),
|
|
215
|
+
i === "error" && /* @__PURE__ */ m(w, {}),
|
|
216
|
+
i === "validating" && /* @__PURE__ */ m(y, {})
|
|
205
217
|
]
|
|
206
218
|
}
|
|
207
219
|
)
|
package/form/Form.js
CHANGED
|
@@ -3,13 +3,13 @@ import "../chunk/-PX9OR3r.js";
|
|
|
3
3
|
import "lodash/isPlainObject";
|
|
4
4
|
import "lodash/merge";
|
|
5
5
|
import "react";
|
|
6
|
-
import "../chunk/
|
|
6
|
+
import "../chunk/DstheLSK.js";
|
|
7
7
|
import "../chunk/BO_5qdS_.js";
|
|
8
8
|
import "../chunk/FgWHhRFz.js";
|
|
9
9
|
import "@unicom-cloud/utils/class-name";
|
|
10
10
|
import "../chunk/BKKEev13.js";
|
|
11
11
|
import "./context.js";
|
|
12
|
-
import { F } from "../chunk/
|
|
12
|
+
import { F } from "../chunk/HFPyZ48d.js";
|
|
13
13
|
import "./util.js";
|
|
14
14
|
export {
|
|
15
15
|
F as default
|
package/form/FormItem.js
CHANGED
|
@@ -4,10 +4,10 @@ import pe from "lodash/isArray";
|
|
|
4
4
|
import ue from "lodash/isFunction";
|
|
5
5
|
import C from "lodash/isPlainObject";
|
|
6
6
|
import x from "lodash/isUndefined";
|
|
7
|
-
import { a as fe } from "../chunk/
|
|
7
|
+
import { a as fe } from "../chunk/DstheLSK.js";
|
|
8
8
|
import { u as be } from "../chunk/FgWHhRFz.js";
|
|
9
9
|
import he from "../row-col/index.js";
|
|
10
|
-
import { P as ge } from "../chunk/
|
|
10
|
+
import { P as ge } from "../chunk/DQ8_XXrH.js";
|
|
11
11
|
import S from "@unicom-cloud/utils/class-name";
|
|
12
12
|
import { o as Ce } from "../chunk/BKKEev13.js";
|
|
13
13
|
import I from "./Control.js";
|
package/form/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as v, g as V, u as R } from "../chunk/
|
|
1
|
+
import { F as v, g as V, u as R } from "../chunk/HFPyZ48d.js";
|
|
2
2
|
import { FormContext as g, FormItemContext as w, FormProviderContext as L, FormListContext as M } from "./context.js";
|
|
3
3
|
import P from "./Control.js";
|
|
4
4
|
import y from "./FormItem.js";
|
package/form/promisify.js
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
import "../chunk/DsaQZE4X.js";
|
|
2
|
-
import { isFunction as
|
|
3
|
-
class
|
|
2
|
+
import { isFunction as c } from "@unicom-cloud/utils/is";
|
|
3
|
+
class l extends Error {
|
|
4
4
|
constructor(t) {
|
|
5
|
-
super("
|
|
5
|
+
super("表单验证错误,请通过 error.errors 获取错误详情"), this.errors = {}, this.errors = t;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
function h(
|
|
9
|
-
return Object.defineProperty((...r) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (o)
|
|
16
|
-
return s(new p(o));
|
|
17
|
-
i(u);
|
|
18
|
-
};
|
|
19
|
-
return r[r.length] = l, r.length++, e.apply(this, r);
|
|
20
|
-
};
|
|
21
|
-
return new Promise(n);
|
|
22
|
-
}
|
|
23
|
-
}, "name", { value: e.name });
|
|
8
|
+
function h(r) {
|
|
9
|
+
return Object.defineProperty((...e) => c(e[e.length - 1]) ? r.apply(this, e) : new Promise((o, i) => {
|
|
10
|
+
const p = (n, s) => {
|
|
11
|
+
n ? i(new l(n)) : o(s);
|
|
12
|
+
};
|
|
13
|
+
return e[e.length] = p, e.length++, r.apply(this, e);
|
|
14
|
+
}), "name", { value: r.name });
|
|
24
15
|
}
|
|
25
16
|
export {
|
|
26
17
|
h as default
|
package/form/store.js
CHANGED
|
@@ -161,9 +161,7 @@ class J {
|
|
|
161
161
|
}).catch((n) => n).finally(() => {
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
), this.
|
|
165
|
-
this.submitStatus = t, this.innerCollectFormState(), this.notifyFormWatcher();
|
|
166
|
-
}, this.submit = () => {
|
|
164
|
+
), this.submit = () => {
|
|
167
165
|
this.toggleSubmitStatus(g.submitting);
|
|
168
166
|
const t = (e, i) => {
|
|
169
167
|
let s;
|
|
@@ -173,6 +171,8 @@ class J {
|
|
|
173
171
|
), s;
|
|
174
172
|
};
|
|
175
173
|
return this.validate(t);
|
|
174
|
+
}, this.toggleSubmitStatus = (t) => {
|
|
175
|
+
this.submitStatus = t, this.innerCollectFormState(), this.notifyFormWatcher();
|
|
176
176
|
}, this.getFieldsState = (t) => {
|
|
177
177
|
const e = {}, i = (s) => {
|
|
178
178
|
if (!s)
|