@duskmoon-dev/components 0.6.4 → 2.0.0-rc.0
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/{chunk-rd10x4gc.js → chunk-kpm1rq54.js} +9 -9
- package/dist/{chunk-fwjzvsrx.js → chunk-q5qdwm90.js} +4 -4
- package/dist/{chunk-kg46s2vk.js → chunk-yxp9gq2h.js} +11 -4
- package/dist/classes/alert.d.ts +1 -1
- package/dist/classes/auto-complete.d.ts +1 -1
- package/dist/classes/avatar.d.ts +1 -1
- package/dist/classes/badge.d.ts +1 -1
- package/dist/classes/button.d.ts +1 -1
- package/dist/classes/calendar.d.ts +1 -1
- package/dist/classes/card.d.ts +1 -1
- package/dist/classes/carousel.d.ts +1 -1
- package/dist/classes/cascader.d.ts +1 -1
- package/dist/classes/chat.d.ts +1 -1
- package/dist/classes/checkbox.d.ts +1 -1
- package/dist/classes/collapse.d.ts +1 -1
- package/dist/classes/color-picker.d.ts +1 -1
- package/dist/classes/date-picker.d.ts +1 -1
- package/dist/classes/descriptions.d.ts +1 -1
- package/dist/classes/divider.d.ts +1 -1
- package/dist/classes/dm-query.d.ts +1 -1
- package/dist/classes/dm-splitter.d.ts +1 -1
- package/dist/classes/dm-status.d.ts +1 -1
- package/dist/classes/dm-tabs.d.ts +1 -1
- package/dist/classes/drawer.d.ts +1 -1
- package/dist/classes/dropdown.d.ts +1 -1
- package/dist/classes/float-button.d.ts +1 -1
- package/dist/classes/index.d.ts +99 -99
- package/dist/classes/index.js +182 -182
- package/dist/classes/input-number.d.ts +1 -1
- package/dist/classes/input.d.ts +1 -1
- package/dist/classes/list.d.ts +1 -1
- package/dist/classes/mentions.d.ts +1 -1
- package/dist/classes/menu.d.ts +1 -1
- package/dist/classes/message.d.ts +1 -1
- package/dist/classes/notification.d.ts +1 -1
- package/dist/classes/otp-input.d.ts +1 -1
- package/dist/classes/pagination.d.ts +1 -1
- package/dist/classes/popconfirm.d.ts +1 -1
- package/dist/classes/popover.d.ts +1 -1
- package/dist/classes/progress.d.ts +1 -1
- package/dist/classes/qr-code.d.ts +1 -1
- package/dist/classes/radio.d.ts +1 -1
- package/dist/classes/rate.d.ts +1 -1
- package/dist/classes/result.d.ts +1 -1
- package/dist/classes/row.d.ts +1 -1
- package/dist/classes/segmented.d.ts +1 -1
- package/dist/classes/select.d.ts +1 -1
- package/dist/classes/skeleton.d.ts +1 -1
- package/dist/classes/slider.d.ts +1 -1
- package/dist/classes/space.d.ts +1 -1
- package/dist/classes/spin.d.ts +1 -1
- package/dist/classes/splitter.d.ts +1 -1
- package/dist/classes/steps.d.ts +1 -1
- package/dist/classes/switch.d.ts +1 -1
- package/dist/classes/tabs.d.ts +1 -1
- package/dist/classes/tag.d.ts +1 -1
- package/dist/classes/time-picker.d.ts +1 -1
- package/dist/classes/timeline.d.ts +1 -1
- package/dist/classes/tooltip.d.ts +1 -1
- package/dist/classes/tour.d.ts +1 -1
- package/dist/classes/typography.d.ts +1 -1
- package/dist/classes/upload.d.ts +1 -1
- package/dist/components/affix/Affix.d.ts +1 -1
- package/dist/components/affix/index.d.ts +2 -2
- package/dist/components/affix/index.js +1 -1
- package/dist/components/alert/Alert.d.ts +1 -1
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anchor/Anchor.d.ts +1 -1
- package/dist/components/anchor/index.d.ts +2 -2
- package/dist/components/anchor/index.js +1 -1
- package/dist/components/app/App.d.ts +2 -2
- package/dist/components/app/App.types.d.ts +3 -3
- package/dist/components/app/index.d.ts +2 -2
- package/dist/components/app/index.js +82 -82
- package/dist/components/auto-complete/AutoComplete.d.ts +1 -1
- package/dist/components/auto-complete/index.d.ts +2 -2
- package/dist/components/auto-complete/index.js +1 -1
- package/dist/components/avatar/Avatar.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/back-top/BackTop.d.ts +1 -1
- package/dist/components/back-top/index.d.ts +2 -2
- package/dist/components/back-top/index.js +1 -1
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/index.d.ts +2 -2
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +1 -1
- package/dist/components/calendar/Calendar.d.ts +1 -1
- package/dist/components/calendar/index.d.ts +2 -2
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/Card.d.ts +1 -1
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/index.d.ts +2 -2
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/cascader/Cascader.d.ts +1 -1
- package/dist/components/cascader/index.d.ts +2 -2
- package/dist/components/cascader/index.js +3 -3
- package/dist/components/chat/Chat.d.ts +1 -1
- package/dist/components/chat/Chat.types.d.ts +5 -5
- package/dist/components/chat/ChatAuthoritativeQueue.d.ts +1 -1
- package/dist/components/chat/ChatComposer.d.ts +1 -1
- package/dist/components/chat/ChatPrimitives.d.ts +1 -1
- package/dist/components/chat/ChatSessionComposer.d.ts +2 -2
- package/dist/components/chat/ChatSessionComposer.types.d.ts +6 -6
- package/dist/components/chat/ComposerAttachment.types.d.ts +1 -1
- package/dist/components/chat/ComposerDraft.types.d.ts +1 -1
- package/dist/components/chat/ComposerProvider.types.d.ts +1 -1
- package/dist/components/chat/ComposerQueue.types.d.ts +1 -1
- package/dist/components/chat/ComposerSession.types.d.ts +1 -1
- package/dist/components/chat/ComposerSettings.d.ts +1 -1
- package/dist/components/chat/ComposerSettingsMenus.d.ts +1 -1
- package/dist/components/chat/composer/CompletionList.d.ts +1 -1
- package/dist/components/chat/composer/ComposerShell.d.ts +2 -2
- package/dist/components/chat/composer/DraftLifecycle.d.ts +3 -3
- package/dist/components/chat/composer/EditorAdapter.types.d.ts +2 -2
- package/dist/components/chat/composer/PlainEditor.d.ts +1 -1
- package/dist/components/chat/composer/PlainSemanticEditor.d.ts +2 -2
- package/dist/components/chat/composer/SemanticComposer.d.ts +2 -2
- package/dist/components/chat/composer/attachments.d.ts +1 -1
- package/dist/components/chat/composer/compatibility.types.d.ts +2 -2
- package/dist/components/chat/composer/document.d.ts +1 -1
- package/dist/components/chat/composer/drafts.d.ts +1 -1
- package/dist/components/chat/composer/legacy.d.ts +1 -1
- package/dist/components/chat/composer/providers.d.ts +2 -2
- package/dist/components/chat/composer/session.d.ts +2 -2
- package/dist/components/chat/composer/useComposerAttachments.d.ts +1 -1
- package/dist/components/chat/composer/useComposerDraft.d.ts +1 -1
- package/dist/components/chat/composer/useComposerProviders.d.ts +2 -2
- package/dist/components/chat/composer/useComposerSession.d.ts +1 -1
- package/dist/components/chat/index.d.ts +26 -26
- package/dist/components/chat/index.js +246 -248
- package/dist/components/chat/rich/LexicalEditor.d.ts +1 -1
- package/dist/components/chat/rich/RichChatComposer.d.ts +1 -1
- package/dist/components/chat/rich/index.d.ts +2 -2
- package/dist/components/chat/rich/index.js +17 -47
- package/dist/components/chat/rich/nodes.d.ts +2 -2
- package/dist/components/checkbox/Checkbox.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/col/Col.d.ts +1 -1
- package/dist/components/col/index.d.ts +2 -2
- package/dist/components/col/index.js +1 -1
- package/dist/components/collapse/Collapse.d.ts +1 -1
- package/dist/components/collapse/index.d.ts +2 -2
- package/dist/components/collapse/index.js +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/color-picker/index.js +9 -9
- package/dist/components/config-provider/ConfigProvider.d.ts +1 -1
- package/dist/components/config-provider/index.d.ts +2 -2
- package/dist/components/config-provider/index.js +1 -1
- package/dist/components/console-page/ConsolePage.d.ts +1 -1
- package/dist/components/console-page/ConsolePage.types.d.ts +1 -1
- package/dist/components/console-page/index.d.ts +2 -2
- package/dist/components/console-page/index.js +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +1 -1
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/date-picker/index.js +4 -4
- package/dist/components/descriptions/Descriptions.d.ts +1 -1
- package/dist/components/descriptions/index.d.ts +2 -2
- package/dist/components/descriptions/index.js +1 -1
- package/dist/components/divider/Divider.d.ts +1 -1
- package/dist/components/divider/index.d.ts +2 -2
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dm-auxiliary/DmAuxiliary.d.ts +1 -1
- package/dist/components/dm-auxiliary/index.d.ts +2 -2
- package/dist/components/dm-auxiliary/index.js +1 -1
- package/dist/components/dm-breadcrumb/DmBreadcrumb.d.ts +1 -1
- package/dist/components/dm-breadcrumb/DmBreadcrumb.types.d.ts +1 -1
- package/dist/components/dm-breadcrumb/index.d.ts +2 -2
- package/dist/components/dm-breadcrumb/index.js +19 -19
- package/dist/components/dm-date-picker/DmDatePicker.d.ts +2 -2
- package/dist/components/dm-date-picker/DmDatePicker.types.d.ts +1 -1
- package/dist/components/dm-date-picker/index.d.ts +2 -2
- package/dist/components/dm-date-picker/index.js +101 -101
- package/dist/components/dm-drawer/DmDrawer.d.ts +1 -1
- package/dist/components/dm-drawer/DmDrawer.types.d.ts +2 -2
- package/dist/components/dm-drawer/index.d.ts +2 -2
- package/dist/components/dm-drawer/index.js +20 -20
- package/dist/components/dm-infinite-scroll/DmInfiniteScroll.d.ts +1 -1
- package/dist/components/dm-infinite-scroll/index.d.ts +2 -2
- package/dist/components/dm-infinite-scroll/index.js +1 -1
- package/dist/components/dm-layout/DmLayout.d.ts +1 -1
- package/dist/components/dm-layout/DmLayout.types.d.ts +3 -3
- package/dist/components/dm-layout/index.d.ts +2 -2
- package/dist/components/dm-layout/index.js +646 -646
- package/dist/components/dm-menu/DmMenu.d.ts +2 -2
- package/dist/components/dm-menu/DmMenu.types.d.ts +1 -1
- package/dist/components/dm-menu/index.d.ts +2 -2
- package/dist/components/dm-menu/index.js +439 -439
- package/dist/components/dm-message/DmMessage.d.ts +7 -7
- package/dist/components/dm-message/DmMessage.types.d.ts +1 -1
- package/dist/components/dm-message/index.d.ts +2 -2
- package/dist/components/dm-message/index.js +17 -17
- package/dist/components/dm-page-header/DmPageHeader.d.ts +1 -1
- package/dist/components/dm-page-header/DmPageHeader.types.d.ts +2 -2
- package/dist/components/dm-page-header/index.d.ts +2 -2
- package/dist/components/dm-page-header/index.js +482 -482
- package/dist/components/dm-pagination/DmPagination.d.ts +1 -1
- package/dist/components/dm-pagination/DmPagination.types.d.ts +2 -2
- package/dist/components/dm-pagination/index.d.ts +2 -2
- package/dist/components/dm-pagination/index.js +40 -40
- package/dist/components/dm-pro-table/DmProTable.d.ts +2 -2
- package/dist/components/dm-pro-table/DmProTable.types.d.ts +3 -3
- package/dist/components/dm-pro-table/index.d.ts +2 -2
- package/dist/components/dm-pro-table/index.js +3259 -3259
- package/dist/components/dm-provider/DmProvider.d.ts +1 -1
- package/dist/components/dm-provider/DmProvider.types.d.ts +1 -1
- package/dist/components/dm-provider/index.d.ts +2 -2
- package/dist/components/dm-provider/index.js +95 -95
- package/dist/components/dm-query/DmQuery.d.ts +1 -1
- package/dist/components/dm-query/DmQuery.types.d.ts +1 -1
- package/dist/components/dm-query/index.d.ts +2 -2
- package/dist/components/dm-query/index.js +38 -40
- package/dist/components/dm-search/DmSearch.d.ts +1 -1
- package/dist/components/dm-search/DmSearch.types.d.ts +3 -3
- package/dist/components/dm-search/index.d.ts +2 -2
- package/dist/components/dm-search/index.js +32 -32
- package/dist/components/dm-splitter/DmSplitter.d.ts +1 -1
- package/dist/components/dm-splitter/DmSplitter.types.d.ts +1 -1
- package/dist/components/dm-splitter/index.d.ts +2 -2
- package/dist/components/dm-splitter/index.js +33 -33
- package/dist/components/dm-status/DmStatus.d.ts +1 -1
- package/dist/components/dm-status/DmStatus.types.d.ts +1 -1
- package/dist/components/dm-status/index.d.ts +2 -2
- package/dist/components/dm-status/index.js +26 -26
- package/dist/components/dm-table/DmTable.d.ts +2 -2
- package/dist/components/dm-table/DmTable.types.d.ts +3 -3
- package/dist/components/dm-table/index.d.ts +2 -2
- package/dist/components/dm-table/index.js +1196 -1196
- package/dist/components/dm-tabs/DmTabs.d.ts +1 -1
- package/dist/components/dm-tabs/DmTabs.types.d.ts +1 -1
- package/dist/components/dm-tabs/index.d.ts +2 -2
- package/dist/components/dm-tabs/index.js +35 -35
- package/dist/components/dm-toolbar/DmToolbar.d.ts +1 -1
- package/dist/components/dm-toolbar/DmToolbar.types.d.ts +2 -2
- package/dist/components/dm-toolbar/index.d.ts +2 -2
- package/dist/components/dm-toolbar/index.js +36 -36
- package/dist/components/dm-tree/DmTree.d.ts +1 -1
- package/dist/components/dm-tree/DmTree.types.d.ts +2 -2
- package/dist/components/dm-tree/index.d.ts +2 -2
- package/dist/components/dm-tree/index.js +93 -93
- package/dist/components/dm-truncate/DmTruncate.d.ts +1 -1
- package/dist/components/dm-truncate/DmTruncate.types.d.ts +1 -1
- package/dist/components/dm-truncate/index.d.ts +2 -2
- package/dist/components/dm-truncate/index.js +34 -34
- package/dist/components/drawer/Drawer.d.ts +1 -1
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/index.js +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.types.d.ts +1 -1
- package/dist/components/dropdown/index.d.ts +2 -2
- package/dist/components/dropdown/index.js +94 -94
- package/dist/components/empty/Empty.d.ts +1 -1
- package/dist/components/empty/index.d.ts +2 -2
- package/dist/components/empty/index.js +1 -1
- package/dist/components/fab/Fab.d.ts +1 -1
- package/dist/components/fab/Fab.types.d.ts +1 -1
- package/dist/components/fab/index.d.ts +2 -2
- package/dist/components/fab/index.js +22 -22
- package/dist/components/flex/Flex.d.ts +1 -1
- package/dist/components/flex/index.d.ts +2 -2
- package/dist/components/flex/index.js +1 -1
- package/dist/components/float-button/FloatButton.d.ts +1 -1
- package/dist/components/float-button/index.d.ts +2 -2
- package/dist/components/float-button/index.js +1 -1
- package/dist/components/form/Form.d.ts +1 -1
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form/index.js +1 -1
- package/dist/components/grid/Grid.d.ts +1 -1
- package/dist/components/grid/Grid.types.d.ts +1 -1
- package/dist/components/grid/index.d.ts +2 -2
- package/dist/components/image/Image.d.ts +1 -1
- package/dist/components/image/index.d.ts +2 -2
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/input/index.js +1 -1
- package/dist/components/input-number/InputNumber.d.ts +1 -1
- package/dist/components/input-number/index.d.ts +2 -2
- package/dist/components/input-number/index.js +1 -1
- package/dist/components/json-schema-form/JsonSchemaForm.d.ts +1 -1
- package/dist/components/json-schema-form/JsonSchemaWidget.d.ts +1 -1
- package/dist/components/json-schema-form/index.d.ts +8 -8
- package/dist/components/json-schema-form/index.js +3791 -3791
- package/dist/components/json-schema-form/json-form-widgets.d.ts +1 -1
- package/dist/components/json-schema-form/json-schema-form.d.ts +1 -1
- package/dist/components/layout/Layout.d.ts +1 -1
- package/dist/components/layout/index.d.ts +2 -2
- package/dist/components/layout/index.js +1 -1
- package/dist/components/list/List.d.ts +1 -1
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/index.js +1 -1
- package/dist/components/markdown/Markdown.d.ts +1 -1
- package/dist/components/markdown/index.d.ts +2 -2
- package/dist/components/markdown/index.js +2 -2
- package/dist/components/megamenu/Megamenu.d.ts +1 -1
- package/dist/components/megamenu/index.d.ts +2 -2
- package/dist/components/megamenu/index.js +1 -1
- package/dist/components/mentions/Mentions.d.ts +1 -1
- package/dist/components/mentions/index.d.ts +2 -2
- package/dist/components/mentions/index.js +1 -1
- package/dist/components/menu/Menu.d.ts +1 -1
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message/Message.d.ts +1 -1
- package/dist/components/message/index.d.ts +2 -2
- package/dist/components/message/index.js +4 -4
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/index.d.ts +2 -2
- package/dist/components/modal/index.js +1 -1
- package/dist/components/notification/Notification.d.ts +1 -1
- package/dist/components/notification/index.d.ts +2 -2
- package/dist/components/notification/index.js +1 -1
- package/dist/components/otp-input/OtpInput.d.ts +1 -1
- package/dist/components/otp-input/index.d.ts +2 -2
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/Pagination.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/popconfirm/Popconfirm.d.ts +1 -1
- package/dist/components/popconfirm/Popconfirm.types.d.ts +1 -1
- package/dist/components/popconfirm/index.d.ts +2 -2
- package/dist/components/popconfirm/index.js +48 -48
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/progress/Progress.d.ts +1 -1
- package/dist/components/progress/index.d.ts +2 -2
- package/dist/components/progress/index.js +1 -1
- package/dist/components/qr-code/QRCode.d.ts +1 -1
- package/dist/components/qr-code/index.d.ts +2 -2
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/radio/Radio.d.ts +1 -1
- package/dist/components/radio/index.d.ts +2 -2
- package/dist/components/radio/index.js +1 -1
- package/dist/components/rate/Rate.d.ts +1 -1
- package/dist/components/rate/index.d.ts +2 -2
- package/dist/components/rate/index.js +1 -1
- package/dist/components/result/Result.d.ts +1 -1
- package/dist/components/result/index.d.ts +2 -2
- package/dist/components/result/index.js +1 -1
- package/dist/components/row/Row.d.ts +1 -1
- package/dist/components/row/index.d.ts +2 -2
- package/dist/components/row/index.js +1 -1
- package/dist/components/segmented/Segmented.d.ts +1 -1
- package/dist/components/segmented/index.d.ts +2 -2
- package/dist/components/segmented/index.js +1 -1
- package/dist/components/select/Select.d.ts +1 -1
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/index.js +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +1 -1
- package/dist/components/skeleton/index.d.ts +2 -2
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/slider/Slider.d.ts +1 -1
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/slider/index.js +1 -1
- package/dist/components/space/Space.d.ts +1 -1
- package/dist/components/space/index.d.ts +2 -2
- package/dist/components/space/index.js +1 -1
- package/dist/components/spin/Spin.d.ts +1 -1
- package/dist/components/spin/index.d.ts +2 -2
- package/dist/components/spin/index.js +3 -3
- package/dist/components/splitter/Splitter.d.ts +1 -1
- package/dist/components/splitter/index.d.ts +2 -2
- package/dist/components/splitter/index.js +1 -1
- package/dist/components/statistic/Statistic.d.ts +1 -1
- package/dist/components/statistic/index.d.ts +2 -2
- package/dist/components/statistic/index.js +1 -1
- package/dist/components/steps/Steps.d.ts +1 -1
- package/dist/components/steps/index.d.ts +2 -2
- package/dist/components/steps/index.js +1 -1
- package/dist/components/swap/Swap.d.ts +1 -1
- package/dist/components/swap/index.d.ts +2 -2
- package/dist/components/swap/index.js +1 -1
- package/dist/components/switch/Switch.d.ts +1 -1
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/index.js +1 -1
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/Tag.d.ts +1 -1
- package/dist/components/tag/index.d.ts +2 -2
- package/dist/components/tag/index.js +1 -1
- package/dist/components/time-picker/TimePicker.d.ts +1 -1
- package/dist/components/time-picker/index.d.ts +2 -2
- package/dist/components/time-picker/index.js +3 -3
- package/dist/components/timeline/Timeline.d.ts +1 -1
- package/dist/components/timeline/index.d.ts +2 -2
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/Tour.d.ts +1 -1
- package/dist/components/tour/Tour.types.d.ts +1 -1
- package/dist/components/tour/index.d.ts +2 -2
- package/dist/components/tour/index.js +66 -66
- package/dist/components/transfer/Transfer.d.ts +1 -1
- package/dist/components/transfer/index.d.ts +2 -2
- package/dist/components/transfer/index.js +1 -1
- package/dist/components/tree/Tree.d.ts +1 -1
- package/dist/components/tree/index.d.ts +2 -2
- package/dist/components/tree/index.js +1 -1
- package/dist/components/tree-select/TreeSelect.d.ts +1 -1
- package/dist/components/tree-select/index.d.ts +2 -2
- package/dist/components/tree-select/index.js +1 -1
- package/dist/components/typography/Typography.d.ts +1 -1
- package/dist/components/typography/index.d.ts +2 -2
- package/dist/components/typography/index.js +1 -1
- package/dist/components/upload/Upload.d.ts +1 -1
- package/dist/components/upload/index.d.ts +2 -2
- package/dist/components/upload/index.js +6 -6
- package/dist/components/watermark/Watermark.d.ts +1 -1
- package/dist/components/watermark/index.d.ts +2 -2
- package/dist/components/watermark/index.js +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/index.d.ts +105 -105
- package/dist/index.js +373 -373
- package/dist/infrastructure.d.ts +1 -1
- package/dist/infrastructure.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/theme/index.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +5 -5
- package/package.json +218 -218
package/dist/index.js
CHANGED
|
@@ -75,39 +75,11 @@ var ThemeInitScript = () => {
|
|
|
75
75
|
suppressHydrationWarning: true
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
-
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
79
|
-
function r(e) {
|
|
80
|
-
var t, f, n = "";
|
|
81
|
-
if (typeof e == "string" || typeof e == "number")
|
|
82
|
-
n += e;
|
|
83
|
-
else if (typeof e == "object")
|
|
84
|
-
if (Array.isArray(e)) {
|
|
85
|
-
var o = e.length;
|
|
86
|
-
for (t = 0;t < o; t++)
|
|
87
|
-
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
88
|
-
} else
|
|
89
|
-
for (f in e)
|
|
90
|
-
e[f] && (n && (n += " "), n += f);
|
|
91
|
-
return n;
|
|
92
|
-
}
|
|
93
|
-
function clsx() {
|
|
94
|
-
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
95
|
-
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
96
|
-
return n;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// src/utils/cn.ts
|
|
100
|
-
function cn(...inputs) {
|
|
101
|
-
return clsx(inputs);
|
|
102
|
-
}
|
|
103
|
-
function duskmoonMerge(classes) {
|
|
104
|
-
return classes;
|
|
105
|
-
}
|
|
106
78
|
// src/infrastructure.ts
|
|
107
79
|
import { useCallback as useCallback2, useState as useState2 } from "react";
|
|
108
80
|
|
|
109
81
|
// src/generated/version.ts
|
|
110
|
-
var version = "0.
|
|
82
|
+
var version = "2.0.0-rc.0";
|
|
111
83
|
|
|
112
84
|
// src/infrastructure.ts
|
|
113
85
|
var theme = {
|
|
@@ -233,6 +205,34 @@ function usePersistedPageSize(persistenceKey, initialPageSize = defaultPageSize)
|
|
|
233
205
|
}, [storageKey]);
|
|
234
206
|
return [pageSize, setPageSize];
|
|
235
207
|
}
|
|
208
|
+
// ../../../node_modules/clsx/dist/clsx.mjs
|
|
209
|
+
function r(e) {
|
|
210
|
+
var t, f, n = "";
|
|
211
|
+
if (typeof e == "string" || typeof e == "number")
|
|
212
|
+
n += e;
|
|
213
|
+
else if (typeof e == "object")
|
|
214
|
+
if (Array.isArray(e)) {
|
|
215
|
+
var o = e.length;
|
|
216
|
+
for (t = 0;t < o; t++)
|
|
217
|
+
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
218
|
+
} else
|
|
219
|
+
for (f in e)
|
|
220
|
+
e[f] && (n && (n += " "), n += f);
|
|
221
|
+
return n;
|
|
222
|
+
}
|
|
223
|
+
function clsx() {
|
|
224
|
+
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
225
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
226
|
+
return n;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// src/utils/cn.ts
|
|
230
|
+
function cn(...inputs) {
|
|
231
|
+
return clsx(inputs);
|
|
232
|
+
}
|
|
233
|
+
function duskmoonMerge(classes) {
|
|
234
|
+
return classes;
|
|
235
|
+
}
|
|
236
236
|
// src/components/button/Button.tsx
|
|
237
237
|
import React2 from "react";
|
|
238
238
|
import { createPortal } from "react-dom";
|
|
@@ -1991,11 +1991,11 @@ function copyJson(value, ancestors = new Set) {
|
|
|
1991
1991
|
if (Object.keys(value).length !== value.length || Object.keys(value).some((key, index) => key !== String(index))) {
|
|
1992
1992
|
throw new TypeError("Sparse arrays or array properties are not portable JSON");
|
|
1993
1993
|
}
|
|
1994
|
-
const
|
|
1994
|
+
const result2 = [];
|
|
1995
1995
|
for (let index = 0;index < value.length; index++) {
|
|
1996
|
-
|
|
1996
|
+
result2.push(copyJson(descriptors[String(index)].value, ancestors));
|
|
1997
1997
|
}
|
|
1998
|
-
return Object.freeze(
|
|
1998
|
+
return Object.freeze(result2);
|
|
1999
1999
|
}
|
|
2000
2000
|
const result = {};
|
|
2001
2001
|
for (const [key, descriptor] of Object.entries(descriptors)) {
|
|
@@ -4024,7 +4024,7 @@ function createSubmissionId() {
|
|
|
4024
4024
|
const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
4025
4025
|
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
4026
4026
|
}
|
|
4027
|
-
function createComposerSessionController(initial,
|
|
4027
|
+
function createComposerSessionController(initial, identity2) {
|
|
4028
4028
|
let context = initial;
|
|
4029
4029
|
let disposed = false;
|
|
4030
4030
|
let state = Object.freeze({ submitting: false });
|
|
@@ -4042,7 +4042,7 @@ function createComposerSessionController(initial, identity) {
|
|
|
4042
4042
|
for (const listener of listeners)
|
|
4043
4043
|
listener();
|
|
4044
4044
|
};
|
|
4045
|
-
const current = (attempt) => !disposed && attempt.instanceId ===
|
|
4045
|
+
const current = (attempt) => !disposed && attempt.instanceId === identity2.instanceId && attempt.instanceGeneration === context.instanceGeneration && sameComposerScope(attempt.snapshot.scope, context.scope) && attempt.snapshot.draftKey === context.draftKey && activeId === attempt.snapshot.clientSubmissionId;
|
|
4046
4046
|
function handoffFailure(attempt, cause) {
|
|
4047
4047
|
recoveryFailures.set(attempt.snapshot.clientSubmissionId, attempt);
|
|
4048
4048
|
return error("recovery_handoff_failed", `Recovery handoff failed; draft retained. ${cause instanceof Error ? cause.message : "Host recovery owner failed"}`);
|
|
@@ -4146,7 +4146,7 @@ function createComposerSessionController(initial, identity) {
|
|
|
4146
4146
|
const action = composerActionEligibility(context, intent);
|
|
4147
4147
|
if (disposed || state.submitting || !action.allowed)
|
|
4148
4148
|
return;
|
|
4149
|
-
const clientSubmissionId =
|
|
4149
|
+
const clientSubmissionId = identity2.nextSubmissionId?.() ?? createSubmissionId();
|
|
4150
4150
|
const common = {
|
|
4151
4151
|
protocolVersion: 1,
|
|
4152
4152
|
clientSubmissionId,
|
|
@@ -4176,7 +4176,7 @@ function createComposerSessionController(initial, identity) {
|
|
|
4176
4176
|
});
|
|
4177
4177
|
const attempt = Object.freeze({
|
|
4178
4178
|
snapshot,
|
|
4179
|
-
instanceId:
|
|
4179
|
+
instanceId: identity2.instanceId,
|
|
4180
4180
|
instanceGeneration: context.instanceGeneration,
|
|
4181
4181
|
createdAt: Date.now(),
|
|
4182
4182
|
status: "pending"
|
|
@@ -4267,12 +4267,12 @@ var PlainSemanticEditor = forwardRef9((props, ref) => {
|
|
|
4267
4267
|
const editor = useRef7(null);
|
|
4268
4268
|
const originId = useId6();
|
|
4269
4269
|
const latest = useRef7(props);
|
|
4270
|
-
const
|
|
4270
|
+
const revision2 = useRef7(props.value.revision);
|
|
4271
4271
|
const pendingCaret = useRef7(undefined);
|
|
4272
4272
|
const text = props.value.document.content.map((node) => node.type === "text" ? node.text : "").join("");
|
|
4273
4273
|
useLayoutEffect9(() => {
|
|
4274
4274
|
latest.current = props;
|
|
4275
|
-
|
|
4275
|
+
revision2.current = Math.max(revision2.current, props.value.revision);
|
|
4276
4276
|
const caret = pendingCaret.current;
|
|
4277
4277
|
if (caret && props.value.originId === originId && props.value.revision === caret.revision) {
|
|
4278
4278
|
editor.current?.select(caret.offset, caret.offset);
|
|
@@ -4286,12 +4286,12 @@ var PlainSemanticEditor = forwardRef9((props, ref) => {
|
|
|
4286
4286
|
return () => latest.current.onReady?.(false);
|
|
4287
4287
|
}, []);
|
|
4288
4288
|
const change = useCallback3((value, caret) => {
|
|
4289
|
-
|
|
4289
|
+
revision2.current = Math.max(revision2.current, latest.current.value.revision) + 1;
|
|
4290
4290
|
if (caret !== undefined)
|
|
4291
|
-
pendingCaret.current = { revision:
|
|
4291
|
+
pendingCaret.current = { revision: revision2.current, offset: caret };
|
|
4292
4292
|
latest.current.onChange({
|
|
4293
4293
|
document: migrateLegacyComposerDocument(value),
|
|
4294
|
-
revision:
|
|
4294
|
+
revision: revision2.current,
|
|
4295
4295
|
origin: "edit",
|
|
4296
4296
|
originId
|
|
4297
4297
|
});
|
|
@@ -4344,7 +4344,7 @@ var PlainSemanticEditor = forwardRef9((props, ref) => {
|
|
|
4344
4344
|
applyProvider: (effect) => {
|
|
4345
4345
|
const current = latest.current;
|
|
4346
4346
|
const range = selection();
|
|
4347
|
-
if (current.disabled || effect.action.type !== "insert" || effect.action.command || effect.action.content.some((
|
|
4347
|
+
if (current.disabled || effect.action.type !== "insert" || effect.action.command || effect.action.content.some((node2) => node2.type !== "text") || current.value.revision !== effect.request.documentRevision || !range || range.nodeIndex !== effect.request.trigger.nodeIndex || range.start !== range.end || range.end !== effect.request.trigger.caret)
|
|
4348
4348
|
return false;
|
|
4349
4349
|
const node = current.value.document.content[range.nodeIndex];
|
|
4350
4350
|
if (node?.type !== "text" || node.text.slice(effect.request.trigger.start, effect.request.trigger.end) !== effect.request.trigger.text)
|
|
@@ -4652,7 +4652,7 @@ class DraftController {
|
|
|
4652
4652
|
const edit = this.editGeneration;
|
|
4653
4653
|
const context = this.current;
|
|
4654
4654
|
const adapter = context.props.adapter;
|
|
4655
|
-
const
|
|
4655
|
+
const read2 = adapter.load;
|
|
4656
4656
|
const isCurrent = () => this.active && this.ownerGeneration === owner && this.loadGeneration === load && !abort.signal.aborted;
|
|
4657
4657
|
this.safety = "unloaded";
|
|
4658
4658
|
this.status = "loading";
|
|
@@ -4664,7 +4664,7 @@ class DraftController {
|
|
|
4664
4664
|
await waitForSaves(adapter, context.draft, abort.signal);
|
|
4665
4665
|
if (!isCurrent())
|
|
4666
4666
|
return;
|
|
4667
|
-
const input = await
|
|
4667
|
+
const input = await read2.call(adapter, {
|
|
4668
4668
|
scope: context.draft.scope,
|
|
4669
4669
|
draftKey: context.draft.draftKey,
|
|
4670
4670
|
signal: abort.signal
|
|
@@ -5028,7 +5028,7 @@ var SemanticComposer = forwardRef10(({
|
|
|
5028
5028
|
stopLabel = "Stop",
|
|
5029
5029
|
minRows = 1,
|
|
5030
5030
|
maxRows = 6,
|
|
5031
|
-
error,
|
|
5031
|
+
error: error3,
|
|
5032
5032
|
children,
|
|
5033
5033
|
className,
|
|
5034
5034
|
onPaste,
|
|
@@ -5074,9 +5074,9 @@ var SemanticComposer = forwardRef10(({
|
|
|
5074
5074
|
if (alive.current && observed.current.generation === origin)
|
|
5075
5075
|
setLocalFailure(message ? { generation: origin, message } : undefined);
|
|
5076
5076
|
}
|
|
5077
|
-
const
|
|
5078
|
-
const document2 =
|
|
5079
|
-
const compatible =
|
|
5077
|
+
const read2 = readComposerDocument(value.document);
|
|
5078
|
+
const document2 = read2.status === "compatible" ? read2.value : migrateLegacyComposerDocument("");
|
|
5079
|
+
const compatible = read2.status === "compatible" && (structured || isPlainComposerDocument(document2));
|
|
5080
5080
|
const editAvailable = compatible && !editorError;
|
|
5081
5081
|
const attachments = useComposerAttachments({
|
|
5082
5082
|
scope,
|
|
@@ -5155,7 +5155,7 @@ var SemanticComposer = forwardRef10(({
|
|
|
5155
5155
|
});
|
|
5156
5156
|
const active = candidates.find((item) => item.id === completion.snapshot.activeId && !item.disabled);
|
|
5157
5157
|
const showCompletion = popup && candidates.length > 0;
|
|
5158
|
-
const visibleError =
|
|
5158
|
+
const visibleError = error3 ?? localError ?? session.snapshot.error?.message;
|
|
5159
5159
|
const hasError = visibleError !== undefined && visibleError !== null && visibleError !== false;
|
|
5160
5160
|
useImperativeHandle4(forwardedRef, () => ({
|
|
5161
5161
|
focus: () => editor.current?.focus(),
|
|
@@ -5384,7 +5384,7 @@ var SemanticComposer = forwardRef10(({
|
|
|
5384
5384
|
}) : null
|
|
5385
5385
|
]
|
|
5386
5386
|
}),
|
|
5387
|
-
renderFooter: (renderToolbar) => draftAdapter && attachmentsCurrent &&
|
|
5387
|
+
renderFooter: (renderToolbar) => draftAdapter && attachmentsCurrent && read2.status === "compatible" ? /* @__PURE__ */ jsx17(DraftLifecycle, {
|
|
5388
5388
|
compact,
|
|
5389
5389
|
adapter: draftAdapter,
|
|
5390
5390
|
scope,
|
|
@@ -5414,8 +5414,8 @@ var SemanticComposer = forwardRef10(({
|
|
|
5414
5414
|
ref: editor,
|
|
5415
5415
|
value,
|
|
5416
5416
|
instanceGeneration: generation,
|
|
5417
|
-
onReady: (
|
|
5418
|
-
onError: (
|
|
5417
|
+
onReady: (ready2) => setReadiness({ generation, ready: ready2 }),
|
|
5418
|
+
onError: (error4) => setEditorFailure({ generation, error: error4 }),
|
|
5419
5419
|
onSelectionChange: setSelection,
|
|
5420
5420
|
onChange: (update) => {
|
|
5421
5421
|
setLocalError(undefined);
|
|
@@ -5465,7 +5465,7 @@ var SemanticComposer = forwardRef10(({
|
|
|
5465
5465
|
}
|
|
5466
5466
|
}, generation) : /* @__PURE__ */ jsx17(PreservedDraft, {
|
|
5467
5467
|
input: value.document,
|
|
5468
|
-
reason: editorError?.message ?? (
|
|
5468
|
+
reason: editorError?.message ?? (read2.status === "incompatible" ? read2.reason : "This draft requires the optional rich editor.")
|
|
5469
5469
|
}),
|
|
5470
5470
|
children
|
|
5471
5471
|
});
|
|
@@ -5597,14 +5597,14 @@ function QueueSession(props) {
|
|
|
5597
5597
|
return current;
|
|
5598
5598
|
if (result.outcome === "accepted")
|
|
5599
5599
|
return;
|
|
5600
|
-
const
|
|
5601
|
-
return
|
|
5600
|
+
const canonical2 = projection.items.find((item) => item.id === itemId);
|
|
5601
|
+
return canonical2 ? { ...current, item: canonical2, revision: projection.revision } : current;
|
|
5602
5602
|
});
|
|
5603
5603
|
setMessage(result.outcome === "rejected" ? { text: result.error.message, error: true } : { text: "Queue update acknowledged" });
|
|
5604
|
-
} catch (
|
|
5604
|
+
} catch (error3) {
|
|
5605
5605
|
if (!controller.signal.aborted)
|
|
5606
5606
|
setMessage({
|
|
5607
|
-
text:
|
|
5607
|
+
text: error3 instanceof Error ? error3.message : "Queue update failed",
|
|
5608
5608
|
error: true
|
|
5609
5609
|
});
|
|
5610
5610
|
} finally {
|
|
@@ -6572,11 +6572,11 @@ function SettingsSession(props) {
|
|
|
6572
6572
|
...current,
|
|
6573
6573
|
[settingId]: result.outcome === "rejected" ? result.message : "Change acknowledged; displayed value follows host state"
|
|
6574
6574
|
}));
|
|
6575
|
-
} catch (
|
|
6575
|
+
} catch (error3) {
|
|
6576
6576
|
if (!controller.signal.aborted)
|
|
6577
6577
|
setFeedback((current) => ({
|
|
6578
6578
|
...current,
|
|
6579
|
-
[settingId]:
|
|
6579
|
+
[settingId]: error3 instanceof Error ? error3.message : "Setting change failed"
|
|
6580
6580
|
}));
|
|
6581
6581
|
} finally {
|
|
6582
6582
|
if (requests.current.get(settingId) === controller) {
|
|
@@ -7345,9 +7345,9 @@ var CascaderRoot = forwardRef15(({
|
|
|
7345
7345
|
});
|
|
7346
7346
|
}
|
|
7347
7347
|
if (multiple) {
|
|
7348
|
-
return selectedPaths.map((
|
|
7348
|
+
return selectedPaths.map((path2, index) => /* @__PURE__ */ jsx25("span", {
|
|
7349
7349
|
className: cascaderTagClass,
|
|
7350
|
-
children: displayRender ? displayRender(labelsForPath(
|
|
7350
|
+
children: displayRender ? displayRender(labelsForPath(path2, names), path2) : defaultDisplay(labelsForPath(path2, names))
|
|
7351
7351
|
}, valueKey2(selectedValues[index] ?? [])));
|
|
7352
7352
|
}
|
|
7353
7353
|
const path = selectedPaths[0] ?? [];
|
|
@@ -8269,13 +8269,13 @@ function config(nextConfig) {
|
|
|
8269
8269
|
emit();
|
|
8270
8270
|
}
|
|
8271
8271
|
function MessageHolder({ className }) {
|
|
8272
|
-
const
|
|
8272
|
+
const snapshot2 = useSyncExternalStore6(subscribe, getSnapshot, getSnapshot);
|
|
8273
8273
|
return /* @__PURE__ */ jsx31("div", {
|
|
8274
8274
|
className: getMessageHolderClasses({
|
|
8275
|
-
placement:
|
|
8275
|
+
placement: snapshot2.config.placement,
|
|
8276
8276
|
className
|
|
8277
8277
|
}),
|
|
8278
|
-
children:
|
|
8278
|
+
children: snapshot2.messages.map((item) => /* @__PURE__ */ jsxs23("div", {
|
|
8279
8279
|
className: getMessageClasses({
|
|
8280
8280
|
type: item.type,
|
|
8281
8281
|
className: item.className
|
|
@@ -8339,8 +8339,8 @@ function getModalClasses({ className }) {
|
|
|
8339
8339
|
import { jsx as jsx32, jsxs as jsxs24, Fragment as Fragment13 } from "react/jsx-runtime";
|
|
8340
8340
|
var defaultCloseIcon = "x";
|
|
8341
8341
|
var serviceHandles = new Set;
|
|
8342
|
-
function createServiceHandle(
|
|
8343
|
-
let currentConfig =
|
|
8342
|
+
function createServiceHandle(config2) {
|
|
8343
|
+
let currentConfig = config2;
|
|
8344
8344
|
const handle = {
|
|
8345
8345
|
destroy: () => {
|
|
8346
8346
|
serviceHandles.delete(handle);
|
|
@@ -8369,7 +8369,7 @@ function showNativeModal(dialog) {
|
|
|
8369
8369
|
dialog.showModal();
|
|
8370
8370
|
}
|
|
8371
8371
|
var ModalBase = forwardRef20(({
|
|
8372
|
-
open,
|
|
8372
|
+
open: open2,
|
|
8373
8373
|
defaultOpen = false,
|
|
8374
8374
|
title,
|
|
8375
8375
|
children,
|
|
@@ -8393,9 +8393,9 @@ var ModalBase = forwardRef20(({
|
|
|
8393
8393
|
role,
|
|
8394
8394
|
...props
|
|
8395
8395
|
}, ref) => {
|
|
8396
|
-
const controlled =
|
|
8396
|
+
const controlled = open2 !== undefined;
|
|
8397
8397
|
const [innerOpen, setInnerOpen] = useState20(defaultOpen);
|
|
8398
|
-
const mergedOpen = controlled ? Boolean(
|
|
8398
|
+
const mergedOpen = controlled ? Boolean(open2) : innerOpen;
|
|
8399
8399
|
const previousOpen = useRef15(mergedOpen);
|
|
8400
8400
|
const desiredOpen = useRef15(mergedOpen);
|
|
8401
8401
|
desiredOpen.current = mergedOpen;
|
|
@@ -8600,10 +8600,10 @@ function getNotificationHolderClasses({
|
|
|
8600
8600
|
}
|
|
8601
8601
|
function getNotificationNoticeClasses({
|
|
8602
8602
|
type = "info",
|
|
8603
|
-
open = true,
|
|
8603
|
+
open: open2 = true,
|
|
8604
8604
|
className
|
|
8605
8605
|
}) {
|
|
8606
|
-
return cn("toast", "alert", notificationNoticeClass, notificationTypeClasses[type],
|
|
8606
|
+
return cn("toast", "alert", notificationNoticeClass, notificationTypeClasses[type], open2 && "toast-show", open2 && notificationNoticeOpenClass, className);
|
|
8607
8607
|
}
|
|
8608
8608
|
|
|
8609
8609
|
// src/components/notification/Notification.tsx
|
|
@@ -8632,11 +8632,11 @@ function getKey(key) {
|
|
|
8632
8632
|
globalCounter += 1;
|
|
8633
8633
|
return `notification-${globalCounter}`;
|
|
8634
8634
|
}
|
|
8635
|
-
function getDuration(
|
|
8636
|
-
return
|
|
8635
|
+
function getDuration(config2, holderConfig) {
|
|
8636
|
+
return config2.duration ?? holderConfig.duration ?? defaultConfig.duration;
|
|
8637
8637
|
}
|
|
8638
|
-
function getPlacement(
|
|
8639
|
-
return
|
|
8638
|
+
function getPlacement(config2, holderConfig) {
|
|
8639
|
+
return config2.placement ?? holderConfig.placement ?? defaultConfig.placement;
|
|
8640
8640
|
}
|
|
8641
8641
|
function applyMaxCount(notices, maxCount) {
|
|
8642
8642
|
if (!maxCount || notices.length <= maxCount) {
|
|
@@ -8714,42 +8714,42 @@ function destroyGlobal(key) {
|
|
|
8714
8714
|
globalNotices = [];
|
|
8715
8715
|
emitGlobal();
|
|
8716
8716
|
}
|
|
8717
|
-
function openGlobal(
|
|
8718
|
-
const key = getKey(
|
|
8717
|
+
function openGlobal(config2) {
|
|
8718
|
+
const key = getKey(config2.key);
|
|
8719
8719
|
const notice = {
|
|
8720
|
-
...
|
|
8720
|
+
...config2,
|
|
8721
8721
|
key,
|
|
8722
|
-
placement: getPlacement(
|
|
8723
|
-
type:
|
|
8722
|
+
placement: getPlacement(config2, globalConfig2),
|
|
8723
|
+
type: config2.type ?? "info"
|
|
8724
8724
|
};
|
|
8725
8725
|
clearTimer2(key);
|
|
8726
8726
|
globalNotices = applyMaxCount([...globalNotices.filter((item) => item.key !== key), notice], globalConfig2.maxCount);
|
|
8727
|
-
const duration = getDuration(
|
|
8727
|
+
const duration = getDuration(config2, globalConfig2);
|
|
8728
8728
|
if (duration && duration > 0) {
|
|
8729
8729
|
globalTimers.set(key, setTimeout(() => closeGlobal(key), duration * 1000));
|
|
8730
8730
|
}
|
|
8731
8731
|
emitGlobal();
|
|
8732
8732
|
}
|
|
8733
|
-
function withType(type,
|
|
8734
|
-
openGlobal({ ...
|
|
8733
|
+
function withType(type, config2) {
|
|
8734
|
+
openGlobal({ ...config2, type });
|
|
8735
8735
|
}
|
|
8736
8736
|
var globalApi = {
|
|
8737
8737
|
open: openGlobal,
|
|
8738
|
-
success: (
|
|
8739
|
-
info: (
|
|
8740
|
-
warning: (
|
|
8741
|
-
error: (
|
|
8738
|
+
success: (config2) => withType("success", config2),
|
|
8739
|
+
info: (config2) => withType("info", config2),
|
|
8740
|
+
warning: (config2) => withType("warning", config2),
|
|
8741
|
+
error: (config2) => withType("error", config2),
|
|
8742
8742
|
close: closeGlobal,
|
|
8743
8743
|
destroy: destroyGlobal,
|
|
8744
|
-
config: (
|
|
8745
|
-
globalConfig2 = { ...globalConfig2, ...
|
|
8744
|
+
config: (config2) => {
|
|
8745
|
+
globalConfig2 = { ...globalConfig2, ...config2 };
|
|
8746
8746
|
emitGlobal();
|
|
8747
8747
|
},
|
|
8748
8748
|
useNotification
|
|
8749
8749
|
};
|
|
8750
8750
|
function NotificationHolder({
|
|
8751
8751
|
notices,
|
|
8752
|
-
config,
|
|
8752
|
+
config: config2,
|
|
8753
8753
|
onClose
|
|
8754
8754
|
}) {
|
|
8755
8755
|
const groups = groupByPlacement(notices);
|
|
@@ -8758,7 +8758,7 @@ function NotificationHolder({
|
|
|
8758
8758
|
if (group.length === 0) {
|
|
8759
8759
|
return null;
|
|
8760
8760
|
}
|
|
8761
|
-
const offsetStyle = placement.startsWith("bottom") &&
|
|
8761
|
+
const offsetStyle = placement.startsWith("bottom") && config2.bottom !== undefined ? { bottom: config2.bottom } : config2.top !== undefined ? { top: config2.top } : undefined;
|
|
8762
8762
|
return /* @__PURE__ */ jsx33("div", {
|
|
8763
8763
|
className: getNotificationHolderClasses({
|
|
8764
8764
|
placement
|
|
@@ -8766,7 +8766,7 @@ function NotificationHolder({
|
|
|
8766
8766
|
style: offsetStyle,
|
|
8767
8767
|
children: group.map((notice) => /* @__PURE__ */ jsx33(NotificationNotice, {
|
|
8768
8768
|
notice,
|
|
8769
|
-
fallbackCloseIcon:
|
|
8769
|
+
fallbackCloseIcon: config2.closeIcon,
|
|
8770
8770
|
onClose
|
|
8771
8771
|
}, notice.key))
|
|
8772
8772
|
}, placement);
|
|
@@ -8853,30 +8853,30 @@ function createScopedApi({
|
|
|
8853
8853
|
return current.filter((item) => item.key !== key);
|
|
8854
8854
|
});
|
|
8855
8855
|
}
|
|
8856
|
-
function
|
|
8857
|
-
const key = getKey(
|
|
8856
|
+
function open2(config2) {
|
|
8857
|
+
const key = getKey(config2.key);
|
|
8858
8858
|
const notice = {
|
|
8859
|
-
...
|
|
8859
|
+
...config2,
|
|
8860
8860
|
key,
|
|
8861
|
-
placement: getPlacement(
|
|
8862
|
-
type:
|
|
8861
|
+
placement: getPlacement(config2, holderConfig),
|
|
8862
|
+
type: config2.type ?? "info"
|
|
8863
8863
|
};
|
|
8864
8864
|
clearScopedTimer(key);
|
|
8865
8865
|
setNotices((current) => applyMaxCount([...current.filter((item) => item.key !== key), notice], holderConfig.maxCount));
|
|
8866
|
-
const duration = getDuration(
|
|
8866
|
+
const duration = getDuration(config2, holderConfig);
|
|
8867
8867
|
if (duration && duration > 0) {
|
|
8868
8868
|
timerMap.set(key, setTimeout(() => close(key), duration * 1000));
|
|
8869
8869
|
}
|
|
8870
8870
|
}
|
|
8871
|
-
function typed(type,
|
|
8872
|
-
|
|
8871
|
+
function typed(type, config2) {
|
|
8872
|
+
open2({ ...config2, type });
|
|
8873
8873
|
}
|
|
8874
8874
|
return {
|
|
8875
|
-
open,
|
|
8876
|
-
success: (
|
|
8877
|
-
info: (
|
|
8878
|
-
warning: (
|
|
8879
|
-
error: (
|
|
8875
|
+
open: open2,
|
|
8876
|
+
success: (config2) => typed("success", config2),
|
|
8877
|
+
info: (config2) => typed("info", config2),
|
|
8878
|
+
warning: (config2) => typed("warning", config2),
|
|
8879
|
+
error: (config2) => typed("error", config2),
|
|
8880
8880
|
close,
|
|
8881
8881
|
destroy: (key) => {
|
|
8882
8882
|
if (key !== undefined) {
|
|
@@ -8895,24 +8895,24 @@ function createScopedApi({
|
|
|
8895
8895
|
}
|
|
8896
8896
|
};
|
|
8897
8897
|
}
|
|
8898
|
-
function useNotification(
|
|
8898
|
+
function useNotification(config2 = {}) {
|
|
8899
8899
|
const holderConfig = useMemo7(() => ({
|
|
8900
8900
|
...defaultConfig,
|
|
8901
|
-
bottom:
|
|
8902
|
-
closeIcon:
|
|
8903
|
-
duration:
|
|
8904
|
-
getContainer:
|
|
8905
|
-
maxCount:
|
|
8906
|
-
placement:
|
|
8907
|
-
top:
|
|
8901
|
+
bottom: config2.bottom,
|
|
8902
|
+
closeIcon: config2.closeIcon,
|
|
8903
|
+
duration: config2.duration ?? defaultConfig.duration,
|
|
8904
|
+
getContainer: config2.getContainer,
|
|
8905
|
+
maxCount: config2.maxCount,
|
|
8906
|
+
placement: config2.placement ?? defaultConfig.placement,
|
|
8907
|
+
top: config2.top
|
|
8908
8908
|
}), [
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8909
|
+
config2.bottom,
|
|
8910
|
+
config2.closeIcon,
|
|
8911
|
+
config2.duration,
|
|
8912
|
+
config2.getContainer,
|
|
8913
|
+
config2.maxCount,
|
|
8914
|
+
config2.placement,
|
|
8915
|
+
config2.top
|
|
8916
8916
|
]);
|
|
8917
8917
|
const [notices, setNotices] = useState21([]);
|
|
8918
8918
|
const [timerMap] = useState21(() => new Map);
|
|
@@ -9068,10 +9068,10 @@ var autoCompleteSizeClasses = {
|
|
|
9068
9068
|
function getAutoCompleteClasses({
|
|
9069
9069
|
color,
|
|
9070
9070
|
disabled,
|
|
9071
|
-
open,
|
|
9071
|
+
open: open2,
|
|
9072
9072
|
className
|
|
9073
9073
|
}) {
|
|
9074
|
-
return cn(autoCompleteBaseClass, color && autoCompleteColorClasses[color], disabled && "autocomplete-disabled",
|
|
9074
|
+
return cn(autoCompleteBaseClass, color && autoCompleteColorClasses[color], disabled && "autocomplete-disabled", open2 && "autocomplete-open", className);
|
|
9075
9075
|
}
|
|
9076
9076
|
function getAutoCompleteInputClasses({
|
|
9077
9077
|
size = "md",
|
|
@@ -9080,10 +9080,10 @@ function getAutoCompleteInputClasses({
|
|
|
9080
9080
|
return cn(autoCompleteInputClass, autoCompleteSizeClasses[size], className);
|
|
9081
9081
|
}
|
|
9082
9082
|
function getAutoCompleteDropdownClasses({
|
|
9083
|
-
open,
|
|
9083
|
+
open: open2,
|
|
9084
9084
|
className
|
|
9085
9085
|
}) {
|
|
9086
|
-
return cn(autoCompleteDropdownClass,
|
|
9086
|
+
return cn(autoCompleteDropdownClass, open2 && autoCompleteDropdownOpenClass, className);
|
|
9087
9087
|
}
|
|
9088
9088
|
function getAutoCompleteOptionClasses({
|
|
9089
9089
|
selected,
|
|
@@ -9151,7 +9151,7 @@ var AutoCompleteRoot = forwardRef22(({
|
|
|
9151
9151
|
onChange,
|
|
9152
9152
|
onSearch,
|
|
9153
9153
|
onSelect,
|
|
9154
|
-
open,
|
|
9154
|
+
open: open2,
|
|
9155
9155
|
options,
|
|
9156
9156
|
placeholder,
|
|
9157
9157
|
size = "md",
|
|
@@ -9166,9 +9166,9 @@ var AutoCompleteRoot = forwardRef22(({
|
|
|
9166
9166
|
const [internalOpen, setInternalOpen] = useState22(defaultOpen ?? false);
|
|
9167
9167
|
const [focusedIndex, setFocusedIndex] = useState22(-1);
|
|
9168
9168
|
const controlledValue = value !== undefined;
|
|
9169
|
-
const controlledOpen =
|
|
9169
|
+
const controlledOpen = open2 !== undefined;
|
|
9170
9170
|
const currentValue = controlledValue ? value : internalValue;
|
|
9171
|
-
const isOpen = controlledOpen ?
|
|
9171
|
+
const isOpen = controlledOpen ? open2 : internalOpen;
|
|
9172
9172
|
const visibleOptions = useMemo9(() => filterOptions2(sourceOptions, currentValue, filterOption), [currentValue, filterOption, sourceOptions]);
|
|
9173
9173
|
const selectedIndex = visibleOptions.findIndex((option) => option.value === currentValue);
|
|
9174
9174
|
const activeIndex = focusedIndex >= 0 ? focusedIndex : selectedIndex;
|
|
@@ -9524,9 +9524,9 @@ function getCheckboxClasses({
|
|
|
9524
9524
|
function getCheckboxInputClasses({
|
|
9525
9525
|
color = "primary",
|
|
9526
9526
|
size = "md",
|
|
9527
|
-
error
|
|
9527
|
+
error: error3
|
|
9528
9528
|
}) {
|
|
9529
|
-
return cn(checkboxInputBaseClass, checkboxInputClass, checkboxColorClasses[color], checkboxSizeClasses[size],
|
|
9529
|
+
return cn(checkboxInputBaseClass, checkboxInputClass, checkboxColorClasses[color], checkboxSizeClasses[size], error3 && checkboxErrorClass);
|
|
9530
9530
|
}
|
|
9531
9531
|
function getCheckboxLabelClasses({
|
|
9532
9532
|
labelPosition = "right"
|
|
@@ -9540,7 +9540,7 @@ var Checkbox = forwardRef25(({
|
|
|
9540
9540
|
color = "primary",
|
|
9541
9541
|
size = "md",
|
|
9542
9542
|
indeterminate = false,
|
|
9543
|
-
error,
|
|
9543
|
+
error: error3,
|
|
9544
9544
|
loading,
|
|
9545
9545
|
labelPosition = "right",
|
|
9546
9546
|
className,
|
|
@@ -9567,7 +9567,7 @@ var Checkbox = forwardRef25(({
|
|
|
9567
9567
|
...props,
|
|
9568
9568
|
ref: inputRef,
|
|
9569
9569
|
type: "checkbox",
|
|
9570
|
-
className: getCheckboxInputClasses({ color, size, error }),
|
|
9570
|
+
className: getCheckboxInputClasses({ color, size, error: error3 }),
|
|
9571
9571
|
disabled: isDisabled,
|
|
9572
9572
|
"aria-checked": indeterminate ? "mixed" : ariaChecked
|
|
9573
9573
|
}),
|
|
@@ -9672,25 +9672,25 @@ function getCollapseGroupClasses({ className }) {
|
|
|
9672
9672
|
return cn(collapseGroupClass, className);
|
|
9673
9673
|
}
|
|
9674
9674
|
function getCollapseItemClasses({
|
|
9675
|
-
open,
|
|
9675
|
+
open: open2,
|
|
9676
9676
|
bordered,
|
|
9677
9677
|
ghost,
|
|
9678
9678
|
disabled,
|
|
9679
9679
|
size = "md",
|
|
9680
9680
|
className
|
|
9681
9681
|
}) {
|
|
9682
|
-
return cn(collapseBaseClass,
|
|
9682
|
+
return cn(collapseBaseClass, open2 ? collapseOpenClass : collapseClosedClass, bordered && collapseBorderedClass, ghost && collapseGhostClass, disabled && collapseDisabledClass, collapseSizeClasses[size], className);
|
|
9683
9683
|
}
|
|
9684
9684
|
|
|
9685
9685
|
// src/components/collapse/Collapse.tsx
|
|
9686
9686
|
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9687
|
-
function normalizeKeys(
|
|
9688
|
-
if (
|
|
9687
|
+
function normalizeKeys(keys2) {
|
|
9688
|
+
if (keys2 === undefined)
|
|
9689
9689
|
return [];
|
|
9690
|
-
return Array.isArray(
|
|
9690
|
+
return Array.isArray(keys2) ? keys2.map(String) : [String(keys2)];
|
|
9691
9691
|
}
|
|
9692
|
-
function denormalizeKeys(
|
|
9693
|
-
return accordion ?
|
|
9692
|
+
function denormalizeKeys(keys2, accordion) {
|
|
9693
|
+
return accordion ? keys2[0] ?? "" : keys2;
|
|
9694
9694
|
}
|
|
9695
9695
|
var Collapse = forwardRef27(({
|
|
9696
9696
|
items,
|
|
@@ -9726,11 +9726,11 @@ var Collapse = forwardRef27(({
|
|
|
9726
9726
|
className: getCollapseGroupClasses({ className }),
|
|
9727
9727
|
children: finalItems.map((item) => {
|
|
9728
9728
|
const itemKey = String(item.key);
|
|
9729
|
-
const
|
|
9729
|
+
const open2 = openKeys.includes(itemKey);
|
|
9730
9730
|
const contentId = `collapse-content-${itemKey}`;
|
|
9731
9731
|
return /* @__PURE__ */ jsxs29("div", {
|
|
9732
9732
|
className: getCollapseItemClasses({
|
|
9733
|
-
open,
|
|
9733
|
+
open: open2,
|
|
9734
9734
|
bordered,
|
|
9735
9735
|
ghost,
|
|
9736
9736
|
disabled: item.disabled,
|
|
@@ -9741,7 +9741,7 @@ var Collapse = forwardRef27(({
|
|
|
9741
9741
|
/* @__PURE__ */ jsxs29("button", {
|
|
9742
9742
|
type: "button",
|
|
9743
9743
|
className: collapseTriggerClass,
|
|
9744
|
-
"aria-expanded":
|
|
9744
|
+
"aria-expanded": open2,
|
|
9745
9745
|
"aria-controls": contentId,
|
|
9746
9746
|
disabled: item.disabled,
|
|
9747
9747
|
onClick: () => toggleItem(item),
|
|
@@ -9756,7 +9756,7 @@ var Collapse = forwardRef27(({
|
|
|
9756
9756
|
})
|
|
9757
9757
|
]
|
|
9758
9758
|
}),
|
|
9759
|
-
|
|
9759
|
+
open2 ? /* @__PURE__ */ jsx40("div", {
|
|
9760
9760
|
id: contentId,
|
|
9761
9761
|
className: collapseContentClass,
|
|
9762
9762
|
children: /* @__PURE__ */ jsx40("div", {
|
|
@@ -9797,11 +9797,11 @@ var ConfigProviderBase = forwardRef28(({
|
|
|
9797
9797
|
children,
|
|
9798
9798
|
className,
|
|
9799
9799
|
component: Component = "div",
|
|
9800
|
-
prefixCls,
|
|
9800
|
+
prefixCls: prefixCls2,
|
|
9801
9801
|
iconPrefixCls,
|
|
9802
9802
|
direction,
|
|
9803
9803
|
locale,
|
|
9804
|
-
theme,
|
|
9804
|
+
theme: theme2,
|
|
9805
9805
|
getPopupContainer,
|
|
9806
9806
|
renderEmpty,
|
|
9807
9807
|
virtual,
|
|
@@ -9817,11 +9817,11 @@ var ConfigProviderBase = forwardRef28(({
|
|
|
9817
9817
|
...defaultConfig2,
|
|
9818
9818
|
...globalConfig3,
|
|
9819
9819
|
...parent,
|
|
9820
|
-
prefixCls:
|
|
9820
|
+
prefixCls: prefixCls2 ?? parent.prefixCls ?? globalConfig3.prefixCls ?? "dm",
|
|
9821
9821
|
iconPrefixCls: iconPrefixCls ?? parent.iconPrefixCls ?? globalConfig3.iconPrefixCls ?? "dmicon",
|
|
9822
9822
|
direction: direction ?? parent.direction ?? globalConfig3.direction ?? "ltr",
|
|
9823
9823
|
locale: locale ?? parent.locale ?? globalConfig3.locale,
|
|
9824
|
-
theme:
|
|
9824
|
+
theme: theme2 ?? parent.theme ?? globalConfig3.theme,
|
|
9825
9825
|
getPopupContainer: getPopupContainer ?? parent.getPopupContainer ?? globalConfig3.getPopupContainer,
|
|
9826
9826
|
renderEmpty: renderEmpty ?? parent.renderEmpty ?? globalConfig3.renderEmpty,
|
|
9827
9827
|
virtual: virtual ?? parent.virtual ?? globalConfig3.virtual ?? true,
|
|
@@ -9832,9 +9832,9 @@ var ConfigProviderBase = forwardRef28(({
|
|
|
9832
9832
|
iconPrefixCls,
|
|
9833
9833
|
locale,
|
|
9834
9834
|
parent,
|
|
9835
|
-
|
|
9835
|
+
prefixCls2,
|
|
9836
9836
|
renderEmpty,
|
|
9837
|
-
|
|
9837
|
+
theme2,
|
|
9838
9838
|
virtual,
|
|
9839
9839
|
wave
|
|
9840
9840
|
]);
|
|
@@ -9862,8 +9862,8 @@ ConfigProvider.useConfig = () => {
|
|
|
9862
9862
|
const context = useContext5(ConfigContext);
|
|
9863
9863
|
return context ?? { ...defaultConfig2, ...globalConfig3 };
|
|
9864
9864
|
};
|
|
9865
|
-
ConfigProvider.config = (
|
|
9866
|
-
globalConfig3 = { ...globalConfig3, ...
|
|
9865
|
+
ConfigProvider.config = (config2) => {
|
|
9866
|
+
globalConfig3 = { ...globalConfig3, ...config2 };
|
|
9867
9867
|
};
|
|
9868
9868
|
// src/components/color-picker/ColorPicker.tsx
|
|
9869
9869
|
import {
|
|
@@ -9908,10 +9908,10 @@ function getColorPickerClasses({
|
|
|
9908
9908
|
trigger = "click",
|
|
9909
9909
|
format = "hex",
|
|
9910
9910
|
disabled,
|
|
9911
|
-
open,
|
|
9911
|
+
open: open2,
|
|
9912
9912
|
className
|
|
9913
9913
|
}) {
|
|
9914
|
-
return cn(colorPickerBaseClass, colorPickerSizeClasses[size], colorPickerTriggerClasses[trigger], colorPickerFormatClasses[format], disabled && "color-picker-disabled",
|
|
9914
|
+
return cn(colorPickerBaseClass, colorPickerSizeClasses[size], colorPickerTriggerClasses[trigger], colorPickerFormatClasses[format], disabled && "color-picker-disabled", open2 && "color-picker-open", className);
|
|
9915
9915
|
}
|
|
9916
9916
|
|
|
9917
9917
|
// src/components/color-picker/ColorPicker.tsx
|
|
@@ -9935,9 +9935,9 @@ function hsbToRgb(value) {
|
|
|
9935
9935
|
const c = brightness * s;
|
|
9936
9936
|
const x = c * (1 - Math.abs(h / 60 % 2 - 1));
|
|
9937
9937
|
const m = brightness - c;
|
|
9938
|
-
const [
|
|
9938
|
+
const [r2, g, b] = h < 60 ? [c, x, 0] : h < 120 ? [x, c, 0] : h < 180 ? [0, c, x] : h < 240 ? [0, x, c] : h < 300 ? [x, 0, c] : [c, 0, x];
|
|
9939
9939
|
return {
|
|
9940
|
-
r: (
|
|
9940
|
+
r: (r2 + m) * 255,
|
|
9941
9941
|
g: (g + m) * 255,
|
|
9942
9942
|
b: (b + m) * 255,
|
|
9943
9943
|
a: value.a
|
|
@@ -9960,8 +9960,8 @@ function colorToRgb(value) {
|
|
|
9960
9960
|
}
|
|
9961
9961
|
const match = normalized.match(/rgba?\(([^)]+)\)/i);
|
|
9962
9962
|
if (match) {
|
|
9963
|
-
const [
|
|
9964
|
-
return { r, g, b, a };
|
|
9963
|
+
const [r2, g, b, a] = match[1].split(",").map((part) => Number(part.trim()));
|
|
9964
|
+
return { r: r2, g, b, a };
|
|
9965
9965
|
}
|
|
9966
9966
|
return { r: 0, g: 0, b: 0 };
|
|
9967
9967
|
}
|
|
@@ -9974,10 +9974,10 @@ function colorToHsb(value) {
|
|
|
9974
9974
|
b: clamp(value.b, 0, 100)
|
|
9975
9975
|
};
|
|
9976
9976
|
const rgb = colorToRgb(value);
|
|
9977
|
-
const [
|
|
9978
|
-
const max = Math.max(
|
|
9979
|
-
const delta = max - Math.min(
|
|
9980
|
-
const hue = delta === 0 ? 0 : max ===
|
|
9977
|
+
const [r2, g, b] = [rgb.r, rgb.g, rgb.b].map((part) => Number.isFinite(part) ? clamp(part, 0, 255) / 255 : 0);
|
|
9978
|
+
const max = Math.max(r2, g, b);
|
|
9979
|
+
const delta = max - Math.min(r2, g, b);
|
|
9980
|
+
const hue = delta === 0 ? 0 : max === r2 ? (g - b) / delta % 6 : max === g ? (b - r2) / delta + 2 : (r2 - g) / delta + 4;
|
|
9981
9981
|
return {
|
|
9982
9982
|
h: (hue * 60 + 360) % 360,
|
|
9983
9983
|
s: max === 0 ? 0 : delta / max * 100,
|
|
@@ -10024,7 +10024,7 @@ var ColorPicker = forwardRef29(({
|
|
|
10024
10024
|
onChangeComplete,
|
|
10025
10025
|
onFormatChange,
|
|
10026
10026
|
onOpenChange,
|
|
10027
|
-
open,
|
|
10027
|
+
open: open2,
|
|
10028
10028
|
panelRender,
|
|
10029
10029
|
presets,
|
|
10030
10030
|
showText,
|
|
@@ -10039,11 +10039,11 @@ var ColorPicker = forwardRef29(({
|
|
|
10039
10039
|
const panelId = useId16();
|
|
10040
10040
|
useImperativeHandle7(ref, () => rootRef.current, []);
|
|
10041
10041
|
const valueControlled = value !== undefined;
|
|
10042
|
-
const openControlled =
|
|
10042
|
+
const openControlled = open2 !== undefined;
|
|
10043
10043
|
const [innerValue, setInnerValue] = useState26(defaultValue);
|
|
10044
10044
|
const [innerOpen, setInnerOpen] = useState26(Boolean(defaultOpen));
|
|
10045
10045
|
const currentValue = valueControlled ? value : innerValue;
|
|
10046
|
-
const visible = openControlled ? Boolean(
|
|
10046
|
+
const visible = openControlled ? Boolean(open2) : innerOpen;
|
|
10047
10047
|
const cssValue = colorToCss(currentValue, format);
|
|
10048
10048
|
const [lastSelection, setLastSelection] = useState26(() => colorToHsb(currentValue));
|
|
10049
10049
|
const selection = colorToHsb(currentValue);
|
|
@@ -10324,7 +10324,7 @@ import { forwardRef as forwardRef30, useMemo as useMemo11, useState as useState2
|
|
|
10324
10324
|
// src/components/date-picker/usePickerDropdown.ts
|
|
10325
10325
|
import { useEffect as useEffect14, useId as useId17, useImperativeHandle as useImperativeHandle8, useRef as useRef20, useState as useState27 } from "react";
|
|
10326
10326
|
function usePickerDropdown({
|
|
10327
|
-
open,
|
|
10327
|
+
open: open2,
|
|
10328
10328
|
defaultOpen,
|
|
10329
10329
|
disabled,
|
|
10330
10330
|
onOpenChange,
|
|
@@ -10335,12 +10335,12 @@ function usePickerDropdown({
|
|
|
10335
10335
|
const skipFocus = useRef20(false);
|
|
10336
10336
|
const panelId = useId17();
|
|
10337
10337
|
const [innerOpen, setInnerOpen] = useState27(Boolean(defaultOpen));
|
|
10338
|
-
const visible = !disabled && (
|
|
10338
|
+
const visible = !disabled && (open2 ?? innerOpen);
|
|
10339
10339
|
useImperativeHandle8(ref, () => rootRef.current, []);
|
|
10340
10340
|
function setVisible(next) {
|
|
10341
10341
|
if (disabled || next === visible)
|
|
10342
10342
|
return;
|
|
10343
|
-
if (
|
|
10343
|
+
if (open2 === undefined)
|
|
10344
10344
|
setInnerOpen(next);
|
|
10345
10345
|
onOpenChange?.(next);
|
|
10346
10346
|
}
|
|
@@ -10423,18 +10423,18 @@ function getDatePickerClasses({
|
|
|
10423
10423
|
size = "md",
|
|
10424
10424
|
status,
|
|
10425
10425
|
picker = "date",
|
|
10426
|
-
open,
|
|
10426
|
+
open: open2,
|
|
10427
10427
|
disabled,
|
|
10428
10428
|
range,
|
|
10429
10429
|
className
|
|
10430
10430
|
}) {
|
|
10431
|
-
return cn(datePickerBaseClass, datePickerSizeClasses[size], status && datePickerStatusClasses[status], datePickerPickerClasses[picker],
|
|
10431
|
+
return cn(datePickerBaseClass, datePickerSizeClasses[size], status && datePickerStatusClasses[status], datePickerPickerClasses[picker], open2 && "datepicker-open", disabled && "datepicker-disabled", range && datePickerRangeClass, className);
|
|
10432
10432
|
}
|
|
10433
10433
|
function getDatePickerDropdownClasses({
|
|
10434
|
-
open,
|
|
10434
|
+
open: open2,
|
|
10435
10435
|
className
|
|
10436
10436
|
}) {
|
|
10437
|
-
return cn(datePickerDropdownClass,
|
|
10437
|
+
return cn(datePickerDropdownClass, open2 && datePickerDropdownOpenClass, className);
|
|
10438
10438
|
}
|
|
10439
10439
|
|
|
10440
10440
|
// src/components/date-picker/DatePicker.tsx
|
|
@@ -10489,7 +10489,7 @@ var DatePickerRoot = forwardRef30(({
|
|
|
10489
10489
|
onChange,
|
|
10490
10490
|
onFocus,
|
|
10491
10491
|
onOpenChange,
|
|
10492
|
-
open,
|
|
10492
|
+
open: open2,
|
|
10493
10493
|
picker = "date",
|
|
10494
10494
|
placeholder,
|
|
10495
10495
|
presets,
|
|
@@ -10503,7 +10503,7 @@ var DatePickerRoot = forwardRef30(({
|
|
|
10503
10503
|
const isValueControlled = value !== undefined;
|
|
10504
10504
|
const [innerValue, setInnerValue] = useState28(() => normalizeDateValue(defaultValue));
|
|
10505
10505
|
const dropdown = usePickerDropdown({
|
|
10506
|
-
open,
|
|
10506
|
+
open: open2,
|
|
10507
10507
|
defaultOpen,
|
|
10508
10508
|
disabled,
|
|
10509
10509
|
onOpenChange,
|
|
@@ -11044,12 +11044,12 @@ var drawerSizeClasses = {
|
|
|
11044
11044
|
xl: "drawer-xl"
|
|
11045
11045
|
};
|
|
11046
11046
|
function getDrawerClasses({
|
|
11047
|
-
open,
|
|
11047
|
+
open: open2,
|
|
11048
11048
|
placement = "right",
|
|
11049
11049
|
size = "md",
|
|
11050
11050
|
className
|
|
11051
11051
|
}) {
|
|
11052
|
-
return cn(drawerBaseClass, drawerPlacementClasses[placement], size && drawerSizeClasses[size],
|
|
11052
|
+
return cn(drawerBaseClass, drawerPlacementClasses[placement], size && drawerSizeClasses[size], open2 && drawerOpenClass, className);
|
|
11053
11053
|
}
|
|
11054
11054
|
|
|
11055
11055
|
// src/components/drawer/Drawer.tsx
|
|
@@ -11067,7 +11067,7 @@ function getDrawerStyle({
|
|
|
11067
11067
|
};
|
|
11068
11068
|
}
|
|
11069
11069
|
var Drawer = forwardRef33(({
|
|
11070
|
-
open = false,
|
|
11070
|
+
open: open2 = false,
|
|
11071
11071
|
title,
|
|
11072
11072
|
children,
|
|
11073
11073
|
placement = "right",
|
|
@@ -11089,8 +11089,8 @@ var Drawer = forwardRef33(({
|
|
|
11089
11089
|
...props,
|
|
11090
11090
|
ref,
|
|
11091
11091
|
role,
|
|
11092
|
-
"aria-hidden":
|
|
11093
|
-
className: getDrawerClasses({ open, placement, size, className }),
|
|
11092
|
+
"aria-hidden": open2 ? undefined : true,
|
|
11093
|
+
className: getDrawerClasses({ open: open2, placement, size, className }),
|
|
11094
11094
|
style: getDrawerStyle({ width, height, style }),
|
|
11095
11095
|
children: [
|
|
11096
11096
|
showHeader ? /* @__PURE__ */ jsxs33("div", {
|
|
@@ -11242,21 +11242,21 @@ var defaultMaxHistoryLength = 10;
|
|
|
11242
11242
|
function canUseSessionStorage() {
|
|
11243
11243
|
return typeof window !== "undefined" && typeof window.sessionStorage !== "undefined";
|
|
11244
11244
|
}
|
|
11245
|
-
function readHistory(
|
|
11245
|
+
function readHistory(storageKey2) {
|
|
11246
11246
|
if (!canUseSessionStorage())
|
|
11247
11247
|
return [];
|
|
11248
11248
|
try {
|
|
11249
|
-
const raw = window.sessionStorage.getItem(
|
|
11249
|
+
const raw = window.sessionStorage.getItem(storageKey2);
|
|
11250
11250
|
const parsed = raw ? JSON.parse(raw) : [];
|
|
11251
11251
|
return Array.isArray(parsed) ? parsed : [];
|
|
11252
11252
|
} catch {
|
|
11253
11253
|
return [];
|
|
11254
11254
|
}
|
|
11255
11255
|
}
|
|
11256
|
-
function writeHistory(
|
|
11256
|
+
function writeHistory(storageKey2, history) {
|
|
11257
11257
|
if (!canUseSessionStorage())
|
|
11258
11258
|
return;
|
|
11259
|
-
window.sessionStorage.setItem(
|
|
11259
|
+
window.sessionStorage.setItem(storageKey2, JSON.stringify(history));
|
|
11260
11260
|
}
|
|
11261
11261
|
function currentLocation() {
|
|
11262
11262
|
if (typeof window === "undefined")
|
|
@@ -11310,7 +11310,7 @@ function collapseItems(items, maxVisibleItems) {
|
|
|
11310
11310
|
var DmBreadcrumb = forwardRef35(({
|
|
11311
11311
|
items,
|
|
11312
11312
|
isStoragePath = true,
|
|
11313
|
-
storageKey = defaultStorageKey,
|
|
11313
|
+
storageKey: storageKey2 = defaultStorageKey,
|
|
11314
11314
|
maxHistoryLength = defaultMaxHistoryLength,
|
|
11315
11315
|
maxVisibleItems,
|
|
11316
11316
|
compact,
|
|
@@ -11319,7 +11319,7 @@ var DmBreadcrumb = forwardRef35(({
|
|
|
11319
11319
|
separator,
|
|
11320
11320
|
...props
|
|
11321
11321
|
}, ref) => {
|
|
11322
|
-
const [currentHistory, setCurrentHistory] = useState30(() => history ?? readHistory(
|
|
11322
|
+
const [currentHistory, setCurrentHistory] = useState30(() => history ?? readHistory(storageKey2));
|
|
11323
11323
|
useEffect16(() => {
|
|
11324
11324
|
if (history) {
|
|
11325
11325
|
setCurrentHistory(history);
|
|
@@ -11333,10 +11333,10 @@ var DmBreadcrumb = forwardRef35(({
|
|
|
11333
11333
|
return;
|
|
11334
11334
|
setCurrentHistory((prevHistory) => {
|
|
11335
11335
|
const nextHistory = upsertHistory(prevHistory, locationItem, maxHistoryLength);
|
|
11336
|
-
writeHistory(
|
|
11336
|
+
writeHistory(storageKey2, nextHistory);
|
|
11337
11337
|
return nextHistory;
|
|
11338
11338
|
});
|
|
11339
|
-
}, [history, isStoragePath, maxHistoryLength,
|
|
11339
|
+
}, [history, isStoragePath, maxHistoryLength, storageKey2]);
|
|
11340
11340
|
const breadcrumbItems = useMemo12(() => {
|
|
11341
11341
|
const mappedItems = items.map((item, index) => {
|
|
11342
11342
|
const url = resolveRecentUrl(item, currentHistory, isStoragePath);
|
|
@@ -11627,13 +11627,13 @@ var menuSizeClasses = {
|
|
|
11627
11627
|
};
|
|
11628
11628
|
function getMenuClasses({
|
|
11629
11629
|
mode = "vertical",
|
|
11630
|
-
theme = "light",
|
|
11630
|
+
theme: theme2 = "light",
|
|
11631
11631
|
size = "md",
|
|
11632
11632
|
inlineCollapsed,
|
|
11633
11633
|
disabled,
|
|
11634
11634
|
className
|
|
11635
11635
|
}) {
|
|
11636
|
-
return cn(menuBaseClass, menuShowClass, menuModeClasses[mode], menuThemeClasses[
|
|
11636
|
+
return cn(menuBaseClass, menuShowClass, menuModeClasses[mode], menuThemeClasses[theme2], menuSizeClasses[size], inlineCollapsed && "menu-inline-collapsed", disabled && menuItemDisabledClass, className);
|
|
11637
11637
|
}
|
|
11638
11638
|
function getMenuItemClasses({
|
|
11639
11639
|
active,
|
|
@@ -11647,8 +11647,8 @@ function getMenuItemClasses({
|
|
|
11647
11647
|
|
|
11648
11648
|
// src/components/menu/Menu.tsx
|
|
11649
11649
|
import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
11650
|
-
function normalizeKeys2(
|
|
11651
|
-
return
|
|
11650
|
+
function normalizeKeys2(keys2) {
|
|
11651
|
+
return keys2?.map(String) ?? [];
|
|
11652
11652
|
}
|
|
11653
11653
|
function hasNode3(node) {
|
|
11654
11654
|
return node !== undefined && node !== null && node !== false;
|
|
@@ -11726,7 +11726,7 @@ var MenuRoot = forwardRef38(({
|
|
|
11726
11726
|
openKeys,
|
|
11727
11727
|
defaultOpenKeys,
|
|
11728
11728
|
mode = "vertical",
|
|
11729
|
-
theme = "light",
|
|
11729
|
+
theme: theme2 = "light",
|
|
11730
11730
|
size = "md",
|
|
11731
11731
|
selectable = true,
|
|
11732
11732
|
multiple,
|
|
@@ -11786,8 +11786,8 @@ var MenuRoot = forwardRef38(({
|
|
|
11786
11786
|
onClick?.(buildInfo(item, key, keyPath, event, nextSelectedKeys));
|
|
11787
11787
|
}
|
|
11788
11788
|
function toggleSubmenu(key) {
|
|
11789
|
-
const
|
|
11790
|
-
setNextOpenKeys(
|
|
11789
|
+
const open2 = currentOpenKeys.includes(key);
|
|
11790
|
+
setNextOpenKeys(open2 ? currentOpenKeys.filter((openKey) => openKey !== key) : [...currentOpenKeys, key]);
|
|
11791
11791
|
}
|
|
11792
11792
|
function renderItem(item, indexPath, parentKeyPath = []) {
|
|
11793
11793
|
if (item.type === "divider") {
|
|
@@ -11803,7 +11803,7 @@ var MenuRoot = forwardRef38(({
|
|
|
11803
11803
|
}
|
|
11804
11804
|
const hasChildren = Boolean(item.children?.length);
|
|
11805
11805
|
const selected = currentSelectedKeys.includes(key);
|
|
11806
|
-
const
|
|
11806
|
+
const open2 = currentOpenKeys.includes(key);
|
|
11807
11807
|
const itemDisabled = disabled || item.disabled;
|
|
11808
11808
|
if (hasChildren) {
|
|
11809
11809
|
return /* @__PURE__ */ jsxs37("li", {
|
|
@@ -11818,7 +11818,7 @@ var MenuRoot = forwardRef38(({
|
|
|
11818
11818
|
submenu: true
|
|
11819
11819
|
}),
|
|
11820
11820
|
disabled: itemDisabled,
|
|
11821
|
-
"aria-expanded":
|
|
11821
|
+
"aria-expanded": open2,
|
|
11822
11822
|
onClick: () => toggleSubmenu(key),
|
|
11823
11823
|
children: [
|
|
11824
11824
|
item.icon ? /* @__PURE__ */ jsx51("span", {
|
|
@@ -11834,7 +11834,7 @@ var MenuRoot = forwardRef38(({
|
|
|
11834
11834
|
}) : null
|
|
11835
11835
|
]
|
|
11836
11836
|
}),
|
|
11837
|
-
|
|
11837
|
+
open2 ? /* @__PURE__ */ jsx51("ul", {
|
|
11838
11838
|
className: cn(menuSubmenuClass, "menu-show"),
|
|
11839
11839
|
children: item.children?.map((child, childIndex) => renderItem(child, [...indexPath, childIndex], keyPath))
|
|
11840
11840
|
}) : null
|
|
@@ -11867,7 +11867,7 @@ var MenuRoot = forwardRef38(({
|
|
|
11867
11867
|
role: props.role ?? "menu",
|
|
11868
11868
|
className: getMenuClasses({
|
|
11869
11869
|
mode,
|
|
11870
|
-
theme,
|
|
11870
|
+
theme: theme2,
|
|
11871
11871
|
size,
|
|
11872
11872
|
inlineCollapsed,
|
|
11873
11873
|
disabled,
|
|
@@ -12077,8 +12077,8 @@ function breadcrumbFromPath({
|
|
|
12077
12077
|
};
|
|
12078
12078
|
});
|
|
12079
12079
|
}
|
|
12080
|
-
function unique(
|
|
12081
|
-
return Array.from(new Set(
|
|
12080
|
+
function unique(keys2) {
|
|
12081
|
+
return Array.from(new Set(keys2.filter(Boolean)));
|
|
12082
12082
|
}
|
|
12083
12083
|
function deriveDmLayoutSelection({
|
|
12084
12084
|
menus = [],
|
|
@@ -12590,37 +12590,37 @@ var DropdownRoot = forwardRef43(({
|
|
|
12590
12590
|
onMouseEnter,
|
|
12591
12591
|
onMouseLeave,
|
|
12592
12592
|
onOpenChange,
|
|
12593
|
-
open,
|
|
12593
|
+
open: open3,
|
|
12594
12594
|
overlay,
|
|
12595
12595
|
placement = "bottomLeft",
|
|
12596
12596
|
trigger = ["hover"],
|
|
12597
12597
|
...props
|
|
12598
12598
|
}, ref) => {
|
|
12599
12599
|
const [internalOpen, setInternalOpen] = useState35(Boolean(defaultOpen));
|
|
12600
|
-
const [nativeOpen, setNativeOpen] = useState35(Boolean(
|
|
12601
|
-
const visible =
|
|
12600
|
+
const [nativeOpen, setNativeOpen] = useState35(Boolean(open3 ?? defaultOpen));
|
|
12601
|
+
const visible = open3 ?? internalOpen;
|
|
12602
12602
|
const popupRef = useRef22(null);
|
|
12603
12603
|
const popupId = useId18();
|
|
12604
12604
|
const anchorName = `--dm-dropdown-${popupId.replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
12605
12605
|
const clickTrigger = trigger.includes("click") || trigger.includes("hover");
|
|
12606
12606
|
useEffect19(() => {
|
|
12607
|
-
const
|
|
12608
|
-
if (!
|
|
12607
|
+
const popup2 = popupRef.current;
|
|
12608
|
+
if (!popup2?.showPopover || !popup2?.hidePopover)
|
|
12609
12609
|
return;
|
|
12610
|
-
if (visible && !
|
|
12611
|
-
|
|
12612
|
-
if (!visible &&
|
|
12613
|
-
|
|
12610
|
+
if (visible && !popup2.matches(":popover-open"))
|
|
12611
|
+
popup2.showPopover();
|
|
12612
|
+
if (!visible && popup2.matches(":popover-open"))
|
|
12613
|
+
popup2.hidePopover();
|
|
12614
12614
|
}, [visible]);
|
|
12615
12615
|
function setVisible(nextOpen) {
|
|
12616
|
-
if (
|
|
12616
|
+
if (open3 === undefined)
|
|
12617
12617
|
setInternalOpen(nextOpen);
|
|
12618
12618
|
onOpenChange?.(nextOpen);
|
|
12619
12619
|
}
|
|
12620
12620
|
function close() {
|
|
12621
|
-
const
|
|
12622
|
-
if (
|
|
12623
|
-
|
|
12621
|
+
const popup2 = popupRef.current;
|
|
12622
|
+
if (popup2?.matches(":popover-open"))
|
|
12623
|
+
popup2.hidePopover();
|
|
12624
12624
|
else
|
|
12625
12625
|
setVisible(false);
|
|
12626
12626
|
}
|
|
@@ -12863,12 +12863,12 @@ function DmToolbar({
|
|
|
12863
12863
|
maxVisibleSecondaryItems
|
|
12864
12864
|
}) {
|
|
12865
12865
|
const { visibleSecondaryItems, overflowSecondaryItems, primaryItems } = useMemo15(() => {
|
|
12866
|
-
const
|
|
12866
|
+
const primaryItems2 = items.filter(isPrimary);
|
|
12867
12867
|
const secondaryItems = items.filter((item) => !isPrimary(item));
|
|
12868
12868
|
const visibleLimit = maxVisibleSecondaryItems === undefined ? secondaryItems.length : Math.max(0, maxVisibleSecondaryItems);
|
|
12869
|
-
const
|
|
12870
|
-
const
|
|
12871
|
-
return { visibleSecondaryItems, overflowSecondaryItems, primaryItems };
|
|
12869
|
+
const visibleSecondaryItems2 = visibleLimit === 0 ? [] : secondaryItems.slice(-visibleLimit);
|
|
12870
|
+
const overflowSecondaryItems2 = visibleLimit >= secondaryItems.length ? [] : secondaryItems.slice(0, secondaryItems.length - visibleLimit);
|
|
12871
|
+
return { visibleSecondaryItems: visibleSecondaryItems2, overflowSecondaryItems: overflowSecondaryItems2, primaryItems: primaryItems2 };
|
|
12872
12872
|
}, [items, maxVisibleSecondaryItems]);
|
|
12873
12873
|
const showMore = overflowSecondaryItems.length > 0;
|
|
12874
12874
|
return /* @__PURE__ */ jsxs42("div", {
|
|
@@ -13128,7 +13128,7 @@ var Pagination = forwardRef44(({
|
|
|
13128
13128
|
current,
|
|
13129
13129
|
defaultCurrent = 1,
|
|
13130
13130
|
pageSize,
|
|
13131
|
-
defaultPageSize = 10,
|
|
13131
|
+
defaultPageSize: defaultPageSize2 = 10,
|
|
13132
13132
|
total = 0,
|
|
13133
13133
|
onChange,
|
|
13134
13134
|
disabled,
|
|
@@ -13143,9 +13143,9 @@ var Pagination = forwardRef44(({
|
|
|
13143
13143
|
const isCurrentControlled = current !== undefined;
|
|
13144
13144
|
const isPageSizeControlled = pageSize !== undefined;
|
|
13145
13145
|
const [internalCurrent, setInternalCurrent] = useState36(defaultCurrent);
|
|
13146
|
-
const [internalPageSize, setInternalPageSize] = useState36(
|
|
13146
|
+
const [internalPageSize, setInternalPageSize] = useState36(defaultPageSize2);
|
|
13147
13147
|
const [quickJumpValue, setQuickJumpValue] = useState36("");
|
|
13148
|
-
const mergedPageSize = toPositiveInteger(pageSize ?? internalPageSize,
|
|
13148
|
+
const mergedPageSize = toPositiveInteger(pageSize ?? internalPageSize, defaultPageSize2);
|
|
13149
13149
|
const pageCount = getPageCount(total, mergedPageSize);
|
|
13150
13150
|
const mergedCurrent = clampPage(toPositiveInteger(current ?? internalCurrent, defaultCurrent), pageCount);
|
|
13151
13151
|
const pageTokens = useMemo17(() => getPageTokens(mergedCurrent, pageCount), [mergedCurrent, pageCount]);
|
|
@@ -13376,11 +13376,11 @@ var DmPagination = forwardRef45(({
|
|
|
13376
13376
|
if (Number(nextTotal) === 0)
|
|
13377
13377
|
return "";
|
|
13378
13378
|
const selected = renderSelected(selectedTotal, mergedLocale);
|
|
13379
|
-
const
|
|
13379
|
+
const message2 = mergedSimple && !showTotalFullMessage ? mergedLocale.showTotalSimple(nextTotal, range, selectedTotal) : mergedLocale.showTotal(nextTotal, range, selectedTotal);
|
|
13380
13380
|
return /* @__PURE__ */ jsxs45("span", {
|
|
13381
13381
|
title: `${mergedLocale.showTotal(nextTotal, range, selectedTotal)}${selectedTotal ? mergedLocale.selected(selectedTotal) : ""}`,
|
|
13382
13382
|
children: [
|
|
13383
|
-
|
|
13383
|
+
message2,
|
|
13384
13384
|
selected
|
|
13385
13385
|
]
|
|
13386
13386
|
});
|
|
@@ -14010,14 +14010,14 @@ function getRecordKey(record, index, rowKey) {
|
|
|
14010
14010
|
return rowKey(record, index);
|
|
14011
14011
|
}
|
|
14012
14012
|
if (rowKey) {
|
|
14013
|
-
const
|
|
14014
|
-
return typeof
|
|
14013
|
+
const key2 = record[rowKey];
|
|
14014
|
+
return typeof key2 === "string" || typeof key2 === "number" ? key2 : index;
|
|
14015
14015
|
}
|
|
14016
14016
|
const key = record.key;
|
|
14017
14017
|
return typeof key === "string" || typeof key === "number" ? key : index;
|
|
14018
14018
|
}
|
|
14019
|
-
function normalizeKeys3(
|
|
14020
|
-
return
|
|
14019
|
+
function normalizeKeys3(keys2) {
|
|
14020
|
+
return keys2?.map(String) ?? [];
|
|
14021
14021
|
}
|
|
14022
14022
|
function normalizeColumns(columns, prefix = "column") {
|
|
14023
14023
|
return columns.map((column, index) => {
|
|
@@ -14089,8 +14089,8 @@ function nextSortOrder(column, current) {
|
|
|
14089
14089
|
const index = directions.findIndex((order) => order === (current ?? null));
|
|
14090
14090
|
return directions[(index + 1) % directions.length] ?? null;
|
|
14091
14091
|
}
|
|
14092
|
-
function selectedRowsForKeys(data,
|
|
14093
|
-
const keySet = new Set(normalizeKeys3(
|
|
14092
|
+
function selectedRowsForKeys(data, keys2, rowKey) {
|
|
14093
|
+
const keySet = new Set(normalizeKeys3(keys2));
|
|
14094
14094
|
return data.filter((record, index) => keySet.has(String(getRecordKey(record, index, rowKey))));
|
|
14095
14095
|
}
|
|
14096
14096
|
var Column = forwardRef48(() => null);
|
|
@@ -14164,17 +14164,17 @@ function resolvePagination(pagination, total) {
|
|
|
14164
14164
|
if (pagination === false) {
|
|
14165
14165
|
return null;
|
|
14166
14166
|
}
|
|
14167
|
-
const
|
|
14167
|
+
const config2 = pagination ?? {};
|
|
14168
14168
|
return {
|
|
14169
|
-
current:
|
|
14170
|
-
defaultCurrent:
|
|
14171
|
-
pageSize:
|
|
14172
|
-
defaultPageSize:
|
|
14173
|
-
total:
|
|
14174
|
-
disabled:
|
|
14175
|
-
hideOnSinglePage:
|
|
14176
|
-
showTotal:
|
|
14177
|
-
onChange:
|
|
14169
|
+
current: config2.current,
|
|
14170
|
+
defaultCurrent: config2.defaultCurrent ?? 1,
|
|
14171
|
+
pageSize: config2.pageSize,
|
|
14172
|
+
defaultPageSize: config2.defaultPageSize ?? defaultPageSize2,
|
|
14173
|
+
total: config2.total ?? total,
|
|
14174
|
+
disabled: config2.disabled,
|
|
14175
|
+
hideOnSinglePage: config2.hideOnSinglePage,
|
|
14176
|
+
showTotal: config2.showTotal,
|
|
14177
|
+
onChange: config2.onChange
|
|
14178
14178
|
};
|
|
14179
14179
|
}
|
|
14180
14180
|
function TableRoot({
|
|
@@ -14716,7 +14716,7 @@ function DmTable({
|
|
|
14716
14716
|
color: "secondary",
|
|
14717
14717
|
appearance: "outline",
|
|
14718
14718
|
className: dmTableColumnSettingClass,
|
|
14719
|
-
onClick: () => setColumnSettingsOpen((
|
|
14719
|
+
onClick: () => setColumnSettingsOpen((open3) => !open3),
|
|
14720
14720
|
children: "Columns"
|
|
14721
14721
|
}) : null
|
|
14722
14722
|
]
|
|
@@ -14835,8 +14835,8 @@ var DmProvider = forwardRef49(({
|
|
|
14835
14835
|
component = "div",
|
|
14836
14836
|
direction,
|
|
14837
14837
|
locale,
|
|
14838
|
-
prefixCls,
|
|
14839
|
-
theme,
|
|
14838
|
+
prefixCls: prefixCls2,
|
|
14839
|
+
theme: theme2,
|
|
14840
14840
|
...props
|
|
14841
14841
|
}, ref) => {
|
|
14842
14842
|
const [currentTheme, setCurrentTheme] = useState42(() => getDmTheme());
|
|
@@ -14846,16 +14846,16 @@ var DmProvider = forwardRef49(({
|
|
|
14846
14846
|
});
|
|
14847
14847
|
}, []);
|
|
14848
14848
|
useEffect22(() => {
|
|
14849
|
-
if (
|
|
14850
|
-
setDmPrefixCls(
|
|
14849
|
+
if (prefixCls2) {
|
|
14850
|
+
setDmPrefixCls(prefixCls2);
|
|
14851
14851
|
}
|
|
14852
|
-
}, [
|
|
14852
|
+
}, [prefixCls2]);
|
|
14853
14853
|
useEffect22(() => {
|
|
14854
|
-
const colorPrimary =
|
|
14854
|
+
const colorPrimary = theme2?.token?.colorPrimary;
|
|
14855
14855
|
if (typeof colorPrimary === "string") {
|
|
14856
14856
|
setDmPrimaryColor(colorPrimary);
|
|
14857
14857
|
}
|
|
14858
|
-
}, [
|
|
14858
|
+
}, [theme2]);
|
|
14859
14859
|
return /* @__PURE__ */ jsx67(ConfigProvider, {
|
|
14860
14860
|
...props,
|
|
14861
14861
|
ref,
|
|
@@ -14863,8 +14863,8 @@ var DmProvider = forwardRef49(({
|
|
|
14863
14863
|
className: getDmProviderClasses({ className }),
|
|
14864
14864
|
direction,
|
|
14865
14865
|
locale,
|
|
14866
|
-
prefixCls:
|
|
14867
|
-
theme:
|
|
14866
|
+
prefixCls: prefixCls2 ?? currentTheme.prefixCls,
|
|
14867
|
+
theme: theme2 ?? currentTheme,
|
|
14868
14868
|
children
|
|
14869
14869
|
});
|
|
14870
14870
|
});
|
|
@@ -15441,8 +15441,8 @@ function useDelayedSpinning(spinning, delay) {
|
|
|
15441
15441
|
return;
|
|
15442
15442
|
}
|
|
15443
15443
|
if (!spinning) {
|
|
15444
|
-
const
|
|
15445
|
-
return () => window.clearTimeout(
|
|
15444
|
+
const resetTimer2 = window.setTimeout(() => setDelayedActive(false), 0);
|
|
15445
|
+
return () => window.clearTimeout(resetTimer2);
|
|
15446
15446
|
}
|
|
15447
15447
|
const resetTimer = window.setTimeout(() => setDelayedActive(false), 0);
|
|
15448
15448
|
const showTimer = window.setTimeout(() => setDelayedActive(true), delay);
|
|
@@ -16101,11 +16101,11 @@ function getTreeNodeClasses({
|
|
|
16101
16101
|
|
|
16102
16102
|
// src/components/tree/Tree.tsx
|
|
16103
16103
|
import { jsx as jsx76, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
16104
|
-
function normalizeKeys4(
|
|
16105
|
-
return
|
|
16104
|
+
function normalizeKeys4(keys2) {
|
|
16105
|
+
return keys2?.map(String) ?? [];
|
|
16106
16106
|
}
|
|
16107
|
-
function uniqueKeys(
|
|
16108
|
-
return Array.from(new Set(
|
|
16107
|
+
function uniqueKeys(keys2) {
|
|
16108
|
+
return Array.from(new Set(keys2));
|
|
16109
16109
|
}
|
|
16110
16110
|
function hasNode5(node) {
|
|
16111
16111
|
return node !== undefined && node !== null && node !== false;
|
|
@@ -16153,8 +16153,8 @@ function eventInfo(item, nativeEvent) {
|
|
|
16153
16153
|
nativeEvent
|
|
16154
16154
|
};
|
|
16155
16155
|
}
|
|
16156
|
-
function checkedNodesFromKeys(flatNodes,
|
|
16157
|
-
const keySet = new Set(
|
|
16156
|
+
function checkedNodesFromKeys(flatNodes, keys2) {
|
|
16157
|
+
const keySet = new Set(keys2);
|
|
16158
16158
|
return flatNodes.filter((item) => keySet.has(item.keyString)).map((item) => item.node);
|
|
16159
16159
|
}
|
|
16160
16160
|
function treeDataFromChildren(children) {
|
|
@@ -16543,18 +16543,18 @@ function parentKeys(treeData, fieldNames) {
|
|
|
16543
16543
|
return [];
|
|
16544
16544
|
const keyField = fieldName(fieldNames, "key");
|
|
16545
16545
|
const childrenField = fieldName(fieldNames, "children");
|
|
16546
|
-
const
|
|
16546
|
+
const keys2 = [];
|
|
16547
16547
|
function visit(nodes) {
|
|
16548
16548
|
nodes.forEach((node) => {
|
|
16549
16549
|
const children = node[childrenField];
|
|
16550
16550
|
if (Array.isArray(children) && children.length > 0) {
|
|
16551
|
-
|
|
16551
|
+
keys2.push(node[keyField] ?? node.key);
|
|
16552
16552
|
visit(children);
|
|
16553
16553
|
}
|
|
16554
16554
|
});
|
|
16555
16555
|
}
|
|
16556
16556
|
visit(treeData);
|
|
16557
|
-
return
|
|
16557
|
+
return keys2;
|
|
16558
16558
|
}
|
|
16559
16559
|
function renderToolbar2(toolbar, selectedKey, getSelectedItem) {
|
|
16560
16560
|
if (!toolbar)
|
|
@@ -16628,8 +16628,8 @@ function CommonDmTree({
|
|
|
16628
16628
|
function commitSelection(nextItem, nextKey) {
|
|
16629
16629
|
onChange?.(nextItem, nextKey, selectedKey);
|
|
16630
16630
|
}
|
|
16631
|
-
function handleSelect(
|
|
16632
|
-
const nextKey =
|
|
16631
|
+
function handleSelect(keys2) {
|
|
16632
|
+
const nextKey = keys2[0];
|
|
16633
16633
|
const nextItem = findNode(treeData, nextKey, fieldNames);
|
|
16634
16634
|
if (!nextItem || nextKey === undefined)
|
|
16635
16635
|
return;
|
|
@@ -16645,7 +16645,7 @@ function CommonDmTree({
|
|
|
16645
16645
|
commitSelection(nextItem, nextKey);
|
|
16646
16646
|
}
|
|
16647
16647
|
}
|
|
16648
|
-
function
|
|
16648
|
+
function renderTitle2(node) {
|
|
16649
16649
|
const source = node.data ?? node;
|
|
16650
16650
|
const titleField = fieldName(fieldNames, "title");
|
|
16651
16651
|
const title = source[titleField] ?? source.title;
|
|
@@ -16731,11 +16731,11 @@ function CommonDmTree({
|
|
|
16731
16731
|
expandedKeys: treeExpandedKeys,
|
|
16732
16732
|
showLine: showLine ?? parentKeys(treeData, fieldNames).length > 0,
|
|
16733
16733
|
blockNode: true,
|
|
16734
|
-
titleRender:
|
|
16735
|
-
onSelect: (
|
|
16736
|
-
onExpand: (
|
|
16737
|
-
setInternalExpandedKeys(
|
|
16738
|
-
onExpand?.(
|
|
16734
|
+
titleRender: renderTitle2,
|
|
16735
|
+
onSelect: (keys2) => handleSelect(keys2),
|
|
16736
|
+
onExpand: (keys2, info) => {
|
|
16737
|
+
setInternalExpandedKeys(keys2);
|
|
16738
|
+
onExpand?.(keys2, info);
|
|
16739
16739
|
}
|
|
16740
16740
|
}) : emptyNode ?? /* @__PURE__ */ jsx77(DmStatus, {
|
|
16741
16741
|
status: "empty"
|
|
@@ -16853,11 +16853,11 @@ var tooltipSizeClasses = {
|
|
|
16853
16853
|
function getTooltipClasses({
|
|
16854
16854
|
placement = "top",
|
|
16855
16855
|
size = "md",
|
|
16856
|
-
open,
|
|
16856
|
+
open: open3,
|
|
16857
16857
|
arrow = true,
|
|
16858
16858
|
className
|
|
16859
16859
|
}) {
|
|
16860
|
-
return cn(tooltipBaseClass, tooltipPlacementClasses[placement], tooltipSizeClasses[size],
|
|
16860
|
+
return cn(tooltipBaseClass, tooltipPlacementClasses[placement], tooltipSizeClasses[size], open3 && tooltipShowClass, !arrow && tooltipNoArrowClass, className);
|
|
16861
16861
|
}
|
|
16862
16862
|
|
|
16863
16863
|
// src/components/tooltip/Tooltip.tsx
|
|
@@ -16865,7 +16865,7 @@ import { jsx as jsx78, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
|
16865
16865
|
var Tooltip = forwardRef59(({
|
|
16866
16866
|
title,
|
|
16867
16867
|
placement = "top",
|
|
16868
|
-
open,
|
|
16868
|
+
open: open3,
|
|
16869
16869
|
defaultOpen,
|
|
16870
16870
|
onOpenChange,
|
|
16871
16871
|
arrow = false,
|
|
@@ -16880,8 +16880,8 @@ var Tooltip = forwardRef59(({
|
|
|
16880
16880
|
...props
|
|
16881
16881
|
}, ref) => {
|
|
16882
16882
|
const [internalOpen, setInternalOpen] = useState50(Boolean(defaultOpen));
|
|
16883
|
-
const isControlled =
|
|
16884
|
-
const visible = isControlled ?
|
|
16883
|
+
const isControlled = open3 !== undefined;
|
|
16884
|
+
const visible = isControlled ? open3 : internalOpen;
|
|
16885
16885
|
const reactId = useId20();
|
|
16886
16886
|
const tooltipId = props.id !== undefined ? `${props.id}-tooltip` : `${reactId}-tooltip`;
|
|
16887
16887
|
const anchor = `--tooltip-${reactId.replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
@@ -17374,10 +17374,10 @@ function getFloatButtonClasses({
|
|
|
17374
17374
|
}
|
|
17375
17375
|
function getFloatButtonGroupClasses({
|
|
17376
17376
|
shape = "circle",
|
|
17377
|
-
open = true,
|
|
17377
|
+
open: open3 = true,
|
|
17378
17378
|
className
|
|
17379
17379
|
}) {
|
|
17380
|
-
return cn(floatButtonGroupClass, "fixed bottom-6 right-6 z-50 flex flex-col-reverse items-end gap-3", shape === "square" && "items-stretch",
|
|
17380
|
+
return cn(floatButtonGroupClass, "fixed bottom-6 right-6 z-50 flex flex-col-reverse items-end gap-3", shape === "square" && "items-stretch", open3 && floatButtonGroupOpenClass, className);
|
|
17381
17381
|
}
|
|
17382
17382
|
function getFloatButtonBackTopClasses({
|
|
17383
17383
|
visible,
|
|
@@ -17513,7 +17513,7 @@ InternalFloatButton.displayName = "FloatButton";
|
|
|
17513
17513
|
var FloatButtonGroup = forwardRef62(({
|
|
17514
17514
|
shape = "circle",
|
|
17515
17515
|
trigger,
|
|
17516
|
-
open,
|
|
17516
|
+
open: open3,
|
|
17517
17517
|
closeIcon,
|
|
17518
17518
|
children,
|
|
17519
17519
|
className,
|
|
@@ -17522,9 +17522,9 @@ var FloatButtonGroup = forwardRef62(({
|
|
|
17522
17522
|
onMouseLeave,
|
|
17523
17523
|
...props
|
|
17524
17524
|
}, ref) => {
|
|
17525
|
-
const isControlled =
|
|
17525
|
+
const isControlled = open3 !== undefined;
|
|
17526
17526
|
const [internalOpen, setInternalOpen] = useState52(trigger ? false : true);
|
|
17527
|
-
const visible = isControlled ?
|
|
17527
|
+
const visible = isControlled ? open3 : internalOpen;
|
|
17528
17528
|
return /* @__PURE__ */ jsx81(FloatButtonGroupContext.Provider, {
|
|
17529
17529
|
value: { shape },
|
|
17530
17530
|
children: /* @__PURE__ */ jsxs61("div", {
|
|
@@ -17773,10 +17773,10 @@ function getFormClasses({
|
|
|
17773
17773
|
}
|
|
17774
17774
|
function getFormItemClasses({
|
|
17775
17775
|
required,
|
|
17776
|
-
error,
|
|
17776
|
+
error: error3,
|
|
17777
17777
|
className
|
|
17778
17778
|
}) {
|
|
17779
|
-
return cn(formItemClass, required && formItemRequiredClass,
|
|
17779
|
+
return cn(formItemClass, required && formItemRequiredClass, error3 && formItemErrorClass, className);
|
|
17780
17780
|
}
|
|
17781
17781
|
|
|
17782
17782
|
// src/components/form/Form.tsx
|
|
@@ -17787,18 +17787,18 @@ function nameKey(name) {
|
|
|
17787
17787
|
function isEmpty(value) {
|
|
17788
17788
|
return value === undefined || value === null || value === "" || Array.isArray(value) && value.length === 0;
|
|
17789
17789
|
}
|
|
17790
|
-
function createFormStore(
|
|
17791
|
-
let initial = { ...
|
|
17792
|
-
let values = { ...
|
|
17790
|
+
function createFormStore(initialValues2 = {}) {
|
|
17791
|
+
let initial = { ...initialValues2 };
|
|
17792
|
+
let values = { ...initialValues2 };
|
|
17793
17793
|
let submitHandler = () => {
|
|
17794
17794
|
return;
|
|
17795
17795
|
};
|
|
17796
|
-
let
|
|
17797
|
-
const
|
|
17796
|
+
let version2 = 0;
|
|
17797
|
+
const listeners3 = new Set;
|
|
17798
17798
|
const rules = new Map;
|
|
17799
|
-
function
|
|
17800
|
-
|
|
17801
|
-
for (const listener of
|
|
17799
|
+
function emit2() {
|
|
17800
|
+
version2 += 1;
|
|
17801
|
+
for (const listener of listeners3) {
|
|
17802
17802
|
listener();
|
|
17803
17803
|
}
|
|
17804
17804
|
}
|
|
@@ -17807,11 +17807,11 @@ function createFormStore(initialValues = {}) {
|
|
|
17807
17807
|
getFieldsValue: () => ({ ...values }),
|
|
17808
17808
|
setFieldValue: (name, value) => {
|
|
17809
17809
|
values = { ...values, [nameKey(name)]: value };
|
|
17810
|
-
|
|
17810
|
+
emit2();
|
|
17811
17811
|
},
|
|
17812
17812
|
setFieldsValue: (nextValues) => {
|
|
17813
17813
|
values = { ...values, ...nextValues };
|
|
17814
|
-
|
|
17814
|
+
emit2();
|
|
17815
17815
|
},
|
|
17816
17816
|
resetFields: (names) => {
|
|
17817
17817
|
if (!names) {
|
|
@@ -17822,14 +17822,14 @@ function createFormStore(initialValues = {}) {
|
|
|
17822
17822
|
values[nameKey(name)] = initial[nameKey(name)];
|
|
17823
17823
|
}
|
|
17824
17824
|
}
|
|
17825
|
-
|
|
17825
|
+
emit2();
|
|
17826
17826
|
},
|
|
17827
17827
|
validateFields: async (names) => {
|
|
17828
|
-
const
|
|
17828
|
+
const keys2 = names?.map(nameKey);
|
|
17829
17829
|
const errorFields = [];
|
|
17830
17830
|
for (const entry of rules.values()) {
|
|
17831
17831
|
const key = nameKey(entry.name);
|
|
17832
|
-
if (
|
|
17832
|
+
if (keys2 && !keys2.includes(key)) {
|
|
17833
17833
|
continue;
|
|
17834
17834
|
}
|
|
17835
17835
|
const value = values[key];
|
|
@@ -17841,8 +17841,8 @@ function createFormStore(initialValues = {}) {
|
|
|
17841
17841
|
if (rule.validator) {
|
|
17842
17842
|
try {
|
|
17843
17843
|
await rule.validator(rule, value);
|
|
17844
|
-
} catch (
|
|
17845
|
-
errors.push(
|
|
17844
|
+
} catch (error3) {
|
|
17845
|
+
errors.push(error3 instanceof Error ? error3.message : String(error3));
|
|
17846
17846
|
}
|
|
17847
17847
|
}
|
|
17848
17848
|
}
|
|
@@ -17857,10 +17857,10 @@ function createFormStore(initialValues = {}) {
|
|
|
17857
17857
|
},
|
|
17858
17858
|
submit: () => submitHandler(),
|
|
17859
17859
|
__subscribe: (listener) => {
|
|
17860
|
-
|
|
17861
|
-
return () =>
|
|
17860
|
+
listeners3.add(listener);
|
|
17861
|
+
return () => listeners3.delete(listener);
|
|
17862
17862
|
},
|
|
17863
|
-
__getVersion: () =>
|
|
17863
|
+
__getVersion: () => version2,
|
|
17864
17864
|
__setSubmit: (submit) => {
|
|
17865
17865
|
submitHandler = submit;
|
|
17866
17866
|
},
|
|
@@ -17873,8 +17873,8 @@ function createFormStore(initialValues = {}) {
|
|
|
17873
17873
|
}
|
|
17874
17874
|
var FormContext = createContext8(null);
|
|
17875
17875
|
var ProviderContext = createContext8({});
|
|
17876
|
-
function useInternalForm(form,
|
|
17877
|
-
const [internalForm] = useState53(() => form ?? createFormStore(
|
|
17876
|
+
function useInternalForm(form, initialValues2) {
|
|
17877
|
+
const [internalForm] = useState53(() => form ?? createFormStore(initialValues2));
|
|
17878
17878
|
return internalForm;
|
|
17879
17879
|
}
|
|
17880
17880
|
function useForm(form) {
|
|
@@ -17904,7 +17904,7 @@ var FormBase = forwardRef64(({
|
|
|
17904
17904
|
className,
|
|
17905
17905
|
disabled,
|
|
17906
17906
|
form,
|
|
17907
|
-
initialValues,
|
|
17907
|
+
initialValues: initialValues2,
|
|
17908
17908
|
layout = "horizontal",
|
|
17909
17909
|
labelCol,
|
|
17910
17910
|
wrapperCol,
|
|
@@ -17916,8 +17916,8 @@ var FormBase = forwardRef64(({
|
|
|
17916
17916
|
name,
|
|
17917
17917
|
...props
|
|
17918
17918
|
}, ref) => {
|
|
17919
|
-
const formInstance = useInternalForm(form,
|
|
17920
|
-
const initialValuesRef = useRef30(
|
|
17919
|
+
const formInstance = useInternalForm(form, initialValues2);
|
|
17920
|
+
const initialValuesRef = useRef30(initialValues2);
|
|
17921
17921
|
const [errors, setErrors] = useState53({});
|
|
17922
17922
|
const [, rerender] = useState53(0);
|
|
17923
17923
|
const providerForms = useContext8(ProviderContext);
|
|
@@ -17939,20 +17939,20 @@ var FormBase = forwardRef64(({
|
|
|
17939
17939
|
submit();
|
|
17940
17940
|
});
|
|
17941
17941
|
});
|
|
17942
|
-
const setFieldError = useCallback11((
|
|
17942
|
+
const setFieldError = useCallback11((fieldName2, fieldErrors) => {
|
|
17943
17943
|
setErrors((current) => ({
|
|
17944
17944
|
...current,
|
|
17945
|
-
[nameKey(
|
|
17945
|
+
[nameKey(fieldName2)]: fieldErrors
|
|
17946
17946
|
}));
|
|
17947
17947
|
}, []);
|
|
17948
|
-
const getFieldError = useCallback11((
|
|
17949
|
-
return errors[nameKey(
|
|
17948
|
+
const getFieldError = useCallback11((fieldName2) => {
|
|
17949
|
+
return errors[nameKey(fieldName2)] ?? [];
|
|
17950
17950
|
}, [errors]);
|
|
17951
|
-
const registerField = useCallback11((
|
|
17951
|
+
const registerField = useCallback11((fieldName2, rules = []) => {
|
|
17952
17952
|
const store = formInstance.__getRules?.();
|
|
17953
|
-
store?.set(nameKey(
|
|
17953
|
+
store?.set(nameKey(fieldName2), { name: fieldName2, rules });
|
|
17954
17954
|
return () => {
|
|
17955
|
-
store?.delete(nameKey(
|
|
17955
|
+
store?.delete(nameKey(fieldName2));
|
|
17956
17956
|
};
|
|
17957
17957
|
}, [formInstance]);
|
|
17958
17958
|
async function submit() {
|
|
@@ -17961,8 +17961,8 @@ var FormBase = forwardRef64(({
|
|
|
17961
17961
|
setErrors({});
|
|
17962
17962
|
onFinish?.(values);
|
|
17963
17963
|
providerForms[formName]?.submit;
|
|
17964
|
-
} catch (
|
|
17965
|
-
const errorFields = Array.isArray(
|
|
17964
|
+
} catch (error3) {
|
|
17965
|
+
const errorFields = Array.isArray(error3) ? error3 : [];
|
|
17966
17966
|
const nextErrors = {};
|
|
17967
17967
|
for (const field of errorFields) {
|
|
17968
17968
|
nextErrors[nameKey(field.name)] = field.errors;
|
|
@@ -18097,8 +18097,8 @@ var FormItem = forwardRef64(({
|
|
|
18097
18097
|
}) : null,
|
|
18098
18098
|
help || fieldErrors.length > 0 ? /* @__PURE__ */ jsx83("div", {
|
|
18099
18099
|
className: formItemHelpClass,
|
|
18100
|
-
children: help ?? fieldErrors.map((
|
|
18101
|
-
children:
|
|
18100
|
+
children: help ?? fieldErrors.map((error3, index) => /* @__PURE__ */ jsx83("div", {
|
|
18101
|
+
children: error3
|
|
18102
18102
|
}, index))
|
|
18103
18103
|
}) : null
|
|
18104
18104
|
]
|
|
@@ -18142,8 +18142,8 @@ var ErrorList = forwardRef64(({ errors = [], className, ...props }, ref) => /* @
|
|
|
18142
18142
|
...props,
|
|
18143
18143
|
ref,
|
|
18144
18144
|
className: [formErrorListClass, className].filter(Boolean).join(" "),
|
|
18145
|
-
children: errors.map((
|
|
18146
|
-
children:
|
|
18145
|
+
children: errors.map((error3, index) => /* @__PURE__ */ jsx83("div", {
|
|
18146
|
+
children: error3
|
|
18147
18147
|
}, index))
|
|
18148
18148
|
}));
|
|
18149
18149
|
ErrorList.displayName = "Form.ErrorList";
|
|
@@ -18276,10 +18276,10 @@ var imagePreviewMaskClass = "image-preview-mask";
|
|
|
18276
18276
|
var imagePreviewGroupClass = "image-preview-group";
|
|
18277
18277
|
function getImageClasses({
|
|
18278
18278
|
preview,
|
|
18279
|
-
error,
|
|
18279
|
+
error: error3,
|
|
18280
18280
|
className
|
|
18281
18281
|
}) {
|
|
18282
|
-
return cn(imageBaseClass, preview ? imagePreviewClass : imagePreviewDisabledClass,
|
|
18282
|
+
return cn(imageBaseClass, preview ? imagePreviewClass : imagePreviewDisabledClass, error3 && imageErrorClass, className);
|
|
18283
18283
|
}
|
|
18284
18284
|
function getImagePreviewGroupClasses({
|
|
18285
18285
|
className
|
|
@@ -18323,9 +18323,9 @@ var ImageBase = forwardRef65(({
|
|
|
18323
18323
|
const [loading, setLoading] = useState54(Boolean(src));
|
|
18324
18324
|
const [failed, setFailed] = useState54(false);
|
|
18325
18325
|
const [internalPreviewVisible, setInternalPreviewVisible] = useState54(false);
|
|
18326
|
-
const
|
|
18326
|
+
const config2 = previewConfig(preview);
|
|
18327
18327
|
const isPreviewEnabled = previewEnabled(preview);
|
|
18328
|
-
const previewVisible =
|
|
18328
|
+
const previewVisible = config2.visible ?? internalPreviewVisible;
|
|
18329
18329
|
const hasImage = Boolean(currentSrc);
|
|
18330
18330
|
useEffect29(() => {
|
|
18331
18331
|
setCurrentSrc(src);
|
|
@@ -18335,7 +18335,7 @@ var ImageBase = forwardRef65(({
|
|
|
18335
18335
|
function setPreviewVisible(nextVisible) {
|
|
18336
18336
|
const previousVisible = previewVisible;
|
|
18337
18337
|
setInternalPreviewVisible(nextVisible);
|
|
18338
|
-
|
|
18338
|
+
config2.onVisibleChange?.(nextVisible, previousVisible);
|
|
18339
18339
|
}
|
|
18340
18340
|
function handleLoad(event) {
|
|
18341
18341
|
setLoading(false);
|
|
@@ -18380,10 +18380,10 @@ var ImageBase = forwardRef65(({
|
|
|
18380
18380
|
className: imagePreviewMaskClass,
|
|
18381
18381
|
"aria-label": "Preview image",
|
|
18382
18382
|
onClick: () => setPreviewVisible(!previewVisible),
|
|
18383
|
-
children:
|
|
18383
|
+
children: config2.mask
|
|
18384
18384
|
}) : null,
|
|
18385
18385
|
previewVisible && isPreviewEnabled ? /* @__PURE__ */ jsx84("img", {
|
|
18386
|
-
src:
|
|
18386
|
+
src: config2.src ?? currentSrc,
|
|
18387
18387
|
alt,
|
|
18388
18388
|
className: cn(imageImgClass, "image-preview-img"),
|
|
18389
18389
|
"aria-hidden": "true"
|
|
@@ -18717,11 +18717,11 @@ var mentionsPlacementClasses = {
|
|
|
18717
18717
|
};
|
|
18718
18718
|
function getMentionsClasses({
|
|
18719
18719
|
disabled,
|
|
18720
|
-
open,
|
|
18720
|
+
open: open3,
|
|
18721
18721
|
placement = "bottom",
|
|
18722
18722
|
className
|
|
18723
18723
|
}) {
|
|
18724
|
-
return cn(mentionsBaseClass, disabled && "mentions-disabled",
|
|
18724
|
+
return cn(mentionsBaseClass, disabled && "mentions-disabled", open3 && "mentions-open", mentionsPlacementClasses[placement], className);
|
|
18725
18725
|
}
|
|
18726
18726
|
function getMentionsDropdownClasses({
|
|
18727
18727
|
placement = "bottom",
|
|
@@ -19284,7 +19284,7 @@ import { jsx as jsx90, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
|
19284
19284
|
function callHandler2(handler, event) {
|
|
19285
19285
|
handler?.(event);
|
|
19286
19286
|
}
|
|
19287
|
-
function getHandlersByTrigger(trigger,
|
|
19287
|
+
function getHandlersByTrigger(trigger, open3, setOpen) {
|
|
19288
19288
|
if (trigger === "hover") {
|
|
19289
19289
|
return {
|
|
19290
19290
|
onMouseEnter: () => setOpen(true),
|
|
@@ -19293,7 +19293,7 @@ function getHandlersByTrigger(trigger, open, setOpen) {
|
|
|
19293
19293
|
}
|
|
19294
19294
|
if (trigger === "click") {
|
|
19295
19295
|
return {
|
|
19296
|
-
onClick: () => setOpen(!
|
|
19296
|
+
onClick: () => setOpen(!open3)
|
|
19297
19297
|
};
|
|
19298
19298
|
}
|
|
19299
19299
|
if (trigger === "focus") {
|
|
@@ -19305,7 +19305,7 @@ function getHandlersByTrigger(trigger, open, setOpen) {
|
|
|
19305
19305
|
return {
|
|
19306
19306
|
onContextMenu: (event) => {
|
|
19307
19307
|
event.preventDefault();
|
|
19308
|
-
setOpen(!
|
|
19308
|
+
setOpen(!open3);
|
|
19309
19309
|
}
|
|
19310
19310
|
};
|
|
19311
19311
|
}
|
|
@@ -19316,7 +19316,7 @@ var Popover = forwardRef71(({
|
|
|
19316
19316
|
title,
|
|
19317
19317
|
placement = "top",
|
|
19318
19318
|
trigger = "hover",
|
|
19319
|
-
open,
|
|
19319
|
+
open: open3,
|
|
19320
19320
|
defaultOpen,
|
|
19321
19321
|
arrow = true,
|
|
19322
19322
|
destroyTooltipOnHide,
|
|
@@ -19330,13 +19330,13 @@ var Popover = forwardRef71(({
|
|
|
19330
19330
|
id,
|
|
19331
19331
|
...props
|
|
19332
19332
|
}, ref) => {
|
|
19333
|
-
const isControlled =
|
|
19333
|
+
const isControlled = open3 !== undefined;
|
|
19334
19334
|
const [internalOpen, setInternalOpen] = useState57(Boolean(defaultOpen));
|
|
19335
19335
|
const generatedId = useId25();
|
|
19336
19336
|
const tooltipId = id ? `${id}-popover` : generatedId;
|
|
19337
19337
|
const anchorName = `--dm-popover-${generatedId.replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
19338
19338
|
const popoverRef = useRef32(null);
|
|
19339
|
-
const visible = isControlled ?
|
|
19339
|
+
const visible = isControlled ? open3 : internalOpen;
|
|
19340
19340
|
useLayoutEffect16(() => {
|
|
19341
19341
|
const popover = popoverRef.current;
|
|
19342
19342
|
if (!popover || typeof popover.showPopover !== "function")
|
|
@@ -19491,11 +19491,11 @@ var popconfirmPlacementClasses = {
|
|
|
19491
19491
|
};
|
|
19492
19492
|
function getPopconfirmClasses({
|
|
19493
19493
|
placement = "top",
|
|
19494
|
-
open,
|
|
19494
|
+
open: open3,
|
|
19495
19495
|
arrow = true,
|
|
19496
19496
|
className
|
|
19497
19497
|
}) {
|
|
19498
|
-
return cn(popconfirmBaseClass, popconfirmPlacementClasses[placement],
|
|
19498
|
+
return cn(popconfirmBaseClass, popconfirmPlacementClasses[placement], open3 && popconfirmOpenClass, !arrow && popconfirmNoArrowClass, className);
|
|
19499
19499
|
}
|
|
19500
19500
|
|
|
19501
19501
|
// src/components/popconfirm/Popconfirm.tsx
|
|
@@ -19532,7 +19532,7 @@ var Popconfirm = forwardRef72(({
|
|
|
19532
19532
|
onMouseEnter,
|
|
19533
19533
|
onMouseLeave,
|
|
19534
19534
|
onOpenChange,
|
|
19535
|
-
open,
|
|
19535
|
+
open: open3,
|
|
19536
19536
|
placement = "top",
|
|
19537
19537
|
showCancel = true,
|
|
19538
19538
|
title,
|
|
@@ -19542,8 +19542,8 @@ var Popconfirm = forwardRef72(({
|
|
|
19542
19542
|
const [internalOpen, setInternalOpen] = useState58(Boolean(defaultOpen));
|
|
19543
19543
|
const [confirmLoading, setConfirmLoading] = useState58(false);
|
|
19544
19544
|
const generatedPopupId = useId26();
|
|
19545
|
-
const isControlled =
|
|
19546
|
-
const visible = isControlled ?
|
|
19545
|
+
const isControlled = open3 !== undefined;
|
|
19546
|
+
const visible = isControlled ? open3 : internalOpen;
|
|
19547
19547
|
const popupId = id ? `${id}-popconfirm` : generatedPopupId;
|
|
19548
19548
|
const anchorName = `--dm-popconfirm-${generatedPopupId.replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
19549
19549
|
const popupRef = useRef33(null);
|
|
@@ -19885,11 +19885,11 @@ function isFinderDark(row, col, count) {
|
|
|
19885
19885
|
}
|
|
19886
19886
|
function createModules(value, errorLevel) {
|
|
19887
19887
|
const count = moduleCountByErrorLevel[errorLevel];
|
|
19888
|
-
const
|
|
19888
|
+
const seed2 = hashValue(value || " ");
|
|
19889
19889
|
return Array.from({ length: count }, (_, row) => Array.from({ length: count }, (_unused, col) => {
|
|
19890
19890
|
if (isFinder(row, col, count))
|
|
19891
19891
|
return isFinderDark(row, col, count);
|
|
19892
|
-
const mixed =
|
|
19892
|
+
const mixed = seed2 + row * 1103515245 + col * 12345 + row * col * 97;
|
|
19893
19893
|
return (mixed >>> (row + col) % 16 & 1) === 1;
|
|
19894
19894
|
}));
|
|
19895
19895
|
}
|
|
@@ -20044,11 +20044,11 @@ var radioErrorClass = "radio-error";
|
|
|
20044
20044
|
var radioLoadingClass = "radio-loading";
|
|
20045
20045
|
function getRadioClasses({
|
|
20046
20046
|
size = "md",
|
|
20047
|
-
error,
|
|
20047
|
+
error: error3,
|
|
20048
20048
|
loading,
|
|
20049
20049
|
className
|
|
20050
20050
|
}) {
|
|
20051
|
-
return cn(radioBaseClass, radioSizeClasses[size],
|
|
20051
|
+
return cn(radioBaseClass, radioSizeClasses[size], error3 && radioErrorClass, loading && radioLoadingClass, className);
|
|
20052
20052
|
}
|
|
20053
20053
|
function getRadioCircleClasses({
|
|
20054
20054
|
color = "primary"
|
|
@@ -20066,7 +20066,7 @@ import { jsx as jsx94, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
|
20066
20066
|
var Radio = forwardRef75(({
|
|
20067
20067
|
color = "primary",
|
|
20068
20068
|
size = "md",
|
|
20069
|
-
error,
|
|
20069
|
+
error: error3,
|
|
20070
20070
|
loading,
|
|
20071
20071
|
labelPosition = "right",
|
|
20072
20072
|
className,
|
|
@@ -20078,7 +20078,7 @@ var Radio = forwardRef75(({
|
|
|
20078
20078
|
return /* @__PURE__ */ jsxs74("label", {
|
|
20079
20079
|
className: getRadioClasses({
|
|
20080
20080
|
size,
|
|
20081
|
-
error,
|
|
20081
|
+
error: error3,
|
|
20082
20082
|
loading,
|
|
20083
20083
|
className
|
|
20084
20084
|
}),
|
|
@@ -22080,17 +22080,17 @@ function getTimePickerClasses({
|
|
|
22080
22080
|
size = "md",
|
|
22081
22081
|
status,
|
|
22082
22082
|
disabled,
|
|
22083
|
-
open,
|
|
22083
|
+
open: open3,
|
|
22084
22084
|
range,
|
|
22085
22085
|
className
|
|
22086
22086
|
}) {
|
|
22087
|
-
return cn(timePickerBaseClass, timePickerSizeClasses[size], status && timePickerStatusClasses[status], disabled && "time-picker-disabled",
|
|
22087
|
+
return cn(timePickerBaseClass, timePickerSizeClasses[size], status && timePickerStatusClasses[status], disabled && "time-picker-disabled", open3 && "time-picker-open", range && timePickerRangeClass, className);
|
|
22088
22088
|
}
|
|
22089
22089
|
function getTimePickerPanelClasses({
|
|
22090
|
-
open,
|
|
22090
|
+
open: open3,
|
|
22091
22091
|
className
|
|
22092
22092
|
}) {
|
|
22093
|
-
return cn(timePickerPanelClass,
|
|
22093
|
+
return cn(timePickerPanelClass, open3 && "time-picker-panel-open", className);
|
|
22094
22094
|
}
|
|
22095
22095
|
|
|
22096
22096
|
// src/components/time-picker/TimePicker.tsx
|
|
@@ -22156,8 +22156,8 @@ function isDisabledTime(value, props) {
|
|
|
22156
22156
|
if (!parts) {
|
|
22157
22157
|
return false;
|
|
22158
22158
|
}
|
|
22159
|
-
const
|
|
22160
|
-
return
|
|
22159
|
+
const config2 = props.disabledTime(value);
|
|
22160
|
+
return config2.disabledHours?.().includes(parts.hour) || config2.disabledMinutes?.(parts.hour).includes(parts.minute) || config2.disabledSeconds?.(parts.hour, parts.minute).includes(parts.second) || false;
|
|
22161
22161
|
}
|
|
22162
22162
|
function nowValue() {
|
|
22163
22163
|
const now = new Date;
|
|
@@ -22176,7 +22176,7 @@ var TimePickerRoot = forwardRef87(({
|
|
|
22176
22176
|
onChange,
|
|
22177
22177
|
onFocus,
|
|
22178
22178
|
onOpenChange,
|
|
22179
|
-
open,
|
|
22179
|
+
open: open3,
|
|
22180
22180
|
placeholder = "Select time",
|
|
22181
22181
|
showNow = true,
|
|
22182
22182
|
size = "md",
|
|
@@ -22189,7 +22189,7 @@ var TimePickerRoot = forwardRef87(({
|
|
|
22189
22189
|
const isValueControlled = value !== undefined;
|
|
22190
22190
|
const [innerValue, setInnerValue] = useState64(defaultValue);
|
|
22191
22191
|
const dropdown = usePickerDropdown({
|
|
22192
|
-
open,
|
|
22192
|
+
open: open3,
|
|
22193
22193
|
defaultOpen,
|
|
22194
22194
|
disabled,
|
|
22195
22195
|
onOpenChange,
|
|
@@ -22202,8 +22202,8 @@ var TimePickerRoot = forwardRef87(({
|
|
|
22202
22202
|
minute: 0,
|
|
22203
22203
|
second: 0
|
|
22204
22204
|
};
|
|
22205
|
-
function columnValue(part,
|
|
22206
|
-
return formatParts({ ...parts, [part]:
|
|
22205
|
+
function columnValue(part, value2) {
|
|
22206
|
+
return formatParts({ ...parts, [part]: value2 }, "HH:mm:ss");
|
|
22207
22207
|
}
|
|
22208
22208
|
function emitChange(nextValue) {
|
|
22209
22209
|
if (isDisabledTime(nextValue, { disabledTime, use12Hours })) {
|
|
@@ -22565,10 +22565,10 @@ var tourPlacementClasses = {
|
|
|
22565
22565
|
rightBottom: "popover-right tour-right-bottom"
|
|
22566
22566
|
};
|
|
22567
22567
|
function getTourRootClasses({
|
|
22568
|
-
open,
|
|
22568
|
+
open: open3,
|
|
22569
22569
|
className
|
|
22570
22570
|
}) {
|
|
22571
|
-
return cn(tourRootClass,
|
|
22571
|
+
return cn(tourRootClass, open3 && tourOpenClass, className);
|
|
22572
22572
|
}
|
|
22573
22573
|
function getTourMaskClasses({
|
|
22574
22574
|
visible,
|
|
@@ -22690,7 +22690,7 @@ function mergeButtonProps(rootProps, stepProps) {
|
|
|
22690
22690
|
}
|
|
22691
22691
|
var Tour = forwardRef89(({
|
|
22692
22692
|
steps = [],
|
|
22693
|
-
open,
|
|
22693
|
+
open: open3,
|
|
22694
22694
|
defaultOpen = false,
|
|
22695
22695
|
current,
|
|
22696
22696
|
defaultCurrent = 0,
|
|
@@ -22716,9 +22716,9 @@ var Tour = forwardRef89(({
|
|
|
22716
22716
|
const rootId = id ?? generatedId;
|
|
22717
22717
|
const [internalOpen, setInternalOpen] = useState65(defaultOpen);
|
|
22718
22718
|
const [internalCurrent, setInternalCurrent] = useState65(defaultCurrent);
|
|
22719
|
-
const controlledOpen =
|
|
22719
|
+
const controlledOpen = open3 !== undefined;
|
|
22720
22720
|
const controlledCurrent = current !== undefined;
|
|
22721
|
-
const visible = controlledOpen ?
|
|
22721
|
+
const visible = controlledOpen ? open3 : internalOpen;
|
|
22722
22722
|
const mergedCurrent = clampCurrent(controlledCurrent ? current : internalCurrent, steps.length);
|
|
22723
22723
|
const step = steps[mergedCurrent];
|
|
22724
22724
|
const mergedPlacement = step?.placement ?? placement;
|
|
@@ -22958,8 +22958,8 @@ var defaultLocale2 = {
|
|
|
22958
22958
|
notFoundContent: "No data",
|
|
22959
22959
|
searchPlaceholder: "Search"
|
|
22960
22960
|
};
|
|
22961
|
-
function uniqueKeys2(
|
|
22962
|
-
return Array.from(new Set(
|
|
22961
|
+
function uniqueKeys2(keys2) {
|
|
22962
|
+
return Array.from(new Set(keys2));
|
|
22963
22963
|
}
|
|
22964
22964
|
function getItemKey(item, rowKey) {
|
|
22965
22965
|
return rowKey ? rowKey(item) : item.key;
|
|
@@ -23018,8 +23018,8 @@ function getMovableSelectedKeys(items, selectedKeys) {
|
|
|
23018
23018
|
const movableKeySet = new Set(items.filter((item) => !item.disabled).map((item) => item.key));
|
|
23019
23019
|
return selectedKeys.filter((key) => movableKeySet.has(key));
|
|
23020
23020
|
}
|
|
23021
|
-
function splitSelectedKeys(
|
|
23022
|
-
return
|
|
23021
|
+
function splitSelectedKeys(keys2, targetKeySet) {
|
|
23022
|
+
return keys2.reduce((groups, key) => {
|
|
23023
23023
|
if (targetKeySet.has(key)) {
|
|
23024
23024
|
groups.target.push(key);
|
|
23025
23025
|
} else {
|
|
@@ -23363,12 +23363,12 @@ var treeSelectSwitcherClass = "tree-select-switcher tree-select-node-toggle";
|
|
|
23363
23363
|
var treeSelectCheckboxClass = "tree-select-checkbox";
|
|
23364
23364
|
var treeSelectTitleClass = "tree-select-title tree-select-node-label";
|
|
23365
23365
|
function getTreeSelectContainerClasses({
|
|
23366
|
-
open,
|
|
23366
|
+
open: open3,
|
|
23367
23367
|
disabled,
|
|
23368
23368
|
multiple,
|
|
23369
23369
|
className
|
|
23370
23370
|
}) {
|
|
23371
|
-
return cn(treeSelectContainerClass, treeSelectBaseClass,
|
|
23371
|
+
return cn(treeSelectContainerClass, treeSelectBaseClass, open3 && treeSelectOpenClass, disabled && treeSelectDisabledClass, multiple && treeSelectMultipleClass, className);
|
|
23372
23372
|
}
|
|
23373
23373
|
function getTreeSelectClasses({
|
|
23374
23374
|
disabled,
|
|
@@ -23546,7 +23546,7 @@ function TreeSelectRoot({
|
|
|
23546
23546
|
onDropdownVisibleChange,
|
|
23547
23547
|
onSearch,
|
|
23548
23548
|
onSelect,
|
|
23549
|
-
open,
|
|
23549
|
+
open: open3,
|
|
23550
23550
|
placeholder = "Please select",
|
|
23551
23551
|
searchValue,
|
|
23552
23552
|
showSearch,
|
|
@@ -23568,8 +23568,8 @@ function TreeSelectRoot({
|
|
|
23568
23568
|
const [internalSearch, setInternalSearch] = useState67("");
|
|
23569
23569
|
const [internalValue, setInternalValue] = useState67(multi ? normalizeMultiValue2(defaultValue) : normalizeSingleValue3(defaultValue));
|
|
23570
23570
|
const [internalExpandedKeys, setInternalExpandedKeys] = useState67(treeDefaultExpandAll ? allKeys : (defaultExpandedKeys ?? defaultTreeExpandedKeys ?? []).map(valueKey3));
|
|
23571
|
-
const controlledOpen =
|
|
23572
|
-
const currentOpen = controlledOpen ? Boolean(
|
|
23571
|
+
const controlledOpen = open3 !== undefined;
|
|
23572
|
+
const currentOpen = controlledOpen ? Boolean(open3) : internalOpen;
|
|
23573
23573
|
const controlledValue = value !== undefined;
|
|
23574
23574
|
const currentValue = controlledValue ? value : internalValue;
|
|
23575
23575
|
const currentSearch = searchValue ?? internalSearch;
|
|
@@ -24334,8 +24334,8 @@ var Title = forwardRef92(({
|
|
|
24334
24334
|
italic
|
|
24335
24335
|
});
|
|
24336
24336
|
const headingLevel = Math.min(5, Math.max(1, level));
|
|
24337
|
-
const
|
|
24338
|
-
return React102.createElement(
|
|
24337
|
+
const Heading2 = `h${headingLevel}`;
|
|
24338
|
+
return React102.createElement(Heading2, {
|
|
24339
24339
|
...props,
|
|
24340
24340
|
ref,
|
|
24341
24341
|
"aria-disabled": disabled || undefined,
|
|
@@ -24589,7 +24589,7 @@ function markdownSource(markdown, mode) {
|
|
|
24589
24589
|
const frontMatter = splitFrontMatter(markdown);
|
|
24590
24590
|
return frontMatter ?? { body: markdown, source: undefined };
|
|
24591
24591
|
}
|
|
24592
|
-
var Markdown = forwardRef93(function
|
|
24592
|
+
var Markdown = forwardRef93(function Markdown2({
|
|
24593
24593
|
markdown = "",
|
|
24594
24594
|
breaks = true,
|
|
24595
24595
|
colorChips = true,
|
|
@@ -24794,8 +24794,8 @@ function UploadRoot({
|
|
|
24794
24794
|
response
|
|
24795
24795
|
});
|
|
24796
24796
|
},
|
|
24797
|
-
onError: (
|
|
24798
|
-
replaceFile(uploadFile.uid, { status: "error", error });
|
|
24797
|
+
onError: (error3) => {
|
|
24798
|
+
replaceFile(uploadFile.uid, { status: "error", error: error3 });
|
|
24799
24799
|
}
|
|
24800
24800
|
});
|
|
24801
24801
|
}
|
|
@@ -24812,12 +24812,12 @@ function UploadRoot({
|
|
|
24812
24812
|
}
|
|
24813
24813
|
const uploadFile = fileToUploadFile(sourceFile);
|
|
24814
24814
|
if (result === false) {
|
|
24815
|
-
const
|
|
24815
|
+
const nextFile3 = {
|
|
24816
24816
|
...uploadFile,
|
|
24817
24817
|
status: undefined,
|
|
24818
24818
|
percent: undefined
|
|
24819
24819
|
};
|
|
24820
|
-
commitFileList([...currentFileListRef.current,
|
|
24820
|
+
commitFileList([...currentFileListRef.current, nextFile3], nextFile3);
|
|
24821
24821
|
continue;
|
|
24822
24822
|
}
|
|
24823
24823
|
if (result instanceof File) {
|
|
@@ -24827,9 +24827,9 @@ function UploadRoot({
|
|
|
24827
24827
|
type: result.type || sourceFile.type
|
|
24828
24828
|
});
|
|
24829
24829
|
}
|
|
24830
|
-
const
|
|
24831
|
-
commitFileList([...currentFileListRef.current,
|
|
24832
|
-
startRequest(
|
|
24830
|
+
const nextFile2 = fileToUploadFile(uploadSource);
|
|
24831
|
+
commitFileList([...currentFileListRef.current, nextFile2], nextFile2);
|
|
24832
|
+
startRequest(nextFile2, uploadSource);
|
|
24833
24833
|
continue;
|
|
24834
24834
|
}
|
|
24835
24835
|
const nextFile = fileToUploadFile(uploadSource);
|