@robot-admin/naive-ui-components 0.40.4 → 0.41.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/CHANGELOG.md +16 -0
- package/README.md +62 -214
- package/README_EN.md +62 -195
- 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 +2 -2
- package/dist/constants.d.ts +2 -2
- 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 +6 -232
- package/dist/constants3.d.ts +6 -232
- package/dist/constants4.d.cts +9 -199
- package/dist/constants4.d.ts +9 -199
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/context.d.cts +33 -10
- package/dist/data2.d.cts +8 -8
- package/dist/data2.d.ts +8 -8
- 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 +5 -5
- package/dist/mapUtils.d.ts +5 -5
- 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 +2 -2
- package/dist/useCalendarEvents.d.ts +2 -2
- package/dist/useCollapsePanel.d.cts +7 -7
- package/dist/useCollapsePanel.d.ts +7 -7
- package/dist/useComponentTheme.cjs +1 -1
- package/dist/useComponentTheme.js +1 -1
- package/dist/useCropperCore.d.cts +8 -8
- package/dist/useCropperCore.d.ts +8 -8
- package/dist/useDynamicFormState.d.cts +5 -4
- package/dist/useDynamicFormState.d.ts +5 -4
- 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 +7 -99
- package/dist/useFullscreen.d.ts +7 -99
- package/dist/useGlobalSearch.d.cts +45 -3
- package/dist/useGlobalSearch.d.ts +45 -3
- package/dist/useInfiniteScroll.d.cts +2 -2
- package/dist/useInfiniteScroll.d.ts +2 -2
- package/dist/useLocalFileUrl.cjs +1 -0
- package/dist/useLocalFileUrl.js +1 -0
- package/dist/useQRCode.d.cts +3 -3
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSignatureHistory.d.cts +6 -6
- package/dist/useSignatureHistory.d.ts +6 -6
- package/dist/useSplitResize.d.cts +10 -10
- package/dist/useSplitResize.d.ts +10 -10
- package/dist/useWorkflowValidation.d.cts +108 -108
- package/dist/useWorkflowValidation.d.ts +108 -108
- package/dist/verification.d.cts +2 -2
- package/dist/verification.d.ts +2 -2
- 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 +12 -4
- package/docs/engineering.md +12 -4
- package/docs/guides/api-migration.md +17 -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
package/dist/model.d.cts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { n as ComponentLocale } from "./contracts.cjs";
|
|
2
|
+
import { t as ComponentDensity } from "./density.cjs";
|
|
3
|
+
import * as vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/C_FilterBuilder/types.d.ts
|
|
6
|
+
type EqualityOperator = 'eq' | 'ne';
|
|
7
|
+
type EmptyOperator = 'isEmpty' | 'isNotEmpty';
|
|
8
|
+
type TextOperator = 'contains' | 'startsWith' | 'endsWith';
|
|
9
|
+
type OrderedOperator = 'gt' | 'gte' | 'lt' | 'lte';
|
|
10
|
+
type FilterOperator = EqualityOperator | EmptyOperator | TextOperator | OrderedOperator;
|
|
11
|
+
type FilterLogic = 'and' | 'or';
|
|
12
|
+
type FilterValue = string | number | boolean | null;
|
|
13
|
+
interface FilterFieldBase<K extends string, Operator extends FilterOperator> {
|
|
14
|
+
key: K;
|
|
15
|
+
label: string;
|
|
16
|
+
operators?: readonly (Operator | EqualityOperator | EmptyOperator)[];
|
|
17
|
+
}
|
|
18
|
+
interface FilterOption {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string | number;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
type FilterField<K extends string = string> = (FilterFieldBase<K, TextOperator> & {
|
|
24
|
+
type: 'text';
|
|
25
|
+
}) | (FilterFieldBase<K, OrderedOperator> & {
|
|
26
|
+
type: 'number' | 'date';
|
|
27
|
+
}) | (FilterFieldBase<K, never> & {
|
|
28
|
+
type: 'select';
|
|
29
|
+
options: readonly FilterOption[];
|
|
30
|
+
}) | (FilterFieldBase<K, never> & {
|
|
31
|
+
type: 'boolean';
|
|
32
|
+
});
|
|
33
|
+
interface FilterRule<K extends string = string> {
|
|
34
|
+
type: 'rule';
|
|
35
|
+
id: string;
|
|
36
|
+
field: K;
|
|
37
|
+
operator: FilterOperator;
|
|
38
|
+
value: FilterValue;
|
|
39
|
+
}
|
|
40
|
+
interface FilterGroup<K extends string = string> {
|
|
41
|
+
type: 'group';
|
|
42
|
+
id: string;
|
|
43
|
+
operator: FilterLogic;
|
|
44
|
+
children: readonly FilterNode<K>[];
|
|
45
|
+
}
|
|
46
|
+
type FilterNode<K extends string = string> = FilterGroup<K> | FilterRule<K>;
|
|
47
|
+
type FilterIssueCode = 'invalidNode' | 'duplicateId' | 'emptyGroup' | 'maxDepth' | 'unknownField' | 'invalidOperator' | 'invalidValue';
|
|
48
|
+
interface FilterIssue {
|
|
49
|
+
/** Root is an empty path. Each number is a child index within its group. */
|
|
50
|
+
path: readonly number[];
|
|
51
|
+
code: FilterIssueCode;
|
|
52
|
+
}
|
|
53
|
+
interface FilterValidationOptions {
|
|
54
|
+
/** Maximum groups below the root, from 0 to 8. Defaults to 4. */
|
|
55
|
+
maxDepth?: number;
|
|
56
|
+
}
|
|
57
|
+
interface FilterBuilderProps<K extends string = string> extends FilterValidationOptions {
|
|
58
|
+
modelValue?: FilterGroup<K> | null;
|
|
59
|
+
fields: readonly FilterField<K>[];
|
|
60
|
+
title?: string;
|
|
61
|
+
density?: ComponentDensity;
|
|
62
|
+
locale?: ComponentLocale;
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/C_FilterBuilder/index.vue.d.ts
|
|
67
|
+
declare const __VLS_export: <K extends string = string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
68
|
+
props: vue.PublicProps & __VLS_PrettifyLocal<FilterBuilderProps<K> & {
|
|
69
|
+
"onUpdate:modelValue"?: ((value: FilterGroup<K>) => any) | undefined;
|
|
70
|
+
}> & (typeof globalThis extends {
|
|
71
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
72
|
+
} ? P : {});
|
|
73
|
+
expose: (exposed: {}) => void;
|
|
74
|
+
attrs: any;
|
|
75
|
+
slots: {};
|
|
76
|
+
emit: (evt: "update:modelValue", value: FilterGroup<K>) => void;
|
|
77
|
+
}>) => vue.VNode & {
|
|
78
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
79
|
+
};
|
|
80
|
+
declare const _default: typeof __VLS_export;
|
|
81
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/components/C_FilterBuilder/model.d.ts
|
|
84
|
+
declare const createFilterGroup: <K extends string = string>(id?: string) => FilterGroup<K>;
|
|
85
|
+
/** Reports unusable drafts without rewriting persisted rules or executing the query. */
|
|
86
|
+
declare function validateFilter<K extends string>(value: FilterGroup<K> | null | undefined, fields: readonly FilterField<K>[], options?: FilterValidationOptions): FilterIssue[];
|
|
87
|
+
//#endregion
|
|
88
|
+
export { FilterField as a, FilterIssueCode as c, FilterOperator as d, FilterOption as f, FilterValue as h, FilterBuilderProps as i, FilterLogic as l, FilterValidationOptions as m, validateFilter as n, FilterGroup as o, FilterRule as p, _default as r, FilterIssue as s, createFilterGroup as t, FilterNode as u };
|
package/dist/model.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { n as ComponentLocale } from "./contracts.js";
|
|
2
|
+
import { t as ComponentDensity } from "./density.js";
|
|
3
|
+
import * as vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/C_FilterBuilder/types.d.ts
|
|
6
|
+
type EqualityOperator = 'eq' | 'ne';
|
|
7
|
+
type EmptyOperator = 'isEmpty' | 'isNotEmpty';
|
|
8
|
+
type TextOperator = 'contains' | 'startsWith' | 'endsWith';
|
|
9
|
+
type OrderedOperator = 'gt' | 'gte' | 'lt' | 'lte';
|
|
10
|
+
type FilterOperator = EqualityOperator | EmptyOperator | TextOperator | OrderedOperator;
|
|
11
|
+
type FilterLogic = 'and' | 'or';
|
|
12
|
+
type FilterValue = string | number | boolean | null;
|
|
13
|
+
interface FilterFieldBase<K extends string, Operator extends FilterOperator> {
|
|
14
|
+
key: K;
|
|
15
|
+
label: string;
|
|
16
|
+
operators?: readonly (Operator | EqualityOperator | EmptyOperator)[];
|
|
17
|
+
}
|
|
18
|
+
interface FilterOption {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string | number;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
type FilterField<K extends string = string> = (FilterFieldBase<K, TextOperator> & {
|
|
24
|
+
type: 'text';
|
|
25
|
+
}) | (FilterFieldBase<K, OrderedOperator> & {
|
|
26
|
+
type: 'number' | 'date';
|
|
27
|
+
}) | (FilterFieldBase<K, never> & {
|
|
28
|
+
type: 'select';
|
|
29
|
+
options: readonly FilterOption[];
|
|
30
|
+
}) | (FilterFieldBase<K, never> & {
|
|
31
|
+
type: 'boolean';
|
|
32
|
+
});
|
|
33
|
+
interface FilterRule<K extends string = string> {
|
|
34
|
+
type: 'rule';
|
|
35
|
+
id: string;
|
|
36
|
+
field: K;
|
|
37
|
+
operator: FilterOperator;
|
|
38
|
+
value: FilterValue;
|
|
39
|
+
}
|
|
40
|
+
interface FilterGroup<K extends string = string> {
|
|
41
|
+
type: 'group';
|
|
42
|
+
id: string;
|
|
43
|
+
operator: FilterLogic;
|
|
44
|
+
children: readonly FilterNode<K>[];
|
|
45
|
+
}
|
|
46
|
+
type FilterNode<K extends string = string> = FilterGroup<K> | FilterRule<K>;
|
|
47
|
+
type FilterIssueCode = 'invalidNode' | 'duplicateId' | 'emptyGroup' | 'maxDepth' | 'unknownField' | 'invalidOperator' | 'invalidValue';
|
|
48
|
+
interface FilterIssue {
|
|
49
|
+
/** Root is an empty path. Each number is a child index within its group. */
|
|
50
|
+
path: readonly number[];
|
|
51
|
+
code: FilterIssueCode;
|
|
52
|
+
}
|
|
53
|
+
interface FilterValidationOptions {
|
|
54
|
+
/** Maximum groups below the root, from 0 to 8. Defaults to 4. */
|
|
55
|
+
maxDepth?: number;
|
|
56
|
+
}
|
|
57
|
+
interface FilterBuilderProps<K extends string = string> extends FilterValidationOptions {
|
|
58
|
+
modelValue?: FilterGroup<K> | null;
|
|
59
|
+
fields: readonly FilterField<K>[];
|
|
60
|
+
title?: string;
|
|
61
|
+
density?: ComponentDensity;
|
|
62
|
+
locale?: ComponentLocale;
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/C_FilterBuilder/index.vue.d.ts
|
|
67
|
+
declare const __VLS_export: <K extends string = string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
68
|
+
props: vue.PublicProps & __VLS_PrettifyLocal<FilterBuilderProps<K> & {
|
|
69
|
+
"onUpdate:modelValue"?: ((value: FilterGroup<K>) => any) | undefined;
|
|
70
|
+
}> & (typeof globalThis extends {
|
|
71
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
72
|
+
} ? P : {});
|
|
73
|
+
expose: (exposed: {}) => void;
|
|
74
|
+
attrs: any;
|
|
75
|
+
slots: {};
|
|
76
|
+
emit: (evt: "update:modelValue", value: FilterGroup<K>) => void;
|
|
77
|
+
}>) => vue.VNode & {
|
|
78
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
79
|
+
};
|
|
80
|
+
declare const _default: typeof __VLS_export;
|
|
81
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/components/C_FilterBuilder/model.d.ts
|
|
84
|
+
declare const createFilterGroup: <K extends string = string>(id?: string) => FilterGroup<K>;
|
|
85
|
+
/** Reports unusable drafts without rewriting persisted rules or executing the query. */
|
|
86
|
+
declare function validateFilter<K extends string>(value: FilterGroup<K> | null | undefined, fields: readonly FilterField<K>[], options?: FilterValidationOptions): FilterIssue[];
|
|
87
|
+
//#endregion
|
|
88
|
+
export { FilterField as a, FilterIssueCode as c, FilterOperator as d, FilterOption as f, FilterValue as h, FilterBuilderProps as i, FilterLogic as l, FilterValidationOptions as m, validateFilter as n, FilterGroup as o, FilterRule as p, _default as r, FilterIssue as s, createFilterGroup as t, FilterNode as u };
|
package/dist/presets.d.cts
CHANGED
|
@@ -2,9 +2,9 @@ import { i as ActionDropdownItem, l as TableActionsProps, o as ActionItem, t as
|
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/C_ActionBar/index.vue.d.ts
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
center?: (props: typeof
|
|
7
|
+
center?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: vue.DefineComponent<TableActionsProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
10
10
|
"action-error": (error: unknown, action: ActionItem, item?: ActionDropdownItem | undefined) => any;
|
package/dist/presets.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { i as ActionDropdownItem, l as TableActionsProps, o as ActionItem, t as
|
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/C_ActionBar/index.vue.d.ts
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
center?: (props: typeof
|
|
7
|
+
center?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: vue.DefineComponent<TableActionsProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
10
10
|
"action-error": (error: unknown, action: ActionItem, item?: ActionDropdownItem | undefined) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t,n){if(e===void 0)return t;if(!Number.isSafeInteger(e)||e<=0)throw Error(`previewLimits.${n} 必须为有限正整数`);return e}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return 1e5}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t,n){if(e===void 0)return t;if(!Number.isSafeInteger(e)||e<=0)throw Error(`previewLimits.${n} 必须为有限正整数`);return e}const t=1e5;export{e as n,t};
|
package/dist/resolver.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=`@robot-admin/naive-ui-components`,t=`C_ActionBar.C_AntV.C_AudioPlayer.C_AutoComplete.C_AvatarGroup.C_Barcode.C_BatchResult.C_Breadcrumb.C_Captcha.C_Cascade.C_Chat.C_City.C_Code.C_CollapsePanel.C_ContextMenu.C_Cron.C_DataPicker.C_Date.C_Density.C_Draggable.C_Editor.C_ErrorSummary.C_FilePreview.C_Form.C_FormModal.C_FormSearch.C_FormulaEditor.C_FullCalendar.C_GlobalSearch.C_Guide.C_Icon.C_ImageCropper.C_Language.C_Login.C_Loading.C_Map.C_Markdown.C_Menu.C_NotificationCenter.C_OrgChart.C_PageLoading.C_Progress.C_QRCode.C_SectionNav.C_Select.C_Signature.C_Skeleton.C_SplitPane.C_Steps.C_Table.C_Tabs.C_TagsView.C_Theme.C_Time.C_Timeline.C_Transfer.C_Tree.C_Upload.C_VideoPlayer.C_VtableGantt.C_WaterFall.C_WorkFlow.C_UserPicker`.split(`.`),n=new Set(t);function r(t={}){let{importOnDemand:r=!0,importStyle:i=!1}=t;return{type:`component`,resolve:t=>{if(n.has(t)){let n=r?`${e}/${t}`:e,a=i===!0?`full`:i;return{name:t,from:n,sideEffects:r&&a?`${e}/${t}/${a===`base`&&(t===`C_Form`||t===`C_Table`)?`base.css`:`style.css`}`:void 0}}}}}exports.RobotNaiveUiResolver=r,exports.componentNames=t;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=`@robot-admin/naive-ui-components`,t=`C_ActionBar.C_AntV.C_ApprovalViewer.C_Attachments.C_AudioPlayer.C_AutoComplete.C_AvatarGroup.C_Barcode.C_BatchResult.C_Breadcrumb.C_Captcha.C_Cascade.C_ChangeReview.C_Chat.C_City.C_Code.C_CollapsePanel.C_ContextMenu.C_Cron.C_DataPicker.C_Date.C_Density.C_Descriptions.C_Draggable.C_Editor.C_ErrorSummary.C_FilePreview.C_FilterBuilder.C_Form.C_FormModal.C_FormSearch.C_FormulaEditor.C_FullCalendar.C_GlobalSearch.C_Guide.C_Icon.C_ImageAnnotator.C_ImageCropper.C_ImportWizard.C_Language.C_Login.C_Loading.C_Map.C_Markdown.C_Menu.C_NotificationCenter.C_NotificationInbox.C_OrgChart.C_PageLoading.C_Progress.C_QRCode.C_RecurrenceEditor.C_RecordList.C_RelationshipExplorer.C_ResourceSchedule.C_ScanInput.C_SectionNav.C_Select.C_Signature.C_Skeleton.C_SplitPane.C_Steps.C_Table.C_Tabs.C_TagsView.C_TaskBoard.C_TaskPanel.C_Theme.C_Time.C_Timeline.C_Transfer.C_Tree.C_Upload.C_VideoPlayer.C_VtableGantt.C_WaterFall.C_WorkFlow.C_UserPicker`.split(`.`),n=new Set(t);function r(t={}){let{importOnDemand:r=!0,importStyle:i=!1}=t;return{type:`component`,resolve:t=>{if(n.has(t)){let n=r?`${e}/${t}`:e,a=i===!0?`full`:i;return{name:t,from:n,sideEffects:r&&a?`${e}/${t}/${a===`base`&&(t===`C_Form`||t===`C_Table`)?`base.css`:`style.css`}`:void 0}}}}}exports.RobotNaiveUiResolver=r,exports.componentNames=t;
|
package/dist/resolver.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/resolver.d.ts
|
|
2
2
|
/** 组件库包含的所有组件名称 */
|
|
3
|
-
declare const componentNames: readonly ["C_ActionBar", "C_AntV", "C_AudioPlayer", "C_AutoComplete", "C_AvatarGroup", "C_Barcode", "C_BatchResult", "C_Breadcrumb", "C_Captcha", "C_Cascade", "C_Chat", "C_City", "C_Code", "C_CollapsePanel", "C_ContextMenu", "C_Cron", "C_DataPicker", "C_Date", "C_Density", "C_Draggable", "C_Editor", "C_ErrorSummary", "C_FilePreview", "C_Form", "C_FormModal", "C_FormSearch", "C_FormulaEditor", "C_FullCalendar", "C_GlobalSearch", "C_Guide", "C_Icon", "C_ImageCropper", "C_Language", "C_Login", "C_Loading", "C_Map", "C_Markdown", "C_Menu", "C_NotificationCenter", "C_OrgChart", "C_PageLoading", "C_Progress", "C_QRCode", "C_SectionNav", "C_Select", "C_Signature", "C_Skeleton", "C_SplitPane", "C_Steps", "C_Table", "C_Tabs", "C_TagsView", "C_Theme", "C_Time", "C_Timeline", "C_Transfer", "C_Tree", "C_Upload", "C_VideoPlayer", "C_VtableGantt", "C_WaterFall", "C_WorkFlow", "C_UserPicker"];
|
|
3
|
+
declare const componentNames: readonly ["C_ActionBar", "C_AntV", "C_ApprovalViewer", "C_Attachments", "C_AudioPlayer", "C_AutoComplete", "C_AvatarGroup", "C_Barcode", "C_BatchResult", "C_Breadcrumb", "C_Captcha", "C_Cascade", "C_ChangeReview", "C_Chat", "C_City", "C_Code", "C_CollapsePanel", "C_ContextMenu", "C_Cron", "C_DataPicker", "C_Date", "C_Density", "C_Descriptions", "C_Draggable", "C_Editor", "C_ErrorSummary", "C_FilePreview", "C_FilterBuilder", "C_Form", "C_FormModal", "C_FormSearch", "C_FormulaEditor", "C_FullCalendar", "C_GlobalSearch", "C_Guide", "C_Icon", "C_ImageAnnotator", "C_ImageCropper", "C_ImportWizard", "C_Language", "C_Login", "C_Loading", "C_Map", "C_Markdown", "C_Menu", "C_NotificationCenter", "C_NotificationInbox", "C_OrgChart", "C_PageLoading", "C_Progress", "C_QRCode", "C_RecurrenceEditor", "C_RecordList", "C_RelationshipExplorer", "C_ResourceSchedule", "C_ScanInput", "C_SectionNav", "C_Select", "C_Signature", "C_Skeleton", "C_SplitPane", "C_Steps", "C_Table", "C_Tabs", "C_TagsView", "C_TaskBoard", "C_TaskPanel", "C_Theme", "C_Time", "C_Timeline", "C_Transfer", "C_Tree", "C_Upload", "C_VideoPlayer", "C_VtableGantt", "C_WaterFall", "C_WorkFlow", "C_UserPicker"];
|
|
4
4
|
/** 组件名称类型 */
|
|
5
5
|
type ComponentName = (typeof componentNames)[number];
|
|
6
6
|
/** Component style loading strategy. `true` is kept as an alias of `full`. */
|
package/dist/resolver.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/resolver.d.ts
|
|
2
2
|
/** 组件库包含的所有组件名称 */
|
|
3
|
-
declare const componentNames: readonly ["C_ActionBar", "C_AntV", "C_AudioPlayer", "C_AutoComplete", "C_AvatarGroup", "C_Barcode", "C_BatchResult", "C_Breadcrumb", "C_Captcha", "C_Cascade", "C_Chat", "C_City", "C_Code", "C_CollapsePanel", "C_ContextMenu", "C_Cron", "C_DataPicker", "C_Date", "C_Density", "C_Draggable", "C_Editor", "C_ErrorSummary", "C_FilePreview", "C_Form", "C_FormModal", "C_FormSearch", "C_FormulaEditor", "C_FullCalendar", "C_GlobalSearch", "C_Guide", "C_Icon", "C_ImageCropper", "C_Language", "C_Login", "C_Loading", "C_Map", "C_Markdown", "C_Menu", "C_NotificationCenter", "C_OrgChart", "C_PageLoading", "C_Progress", "C_QRCode", "C_SectionNav", "C_Select", "C_Signature", "C_Skeleton", "C_SplitPane", "C_Steps", "C_Table", "C_Tabs", "C_TagsView", "C_Theme", "C_Time", "C_Timeline", "C_Transfer", "C_Tree", "C_Upload", "C_VideoPlayer", "C_VtableGantt", "C_WaterFall", "C_WorkFlow", "C_UserPicker"];
|
|
3
|
+
declare const componentNames: readonly ["C_ActionBar", "C_AntV", "C_ApprovalViewer", "C_Attachments", "C_AudioPlayer", "C_AutoComplete", "C_AvatarGroup", "C_Barcode", "C_BatchResult", "C_Breadcrumb", "C_Captcha", "C_Cascade", "C_ChangeReview", "C_Chat", "C_City", "C_Code", "C_CollapsePanel", "C_ContextMenu", "C_Cron", "C_DataPicker", "C_Date", "C_Density", "C_Descriptions", "C_Draggable", "C_Editor", "C_ErrorSummary", "C_FilePreview", "C_FilterBuilder", "C_Form", "C_FormModal", "C_FormSearch", "C_FormulaEditor", "C_FullCalendar", "C_GlobalSearch", "C_Guide", "C_Icon", "C_ImageAnnotator", "C_ImageCropper", "C_ImportWizard", "C_Language", "C_Login", "C_Loading", "C_Map", "C_Markdown", "C_Menu", "C_NotificationCenter", "C_NotificationInbox", "C_OrgChart", "C_PageLoading", "C_Progress", "C_QRCode", "C_RecurrenceEditor", "C_RecordList", "C_RelationshipExplorer", "C_ResourceSchedule", "C_ScanInput", "C_SectionNav", "C_Select", "C_Signature", "C_Skeleton", "C_SplitPane", "C_Steps", "C_Table", "C_Tabs", "C_TagsView", "C_TaskBoard", "C_TaskPanel", "C_Theme", "C_Time", "C_Timeline", "C_Transfer", "C_Tree", "C_Upload", "C_VideoPlayer", "C_VtableGantt", "C_WaterFall", "C_WorkFlow", "C_UserPicker"];
|
|
4
4
|
/** 组件名称类型 */
|
|
5
5
|
type ComponentName = (typeof componentNames)[number];
|
|
6
6
|
/** Component style loading strategy. `true` is kept as an alias of `full`. */
|
package/dist/resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=`@robot-admin/naive-ui-components`,t=`C_ActionBar.C_AntV.C_AudioPlayer.C_AutoComplete.C_AvatarGroup.C_Barcode.C_BatchResult.C_Breadcrumb.C_Captcha.C_Cascade.C_Chat.C_City.C_Code.C_CollapsePanel.C_ContextMenu.C_Cron.C_DataPicker.C_Date.C_Density.C_Draggable.C_Editor.C_ErrorSummary.C_FilePreview.C_Form.C_FormModal.C_FormSearch.C_FormulaEditor.C_FullCalendar.C_GlobalSearch.C_Guide.C_Icon.C_ImageCropper.C_Language.C_Login.C_Loading.C_Map.C_Markdown.C_Menu.C_NotificationCenter.C_OrgChart.C_PageLoading.C_Progress.C_QRCode.C_SectionNav.C_Select.C_Signature.C_Skeleton.C_SplitPane.C_Steps.C_Table.C_Tabs.C_TagsView.C_Theme.C_Time.C_Timeline.C_Transfer.C_Tree.C_Upload.C_VideoPlayer.C_VtableGantt.C_WaterFall.C_WorkFlow.C_UserPicker`.split(`.`),n=new Set(t);function r(t={}){let{importOnDemand:r=!0,importStyle:i=!1}=t;return{type:`component`,resolve:t=>{if(n.has(t)){let n=r?`${e}/${t}`:e,a=i===!0?`full`:i;return{name:t,from:n,sideEffects:r&&a?`${e}/${t}/${a===`base`&&(t===`C_Form`||t===`C_Table`)?`base.css`:`style.css`}`:void 0}}}}}export{r as RobotNaiveUiResolver,t as componentNames};
|
|
1
|
+
const e=`@robot-admin/naive-ui-components`,t=`C_ActionBar.C_AntV.C_ApprovalViewer.C_Attachments.C_AudioPlayer.C_AutoComplete.C_AvatarGroup.C_Barcode.C_BatchResult.C_Breadcrumb.C_Captcha.C_Cascade.C_ChangeReview.C_Chat.C_City.C_Code.C_CollapsePanel.C_ContextMenu.C_Cron.C_DataPicker.C_Date.C_Density.C_Descriptions.C_Draggable.C_Editor.C_ErrorSummary.C_FilePreview.C_FilterBuilder.C_Form.C_FormModal.C_FormSearch.C_FormulaEditor.C_FullCalendar.C_GlobalSearch.C_Guide.C_Icon.C_ImageAnnotator.C_ImageCropper.C_ImportWizard.C_Language.C_Login.C_Loading.C_Map.C_Markdown.C_Menu.C_NotificationCenter.C_NotificationInbox.C_OrgChart.C_PageLoading.C_Progress.C_QRCode.C_RecurrenceEditor.C_RecordList.C_RelationshipExplorer.C_ResourceSchedule.C_ScanInput.C_SectionNav.C_Select.C_Signature.C_Skeleton.C_SplitPane.C_Steps.C_Table.C_Tabs.C_TagsView.C_TaskBoard.C_TaskPanel.C_Theme.C_Time.C_Timeline.C_Transfer.C_Tree.C_Upload.C_VideoPlayer.C_VtableGantt.C_WaterFall.C_WorkFlow.C_UserPicker`.split(`.`),n=new Set(t);function r(t={}){let{importOnDemand:r=!0,importStyle:i=!1}=t;return{type:`component`,resolve:t=>{if(n.has(t)){let n=r?`${e}/${t}`:e,a=i===!0?`full`:i;return{name:t,from:n,sideEffects:r&&a?`${e}/${t}/${a===`base`&&(t===`C_Form`||t===`C_Table`)?`base.css`:`style.css`}`:void 0}}}}}export{r as RobotNaiveUiResolver,t as componentNames};
|
package/dist/rule.d.cts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { n as ComponentLocale } from "./contracts.cjs";
|
|
2
|
+
import { t as ComponentDensity } from "./density.cjs";
|
|
3
|
+
import * as vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/C_RecurrenceEditor/types.d.ts
|
|
6
|
+
type RecurrenceFrequency = 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
7
|
+
type RecurrenceWeekday = 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'SU';
|
|
8
|
+
type RecurrenceMonthPattern = {
|
|
9
|
+
type: 'date';
|
|
10
|
+
day: number;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'weekday';
|
|
13
|
+
ordinal: 1 | 2 | 3 | 4 | 5 | -1;
|
|
14
|
+
day: RecurrenceWeekday;
|
|
15
|
+
};
|
|
16
|
+
type RecurrenceEnd = {
|
|
17
|
+
type: 'count';
|
|
18
|
+
count: number;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'until';
|
|
21
|
+
date: string;
|
|
22
|
+
};
|
|
23
|
+
interface RecurrenceRule {
|
|
24
|
+
frequency: RecurrenceFrequency;
|
|
25
|
+
interval?: number;
|
|
26
|
+
weekdays?: readonly RecurrenceWeekday[];
|
|
27
|
+
monthPattern?: RecurrenceMonthPattern;
|
|
28
|
+
end?: RecurrenceEnd;
|
|
29
|
+
}
|
|
30
|
+
interface RecurrenceEditorProps {
|
|
31
|
+
modelValue: RecurrenceRule | null;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
density?: ComponentDensity;
|
|
34
|
+
locale?: ComponentLocale;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/C_RecurrenceEditor/index.vue.d.ts
|
|
38
|
+
declare const __VLS_export: vue.DefineComponent<RecurrenceEditorProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
39
|
+
"update:modelValue": (value: RecurrenceRule | null) => any;
|
|
40
|
+
}, string, vue.PublicProps, Readonly<RecurrenceEditorProps> & Readonly<{
|
|
41
|
+
"onUpdate:modelValue"?: ((value: RecurrenceRule | null) => any) | undefined;
|
|
42
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/C_RecurrenceEditor/rule.d.ts
|
|
46
|
+
/** Encode the editor's supported date-based subset of RFC 5545. */
|
|
47
|
+
declare function formatRecurrenceRule(rule: RecurrenceRule | null): string;
|
|
48
|
+
/** Reject unsupported tokens so an edited rule cannot silently lose its constraints. */
|
|
49
|
+
declare function parseRecurrenceRule(text: string): RecurrenceRule | null;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { RecurrenceEnd as a, RecurrenceRule as c, RecurrenceEditorProps as i, RecurrenceWeekday as l, parseRecurrenceRule as n, RecurrenceFrequency as o, _default as r, RecurrenceMonthPattern as s, formatRecurrenceRule as t };
|
package/dist/rule.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { n as ComponentLocale } from "./contracts.js";
|
|
2
|
+
import { t as ComponentDensity } from "./density.js";
|
|
3
|
+
import * as vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/C_RecurrenceEditor/types.d.ts
|
|
6
|
+
type RecurrenceFrequency = 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
7
|
+
type RecurrenceWeekday = 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'SU';
|
|
8
|
+
type RecurrenceMonthPattern = {
|
|
9
|
+
type: 'date';
|
|
10
|
+
day: number;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'weekday';
|
|
13
|
+
ordinal: 1 | 2 | 3 | 4 | 5 | -1;
|
|
14
|
+
day: RecurrenceWeekday;
|
|
15
|
+
};
|
|
16
|
+
type RecurrenceEnd = {
|
|
17
|
+
type: 'count';
|
|
18
|
+
count: number;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'until';
|
|
21
|
+
date: string;
|
|
22
|
+
};
|
|
23
|
+
interface RecurrenceRule {
|
|
24
|
+
frequency: RecurrenceFrequency;
|
|
25
|
+
interval?: number;
|
|
26
|
+
weekdays?: readonly RecurrenceWeekday[];
|
|
27
|
+
monthPattern?: RecurrenceMonthPattern;
|
|
28
|
+
end?: RecurrenceEnd;
|
|
29
|
+
}
|
|
30
|
+
interface RecurrenceEditorProps {
|
|
31
|
+
modelValue: RecurrenceRule | null;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
density?: ComponentDensity;
|
|
34
|
+
locale?: ComponentLocale;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/C_RecurrenceEditor/index.vue.d.ts
|
|
38
|
+
declare const __VLS_export: vue.DefineComponent<RecurrenceEditorProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
39
|
+
"update:modelValue": (value: RecurrenceRule | null) => any;
|
|
40
|
+
}, string, vue.PublicProps, Readonly<RecurrenceEditorProps> & Readonly<{
|
|
41
|
+
"onUpdate:modelValue"?: ((value: RecurrenceRule | null) => any) | undefined;
|
|
42
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/C_RecurrenceEditor/rule.d.ts
|
|
46
|
+
/** Encode the editor's supported date-based subset of RFC 5545. */
|
|
47
|
+
declare function formatRecurrenceRule(rule: RecurrenceRule | null): string;
|
|
48
|
+
/** Reject unsupported tokens so an edited rule cannot silently lose its constraints. */
|
|
49
|
+
declare function parseRecurrenceRule(text: string): RecurrenceRule | null;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { RecurrenceEnd as a, RecurrenceRule as c, RecurrenceEditorProps as i, RecurrenceWeekday as l, parseRecurrenceRule as n, RecurrenceFrequency as o, _default as r, RecurrenceMonthPattern as s, formatRecurrenceRule as t };
|
package/dist/source.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./data2.cjs`),t=require(`./useComponentLocale.cjs`),n=require(`./useComponentTheme.cjs`),r=require(`./export-helper.cjs`),i=require(`./C_DataPicker2.cjs`);let a=require(`vue`),o=require(`naive-ui`);function s(e,t){if(t===void 0)return``;let n=e[t];return typeof n==`string`||typeof n==`number`?String(n):``}function c(e,t,n,r){let i=[{key:`__person`,title:n(`userPicker.name`),minWidth:190,render:n=>(0,a.h)(`div`,{class:`c-user-picker__person`},[(0,a.h)(o.NAvatar,{round:!0,size:32,src:s(n,t?.avatar)||void 0},{default:()=>e.label(n).slice(0,1)}),(0,a.h)(`div`,{class:`c-user-picker__identity`},[(0,a.h)(`strong`,e.label(n)),(0,a.h)(`small`,s(n,t?.code))])])}];for(let e of[`department`,`job`])t?.[e]&&i.push({key:`__${e}`,title:n(`userPicker.${e}`),minWidth:130,render:n=>s(n,t[e])});return(t?.status||r)&&i.push({key:`__status`,title:n(`userPicker.status`),minWidth:110,render:e=>{let n=r?.(e);return(0,a.h)(o.NText,{type:n?`error`:void 0,title:n},()=>n||s(e,t?.status))}}),i}const l=[`aria-label`],u={class:`c-user-picker__selected-heading`},d={key:0,class:`c-user-picker__empty`},f={key:1,class:`c-user-picker__selected-list`},p={class:`c-user-picker__order`},m={class:`c-user-picker__identity`},h={class:`c-user-picker__item-actions`},g=(0,a.defineComponent)({__name:`SelectedPeople`,props:{context:{},fields:{},ordered:{type:Boolean},locale:{},disabledReason:{type:Function}},setup(e){let r=e,{t:i}=t.t(()=>r.locale),c=n.n(),g=(0,o.useThemeVars)(),_=(0,a.computed)(()=>({...c.value,"--c-user-picker-muted":g.value.textColor3,"--c-user-picker-border":g.value.borderColor})),v=(0,a.ref)(1),y=(0,a.computed)(()=>(v.value-1)*8),b=(0,a.computed)(()=>r.context.items.slice(y.value,y.value+8));return(0,a.watch)(()=>r.context.items.length,e=>{v.value=Math.min(v.value,Math.max(1,Math.ceil(e/8)))}),(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`section`,{class:`c-user-picker__selected`,style:(0,a.normalizeStyle)(_.value),"aria-label":(0,a.unref)(i)(`userPicker.selected`)},[(0,a.createElementVNode)(`div`,u,[(0,a.createElementVNode)(`strong`,null,(0,a.toDisplayString)((0,a.unref)(i)(`userPicker.selected`)),1),(0,a.createElementVNode)(`span`,null,(0,a.toDisplayString)(e.context.items.length),1)]),e.context.items.length?((0,a.openBlock)(),(0,a.createElementBlock)(`ol`,f,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(b.value,(t,r)=>((0,a.openBlock)(),(0,a.createElementBlock)(`li`,{key:`${typeof t.value}:${t.value}`},[(0,a.createElementVNode)(`span`,p,(0,a.toDisplayString)(y.value+r+1),1),(0,a.createElementVNode)(`div`,m,[(0,a.createElementVNode)(`strong`,null,(0,a.toDisplayString)(t.label),1),(0,a.createElementVNode)(`small`,null,(0,a.toDisplayString)(t.row?[(0,a.unref)(s)(t.row,e.fields?.code),(0,a.unref)(s)(t.row,e.fields?.department),e.disabledReason?.(t.row)].filter(Boolean).join(` · `):String(t.value)),1)]),(0,a.createElementVNode)(`div`,h,[e.ordered?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:0},[(0,a.createVNode)((0,a.unref)(o.NButton),{text:``,size:`tiny`,disabled:e.context.disabled||y.value+r===0,"aria-label":(0,a.unref)(i)(`userPicker.moveUp`,{name:t.label}),onClick:n=>e.context.move(t.value,-1)},{default:(0,a.withCtx)(()=>[...n[1]||=[(0,a.createTextVNode)(`↑`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`]),(0,a.createVNode)((0,a.unref)(o.NButton),{text:``,size:`tiny`,disabled:e.context.disabled||y.value+r===e.context.items.length-1,"aria-label":(0,a.unref)(i)(`userPicker.moveDown`,{name:t.label}),onClick:n=>e.context.move(t.value,1)},{default:(0,a.withCtx)(()=>[...n[2]||=[(0,a.createTextVNode)(`↓`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])],64)):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createVNode)((0,a.unref)(o.NButton),{text:``,size:`tiny`,disabled:e.context.disabled,"aria-label":(0,a.unref)(i)(`userPicker.remove`,{name:t.label}),onClick:n=>e.context.remove(t.value)},{default:(0,a.withCtx)(()=>[...n[3]||=[(0,a.createTextVNode)(`×`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])])]))),128))])):((0,a.openBlock)(),(0,a.createElementBlock)(`p`,d,(0,a.toDisplayString)((0,a.unref)(i)(`userPicker.emptySelection`)),1)),e.context.items.length>8?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.NPagination),{key:2,page:v.value,"onUpdate:page":n[0]||=e=>v.value=e,"page-size":8,"item-count":e.context.items.length,simple:``,size:`small`,"aria-label":(0,a.unref)(i)(`userPicker.selectedPages`)},null,8,[`page`,`item-count`,`aria-label`])):(0,a.createCommentVNode)(`v-if`,!0)],12,l))}});var _=r.t(g,[[`__scopeId`,`data-v-2dab9c86`]]);const v=(0,a.defineComponent)({name:`C_UserPicker`,__name:`index`,props:{disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},title:{},placeholder:{},density:{},locale:{},pageSize:{},scope:{},showActions:{type:Boolean,default:!0},showTrigger:{type:Boolean,default:void 0},revalidateOnConfirm:{type:Boolean,default:!0},disabledReason:{},requireSelection:{type:Boolean},presentation:{},initialValues:{},fixedFilters:{},rowCheckable:{},maxSelection:{},history:{},source:{},modelValue:{},multiple:{},columns:{},fields:{},organization:{},selectionOrder:{type:Boolean}},emits:[`update:modelValue`,`select`,`cancel`],setup(r,{expose:s,emit:l}){let u=r,d=l,f=(0,a.shallowRef)(),{t:p}=t.t(()=>u.locale),m=n.n(),h=(0,o.useThemeVars)(),g=(0,a.computed)(()=>({...m.value,"--c-user-picker-muted":h.value.textColor3,"--c-user-picker-border":h.value.borderColor,"--c-user-picker-error":h.value.errorColor})),v=(0,a.defineAsyncComponent)(()=>Promise.resolve().then(()=>require(`./C_Tree2.cjs`)).then(e=>e.n).then(e=>e.default)),y=(0,a.computed)(()=>{let{organization:e}=u;if(!e)return;let{field:t,title:n,...r}=e;return{options:[],field:t,title:n,render:e=>(0,a.h)(`div`,{class:`c-user-picker__organization`},[(0,a.h)(`div`,{class:`c-user-picker__organization-heading`},n??p(`userPicker.organization`)),(0,a.h)(o.NButton,{text:!0,size:`small`,disabled:e.disabled,onClick:()=>e.select(void 0)},()=>p(`picker.allCategories`)),(0,a.h)(v,{...r,searchPattern:void 0,treeProps:{...r.treeProps,pattern:void 0},checkable:!1,multiple:!1,selectable:!0,addable:!1,refreshable:!1,disabled:e.disabled||r.disabled,density:u.density??e.density,selectedKeys:e.value===void 0?[]:[e.value],"onNode-select":(t,n)=>e.select(n[0])})])}}),b=(0,a.computed)(()=>({...u,columns:u.columns??c(u.source,u.fields,p,u.disabledReason),modelValue:u.modelValue,title:u.title??p(`userPicker.title`),placeholder:u.placeholder??p(`userPicker.placeholder`),showTrigger:u.showTrigger??u.presentation!==`inline`,revalidateOnConfirm:u.revalidateOnConfirm??!0,navigation:y.value})),x=e=>{d(`update:modelValue`,e)},S=()=>f.value?.open(),C=()=>f.value?.close(),w=async()=>await f.value?.confirm()??!1,T=()=>{f.value?.reset(),E()},E=()=>{u.presentation===`inline`&&(0,a.nextTick)(S)};(0,a.onMounted)(E),(0,a.watch)(()=>[u.scope,u.source,u.source.request,u.source.resolve,u.organization?.searchSource?.scope,u.organization?.searchSource?.request],()=>{f.value?.reset(),E()});let D=e.t([u.initialValues,u.fixedFilters]);return(0,a.watch)(()=>[u.initialValues,u.fixedFilters],t=>{e.a(D,t)||(D=e.t(t),E())},{deep:!0,flush:`post`}),s({open:S,close:C,reset:T,confirm:w}),(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{class:`c-user-picker`,style:(0,a.normalizeStyle)(g.value)},[(0,a.createVNode)(i.t,(0,a.mergeProps)({ref_key:`picker`,ref:f},b.value,{"onUpdate:modelValue":x,onSelect:t[0]||=e=>d(`select`,e),onCancel:t[1]||=e=>d(`cancel`)}),(0,a.createSlots)({selected:(0,a.withCtx)(t=>[(0,a.renderSlot)(e.$slots,`selected`,(0,a.normalizeProps)((0,a.guardReactiveProps)(t)),()=>[(0,a.createVNode)(_,{context:t,fields:r.fields,ordered:r.selectionOrder,"disabled-reason":r.disabledReason,locale:r.locale},null,8,[`context`,`fields`,`ordered`,`disabled-reason`,`locale`])],!0)]),_:2},[e.$slots.trigger?{name:`trigger`,fn:(0,a.withCtx)(t=>[(0,a.renderSlot)(e.$slots,`trigger`,(0,a.normalizeProps)((0,a.guardReactiveProps)(t)),void 0,!0)]),key:`0`}:void 0]),1040)],4))}});var y=r.t(v,[[`__scopeId`,`data-v-4703e3c4`]]);function b(e){return e}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./data2.cjs`),t=require(`./useComponentLocale.cjs`),n=require(`./useComponentTheme.cjs`),r=require(`./export-helper.cjs`),i=require(`./C_DataPicker2.cjs`);let a=require(`vue`),o=require(`naive-ui`);function s(e,t){if(t===void 0)return``;let n=e[t];return typeof n==`string`||typeof n==`number`?String(n):``}function c(e,t,n,r){let i=[{key:`__person`,title:n(`userPicker.name`),minWidth:190,render:n=>(0,a.h)(`div`,{class:`c-user-picker__person`},[(0,a.h)(o.NAvatar,{round:!0,size:32,src:s(n,t?.avatar)||void 0},{default:()=>e.label(n).slice(0,1)}),(0,a.h)(`div`,{class:`c-user-picker__identity`},[(0,a.h)(`strong`,e.label(n)),(0,a.h)(`small`,s(n,t?.code))])])}];for(let e of[`department`,`job`])t?.[e]&&i.push({key:`__${e}`,title:n(`userPicker.${e}`),minWidth:130,render:n=>s(n,t[e])});return(t?.status||r)&&i.push({key:`__status`,title:n(`userPicker.status`),minWidth:110,render:e=>{let n=r?.(e);return(0,a.h)(o.NText,{type:n?`error`:void 0,title:n},()=>n||s(e,t?.status))}}),i}const l=[`aria-label`],u={class:`c-user-picker__selected-heading`},d={key:0,class:`c-user-picker__empty`},f={key:1,class:`c-user-picker__selected-list`},p={class:`c-user-picker__order`},m={class:`c-user-picker__identity`},h={class:`c-user-picker__item-actions`},g=(0,a.defineComponent)({__name:`SelectedPeople`,props:{context:{},fields:{},ordered:{type:Boolean},locale:{},disabledReason:{type:Function}},setup(e){let r=e,{t:i}=t.t(()=>r.locale),c=n.n(),g=(0,o.useThemeVars)(),_=(0,a.computed)(()=>({...c.value,"--c-user-picker-muted":g.value.textColor3,"--c-user-picker-border":g.value.borderColor})),v=(0,a.ref)(1),y=(0,a.computed)(()=>(v.value-1)*8),b=(0,a.computed)(()=>r.context.items.slice(y.value,y.value+8));return(0,a.watch)(()=>r.context.items.length,e=>{v.value=Math.min(v.value,Math.max(1,Math.ceil(e/8)))}),(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`section`,{class:`c-user-picker__selected`,style:(0,a.normalizeStyle)(_.value),"aria-label":(0,a.unref)(i)(`userPicker.selected`)},[(0,a.createElementVNode)(`div`,u,[(0,a.createElementVNode)(`strong`,null,(0,a.toDisplayString)((0,a.unref)(i)(`userPicker.selected`)),1),(0,a.createElementVNode)(`span`,null,(0,a.toDisplayString)(e.context.items.length),1)]),e.context.items.length?((0,a.openBlock)(),(0,a.createElementBlock)(`ol`,f,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(b.value,(t,r)=>((0,a.openBlock)(),(0,a.createElementBlock)(`li`,{key:`${typeof t.value}:${t.value}`},[(0,a.createElementVNode)(`span`,p,(0,a.toDisplayString)(y.value+r+1),1),(0,a.createElementVNode)(`div`,m,[(0,a.createElementVNode)(`strong`,null,(0,a.toDisplayString)(t.label),1),(0,a.createElementVNode)(`small`,null,(0,a.toDisplayString)(t.row?[(0,a.unref)(s)(t.row,e.fields?.code),(0,a.unref)(s)(t.row,e.fields?.department),e.disabledReason?.(t.row)].filter(Boolean).join(` · `):String(t.value)),1)]),(0,a.createElementVNode)(`div`,h,[e.ordered?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:0},[(0,a.createVNode)((0,a.unref)(o.NButton),{text:``,size:`tiny`,disabled:e.context.disabled||y.value+r===0,"aria-label":(0,a.unref)(i)(`userPicker.moveUp`,{name:t.label}),onClick:n=>e.context.move(t.value,-1)},{default:(0,a.withCtx)(()=>[...n[1]||=[(0,a.createTextVNode)(`↑`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`]),(0,a.createVNode)((0,a.unref)(o.NButton),{text:``,size:`tiny`,disabled:e.context.disabled||y.value+r===e.context.items.length-1,"aria-label":(0,a.unref)(i)(`userPicker.moveDown`,{name:t.label}),onClick:n=>e.context.move(t.value,1)},{default:(0,a.withCtx)(()=>[...n[2]||=[(0,a.createTextVNode)(`↓`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])],64)):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createVNode)((0,a.unref)(o.NButton),{text:``,size:`tiny`,disabled:e.context.disabled,"aria-label":(0,a.unref)(i)(`userPicker.remove`,{name:t.label}),onClick:n=>e.context.remove(t.value)},{default:(0,a.withCtx)(()=>[...n[3]||=[(0,a.createTextVNode)(`×`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])])]))),128))])):((0,a.openBlock)(),(0,a.createElementBlock)(`p`,d,(0,a.toDisplayString)((0,a.unref)(i)(`userPicker.emptySelection`)),1)),e.context.items.length>8?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(o.NPagination),{key:2,page:v.value,"onUpdate:page":n[0]||=e=>v.value=e,"page-size":8,"item-count":e.context.items.length,simple:``,size:`small`,"aria-label":(0,a.unref)(i)(`userPicker.selectedPages`)},null,8,[`page`,`item-count`,`aria-label`])):(0,a.createCommentVNode)(`v-if`,!0)],12,l))}});var _=r.t(g,[[`__scopeId`,`data-v-2dab9c86`]]);const v=(0,a.defineComponent)({name:`C_UserPicker`,__name:`index`,props:{disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},title:{},placeholder:{},density:{},locale:{},pageSize:{},scope:{},showActions:{type:Boolean,default:!0},showTrigger:{type:Boolean,default:void 0},revalidateOnConfirm:{type:Boolean,default:!0},disabledReason:{},requireSelection:{type:Boolean},presentation:{},commitOnSelect:{type:Boolean},popup:{},maxTagCount:{},initialValues:{},fixedFilters:{},rowCheckable:{},maxSelection:{},batchPaste:{type:[Boolean,Object]},history:{},source:{},modelValue:{},multiple:{},columns:{},fields:{},organization:{},selectionOrder:{type:Boolean}},emits:[`update:modelValue`,`select`,`cancel`],setup(r,{expose:s,emit:l}){let u=r,d=l,f=(0,a.shallowRef)(),{t:p}=t.t(()=>u.locale),m=n.n(),h=(0,o.useThemeVars)(),g=(0,a.computed)(()=>({...m.value,"--c-user-picker-muted":h.value.textColor3,"--c-user-picker-border":h.value.borderColor,"--c-user-picker-error":h.value.errorColor})),v=(0,a.defineAsyncComponent)(()=>Promise.resolve().then(()=>require(`./C_Tree2.cjs`)).then(e=>e.n).then(e=>e.default)),y=(0,a.computed)(()=>{let{organization:e}=u;if(!e)return;let{field:t,title:n,...r}=e;return{options:[],field:t,title:n,render:e=>(0,a.h)(`div`,{class:`c-user-picker__organization`},[(0,a.h)(`div`,{class:`c-user-picker__organization-heading`},n??p(`userPicker.organization`)),(0,a.h)(o.NButton,{text:!0,size:`small`,disabled:e.disabled,onClick:()=>e.select(void 0)},()=>p(`picker.allCategories`)),(0,a.h)(v,{...r,searchPattern:void 0,treeProps:{...r.treeProps,pattern:void 0},checkable:!1,multiple:!1,selectable:!0,addable:!1,refreshable:!1,disabled:e.disabled||r.disabled,density:u.density??e.density,selectedKeys:e.value===void 0?[]:[e.value],"onNode-select":(t,n)=>e.select(n[0])})])}}),b=(0,a.computed)(()=>({...u,columns:u.columns??c(u.source,u.fields,p,u.disabledReason),modelValue:u.modelValue,title:u.title??p(`userPicker.title`),placeholder:u.placeholder??p(`userPicker.placeholder`),showTrigger:u.showTrigger??u.presentation!==`inline`,revalidateOnConfirm:u.revalidateOnConfirm??!0,navigation:y.value})),x=e=>{d(`update:modelValue`,e)},S=()=>f.value?.open(),C=()=>f.value?.close(),w=async()=>await f.value?.confirm()??!1,T=()=>{f.value?.reset(),E()},E=()=>{u.presentation===`inline`&&(0,a.nextTick)(S)};(0,a.onMounted)(E),(0,a.watch)(()=>[u.scope,u.source,u.source.request,u.source.resolve,u.organization?.searchSource?.scope,u.organization?.searchSource?.request],()=>{f.value?.reset(),E()});let D=e.t([u.initialValues,u.fixedFilters]);return(0,a.watch)(()=>[u.initialValues,u.fixedFilters],t=>{e.a(D,t)||(D=e.t(t),E())},{deep:!0,flush:`post`}),s({open:S,close:C,reset:T,confirm:w}),(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{class:`c-user-picker`,style:(0,a.normalizeStyle)(g.value)},[(0,a.createVNode)(i.t,(0,a.mergeProps)({ref_key:`picker`,ref:f},b.value,{"onUpdate:modelValue":x,onSelect:t[0]||=e=>d(`select`,e),onCancel:t[1]||=e=>d(`cancel`)}),(0,a.createSlots)({selected:(0,a.withCtx)(t=>[(0,a.renderSlot)(e.$slots,`selected`,(0,a.normalizeProps)((0,a.guardReactiveProps)(t)),()=>[(0,a.createVNode)(_,{context:t,fields:r.fields,ordered:r.selectionOrder,"disabled-reason":r.disabledReason,locale:r.locale},null,8,[`context`,`fields`,`ordered`,`disabled-reason`,`locale`])],!0)]),_:2},[e.$slots.trigger?{name:`trigger`,fn:(0,a.withCtx)(t=>[(0,a.renderSlot)(e.$slots,`trigger`,(0,a.normalizeProps)((0,a.guardReactiveProps)(t)),void 0,!0)]),key:`0`}:void 0]),1040)],4))}});var y=r.t(v,[[`__scopeId`,`data-v-4703e3c4`]]);function b(e){return e}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
|
package/dist/source.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as UserPickerModel, c as UserPickerSlots, i as UserPickerIdentityField, l as UserPickerSource, s as UserPickerProps, x as TreeNodeData } from "./
|
|
1
|
+
import { m as DataPickerValue, p as DataPickerSourceInput } from "./types6.cjs";
|
|
2
|
+
import { a as UserPickerModel, c as UserPickerSlots, i as UserPickerIdentityField, l as UserPickerSource, s as UserPickerProps, x as TreeNodeData } from "./types11.cjs";
|
|
3
3
|
import * as vue from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/C_UserPicker/index.vue.d.ts
|
package/dist/source.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as UserPickerModel, c as UserPickerSlots, i as UserPickerIdentityField, l as UserPickerSource, s as UserPickerProps, x as TreeNodeData } from "./
|
|
1
|
+
import { m as DataPickerValue, p as DataPickerSourceInput } from "./types5.js";
|
|
2
|
+
import { a as UserPickerModel, c as UserPickerSlots, i as UserPickerIdentityField, l as UserPickerSource, s as UserPickerProps, x as TreeNodeData } from "./types10.js";
|
|
3
3
|
import * as vue from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/C_UserPicker/index.vue.d.ts
|
package/dist/source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,t}from"./data2.js";import{t as n}from"./useComponentLocale.js";import{n as r}from"./useComponentTheme.js";import{t as i}from"./export-helper.js";import{t as a}from"./C_DataPicker2.js";import{Fragment as o,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as f,createTextVNode as p,createVNode as m,defineAsyncComponent as h,defineComponent as g,guardReactiveProps as _,h as v,mergeProps as y,nextTick as b,normalizeProps as x,normalizeStyle as S,onMounted as C,openBlock as w,ref as T,renderList as E,renderSlot as D,shallowRef as O,toDisplayString as k,unref as A,watch as j,withCtx as M}from"vue";import{NAvatar as N,NButton as P,NPagination as F,NText as I,useThemeVars as L}from"naive-ui";function R(e,t){if(t===void 0)return``;let n=e[t];return typeof n==`string`||typeof n==`number`?String(n):``}function z(e,t,n,r){let i=[{key:`__person`,title:n(`userPicker.name`),minWidth:190,render:n=>v(`div`,{class:`c-user-picker__person`},[v(N,{round:!0,size:32,src:R(n,t?.avatar)||void 0},{default:()=>e.label(n).slice(0,1)}),v(`div`,{class:`c-user-picker__identity`},[v(`strong`,e.label(n)),v(`small`,R(n,t?.code))])])}];for(let e of[`department`,`job`])t?.[e]&&i.push({key:`__${e}`,title:n(`userPicker.${e}`),minWidth:130,render:n=>R(n,t[e])});return(t?.status||r)&&i.push({key:`__status`,title:n(`userPicker.status`),minWidth:110,render:e=>{let n=r?.(e);return v(I,{type:n?`error`:void 0,title:n},()=>n||R(e,t?.status))}}),i}const B=[`aria-label`],V={class:`c-user-picker__selected-heading`},H={key:0,class:`c-user-picker__empty`},U={key:1,class:`c-user-picker__selected-list`},W={class:`c-user-picker__order`},G={class:`c-user-picker__identity`},K={class:`c-user-picker__item-actions`};var q=i(g({__name:`SelectedPeople`,props:{context:{},fields:{},ordered:{type:Boolean},locale:{},disabledReason:{type:Function}},setup(e){let t=e,{t:i}=n(()=>t.locale),a=r(),f=L(),h=s(()=>({...a.value,"--c-user-picker-muted":f.value.textColor3,"--c-user-picker-border":f.value.borderColor})),g=T(1),_=s(()=>(g.value-1)*8),v=s(()=>t.context.items.slice(_.value,_.value+8));return j(()=>t.context.items.length,e=>{g.value=Math.min(g.value,Math.max(1,Math.ceil(e/8)))}),(t,n)=>(w(),u(`section`,{class:`c-user-picker__selected`,style:S(h.value),"aria-label":A(i)(`userPicker.selected`)},[d(`div`,V,[d(`strong`,null,k(A(i)(`userPicker.selected`)),1),d(`span`,null,k(e.context.items.length),1)]),e.context.items.length?(w(),u(`ol`,U,[(w(!0),u(o,null,E(v.value,(t,r)=>(w(),u(`li`,{key:`${typeof t.value}:${t.value}`},[d(`span`,W,k(_.value+r+1),1),d(`div`,G,[d(`strong`,null,k(t.label),1),d(`small`,null,k(t.row?[A(R)(t.row,e.fields?.code),A(R)(t.row,e.fields?.department),e.disabledReason?.(t.row)].filter(Boolean).join(` · `):String(t.value)),1)]),d(`div`,K,[e.ordered?(w(),u(o,{key:0},[m(A(P),{text:``,size:`tiny`,disabled:e.context.disabled||_.value+r===0,"aria-label":A(i)(`userPicker.moveUp`,{name:t.label}),onClick:n=>e.context.move(t.value,-1)},{default:M(()=>[...n[1]||=[p(`↑`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`]),m(A(P),{text:``,size:`tiny`,disabled:e.context.disabled||_.value+r===e.context.items.length-1,"aria-label":A(i)(`userPicker.moveDown`,{name:t.label}),onClick:n=>e.context.move(t.value,1)},{default:M(()=>[...n[2]||=[p(`↓`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])],64)):l(`v-if`,!0),m(A(P),{text:``,size:`tiny`,disabled:e.context.disabled,"aria-label":A(i)(`userPicker.remove`,{name:t.label}),onClick:n=>e.context.remove(t.value)},{default:M(()=>[...n[3]||=[p(`×`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])])]))),128))])):(w(),u(`p`,H,k(A(i)(`userPicker.emptySelection`)),1)),e.context.items.length>8?(w(),c(A(F),{key:2,page:g.value,"onUpdate:page":n[0]||=e=>g.value=e,"page-size":8,"item-count":e.context.items.length,simple:``,size:`small`,"aria-label":A(i)(`userPicker.selectedPages`)},null,8,[`page`,`item-count`,`aria-label`])):l(`v-if`,!0)],12,B))}}),[[`__scopeId`,`data-v-2dab9c86`]]),J=i(g({name:`C_UserPicker`,__name:`index`,props:{disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},title:{},placeholder:{},density:{},locale:{},pageSize:{},scope:{},showActions:{type:Boolean,default:!0},showTrigger:{type:Boolean,default:void 0},revalidateOnConfirm:{type:Boolean,default:!0},disabledReason:{},requireSelection:{type:Boolean},presentation:{},initialValues:{},fixedFilters:{},rowCheckable:{},maxSelection:{},history:{},source:{},modelValue:{},multiple:{},columns:{},fields:{},organization:{},selectionOrder:{type:Boolean}},emits:[`update:modelValue`,`select`,`cancel`],setup(i,{expose:o,emit:c}){let l=i,d=c,p=O(),{t:g}=n(()=>l.locale),T=r(),E=L(),k=s(()=>({...T.value,"--c-user-picker-muted":E.value.textColor3,"--c-user-picker-border":E.value.borderColor,"--c-user-picker-error":E.value.errorColor})),A=h(()=>import(`./C_Tree2.js`).then(e=>e.n).then(e=>e.default)),N=s(()=>{let{organization:e}=l;if(!e)return;let{field:t,title:n,...r}=e;return{options:[],field:t,title:n,render:e=>v(`div`,{class:`c-user-picker__organization`},[v(`div`,{class:`c-user-picker__organization-heading`},n??g(`userPicker.organization`)),v(P,{text:!0,size:`small`,disabled:e.disabled,onClick:()=>e.select(void 0)},()=>g(`picker.allCategories`)),v(A,{...r,searchPattern:void 0,treeProps:{...r.treeProps,pattern:void 0},checkable:!1,multiple:!1,selectable:!0,addable:!1,refreshable:!1,disabled:e.disabled||r.disabled,density:l.density??e.density,selectedKeys:e.value===void 0?[]:[e.value],"onNode-select":(t,n)=>e.select(n[0])})])}}),F=s(()=>({...l,columns:l.columns??z(l.source,l.fields,g,l.disabledReason),modelValue:l.modelValue,title:l.title??g(`userPicker.title`),placeholder:l.placeholder??g(`userPicker.placeholder`),showTrigger:l.showTrigger??l.presentation!==`inline`,revalidateOnConfirm:l.revalidateOnConfirm??!0,navigation:N.value})),I=e=>{d(`update:modelValue`,e)},R=()=>p.value?.open(),B=()=>p.value?.close(),V=async()=>await p.value?.confirm()??!1,H=()=>{p.value?.reset(),U()},U=()=>{l.presentation===`inline`&&b(R)};C(U),j(()=>[l.scope,l.source,l.source.request,l.source.resolve,l.organization?.searchSource?.scope,l.organization?.searchSource?.request],()=>{p.value?.reset(),U()});let W=t([l.initialValues,l.fixedFilters]);return j(()=>[l.initialValues,l.fixedFilters],n=>{e(W,n)||(W=t(n),U())},{deep:!0,flush:`post`}),o({open:R,close:B,reset:H,confirm:V}),(e,t)=>(w(),u(`div`,{class:`c-user-picker`,style:S(k.value)},[m(a,y({ref_key:`picker`,ref:p},F.value,{"onUpdate:modelValue":I,onSelect:t[0]||=e=>d(`select`,e),onCancel:t[1]||=e=>d(`cancel`)}),f({selected:M(t=>[D(e.$slots,`selected`,x(_(t)),()=>[m(q,{context:t,fields:i.fields,ordered:i.selectionOrder,"disabled-reason":i.disabledReason,locale:i.locale},null,8,[`context`,`fields`,`ordered`,`disabled-reason`,`locale`])],!0)]),_:2},[e.$slots.trigger?{name:`trigger`,fn:M(t=>[D(e.$slots,`trigger`,x(_(t)),void 0,!0)]),key:`0`}:void 0]),1040)],4))}}),[[`__scopeId`,`data-v-4703e3c4`]]);function Y(e){return e}export{J as n,Y as t};
|
|
1
|
+
import{a as e,t}from"./data2.js";import{t as n}from"./useComponentLocale.js";import{n as r}from"./useComponentTheme.js";import{t as i}from"./export-helper.js";import{t as a}from"./C_DataPicker2.js";import{Fragment as o,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as f,createTextVNode as p,createVNode as m,defineAsyncComponent as h,defineComponent as g,guardReactiveProps as _,h as v,mergeProps as y,nextTick as b,normalizeProps as x,normalizeStyle as S,onMounted as C,openBlock as w,ref as T,renderList as E,renderSlot as D,shallowRef as O,toDisplayString as k,unref as A,watch as j,withCtx as M}from"vue";import{NAvatar as N,NButton as P,NPagination as F,NText as I,useThemeVars as L}from"naive-ui";function R(e,t){if(t===void 0)return``;let n=e[t];return typeof n==`string`||typeof n==`number`?String(n):``}function z(e,t,n,r){let i=[{key:`__person`,title:n(`userPicker.name`),minWidth:190,render:n=>v(`div`,{class:`c-user-picker__person`},[v(N,{round:!0,size:32,src:R(n,t?.avatar)||void 0},{default:()=>e.label(n).slice(0,1)}),v(`div`,{class:`c-user-picker__identity`},[v(`strong`,e.label(n)),v(`small`,R(n,t?.code))])])}];for(let e of[`department`,`job`])t?.[e]&&i.push({key:`__${e}`,title:n(`userPicker.${e}`),minWidth:130,render:n=>R(n,t[e])});return(t?.status||r)&&i.push({key:`__status`,title:n(`userPicker.status`),minWidth:110,render:e=>{let n=r?.(e);return v(I,{type:n?`error`:void 0,title:n},()=>n||R(e,t?.status))}}),i}const B=[`aria-label`],V={class:`c-user-picker__selected-heading`},H={key:0,class:`c-user-picker__empty`},U={key:1,class:`c-user-picker__selected-list`},W={class:`c-user-picker__order`},G={class:`c-user-picker__identity`},K={class:`c-user-picker__item-actions`};var q=i(g({__name:`SelectedPeople`,props:{context:{},fields:{},ordered:{type:Boolean},locale:{},disabledReason:{type:Function}},setup(e){let t=e,{t:i}=n(()=>t.locale),a=r(),f=L(),h=s(()=>({...a.value,"--c-user-picker-muted":f.value.textColor3,"--c-user-picker-border":f.value.borderColor})),g=T(1),_=s(()=>(g.value-1)*8),v=s(()=>t.context.items.slice(_.value,_.value+8));return j(()=>t.context.items.length,e=>{g.value=Math.min(g.value,Math.max(1,Math.ceil(e/8)))}),(t,n)=>(w(),u(`section`,{class:`c-user-picker__selected`,style:S(h.value),"aria-label":A(i)(`userPicker.selected`)},[d(`div`,V,[d(`strong`,null,k(A(i)(`userPicker.selected`)),1),d(`span`,null,k(e.context.items.length),1)]),e.context.items.length?(w(),u(`ol`,U,[(w(!0),u(o,null,E(v.value,(t,r)=>(w(),u(`li`,{key:`${typeof t.value}:${t.value}`},[d(`span`,W,k(_.value+r+1),1),d(`div`,G,[d(`strong`,null,k(t.label),1),d(`small`,null,k(t.row?[A(R)(t.row,e.fields?.code),A(R)(t.row,e.fields?.department),e.disabledReason?.(t.row)].filter(Boolean).join(` · `):String(t.value)),1)]),d(`div`,K,[e.ordered?(w(),u(o,{key:0},[m(A(P),{text:``,size:`tiny`,disabled:e.context.disabled||_.value+r===0,"aria-label":A(i)(`userPicker.moveUp`,{name:t.label}),onClick:n=>e.context.move(t.value,-1)},{default:M(()=>[...n[1]||=[p(`↑`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`]),m(A(P),{text:``,size:`tiny`,disabled:e.context.disabled||_.value+r===e.context.items.length-1,"aria-label":A(i)(`userPicker.moveDown`,{name:t.label}),onClick:n=>e.context.move(t.value,1)},{default:M(()=>[...n[2]||=[p(`↓`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])],64)):l(`v-if`,!0),m(A(P),{text:``,size:`tiny`,disabled:e.context.disabled,"aria-label":A(i)(`userPicker.remove`,{name:t.label}),onClick:n=>e.context.remove(t.value)},{default:M(()=>[...n[3]||=[p(`×`,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`])])]))),128))])):(w(),u(`p`,H,k(A(i)(`userPicker.emptySelection`)),1)),e.context.items.length>8?(w(),c(A(F),{key:2,page:g.value,"onUpdate:page":n[0]||=e=>g.value=e,"page-size":8,"item-count":e.context.items.length,simple:``,size:`small`,"aria-label":A(i)(`userPicker.selectedPages`)},null,8,[`page`,`item-count`,`aria-label`])):l(`v-if`,!0)],12,B))}}),[[`__scopeId`,`data-v-2dab9c86`]]),J=i(g({name:`C_UserPicker`,__name:`index`,props:{disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},title:{},placeholder:{},density:{},locale:{},pageSize:{},scope:{},showActions:{type:Boolean,default:!0},showTrigger:{type:Boolean,default:void 0},revalidateOnConfirm:{type:Boolean,default:!0},disabledReason:{},requireSelection:{type:Boolean},presentation:{},commitOnSelect:{type:Boolean},popup:{},maxTagCount:{},initialValues:{},fixedFilters:{},rowCheckable:{},maxSelection:{},batchPaste:{type:[Boolean,Object]},history:{},source:{},modelValue:{},multiple:{},columns:{},fields:{},organization:{},selectionOrder:{type:Boolean}},emits:[`update:modelValue`,`select`,`cancel`],setup(i,{expose:o,emit:c}){let l=i,d=c,p=O(),{t:g}=n(()=>l.locale),T=r(),E=L(),k=s(()=>({...T.value,"--c-user-picker-muted":E.value.textColor3,"--c-user-picker-border":E.value.borderColor,"--c-user-picker-error":E.value.errorColor})),A=h(()=>import(`./C_Tree2.js`).then(e=>e.n).then(e=>e.default)),N=s(()=>{let{organization:e}=l;if(!e)return;let{field:t,title:n,...r}=e;return{options:[],field:t,title:n,render:e=>v(`div`,{class:`c-user-picker__organization`},[v(`div`,{class:`c-user-picker__organization-heading`},n??g(`userPicker.organization`)),v(P,{text:!0,size:`small`,disabled:e.disabled,onClick:()=>e.select(void 0)},()=>g(`picker.allCategories`)),v(A,{...r,searchPattern:void 0,treeProps:{...r.treeProps,pattern:void 0},checkable:!1,multiple:!1,selectable:!0,addable:!1,refreshable:!1,disabled:e.disabled||r.disabled,density:l.density??e.density,selectedKeys:e.value===void 0?[]:[e.value],"onNode-select":(t,n)=>e.select(n[0])})])}}),F=s(()=>({...l,columns:l.columns??z(l.source,l.fields,g,l.disabledReason),modelValue:l.modelValue,title:l.title??g(`userPicker.title`),placeholder:l.placeholder??g(`userPicker.placeholder`),showTrigger:l.showTrigger??l.presentation!==`inline`,revalidateOnConfirm:l.revalidateOnConfirm??!0,navigation:N.value})),I=e=>{d(`update:modelValue`,e)},R=()=>p.value?.open(),B=()=>p.value?.close(),V=async()=>await p.value?.confirm()??!1,H=()=>{p.value?.reset(),U()},U=()=>{l.presentation===`inline`&&b(R)};C(U),j(()=>[l.scope,l.source,l.source.request,l.source.resolve,l.organization?.searchSource?.scope,l.organization?.searchSource?.request],()=>{p.value?.reset(),U()});let W=t([l.initialValues,l.fixedFilters]);return j(()=>[l.initialValues,l.fixedFilters],n=>{e(W,n)||(W=t(n),U())},{deep:!0,flush:`post`}),o({open:R,close:B,reset:H,confirm:V}),(e,t)=>(w(),u(`div`,{class:`c-user-picker`,style:S(k.value)},[m(a,y({ref_key:`picker`,ref:p},F.value,{"onUpdate:modelValue":I,onSelect:t[0]||=e=>d(`select`,e),onCancel:t[1]||=e=>d(`cancel`)}),f({selected:M(t=>[D(e.$slots,`selected`,x(_(t)),()=>[m(q,{context:t,fields:i.fields,ordered:i.selectionOrder,"disabled-reason":i.disabledReason,locale:i.locale},null,8,[`context`,`fields`,`ordered`,`disabled-reason`,`locale`])],!0)]),_:2},[e.$slots.trigger?{name:`trigger`,fn:M(t=>[D(e.$slots,`trigger`,x(_(t)),void 0,!0)]),key:`0`}:void 0]),1040)],4))}}),[[`__scopeId`,`data-v-4703e3c4`]]);function Y(e){return e}export{J as n,Y as t};
|