@epam/ai-dial-chat-hooks 1.3.0-dev.5 → 1.3.0-dev.55
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/api-error/api-error.d.ts +30 -0
- package/api-error/api-error.d.ts.map +1 -0
- package/api-transport/create-csrf-middleware.d.ts +15 -0
- package/api-transport/create-csrf-middleware.d.ts.map +1 -0
- package/api-transport/create-unauthorized-middleware.d.ts +40 -0
- package/api-transport/create-unauthorized-middleware.d.ts.map +1 -0
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts +32 -0
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -0
- package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts +50 -0
- package/attachment/useAttachmentValidation/useAttachmentValidation.d.ts.map +1 -0
- package/attachments.d.ts +2 -94
- package/catalog/catalog-derivations.d.ts +27 -0
- package/catalog/catalog-derivations.d.ts.map +1 -0
- package/catalog/catalog-primary-action.d.ts +47 -0
- package/catalog/catalog-primary-action.d.ts.map +1 -0
- package/catalog/create-publish-api.d.ts +32 -0
- package/catalog/create-publish-api.d.ts.map +1 -0
- package/catalog/deployment-endpoint-url.d.ts +19 -0
- package/catalog/deployment-endpoint-url.d.ts.map +1 -0
- package/catalog/deployment-id.d.ts +42 -0
- package/catalog/deployment-id.d.ts.map +1 -0
- package/catalog/entity-details.d.ts +146 -0
- package/catalog/entity-details.d.ts.map +1 -0
- package/catalog/map-deployment-limits-to-catalog.d.ts +34 -0
- package/catalog/map-deployment-limits-to-catalog.d.ts.map +1 -0
- package/catalog/map-deployment-limits-to-input.d.ts +28 -0
- package/catalog/map-deployment-limits-to-input.d.ts.map +1 -0
- package/catalog/map-deployment-to-catalog-item.d.ts +61 -0
- package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -0
- package/catalog/map-entity-details-to-catalog.d.ts +81 -0
- package/catalog/map-entity-details-to-catalog.d.ts.map +1 -0
- package/catalog/map-prompt-to-catalog-item.d.ts +43 -0
- package/catalog/map-prompt-to-catalog-item.d.ts.map +1 -0
- package/catalog/map-skill-to-catalog-item.d.ts +113 -0
- package/catalog/map-skill-to-catalog-item.d.ts.map +1 -0
- package/catalog/mcp-endpoint-url.d.ts +18 -0
- package/catalog/mcp-endpoint-url.d.ts.map +1 -0
- package/catalog/publish.d.ts +35 -0
- package/catalog/publish.d.ts.map +1 -0
- package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts +19 -0
- package/catalog/useApplicationCredentials/useApplicationCredentials.d.ts.map +1 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +100 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +139 -122
- package/catalog/useCatalogItemDetails.d.ts +70 -0
- package/catalog/useCatalogItemDetails.d.ts.map +1 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts +76 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -0
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts +37 -0
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.d.ts.map +1 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts +73 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -0
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts +54 -0
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.d.ts.map +1 -0
- package/catalog/useSkillItemDetails.d.ts +64 -0
- package/catalog/useSkillItemDetails.d.ts.map +1 -0
- package/catalog.d.ts +2 -1433
- package/conversation/announcement-message.d.ts +61 -0
- package/conversation/announcement-message.d.ts.map +1 -0
- package/conversation/conversation-transfer/async.d.ts +10 -0
- package/conversation/conversation-transfer/async.d.ts.map +1 -0
- package/conversation/conversation-transfer/attachment-refs.d.ts +42 -0
- package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -0
- package/conversation/conversation-transfer/build-upload-path.d.ts +42 -0
- package/conversation/conversation-transfer/build-upload-path.d.ts.map +1 -0
- package/conversation/conversation-transfer/date.d.ts +5 -0
- package/conversation/conversation-transfer/date.d.ts.map +1 -0
- package/conversation/conversation-transfer/dial-file-resolve.d.ts +10 -0
- package/conversation/conversation-transfer/dial-file-resolve.d.ts.map +1 -0
- package/conversation/conversation-transfer/export-conversation.d.ts +10 -0
- package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -0
- package/conversation/conversation-transfer/import-conversation.d.ts +106 -0
- package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -0
- package/conversation/conversation-transfer/progress.d.ts +60 -0
- package/conversation/conversation-transfer/progress.d.ts.map +1 -0
- package/conversation/conversation-transfer/queue.d.ts +54 -0
- package/conversation/conversation-transfer/queue.d.ts.map +1 -0
- package/conversation/conversation-transfer/types.d.ts +36 -0
- package/conversation/conversation-transfer/types.d.ts.map +1 -0
- package/conversation/conversation-transfer/zip-export.d.ts +31 -0
- package/conversation/conversation-transfer/zip-export.d.ts.map +1 -0
- package/conversation/conversation-transfer/zip-import.d.ts +17 -0
- package/conversation/conversation-transfer/zip-import.d.ts.map +1 -0
- package/conversation/create-chat-stream-api.d.ts +92 -0
- package/conversation/create-chat-stream-api.d.ts.map +1 -0
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts +39 -0
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.d.ts.map +1 -0
- package/conversation/display-name-watch.d.ts +4 -0
- package/conversation/display-name-watch.d.ts.map +1 -0
- package/conversation/footer-message.d.ts +10 -0
- package/conversation/footer-message.d.ts.map +1 -0
- package/conversation/get-model-id-from-conversation-id.d.ts +38 -0
- package/conversation/get-model-id-from-conversation-id.d.ts.map +1 -0
- package/conversation/greeting.d.ts +18 -0
- package/conversation/greeting.d.ts.map +1 -0
- package/conversation/message-factory.d.ts +7 -0
- package/conversation/message-factory.d.ts.map +1 -0
- package/conversation/message-utils.d.ts +67 -0
- package/conversation/message-utils.d.ts.map +1 -0
- package/conversation/overlay-messages.d.ts +5 -0
- package/conversation/overlay-messages.d.ts.map +1 -0
- package/conversation/quick-app-conversation-starters.d.ts +10 -0
- package/conversation/quick-app-conversation-starters.d.ts.map +1 -0
- package/conversation/stage.d.ts +77 -0
- package/conversation/stage.d.ts.map +1 -0
- package/conversation/starter-option.d.ts +21 -0
- package/conversation/starter-option.d.ts.map +1 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +35 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -0
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts +46 -0
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.d.ts.map +1 -0
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts +27 -0
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -0
- package/conversation/useConversationExport/useConversationExport.d.ts +72 -0
- package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -0
- package/conversation/useConversationHandlers/attachment-to-dto.d.ts +7 -0
- package/conversation/useConversationHandlers/attachment-to-dto.d.ts.map +1 -0
- package/conversation/useConversationHandlers/message-factory.d.ts +9 -0
- package/conversation/useConversationHandlers/message-factory.d.ts.map +1 -0
- package/conversation/useConversationHandlers/message-utils.d.ts +38 -0
- package/conversation/useConversationHandlers/message-utils.d.ts.map +1 -0
- package/conversation/useConversationHandlers/starter-option.d.ts +24 -0
- package/conversation/useConversationHandlers/starter-option.d.ts.map +1 -0
- package/conversation/useConversationHandlers/useConversationHandlers.d.ts +66 -0
- package/conversation/useConversationHandlers/useConversationHandlers.d.ts.map +1 -0
- package/conversation/useConversationImport/useConversationImport.d.ts +54 -0
- package/conversation/useConversationImport/useConversationImport.d.ts.map +1 -0
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts +24 -0
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.d.ts.map +1 -0
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +64 -0
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -0
- package/conversation/useConversationScroll/useConversationScroll.d.ts +46 -0
- package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -0
- package/conversation/useConversationStream/apply-chunk.d.ts +35 -0
- package/conversation/useConversationStream/apply-chunk.d.ts.map +1 -0
- package/conversation/useConversationStream/buffered-generation.d.ts +15 -0
- package/conversation/useConversationStream/buffered-generation.d.ts.map +1 -0
- package/conversation/useConversationStream/conversation-path.d.ts +7 -0
- package/conversation/useConversationStream/conversation-path.d.ts.map +1 -0
- package/conversation/useConversationStream/frame-scheduler.d.ts +14 -0
- package/conversation/useConversationStream/frame-scheduler.d.ts.map +1 -0
- package/conversation/useConversationStream/generation-resume.d.ts +85 -0
- package/conversation/useConversationStream/generation-resume.d.ts.map +1 -0
- package/conversation/useConversationStream/useConversationStream.d.ts +145 -0
- package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -0
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts +32 -0
- package/conversation/useImportFilePicker/useImportFilePicker.d.ts.map +1 -0
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts +42 -0
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.d.ts.map +1 -0
- package/conversation/useTranscribeAudio/audio-transcription-error.d.ts +19 -0
- package/conversation/useTranscribeAudio/audio-transcription-error.d.ts.map +1 -0
- package/conversation/useTranscribeAudio/transcription-retry.d.ts +2 -0
- package/conversation/useTranscribeAudio/transcription-retry.d.ts.map +1 -0
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +43 -0
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -0
- package/conversation-overlay.d.ts +2 -7
- package/conversation-sources/useConversationSources/useConversationSources.d.ts +20 -0
- package/conversation-sources/useConversationSources/useConversationSources.d.ts.map +1 -0
- package/conversation-sources.d.ts +2 -25
- package/conversation-transfer.d.ts +2 -190
- package/conversation.d.ts +2 -1372
- package/entry-points/attachments.d.ts +3 -0
- package/entry-points/attachments.d.ts.map +1 -0
- package/entry-points/catalog.d.ts +25 -0
- package/entry-points/catalog.d.ts.map +1 -0
- package/entry-points/conversation-overlay.d.ts +2 -0
- package/entry-points/conversation-overlay.d.ts.map +1 -0
- package/entry-points/conversation-sources.d.ts +2 -0
- package/entry-points/conversation-sources.d.ts.map +1 -0
- package/entry-points/conversation-transfer.d.ts +7 -0
- package/entry-points/conversation-transfer.d.ts.map +1 -0
- package/entry-points/conversation.d.ts +33 -0
- package/entry-points/conversation.d.ts.map +1 -0
- package/entry-points/file-manager-canvas.d.ts +2 -0
- package/entry-points/file-manager-canvas.d.ts.map +1 -0
- package/entry-points/file-manager.d.ts +31 -0
- package/entry-points/file-manager.d.ts.map +1 -0
- package/entry-points/mcp-apps.d.ts +6 -0
- package/entry-points/mcp-apps.d.ts.map +1 -0
- package/entry-points/oauth.d.ts +10 -0
- package/entry-points/oauth.d.ts.map +1 -0
- package/entry-points/scheduled-tasks.d.ts +8 -0
- package/entry-points/scheduled-tasks.d.ts.map +1 -0
- package/entry-points/scroll-anchoring.d.ts +2 -0
- package/entry-points/scroll-anchoring.d.ts.map +1 -0
- package/entry-points/sharing.d.ts +3 -0
- package/entry-points/sharing.d.ts.map +1 -0
- package/entry-points/skill-editor.d.ts +9 -0
- package/entry-points/skill-editor.d.ts.map +1 -0
- package/entry-points/skills-state.d.ts +2 -0
- package/entry-points/skills-state.d.ts.map +1 -0
- package/entry-points/source-content.d.ts +2 -0
- package/entry-points/source-content.d.ts.map +1 -0
- package/entry-points/usage-limits.d.ts +8 -0
- package/entry-points/usage-limits.d.ts.map +1 -0
- package/entry-points/usage.d.ts +3 -0
- package/entry-points/usage.d.ts.map +1 -0
- package/entry-points/utils.d.ts +17 -0
- package/entry-points/utils.d.ts.map +1 -0
- package/entry-points/viewport-layout.d.ts +4 -0
- package/entry-points/viewport-layout.d.ts.map +1 -0
- package/file-manager-canvas.d.ts +2 -418
- package/file-manager.d.ts +2 -1237
- package/file-manager.js +25 -25
- package/files/annotation.d.ts +10 -0
- package/files/annotation.d.ts.map +1 -0
- package/files/attachment-canvas.d.ts +123 -0
- package/files/attachment-canvas.d.ts.map +1 -0
- package/files/attachment-dto-to-display.d.ts +10 -0
- package/files/attachment-dto-to-display.d.ts.map +1 -0
- package/files/attachment-types.d.ts +21 -0
- package/files/attachment-types.d.ts.map +1 -0
- package/files/create-files-api.d.ts +52 -0
- package/files/create-files-api.d.ts.map +1 -0
- package/files/create-upload-file-with-progress.d.ts +24 -0
- package/files/create-upload-file-with-progress.d.ts.map +1 -0
- package/files/dial-file-manager-copy-move.util.d.ts +15 -0
- package/files/dial-file-manager-copy-move.util.d.ts.map +1 -0
- package/files/dial-file-manager-mapping.util.d.ts +35 -0
- package/files/dial-file-manager-mapping.util.d.ts.map +1 -0
- package/files/dial-file-manager-path.util.d.ts +48 -0
- package/files/dial-file-manager-path.util.d.ts.map +1 -0
- package/files/dial-file-manager.model.d.ts +36 -0
- package/files/dial-file-manager.model.d.ts.map +1 -0
- package/files/dial-file-manager.model.js +7 -3
- package/files/dial-file-manager.types.d.ts +327 -0
- package/files/dial-file-manager.types.d.ts.map +1 -0
- package/files/dial-file-manager.types.js +1 -1
- package/files/dial-file-to-attachment.d.ts +26 -0
- package/files/dial-file-to-attachment.d.ts.map +1 -0
- package/files/dial-file.d.ts +17 -0
- package/files/dial-file.d.ts.map +1 -0
- package/files/dial-files-api.d.ts +71 -0
- package/files/dial-files-api.d.ts.map +1 -0
- package/files/download-destination.d.ts +31 -0
- package/files/download-destination.d.ts.map +1 -0
- package/files/file-manager-variant.d.ts +3 -0
- package/files/file-manager-variant.d.ts.map +1 -0
- package/files/file-name.d.ts +19 -0
- package/files/file-name.d.ts.map +1 -0
- package/files/prepare-download-destination.d.ts +8 -0
- package/files/prepare-download-destination.d.ts.map +1 -0
- package/files/resolve-dial-file-api-path.d.ts +12 -0
- package/files/resolve-dial-file-api-path.d.ts.map +1 -0
- package/files/source-content.d.ts +28 -0
- package/files/source-content.d.ts.map +1 -0
- package/files/useDialFileListing/useDialFileListing.d.ts +82 -0
- package/files/useDialFileListing/useDialFileListing.d.ts.map +1 -0
- package/files/useDialFileListing/useDialFileListing.js +24 -14
- package/files/useDialFileManager/useDialFileManager.d.ts +16 -0
- package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -0
- package/files/useDialFileManager/useDialFileManager.js +148 -140
- package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts +25 -0
- package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts +15 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.d.ts.map +1 -0
- package/files/useDialFileMetadata/useDialFileMetadata.d.ts +28 -0
- package/files/useDialFileMetadata/useDialFileMetadata.d.ts.map +1 -0
- package/files/useDialFileMutations/useDialFileMutations.d.ts +68 -0
- package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -0
- package/files/useDialFileMutations/useDialFileMutations.js +206 -204
- package/files/useDialFileSharing/useDialFileSharing.d.ts +34 -0
- package/files/useDialFileSharing/useDialFileSharing.d.ts.map +1 -0
- package/files/useDialFileSharing/useDialFileSharing.js +45 -39
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts +47 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +8 -4
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts +59 -0
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.d.ts.map +1 -0
- package/index.d.ts +159 -6974
- package/index.d.ts.map +1 -0
- package/index.js +124 -117
- package/mcp-apps/mcp-apps-api-client.d.ts +28 -0
- package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -0
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts +14 -0
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.d.ts.map +1 -0
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +29 -0
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -0
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts +22 -0
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -0
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts +36 -0
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.d.ts.map +1 -0
- package/mcp-apps.d.ts +2 -256
- package/oauth/authorize-url.d.ts +16 -0
- package/oauth/authorize-url.d.ts.map +1 -0
- package/oauth/handshake.d.ts +30 -0
- package/oauth/handshake.d.ts.map +1 -0
- package/oauth/models.d.ts +81 -0
- package/oauth/models.d.ts.map +1 -0
- package/oauth/popup.d.ts +30 -0
- package/oauth/popup.d.ts.map +1 -0
- package/oauth/toolset-id.d.ts +53 -0
- package/oauth/toolset-id.d.ts.map +1 -0
- package/oauth/types.d.ts +84 -0
- package/oauth/types.d.ts.map +1 -0
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts +54 -0
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.d.ts.map +1 -0
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts +79 -0
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -0
- package/oauth.d.ts +2 -472
- package/package.json +26 -17
- package/prompt/export-prompt.d.ts +31 -0
- package/prompt/export-prompt.d.ts.map +1 -0
- package/prompt/prompt-resource.d.ts +30 -0
- package/prompt/prompt-resource.d.ts.map +1 -0
- package/prompt/prompt.d.ts +34 -0
- package/prompt/prompt.d.ts.map +1 -0
- package/prompt/usePromptsState/usePromptsState.d.ts +34 -0
- package/prompt/usePromptsState/usePromptsState.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-description.d.ts +38 -0
- package/scheduled-task/scheduled-task-description.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-mapping.d.ts +19 -0
- package/scheduled-task/scheduled-task-mapping.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-preparation.d.ts +19 -0
- package/scheduled-task/scheduled-task-preparation.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-trigger.d.ts +26 -0
- package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -0
- package/scheduled-task/scheduled-tasks-api-client.d.ts +67 -0
- package/scheduled-task/scheduled-tasks-api-client.d.ts.map +1 -0
- package/scheduled-task/use-scheduled-task-runs.d.ts +40 -0
- package/scheduled-task/use-scheduled-task-runs.d.ts.map +1 -0
- package/scheduled-task/use-scheduled-task-runs.js +67 -67
- package/scheduled-task/use-scheduled-tasks.d.ts +28 -0
- package/scheduled-task/use-scheduled-tasks.d.ts.map +1 -0
- package/scheduled-tasks.d.ts +2 -250
- package/scroll-anchoring.d.ts +2 -50
- package/shared/application-schema.d.ts +18 -0
- package/shared/application-schema.d.ts.map +1 -0
- package/shared/application-schema.js +2 -2
- package/shared/browser-timezone.d.ts +7 -0
- package/shared/browser-timezone.d.ts.map +1 -0
- package/shared/cron-day-of-month.d.ts +21 -0
- package/shared/cron-day-of-month.d.ts.map +1 -0
- package/shared/cron-weekday.d.ts +5 -0
- package/shared/cron-weekday.d.ts.map +1 -0
- package/shared/custom-apps.d.ts +7 -0
- package/shared/custom-apps.d.ts.map +1 -0
- package/shared/external-services.d.ts +16 -0
- package/shared/external-services.d.ts.map +1 -0
- package/shared/formatting.d.ts +5 -0
- package/shared/formatting.d.ts.map +1 -0
- package/shared/locale.d.ts +45 -0
- package/shared/locale.d.ts.map +1 -0
- package/shared/string-utils.d.ts +11 -0
- package/shared/string-utils.d.ts.map +1 -0
- package/shared/toolset-login-events.d.ts +15 -0
- package/shared/toolset-login-events.d.ts.map +1 -0
- package/sharing.d.ts +2 -65
- package/skill/skill-archive.d.ts +7 -0
- package/skill/skill-archive.d.ts.map +1 -0
- package/skill/skill-file-batch-validation.d.ts +70 -0
- package/skill/skill-file-batch-validation.d.ts.map +1 -0
- package/skill/skill-file-preview.d.ts +25 -0
- package/skill/skill-file-preview.d.ts.map +1 -0
- package/skill/skill-manifest.d.ts +28 -0
- package/skill/skill-manifest.d.ts.map +1 -0
- package/skill/skill-types.d.ts +46 -0
- package/skill/skill-types.d.ts.map +1 -0
- package/skill/skill.d.ts +160 -0
- package/skill/skill.d.ts.map +1 -0
- package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts +65 -0
- package/skill/useSkillArchiveImport/useSkillArchiveImport.d.ts.map +1 -0
- package/skill/useSkillEditorLoad.d.ts +74 -0
- package/skill/useSkillEditorLoad.d.ts.map +1 -0
- package/skill/useSkillEditorSubmit.d.ts +125 -0
- package/skill/useSkillEditorSubmit.d.ts.map +1 -0
- package/skill/useSkillFileActions.d.ts +60 -0
- package/skill/useSkillFileActions.d.ts.map +1 -0
- package/skill/useSkillFilePreview.d.ts +38 -0
- package/skill/useSkillFilePreview.d.ts.map +1 -0
- package/skill/useSkillsState/useSkillsState.d.ts +35 -0
- package/skill/useSkillsState/useSkillsState.d.ts.map +1 -0
- package/skill-editor.d.ts +2 -655
- package/skills-state.d.ts +2 -40
- package/source-content.d.ts +2 -29
- package/usage/map-usage-data-to-dashboard.d.ts +39 -0
- package/usage/map-usage-data-to-dashboard.d.ts.map +1 -0
- package/usage/map-user-usage-to-model-limits.d.ts +62 -0
- package/usage/map-user-usage-to-model-limits.d.ts.map +1 -0
- package/usage/usage-banner-source.d.ts +23 -0
- package/usage/usage-banner-source.d.ts.map +1 -0
- package/usage/usage-banner-source.js +36 -0
- package/usage/usage-period.d.ts +7 -0
- package/usage/usage-period.d.ts.map +1 -0
- package/usage/usage-period.js +6 -0
- package/usage/usage-reset-time.d.ts +69 -0
- package/usage/usage-reset-time.d.ts.map +1 -0
- package/usage/usage-reset-time.js +72 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +32 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -0
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +39 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts +16 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.d.ts.map +1 -0
- package/usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js +14 -0
- package/usage/useUsageData/useUsageData.d.ts +28 -0
- package/usage/useUsageData/useUsageData.d.ts.map +1 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +56 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -0
- package/usage/useUsageLimitBanner/useUsageLimitBanner.js +67 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts +14 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.d.ts.map +1 -0
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +19 -0
- package/usage-limits.d.ts +2 -0
- package/usage-limits.js +8 -0
- package/usage.d.ts +2 -125
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +128 -0
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -0
- package/usePageFileDrag/usePageFileDrag.d.ts +16 -0
- package/usePageFileDrag/usePageFileDrag.d.ts.map +1 -0
- package/usePanelMaxWidth/usePanelMaxWidth.d.ts +6 -0
- package/usePanelMaxWidth/usePanelMaxWidth.d.ts.map +1 -0
- package/useShareLink/useShareLink.d.ts +23 -0
- package/useShareLink/useShareLink.d.ts.map +1 -0
- package/useShareRecipientsCount/useShareRecipientsCount.d.ts +36 -0
- package/useShareRecipientsCount/useShareRecipientsCount.d.ts.map +1 -0
- package/useToolsMenu/useToolsMenu.d.ts +31 -0
- package/useToolsMenu/useToolsMenu.d.ts.map +1 -0
- package/useViewportWidth/useViewportWidth.d.ts +3 -0
- package/useViewportWidth/useViewportWidth.d.ts.map +1 -0
- package/utils.d.ts +2 -404
- package/utils.js +10 -10
- package/viewport-layout.d.ts +2 -27
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { CreateFolderResponseDto } from '@epam/ai-dial-chat-api-client';
|
|
2
|
+
import { DialCopiedItem, DialDeletedItem, DialFile, DialUploadFileItem, DialFileManagerTabs } from '@epam/ai-dial-react-file-manager';
|
|
3
|
+
import { SharedRootMeta } from '../dial-file-manager.model';
|
|
4
|
+
import { FileManagerNotification, FileNameValidationError, FileOperationSuccessEvent } from '../dial-file-manager.types';
|
|
5
|
+
import { DialFilesApi } from '../dial-files-api';
|
|
6
|
+
import { DownloadDestinationHandlers } from '../download-destination';
|
|
7
|
+
/** Options accepted by `useDialFileMutations`. */
|
|
8
|
+
export interface UseDialFileMutationsOptions {
|
|
9
|
+
/** Injected operation port used for every mutation network call. */
|
|
10
|
+
filesApi: DialFilesApi;
|
|
11
|
+
/** DIAL Core bucket to browse (used only for the my_files tab). */
|
|
12
|
+
bucket: string;
|
|
13
|
+
/** Display name for the root folder node. */
|
|
14
|
+
rootLabel: string;
|
|
15
|
+
/** Active tab — drives owner-bucket resolution for the Shared tab. */
|
|
16
|
+
activeTab: DialFileManagerTabs;
|
|
17
|
+
/** Bucket-relative path of the currently browsed folder, owned by `useDialFileListing`. */
|
|
18
|
+
folderPath: string;
|
|
19
|
+
/** Currently browsed folder node, owned by `useDialFileListing`. */
|
|
20
|
+
currentFolder: DialFile | undefined;
|
|
21
|
+
/** Owner-bucket resolution metadata for the Shared tab, owned by `useDialFileListing`. */
|
|
22
|
+
sharedRootMetaRef: React.RefObject<Map<string, SharedRootMeta>>;
|
|
23
|
+
/** Read-only snapshot of `useDialFileListing`'s per-folder permissions cache. */
|
|
24
|
+
listingPermissionsCache: Map<string, string[] | undefined>;
|
|
25
|
+
/** Deletes the given API-path cache keys so the next fetch re-fetches them. */
|
|
26
|
+
invalidateFolders: (apiPaths: string[]) => void;
|
|
27
|
+
/** Forces `useDialFileListing`'s fetch effect to re-run. */
|
|
28
|
+
bumpRetry: () => void;
|
|
29
|
+
/** Merges a newly created folder into its parent's cache entry, owned by `useDialFileListing`. */
|
|
30
|
+
mergeCreatedFolder: (parentApiPath: string, created: CreateFolderResponseDto, inheritedPermissions?: string[]) => void;
|
|
31
|
+
/** Imperatively navigates the current folder after a rename/delete of the browsed folder. */
|
|
32
|
+
setFolderPath: React.Dispatch<React.SetStateAction<string>>;
|
|
33
|
+
/** Called when a mutation should surface a toast notification. */
|
|
34
|
+
onNotification?: (notification: FileManagerNotification) => void;
|
|
35
|
+
/** Called when a mutation succeeds, instead of invoking an application notification service directly. */
|
|
36
|
+
onOperationSuccess?: (event: FileOperationSuccessEvent) => void;
|
|
37
|
+
/** Host-injected browser "Save As"/auto-download seam for `onDownloadFiles`. */
|
|
38
|
+
downloadDestination: DownloadDestinationHandlers;
|
|
39
|
+
/** Regexp of characters forbidden in file/folder names beyond the path separator. */
|
|
40
|
+
forbiddenSymbolsRegExp?: RegExp;
|
|
41
|
+
}
|
|
42
|
+
/** Values returned by `useDialFileMutations`. */
|
|
43
|
+
export interface UseDialFileMutationsResult {
|
|
44
|
+
isCreatingFolder: boolean;
|
|
45
|
+
isDownloading: boolean;
|
|
46
|
+
isDeleting: boolean;
|
|
47
|
+
isRenaming: boolean;
|
|
48
|
+
isCopying: boolean;
|
|
49
|
+
isMoving: boolean;
|
|
50
|
+
onCreateFolder: (file: DialUploadFileItem, folderPath: string, fileId: string) => Promise<void>;
|
|
51
|
+
onCreateFolderValidate: (name: string, parentFolder: DialFile) => FileNameValidationError | null;
|
|
52
|
+
onDownloadFiles: (dialFiles: DialFile[]) => void;
|
|
53
|
+
onDeleteFiles: (items: DialDeletedItem[], sourceFolder: string) => void;
|
|
54
|
+
onRenameValidate: (value: string, item: DialFile) => FileNameValidationError | null;
|
|
55
|
+
onMoveToFiles: (items: DialCopiedItem[], sourceFolder: string, destinationFolder: string) => void;
|
|
56
|
+
onCopyFiles: (items: DialCopiedItem[], destinationFolder: string) => void;
|
|
57
|
+
cancelCopyMove: () => void;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Manages create-folder, download, delete, rename, copy, and move mutations.
|
|
61
|
+
* Every mutation invalidates the shared listing cache for its affected
|
|
62
|
+
* folders through `invalidateFolders`/`bumpRetry` rather than holding its own
|
|
63
|
+
* cache copy; create-folder additionally uses `mergeCreatedFolder` so a newly
|
|
64
|
+
* created folder appears immediately even when created from a
|
|
65
|
+
* destination-folder popup browsing a different folder than the outer grid.
|
|
66
|
+
*/
|
|
67
|
+
export declare const useDialFileMutations: ({ filesApi, bucket, rootLabel, activeTab, folderPath, currentFolder, sharedRootMetaRef, listingPermissionsCache, invalidateFolders, bumpRetry, mergeCreatedFolder, setFolderPath, onNotification, onOperationSuccess, downloadDestination, forbiddenSymbolsRegExp, }: UseDialFileMutationsOptions) => UseDialFileMutationsResult;
|
|
68
|
+
//# sourceMappingURL=useDialFileMutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDialFileMutations.d.ts","sourceRoot":"","sources":["../../../src/files/useDialFileMutations/useDialFileMutations.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,280 +1,282 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
1
|
+
import { splitFileNameExtension as e } from "../file-name.js";
|
|
2
|
+
import { FileManagerNotificationReason as t, FileNameValidationErrorReason as n, FileOperationKind as r } from "../dial-file-manager.types.js";
|
|
3
|
+
import { RESERVED_MARKER_NAME as i } from "../dial-file-manager.model.js";
|
|
4
|
+
import { formatOperationFolderName as a, getVirtualPathName as o, hasForbiddenNameSymbols as s, parseNewFolderVirtualPath as c, resolveOwnerCoords as l } from "../dial-file-manager-path.util.js";
|
|
5
|
+
import { resolveDialFileApiPath as u, virtualPathToApiPath as d } from "../resolve-dial-file-api-path.js";
|
|
6
|
+
import { prepareCopyItems as f, prepareMoveRenameItems as p } from "../dial-file-manager-copy-move.util.js";
|
|
7
|
+
import { findFirstSuccessfulCopyMoveItem as m } from "../dial-file-manager-mapping.util.js";
|
|
8
|
+
import { DownloadDestinationType as h } from "../download-destination.js";
|
|
9
|
+
import { getParentFolderPath as g } from "@epam/ai-dial-chat-shared";
|
|
10
|
+
import { useCallback as _, useRef as v, useState as y } from "react";
|
|
11
|
+
import { ArchiveItemDtoNodeTypeEnum as b, CopyItemDtoNodeTypeEnum as x, DeleteItemDtoNodeTypeEnum as S, MoveItemDtoNodeTypeEnum as ee, RenameItemDtoNodeTypeEnum as C } from "@epam/ai-dial-chat-api-client";
|
|
12
|
+
import { NOT_ALLOWED_SYMBOLS as te, NotificationVariant as w } from "@epam/ai-dial-ui-kit";
|
|
13
|
+
import { DialFileManagerTabs as T, DialFileNodeType as E } from "@epam/ai-dial-react-file-manager";
|
|
13
14
|
//#region src/files/useDialFileMutations/useDialFileMutations.ts
|
|
14
|
-
var
|
|
15
|
-
let [ne,
|
|
16
|
-
let
|
|
17
|
-
if (!e || e.trim() === "")
|
|
18
|
-
else if (
|
|
19
|
-
reason:
|
|
20
|
-
symbols:
|
|
15
|
+
var D = ({ filesApi: D, bucket: O, rootLabel: k, activeTab: A, folderPath: j, currentFolder: M, sharedRootMetaRef: N, listingPermissionsCache: P, invalidateFolders: F, bumpRetry: I, mergeCreatedFolder: L, setFolderPath: R, onNotification: z, onOperationSuccess: B, downloadDestination: V, forbiddenSymbolsRegExp: H }) => {
|
|
16
|
+
let [ne, U] = y(!1), [re, W] = y(!1), [ie, G] = y(!1), [K, q] = y(!1), [J, Y] = y(!1), [X, ae] = y(!1), Z = v(null), Q = v(null), $ = _((e, t) => {
|
|
17
|
+
let r = null;
|
|
18
|
+
if (!e || e.trim() === "") r = { reason: n.Empty };
|
|
19
|
+
else if (s(e, H)) r = {
|
|
20
|
+
reason: n.ForbiddenSymbols,
|
|
21
|
+
symbols: te
|
|
21
22
|
};
|
|
22
|
-
else if (e ===
|
|
23
|
-
else if (e.length > 255)
|
|
24
|
-
reason:
|
|
23
|
+
else if (e === i) r = { reason: n.ReservedName };
|
|
24
|
+
else if (e.length > 255) r = {
|
|
25
|
+
reason: n.TooLong,
|
|
25
26
|
maxLength: 255
|
|
26
27
|
};
|
|
27
28
|
else {
|
|
28
|
-
let
|
|
29
|
-
o && (
|
|
30
|
-
reason:
|
|
29
|
+
let i = t.items ?? [], a = e.toLowerCase(), o = i.find((e) => e.name.toLowerCase() === a);
|
|
30
|
+
o && (r = {
|
|
31
|
+
reason: n.DuplicateName,
|
|
31
32
|
existingName: o.name
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
return Q.current =
|
|
35
|
-
}, [
|
|
36
|
-
let { parentVirtualPath: a, name: o } =
|
|
37
|
-
id:
|
|
38
|
-
path:
|
|
35
|
+
return Q.current = r, r;
|
|
36
|
+
}, [H]), oe = _(async (e, n, i) => {
|
|
37
|
+
let { parentVirtualPath: a, name: o } = c(n, k), s = d(a, k), u = M && j === s ? M : {
|
|
38
|
+
id: s,
|
|
39
|
+
path: s,
|
|
39
40
|
name: a.split("/").filter(Boolean).pop() ?? "",
|
|
40
|
-
folderId:
|
|
41
|
-
nodeType:
|
|
41
|
+
folderId: s,
|
|
42
|
+
nodeType: E.FOLDER,
|
|
42
43
|
items: []
|
|
43
44
|
}, f = Q.current;
|
|
44
|
-
if (Q.current = null, $(o,
|
|
45
|
-
|
|
46
|
-
let { bucket: p, path: m } =
|
|
47
|
-
bucket:
|
|
48
|
-
path:
|
|
45
|
+
if (Q.current = null, $(o, u) || f) return;
|
|
46
|
+
U(!0);
|
|
47
|
+
let { bucket: p, path: m } = A === T.Shared ? l(s, N.current, O) : {
|
|
48
|
+
bucket: O,
|
|
49
|
+
path: s
|
|
49
50
|
};
|
|
50
51
|
try {
|
|
51
|
-
|
|
52
|
+
L(s, await D.createFolder({
|
|
52
53
|
bucket: p,
|
|
53
54
|
parentPath: m,
|
|
54
55
|
name: o
|
|
55
|
-
}),
|
|
56
|
-
kind:
|
|
56
|
+
}), P.get(s)), I(), B?.({
|
|
57
|
+
kind: r.FolderCreated,
|
|
57
58
|
name: o
|
|
58
59
|
});
|
|
59
60
|
} catch {
|
|
60
|
-
|
|
61
|
-
variant:
|
|
62
|
-
reason:
|
|
61
|
+
z?.({
|
|
62
|
+
variant: w.Error,
|
|
63
|
+
reason: t.FolderCreateFailed
|
|
63
64
|
});
|
|
64
65
|
} finally {
|
|
65
|
-
|
|
66
|
+
U(!1);
|
|
66
67
|
}
|
|
67
68
|
}, [
|
|
68
|
-
|
|
69
|
+
A,
|
|
70
|
+
O,
|
|
71
|
+
M,
|
|
69
72
|
D,
|
|
70
73
|
j,
|
|
71
|
-
E,
|
|
72
|
-
A,
|
|
73
74
|
$,
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
k,
|
|
76
|
+
P,
|
|
77
|
+
L,
|
|
76
78
|
I,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
]), oe = g((t) => {
|
|
79
|
+
B,
|
|
80
|
+
N,
|
|
81
|
+
z
|
|
82
|
+
]), se = _((e) => {
|
|
82
83
|
(async () => {
|
|
83
|
-
|
|
84
|
+
W(!0);
|
|
84
85
|
try {
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
87
|
-
if (
|
|
88
|
-
let
|
|
89
|
-
if (!
|
|
90
|
-
let i =
|
|
86
|
+
let t = e.length === 1 ? e[0].nodeType === E.ITEM ? e[0].name : `${e[0].name}.zip` : "files.zip", n = await V.resolveDestination(t, e.length === 1 && e[0].nodeType === E.ITEM ? e[0].contentType ?? "application/octet-stream" : "application/zip");
|
|
87
|
+
if (n.type === h.Cancelled) return;
|
|
88
|
+
if (e.length === 1 && e[0].nodeType === E.ITEM) {
|
|
89
|
+
let t = e[0];
|
|
90
|
+
if (!t.bucket) throw Error("File is missing bucket");
|
|
91
|
+
let i = u(t, t.bucket, k), a = await D.downloadFile(t.bucket, i);
|
|
91
92
|
if (!a.ok) throw Error(`Download failed with status ${a.status}`);
|
|
92
|
-
let o = await
|
|
93
|
-
|
|
94
|
-
kind:
|
|
93
|
+
let o = await V.triggerDownload(a, t.name, n);
|
|
94
|
+
B?.({
|
|
95
|
+
kind: r.FileDownloaded,
|
|
95
96
|
name: o,
|
|
96
97
|
count: 1
|
|
97
98
|
});
|
|
98
99
|
} else {
|
|
99
|
-
let i =
|
|
100
|
-
bucket: e.bucket ??
|
|
101
|
-
path:
|
|
100
|
+
let i = e.map((e) => ({
|
|
101
|
+
bucket: e.bucket ?? O,
|
|
102
|
+
path: u(e, e.bucket ?? O, k),
|
|
102
103
|
name: e.name,
|
|
103
|
-
nodeType: e.nodeType ===
|
|
104
|
-
})), a = await
|
|
104
|
+
nodeType: e.nodeType === E.FOLDER ? b.Folder : b.Item
|
|
105
|
+
})), a = await D.downloadArchive(i);
|
|
105
106
|
if (!a.ok) throw Error(`Download failed with status ${a.status}`);
|
|
106
|
-
let o = await
|
|
107
|
-
|
|
108
|
-
kind:
|
|
107
|
+
let o = await V.triggerDownload(a, t, n);
|
|
108
|
+
e.length === 1 ? B?.({
|
|
109
|
+
kind: r.FileDownloaded,
|
|
109
110
|
name: o
|
|
110
|
-
}) :
|
|
111
|
-
kind:
|
|
112
|
-
count:
|
|
111
|
+
}) : B?.({
|
|
112
|
+
kind: r.FilesDownloaded,
|
|
113
|
+
count: e.length
|
|
113
114
|
});
|
|
114
115
|
}
|
|
115
116
|
} catch {
|
|
116
|
-
|
|
117
|
-
variant:
|
|
118
|
-
reason:
|
|
117
|
+
z?.({
|
|
118
|
+
variant: w.Error,
|
|
119
|
+
reason: e.length === 1 ? t.DownloadFileFailed : t.DownloadFilesFailed
|
|
119
120
|
});
|
|
120
121
|
} finally {
|
|
121
|
-
|
|
122
|
+
W(!1);
|
|
122
123
|
}
|
|
123
124
|
})();
|
|
124
125
|
}, [
|
|
125
|
-
D,
|
|
126
126
|
O,
|
|
127
|
+
k,
|
|
128
|
+
B,
|
|
127
129
|
z,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
let t = e.nodeType === T.FOLDER, n = u(e.sourceUrl, O), i = t ? n : n.replace(/\/$/, "");
|
|
130
|
+
D,
|
|
131
|
+
V
|
|
132
|
+
]), ce = _((e, n) => {
|
|
133
|
+
e.length !== 0 && (async () => {
|
|
134
|
+
G(!0);
|
|
135
|
+
let r = [], i = e.map((e) => {
|
|
136
|
+
let t = e.nodeType === E.FOLDER, n = d(e.sourceUrl, k), i = t ? n : n.replace(/\/$/, "");
|
|
136
137
|
t && i !== "" && r.push(i.endsWith("/") ? i : `${i}/`);
|
|
137
|
-
let
|
|
138
|
-
bucket:
|
|
138
|
+
let a = o(e.sourceUrl, i), { bucket: s, path: c } = A === T.Shared ? l(i, N.current, O) : {
|
|
139
|
+
bucket: O,
|
|
139
140
|
path: i
|
|
140
141
|
};
|
|
141
142
|
return {
|
|
142
143
|
bucket: s,
|
|
143
|
-
path:
|
|
144
|
-
name:
|
|
145
|
-
nodeType: t ?
|
|
144
|
+
path: c,
|
|
145
|
+
name: a,
|
|
146
|
+
nodeType: t ? S.Folder : S.Item
|
|
146
147
|
};
|
|
147
148
|
});
|
|
148
149
|
try {
|
|
149
|
-
let { results:
|
|
150
|
-
if (o > 0 &&
|
|
151
|
-
variant:
|
|
152
|
-
reason:
|
|
150
|
+
let { results: e } = await D.deleteFiles(i), r = e.filter((e) => !e.success), a = r.length, o = e.length - a, s = e.find((e) => e.success), c = i.find((e) => e.path === s?.path) ?? i[0];
|
|
151
|
+
if (o > 0 && z?.({
|
|
152
|
+
variant: w.Success,
|
|
153
|
+
reason: t.FilesDeleted,
|
|
153
154
|
count: o,
|
|
154
155
|
name: c?.name,
|
|
155
|
-
folder: n ||
|
|
156
|
+
folder: n || k
|
|
156
157
|
}), a > 0) {
|
|
157
|
-
let
|
|
158
|
-
|
|
159
|
-
variant:
|
|
160
|
-
reason:
|
|
161
|
-
names:
|
|
158
|
+
let e = r.slice(0, 3).map((e) => i.find((t) => t.path === e.path)?.name ?? e.path), n = a - e.length;
|
|
159
|
+
z?.({
|
|
160
|
+
variant: w.Error,
|
|
161
|
+
reason: t.FilesDeletePartiallyFailed,
|
|
162
|
+
names: e,
|
|
162
163
|
restCount: n
|
|
163
164
|
});
|
|
164
165
|
}
|
|
165
166
|
} catch {
|
|
166
|
-
|
|
167
|
-
variant:
|
|
168
|
-
reason:
|
|
167
|
+
z?.({
|
|
168
|
+
variant: w.Error,
|
|
169
|
+
reason: t.DeleteFailed
|
|
169
170
|
});
|
|
170
171
|
}
|
|
171
|
-
|
|
172
|
-
if (e.nodeType ===
|
|
172
|
+
F([...new Set(i.map((e) => {
|
|
173
|
+
if (e.nodeType === S.Folder) return e.path.endsWith("/") ? e.path : `${e.path}/`;
|
|
173
174
|
let t = e.path.lastIndexOf("/");
|
|
174
175
|
return t > 0 ? e.path.slice(0, t + 1) : "";
|
|
175
176
|
}))]);
|
|
176
|
-
let
|
|
177
|
-
|
|
177
|
+
let a = r.filter((e) => j.startsWith(e)).reduce((e, t) => e == null || t.length < e.length ? t : e, void 0);
|
|
178
|
+
a != null && R(g(a)), I(), G(!1);
|
|
178
179
|
})();
|
|
179
180
|
}, [
|
|
181
|
+
A,
|
|
182
|
+
O,
|
|
180
183
|
k,
|
|
184
|
+
j,
|
|
185
|
+
z,
|
|
181
186
|
D,
|
|
182
|
-
|
|
183
|
-
A,
|
|
184
|
-
R,
|
|
185
|
-
E,
|
|
186
|
-
M,
|
|
187
|
-
P,
|
|
187
|
+
N,
|
|
188
188
|
F,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
if (
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
189
|
+
I,
|
|
190
|
+
R
|
|
191
|
+
]), le = _((t, r) => {
|
|
192
|
+
if (!t || t.trim() === "") return { reason: n.Empty };
|
|
193
|
+
let a = r.nodeType === E.ITEM ? e(r.name).extension : "";
|
|
194
|
+
if (t === i || a !== "" && t === `${i}${a}`) return { reason: n.ReservedName };
|
|
195
|
+
if (s(t, H)) return {
|
|
196
|
+
reason: n.ForbiddenSymbols,
|
|
197
|
+
symbols: te
|
|
196
198
|
};
|
|
197
|
-
if (
|
|
198
|
-
reason:
|
|
199
|
+
if (t.length > 255) return {
|
|
200
|
+
reason: n.TooLong,
|
|
199
201
|
maxLength: 255
|
|
200
202
|
};
|
|
201
|
-
let
|
|
202
|
-
return
|
|
203
|
-
reason:
|
|
204
|
-
existingName:
|
|
203
|
+
let o = M?.items ?? [], c = t.toLowerCase(), l = o.find((e) => e.path !== r.path && e.name.toLowerCase() === c);
|
|
204
|
+
return l ? {
|
|
205
|
+
reason: n.DuplicateName,
|
|
206
|
+
existingName: l.name
|
|
205
207
|
} : null;
|
|
206
|
-
}, [
|
|
207
|
-
if (
|
|
208
|
-
let
|
|
209
|
-
Z.current =
|
|
210
|
-
|
|
211
|
-
let o =
|
|
208
|
+
}, [H, M]), ue = _((e, n) => {
|
|
209
|
+
if (e.length === 0 || J || X) return;
|
|
210
|
+
let i = new AbortController();
|
|
211
|
+
Z.current = i, (async () => {
|
|
212
|
+
Y(!0);
|
|
213
|
+
let o = f(e, O, k), s = o.map(({ dto: e }) => e);
|
|
212
214
|
try {
|
|
213
|
-
let { results:
|
|
215
|
+
let { results: e } = await D.copyFiles(s, i.signal), c = e.filter((e) => !e.success).length, l = e.length - c;
|
|
214
216
|
if (l > 0) {
|
|
215
|
-
let
|
|
216
|
-
c =
|
|
217
|
+
let t = m(o, e), i = s.every((e) => g(e.sourcePath) === g(e.destinationPath)), c;
|
|
218
|
+
c = i ? l === 1 ? r.FileDuplicated : r.FilesDuplicated : l === 1 ? r.FileCopied : r.FilesCopied, B?.({
|
|
217
219
|
kind: c,
|
|
218
|
-
name:
|
|
220
|
+
name: t?.destinationName,
|
|
219
221
|
count: l,
|
|
220
|
-
isFolder:
|
|
221
|
-
destinationFolderName:
|
|
222
|
+
isFolder: t?.dto.nodeType === x.Folder,
|
|
223
|
+
destinationFolderName: a(n, k)
|
|
222
224
|
});
|
|
223
225
|
}
|
|
224
|
-
c > 0 && c <
|
|
225
|
-
variant:
|
|
226
|
-
reason:
|
|
226
|
+
c > 0 && c < e.length ? z?.({
|
|
227
|
+
variant: w.Error,
|
|
228
|
+
reason: t.CopyPartiallyFailed,
|
|
227
229
|
count: c
|
|
228
|
-
}) : c ===
|
|
229
|
-
variant:
|
|
230
|
-
reason:
|
|
230
|
+
}) : c === e.length && z?.({
|
|
231
|
+
variant: w.Error,
|
|
232
|
+
reason: t.CopyFailed
|
|
231
233
|
});
|
|
232
234
|
} catch {
|
|
233
|
-
|
|
234
|
-
variant:
|
|
235
|
-
reason:
|
|
235
|
+
i.signal.aborted || z?.({
|
|
236
|
+
variant: w.Error,
|
|
237
|
+
reason: t.CopyFailed
|
|
236
238
|
});
|
|
237
239
|
} finally {
|
|
238
|
-
|
|
240
|
+
F([...new Set(s.flatMap((e) => [g(e.sourcePath), g(e.destinationPath)]))]), I(), Y(!1), Z.current = null;
|
|
239
241
|
}
|
|
240
242
|
})();
|
|
241
243
|
}, [
|
|
242
|
-
D,
|
|
243
244
|
O,
|
|
244
|
-
|
|
245
|
+
k,
|
|
245
246
|
z,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
F
|
|
251
|
-
|
|
247
|
+
B,
|
|
248
|
+
D,
|
|
249
|
+
J,
|
|
250
|
+
X,
|
|
251
|
+
F,
|
|
252
|
+
I
|
|
253
|
+
]), de = _(() => {
|
|
252
254
|
Z.current?.abort();
|
|
253
255
|
}, []);
|
|
254
256
|
return {
|
|
255
257
|
isCreatingFolder: ne,
|
|
256
258
|
isDownloading: re,
|
|
257
259
|
isDeleting: ie,
|
|
258
|
-
isRenaming:
|
|
259
|
-
isCopying:
|
|
260
|
-
isMoving:
|
|
261
|
-
onCreateFolder:
|
|
260
|
+
isRenaming: K,
|
|
261
|
+
isCopying: J,
|
|
262
|
+
isMoving: X,
|
|
263
|
+
onCreateFolder: oe,
|
|
262
264
|
onCreateFolderValidate: $,
|
|
263
|
-
onDownloadFiles:
|
|
264
|
-
onDeleteFiles:
|
|
265
|
-
onRenameValidate:
|
|
266
|
-
onMoveToFiles:
|
|
267
|
-
if (
|
|
268
|
-
let { renameDtos: s, preparedMoveItems: c } =
|
|
265
|
+
onDownloadFiles: se,
|
|
266
|
+
onDeleteFiles: ce,
|
|
267
|
+
onRenameValidate: le,
|
|
268
|
+
onMoveToFiles: _((e, n, i) => {
|
|
269
|
+
if (e.length === 0 || J || X || K) return;
|
|
270
|
+
let { renameDtos: s, preparedMoveItems: c } = p(e, O, k), l = c.map(({ dto: e }) => e), u = new AbortController();
|
|
269
271
|
l.length > 0 && (Z.current = u), (async () => {
|
|
270
|
-
s.length > 0 &&
|
|
271
|
-
let [
|
|
272
|
+
s.length > 0 && q(!0), l.length > 0 && ae(!0);
|
|
273
|
+
let [e, n] = await Promise.all([(async () => {
|
|
272
274
|
if (s.length === 0) return {
|
|
273
275
|
results: [],
|
|
274
276
|
threw: !1
|
|
275
277
|
};
|
|
276
278
|
try {
|
|
277
|
-
let { results: e } = await
|
|
279
|
+
let { results: e } = await D.renameFiles(s);
|
|
278
280
|
return {
|
|
279
281
|
results: e,
|
|
280
282
|
threw: !1
|
|
@@ -292,7 +294,7 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
292
294
|
aborted: !1
|
|
293
295
|
};
|
|
294
296
|
try {
|
|
295
|
-
let { results: e } = await
|
|
297
|
+
let { results: e } = await D.moveFiles(l, u.signal);
|
|
296
298
|
return {
|
|
297
299
|
results: e,
|
|
298
300
|
threw: !1,
|
|
@@ -305,60 +307,60 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
305
307
|
aborted: u.signal.aborted
|
|
306
308
|
};
|
|
307
309
|
}
|
|
308
|
-
})()]), d =
|
|
310
|
+
})()]), d = e.threw ? s.length : e.results.filter((e) => !e.success).length, f = n.threw && n.aborted, p = f ? 0 : l.length, h = f ? 0 : n.threw ? l.length : n.results.filter((e) => !e.success).length, _ = n.threw ? 0 : n.results.filter((e) => e.success).length, v = s.length + p, y = d + h, b = h > 0;
|
|
309
311
|
if (_ > 0) {
|
|
310
|
-
let e =
|
|
311
|
-
|
|
312
|
-
kind: _ === 1 ?
|
|
312
|
+
let e = m(c, n.results);
|
|
313
|
+
B?.({
|
|
314
|
+
kind: _ === 1 ? r.FileMoved : r.FilesMoved,
|
|
313
315
|
name: e?.destinationName,
|
|
314
316
|
count: _,
|
|
315
317
|
isFolder: e?.dto.nodeType === ee.Folder,
|
|
316
|
-
destinationFolderName: i
|
|
318
|
+
destinationFolderName: a(i, k)
|
|
317
319
|
});
|
|
318
320
|
}
|
|
319
321
|
if (s.length === 1 && d === 0) {
|
|
320
322
|
let [e] = s;
|
|
321
|
-
|
|
322
|
-
kind:
|
|
323
|
-
name:
|
|
324
|
-
isFolder: e.nodeType ===
|
|
323
|
+
B?.({
|
|
324
|
+
kind: r.FileRenamed,
|
|
325
|
+
name: o(e.destinationPath, e.destinationPath),
|
|
326
|
+
isFolder: e.nodeType === C.Folder
|
|
325
327
|
});
|
|
326
328
|
}
|
|
327
|
-
y > 0 && (y === v ?
|
|
328
|
-
variant:
|
|
329
|
-
reason: b ?
|
|
330
|
-
}) :
|
|
331
|
-
variant:
|
|
332
|
-
reason: b ?
|
|
329
|
+
y > 0 && (y === v ? z?.({
|
|
330
|
+
variant: w.Error,
|
|
331
|
+
reason: b ? t.MoveFailed : t.RenameFailed
|
|
332
|
+
}) : z?.({
|
|
333
|
+
variant: w.Error,
|
|
334
|
+
reason: b ? t.MovePartiallyFailed : t.RenamePartiallyFailed,
|
|
333
335
|
count: y
|
|
334
336
|
}));
|
|
335
|
-
let x = s.find((
|
|
337
|
+
let x = s.find((t) => t.nodeType === C.Folder && e.results.some((e) => e.success && e.sourcePath === t.sourcePath));
|
|
336
338
|
if (x != null) {
|
|
337
339
|
let e = x.sourcePath.endsWith("/") ? x.sourcePath : `${x.sourcePath}/`;
|
|
338
|
-
if (
|
|
340
|
+
if (j === e || j.startsWith(e)) {
|
|
339
341
|
let t = x.destinationPath.endsWith("/") ? x.destinationPath : `${x.destinationPath}/`;
|
|
340
|
-
|
|
342
|
+
R(j.replace(e, t));
|
|
341
343
|
}
|
|
342
344
|
}
|
|
343
|
-
|
|
345
|
+
F([...new Set([...s, ...l].flatMap((e) => [g(e.sourcePath), g(e.destinationPath)]))]), I(), q(!1), ae(!1), l.length > 0 && (Z.current = null);
|
|
344
346
|
})();
|
|
345
347
|
}, [
|
|
346
|
-
D,
|
|
347
348
|
O,
|
|
348
|
-
|
|
349
|
+
k,
|
|
350
|
+
j,
|
|
351
|
+
B,
|
|
349
352
|
z,
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
G,
|
|
355
|
-
P,
|
|
353
|
+
D,
|
|
354
|
+
J,
|
|
355
|
+
X,
|
|
356
|
+
K,
|
|
356
357
|
F,
|
|
357
|
-
|
|
358
|
+
I,
|
|
359
|
+
R
|
|
358
360
|
]),
|
|
359
|
-
onCopyFiles:
|
|
360
|
-
cancelCopyMove:
|
|
361
|
+
onCopyFiles: ue,
|
|
362
|
+
cancelCopyMove: de
|
|
361
363
|
};
|
|
362
364
|
};
|
|
363
365
|
//#endregion
|
|
364
|
-
export {
|
|
366
|
+
export { D as useDialFileMutations };
|