From 3017b997cd0c985421a33b92658d1e1c446346ef Mon Sep 17 00:00:00 2001 From: Lave Gupta Date: Wed, 28 Jun 2023 18:29:56 +0530 Subject: [PATCH] PREAPPS-7343: changed build-shim file to export components and functions for zimlet --- build-shims.js | 11 ++++++++--- src/shims/@zimbra-client/components/index.js | 1 + src/shims/@zimbra-client/constants/index.js | 1 + src/shims/@zimbra-client/graphql/index.js | 1 + src/shims/@zimbra-client/hooks/graphql/index.js | 1 + src/shims/@zimbra-client/util/index.js | 1 + 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/build-shims.js b/build-shims.js index 6caa0ab..1bb0461 100644 --- a/build-shims.js +++ b/build-shims.js @@ -29,7 +29,8 @@ mockery.registerMock('@zimbra-client/util', { zimletEventEmitter: 1, smimeHandler: 1, isServerSMIMEFeatureAvailable: 1, - htmlToText: 1 + htmlToText: 1, + flattenFolders: 1 }); mockery.registerMock('@zimbra-client/browser', { @@ -82,6 +83,7 @@ mockery.registerMock('@zimbra-client/graphql', { withTagCreate: 1, withTagAction: 1, SearchFragment: 1, + GetFolder: 1, SendShareNotificationMutation: 1, SetMailboxMetadataMutation: 1, withDataSources: 1, @@ -104,6 +106,7 @@ mockery.registerMock('@zimbra-client/constants', { PARTICIPATION_STATUS: 1, supportedMimes: 1, ZIMBRA_ZIMLET_EVENTS: 1, + USER_FOLDER_IDS: 1 }); mockery.registerMock('@zimbra-client/hooks', { @@ -119,7 +122,8 @@ mockery.registerMock('@zimbra-client/hooks/graphql', { useAccountInfo: 1, useDocumentAction: 1, useBriefcaseFoldersQuery: 1, - useSaveDocumentMutation: 1 + useSaveDocumentMutation: 1, + useCreateFolderMutation: 1 }); mockery.registerMock('@zimbra-client/blocks', { @@ -201,7 +205,8 @@ mockery.registerMock('@zimbra-client/components', { SMIMEOperationDropDown: 1, ErrorAlert: 1, SignatureBox: 1, - DeleteWrapper: 1 + DeleteWrapper: 1, + ToolbarActionButton: 1 }); mockery.registerMock('@zimbra-client/errors', { diff --git a/src/shims/@zimbra-client/components/index.js b/src/shims/@zimbra-client/components/index.js index 5ed9f63..0788b79 100644 --- a/src/shims/@zimbra-client/components/index.js +++ b/src/shims/@zimbra-client/components/index.js @@ -58,5 +58,6 @@ export const SMIMEOperationDropDown = wrap('SMIMEOperationDropDown'); export const ErrorAlert = wrap('ErrorAlert'); export const SignatureBox = wrap('SignatureBox'); export const DeleteWrapper = wrap('DeleteWrapper'); +export const ToolbarActionButton = wrap('ToolbarActionButton'); export default global.shims['@zimbra-client/components']; diff --git a/src/shims/@zimbra-client/constants/index.js b/src/shims/@zimbra-client/constants/index.js index 84c3a7b..257255b 100644 --- a/src/shims/@zimbra-client/constants/index.js +++ b/src/shims/@zimbra-client/constants/index.js @@ -11,5 +11,6 @@ export const ATTENDEE_ROLE = wrap('ATTENDEE_ROLE'); export const PARTICIPATION_STATUS = wrap('PARTICIPATION_STATUS'); export const supportedMimes = wrap('supportedMimes'); export const ZIMBRA_ZIMLET_EVENTS = wrap('ZIMBRA_ZIMLET_EVENTS'); +export const USER_FOLDER_IDS = wrap('USER_FOLDER_IDS'); export default global.shims['@zimbra-client/constants']; diff --git a/src/shims/@zimbra-client/graphql/index.js b/src/shims/@zimbra-client/graphql/index.js index 5f87129..68bc6e6 100644 --- a/src/shims/@zimbra-client/graphql/index.js +++ b/src/shims/@zimbra-client/graphql/index.js @@ -31,6 +31,7 @@ export const withTags = wrap('withTags'); export const withTagCreate = wrap('withTagCreate'); export const withTagAction = wrap('withTagAction'); export const SearchFragment = wrap('SearchFragment'); +export const GetFolder = wrap('GetFolder'); export const SendShareNotificationMutation = wrap('SendShareNotificationMutation'); export const SetMailboxMetadataMutation = wrap('SetMailboxMetadataMutation'); export const withDataSources = wrap('withDataSources'); diff --git a/src/shims/@zimbra-client/hooks/graphql/index.js b/src/shims/@zimbra-client/hooks/graphql/index.js index 7c1eb1b..6a65879 100644 --- a/src/shims/@zimbra-client/hooks/graphql/index.js +++ b/src/shims/@zimbra-client/hooks/graphql/index.js @@ -12,5 +12,6 @@ export const useAccountInfo = wrap('useAccountInfo'); export const useDocumentAction = wrap('useDocumentAction'); export const useBriefcaseFoldersQuery = wrap('useBriefcaseFoldersQuery'); export const useSaveDocumentMutation = wrap('useSaveDocumentMutation'); +export const useCreateFolderMutation = wrap('useCreateFolderMutation'); export default global.shims['@zimbra-client/hooks/graphql']; diff --git a/src/shims/@zimbra-client/util/index.js b/src/shims/@zimbra-client/util/index.js index 5557940..ffb6bd4 100644 --- a/src/shims/@zimbra-client/util/index.js +++ b/src/shims/@zimbra-client/util/index.js @@ -18,5 +18,6 @@ export const zimletEventEmitter = wrap('zimletEventEmitter'); export const smimeHandler = wrap('smimeHandler'); export const isServerSMIMEFeatureAvailable = wrap('isServerSMIMEFeatureAvailable'); export const htmlToText = wrap('htmlToText'); +export const flattenFolders = wrap('flattenFolders'); export default global.shims['@zimbra-client/util'];