@robot-admin/naive-ui-components 0.40.5 → 0.41.1
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/CHANGELOG.md +16 -0
- package/README.md +58 -232
- package/README_EN.md +59 -235
- package/dist/ActionOverflow.cjs +1 -0
- package/dist/ActionOverflow.js +1 -0
- package/dist/C_ActionBar.css +63 -53
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_ApprovalViewer.cjs +1 -0
- package/dist/C_ApprovalViewer.css +79 -0
- package/dist/C_ApprovalViewer.d.cts +2 -0
- package/dist/C_ApprovalViewer.d.ts +2 -0
- package/dist/C_ApprovalViewer.js +1 -0
- package/dist/C_ApprovalViewer2.cjs +1 -0
- package/dist/C_ApprovalViewer2.js +1 -0
- package/dist/C_Attachments.cjs +1 -0
- package/dist/C_Attachments.css +204 -0
- package/dist/C_Attachments.d.cts +2 -0
- package/dist/C_Attachments.d.ts +2 -0
- package/dist/C_Attachments.js +1 -0
- package/dist/C_Attachments2.cjs +1 -0
- package/dist/C_Attachments2.js +1 -0
- package/dist/C_AudioPlayer.d.cts +1 -1
- package/dist/C_AudioPlayer.d.ts +1 -1
- package/dist/C_AutoComplete.d.cts +2 -2
- package/dist/C_AutoComplete.d.ts +2 -2
- package/dist/C_AvatarGroup.d.cts +1 -1
- package/dist/C_AvatarGroup.d.ts +1 -1
- package/dist/C_Barcode.d.cts +1 -1
- package/dist/C_Barcode.d.ts +1 -1
- package/dist/C_BatchResult.css +10 -10
- package/dist/C_BatchResult.d.cts +1 -1
- package/dist/C_BatchResult.d.ts +1 -1
- package/dist/C_BatchResult2.cjs +1 -1
- package/dist/C_BatchResult2.js +1 -1
- package/dist/C_Breadcrumb.d.cts +2 -2
- package/dist/C_Breadcrumb.d.ts +1 -1
- package/dist/C_Cascade.d.cts +1 -1
- package/dist/C_Cascade.d.ts +1 -1
- package/dist/C_ChangeReview.cjs +1 -0
- package/dist/C_ChangeReview.css +49 -0
- package/dist/C_ChangeReview.d.cts +2 -0
- package/dist/C_ChangeReview.d.ts +2 -0
- package/dist/C_ChangeReview.js +1 -0
- package/dist/C_ChangeReview2.cjs +1 -0
- package/dist/C_ChangeReview2.js +1 -0
- package/dist/C_Chat.css +120 -67
- package/dist/C_Chat.d.cts +2 -2
- package/dist/C_Chat.d.ts +2 -2
- package/dist/C_Chat2.cjs +1 -1
- package/dist/C_Chat2.js +1 -1
- package/dist/C_City.d.cts +1 -1
- package/dist/C_City.d.ts +1 -1
- package/dist/C_Code.d.cts +1 -1
- package/dist/C_Code.d.ts +1 -1
- package/dist/C_ContextMenu.d.cts +1 -1
- package/dist/C_ContextMenu.d.ts +1 -1
- package/dist/C_DataPicker.cjs +1 -1
- package/dist/C_DataPicker.css +125 -50
- package/dist/C_DataPicker.d.cts +3 -3
- package/dist/C_DataPicker.d.ts +4 -3
- package/dist/C_DataPicker.js +1 -1
- package/dist/C_DataPicker2.cjs +1 -1
- package/dist/C_DataPicker2.js +1 -1
- package/dist/C_Date.d.cts +1 -1
- package/dist/C_Date.d.ts +1 -1
- package/dist/C_Density.d.cts +1 -1
- package/dist/C_Density.d.ts +1 -1
- package/dist/C_Descriptions.cjs +1 -0
- package/dist/C_Descriptions.css +86 -0
- package/dist/C_Descriptions.d.cts +2 -0
- package/dist/C_Descriptions.d.ts +2 -0
- package/dist/C_Descriptions.js +1 -0
- package/dist/C_Descriptions2.cjs +1 -0
- package/dist/C_Descriptions2.js +1 -0
- package/dist/C_Editor.d.cts +1 -1
- package/dist/C_Editor.d.ts +1 -1
- package/dist/C_Editor2.cjs +1 -1
- package/dist/C_Editor2.js +1 -1
- package/dist/C_ErrorSummary.d.cts +1 -1
- package/dist/C_ErrorSummary.d.ts +1 -1
- package/dist/C_FilePreview.cjs +1 -1
- package/dist/C_FilePreview.d.cts +2 -1
- package/dist/C_FilePreview.d.ts +2 -1
- package/dist/C_FilePreview.js +1 -1
- package/dist/C_FilePreview2.cjs +1 -1
- package/dist/C_FilePreview2.js +1 -1
- package/dist/C_FilterBuilder.cjs +1 -0
- package/dist/C_FilterBuilder.css +59 -0
- package/dist/C_FilterBuilder.d.cts +2 -0
- package/dist/C_FilterBuilder.d.ts +2 -0
- package/dist/C_FilterBuilder.js +1 -0
- package/dist/C_FilterBuilder2.cjs +1 -0
- package/dist/C_FilterBuilder2.js +1 -0
- package/dist/C_Form.base.css +16 -16
- package/dist/C_Form.css +16 -16
- package/dist/C_Form.d.cts +1 -1
- package/dist/C_Form.d.ts +3 -3
- package/dist/C_FormModal.css +64 -54
- package/dist/C_FormModal.d.cts +2 -2
- package/dist/C_FormModal.d.ts +4 -4
- package/dist/C_FormModal2.cjs +1 -1
- package/dist/C_FormModal2.js +1 -1
- package/dist/C_FormSearch.d.cts +2 -1
- package/dist/C_FormSearch.d.ts +3 -2
- package/dist/C_GlobalSearch.css +156 -137
- package/dist/C_GlobalSearch.d.cts +2 -2
- package/dist/C_GlobalSearch.d.ts +2 -2
- package/dist/C_GlobalSearch2.cjs +1 -1
- package/dist/C_GlobalSearch2.js +1 -1
- package/dist/C_Guide.css +49 -3
- package/dist/C_Guide.d.cts +1 -1
- package/dist/C_Guide.d.ts +1 -1
- package/dist/C_Guide2.cjs +1 -1
- package/dist/C_Guide2.js +1 -1
- package/dist/C_Icon.d.cts +1 -1
- package/dist/C_Icon.d.ts +1 -1
- package/dist/C_ImageAnnotator.cjs +1 -0
- package/dist/C_ImageAnnotator.css +143 -0
- package/dist/C_ImageAnnotator.d.cts +2 -0
- package/dist/C_ImageAnnotator.d.ts +2 -0
- package/dist/C_ImageAnnotator.js +1 -0
- package/dist/C_ImageAnnotator2.cjs +1 -0
- package/dist/C_ImageAnnotator2.js +1 -0
- package/dist/C_ImportWizard.cjs +1 -0
- package/dist/C_ImportWizard.css +42 -0
- package/dist/C_ImportWizard.d.cts +2 -0
- package/dist/C_ImportWizard.d.ts +2 -0
- package/dist/C_ImportWizard.js +1 -0
- package/dist/C_ImportWizard2.cjs +1 -0
- package/dist/C_ImportWizard2.js +1 -0
- package/dist/C_Language.d.cts +1 -1
- package/dist/C_Language.d.ts +1 -1
- package/dist/C_Loading.d.cts +1 -1
- package/dist/C_Loading.d.ts +1 -1
- package/dist/C_Login.d.cts +1 -1
- package/dist/C_Login.d.ts +1 -1
- package/dist/C_Markdown.d.cts +1 -1
- package/dist/C_Markdown.d.ts +1 -1
- package/dist/C_Markdown2.cjs +1 -1
- package/dist/C_Markdown2.js +1 -1
- package/dist/C_Menu.d.cts +2 -2
- package/dist/C_Menu.d.ts +1 -1
- package/dist/C_NotificationCenter.cjs +1 -1
- package/dist/C_NotificationCenter.css +39 -39
- package/dist/C_NotificationCenter.d.cts +2 -1
- package/dist/C_NotificationCenter.d.ts +2 -1
- package/dist/C_NotificationCenter.js +1 -1
- package/dist/C_NotificationCenter2.cjs +1 -1
- package/dist/C_NotificationCenter2.js +1 -1
- package/dist/C_NotificationInbox.cjs +1 -0
- package/dist/C_NotificationInbox.css +154 -0
- package/dist/C_NotificationInbox.d.cts +2 -0
- package/dist/C_NotificationInbox.d.ts +2 -0
- package/dist/C_NotificationInbox.js +1 -0
- package/dist/C_NotificationInbox2.cjs +1 -0
- package/dist/C_NotificationInbox2.js +1 -0
- package/dist/C_OrgChart.d.cts +1 -1
- package/dist/C_OrgChart.d.ts +1 -1
- package/dist/C_Progress.d.cts +1 -1
- package/dist/C_Progress.d.ts +1 -1
- package/dist/C_QRCode2.cjs +1 -1
- package/dist/C_QRCode2.js +1 -1
- package/dist/C_RecordList.cjs +1 -0
- package/dist/C_RecordList.css +70 -0
- package/dist/C_RecordList.d.cts +2 -0
- package/dist/C_RecordList.d.ts +2 -0
- package/dist/C_RecordList.js +1 -0
- package/dist/C_RecordList2.cjs +1 -0
- package/dist/C_RecordList2.js +1 -0
- package/dist/C_RecurrenceEditor.cjs +1 -0
- package/dist/C_RecurrenceEditor.css +68 -0
- package/dist/C_RecurrenceEditor.d.cts +2 -0
- package/dist/C_RecurrenceEditor.d.ts +2 -0
- package/dist/C_RecurrenceEditor.js +1 -0
- package/dist/C_RecurrenceEditor2.cjs +1 -0
- package/dist/C_RecurrenceEditor2.js +1 -0
- package/dist/C_RelationshipExplorer.cjs +1 -0
- package/dist/C_RelationshipExplorer.css +76 -0
- package/dist/C_RelationshipExplorer.d.cts +2 -0
- package/dist/C_RelationshipExplorer.d.ts +2 -0
- package/dist/C_RelationshipExplorer.js +1 -0
- package/dist/C_RelationshipExplorer2.cjs +1 -0
- package/dist/C_RelationshipExplorer2.js +1 -0
- package/dist/C_ResourceSchedule.cjs +1 -0
- package/dist/C_ResourceSchedule.css +104 -0
- package/dist/C_ResourceSchedule.d.cts +2 -0
- package/dist/C_ResourceSchedule.d.ts +2 -0
- package/dist/C_ResourceSchedule.js +1 -0
- package/dist/C_ResourceSchedule2.cjs +1 -0
- package/dist/C_ResourceSchedule2.js +1 -0
- package/dist/C_ScanInput.cjs +1 -0
- package/dist/C_ScanInput.css +33 -0
- package/dist/C_ScanInput.d.cts +2 -0
- package/dist/C_ScanInput.d.ts +2 -0
- package/dist/C_ScanInput.js +1 -0
- package/dist/C_ScanInput2.cjs +1 -0
- package/dist/C_ScanInput2.js +1 -0
- package/dist/C_SectionNav.d.cts +1 -1
- package/dist/C_SectionNav.d.ts +1 -1
- package/dist/C_Select.d.cts +2 -2
- package/dist/C_Select.d.ts +2 -2
- package/dist/C_Skeleton.d.cts +1 -1
- package/dist/C_Skeleton.d.ts +1 -1
- package/dist/C_Steps.d.cts +1 -1
- package/dist/C_Steps.d.ts +1 -1
- package/dist/C_Table.base.css +194 -184
- package/dist/C_Table.css +178 -168
- package/dist/C_Table.d.cts +2 -2
- package/dist/C_Table.d.ts +15 -14
- package/dist/C_Table2.cjs +3 -3
- package/dist/C_Table2.js +3 -3
- package/dist/C_TagsView.d.cts +2 -2
- package/dist/C_TagsView.d.ts +1 -1
- package/dist/C_TaskBoard.cjs +1 -0
- package/dist/C_TaskBoard.css +58 -0
- package/dist/C_TaskBoard.d.cts +2 -0
- package/dist/C_TaskBoard.d.ts +2 -0
- package/dist/C_TaskBoard.js +1 -0
- package/dist/C_TaskBoard2.cjs +1 -0
- package/dist/C_TaskBoard2.js +1 -0
- package/dist/C_TaskPanel.cjs +1 -0
- package/dist/C_TaskPanel.css +68 -0
- package/dist/C_TaskPanel.d.cts +2 -0
- package/dist/C_TaskPanel.d.ts +2 -0
- package/dist/C_TaskPanel.js +1 -0
- package/dist/C_TaskPanel2.cjs +1 -0
- package/dist/C_TaskPanel2.js +1 -0
- package/dist/C_Theme.d.cts +1 -1
- package/dist/C_Theme.d.ts +1 -1
- package/dist/C_Timeline.d.cts +1 -1
- package/dist/C_Timeline.d.ts +1 -1
- package/dist/C_Timeline2.cjs +1 -1
- package/dist/C_Timeline2.js +1 -1
- package/dist/C_Transfer.css +108 -41
- package/dist/C_Transfer.d.cts +2 -2
- package/dist/C_Transfer.d.ts +2 -2
- package/dist/C_Transfer2.cjs +1 -1
- package/dist/C_Transfer2.js +1 -1
- package/dist/C_Tree.d.cts +1 -1
- package/dist/C_Tree.d.ts +13 -12
- package/dist/C_Upload.cjs +1 -1
- package/dist/C_Upload.d.cts +2 -1
- package/dist/C_Upload.d.ts +2 -1
- package/dist/C_Upload.js +1 -1
- package/dist/C_Upload2.cjs +1 -1
- package/dist/C_Upload2.js +1 -1
- package/dist/C_UserPicker.d.cts +1 -1
- package/dist/C_UserPicker.d.ts +2 -2
- package/dist/C_WorkFlow.d.ts +2 -2
- package/dist/ExportMenu.cjs +1 -0
- package/dist/ExportMenu.js +1 -0
- package/dist/NotificationItem.cjs +1 -0
- package/dist/NotificationItem.js +1 -0
- package/dist/component-config.d.ts +33 -10
- package/dist/config.d.cts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/constants.cjs +1 -0
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants.js +1 -0
- package/dist/constants2.d.cts +2 -2
- package/dist/constants2.d.ts +2 -2
- package/dist/constants3.d.cts +3 -229
- package/dist/constants3.d.ts +3 -229
- package/dist/constants4.d.cts +5 -195
- package/dist/constants4.d.ts +5 -195
- package/dist/context.d.cts +33 -10
- package/dist/data2.d.cts +6 -6
- package/dist/data2.d.ts +6 -6
- package/dist/dateRange.d.cts +4 -263
- package/dist/dateRange.d.ts +4 -263
- package/dist/editors.d.cts +11 -11
- package/dist/editors.d.ts +11 -11
- package/dist/excel.cjs +1 -0
- package/dist/excel.js +1 -0
- package/dist/fieldRenderers.cjs +1 -1
- package/dist/fieldRenderers.js +1 -1
- package/dist/fileUrl.cjs +1 -0
- package/dist/fileUrl.js +1 -0
- package/dist/html2.cjs +1 -0
- package/dist/html2.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +88 -69
- package/dist/index.d.ts +87 -68
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +54 -75
- package/dist/index.vue.d.ts +54 -75
- package/dist/index10.vue.d.cts +25 -27
- package/dist/index10.vue.d.ts +54 -41
- package/dist/index11.vue.d.cts +54 -41
- package/dist/index11.vue.d.ts +133 -75
- package/dist/index12.vue.d.cts +133 -75
- package/dist/index12.vue.d.ts +24 -6
- package/dist/index13.vue.d.cts +24 -6
- package/dist/index13.vue.d.ts +39 -57
- package/dist/index14.vue.d.cts +39 -57
- package/dist/index14.vue.d.ts +80 -16
- package/dist/index15.vue.d.cts +80 -16
- package/dist/index15.vue.d.ts +16 -56
- package/dist/index16.vue.d.cts +16 -56
- package/dist/index16.vue.d.ts +40 -118
- package/dist/index17.vue.d.cts +40 -118
- package/dist/index17.vue.d.ts +58 -52
- package/dist/index18.vue.d.cts +58 -52
- package/dist/index18.vue.d.ts +16 -20
- package/dist/index19.vue.d.cts +16 -20
- package/dist/index19.vue.d.ts +67 -14
- package/dist/index2.vue.d.cts +55 -17
- package/dist/index2.vue.d.ts +55 -17
- package/dist/index20.vue.d.cts +67 -14
- package/dist/index20.vue.d.ts +127 -123
- package/dist/index21.vue.d.cts +127 -123
- package/dist/index21.vue.d.ts +51 -76
- package/dist/index22.vue.d.cts +51 -76
- package/dist/index22.vue.d.ts +31 -71
- package/dist/index23.vue.d.cts +31 -129
- package/dist/index23.vue.d.ts +62 -118
- package/dist/index24.vue.d.cts +75 -50
- package/dist/index24.vue.d.ts +20 -49
- package/dist/index25.vue.d.cts +18 -18
- package/dist/index25.vue.d.ts +14 -22
- package/dist/index26.vue.d.cts +16 -26
- package/dist/index26.vue.d.ts +129 -24
- package/dist/index27.vue.d.cts +113 -81
- package/dist/index27.vue.d.ts +78 -96
- package/dist/index28.vue.d.cts +76 -29
- package/dist/index28.vue.d.ts +73 -31
- package/dist/index29.vue.d.cts +65 -13
- package/dist/index29.vue.d.ts +65 -13
- package/dist/index3.vue.d.cts +67 -70
- package/dist/index3.vue.d.ts +67 -70
- package/dist/index30.vue.d.cts +130 -81
- package/dist/index30.vue.d.ts +130 -81
- package/dist/index31.vue.d.cts +41 -94
- package/dist/index31.vue.d.ts +41 -94
- package/dist/index32.vue.d.cts +44 -61
- package/dist/index32.vue.d.ts +44 -61
- package/dist/index33.vue.d.cts +58 -0
- package/dist/index33.vue.d.ts +58 -0
- package/dist/index34.vue.d.cts +62 -0
- package/dist/index34.vue.d.ts +62 -0
- package/dist/index35.vue.d.cts +42 -0
- package/dist/index35.vue.d.ts +42 -0
- package/dist/index36.vue.d.cts +28 -0
- package/dist/index36.vue.d.ts +28 -0
- package/dist/index37.vue.d.cts +30 -0
- package/dist/index37.vue.d.ts +30 -0
- package/dist/index38.vue.d.cts +103 -0
- package/dist/index38.vue.d.ts +103 -0
- package/dist/index39.vue.d.cts +38 -0
- package/dist/index39.vue.d.ts +38 -0
- package/dist/index4.vue.d.cts +27 -36
- package/dist/index4.vue.d.ts +27 -36
- package/dist/index40.vue.d.cts +19 -0
- package/dist/index40.vue.d.ts +19 -0
- package/dist/index41.vue.d.cts +89 -0
- package/dist/index41.vue.d.ts +89 -0
- package/dist/index42.vue.d.cts +110 -0
- package/dist/index42.vue.d.ts +110 -0
- package/dist/index43.vue.d.cts +89 -0
- package/dist/index43.vue.d.ts +89 -0
- package/dist/index44.vue.d.cts +71 -0
- package/dist/index44.vue.d.ts +71 -0
- package/dist/index45.vue.d.cts +50 -0
- package/dist/index45.vue.d.ts +50 -0
- package/dist/index5.vue.d.cts +78 -17
- package/dist/index5.vue.d.ts +78 -17
- package/dist/index6.vue.d.cts +34 -132
- package/dist/index6.vue.d.ts +31 -34
- package/dist/index7.vue.d.cts +20 -34
- package/dist/index7.vue.d.ts +20 -28
- package/dist/index8.vue.d.cts +130 -29
- package/dist/index8.vue.d.ts +33 -118
- package/dist/index9.vue.d.cts +33 -118
- package/dist/index9.vue.d.ts +25 -27
- package/dist/localSource.cjs +1 -0
- package/dist/{formField.d.cts → localSource.d.cts} +42 -2
- package/dist/{formField.d.ts → localSource.d.ts} +42 -2
- package/dist/localSource.js +1 -0
- package/dist/mapUtils.d.cts +1 -1
- package/dist/mapUtils.d.ts +1 -1
- package/dist/model.d.cts +88 -0
- package/dist/model.d.ts +88 -0
- package/dist/presets.d.cts +2 -2
- package/dist/presets.d.ts +2 -2
- package/dist/previewLimits.cjs +1 -0
- package/dist/previewLimits.js +1 -0
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.d.cts +1 -1
- package/dist/resolver.d.ts +1 -1
- package/dist/resolver.js +1 -1
- package/dist/rule.d.cts +51 -0
- package/dist/rule.d.ts +51 -0
- package/dist/source.cjs +1 -1
- package/dist/source.d.cts +2 -2
- package/dist/source.d.ts +2 -2
- package/dist/source.js +1 -1
- package/dist/style.css +1974 -542
- package/dist/types.d.cts +4 -0
- package/dist/types.d.ts +4 -0
- package/dist/types10.d.cts +229 -0
- package/dist/types10.d.ts +285 -0
- package/dist/types11.d.cts +285 -0
- package/dist/types2.d.cts +188 -31
- package/dist/types2.d.ts +188 -31
- package/dist/types3.d.cts +84 -101
- package/dist/types3.d.ts +82 -105
- package/dist/types4.d.cts +24 -106
- package/dist/types4.d.ts +30 -55
- package/dist/types5.d.cts +106 -55
- package/dist/types5.d.ts +130 -41
- package/dist/types6.d.cts +130 -41
- package/dist/types6.d.ts +244 -265
- package/dist/types7.d.cts +244 -265
- package/dist/types7.d.ts +60 -0
- package/dist/types8.d.cts +60 -0
- package/dist/types8.d.ts +50 -0
- package/dist/types9.d.cts +50 -0
- package/dist/types9.d.ts +229 -0
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +3 -3
- package/dist/useCollapsePanel.d.ts +3 -3
- package/dist/useComponentTheme.cjs +1 -1
- package/dist/useComponentTheme.js +1 -1
- package/dist/useCropperCore.d.cts +5 -5
- package/dist/useCropperCore.d.ts +5 -5
- package/dist/useDynamicFormState.d.cts +7 -6
- package/dist/useDynamicFormState.d.ts +7 -6
- package/dist/useEdgeInteraction.d.cts +2 -2
- package/dist/useEdgeInteraction.d.ts +2 -2
- package/dist/useFormArray.cjs +1 -1
- package/dist/useFormArray.d.cts +39 -3
- package/dist/useFormArray.d.ts +39 -3
- package/dist/useFormArray.js +1 -1
- package/dist/useFormRenderer.d.cts +6 -2
- package/dist/useFormRenderer.d.ts +6 -2
- package/dist/useFullscreen.d.cts +5 -97
- package/dist/useFullscreen.d.ts +5 -97
- package/dist/useGlobalSearch.d.cts +45 -3
- package/dist/useGlobalSearch.d.ts +45 -3
- package/dist/useLocalFileUrl.cjs +1 -0
- package/dist/useLocalFileUrl.js +1 -0
- package/dist/useQRCode.d.cts +4 -4
- package/dist/useQRCode.d.ts +4 -4
- package/dist/useSignatureHistory.d.cts +4 -4
- package/dist/useSignatureHistory.d.ts +4 -4
- package/dist/useSplitResize.d.cts +6 -6
- package/dist/useSplitResize.d.ts +6 -6
- package/dist/useTimeSelection.d.cts +3 -3
- package/dist/useTimeSelection.d.ts +3 -3
- package/dist/useWorkflowValidation.d.cts +108 -108
- package/dist/useWorkflowValidation.d.ts +108 -108
- package/dist/verification.d.cts +7 -7
- package/dist/verification.d.ts +7 -7
- package/dist/workflows.cjs +1 -1
- package/dist/workflows.d.cts +2 -2
- package/dist/workflows.d.ts +2 -2
- package/dist/workflows.js +1 -1
- package/docs/components.en.md +125 -135
- package/docs/components.md +125 -135
- package/docs/engineering.en.md +6 -4
- package/docs/engineering.md +6 -4
- package/docs/guides/api-migration.md +1 -1
- package/docs/guides/approval-viewer.md +50 -0
- package/docs/guides/attachments.md +39 -0
- package/docs/guides/batch-results.md +3 -1
- package/docs/guides/change-review.md +49 -0
- package/docs/guides/component-contracts.md +8 -0
- package/docs/guides/data-picker.md +75 -1
- package/docs/guides/data-workflows.md +27 -1
- package/docs/guides/dockable-workbench.md +49 -0
- package/docs/guides/filter-builder.md +47 -0
- package/docs/guides/global-search.md +49 -0
- package/docs/guides/image-annotator.md +27 -0
- package/docs/guides/import-wizard.md +40 -0
- package/docs/guides/notification-center.md +29 -0
- package/docs/guides/resource-schedule.md +58 -0
- package/docs/guides/scene-components.md +53 -0
- package/docs/guides/search-workflows.md +2 -0
- package/docs/guides/split-pane.md +2 -0
- package/docs/guides/table-density.md +47 -1
- package/docs/guides/task-board.md +53 -0
- package/docs/guides/task-panel.md +30 -0
- package/docs/guides/transfer.md +35 -0
- package/docs/guides/usage.en.md +23 -17
- package/docs/guides/usage.md +10 -24
- package/package.json +1 -1
- package/dist/formField.cjs +0 -1
- package/dist/formField.js +0 -1
- package/dist/html.cjs +0 -1
- package/dist/html.js +0 -1
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
@import "./C_FilePreview.css";
|
|
2
|
+
.c-icon[data-v-075758a0] {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
position: relative;
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
vertical-align: middle;
|
|
9
|
+
user-select: none;
|
|
10
|
+
transition: all 0.2s ease-in-out;
|
|
11
|
+
}
|
|
12
|
+
.c-icon--clickable[data-v-075758a0] {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
.c-icon--clickable[data-v-075758a0]:hover {
|
|
16
|
+
opacity: 0.8;
|
|
17
|
+
transform: scale(1.05);
|
|
18
|
+
}
|
|
19
|
+
.c-icon--clickable[data-v-075758a0]:active {
|
|
20
|
+
transform: scale(0.95);
|
|
21
|
+
}
|
|
22
|
+
.c-icon--clickable[data-v-075758a0]:focus-visible {
|
|
23
|
+
outline: 2px solid currentColor;
|
|
24
|
+
outline-offset: 2px;
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
}
|
|
27
|
+
.c-icon--loading[data-v-075758a0] {
|
|
28
|
+
opacity: 0.6;
|
|
29
|
+
cursor: wait;
|
|
30
|
+
}
|
|
31
|
+
.c-icon__loading[data-v-075758a0] {
|
|
32
|
+
position: absolute;
|
|
33
|
+
inset: 0;
|
|
34
|
+
}
|
|
35
|
+
.c-icon__spinner[data-v-075758a0] {
|
|
36
|
+
display: block;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
border: 2px solid currentColor;
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
border-top-color: transparent;
|
|
43
|
+
animation: spin-075758a0 1s linear infinite;
|
|
44
|
+
}
|
|
45
|
+
.c-icon__error[data-v-075758a0] {
|
|
46
|
+
font-size: 0.8em;
|
|
47
|
+
opacity: 0.5;
|
|
48
|
+
}
|
|
49
|
+
.c-icon__rotatable[data-v-075758a0] {
|
|
50
|
+
transition: transform 0.3s ease-in-out;
|
|
51
|
+
}
|
|
52
|
+
.c-icon__flippable[data-v-075758a0] {
|
|
53
|
+
transition: transform 0.3s ease-in-out;
|
|
54
|
+
}
|
|
55
|
+
@keyframes spin-075758a0 {
|
|
56
|
+
0% {
|
|
57
|
+
transform: rotate(0deg);
|
|
58
|
+
}
|
|
59
|
+
100% {
|
|
60
|
+
transform: rotate(360deg);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
@media (prefers-reduced-motion: reduce) {
|
|
64
|
+
.c-icon[data-v-075758a0],
|
|
65
|
+
.c-icon__spinner[data-v-075758a0] {
|
|
66
|
+
animation: none;
|
|
67
|
+
transition: none;
|
|
68
|
+
}
|
|
69
|
+
.c-icon--clickable[data-v-075758a0]:hover,
|
|
70
|
+
.c-icon--clickable[data-v-075758a0]:active {
|
|
71
|
+
transform: none;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* layer: default */
|
|
76
|
+
.inline-flex[data-v-075758a0]{display:inline-flex;}
|
|
77
|
+
.transform[data-v-075758a0]{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
|
|
78
|
+
.px[data-v-075758a0]{padding-left:1rem;padding-right:1rem;}
|
|
79
|
+
|
|
80
|
+
.c-attachments[data-v-fb693f98] {
|
|
81
|
+
--c-attachments-border: var(--c-border, var(--c-theme-border, #dce3ed));
|
|
82
|
+
--c-attachments-muted: var(--c-bg-muted, var(--c-theme-bg-muted, #f1f5f9));
|
|
83
|
+
--c-attachments-primary: var(--c-primary, var(--c-theme-primary, #2563eb));
|
|
84
|
+
--c-attachments-secondary: var(--c-text-2, var(--c-theme-text-2, #475569));
|
|
85
|
+
--c-attachments-radius: var(
|
|
86
|
+
--c-radius-panel,
|
|
87
|
+
var(--c-theme-radius-panel, 8px)
|
|
88
|
+
);
|
|
89
|
+
display: grid;
|
|
90
|
+
min-width: 0;
|
|
91
|
+
gap: 12px;
|
|
92
|
+
container-type: inline-size;
|
|
93
|
+
}
|
|
94
|
+
.c-attachments__header[data-v-fb693f98], .c-attachments__details-header[data-v-fb693f98] {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-wrap: wrap;
|
|
97
|
+
align-items: flex-start;
|
|
98
|
+
justify-content: space-between;
|
|
99
|
+
gap: 8px 16px;
|
|
100
|
+
}
|
|
101
|
+
.c-attachments__header[data-v-fb693f98] {
|
|
102
|
+
align-items: center;
|
|
103
|
+
}
|
|
104
|
+
.c-attachments__layout[data-v-fb693f98] {
|
|
105
|
+
display: grid;
|
|
106
|
+
min-width: 0;
|
|
107
|
+
grid-template-columns: minmax(172px, 28%) minmax(0, 1fr);
|
|
108
|
+
gap: 12px;
|
|
109
|
+
}
|
|
110
|
+
@container (max-width: 560px) {
|
|
111
|
+
.c-attachments__layout[data-v-fb693f98] {
|
|
112
|
+
grid-template-columns: minmax(0, 1fr);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
.c-attachments__navigation[data-v-fb693f98], .c-attachments__details[data-v-fb693f98] {
|
|
116
|
+
min-width: 0;
|
|
117
|
+
padding: 12px;
|
|
118
|
+
border: 1px solid var(--c-attachments-border);
|
|
119
|
+
border-radius: var(--c-attachments-radius);
|
|
120
|
+
}
|
|
121
|
+
.c-attachments__list[data-v-fb693f98] {
|
|
122
|
+
display: grid;
|
|
123
|
+
max-height: 420px;
|
|
124
|
+
gap: 4px;
|
|
125
|
+
margin: 0;
|
|
126
|
+
padding: 0;
|
|
127
|
+
overflow: auto;
|
|
128
|
+
list-style: none;
|
|
129
|
+
}
|
|
130
|
+
.c-attachments__filter[data-v-fb693f98] {
|
|
131
|
+
margin-bottom: 8px;
|
|
132
|
+
}
|
|
133
|
+
.c-attachments__item[data-v-fb693f98] {
|
|
134
|
+
display: flex;
|
|
135
|
+
width: 100%;
|
|
136
|
+
min-height: 44px;
|
|
137
|
+
align-items: center;
|
|
138
|
+
gap: 10px;
|
|
139
|
+
padding: 6px 8px;
|
|
140
|
+
border: 1px solid transparent;
|
|
141
|
+
border-radius: var(--c-radius, var(--c-theme-radius, 6px));
|
|
142
|
+
background: transparent;
|
|
143
|
+
color: inherit;
|
|
144
|
+
font: inherit;
|
|
145
|
+
text-align: start;
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
}
|
|
148
|
+
.c-attachments__item[data-v-fb693f98]:hover {
|
|
149
|
+
background: var(--c-attachments-muted);
|
|
150
|
+
}
|
|
151
|
+
.c-attachments__item[aria-current=true][data-v-fb693f98] {
|
|
152
|
+
border-color: var(--c-attachments-primary);
|
|
153
|
+
background: var(--c-attachments-muted);
|
|
154
|
+
}
|
|
155
|
+
.c-attachments__item[data-v-fb693f98]:focus-visible {
|
|
156
|
+
outline: 2px solid var(--c-attachments-primary);
|
|
157
|
+
outline-offset: -2px;
|
|
158
|
+
}
|
|
159
|
+
.c-attachments__icon[data-v-fb693f98] {
|
|
160
|
+
flex: none;
|
|
161
|
+
color: var(--c-attachments-primary);
|
|
162
|
+
}
|
|
163
|
+
.c-attachments__info[data-v-fb693f98], .c-attachments__details-title[data-v-fb693f98] {
|
|
164
|
+
display: grid;
|
|
165
|
+
min-width: 0;
|
|
166
|
+
overflow-wrap: anywhere;
|
|
167
|
+
}
|
|
168
|
+
.c-attachments__meta[data-v-fb693f98], .c-attachments__details-title p[data-v-fb693f98] {
|
|
169
|
+
margin: 0;
|
|
170
|
+
color: var(--c-attachments-secondary);
|
|
171
|
+
font-size: 12px;
|
|
172
|
+
}
|
|
173
|
+
.c-attachments__meta[data-v-fb693f98], .c-attachments__actions[data-v-fb693f98] {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-wrap: wrap;
|
|
176
|
+
gap: 4px 8px;
|
|
177
|
+
}
|
|
178
|
+
.c-attachments__preview[data-v-fb693f98] {
|
|
179
|
+
min-width: 0;
|
|
180
|
+
margin-top: 12px;
|
|
181
|
+
}
|
|
182
|
+
.c-attachments__preview[data-v-fb693f98] .c-attachments__image, .c-attachments__preview[data-v-fb693f98] .c-attachments__video {
|
|
183
|
+
display: block;
|
|
184
|
+
width: 100%;
|
|
185
|
+
max-height: 480px;
|
|
186
|
+
border-radius: var(--c-attachments-radius);
|
|
187
|
+
background: var(--c-attachments-muted);
|
|
188
|
+
object-fit: contain;
|
|
189
|
+
}
|
|
190
|
+
.c-attachments__preview[data-v-fb693f98] .c-attachments__audio {
|
|
191
|
+
width: min(100%, 420px);
|
|
192
|
+
}
|
|
193
|
+
.c-attachments__preview[data-v-fb693f98] .c-attachments__media-error {
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: 8px;
|
|
197
|
+
}
|
|
198
|
+
.c-attachments__placeholder[data-v-fb693f98] {
|
|
199
|
+
min-height: 120px;
|
|
200
|
+
justify-content: center;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* layer: default */
|
|
204
|
+
.inline[data-v-fb693f98]{display:inline;}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as AttachmentsEmits, i as AttachmentKind, n as AttachmentItem, o as AttachmentsProps, r as AttachmentKey, t as _default } from "./index2.vue.cjs";
|
|
2
|
+
export { type AttachmentItem, type AttachmentKey, type AttachmentKind, type AttachmentsEmits, type AttachmentsProps, _default as C_Attachments };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as AttachmentsEmits, i as AttachmentKind, n as AttachmentItem, o as AttachmentsProps, r as AttachmentKey, t as _default } from "./index2.vue.js";
|
|
2
|
+
export { type AttachmentItem, type AttachmentKey, type AttachmentKind, type AttachmentsEmits, type AttachmentsProps, _default as C_Attachments };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./C_Icon2.js";import{t as e}from"./C_Attachments2.js";export{e as C_Attachments};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./export-helper.cjs`),n=require(`./C_Icon2.cjs`),r=require(`./useComponentDensity.cjs`),i=require(`./constants.cjs`),a=require(`./useScopedComponentLocale.cjs`),o=require(`./fileUrl.cjs`),s=require(`./useLocalFileUrl.cjs`);let c=require(`vue`),l=require(`naive-ui`);const u=Object.freeze({"attachments.title":`附件资料`,"attachments.preview":`附件预览`,"attachments.upload":`添加附件`,"attachments.download":`下载`,"attachments.remove":`移除`,"attachments.list":`附件列表`,"attachments.category":`附件分类`,"attachments.allCategories":`全部分类`,"attachments.choose":`选择附件后预览`,"attachments.empty":`暂无附件`,"attachments.loading":`正在加载预览…`,"attachments.previewUnavailable":`此附件暂无预览`,"attachments.previewFailed":`附件预览失败`,"attachments.status.pending":`等待上传`,"attachments.status.validating":`校验中`,"attachments.status.hashing":`校验计算中`,"attachments.status.uploading":`上传中`,"attachments.status.success":`已上传`,"attachments.status.error":`上传失败`,"attachments.status.paused":`已暂停`,"attachments.status.instant":`已上传`}),d=Object.freeze({"attachments.title":`Attachments`,"attachments.preview":`Attachment preview`,"attachments.upload":`Add attachment`,"attachments.download":`Download`,"attachments.remove":`Remove`,"attachments.list":`Attachment list`,"attachments.category":`Attachment category`,"attachments.allCategories":`All categories`,"attachments.choose":`Select an attachment to preview`,"attachments.empty":`No attachments`,"attachments.loading":`Loading preview…`,"attachments.previewUnavailable":`Preview unavailable for this attachment`,"attachments.previewFailed":`Could not load attachment preview`,"attachments.status.pending":`Waiting to upload`,"attachments.status.validating":`Validating`,"attachments.status.hashing":`Calculating checksum`,"attachments.status.uploading":`Uploading`,"attachments.status.success":`Uploaded`,"attachments.status.error":`Upload failed`,"attachments.status.paused":`Paused`,"attachments.status.instant":`Uploaded`}),f=e=>a.t(u,d,e),p={key:0,class:`c-attachments__media-error`,role:`alert`},m=[`src`,`alt`],h=[`aria-label`,`src`],g=[`aria-label`,`src`],_=(0,c.defineComponent)({__name:`AttachmentMedia`,props:{file:{},url:{},kind:{},name:{},locale:{}},setup(e){let t=e,{t:n}=f(()=>t.locale),r=s.t(()=>t.file),i=(0,c.ref)(!1),a=(0,c.ref)(),o=(0,c.computed)(()=>t.file?r.value:t.url);return(0,c.onBeforeUnmount)(()=>a.value?.pause()),(0,c.watch)(o,()=>{i.value=!1}),(t,r)=>i.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,p,[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(n)(`attachments.previewFailed`))+` `,1),(0,c.createVNode)((0,c.unref)(l.NButton),{size:`small`,"attr-type":`button`,onClick:r[0]||=e=>i.value=!1},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(n)(`common.retry`)),1)]),_:1})])):o.value&&e.kind===`image`?((0,c.openBlock)(),(0,c.createElementBlock)(`img`,{key:1,class:`c-attachments__image`,src:o.value,alt:e.name,onError:r[1]||=e=>i.value=!0},null,40,m)):o.value&&e.kind===`video`?((0,c.openBlock)(),(0,c.createElementBlock)(`video`,{key:2,ref_key:`player`,ref:a,class:`c-attachments__video`,"aria-label":e.name,src:o.value,controls:``,playsinline:``,preload:`metadata`,onError:r[2]||=e=>i.value=!0},null,40,h)):o.value?((0,c.openBlock)(),(0,c.createElementBlock)(`audio`,{key:3,ref_key:`player`,ref:a,class:`c-attachments__audio`,"aria-label":e.name,src:o.value,controls:``,preload:`metadata`,onError:r[3]||=e=>i.value=!0},null,40,g)):(0,c.createCommentVNode)(`v-if`,!0)}}),v=/\.(?:docx|pdf|xls|xlsx)$/i,y=[[`image`,/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|webp)$/i],[`audio`,/\.(?:aac|flac|m4a|mp3|oga|opus|wav)$/i],[`video`,/\.(?:m4v|mov|mp4|ogv|webm)$/i]];function b(e){let{file:t,name:n,type:r}=e,i=t?t.name:n;if(v.test(i))return`document`;let a=(r||(t?t.type:``)).toLowerCase(),o=y.find(([e])=>a.startsWith(`${e}/`));return o?o[0]:y.find(([,e])=>e.test(i))?.[0]??`unknown`}const x=[`aria-label`],S={class:`c-attachments__header`},C={key:0,class:`c-attachments__layout`},w={class:`c-attachments__navigation`},T=[`aria-label`],E=[`aria-current`,`onClick`],D={class:`c-attachments__info`},O={class:`c-attachments__name`},k={class:`c-attachments__meta`},A={key:0},j={key:1},M={key:2},N={key:3},P=[`aria-label`],F={class:`c-attachments__details-header`},I={class:`c-attachments__details-title`},L={key:0},R={key:0,class:`c-attachments__actions`},z={class:`c-attachments__preview`},B=(0,c.defineComponent)({name:`C_Attachments`,__name:`index`,props:(0,c.mergeModels)({items:{},title:{},uploadable:{type:Boolean},downloadable:{type:Boolean},removable:{type:Boolean},disabled:{type:Boolean},previewLimits:{},density:{},locale:{}},{selectedKey:{default:null},selectedKeyModifiers:{}}),emits:(0,c.mergeModels)([`upload`,`download`,`remove`],[`update:selectedKey`]),setup(t,{emit:a}){let s=t,u=a,d=(0,c.useModel)(t,`selectedKey`),{t:p}=f(()=>s.locale),m=r.t(()=>s.density),h=(0,c.computed)(()=>e.t(m.value).size),g=(0,c.computed)(()=>s.title??p(`attachments.title`)),v=(0,c.ref)(null),y=(0,c.ref)(!1);(0,c.onMounted)(()=>{y.value=!0}),(0,c.onActivated)(()=>{y.value=!0}),(0,c.onDeactivated)(()=>{y.value=!1});let B=(0,c.defineAsyncComponent)({loader:()=>Promise.resolve().then(()=>require(`./C_FilePreview2.cjs`)).then(e=>e.n).then(e=>e.default),loadingComponent:()=>(0,c.h)(`p`,{role:`status`},p(`attachments.loading`)),errorComponent:()=>(0,c.h)(`p`,{role:`alert`},p(`attachments.previewFailed`))}),V={image:`mdi:file-image-outline`,audio:`mdi:file-music-outline`,video:`mdi:file-video-outline`,document:`mdi:file-document-outline`,unknown:`mdi:file-outline`},H=(0,c.computed)(()=>new Map(s.items.map(e=>[e.id,e]))),U=(0,c.computed)(()=>{let e=new Set;for(let t of H.value.values())t.category&&e.add(t.category);return Array.from(e,e=>({value:e,label:e}))}),W=(0,c.computed)(()=>{let e=[...H.value.values()],{value:t}=v;return!t||!U.value.some(e=>e.value===t)?e:e.filter(e=>e.category===t)});(0,c.watch)(U,e=>{v.value!==null&&!e.some(e=>e.value===v.value)&&(v.value=null)});let G=(0,c.computed)(()=>W.value.find(e=>e.id===d.value)),K=(0,c.computed)(()=>G.value?b(G.value):`unknown`),q=(0,c.computed)(()=>{let e=G.value?.url;if(!(!y.value||!e))return o.t(e,window.location.href)??void 0});function J(e){return(e.status===`uploading`||e.status===`paused`)&&Number.isFinite(e.percent)}function Y(e){return e!==void 0&&Number.isInteger(e)&&e>=0&&e<1024**5}function X(e){return Math.round(Math.max(0,Math.min(e??0,100)))}return(e,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`section`,{class:`c-attachments`,"aria-label":g.value},[(0,c.createElementVNode)(`header`,S,[(0,c.createElementVNode)(`strong`,null,(0,c.toDisplayString)(g.value),1),(0,c.renderSlot)(e.$slots,`upload`,{},()=>[t.uploadable?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.NButton),{key:0,"attr-type":`button`,type:`primary`,secondary:``,size:h.value,disabled:t.disabled,onClick:r[0]||=e=>u(`upload`)},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(p)(`attachments.upload`)),1)]),_:1},8,[`size`,`disabled`])):(0,c.createCommentVNode)(`v-if`,!0)],!0)]),H.value.size?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,C,[(0,c.createElementVNode)(`div`,w,[U.value.length?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.NSelect),{key:0,value:v.value,"onUpdate:value":r[1]||=e=>v.value=e,class:`c-attachments__filter`,clearable:``,filterable:``,size:h.value,options:U.value,placeholder:(0,c.unref)(p)(`attachments.allCategories`),"input-props":{"aria-label":(0,c.unref)(p)(`attachments.category`)}},null,8,[`value`,`size`,`options`,`placeholder`,`input-props`])):(0,c.createCommentVNode)(`v-if`,!0),(0,c.createElementVNode)(`ul`,{class:`c-attachments__list`,"aria-label":(0,c.unref)(p)(`attachments.list`)},[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(W.value,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`li`,{key:e.id},[(0,c.createElementVNode)(`button`,{class:`c-attachments__item`,type:`button`,"aria-current":d.value===e.id?`true`:void 0,onClick:t=>d.value=e.id},[(0,c.createVNode)(n.t,{class:`c-attachments__icon`,name:V[(0,c.unref)(b)(e)],"aria-hidden":`true`},null,8,[`name`]),(0,c.createElementVNode)(`span`,D,[(0,c.createElementVNode)(`span`,O,(0,c.toDisplayString)(e.name),1),(0,c.createElementVNode)(`span`,k,[e.category?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,A,(0,c.toDisplayString)(e.category),1)):(0,c.createCommentVNode)(`v-if`,!0),Y(e.size)?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,j,(0,c.toDisplayString)((0,c.unref)(i.a)(e.size)),1)):(0,c.createCommentVNode)(`v-if`,!0),e.status?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,M,(0,c.toDisplayString)((0,c.unref)(p)(`attachments.status.${e.status}`)),1)):(0,c.createCommentVNode)(`v-if`,!0),J(e)?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,N,(0,c.toDisplayString)(X(e.percent))+`%`,1)):(0,c.createCommentVNode)(`v-if`,!0)])])],8,E)]))),128))],8,T)]),(0,c.createElementVNode)(`section`,{class:`c-attachments__details`,"aria-label":(0,c.unref)(p)(`attachments.preview`)},[G.value?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:0},[(0,c.createElementVNode)(`header`,F,[(0,c.createElementVNode)(`div`,I,[(0,c.createElementVNode)(`strong`,null,(0,c.toDisplayString)(G.value.name),1),G.value.description?((0,c.openBlock)(),(0,c.createElementBlock)(`p`,L,(0,c.toDisplayString)(G.value.description),1)):(0,c.createCommentVNode)(`v-if`,!0)]),t.downloadable||t.removable?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,R,[t.downloadable?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.NButton),{key:0,"attr-type":`button`,secondary:``,size:h.value,disabled:t.disabled,onClick:r[2]||=e=>u(`download`,G.value)},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(p)(`attachments.download`)),1)]),_:1},8,[`size`,`disabled`])):(0,c.createCommentVNode)(`v-if`,!0),t.removable?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.NButton),{key:1,"attr-type":`button`,tertiary:``,type:`error`,size:h.value,disabled:t.disabled,onClick:r[3]||=e=>u(`remove`,G.value)},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(p)(`attachments.remove`)),1)]),_:1},8,[`size`,`disabled`])):(0,c.createCommentVNode)(`v-if`,!0)])):(0,c.createCommentVNode)(`v-if`,!0)]),(0,c.createElementVNode)(`div`,z,[y.value?(0,c.renderSlot)(e.$slots,`preview`,{item:G.value,kind:K.value},()=>[!G.value.file&&!q.value||K.value===`unknown`?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.NEmpty),{key:0,description:(0,c.unref)(p)(`attachments.previewUnavailable`)},null,8,[`description`])):K.value===`document`?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(B),{key:G.value.id,inline:``,file:G.value.file,"file-name":G.value.file?.name??G.value.name,url:q.value,"preview-limits":t.previewLimits},null,8,[`file`,`file-name`,`url`,`preview-limits`])):((0,c.openBlock)(),(0,c.createBlock)(_,{key:G.value.id,file:G.value.file,url:q.value,kind:K.value,name:G.value.name,locale:t.locale},null,8,[`file`,`url`,`kind`,`name`,`locale`]))],!0,0):(0,c.createCommentVNode)(`v-if`,!0)])],64)):((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.NEmpty),{key:1,class:`c-attachments__placeholder`,description:(0,c.unref)(p)(`attachments.choose`)},null,8,[`description`]))],8,P)])):((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.NEmpty),{key:1,class:`c-attachments__placeholder`,description:(0,c.unref)(p)(`attachments.empty`)},null,8,[`description`]))],8,x))}});var V=t.t(B,[[`__scopeId`,`data-v-fb693f98`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return V}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./density.js";import{t}from"./export-helper.js";import{t as n}from"./C_Icon2.js";import{t as r}from"./useComponentDensity.js";import{a as i}from"./constants.js";import{t as a}from"./useScopedComponentLocale.js";import{t as o}from"./fileUrl.js";import{t as s}from"./useLocalFileUrl.js";import{Fragment as c,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createTextVNode as m,createVNode as h,defineAsyncComponent as ee,defineComponent as g,h as _,mergeModels as v,onActivated as te,onBeforeUnmount as y,onDeactivated as ne,onMounted as re,openBlock as b,ref as x,renderList as S,renderSlot as C,toDisplayString as w,unref as T,useModel as ie,watch as E,withCtx as D}from"vue";import{NButton as O,NEmpty as k,NSelect as A}from"naive-ui";const j=Object.freeze({"attachments.title":`附件资料`,"attachments.preview":`附件预览`,"attachments.upload":`添加附件`,"attachments.download":`下载`,"attachments.remove":`移除`,"attachments.list":`附件列表`,"attachments.category":`附件分类`,"attachments.allCategories":`全部分类`,"attachments.choose":`选择附件后预览`,"attachments.empty":`暂无附件`,"attachments.loading":`正在加载预览…`,"attachments.previewUnavailable":`此附件暂无预览`,"attachments.previewFailed":`附件预览失败`,"attachments.status.pending":`等待上传`,"attachments.status.validating":`校验中`,"attachments.status.hashing":`校验计算中`,"attachments.status.uploading":`上传中`,"attachments.status.success":`已上传`,"attachments.status.error":`上传失败`,"attachments.status.paused":`已暂停`,"attachments.status.instant":`已上传`}),M=Object.freeze({"attachments.title":`Attachments`,"attachments.preview":`Attachment preview`,"attachments.upload":`Add attachment`,"attachments.download":`Download`,"attachments.remove":`Remove`,"attachments.list":`Attachment list`,"attachments.category":`Attachment category`,"attachments.allCategories":`All categories`,"attachments.choose":`Select an attachment to preview`,"attachments.empty":`No attachments`,"attachments.loading":`Loading preview…`,"attachments.previewUnavailable":`Preview unavailable for this attachment`,"attachments.previewFailed":`Could not load attachment preview`,"attachments.status.pending":`Waiting to upload`,"attachments.status.validating":`Validating`,"attachments.status.hashing":`Calculating checksum`,"attachments.status.uploading":`Uploading`,"attachments.status.success":`Uploaded`,"attachments.status.error":`Upload failed`,"attachments.status.paused":`Paused`,"attachments.status.instant":`Uploaded`}),N=e=>a(j,M,e),P={key:0,class:`c-attachments__media-error`,role:`alert`},F=[`src`,`alt`],I=[`aria-label`,`src`],L=[`aria-label`,`src`],ae=g({__name:`AttachmentMedia`,props:{file:{},url:{},kind:{},name:{},locale:{}},setup(e){let t=e,{t:n}=N(()=>t.locale),r=s(()=>t.file),i=x(!1),a=x(),o=l(()=>t.file?r.value:t.url);return y(()=>a.value?.pause()),E(o,()=>{i.value=!1}),(t,r)=>i.value?(b(),f(`div`,P,[m(w(T(n)(`attachments.previewFailed`))+` `,1),h(T(O),{size:`small`,"attr-type":`button`,onClick:r[0]||=e=>i.value=!1},{default:D(()=>[m(w(T(n)(`common.retry`)),1)]),_:1})])):o.value&&e.kind===`image`?(b(),f(`img`,{key:1,class:`c-attachments__image`,src:o.value,alt:e.name,onError:r[1]||=e=>i.value=!0},null,40,F)):o.value&&e.kind===`video`?(b(),f(`video`,{key:2,ref_key:`player`,ref:a,class:`c-attachments__video`,"aria-label":e.name,src:o.value,controls:``,playsinline:``,preload:`metadata`,onError:r[2]||=e=>i.value=!0},null,40,I)):o.value?(b(),f(`audio`,{key:3,ref_key:`player`,ref:a,class:`c-attachments__audio`,"aria-label":e.name,src:o.value,controls:``,preload:`metadata`,onError:r[3]||=e=>i.value=!0},null,40,L)):d(`v-if`,!0)}}),R=/\.(?:docx|pdf|xls|xlsx)$/i,z=[[`image`,/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|webp)$/i],[`audio`,/\.(?:aac|flac|m4a|mp3|oga|opus|wav)$/i],[`video`,/\.(?:m4v|mov|mp4|ogv|webm)$/i]];function B(e){let{file:t,name:n,type:r}=e,i=t?t.name:n;if(R.test(i))return`document`;let a=(r||(t?t.type:``)).toLowerCase(),o=z.find(([e])=>a.startsWith(`${e}/`));return o?o[0]:z.find(([,e])=>e.test(i))?.[0]??`unknown`}const V=[`aria-label`],H={class:`c-attachments__header`},U={key:0,class:`c-attachments__layout`},W={class:`c-attachments__navigation`},G=[`aria-label`],K=[`aria-current`,`onClick`],q={class:`c-attachments__info`},J={class:`c-attachments__name`},oe={class:`c-attachments__meta`},se={key:0},ce={key:1},le={key:2},ue={key:3},de=[`aria-label`],fe={class:`c-attachments__details-header`},pe={class:`c-attachments__details-title`},me={key:0},he={key:0,class:`c-attachments__actions`},ge={class:`c-attachments__preview`};var Y=t(g({name:`C_Attachments`,__name:`index`,props:v({items:{},title:{},uploadable:{type:Boolean},downloadable:{type:Boolean},removable:{type:Boolean},disabled:{type:Boolean},previewLimits:{},density:{},locale:{}},{selectedKey:{default:null},selectedKeyModifiers:{}}),emits:v([`upload`,`download`,`remove`],[`update:selectedKey`]),setup(t,{emit:a}){let s=t,g=a,v=ie(t,`selectedKey`),{t:y}=N(()=>s.locale),j=r(()=>s.density),M=l(()=>e(j.value).size),P=l(()=>s.title??y(`attachments.title`)),F=x(null),I=x(!1);re(()=>{I.value=!0}),te(()=>{I.value=!0}),ne(()=>{I.value=!1});let L=ee({loader:()=>import(`./C_FilePreview2.js`).then(e=>e.n).then(e=>e.default),loadingComponent:()=>_(`p`,{role:`status`},y(`attachments.loading`)),errorComponent:()=>_(`p`,{role:`alert`},y(`attachments.previewFailed`))}),R={image:`mdi:file-image-outline`,audio:`mdi:file-music-outline`,video:`mdi:file-video-outline`,document:`mdi:file-document-outline`,unknown:`mdi:file-outline`},z=l(()=>new Map(s.items.map(e=>[e.id,e]))),Y=l(()=>{let e=new Set;for(let t of z.value.values())t.category&&e.add(t.category);return Array.from(e,e=>({value:e,label:e}))}),X=l(()=>{let e=[...z.value.values()],{value:t}=F;return!t||!Y.value.some(e=>e.value===t)?e:e.filter(e=>e.category===t)});E(Y,e=>{F.value!==null&&!e.some(e=>e.value===F.value)&&(F.value=null)});let Z=l(()=>X.value.find(e=>e.id===v.value)),Q=l(()=>Z.value?B(Z.value):`unknown`),$=l(()=>{let e=Z.value?.url;if(!(!I.value||!e))return o(e,window.location.href)??void 0});function _e(e){return(e.status===`uploading`||e.status===`paused`)&&Number.isFinite(e.percent)}function ve(e){return e!==void 0&&Number.isInteger(e)&&e>=0&&e<1024**5}function ye(e){return Math.round(Math.max(0,Math.min(e??0,100)))}return(e,r)=>(b(),f(`section`,{class:`c-attachments`,"aria-label":P.value},[p(`header`,H,[p(`strong`,null,w(P.value),1),C(e.$slots,`upload`,{},()=>[t.uploadable?(b(),u(T(O),{key:0,"attr-type":`button`,type:`primary`,secondary:``,size:M.value,disabled:t.disabled,onClick:r[0]||=e=>g(`upload`)},{default:D(()=>[m(w(T(y)(`attachments.upload`)),1)]),_:1},8,[`size`,`disabled`])):d(`v-if`,!0)],!0)]),z.value.size?(b(),f(`div`,U,[p(`div`,W,[Y.value.length?(b(),u(T(A),{key:0,value:F.value,"onUpdate:value":r[1]||=e=>F.value=e,class:`c-attachments__filter`,clearable:``,filterable:``,size:M.value,options:Y.value,placeholder:T(y)(`attachments.allCategories`),"input-props":{"aria-label":T(y)(`attachments.category`)}},null,8,[`value`,`size`,`options`,`placeholder`,`input-props`])):d(`v-if`,!0),p(`ul`,{class:`c-attachments__list`,"aria-label":T(y)(`attachments.list`)},[(b(!0),f(c,null,S(X.value,e=>(b(),f(`li`,{key:e.id},[p(`button`,{class:`c-attachments__item`,type:`button`,"aria-current":v.value===e.id?`true`:void 0,onClick:t=>v.value=e.id},[h(n,{class:`c-attachments__icon`,name:R[T(B)(e)],"aria-hidden":`true`},null,8,[`name`]),p(`span`,q,[p(`span`,J,w(e.name),1),p(`span`,oe,[e.category?(b(),f(`span`,se,w(e.category),1)):d(`v-if`,!0),ve(e.size)?(b(),f(`span`,ce,w(T(i)(e.size)),1)):d(`v-if`,!0),e.status?(b(),f(`span`,le,w(T(y)(`attachments.status.${e.status}`)),1)):d(`v-if`,!0),_e(e)?(b(),f(`span`,ue,w(ye(e.percent))+`%`,1)):d(`v-if`,!0)])])],8,K)]))),128))],8,G)]),p(`section`,{class:`c-attachments__details`,"aria-label":T(y)(`attachments.preview`)},[Z.value?(b(),f(c,{key:0},[p(`header`,fe,[p(`div`,pe,[p(`strong`,null,w(Z.value.name),1),Z.value.description?(b(),f(`p`,me,w(Z.value.description),1)):d(`v-if`,!0)]),t.downloadable||t.removable?(b(),f(`div`,he,[t.downloadable?(b(),u(T(O),{key:0,"attr-type":`button`,secondary:``,size:M.value,disabled:t.disabled,onClick:r[2]||=e=>g(`download`,Z.value)},{default:D(()=>[m(w(T(y)(`attachments.download`)),1)]),_:1},8,[`size`,`disabled`])):d(`v-if`,!0),t.removable?(b(),u(T(O),{key:1,"attr-type":`button`,tertiary:``,type:`error`,size:M.value,disabled:t.disabled,onClick:r[3]||=e=>g(`remove`,Z.value)},{default:D(()=>[m(w(T(y)(`attachments.remove`)),1)]),_:1},8,[`size`,`disabled`])):d(`v-if`,!0)])):d(`v-if`,!0)]),p(`div`,ge,[I.value?C(e.$slots,`preview`,{item:Z.value,kind:Q.value},()=>[!Z.value.file&&!$.value||Q.value===`unknown`?(b(),u(T(k),{key:0,description:T(y)(`attachments.previewUnavailable`)},null,8,[`description`])):Q.value===`document`?(b(),u(T(L),{key:Z.value.id,inline:``,file:Z.value.file,"file-name":Z.value.file?.name??Z.value.name,url:$.value,"preview-limits":t.previewLimits},null,8,[`file`,`file-name`,`url`,`preview-limits`])):(b(),u(ae,{key:Z.value.id,file:Z.value.file,url:$.value,kind:Q.value,name:Z.value.name,locale:t.locale},null,8,[`file`,`url`,`kind`,`name`,`locale`]))],!0,0):d(`v-if`,!0)])],64)):(b(),u(T(k),{key:1,class:`c-attachments__placeholder`,description:T(y)(`attachments.choose`)},null,8,[`description`]))],8,de)])):(b(),u(T(k),{key:1,class:`c-attachments__placeholder`,description:T(y)(`attachments.empty`)},null,8,[`description`]))],8,V))}}),[[`__scopeId`,`data-v-fb693f98`]]);export{Y as t};
|
package/dist/C_AudioPlayer.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MODE_ICON_MAP, i as DEFAULT_AUDIO_PLAYER_PROPS, n as AudioPlayerProps, o as formatTime, r as AudioTrack, t as _default } from "./
|
|
1
|
+
import { a as MODE_ICON_MAP, i as DEFAULT_AUDIO_PLAYER_PROPS, n as AudioPlayerProps, o as formatTime, r as AudioTrack, t as _default } from "./index3.vue.cjs";
|
|
2
2
|
export { type AudioPlayerProps, type AudioTrack, _default as C_AudioPlayer, DEFAULT_AUDIO_PLAYER_PROPS, MODE_ICON_MAP, formatTime };
|
package/dist/C_AudioPlayer.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MODE_ICON_MAP, i as DEFAULT_AUDIO_PLAYER_PROPS, n as AudioPlayerProps, o as formatTime, r as AudioTrack, t as _default } from "./
|
|
1
|
+
import { a as MODE_ICON_MAP, i as DEFAULT_AUDIO_PLAYER_PROPS, n as AudioPlayerProps, o as formatTime, r as AudioTrack, t as _default } from "./index3.vue.js";
|
|
2
2
|
export { type AudioPlayerProps, type AudioTrack, _default as C_AudioPlayer, DEFAULT_AUDIO_PLAYER_PROPS, MODE_ICON_MAP, formatTime };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as OptionValue, n as OptionRequest, r as OptionSource, t as OptionPage } from "./optionSource.cjs";
|
|
2
|
-
import { n as AutoCompleteProps, t as AutoCompleteOptionItem } from "./
|
|
3
|
-
import { t as _default } from "./
|
|
2
|
+
import { n as AutoCompleteProps, t as AutoCompleteOptionItem } from "./types4.cjs";
|
|
3
|
+
import { t as _default } from "./index4.vue.cjs";
|
|
4
4
|
export { type AutoCompleteOptionItem, type AutoCompleteProps, _default as C_AutoComplete, type OptionPage, type OptionRequest, type OptionSource, type OptionValue };
|
package/dist/C_AutoComplete.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as OptionValue, n as OptionRequest, r as OptionSource, t as OptionPage } from "./optionSource.js";
|
|
2
|
-
import { n as AutoCompleteProps, t as AutoCompleteOptionItem } from "./
|
|
3
|
-
import { t as _default } from "./
|
|
2
|
+
import { n as AutoCompleteProps, t as AutoCompleteOptionItem } from "./types4.js";
|
|
3
|
+
import { t as _default } from "./index4.vue.js";
|
|
4
4
|
export { type AutoCompleteOptionItem, type AutoCompleteProps, _default as C_AutoComplete, type OptionPage, type OptionRequest, type OptionSource, type OptionValue };
|
package/dist/C_AvatarGroup.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as STATUS_COLOR_MAP, i as DEFAULT_AVATAR_GROUP_PROPS, n as AvatarGroupProps, o as getInitials, r as AvatarItem, s as nameToColor, t as _default } from "./
|
|
1
|
+
import { a as STATUS_COLOR_MAP, i as DEFAULT_AVATAR_GROUP_PROPS, n as AvatarGroupProps, o as getInitials, r as AvatarItem, s as nameToColor, t as _default } from "./index5.vue.cjs";
|
|
2
2
|
export { STATUS_COLOR_MAP as AVATAR_STATUS_COLOR_MAP, type AvatarGroupProps, type AvatarItem, _default as C_AvatarGroup, DEFAULT_AVATAR_GROUP_PROPS, getInitials, nameToColor };
|
package/dist/C_AvatarGroup.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as STATUS_COLOR_MAP, i as DEFAULT_AVATAR_GROUP_PROPS, n as AvatarGroupProps, o as getInitials, r as AvatarItem, s as nameToColor, t as _default } from "./
|
|
1
|
+
import { a as STATUS_COLOR_MAP, i as DEFAULT_AVATAR_GROUP_PROPS, n as AvatarGroupProps, o as getInitials, r as AvatarItem, s as nameToColor, t as _default } from "./index5.vue.js";
|
|
2
2
|
export { STATUS_COLOR_MAP as AVATAR_STATUS_COLOR_MAP, type AvatarGroupProps, type AvatarItem, _default as C_AvatarGroup, DEFAULT_AVATAR_GROUP_PROPS, getInitials, nameToColor };
|
package/dist/C_Barcode.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BarcodeProps, t as _default } from "./
|
|
1
|
+
import { n as BarcodeProps, t as _default } from "./index6.vue.cjs";
|
|
2
2
|
export { type BarcodeProps, _default as C_Barcode };
|
package/dist/C_Barcode.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BarcodeProps, t as _default } from "./
|
|
1
|
+
import { n as BarcodeProps, t as _default } from "./index6.vue.js";
|
|
2
2
|
export { type BarcodeProps, _default as C_Barcode };
|
package/dist/C_BatchResult.css
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
@import "./C_Table.base.css";
|
|
2
|
-
.c-batch-result[data-v-
|
|
2
|
+
.c-batch-result[data-v-bb3583c1] {
|
|
3
3
|
min-width: 0;
|
|
4
4
|
}
|
|
5
|
-
.c-batch-result__header[data-v-
|
|
5
|
+
.c-batch-result__header[data-v-bb3583c1] {
|
|
6
6
|
display: flex;
|
|
7
7
|
gap: 8px 16px;
|
|
8
8
|
align-items: baseline;
|
|
9
9
|
flex-wrap: wrap;
|
|
10
10
|
margin-bottom: 12px;
|
|
11
11
|
}
|
|
12
|
-
.c-batch-result__header span[data-v-
|
|
12
|
+
.c-batch-result__header span[data-v-bb3583c1] {
|
|
13
13
|
font-size: 12px;
|
|
14
14
|
opacity: 0.72;
|
|
15
15
|
}
|
|
16
|
-
.c-batch-result__toolbar[data-v-
|
|
16
|
+
.c-batch-result__toolbar[data-v-bb3583c1] {
|
|
17
17
|
display: flex;
|
|
18
18
|
gap: 12px;
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: space-between;
|
|
21
21
|
margin-bottom: 12px;
|
|
22
22
|
}
|
|
23
|
-
.c-batch-result__toolbar[data-v-
|
|
23
|
+
.c-batch-result__toolbar[data-v-bb3583c1] .n-select {
|
|
24
24
|
width: min(180px, 50%);
|
|
25
25
|
}
|
|
26
|
-
.c-batch-result[data-v-
|
|
26
|
+
.c-batch-result[data-v-bb3583c1] .n-pagination {
|
|
27
27
|
justify-content: flex-end;
|
|
28
28
|
margin-top: 12px;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/* layer: icons */
|
|
32
|
-
.i-mdi\:refresh[data-v-
|
|
32
|
+
.i-mdi\:refresh[data-v-bb3583c1]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17.65 6.35A7.96 7.96 0 0 0 12 4a8 8 0 0 0-8 8a8 8 0 0 0 8 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18a6 6 0 0 1-6-6a6 6 0 0 1 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
|
|
33
33
|
/* layer: default */
|
|
34
|
-
.h-4[data-v-
|
|
35
|
-
.w-4[data-v-
|
|
36
|
-
.filter[data-v-
|
|
34
|
+
.h-4[data-v-bb3583c1]{height:1rem;}
|
|
35
|
+
.w-4[data-v-bb3583c1]{width:1rem;}
|
|
36
|
+
.filter[data-v-bb3583c1]{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
|
package/dist/C_BatchResult.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BatchResultEmits, r as BatchResultProps, t as _default } from "./
|
|
1
|
+
import { n as BatchResultEmits, r as BatchResultProps, t as _default } from "./index7.vue.cjs";
|
|
2
2
|
export { type BatchResultEmits, type BatchResultProps, _default as C_BatchResult };
|
package/dist/C_BatchResult.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BatchResultEmits, r as BatchResultProps, t as _default } from "./
|
|
1
|
+
import { n as BatchResultEmits, r as BatchResultProps, t as _default } from "./index7.vue.js";
|
|
2
2
|
export { type BatchResultEmits, type BatchResultProps, _default as C_BatchResult };
|
package/dist/C_BatchResult2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`)
|
|
1
|
+
const e=require(`./chunk.cjs`),t=require(`./batchPatch.cjs`),n=require(`./useComponentLocale.cjs`),r=require(`./export-helper.cjs`),i=require(`./C_Table2.cjs`);let a=require(`vue`),o=require(`naive-ui`);const s=[`success`,`failure`,`conflict`,`skipped`];function c(e){let{t:r}=n.t(()=>e.locale),i=(0,a.shallowRef)(`all`),o=(0,a.shallowRef)(1),c=(0,a.computed)(()=>Number.isFinite(e.pageSize)&&e.pageSize>0?Math.max(1,Math.trunc(e.pageSize)):20),l=(0,a.computed)(()=>[...new Map(e.results.map(e=>[e.key,e])).values()]),u=(0,a.computed)(()=>{let e={all:l.value.length,success:0,failure:0,conflict:0,skipped:0};for(let t of l.value)e[t.status]++;return e}),d=(0,a.computed)(()=>[{value:`all`,label:`${r(`batch.all`)} ${u.value.all}`},...s.map(e=>({value:e,label:`${r(`batch.${e}`)} ${u.value[e]}`}))]),f=(0,a.computed)(()=>i.value===`all`?l.value:l.value.filter(e=>e.status===i.value)),p=(0,a.computed)(()=>f.value.slice((o.value-1)*c.value,o.value*c.value)),m=(0,a.computed)(()=>t.n(l.value));return(0,a.watch)([i,c],()=>{o.value=1}),(0,a.watch)(()=>f.value.length,e=>{o.value=Math.min(o.value,Math.max(1,Math.ceil(e/c.value)))}),{filter:i,page:o,pageSize:c,counts:u,options:d,filtered:f,rows:p,retryKeys:m,t:r}}var l=e.t({default:()=>h});const u=[`aria-label`],d={class:`c-batch-result__header`},f={role:`status`},p={class:`c-batch-result__toolbar`},m=(0,a.defineComponent)({name:`C_BatchResult`,__name:`index`,props:{results:{},title:{},pageSize:{default:20},showRetry:{type:Boolean,default:!0},locale:{}},emits:[`retry`],setup(e,{emit:t}){let n=e,r=t,{filter:s,page:l,pageSize:m,counts:h,options:g,filtered:_,rows:v,retryKeys:y,t:b}=c(n),x=(0,a.computed)(()=>n.title??b(`batch.title`)),S={success:`success`,failure:`error`,conflict:`warning`,skipped:`default`},C=(0,a.computed)(()=>{let e=[{key:`key`,title:b(`batch.id`),minWidth:130},{key:`status`,title:b(`batch.status`),width:90,render:e=>(0,a.h)(o.NTag,{size:`small`,type:S[e.status]},{default:()=>b(`batch.${e.status}`)})},{key:`message`,title:b(`batch.message`),minWidth:220}];return n.showRetry&&e.push({key:`retryable`,title:b(`batch.retryColumn`),width:90,render:e=>e.retryable&&(e.status===`failure`||e.status===`conflict`)?b(`batch.retryable`):`—`}),e}),w=(0,a.computed)(()=>({locale:n.locale,density:`compact`,pagination:!1,toolbar:{show:!1},display:{singleLine:!1,maxHeight:420},virtualScroll:{enabled:v.value.length>20,maxHeight:420}}));return(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`section`,{class:`c-batch-result`,"aria-label":x.value},[(0,a.createElementVNode)(`header`,d,[(0,a.createElementVNode)(`strong`,null,(0,a.toDisplayString)(x.value),1),(0,a.createElementVNode)(`span`,f,(0,a.toDisplayString)((0,a.unref)(b)(`batch.summary`,{total:(0,a.unref)(h).all,success:(0,a.unref)(h).success,failure:(0,a.unref)(h).failure,conflict:(0,a.unref)(h).conflict,skipped:(0,a.unref)(h).skipped})),1)]),(0,a.createElementVNode)(`div`,p,[(0,a.createVNode)((0,a.unref)(o.NSelect),{value:(0,a.unref)(s),"onUpdate:value":n[0]||=e=>(0,a.isRef)(s)?s.value=e:null,options:(0,a.unref)(g),size:`small`,"aria-label":(0,a.unref)(b)(`batch.filterLabel`)},null,8,[`value`,`options`,`aria-label`]),e.showRetry?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.NButton),{key:0,size:`small`,disabled:!(0,a.unref)(y).length,onClick:n[1]||=e=>r(`retry`,[...(0,a.unref)(y)])},{icon:(0,a.withCtx)(()=>[...n[3]||=[(0,a.createElementVNode)(`span`,{class:`i-mdi:refresh w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:(0,a.withCtx)(()=>[(0,a.createTextVNode)(` `+(0,a.toDisplayString)((0,a.unref)(b)(`batch.retry`,{count:(0,a.unref)(y).length})),1)]),_:1},8,[`disabled`])):(0,a.createCommentVNode)(`v-if`,!0)]),(0,a.createVNode)(i.t,{data:(0,a.unref)(v),columns:C.value,"row-key":`key`,config:w.value},null,8,[`data`,`columns`,`config`]),(0,a.unref)(_).length>(0,a.unref)(m)?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.NPagination),{key:0,page:(0,a.unref)(l),"onUpdate:page":n[2]||=e=>(0,a.isRef)(l)?l.value=e:null,"page-size":(0,a.unref)(m),"item-count":(0,a.unref)(_).length,size:`small`},null,8,[`page`,`page-size`,`item-count`])):(0,a.createCommentVNode)(`v-if`,!0)],8,u))}});var h=r.t(m,[[`__scopeId`,`data-v-bb3583c1`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
|
package/dist/C_BatchResult2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./rolldown-runtime.js";import{n as t}from"./batchPatch.js";import{t as n}from"./useComponentLocale.js";import{t as r}from"./export-helper.js";import{t as i}from"./C_Table2.js";import{computed as a,createBlock as o,createCommentVNode as s,createElementBlock as c,createElementVNode as l,createTextVNode as u,createVNode as d,defineComponent as f,h as p,isRef as m,openBlock as h,shallowRef as g,toDisplayString as _,unref as v,watch as y,withCtx as b}from"vue";import{NButton as x,NPagination as S,NSelect as C,NTag as w}from"naive-ui";const T=[`success`,`failure`,`conflict`,`skipped`];function E(e){let{t:r}=n(()=>e.locale),i=g(`all`),o=g(1),s=a(()=>Number.isFinite(e.pageSize)&&e.pageSize>0?Math.max(1,Math.trunc(e.pageSize)):20),c=a(()=>[...new Map(e.results.map(e=>[e.key,e])).values()]),l=a(()=>{let e={all:c.value.length,success:0,failure:0,conflict:0,skipped:0};for(let t of c.value)e[t.status]++;return e}),u=a(()=>[{value:`all`,label:`${r(`batch.all`)} ${l.value.all}`},...T.map(e=>({value:e,label:`${r(`batch.${e}`)} ${l.value[e]}`}))]),d=a(()=>i.value===`all`?c.value:c.value.filter(e=>e.status===i.value)),f=a(()=>d.value.slice((o.value-1)*s.value,o.value*s.value)),p=a(()=>t(c.value));return y([i,s],()=>{o.value=1}),y(()=>d.value.length,e=>{o.value=Math.min(o.value,Math.max(1,Math.ceil(e/s.value)))}),{filter:i,page:o,pageSize:s,counts:l,options:u,filtered:d,rows:f,retryKeys:p,t:r}}var D=e({default:()=>M});const O=[`aria-label`],k={class:`c-batch-result__header`},A={role:`status`},j={class:`c-batch-result__toolbar`};var M=r(f({name:`C_BatchResult`,__name:`index`,props:{results:{},title:{},pageSize:{default:20},showRetry:{type:Boolean,default:!0},locale:{}},emits:[`retry`],setup(e,{emit:t}){let n=e,r=t,{filter:f,page:g,pageSize:y,counts:T,options:D,filtered:M,rows:N,retryKeys:P,t:F}=E(n),I=a(()=>n.title??F(`batch.title`)),L={success:`success`,failure:`error`,conflict:`warning`,skipped:`default`},R=a(()=>{let e=[{key:`key`,title:F(`batch.id`),minWidth:130},{key:`status`,title:F(`batch.status`),width:90,render:e=>p(w,{size:`small`,type:L[e.status]},{default:()=>F(`batch.${e.status}`)})},{key:`message`,title:F(`batch.message`),minWidth:220}];return n.showRetry&&e.push({key:`retryable`,title:F(`batch.retryColumn`),width:90,render:e=>e.retryable&&(e.status===`failure`||e.status===`conflict`)?F(`batch.retryable`):`—`}),e}),z=a(()=>({locale:n.locale,density:`compact`,pagination:!1,toolbar:{show:!1},display:{singleLine:!1,maxHeight:420},virtualScroll:{enabled:N.value.length>20,maxHeight:420}}));return(t,n)=>(h(),c(`section`,{class:`c-batch-result`,"aria-label":I.value},[l(`header`,k,[l(`strong`,null,_(I.value),1),l(`span`,A,_(v(F)(`batch.summary`,{total:v(T).all,success:v(T).success,failure:v(T).failure,conflict:v(T).conflict,skipped:v(T).skipped})),1)]),l(`div`,j,[d(v(C),{value:v(f),"onUpdate:value":n[0]||=e=>m(f)?f.value=e:null,options:v(D),size:`small`,"aria-label":v(F)(`batch.filterLabel`)},null,8,[`value`,`options`,`aria-label`]),e.showRetry?(h(),o(v(x),{key:0,size:`small`,disabled:!v(P).length,onClick:n[1]||=e=>r(`retry`,[...v(P)])},{icon:b(()=>[...n[3]||=[l(`span`,{class:`i-mdi:refresh w-4 h-4`,"aria-hidden":`true`},null,-1)]]),default:b(()=>[u(` `+_(v(F)(`batch.retry`,{count:v(P).length})),1)]),_:1},8,[`disabled`])):s(`v-if`,!0)]),d(i,{data:v(N),columns:R.value,"row-key":`key`,config:z.value},null,8,[`data`,`columns`,`config`]),v(M).length>v(y)?(h(),o(v(S),{key:0,page:v(g),"onUpdate:page":n[2]||=e=>m(g)?g.value=e:null,"page-size":v(y),"item-count":v(M).length,size:`small`},null,8,[`page`,`page-size`,`item-count`])):s(`v-if`,!0)],8,O))}}),[[`__scopeId`,`data-v-bb3583c1`]]);export{D as n,M as t};
|
package/dist/C_Breadcrumb.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as BreadcrumbItem } from "./
|
|
2
|
-
import { n as BreadcrumbMenuItem, t as _default } from "./
|
|
1
|
+
import { t as BreadcrumbItem } from "./types5.cjs";
|
|
2
|
+
import { n as BreadcrumbMenuItem, t as _default } from "./index9.vue.cjs";
|
|
3
3
|
export { type BreadcrumbItem, type BreadcrumbMenuItem, _default as C_Breadcrumb };
|
package/dist/C_Breadcrumb.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as BreadcrumbItem } from "./public.js";
|
|
2
|
-
import { n as BreadcrumbMenuItem, t as _default } from "./
|
|
2
|
+
import { n as BreadcrumbMenuItem, t as _default } from "./index8.vue.js";
|
|
3
3
|
export { type BreadcrumbItem, type BreadcrumbMenuItem, _default as C_Breadcrumb };
|
package/dist/C_Cascade.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as CascadeValue, n as CascadeItem, r as CascadeProps, t as _default } from "./
|
|
1
|
+
import { i as CascadeValue, n as CascadeItem, r as CascadeProps, t as _default } from "./index10.vue.cjs";
|
|
2
2
|
export { _default as C_Cascade, type CascadeItem, type CascadeProps, type CascadeValue };
|
package/dist/C_Cascade.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as CascadeValue, n as CascadeItem, r as CascadeProps, t as _default } from "./
|
|
1
|
+
import { i as CascadeValue, n as CascadeItem, r as CascadeProps, t as _default } from "./index9.vue.js";
|
|
2
2
|
export { _default as C_Cascade, type CascadeItem, type CascadeProps, type CascadeValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./C_ChangeReview2.cjs`);exports.C_ChangeReview=e.t;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@import "./shared-tokens.css";
|
|
2
|
+
.c-change-review[data-v-0c05afcf] {
|
|
3
|
+
display: grid;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
gap: 12px;
|
|
6
|
+
}
|
|
7
|
+
.c-change-review__header[data-v-0c05afcf], .c-change-review__footer[data-v-0c05afcf] {
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
gap: 8px 16px;
|
|
13
|
+
}
|
|
14
|
+
.c-change-review__heading[data-v-0c05afcf] {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: baseline;
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
gap: 4px 12px;
|
|
19
|
+
}
|
|
20
|
+
.c-change-review [role=status][data-v-0c05afcf] {
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
opacity: 0.75;
|
|
23
|
+
}
|
|
24
|
+
.c-change-review__viewport[data-v-0c05afcf] {
|
|
25
|
+
min-width: 0;
|
|
26
|
+
overflow: auto;
|
|
27
|
+
border: 1px solid var(--c-border, var(--c-theme-border, #dce3ed));
|
|
28
|
+
border-radius: var(--c-radius-panel, var(--c-theme-radius-panel, 8px));
|
|
29
|
+
}
|
|
30
|
+
.c-change-review__viewport[data-v-0c05afcf]:focus-visible {
|
|
31
|
+
outline: 2px solid var(--c-focus-ring, var(--c-theme-focus-ring, #2563eb));
|
|
32
|
+
outline-offset: 2px;
|
|
33
|
+
}
|
|
34
|
+
.c-change-review__group[data-v-0c05afcf] {
|
|
35
|
+
background: var(--n-th-color);
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
}
|
|
38
|
+
.c-change-review__value[data-v-0c05afcf] {
|
|
39
|
+
min-width: 5em;
|
|
40
|
+
font-variant-numeric: tabular-nums;
|
|
41
|
+
overflow-wrap: anywhere;
|
|
42
|
+
white-space: pre-wrap;
|
|
43
|
+
}
|
|
44
|
+
.c-change-review__status[data-v-0c05afcf], .c-change-review__selection[data-v-0c05afcf] {
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
}
|
|
47
|
+
.c-change-review__empty[data-v-0c05afcf] {
|
|
48
|
+
padding: 16px;
|
|
49
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as ChangeReviewProps, i as ChangeReviewKey, n as ChangeReviewEmits, o as ChangeReviewSide, r as ChangeReviewField, s as ChangeReviewStatus, t as _default } from "./index11.vue.cjs";
|
|
2
|
+
export { _default as C_ChangeReview, type ChangeReviewEmits, type ChangeReviewField, type ChangeReviewKey, type ChangeReviewProps, type ChangeReviewSide, type ChangeReviewStatus };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as ChangeReviewProps, i as ChangeReviewKey, n as ChangeReviewEmits, o as ChangeReviewSide, r as ChangeReviewField, s as ChangeReviewStatus, t as _default } from "./index10.vue.js";
|
|
2
|
+
export { _default as C_ChangeReview, type ChangeReviewEmits, type ChangeReviewField, type ChangeReviewKey, type ChangeReviewProps, type ChangeReviewSide, type ChangeReviewStatus };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./C_ChangeReview2.js";export{e as C_ChangeReview};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./density.cjs`),t=require(`./export-helper.cjs`),n=require(`./useComponentDensity.cjs`),r=require(`./useScopedComponentLocale.cjs`);let i=require(`vue`),a=require(`naive-ui`);const o=Object.freeze({"changeReview.title":`字段变更审阅`,"changeReview.table":`字段对照表`,"changeReview.summary":`{count} 个变更 · 共 {total} 个字段`,"changeReview.onlyChanged":`仅看变更`,"changeReview.field":`字段`,"changeReview.before":`原值`,"changeReview.after":`建议值`,"changeReview.status":`变更`,"changeReview.select":`采纳`,"changeReview.selectField":`采纳 {field}`,"changeReview.unchanged":`一致`,"changeReview.added":`补充`,"changeReview.removed":`移除`,"changeReview.changed":`修改`,"changeReview.missing":`未提供`,"changeReview.null":`空值`,"changeReview.noChanges":`没有字段变更`,"changeReview.empty":`没有可审阅的字段`,"changeReview.selected":`已选 {count} 项`,"changeReview.apply":`采纳所选字段`}),s=Object.freeze({"changeReview.title":`Review field changes`,"changeReview.table":`Field comparison`,"changeReview.summary":`{count} changed · {total} fields`,"changeReview.onlyChanged":`Changed fields only`,"changeReview.field":`Field`,"changeReview.before":`Original value`,"changeReview.after":`Proposed value`,"changeReview.status":`Change`,"changeReview.select":`Accept`,"changeReview.selectField":`Accept {field}`,"changeReview.unchanged":`Unchanged`,"changeReview.added":`Added`,"changeReview.removed":`Removed`,"changeReview.changed":`Modified`,"changeReview.missing":`Not provided`,"changeReview.null":`Null`,"changeReview.noChanges":`No field changes`,"changeReview.empty":`No fields to review`,"changeReview.selected":`{count} selected`,"changeReview.apply":`Accept selected fields`}),c=e=>r.t(o,s,e);function l(e,t,n){let r=t[e.key],i=n[e.key],a=e.equal??Object.is,o=`changed`;return a(r,i)?o=`unchanged`:r==null&&i!=null?o=`added`:r!=null&&i==null&&(o=`removed`),{field:e,before:r,after:i,status:o,eligible:o!==`unchanged`&&!e.disabled&&i!==void 0,format:t=>e.format?.(t===`before`?r:i,t)}}const u=[`aria-label`],d={class:`c-change-review__header`},f={class:`c-change-review__heading`},p={role:`status`},m=[`aria-label`],h={scope:`col`},g={scope:`col`},_={scope:`col`},v={scope:`col`},y={key:0,scope:`col`},b={key:0},x=[`colspan`],S={scope:`row`},C={class:`c-change-review__status`},w={key:0,class:`c-change-review__selection`},T={key:1},E={key:2,class:`c-change-review__footer`},D={role:`status`},O=(0,i.defineComponent)({name:`C_ChangeReview`,__name:`index`,props:(0,i.mergeModels)({before:{},after:{},fields:{},title:{},beforeLabel:{},afterLabel:{},selectable:{type:Boolean},disabled:{type:Boolean},density:{},locale:{}},{selectedKeys:{default:()=>[]},selectedKeysModifiers:{},onlyChanged:{type:Boolean,default:!0},onlyChangedModifiers:{}}),emits:(0,i.mergeModels)([`apply`],[`update:selectedKeys`,`update:onlyChanged`]),setup(t,{emit:r}){let o=t,s=r,O=(0,i.useModel)(t,`selectedKeys`),k=(0,i.useModel)(t,`onlyChanged`),{t:A}=c(()=>o.locale),j=n.t(()=>o.density),M=(0,i.computed)(()=>e.t(j.value).size),N=(0,i.computed)(()=>o.title??A(`changeReview.title`)),P=[`before`,`after`],F={unchanged:`default`,added:`success`,removed:`error`,changed:`warning`},I=(0,i.computed)(()=>{let e=new Map;for(let t of o.fields)e.has(t.key)||e.set(t.key,l(t,o.before,o.after));return[...e.values()]}),L=(0,i.computed)(()=>I.value.filter(e=>e.status!==`unchanged`)),R=(0,i.computed)(()=>L.value.length),z=(0,i.computed)(()=>{let e=new Map;for(let t of k.value?L.value:I.value){let n=t.field.group??``,r=e.get(n);r?r.push(t):e.set(n,[t])}return e}),B=(0,i.computed)(()=>L.value.filter(e=>e.eligible).map(e=>e.field.key)),V=(0,i.computed)(()=>{let e=new Set(O.value);return new Set(B.value.filter(t=>e.has(t)))});function H(e,t){let n=e.format(t);if(n!==void 0)return n;let r=e[t];return r===void 0?A(`changeReview.missing`):r===null?A(`changeReview.null`):r===``?`""`:String(r)}function U(e,t){if(!o.selectable||o.disabled||!B.value.includes(e))return;let n=new Set(V.value);t?n.add(e):n.delete(e),O.value=[...n]}function W(){!o.disabled&&o.selectable&&V.value.size&&s(`apply`,[...V.value])}return(e,n)=>((0,i.openBlock)(),(0,i.createElementBlock)(`section`,{class:`c-change-review`,"aria-label":N.value},[(0,i.createElementVNode)(`header`,d,[(0,i.createElementVNode)(`div`,f,[(0,i.createElementVNode)(`strong`,null,(0,i.toDisplayString)(N.value),1),(0,i.createElementVNode)(`span`,p,(0,i.toDisplayString)((0,i.unref)(A)(`changeReview.summary`,{count:R.value,total:I.value.length})),1)]),I.value.length?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.NCheckbox),{key:0,checked:k.value,"onUpdate:checked":n[0]||=e=>k.value=e,size:M.value},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(A)(`changeReview.onlyChanged`)),1)]),_:1},8,[`checked`,`size`])):(0,i.createCommentVNode)(`v-if`,!0)]),z.value.size?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:0,class:`c-change-review__viewport`,role:`region`,"aria-label":(0,i.unref)(A)(`changeReview.table`),tabindex:`0`},[(0,i.createVNode)((0,i.unref)(a.NTable),{size:M.value,bordered:!1},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`thead`,null,[(0,i.createElementVNode)(`tr`,null,[(0,i.createElementVNode)(`th`,h,(0,i.toDisplayString)((0,i.unref)(A)(`changeReview.field`)),1),(0,i.createElementVNode)(`th`,g,(0,i.toDisplayString)(t.beforeLabel??(0,i.unref)(A)(`changeReview.before`)),1),(0,i.createElementVNode)(`th`,_,(0,i.toDisplayString)(t.afterLabel??(0,i.unref)(A)(`changeReview.after`)),1),(0,i.createElementVNode)(`th`,v,(0,i.toDisplayString)((0,i.unref)(A)(`changeReview.status`)),1),t.selectable?((0,i.openBlock)(),(0,i.createElementBlock)(`th`,y,(0,i.toDisplayString)((0,i.unref)(A)(`changeReview.select`)),1)):(0,i.createCommentVNode)(`v-if`,!0)])]),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(z.value,([n,r])=>((0,i.openBlock)(),(0,i.createElementBlock)(`tbody`,{key:n},[n?((0,i.openBlock)(),(0,i.createElementBlock)(`tr`,b,[(0,i.createElementVNode)(`th`,{scope:`rowgroup`,colspan:t.selectable?5:4,class:`c-change-review__group`},(0,i.toDisplayString)(n),9,x)])):(0,i.createCommentVNode)(`v-if`,!0),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(r,n=>((0,i.openBlock)(),(0,i.createElementBlock)(`tr`,{key:n.field.key},[(0,i.createElementVNode)(`th`,S,(0,i.toDisplayString)(n.field.label),1),((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(P,t=>(0,i.createElementVNode)(`td`,{key:t,class:`c-change-review__value`},[(0,i.renderSlot)(e.$slots,`value`,{field:n.field,side:t,value:n[t]},()=>[(0,i.createTextVNode)((0,i.toDisplayString)(H(n,t)),1)],!0)])),64)),(0,i.createElementVNode)(`td`,C,[(0,i.createVNode)((0,i.unref)(a.NTag),{type:F[n.status],bordered:!1,size:`small`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(A)(`changeReview.${n.status}`)),1)]),_:2},1032,[`type`])]),t.selectable?((0,i.openBlock)(),(0,i.createElementBlock)(`td`,w,[n.eligible?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.NCheckbox),{key:0,"aria-label":(0,i.unref)(A)(`changeReview.selectField`,{field:n.field.label}),checked:V.value.has(n.field.key),disabled:t.disabled,size:M.value,"onUpdate:checked":e=>U(n.field.key,e)},null,8,[`aria-label`,`checked`,`disabled`,`size`,`onUpdate:checked`])):((0,i.openBlock)(),(0,i.createElementBlock)(`span`,T,`—`))])):(0,i.createCommentVNode)(`v-if`,!0)]))),128))]))),128))]),_:3},8,[`size`])],8,m)):((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.NEmpty),{key:1,class:`c-change-review__empty`,description:(0,i.unref)(A)(I.value.length?`changeReview.noChanges`:`changeReview.empty`)},null,8,[`description`])),t.selectable?((0,i.openBlock)(),(0,i.createElementBlock)(`footer`,E,[(0,i.createElementVNode)(`span`,D,(0,i.toDisplayString)((0,i.unref)(A)(`changeReview.selected`,{count:V.value.size})),1),(0,i.createVNode)((0,i.unref)(a.NButton),{"attr-type":`button`,type:`primary`,size:M.value,disabled:t.disabled||!V.value.size,onClick:W},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(A)(`changeReview.apply`)),1)]),_:1},8,[`size`,`disabled`])])):(0,i.createCommentVNode)(`v-if`,!0)],8,u))}});var k=t.t(O,[[`__scopeId`,`data-v-0c05afcf`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return k}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./density.js";import{t}from"./export-helper.js";import{t as n}from"./useComponentDensity.js";import{t as r}from"./useScopedComponentLocale.js";import{Fragment as i,computed as a,createBlock as o,createCommentVNode as s,createElementBlock as c,createElementVNode as l,createTextVNode as u,createVNode as d,defineComponent as f,mergeModels as p,openBlock as m,renderList as h,renderSlot as ee,toDisplayString as g,unref as _,useModel as v,withCtx as y}from"vue";import{NButton as b,NCheckbox as x,NEmpty as S,NTable as C,NTag as w}from"naive-ui";const T=Object.freeze({"changeReview.title":`字段变更审阅`,"changeReview.table":`字段对照表`,"changeReview.summary":`{count} 个变更 · 共 {total} 个字段`,"changeReview.onlyChanged":`仅看变更`,"changeReview.field":`字段`,"changeReview.before":`原值`,"changeReview.after":`建议值`,"changeReview.status":`变更`,"changeReview.select":`采纳`,"changeReview.selectField":`采纳 {field}`,"changeReview.unchanged":`一致`,"changeReview.added":`补充`,"changeReview.removed":`移除`,"changeReview.changed":`修改`,"changeReview.missing":`未提供`,"changeReview.null":`空值`,"changeReview.noChanges":`没有字段变更`,"changeReview.empty":`没有可审阅的字段`,"changeReview.selected":`已选 {count} 项`,"changeReview.apply":`采纳所选字段`}),E=Object.freeze({"changeReview.title":`Review field changes`,"changeReview.table":`Field comparison`,"changeReview.summary":`{count} changed · {total} fields`,"changeReview.onlyChanged":`Changed fields only`,"changeReview.field":`Field`,"changeReview.before":`Original value`,"changeReview.after":`Proposed value`,"changeReview.status":`Change`,"changeReview.select":`Accept`,"changeReview.selectField":`Accept {field}`,"changeReview.unchanged":`Unchanged`,"changeReview.added":`Added`,"changeReview.removed":`Removed`,"changeReview.changed":`Modified`,"changeReview.missing":`Not provided`,"changeReview.null":`Null`,"changeReview.noChanges":`No field changes`,"changeReview.empty":`No fields to review`,"changeReview.selected":`{count} selected`,"changeReview.apply":`Accept selected fields`}),te=e=>r(T,E,e);function ne(e,t,n){let r=t[e.key],i=n[e.key],a=e.equal??Object.is,o=`changed`;return a(r,i)?o=`unchanged`:r==null&&i!=null?o=`added`:r!=null&&i==null&&(o=`removed`),{field:e,before:r,after:i,status:o,eligible:o!==`unchanged`&&!e.disabled&&i!==void 0,format:t=>e.format?.(t===`before`?r:i,t)}}const re=[`aria-label`],ie={class:`c-change-review__header`},D={class:`c-change-review__heading`},O={role:`status`},k=[`aria-label`],A={scope:`col`},j={scope:`col`},M={scope:`col`},N={scope:`col`},P={key:0,scope:`col`},F={key:0},I=[`colspan`],L={scope:`row`},R={class:`c-change-review__status`},z={key:0,class:`c-change-review__selection`},B={key:1},V={key:2,class:`c-change-review__footer`},H={role:`status`};var U=t(f({name:`C_ChangeReview`,__name:`index`,props:p({before:{},after:{},fields:{},title:{},beforeLabel:{},afterLabel:{},selectable:{type:Boolean},disabled:{type:Boolean},density:{},locale:{}},{selectedKeys:{default:()=>[]},selectedKeysModifiers:{},onlyChanged:{type:Boolean,default:!0},onlyChangedModifiers:{}}),emits:p([`apply`],[`update:selectedKeys`,`update:onlyChanged`]),setup(t,{emit:r}){let f=t,p=r,T=v(t,`selectedKeys`),E=v(t,`onlyChanged`),{t:U}=te(()=>f.locale),W=n(()=>f.density),G=a(()=>e(W.value).size),K=a(()=>f.title??U(`changeReview.title`)),q=[`before`,`after`],J={unchanged:`default`,added:`success`,removed:`error`,changed:`warning`},Y=a(()=>{let e=new Map;for(let t of f.fields)e.has(t.key)||e.set(t.key,ne(t,f.before,f.after));return[...e.values()]}),X=a(()=>Y.value.filter(e=>e.status!==`unchanged`)),ae=a(()=>X.value.length),Z=a(()=>{let e=new Map;for(let t of E.value?X.value:Y.value){let n=t.field.group??``,r=e.get(n);r?r.push(t):e.set(n,[t])}return e}),Q=a(()=>X.value.filter(e=>e.eligible).map(e=>e.field.key)),$=a(()=>{let e=new Set(T.value);return new Set(Q.value.filter(t=>e.has(t)))});function oe(e,t){let n=e.format(t);if(n!==void 0)return n;let r=e[t];return r===void 0?U(`changeReview.missing`):r===null?U(`changeReview.null`):r===``?`""`:String(r)}function se(e,t){if(!f.selectable||f.disabled||!Q.value.includes(e))return;let n=new Set($.value);t?n.add(e):n.delete(e),T.value=[...n]}function ce(){!f.disabled&&f.selectable&&$.value.size&&p(`apply`,[...$.value])}return(e,n)=>(m(),c(`section`,{class:`c-change-review`,"aria-label":K.value},[l(`header`,ie,[l(`div`,D,[l(`strong`,null,g(K.value),1),l(`span`,O,g(_(U)(`changeReview.summary`,{count:ae.value,total:Y.value.length})),1)]),Y.value.length?(m(),o(_(x),{key:0,checked:E.value,"onUpdate:checked":n[0]||=e=>E.value=e,size:G.value},{default:y(()=>[u(g(_(U)(`changeReview.onlyChanged`)),1)]),_:1},8,[`checked`,`size`])):s(`v-if`,!0)]),Z.value.size?(m(),c(`div`,{key:0,class:`c-change-review__viewport`,role:`region`,"aria-label":_(U)(`changeReview.table`),tabindex:`0`},[d(_(C),{size:G.value,bordered:!1},{default:y(()=>[l(`thead`,null,[l(`tr`,null,[l(`th`,A,g(_(U)(`changeReview.field`)),1),l(`th`,j,g(t.beforeLabel??_(U)(`changeReview.before`)),1),l(`th`,M,g(t.afterLabel??_(U)(`changeReview.after`)),1),l(`th`,N,g(_(U)(`changeReview.status`)),1),t.selectable?(m(),c(`th`,P,g(_(U)(`changeReview.select`)),1)):s(`v-if`,!0)])]),(m(!0),c(i,null,h(Z.value,([n,r])=>(m(),c(`tbody`,{key:n},[n?(m(),c(`tr`,F,[l(`th`,{scope:`rowgroup`,colspan:t.selectable?5:4,class:`c-change-review__group`},g(n),9,I)])):s(`v-if`,!0),(m(!0),c(i,null,h(r,n=>(m(),c(`tr`,{key:n.field.key},[l(`th`,L,g(n.field.label),1),(m(),c(i,null,h(q,t=>l(`td`,{key:t,class:`c-change-review__value`},[ee(e.$slots,`value`,{field:n.field,side:t,value:n[t]},()=>[u(g(oe(n,t)),1)],!0)])),64)),l(`td`,R,[d(_(w),{type:J[n.status],bordered:!1,size:`small`},{default:y(()=>[u(g(_(U)(`changeReview.${n.status}`)),1)]),_:2},1032,[`type`])]),t.selectable?(m(),c(`td`,z,[n.eligible?(m(),o(_(x),{key:0,"aria-label":_(U)(`changeReview.selectField`,{field:n.field.label}),checked:$.value.has(n.field.key),disabled:t.disabled,size:G.value,"onUpdate:checked":e=>se(n.field.key,e)},null,8,[`aria-label`,`checked`,`disabled`,`size`,`onUpdate:checked`])):(m(),c(`span`,B,`—`))])):s(`v-if`,!0)]))),128))]))),128))]),_:3},8,[`size`])],8,k)):(m(),o(_(S),{key:1,class:`c-change-review__empty`,description:_(U)(Y.value.length?`changeReview.noChanges`:`changeReview.empty`)},null,8,[`description`])),t.selectable?(m(),c(`footer`,V,[l(`span`,H,g(_(U)(`changeReview.selected`,{count:$.value.size})),1),d(_(b),{"attr-type":`button`,type:`primary`,size:G.value,disabled:t.disabled||!$.value.size,onClick:ce},{default:y(()=>[u(g(_(U)(`changeReview.apply`)),1)]),_:1},8,[`size`,`disabled`])])):s(`v-if`,!0)],8,re))}}),[[`__scopeId`,`data-v-0c05afcf`]]);export{U as t};
|