botframework-webchat-api 4.18.1-main.20260511.8fcd02a → 4.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/decorator.js +1 -1
- package/dist/botframework-webchat-api.d.mts +1250 -173
- package/dist/botframework-webchat-api.decorator.d.mts +26 -71
- package/dist/botframework-webchat-api.decorator.mjs +2 -1
- package/dist/botframework-webchat-api.decorator.mjs.LEGAL.txt +0 -0
- package/dist/botframework-webchat-api.decorator.mjs.map +1 -1
- package/dist/botframework-webchat-api.internal.d.mts +1 -66
- package/dist/botframework-webchat-api.internal.mjs +2 -1
- package/dist/botframework-webchat-api.internal.mjs.LEGAL.txt +0 -0
- package/dist/botframework-webchat-api.internal.mjs.map +1 -1
- package/dist/botframework-webchat-api.mjs +139 -1
- package/dist/botframework-webchat-api.mjs.LEGAL.txt +27 -2
- package/dist/botframework-webchat-api.mjs.map +1 -1
- package/dist/chunk-2S76JUVM.mjs +3 -0
- package/dist/chunk-2S76JUVM.mjs.LEGAL.txt +0 -0
- package/dist/chunk-2S76JUVM.mjs.map +1 -0
- package/dist/{chunk-VAX7AB37.mjs → chunk-J6D5YEY6.mjs} +2 -1
- package/dist/chunk-J6D5YEY6.mjs.LEGAL.txt +0 -0
- package/dist/chunk-ZAMHKQQC.mjs +3 -0
- package/dist/chunk-ZAMHKQQC.mjs.LEGAL.txt +0 -0
- package/dist/chunk-ZAMHKQQC.mjs.map +1 -0
- package/dist/metafile-esm.json +1 -1
- package/internal.js +1 -1
- package/lib/StyleOptions.d.ts +697 -0
- package/lib/StyleOptions.d.ts.map +1 -0
- package/lib/StyleOptions.js +2 -0
- package/lib/decorator/index.d.ts +5 -0
- package/lib/decorator/index.d.ts.map +1 -0
- package/lib/decorator/index.js +28 -0
- package/lib/decorator/private/ActivityBorderDecoratorMiddleware.d.ts +27 -0
- package/lib/decorator/private/ActivityBorderDecoratorMiddleware.d.ts.map +1 -0
- package/lib/decorator/private/ActivityBorderDecoratorMiddleware.js +19 -0
- package/lib/decorator/private/ActivityDecorator.d.ts +9 -0
- package/lib/decorator/private/ActivityDecorator.d.ts.map +1 -0
- package/lib/decorator/private/ActivityDecorator.js +36 -0
- package/lib/decorator/private/DecoratorComposer.d.ts +3 -0
- package/lib/decorator/private/DecoratorComposer.d.ts.map +1 -0
- package/lib/decorator/private/DecoratorComposer.js +13 -0
- package/lib/decorator/private/activityDecoratorRequest.d.ts +6 -0
- package/lib/decorator/private/activityDecoratorRequest.d.ts.map +1 -0
- package/lib/decorator/private/activityDecoratorRequest.js +2 -0
- package/lib/decorator/private/createDecoratorComposer.d.ts +11 -0
- package/lib/decorator/private/createDecoratorComposer.d.ts.map +1 -0
- package/lib/decorator/private/createDecoratorComposer.js +27 -0
- package/lib/decorator/private/templateMiddleware.d.ts +30 -0
- package/lib/decorator/private/templateMiddleware.d.ts.map +1 -0
- package/lib/decorator/private/templateMiddleware.js +53 -0
- package/lib/decorator/private/templateMiddleware.test.d.ts +3 -0
- package/lib/decorator/private/templateMiddleware.test.d.ts.map +1 -0
- package/lib/defaultStyleOptions.d.ts +4 -0
- package/lib/defaultStyleOptions.d.ts.map +1 -0
- package/lib/defaultStyleOptions.js +277 -0
- package/lib/external/PrecompiledGlobalize.js +6361 -0
- package/lib/hooks/Composer.d.ts +88 -0
- package/lib/hooks/Composer.d.ts.map +1 -0
- package/lib/hooks/Composer.js +605 -0
- package/lib/hooks/index.d.ts +73 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +504 -0
- package/lib/hooks/internal/ErrorBox.js +47 -0
- package/lib/hooks/internal/SendBoxMiddleware.d.ts +37 -0
- package/lib/hooks/internal/SendBoxMiddleware.d.ts.map +1 -0
- package/lib/hooks/internal/SendBoxMiddleware.js +17 -0
- package/lib/hooks/internal/SendBoxToolbarMiddleware.d.ts +37 -0
- package/lib/hooks/internal/SendBoxToolbarMiddleware.d.ts.map +1 -0
- package/lib/hooks/internal/SendBoxToolbarMiddleware.js +17 -0
- package/lib/hooks/internal/Tracker.d.ts +4 -0
- package/lib/hooks/internal/Tracker.d.ts.map +1 -0
- package/lib/hooks/internal/Tracker.js +15 -0
- package/lib/hooks/internal/WebChatAPIContext.d.ts +80 -0
- package/lib/hooks/internal/WebChatAPIContext.d.ts.map +1 -0
- package/lib/hooks/internal/WebChatAPIContext.js +12 -0
- package/lib/hooks/internal/WebChatReduxContext.js +17 -0
- package/lib/hooks/internal/defaultSelectVoice.js +28 -0
- package/lib/hooks/internal/private/templateMiddleware.d.ts +3 -0
- package/lib/hooks/internal/private/templateMiddleware.d.ts.map +1 -0
- package/lib/hooks/internal/private/templateMiddleware.js +12 -0
- package/lib/hooks/internal/useCreateActivityRendererInternal.d.ts +4 -0
- package/lib/hooks/internal/useCreateActivityRendererInternal.d.ts.map +1 -0
- package/lib/hooks/internal/useCreateActivityRendererInternal.js +37 -0
- package/lib/hooks/internal/useDebugDeps.js +39 -0
- package/lib/hooks/internal/useDirFromProps.js +12 -0
- package/lib/hooks/internal/useErrorBoxClass.js +14 -0
- package/lib/hooks/internal/useForceRender.js +24 -0
- package/lib/hooks/internal/useLocalizedGlobalize.js +12 -0
- package/lib/hooks/internal/useLocalizedStrings.js +14 -0
- package/lib/hooks/internal/useMarkActivity.js +12 -0
- package/lib/hooks/internal/usePrevious.d.ts +3 -0
- package/lib/hooks/internal/usePrevious.d.ts.map +1 -0
- package/lib/hooks/internal/usePrevious.js +15 -0
- package/lib/hooks/internal/useReadTelemetryDimensions.js +20 -0
- package/lib/hooks/internal/useSetDictateState.d.ts +2 -0
- package/lib/hooks/internal/useSetDictateState.d.ts.map +1 -0
- package/lib/hooks/internal/useSetDictateState.js +12 -0
- package/lib/hooks/internal/useTimer.d.ts +5 -0
- package/lib/hooks/internal/useTimer.d.ts.map +1 -0
- package/lib/hooks/internal/useTimer.js +43 -0
- package/lib/hooks/internal/useTracker.js +42 -0
- package/lib/hooks/internal/useValueRef.d.ts +3 -0
- package/lib/hooks/internal/useValueRef.d.ts.map +1 -0
- package/lib/hooks/internal/useValueRef.js +22 -0
- package/lib/hooks/internal/useWebChatAPIContext.d.ts +83 -0
- package/lib/hooks/internal/useWebChatAPIContext.d.ts.map +1 -0
- package/lib/hooks/internal/useWebChatAPIContext.js +17 -0
- package/lib/hooks/middleware/UserlandBoundary.js +48 -0
- package/lib/hooks/middleware/applyMiddleware.js +122 -0
- package/lib/hooks/middleware/concatMiddleware.d.ts +6 -0
- package/lib/hooks/middleware/concatMiddleware.d.ts.map +1 -0
- package/lib/hooks/middleware/concatMiddleware.js +33 -0
- package/lib/hooks/middleware/createDefaultCardActionMiddleware.d.ts +3 -0
- package/lib/hooks/middleware/createDefaultCardActionMiddleware.d.ts.map +1 -0
- package/lib/hooks/middleware/createDefaultCardActionMiddleware.js +43 -0
- package/lib/hooks/middleware/createDefaultGroupActivitiesMiddleware.d.ts +7 -0
- package/lib/hooks/middleware/createDefaultGroupActivitiesMiddleware.d.ts.map +1 -0
- package/lib/hooks/middleware/createDefaultGroupActivitiesMiddleware.js +68 -0
- package/lib/hooks/private/numberWithInfinity.d.ts +3 -0
- package/lib/hooks/private/numberWithInfinity.d.ts.map +1 -0
- package/lib/hooks/private/numberWithInfinity.js +17 -0
- package/lib/hooks/private/numberWithInfinity.spec.d.ts +2 -0
- package/lib/hooks/private/numberWithInfinity.spec.d.ts.map +1 -0
- package/lib/hooks/private/reduceIterable.d.ts +2 -0
- package/lib/hooks/private/reduceIterable.d.ts.map +1 -0
- package/lib/hooks/private/reduceIterable.js +26 -0
- package/lib/hooks/private/reduceIterable.spec.d.ts +2 -0
- package/lib/hooks/private/reduceIterable.spec.d.ts.map +1 -0
- package/lib/hooks/useActiveTyping.d.ts +4 -0
- package/lib/hooks/useActiveTyping.d.ts.map +1 -0
- package/lib/hooks/useActiveTyping.js +81 -0
- package/lib/hooks/useActivities.d.ts +3 -0
- package/lib/hooks/useActivities.d.ts.map +1 -0
- package/lib/hooks/useActivities.js +14 -0
- package/lib/hooks/useActivityKeys.d.ts +3 -0
- package/lib/hooks/useActivityKeys.d.ts.map +1 -0
- package/lib/hooks/useActivityKeys.js +11 -0
- package/lib/hooks/useActivityKeysByRead.d.ts +3 -0
- package/lib/hooks/useActivityKeysByRead.d.ts.map +1 -0
- package/lib/hooks/useActivityKeysByRead.js +11 -0
- package/lib/hooks/useAvatarForBot.d.ts +5 -0
- package/lib/hooks/useAvatarForBot.d.ts.map +1 -0
- package/lib/hooks/useAvatarForBot.js +26 -0
- package/lib/hooks/useAvatarForUser.d.ts +5 -0
- package/lib/hooks/useAvatarForUser.d.ts.map +1 -0
- package/lib/hooks/useAvatarForUser.js +26 -0
- package/lib/hooks/useByteFormatter.d.ts +2 -0
- package/lib/hooks/useByteFormatter.d.ts.map +1 -0
- package/lib/hooks/useByteFormatter.js +43 -0
- package/lib/hooks/useConnectivityStatus.d.ts +2 -0
- package/lib/hooks/useConnectivityStatus.d.ts.map +1 -0
- package/lib/hooks/useConnectivityStatus.js +14 -0
- package/lib/hooks/useCreateActivityRenderer.d.ts +3 -0
- package/lib/hooks/useCreateActivityRenderer.d.ts.map +1 -0
- package/lib/hooks/useCreateActivityRenderer.js +14 -0
- package/lib/hooks/useCreateActivityStatusRenderer.d.ts +10 -0
- package/lib/hooks/useCreateActivityStatusRenderer.d.ts.map +1 -0
- package/lib/hooks/useCreateActivityStatusRenderer.js +72 -0
- package/lib/hooks/useCreateAttachmentForScreenReaderRenderer.d.ts +3 -0
- package/lib/hooks/useCreateAttachmentForScreenReaderRenderer.d.ts.map +1 -0
- package/lib/hooks/useCreateAttachmentForScreenReaderRenderer.js +12 -0
- package/lib/hooks/useCreateAvatarRenderer.d.ts +6 -0
- package/lib/hooks/useCreateAvatarRenderer.d.ts.map +1 -0
- package/lib/hooks/useCreateAvatarRenderer.js +44 -0
- package/lib/hooks/useCreateScrollToEndButtonRenderer.d.ts +3 -0
- package/lib/hooks/useCreateScrollToEndButtonRenderer.d.ts.map +1 -0
- package/lib/hooks/useCreateScrollToEndButtonRenderer.js +12 -0
- package/lib/hooks/useDateFormatter.d.ts +2 -0
- package/lib/hooks/useDateFormatter.d.ts.map +1 -0
- package/lib/hooks/useDateFormatter.js +35 -0
- package/lib/hooks/useDebouncedNotifications.d.ts +13 -0
- package/lib/hooks/useDebouncedNotifications.d.ts.map +1 -0
- package/lib/hooks/useDebouncedNotifications.js +118 -0
- package/lib/hooks/useDictateInterims.d.ts +2 -0
- package/lib/hooks/useDictateInterims.d.ts.map +1 -0
- package/lib/hooks/useDictateInterims.js +16 -0
- package/lib/hooks/useDictateState.d.ts +2 -0
- package/lib/hooks/useDictateState.d.ts.map +1 -0
- package/lib/hooks/useDictateState.js +15 -0
- package/lib/hooks/useDirection.d.ts +2 -0
- package/lib/hooks/useDirection.d.ts.map +1 -0
- package/lib/hooks/useDirection.js +38 -0
- package/lib/hooks/useDisabled.d.ts +2 -0
- package/lib/hooks/useDisabled.d.ts.map +1 -0
- package/lib/hooks/useDisabled.js +12 -0
- package/lib/hooks/useDismissNotification.d.ts +2 -0
- package/lib/hooks/useDismissNotification.d.ts.map +1 -0
- package/lib/hooks/useDismissNotification.js +12 -0
- package/lib/hooks/useEmitTypingIndicator.d.ts +2 -0
- package/lib/hooks/useEmitTypingIndicator.d.ts.map +1 -0
- package/lib/hooks/useEmitTypingIndicator.js +12 -0
- package/lib/hooks/useGetActivitiesByKey.d.ts +3 -0
- package/lib/hooks/useGetActivitiesByKey.d.ts.map +1 -0
- package/lib/hooks/useGetActivitiesByKey.js +11 -0
- package/lib/hooks/useGetActivityByKey.d.ts +3 -0
- package/lib/hooks/useGetActivityByKey.d.ts.map +1 -0
- package/lib/hooks/useGetActivityByKey.js +11 -0
- package/lib/hooks/useGetHasAcknowledgedByActivityKey.d.ts +3 -0
- package/lib/hooks/useGetHasAcknowledgedByActivityKey.d.ts.map +1 -0
- package/lib/hooks/useGetHasAcknowledgedByActivityKey.js +11 -0
- package/lib/hooks/useGetKeyByActivity.d.ts +3 -0
- package/lib/hooks/useGetKeyByActivity.d.ts.map +1 -0
- package/lib/hooks/useGetKeyByActivity.js +11 -0
- package/lib/hooks/useGetKeyByActivityId.d.ts +3 -0
- package/lib/hooks/useGetKeyByActivityId.d.ts.map +1 -0
- package/lib/hooks/useGetKeyByActivityId.js +11 -0
- package/lib/hooks/useGetSendTimeoutForActivity.d.ts +5 -0
- package/lib/hooks/useGetSendTimeoutForActivity.d.ts.map +1 -0
- package/lib/hooks/useGetSendTimeoutForActivity.js +33 -0
- package/lib/hooks/useGrammars.d.ts +2 -0
- package/lib/hooks/useGrammars.d.ts.map +1 -0
- package/lib/hooks/useGrammars.js +12 -0
- package/lib/hooks/useGroupActivities.d.ts +8 -0
- package/lib/hooks/useGroupActivities.d.ts.map +1 -0
- package/lib/hooks/useGroupActivities.js +12 -0
- package/lib/hooks/useGroupTimestamp.d.ts +2 -0
- package/lib/hooks/useGroupTimestamp.d.ts.map +1 -0
- package/lib/hooks/useGroupTimestamp.js +21 -0
- package/lib/hooks/useLanguage.d.ts +2 -0
- package/lib/hooks/useLanguage.d.ts.map +1 -0
- package/lib/hooks/useLanguage.js +19 -0
- package/lib/hooks/useLastAcknowledgedActivityKey.d.ts +3 -0
- package/lib/hooks/useLastAcknowledgedActivityKey.d.ts.map +1 -0
- package/lib/hooks/useLastAcknowledgedActivityKey.js +11 -0
- package/lib/hooks/useLastReadActivityKey.d.ts +3 -0
- package/lib/hooks/useLastReadActivityKey.d.ts.map +1 -0
- package/lib/hooks/useLastReadActivityKey.js +11 -0
- package/lib/hooks/useLocalizer.d.ts +13 -0
- package/lib/hooks/useLocalizer.d.ts.map +1 -0
- package/lib/hooks/useLocalizer.js +75 -0
- package/lib/hooks/useMarkActivityAsSpoken.d.ts +3 -0
- package/lib/hooks/useMarkActivityAsSpoken.d.ts.map +1 -0
- package/lib/hooks/useMarkActivityAsSpoken.js +16 -0
- package/lib/hooks/useMarkActivityKeyAsRead.d.ts +3 -0
- package/lib/hooks/useMarkActivityKeyAsRead.d.ts.map +1 -0
- package/lib/hooks/useMarkActivityKeyAsRead.js +11 -0
- package/lib/hooks/useMarkAllAsAcknowledged.d.ts +3 -0
- package/lib/hooks/useMarkAllAsAcknowledged.d.ts.map +1 -0
- package/lib/hooks/useMarkAllAsAcknowledged.js +11 -0
- package/lib/hooks/useNotifications.d.ts +3 -0
- package/lib/hooks/useNotifications.d.ts.map +1 -0
- package/lib/hooks/useNotifications.js +14 -0
- package/lib/hooks/usePerformCardAction.d.ts +3 -0
- package/lib/hooks/usePerformCardAction.d.ts.map +1 -0
- package/lib/hooks/usePerformCardAction.js +12 -0
- package/lib/hooks/usePonyfill.d.ts +3 -0
- package/lib/hooks/usePonyfill.d.ts.map +1 -0
- package/lib/hooks/usePonyfill.js +11 -0
- package/lib/hooks/usePostActivity.d.ts +3 -0
- package/lib/hooks/usePostActivity.d.ts.map +1 -0
- package/lib/hooks/usePostActivity.js +12 -0
- package/lib/hooks/useReferenceGrammarID.d.ts +2 -0
- package/lib/hooks/useReferenceGrammarID.d.ts.map +1 -0
- package/lib/hooks/useReferenceGrammarID.js +14 -0
- package/lib/hooks/useRelativeTimeFormatter.d.ts +2 -0
- package/lib/hooks/useRelativeTimeFormatter.d.ts.map +1 -0
- package/lib/hooks/useRelativeTimeFormatter.js +61 -0
- package/lib/hooks/useRenderAttachment.d.ts +3 -0
- package/lib/hooks/useRenderAttachment.d.ts.map +1 -0
- package/lib/hooks/useRenderAttachment.js +14 -0
- package/lib/hooks/useRenderToast.d.ts +3 -0
- package/lib/hooks/useRenderToast.d.ts.map +1 -0
- package/lib/hooks/useRenderToast.js +12 -0
- package/lib/hooks/useRenderTypingIndicator.d.ts +3 -0
- package/lib/hooks/useRenderTypingIndicator.d.ts.map +1 -0
- package/lib/hooks/useRenderTypingIndicator.js +12 -0
- package/lib/hooks/useSendBoxAttachments.d.ts +6 -0
- package/lib/hooks/useSendBoxAttachments.d.ts.map +1 -0
- package/lib/hooks/useSendBoxAttachments.js +23 -0
- package/lib/hooks/useSendBoxValue.d.ts +2 -0
- package/lib/hooks/useSendBoxValue.d.ts.map +1 -0
- package/lib/hooks/useSendBoxValue.js +16 -0
- package/lib/hooks/useSendEvent.d.ts +2 -0
- package/lib/hooks/useSendEvent.d.ts.map +1 -0
- package/lib/hooks/useSendEvent.js +12 -0
- package/lib/hooks/useSendFiles.d.ts +10 -0
- package/lib/hooks/useSendFiles.d.ts.map +1 -0
- package/lib/hooks/useSendFiles.js +35 -0
- package/lib/hooks/useSendMessage.d.ts +6 -0
- package/lib/hooks/useSendMessage.d.ts.map +1 -0
- package/lib/hooks/useSendMessage.js +33 -0
- package/lib/hooks/useSendMessageBack.d.ts +2 -0
- package/lib/hooks/useSendMessageBack.d.ts.map +1 -0
- package/lib/hooks/useSendMessageBack.js +12 -0
- package/lib/hooks/useSendPostBack.d.ts +2 -0
- package/lib/hooks/useSendPostBack.d.ts.map +1 -0
- package/lib/hooks/useSendPostBack.js +12 -0
- package/lib/hooks/useSendStatusByActivityKey.d.ts +22 -0
- package/lib/hooks/useSendStatusByActivityKey.d.ts.map +1 -0
- package/lib/hooks/useSendStatusByActivityKey.js +31 -0
- package/lib/hooks/useSendTimeoutForActivity.d.ts +4 -0
- package/lib/hooks/useSendTimeoutForActivity.d.ts.map +1 -0
- package/lib/hooks/useSendTimeoutForActivity.js +22 -0
- package/lib/hooks/useSendTypingIndicator.d.ts +2 -0
- package/lib/hooks/useSendTypingIndicator.d.ts.map +1 -0
- package/lib/hooks/useSendTypingIndicator.js +14 -0
- package/lib/hooks/useSetNotification.d.ts +3 -0
- package/lib/hooks/useSetNotification.d.ts.map +1 -0
- package/lib/hooks/useSetNotification.js +12 -0
- package/lib/hooks/useShouldSpeakIncomingActivity.d.ts +2 -0
- package/lib/hooks/useShouldSpeakIncomingActivity.d.ts.map +1 -0
- package/lib/hooks/useShouldSpeakIncomingActivity.js +22 -0
- package/lib/hooks/useStartDictate.d.ts +2 -0
- package/lib/hooks/useStartDictate.d.ts.map +1 -0
- package/lib/hooks/useStartDictate.js +12 -0
- package/lib/hooks/useStopDictate.d.ts +2 -0
- package/lib/hooks/useStopDictate.d.ts.map +1 -0
- package/lib/hooks/useStopDictate.js +12 -0
- package/lib/hooks/useStyleOptions.d.ts +3 -0
- package/lib/hooks/useStyleOptions.d.ts.map +1 -0
- package/lib/hooks/useStyleOptions.js +12 -0
- package/lib/hooks/useSubmitSendBox.d.ts +4 -0
- package/lib/hooks/useSubmitSendBox.d.ts.map +1 -0
- package/lib/hooks/useSubmitSendBox.js +49 -0
- package/lib/hooks/useSuggestedActions.d.ts +3 -0
- package/lib/hooks/useSuggestedActions.d.ts.map +1 -0
- package/lib/hooks/useSuggestedActions.js +25 -0
- package/lib/hooks/useTimeoutForSend.d.ts +3 -0
- package/lib/hooks/useTimeoutForSend.d.ts.map +1 -0
- package/lib/hooks/useTimeoutForSend.js +21 -0
- package/lib/hooks/useTrackDimension.d.ts +2 -0
- package/lib/hooks/useTrackDimension.d.ts.map +1 -0
- package/lib/hooks/useTrackDimension.js +14 -0
- package/lib/hooks/useTrackEvent.d.ts +10 -0
- package/lib/hooks/useTrackEvent.d.ts.map +1 -0
- package/lib/hooks/useTrackEvent.js +51 -0
- package/lib/hooks/useTrackException.d.ts +2 -0
- package/lib/hooks/useTrackException.d.ts.map +1 -0
- package/lib/hooks/useTrackException.js +31 -0
- package/lib/hooks/useTrackTiming.d.ts +2 -0
- package/lib/hooks/useTrackTiming.d.ts.map +1 -0
- package/lib/hooks/useTrackTiming.js +93 -0
- package/lib/hooks/useUserID.d.ts +2 -0
- package/lib/hooks/useUserID.d.ts.map +1 -0
- package/lib/hooks/useUserID.js +12 -0
- package/lib/hooks/useUsername.d.ts +2 -0
- package/lib/hooks/useUsername.d.ts.map +1 -0
- package/lib/hooks/useUsername.js +12 -0
- package/lib/hooks/useVoiceSelector.d.ts +2 -0
- package/lib/hooks/useVoiceSelector.d.ts.map +1 -0
- package/lib/hooks/useVoiceSelector.js +16 -0
- package/lib/hooks/utils/ErrorBoundary.js +68 -0
- package/lib/hooks/utils/observableToPromise.d.ts +3 -0
- package/lib/hooks/utils/observableToPromise.d.ts.map +1 -0
- package/lib/hooks/utils/observableToPromise.js +28 -0
- package/lib/index.d.ts +37 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +88 -0
- package/lib/internal.d.ts +3 -0
- package/lib/internal.d.ts.map +1 -0
- package/lib/internal.js +14 -0
- package/lib/localization/Localize.d.ts +4 -0
- package/lib/localization/Localize.d.ts.map +1 -0
- package/lib/localization/Localize.js +50 -0
- package/lib/localization/ar-EG.json +42 -0
- package/lib/localization/ar-JO.json +45 -0
- package/lib/localization/ar-SA.json +112 -0
- package/lib/localization/bg-BG.json +112 -0
- package/lib/localization/ca-ES.json +112 -0
- package/lib/localization/cs-CZ.json +112 -0
- package/lib/localization/da-DK.json +112 -0
- package/lib/localization/de-DE.json +112 -0
- package/lib/localization/el-GR.json +112 -0
- package/lib/localization/en-US.json +183 -0
- package/lib/localization/es-ES.json +112 -0
- package/lib/localization/et-EE.json +112 -0
- package/lib/localization/eu-ES.json +112 -0
- package/lib/localization/fi-FI.json +112 -0
- package/lib/localization/fr-FR.json +112 -0
- package/lib/localization/getAllLocalizedStrings.d.ts +6 -0
- package/lib/localization/getAllLocalizedStrings.d.ts.map +1 -0
- package/lib/localization/getAllLocalizedStrings.js +117 -0
- package/lib/localization/getRTLList.d.ts +2 -0
- package/lib/localization/getRTLList.d.ts.map +1 -0
- package/lib/localization/getRTLList.js +46 -0
- package/lib/localization/gl-ES.json +112 -0
- package/lib/localization/he-IL.json +112 -0
- package/lib/localization/hi-IN.json +112 -0
- package/lib/localization/hr-HR.json +112 -0
- package/lib/localization/hu-HU.json +112 -0
- package/lib/localization/id-ID.json +112 -0
- package/lib/localization/it-IT.json +112 -0
- package/lib/localization/ja-JP.json +112 -0
- package/lib/localization/kk-KZ.json +112 -0
- package/lib/localization/ko-KR.json +112 -0
- package/lib/localization/lt-LT.json +112 -0
- package/lib/localization/lv-LV.json +112 -0
- package/lib/localization/mergeLocalizedStrings.d.ts +7 -0
- package/lib/localization/mergeLocalizedStrings.d.ts.map +1 -0
- package/lib/localization/mergeLocalizedStrings.js +49 -0
- package/lib/localization/ms-MY.json +112 -0
- package/lib/localization/nb-NO.json +112 -0
- package/lib/localization/nl-NL.json +112 -0
- package/lib/localization/overrides.json +257 -0
- package/lib/localization/pl-PL.json +112 -0
- package/lib/localization/pt-BR.json +112 -0
- package/lib/localization/pt-PT.json +112 -0
- package/lib/localization/ro-RO.json +112 -0
- package/lib/localization/ru-RU.json +112 -0
- package/lib/localization/sk-SK.json +112 -0
- package/lib/localization/sl-SI.json +112 -0
- package/lib/localization/sl-SL.json +3 -0
- package/lib/localization/sr-Cyrl-CS.json +112 -0
- package/lib/localization/sr-Cyrl.json +3 -0
- package/lib/localization/sr-Latn-CS.json +112 -0
- package/lib/localization/sr-Latn.json +3 -0
- package/lib/localization/sv-SE.json +112 -0
- package/lib/localization/th-TH.json +112 -0
- package/lib/localization/tr-TR.json +112 -0
- package/lib/localization/uk-UA.json +112 -0
- package/lib/localization/vi-VN.json +112 -0
- package/lib/localization/yue.json +115 -0
- package/lib/localization/zh-CN.json +112 -0
- package/lib/localization/zh-HK.json +112 -0
- package/lib/localization/zh-TW.json +112 -0
- package/lib/normalizeStyleOptions.d.ts +3 -0
- package/lib/normalizeStyleOptions.d.ts.map +1 -0
- package/lib/normalizeStyleOptions.js +147 -0
- package/lib/patchStyleOptionsFromDeprecatedProps.js +21 -0
- package/lib/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.d.ts +6 -0
- package/lib/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.d.ts.map +1 -0
- package/lib/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.js +153 -0
- package/lib/providers/ActivityAcknowledgement/private/Context.d.ts +13 -0
- package/lib/providers/ActivityAcknowledgement/private/Context.d.ts.map +1 -0
- package/lib/providers/ActivityAcknowledgement/private/Context.js +14 -0
- package/lib/providers/ActivityAcknowledgement/private/useContext.d.ts +3 -0
- package/lib/providers/ActivityAcknowledgement/private/useContext.d.ts.map +1 -0
- package/lib/providers/ActivityAcknowledgement/private/useContext.js +18 -0
- package/lib/providers/ActivityAcknowledgement/useActivityKeysByRead.d.ts +5 -0
- package/lib/providers/ActivityAcknowledgement/useActivityKeysByRead.d.ts.map +1 -0
- package/lib/providers/ActivityAcknowledgement/useActivityKeysByRead.js +15 -0
- package/lib/providers/ActivityAcknowledgement/useGetHasAcknowledgedByActivityKey.d.ts +2 -0
- package/lib/providers/ActivityAcknowledgement/useGetHasAcknowledgedByActivityKey.d.ts.map +1 -0
- package/lib/providers/ActivityAcknowledgement/useGetHasAcknowledgedByActivityKey.js +12 -0
- package/lib/providers/ActivityAcknowledgement/useLastAcknowledgedActivityKey.d.ts +2 -0
- package/lib/providers/ActivityAcknowledgement/useLastAcknowledgedActivityKey.d.ts.map +1 -0
- package/lib/providers/ActivityAcknowledgement/useLastAcknowledgedActivityKey.js +12 -0
- package/lib/providers/ActivityAcknowledgement/useLastReadActivityKey.d.ts +2 -0
- package/lib/providers/ActivityAcknowledgement/useLastReadActivityKey.d.ts.map +1 -0
- package/lib/providers/ActivityAcknowledgement/useLastReadActivityKey.js +12 -0
- package/lib/providers/ActivityAcknowledgement/useMarkActivityKeyAsRead.d.ts +2 -0
- package/lib/providers/ActivityAcknowledgement/useMarkActivityKeyAsRead.d.ts.map +1 -0
- package/lib/providers/ActivityAcknowledgement/useMarkActivityKeyAsRead.js +12 -0
- package/lib/providers/ActivityAcknowledgement/useMarkAllAsAcknowledged.d.ts +2 -0
- package/lib/providers/ActivityAcknowledgement/useMarkAllAsAcknowledged.d.ts.map +1 -0
- package/lib/providers/ActivityAcknowledgement/useMarkAllAsAcknowledged.js +12 -0
- package/lib/providers/ActivityKeyer/ActivityKeyerComposer.d.ts +20 -0
- package/lib/providers/ActivityKeyer/ActivityKeyerComposer.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/ActivityKeyerComposer.js +149 -0
- package/lib/providers/ActivityKeyer/private/Context.d.ts +13 -0
- package/lib/providers/ActivityKeyer/private/Context.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/private/Context.js +10 -0
- package/lib/providers/ActivityKeyer/private/getActivityId.d.ts +3 -0
- package/lib/providers/ActivityKeyer/private/getActivityId.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/private/getActivityId.js +10 -0
- package/lib/providers/ActivityKeyer/private/getClientActivityId.d.ts +3 -0
- package/lib/providers/ActivityKeyer/private/getClientActivityId.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/private/getClientActivityId.js +11 -0
- package/lib/providers/ActivityKeyer/private/lastOf.d.ts +2 -0
- package/lib/providers/ActivityKeyer/private/lastOf.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/private/lastOf.js +10 -0
- package/lib/providers/ActivityKeyer/private/lastOf.spec.d.ts +2 -0
- package/lib/providers/ActivityKeyer/private/lastOf.spec.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/private/someIterable.d.ts +2 -0
- package/lib/providers/ActivityKeyer/private/someIterable.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/private/someIterable.js +27 -0
- package/lib/providers/ActivityKeyer/private/someIterable.spec.d.ts +2 -0
- package/lib/providers/ActivityKeyer/private/someIterable.spec.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/private/uniqueId.d.ts +2 -0
- package/lib/providers/ActivityKeyer/private/uniqueId.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/private/uniqueId.js +15 -0
- package/lib/providers/ActivityKeyer/private/useContext.d.ts +3 -0
- package/lib/providers/ActivityKeyer/private/useContext.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/private/useContext.js +18 -0
- package/lib/providers/ActivityKeyer/useActivityKeys.d.ts +2 -0
- package/lib/providers/ActivityKeyer/useActivityKeys.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/useActivityKeys.js +12 -0
- package/lib/providers/ActivityKeyer/useGetActivitiesByKey.d.ts +3 -0
- package/lib/providers/ActivityKeyer/useGetActivitiesByKey.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/useGetActivitiesByKey.js +12 -0
- package/lib/providers/ActivityKeyer/useGetActivityByKey.d.ts +3 -0
- package/lib/providers/ActivityKeyer/useGetActivityByKey.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/useGetActivityByKey.js +12 -0
- package/lib/providers/ActivityKeyer/useGetKeyByActivity.d.ts +3 -0
- package/lib/providers/ActivityKeyer/useGetKeyByActivity.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/useGetKeyByActivity.js +12 -0
- package/lib/providers/ActivityKeyer/useGetKeyByActivityId.d.ts +2 -0
- package/lib/providers/ActivityKeyer/useGetKeyByActivityId.d.ts.map +1 -0
- package/lib/providers/ActivityKeyer/useGetKeyByActivityId.js +12 -0
- package/lib/providers/ActivityListener/ActivityListenerComposer.d.ts +7 -0
- package/lib/providers/ActivityListener/ActivityListenerComposer.d.ts.map +1 -0
- package/lib/providers/ActivityListener/ActivityListenerComposer.js +55 -0
- package/lib/providers/ActivityListener/private/Context.d.ts +8 -0
- package/lib/providers/ActivityListener/private/Context.d.ts.map +1 -0
- package/lib/providers/ActivityListener/private/Context.js +15 -0
- package/lib/providers/ActivityListener/private/useContext.d.ts +2 -0
- package/lib/providers/ActivityListener/private/useContext.d.ts.map +1 -0
- package/lib/providers/ActivityListener/private/useContext.js +13 -0
- package/lib/providers/ActivityListener/useUpsertedActivities.d.ts +3 -0
- package/lib/providers/ActivityListener/useUpsertedActivities.d.ts.map +1 -0
- package/lib/providers/ActivityListener/useUpsertedActivities.js +12 -0
- package/lib/providers/ActivitySendStatus/ActivitySendStatusComposer.d.ts +4 -0
- package/lib/providers/ActivitySendStatus/ActivitySendStatusComposer.d.ts.map +1 -0
- package/lib/providers/ActivitySendStatus/ActivitySendStatusComposer.js +149 -0
- package/lib/providers/ActivitySendStatus/private/Context.d.ts +9 -0
- package/lib/providers/ActivitySendStatus/private/Context.d.ts.map +1 -0
- package/lib/providers/ActivitySendStatus/private/Context.js +13 -0
- package/lib/providers/ActivitySendStatus/private/isMapEqual.d.ts +7 -0
- package/lib/providers/ActivitySendStatus/private/isMapEqual.d.ts.map +1 -0
- package/lib/providers/ActivitySendStatus/private/isMapEqual.js +55 -0
- package/lib/providers/ActivitySendStatus/private/useContext.d.ts +3 -0
- package/lib/providers/ActivitySendStatus/private/useContext.d.ts.map +1 -0
- package/lib/providers/ActivitySendStatus/private/useContext.js +18 -0
- package/lib/providers/ActivitySendStatus/useSendStatusByActivityKey.d.ts +22 -0
- package/lib/providers/ActivitySendStatus/useSendStatusByActivityKey.d.ts.map +1 -0
- package/lib/providers/ActivitySendStatus/useSendStatusByActivityKey.js +31 -0
- package/lib/providers/ActivitySendStatusTelemetry/ActivitySendStatusTelemetryComposer.d.ts +3 -0
- package/lib/providers/ActivitySendStatusTelemetry/ActivitySendStatusTelemetryComposer.d.ts.map +1 -0
- package/lib/providers/ActivitySendStatusTelemetry/ActivitySendStatusTelemetryComposer.js +71 -0
- package/lib/providers/ActivityTyping/ActivityTypingComposer.d.ts +9 -0
- package/lib/providers/ActivityTyping/ActivityTypingComposer.d.ts.map +1 -0
- package/lib/providers/ActivityTyping/ActivityTypingComposer.js +98 -0
- package/lib/providers/ActivityTyping/private/Context.d.ts +8 -0
- package/lib/providers/ActivityTyping/private/Context.d.ts.map +1 -0
- package/lib/providers/ActivityTyping/private/Context.js +15 -0
- package/lib/providers/ActivityTyping/private/useContext.d.ts +3 -0
- package/lib/providers/ActivityTyping/private/useContext.d.ts.map +1 -0
- package/lib/providers/ActivityTyping/private/useContext.js +13 -0
- package/lib/providers/ActivityTyping/private/useMemoWithPrevious.d.ts +3 -0
- package/lib/providers/ActivityTyping/private/useMemoWithPrevious.d.ts.map +1 -0
- package/lib/providers/ActivityTyping/private/useMemoWithPrevious.js +22 -0
- package/lib/providers/ActivityTyping/types/AllTyping.d.ts +9 -0
- package/lib/providers/ActivityTyping/types/AllTyping.d.ts.map +1 -0
- package/lib/providers/ActivityTyping/types/AllTyping.js +2 -0
- package/lib/providers/ActivityTyping/useAllTyping.d.ts +3 -0
- package/lib/providers/ActivityTyping/useAllTyping.d.ts.map +1 -0
- package/lib/providers/ActivityTyping/useAllTyping.js +12 -0
- package/lib/providers/Ponyfill/PonyfillComposer.d.ts +17 -0
- package/lib/providers/Ponyfill/PonyfillComposer.d.ts.map +1 -0
- package/lib/providers/Ponyfill/PonyfillComposer.js +87 -0
- package/lib/providers/Ponyfill/private/PonyfillContext.d.ts +8 -0
- package/lib/providers/Ponyfill/private/PonyfillContext.d.ts.map +1 -0
- package/lib/providers/Ponyfill/private/PonyfillContext.js +10 -0
- package/lib/providers/Ponyfill/private/useContext.d.ts +6 -0
- package/lib/providers/Ponyfill/private/useContext.d.ts.map +1 -0
- package/lib/providers/Ponyfill/private/useContext.js +17 -0
- package/lib/providers/Ponyfill/usePonyfill.d.ts +3 -0
- package/lib/providers/Ponyfill/usePonyfill.d.ts.map +1 -0
- package/lib/providers/Ponyfill/usePonyfill.js +12 -0
- package/lib/tsconfig.json +18 -0
- package/lib/types/ActivityMiddleware.d.ts +24 -0
- package/lib/types/ActivityMiddleware.d.ts.map +1 -0
- package/lib/types/ActivityMiddleware.js +2 -0
- package/lib/types/ActivityStatusMiddleware.d.ts +17 -0
- package/lib/types/ActivityStatusMiddleware.d.ts.map +1 -0
- package/lib/types/ActivityStatusMiddleware.js +2 -0
- package/lib/types/AttachmentForScreenReaderMiddleware.d.ts +14 -0
- package/lib/types/AttachmentForScreenReaderMiddleware.d.ts.map +1 -0
- package/lib/types/AttachmentForScreenReaderMiddleware.js +2 -0
- package/lib/types/AttachmentMiddleware.d.ts +12 -0
- package/lib/types/AttachmentMiddleware.d.ts.map +1 -0
- package/lib/types/AttachmentMiddleware.js +2 -0
- package/lib/types/AvatarMiddleware.d.ts +15 -0
- package/lib/types/AvatarMiddleware.d.ts.map +1 -0
- package/lib/types/AvatarMiddleware.js +2 -0
- package/lib/types/CardActionMiddleware.d.ts +19 -0
- package/lib/types/CardActionMiddleware.d.ts.map +1 -0
- package/lib/types/CardActionMiddleware.js +2 -0
- package/lib/types/ComponentMiddleware.d.ts +31 -0
- package/lib/types/ComponentMiddleware.d.ts.map +1 -0
- package/lib/types/ComponentMiddleware.js +2 -0
- package/lib/types/ContextOf.d.ts +4 -0
- package/lib/types/ContextOf.d.ts.map +1 -0
- package/lib/types/ContextOf.js +2 -0
- package/lib/types/FunctionMiddleware.d.ts +6 -0
- package/lib/types/FunctionMiddleware.d.ts.map +1 -0
- package/lib/types/FunctionMiddleware.js +2 -0
- package/lib/types/GroupActivitiesMiddleware.d.ts +22 -0
- package/lib/types/GroupActivitiesMiddleware.d.ts.map +1 -0
- package/lib/types/GroupActivitiesMiddleware.js +2 -0
- package/lib/types/LocalizedStrings.d.ts +5 -0
- package/lib/types/LocalizedStrings.d.ts.map +1 -0
- package/lib/types/LocalizedStrings.js +2 -0
- package/lib/types/Notification.d.ts +10 -0
- package/lib/types/Notification.d.ts.map +1 -0
- package/lib/types/Notification.js +2 -0
- package/lib/types/PrecompiledGlobalize.d.ts +13 -0
- package/lib/types/PrecompiledGlobalize.d.ts.map +1 -0
- package/lib/types/PrecompiledGlobalize.js +2 -0
- package/lib/types/ScrollToEndButtonMiddleware.d.ts +30 -0
- package/lib/types/ScrollToEndButtonMiddleware.d.ts.map +1 -0
- package/lib/types/ScrollToEndButtonMiddleware.js +2 -0
- package/lib/types/SendStatus.d.ts +3 -0
- package/lib/types/SendStatus.d.ts.map +1 -0
- package/lib/types/SendStatus.js +2 -0
- package/lib/types/TelemetryMeasurementEvent.d.ts +31 -0
- package/lib/types/TelemetryMeasurementEvent.d.ts.map +1 -0
- package/lib/types/TelemetryMeasurementEvent.js +2 -0
- package/lib/types/ToastMiddleware.d.ts +11 -0
- package/lib/types/ToastMiddleware.d.ts.map +1 -0
- package/lib/types/ToastMiddleware.js +2 -0
- package/lib/types/Typing.d.ts +8 -0
- package/lib/types/Typing.d.ts.map +1 -0
- package/lib/types/Typing.js +2 -0
- package/lib/types/TypingIndicatorMiddleware.d.ts +17 -0
- package/lib/types/TypingIndicatorMiddleware.d.ts.map +1 -0
- package/lib/types/TypingIndicatorMiddleware.js +2 -0
- package/lib/types/WebSpeechPonyfill.d.ts +19 -0
- package/lib/types/WebSpeechPonyfill.d.ts.map +1 -0
- package/lib/types/WebSpeechPonyfill.js +2 -0
- package/lib/types/WebSpeechPonyfillFactory.d.ts +6 -0
- package/lib/types/WebSpeechPonyfillFactory.d.ts.map +1 -0
- package/lib/types/WebSpeechPonyfillFactory.js +2 -0
- package/lib/utils/createCustomEvent.d.ts +4 -0
- package/lib/utils/createCustomEvent.d.ts.map +1 -0
- package/lib/utils/createCustomEvent.js +34 -0
- package/lib/utils/findLastIndex.d.ts +2 -0
- package/lib/utils/findLastIndex.d.ts.map +1 -0
- package/lib/utils/findLastIndex.js +22 -0
- package/lib/utils/findMin.d.ts +7 -0
- package/lib/utils/findMin.d.ts.map +1 -0
- package/lib/utils/findMin.js +46 -0
- package/lib/utils/freezeArray.d.ts +8 -0
- package/lib/utils/freezeArray.d.ts.map +1 -0
- package/lib/utils/freezeArray.js +19 -0
- package/lib/utils/isObject.js +12 -0
- package/lib/utils/mapMap.d.ts +6 -0
- package/lib/utils/mapMap.d.ts.map +1 -0
- package/lib/utils/mapMap.js +27 -0
- package/lib/utils/normalizeLanguage.d.ts +2 -0
- package/lib/utils/normalizeLanguage.d.ts.map +1 -0
- package/lib/utils/normalizeLanguage.js +115 -0
- package/lib/utils/randomId.d.ts +2 -0
- package/lib/utils/randomId.d.ts.map +1 -0
- package/lib/utils/randomId.js +15 -0
- package/lib/utils/warnOnce.d.ts +2 -0
- package/lib/utils/warnOnce.d.ts.map +1 -0
- package/lib/utils/warnOnce.js +16 -0
- package/package.json +90 -158
- package/src/StyleOptions.ts +285 -400
- package/src/decorator/index.ts +4 -0
- package/src/decorator/private/ActivityBorderDecoratorMiddleware.ts +31 -0
- package/src/decorator/private/ActivityDecorator.tsx +31 -0
- package/src/decorator/private/DecoratorComposer.tsx +6 -0
- package/src/decorator/private/activityDecoratorRequest.ts +6 -0
- package/src/decorator/private/createDecoratorComposer.tsx +36 -0
- package/src/{middleware → decorator}/private/templateMiddleware.test.tsx +17 -19
- package/src/decorator/private/templateMiddleware.ts +58 -0
- package/src/defaultStyleOptions.ts +23 -40
- package/src/hooks/Composer.tsx +142 -204
- package/src/hooks/index.ts +2 -19
- package/src/hooks/internal/ErrorBox.js +34 -0
- package/src/hooks/internal/SendBoxMiddleware.ts +21 -0
- package/src/hooks/internal/SendBoxToolbarMiddleware.ts +21 -0
- package/src/hooks/internal/Tracker.ts +1 -1
- package/src/hooks/internal/WebChatAPIContext.ts +12 -7
- package/src/hooks/internal/WebChatReduxContext.js +2 -3
- package/src/hooks/internal/private/templateMiddleware.ts +4 -0
- package/src/hooks/internal/useCreateActivityRendererInternal.ts +46 -0
- package/src/hooks/internal/useDebugDeps.js +30 -0
- package/src/hooks/internal/useErrorBoxClass.js +7 -0
- package/src/hooks/middleware/UserlandBoundary.js +2 -2
- package/src/hooks/middleware/applyMiddleware.js +5 -5
- package/src/hooks/middleware/concatMiddleware.spec.js +0 -20
- package/src/hooks/middleware/concatMiddleware.ts +6 -7
- package/src/hooks/middleware/createDefaultGroupActivitiesMiddleware.ts +75 -0
- package/src/hooks/private/reduceIterable.spec.ts +2 -0
- package/src/hooks/useActiveTyping.ts +2 -3
- package/src/hooks/useActivities.ts +3 -62
- package/src/hooks/useCreateActivityRenderer.ts +6 -27
- package/src/hooks/useCreateActivityStatusRenderer.tsx +33 -13
- package/src/hooks/useCreateAvatarRenderer.ts +33 -19
- package/src/hooks/useDebouncedNotifications.spec.js +0 -1
- package/src/hooks/useDisabled.ts +2 -8
- package/src/hooks/useGroupActivities.ts +10 -0
- package/src/hooks/useLocalizer.ts +3 -3
- package/src/hooks/useRenderAttachment.ts +2 -2
- package/src/hooks/useSendBoxAttachments.ts +0 -2
- package/src/hooks/useSendFiles.ts +1 -1
- package/src/hooks/useSendTimeoutForActivity.ts +0 -2
- package/src/hooks/useStyleOptions.ts +6 -1
- package/src/hooks/useSuggestedActions.ts +23 -9
- package/src/hooks/useTrackEvent.ts +3 -3
- package/src/index.ts +94 -52
- package/src/internal.ts +3 -0
- package/src/localization/ar-SA.json +111 -134
- package/src/localization/bg-BG.json +111 -134
- package/src/localization/ca-ES.json +111 -134
- package/src/localization/cs-CZ.json +111 -134
- package/src/localization/da-DK.json +111 -134
- package/src/localization/de-DE.json +111 -134
- package/src/localization/el-GR.json +111 -134
- package/src/localization/en-US.json +19 -45
- package/src/localization/es-ES.json +111 -134
- package/src/localization/et-EE.json +111 -134
- package/src/localization/eu-ES.json +111 -134
- package/src/localization/fi-FI.json +111 -134
- package/src/localization/fr-FR.json +111 -134
- package/src/localization/gl-ES.json +111 -134
- package/src/localization/he-IL.json +111 -134
- package/src/localization/hi-IN.json +111 -134
- package/src/localization/hr-HR.json +111 -134
- package/src/localization/hu-HU.json +111 -134
- package/src/localization/id-ID.json +111 -134
- package/src/localization/it-IT.json +111 -134
- package/src/localization/ja-JP.json +111 -134
- package/src/localization/kk-KZ.json +111 -134
- package/src/localization/ko-KR.json +111 -134
- package/src/localization/lt-LT.json +111 -134
- package/src/localization/lv-LV.json +111 -134
- package/src/localization/ms-MY.json +111 -134
- package/src/localization/nb-NO.json +111 -134
- package/src/localization/nl-NL.json +111 -134
- package/src/localization/pl-PL.json +111 -134
- package/src/localization/pt-BR.json +111 -134
- package/src/localization/pt-PT.json +111 -134
- package/src/localization/ro-RO.json +111 -134
- package/src/localization/ru-RU.json +111 -134
- package/src/localization/sk-SK.json +111 -134
- package/src/localization/sl-SI.json +111 -134
- package/src/localization/sr-Cyrl-CS.json +111 -134
- package/src/localization/sr-Latn-CS.json +111 -134
- package/src/localization/sv-SE.json +111 -134
- package/src/localization/th-TH.json +111 -134
- package/src/localization/tr-TR.json +111 -134
- package/src/localization/uk-UA.json +111 -134
- package/src/localization/vi-VN.json +111 -134
- package/src/localization/yue.json +16 -5
- package/src/localization/zh-CN.json +111 -134
- package/src/localization/zh-HK.json +111 -134
- package/src/localization/zh-TW.json +111 -134
- package/src/normalizeStyleOptions.ts +76 -51
- package/src/patchStyleOptionsFromDeprecatedProps.js +14 -0
- package/src/providers/ActivityKeyer/ActivityKeyerComposer.tsx +40 -197
- package/src/providers/ActivityKeyer/private/someIterable.spec.ts +2 -0
- package/src/providers/ActivityListener/ActivityListenerComposer.tsx +1 -1
- package/src/providers/ActivitySendStatus/ActivitySendStatusComposer.tsx +3 -6
- package/src/providers/ActivityTyping/ActivityTypingComposer.tsx +59 -145
- package/src/providers/ActivityTyping/private/useMemoWithPrevious.ts +17 -0
- package/src/tsconfig.json +14 -5
- package/src/types/ActivityMiddleware.ts +36 -0
- package/src/types/ActivityStatusMiddleware.ts +9 -1
- package/src/types/AttachmentForScreenReaderMiddleware.ts +2 -9
- package/src/types/AttachmentMiddleware.ts +16 -0
- package/src/types/AvatarMiddleware.ts +1 -12
- package/src/types/CardActionMiddleware.ts +0 -2
- package/src/types/ComponentMiddleware.ts +1 -1
- package/src/types/GroupActivitiesMiddleware.ts +11 -7
- package/src/utils/isObject.js +5 -0
- package/src/utils/warnOnce.ts +10 -0
- package/LICENSE +0 -21
- package/boot/deprecated/decorator.js +0 -7
- package/boot/deprecated/decorator.mjs +0 -5
- package/boot/deprecated/graph.js +0 -7
- package/boot/deprecated/graph.mjs +0 -5
- package/boot/deprecated/hook.js +0 -7
- package/boot/deprecated/hook.mjs +0 -5
- package/boot/deprecated/internal.js +0 -7
- package/boot/deprecated/internal.mjs +0 -5
- package/boot/deprecated/middleware.js +0 -7
- package/boot/deprecated/middleware.mjs +0 -5
- package/dist/StyleOptions-4TkRjGbQ.d.mts +0 -802
- package/dist/StyleOptions-4TkRjGbQ.d.ts +0 -802
- package/dist/_dtsroll-chunks/B1b7R2eH-avatarMiddleware-CHa011_j.d.ts +0 -109
- package/dist/_dtsroll-chunks/CEcj2Npa-botframework-webchat-redux-store.d.ts +0 -16
- package/dist/_dtsroll-chunks/CZE5KEv8-botframework-webchat-api-middleware.d.ts +0 -230
- package/dist/_dtsroll-chunks/Dtb0H_Ee-handler-chain.d.ts +0 -4
- package/dist/_dtsroll-chunks/N-ttGLxs-botframework-webchat-base.utils.d.ts +0 -4
- package/dist/_dtsroll-chunks/qKTV3q17-avatarMiddleware-CHa011_j.d.ts +0 -93
- package/dist/botframework-webchat-api.d.ts +0 -387
- package/dist/botframework-webchat-api.decorator.d.ts +0 -81
- package/dist/botframework-webchat-api.decorator.js +0 -2
- package/dist/botframework-webchat-api.decorator.js.map +0 -1
- package/dist/botframework-webchat-api.graph.d.mts +0 -5
- package/dist/botframework-webchat-api.graph.d.ts +0 -2
- package/dist/botframework-webchat-api.graph.js +0 -2
- package/dist/botframework-webchat-api.graph.js.map +0 -1
- package/dist/botframework-webchat-api.graph.mjs +0 -2
- package/dist/botframework-webchat-api.hook.d.mts +0 -9
- package/dist/botframework-webchat-api.hook.d.ts +0 -9
- package/dist/botframework-webchat-api.hook.js +0 -2
- package/dist/botframework-webchat-api.hook.js.map +0 -1
- package/dist/botframework-webchat-api.hook.mjs +0 -2
- package/dist/botframework-webchat-api.hook.mjs.map +0 -1
- package/dist/botframework-webchat-api.internal.d.ts +0 -68
- package/dist/botframework-webchat-api.internal.js +0 -2
- package/dist/botframework-webchat-api.internal.js.map +0 -1
- package/dist/botframework-webchat-api.js +0 -2
- package/dist/botframework-webchat-api.js.map +0 -1
- package/dist/botframework-webchat-api.middleware.d.mts +0 -45
- package/dist/botframework-webchat-api.middleware.d.ts +0 -45
- package/dist/botframework-webchat-api.middleware.js +0 -2
- package/dist/botframework-webchat-api.middleware.js.map +0 -1
- package/dist/botframework-webchat-api.middleware.mjs +0 -2
- package/dist/botframework-webchat-api.middleware.mjs.map +0 -1
- package/dist/chunk-3YCFZWVR.js +0 -2
- package/dist/chunk-3YCFZWVR.js.map +0 -1
- package/dist/chunk-5HALOM2E.mjs +0 -2
- package/dist/chunk-5HALOM2E.mjs.map +0 -1
- package/dist/chunk-5JETBPYY.mjs +0 -2
- package/dist/chunk-5JETBPYY.mjs.map +0 -1
- package/dist/chunk-5X4VJZOM.js +0 -2
- package/dist/chunk-5X4VJZOM.js.map +0 -1
- package/dist/chunk-7GV72C4W.js +0 -2
- package/dist/chunk-7GV72C4W.js.map +0 -1
- package/dist/chunk-A6GQOZT3.js +0 -2
- package/dist/chunk-A6GQOZT3.js.map +0 -1
- package/dist/chunk-C4R6NR53.mjs +0 -2
- package/dist/chunk-C4R6NR53.mjs.map +0 -1
- package/dist/chunk-CBZ43QWR.js +0 -2
- package/dist/chunk-CBZ43QWR.js.map +0 -1
- package/dist/chunk-CHK4LFTH.js +0 -2
- package/dist/chunk-CHK4LFTH.js.map +0 -1
- package/dist/chunk-CIL5QUZ4.js +0 -2
- package/dist/chunk-CIL5QUZ4.js.map +0 -1
- package/dist/chunk-DFT7HFE5.js +0 -2
- package/dist/chunk-DFT7HFE5.js.map +0 -1
- package/dist/chunk-FA2GLWPN.mjs +0 -2
- package/dist/chunk-FA2GLWPN.mjs.map +0 -1
- package/dist/chunk-FD7QXXVX.js +0 -2
- package/dist/chunk-FD7QXXVX.js.map +0 -1
- package/dist/chunk-G5ZR6XJL.js +0 -2
- package/dist/chunk-G5ZR6XJL.js.map +0 -1
- package/dist/chunk-HN2U3UQ3.mjs +0 -2
- package/dist/chunk-HN2U3UQ3.mjs.map +0 -1
- package/dist/chunk-JKWDQH6P.mjs +0 -2
- package/dist/chunk-JKWDQH6P.mjs.map +0 -1
- package/dist/chunk-LMAKRCAA.mjs +0 -2
- package/dist/chunk-LMAKRCAA.mjs.map +0 -1
- package/dist/chunk-NGAMGIOT.mjs +0 -2
- package/dist/chunk-NGAMGIOT.mjs.map +0 -1
- package/dist/chunk-NI6HIOVK.js +0 -2
- package/dist/chunk-NI6HIOVK.js.map +0 -1
- package/dist/chunk-RLEJOP6E.mjs +0 -2
- package/dist/chunk-RLEJOP6E.mjs.map +0 -1
- package/dist/chunk-SBCOSAZS.mjs +0 -2
- package/dist/chunk-SBCOSAZS.mjs.map +0 -1
- package/dist/chunk-VAX7AB37.mjs.map +0 -1
- package/dist/chunk-VNGDFILB.mjs +0 -2
- package/dist/chunk-VNGDFILB.mjs.map +0 -1
- package/dist/chunk-VUX2WFWT.js +0 -2
- package/dist/chunk-VUX2WFWT.js.map +0 -1
- package/dist/hook-BXcgekzo.d.mts +0 -536
- package/dist/hook-C8NHjp6P.d.ts +0 -536
- package/dist/metafile-cjs.json +0 -1
- package/dist/templateMiddleware-BEttHPJk.d.mts +0 -20
- package/dist/templateMiddleware-BEttHPJk.d.ts +0 -20
- package/dist/types-BKuj7f2p.d.ts +0 -228
- package/dist/types-BZzd7aAk.d.mts +0 -228
- package/graph.js +0 -3
- package/hook.js +0 -3
- package/middleware.js +0 -3
- package/src/__tests__/addMetaTag.spec.js +0 -9
- package/src/__tests__/addMetaTag.spec.mjs +0 -9
- package/src/boot/decorator.ts +0 -21
- package/src/boot/graph.ts +0 -1
- package/src/boot/hook.ts +0 -82
- package/src/boot/internal.ts +0 -7
- package/src/boot/middleware.ts +0 -60
- package/src/buildInfo.ts +0 -9
- package/src/decorator/ActivityBorder/ActivityBorderDecorator.tsx +0 -57
- package/src/decorator/ActivityBorder/private/ActivityBorderDecoratorMiddleware.ts +0 -34
- package/src/decorator/ActivityBorder/private/ActivityBorderDecoratorRequestContext.ts +0 -48
- package/src/decorator/ActivityGrouping/ActivityGroupingDecorator.tsx +0 -43
- package/src/decorator/ActivityGrouping/private/ActivityGroupingDecoratorMiddleware.ts +0 -40
- package/src/decorator/DecoratorComposer.tsx +0 -51
- package/src/decorator/internal/InternalDecoratorComposer.tsx +0 -33
- package/src/decorator/internal/LowPriorityDecoratorComposer.tsx +0 -19
- package/src/decorator/private/DecoratorComposerContext.ts +0 -16
- package/src/decorator/private/PassthroughFallback.tsx +0 -12
- package/src/decorator/private/templateDecorator.tsx +0 -113
- package/src/decorator/types.ts +0 -4
- package/src/decorator/useDecoratorRequest.ts +0 -15
- package/src/env.d.ts +0 -9
- package/src/errorBox/errorBoxTelemetryPolymiddleware.ts +0 -53
- package/src/hooks/internal/usePostVoiceActivity.ts +0 -18
- package/src/hooks/internal/useRegisterVoiceHandler.ts +0 -23
- package/src/hooks/internal/useShouldShowMicrophoneButton.ts +0 -22
- package/src/hooks/internal/useVoiceHandlers.ts +0 -11
- package/src/hooks/internal/useVoiceStateWritable.ts +0 -18
- package/src/hooks/middleware/activityFallbackPolymiddleware.ts +0 -23
- package/src/hooks/useStartVoice.ts +0 -9
- package/src/hooks/useStopVoice.ts +0 -9
- package/src/hooks/useUIState.ts +0 -18
- package/src/hooks/useVoiceRecordingMuted.ts +0 -24
- package/src/hooks/useVoiceState.ts +0 -15
- package/src/hooks/validation/uiState.parseUIState.spec.ts +0 -21
- package/src/hooks/validation/uiState.ts +0 -10
- package/src/legacy/LegacyActivityBridge.tsx +0 -77
- package/src/legacy/LegacyActivityBridgeContext.ts +0 -23
- package/src/legacy/createActivityPolymiddlewareFromLegacy.tsx +0 -123
- package/src/legacy/createAvatarPolymiddlewareFromLegacy.tsx +0 -102
- package/src/middleware/AvatarPolymiddlewareProxy.tsx +0 -46
- package/src/middleware/SendBoxMiddleware.ts +0 -28
- package/src/middleware/SendBoxToolbarMiddleware.ts +0 -28
- package/src/middleware/private/templateMiddleware.check.test.tsx +0 -47
- package/src/middleware/private/templateMiddleware.tsx +0 -106
- package/src/middleware/useBuildRenderAvatarCallback.ts +0 -37
- package/src/providers/ActivityTyping/private/useReduceActivities.spec.tsx +0 -236
- package/src/providers/ActivityTyping/private/useReduceActivities.ts +0 -49
- package/src/providers/Capabilities/CapabilitiesComposer.tsx +0 -53
- package/src/providers/Capabilities/private/Context.ts +0 -13
- package/src/providers/Capabilities/private/capabilityRegistry.ts +0 -45
- package/src/providers/Capabilities/private/fetchCapabilitiesFromAdapter.ts +0 -59
- package/src/providers/Capabilities/private/shallowEqual.ts +0 -18
- package/src/providers/Capabilities/private/useContext.ts +0 -12
- package/src/providers/Capabilities/types/Capabilities.ts +0 -16
- package/src/providers/Capabilities/useCapabilities.ts +0 -25
- package/src/providers/GroupActivities/GroupActivitiesComposer.tsx +0 -116
- package/src/providers/GroupActivities/private/GroupActivitiesContext.ts +0 -23
- package/src/providers/GroupActivities/private/createDefaultGroupActivitiesMiddleware.ts +0 -113
- package/src/providers/GroupActivities/private/isGroupingValid.ts +0 -41
- package/src/providers/GroupActivities/private/useGroupActivitiesContext.ts +0 -6
- package/src/providers/GroupActivities/useGroupActivities.ts +0 -20
- package/src/providers/GroupActivities/useGroupActivitiesByName.ts +0 -17
- package/src/providers/SpeechToSpeech/SpeechToSpeechComposer.tsx +0 -20
- package/src/providers/SpeechToSpeech/private/VoiceHandlerBridge.tsx +0 -23
- package/src/providers/SpeechToSpeech/private/VoiceRecorderBridge.tsx +0 -49
- package/src/providers/SpeechToSpeech/private/useAudioPlayer.spec.tsx +0 -355
- package/src/providers/SpeechToSpeech/private/useAudioPlayer.ts +0 -92
- package/src/providers/SpeechToSpeech/private/useRecorder.spec.tsx +0 -344
- package/src/providers/SpeechToSpeech/private/useRecorder.ts +0 -220
- package/src/providers/StyleOptions/StyleOptionsComposer.tsx +0 -46
- package/src/providers/StyleOptions/private/StyleOptionsContext.ts +0 -20
- package/src/providers/StyleOptions/private/rectifyStyleOptions.ts +0 -6
- package/src/providers/StyleOptions/useStyleOptions.ts +0 -6
- /package/dist/{botframework-webchat-api.graph.mjs.map → chunk-J6D5YEY6.mjs.map} +0 -0
|
@@ -1,81 +1,36 @@
|
|
|
1
|
-
import * as valibot from 'valibot';
|
|
2
|
-
import { InferInput } from 'valibot';
|
|
3
1
|
import * as react from 'react';
|
|
4
2
|
import react__default, { ReactNode } from 'react';
|
|
5
|
-
import
|
|
6
|
-
|
|
3
|
+
import * as react_chain_of_responsibility from 'react-chain-of-responsibility';
|
|
4
|
+
import { EmptyObject } from 'type-fest';
|
|
7
5
|
import { WebChatActivity } from 'botframework-webchat-core';
|
|
8
|
-
import './_dtsroll-chunks/Dtb0H_Ee-handler-chain.js';
|
|
9
|
-
import 'react-chain-of-responsibility';
|
|
10
|
-
import './templateMiddleware-BEttHPJk.mjs';
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, undefined>, valibot.ReadonlyAction<{
|
|
16
|
-
children?: react__default.ReactNode;
|
|
17
|
-
middleware?: readonly DecoratorMiddleware[];
|
|
18
|
-
}>]>;
|
|
19
|
-
type DecoratorComposerProps = Omit<InferInput<typeof decoratorComposerPropsSchema>, 'middleware'> & {
|
|
20
|
-
readonly middleware?: readonly DecoratorMiddleware[] | undefined;
|
|
7
|
+
type ActivityDecoratorRequestType = {
|
|
8
|
+
from: 'bot' | 'channel' | `user` | undefined;
|
|
9
|
+
state: 'completion' | 'informative' | undefined;
|
|
21
10
|
};
|
|
22
|
-
declare function DecoratorComposer(props: DecoratorComposerProps): react__default.JSX.Element;
|
|
23
|
-
declare const _default$2: react__default.MemoExoticComponent<typeof DecoratorComposer>;
|
|
24
11
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
*/
|
|
34
|
-
livestreamingState: 'completing' | 'ongoing' | 'preparing' | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Gets the role of the sender for the activity.
|
|
37
|
-
*
|
|
38
|
-
* - `"bot"` - the sender is a bot or other users
|
|
39
|
-
* - `"channel"` - the sender is the channel service
|
|
40
|
-
* - `"user"` - the sender is the current user
|
|
41
|
-
* - `undefined` - the sender is unknown
|
|
42
|
-
*/
|
|
43
|
-
from: 'bot' | 'channel' | `user` | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* Gets the modalities of the activity.
|
|
46
|
-
*
|
|
47
|
-
* - `'audio'` - the activity originated from audio/voice input
|
|
48
|
-
* - `'text'` - the activity originated from text input
|
|
49
|
-
*/
|
|
50
|
-
modality: Set<'audio' | 'text'>;
|
|
51
|
-
}>;
|
|
52
|
-
declare const ActivityBorderDecoratorRequestContext: react.Context<Readonly<{
|
|
53
|
-
request: ActivityBorderDecoratorRequest;
|
|
54
|
-
}>>;
|
|
12
|
+
declare const types: {
|
|
13
|
+
init: "activity border";
|
|
14
|
+
middleware: react_chain_of_responsibility.ComponentMiddleware<ActivityDecoratorRequestType, EmptyObject>;
|
|
15
|
+
props: EmptyObject;
|
|
16
|
+
request: ActivityDecoratorRequestType;
|
|
17
|
+
};
|
|
18
|
+
type ActivityBorderDecoratorMiddleware = typeof types.middleware;
|
|
19
|
+
declare const activityBorderDecoratorTypeName: "activity border";
|
|
55
20
|
|
|
56
|
-
type
|
|
57
|
-
|
|
58
|
-
children?: ReactNode
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
21
|
+
type DecoratorMiddlewareInit = typeof activityBorderDecoratorTypeName;
|
|
22
|
+
type DecoratorComposerComponent = (props: Readonly<{
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
middleware?: DecoratorMiddleware[];
|
|
25
|
+
}>) => react__default.JSX.Element;
|
|
26
|
+
type DecoratorMiddleware = (init: DecoratorMiddlewareInit) => ReturnType<ActivityBorderDecoratorMiddleware> | false;
|
|
62
27
|
|
|
63
|
-
declare
|
|
64
|
-
livestreamingState: "completing" | "ongoing" | "preparing" | undefined;
|
|
65
|
-
from: "bot" | "channel" | `user` | undefined;
|
|
66
|
-
modality: Set<"audio" | "text">;
|
|
67
|
-
}>;
|
|
68
|
-
type InferDecoratorRequest<T extends typeof ActivityBorderDecoratorRequestContext> = T extends React.Context<infer U> ? (U extends {
|
|
69
|
-
request: infer R;
|
|
70
|
-
} ? R : never) : never;
|
|
28
|
+
declare const DecoratorComposer: react.MemoExoticComponent<DecoratorComposerComponent>;
|
|
71
29
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
children?: ReactNode
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
declare function ActivityGroupingDecorator({ activities, children, groupingName }: ActivityGroupingDecoratorProps): react__default.JSX.Element;
|
|
78
|
-
declare const _default: react__default.MemoExoticComponent<typeof ActivityGroupingDecorator>;
|
|
30
|
+
declare function ActivityDecorator({ children, activity }: Readonly<{
|
|
31
|
+
activity?: WebChatActivity;
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
}>): react__default.JSX.Element;
|
|
34
|
+
declare const _default: react__default.MemoExoticComponent<typeof ActivityDecorator>;
|
|
79
35
|
|
|
80
|
-
export { _default
|
|
81
|
-
export type { ActivityBorderDecoratorProps, InferDecoratorRequest };
|
|
36
|
+
export { _default as ActivityDecorator, type ActivityDecoratorRequestType as ActivityDecoratorRequest, DecoratorComposer, type DecoratorMiddleware };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as o}from"./chunk-2S76JUVM.mjs";import"./chunk-J6D5YEY6.mjs";import{memo as f}from"react";import n,{useMemo as D}from"react";var{initMiddleware:i,Provider:a,Proxy:d,types:q}=o("ActivityBorderDecoratorMiddleware"),c="activity border";var v=[],p=()=>({children:r,middleware:e=v})=>{let t=D(()=>i(e,c),[e]);return n.createElement(a,{middleware:t},r)};var y=f(p());y.displayName="DecoratorComposer";import m,{Fragment as A,memo as l,useMemo as u}from"react";var s=l(({children:r})=>m.createElement(A,null,r));s.displayName="ActivityDecoratorFallback";var M=["bot","channel","user",void 0],w=["informative","completion",void 0];function B({children:r,activity:e}){let t=u(()=>({from:M.includes(e?.from?.role)?e?.from?.role:void 0,state:w.includes(e?.channelData?.streamType)?e?.channelData?.streamType:void 0}),[e]);return m.createElement(d,{fallbackComponent:s,request:t},r)}var R=l(B);export{R as ActivityDecorator,y as DecoratorComposer};
|
|
2
|
+
/*! For license information please see botframework-webchat-api.decorator.mjs.LEGAL.txt */
|
|
2
3
|
//# sourceMappingURL=botframework-webchat-api.decorator.mjs.map
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/decorator/DecoratorComposer.tsx","../src/decorator/useDecoratorRequest.ts","../src/decorator/ActivityBorder/ActivityBorderDecorator.tsx","../src/decorator/private/PassthroughFallback.tsx","../src/decorator/private/templateDecorator.tsx","../src/decorator/ActivityBorder/private/ActivityBorderDecoratorRequestContext.ts","../src/decorator/ActivityBorder/private/ActivityBorderDecoratorMiddleware.ts","../src/decorator/ActivityGrouping/ActivityGroupingDecorator.tsx","../src/decorator/ActivityGrouping/private/ActivityGroupingDecoratorMiddleware.ts"],"sourcesContent":["import { reactNode, validateProps } from '@msinternal/botframework-webchat-react-valibot';\nimport React, { Fragment, memo, useMemo } from 'react';\nimport { array, custom, is, object, optional, pipe, readonly, type InferInput } from 'valibot';\n\nimport { middlewareFactoryMarker } from '../middleware/private/templateMiddleware';\nimport InternalDecoratorComposer from './internal/InternalDecoratorComposer';\nimport { type DecoratorMiddleware } from './types';\n\nconst decoratorComposerPropsSchema = pipe(\n object({\n children: optional(reactNode()),\n middleware: optional(pipe(array(custom<DecoratorMiddleware>(value => typeof value === 'function')), readonly()))\n }),\n readonly()\n);\n\nconst warnInvalidMiddlewarePropsSchema = optional(\n array(custom(value => value[middlewareFactoryMarker satisfies symbol] === middlewareFactoryMarker))\n);\n\ntype DecoratorComposerProps = Omit<InferInput<typeof decoratorComposerPropsSchema>, 'middleware'> & {\n // Mark \"middleware\" as read-only.\n // Otherwise, passing a read-only middleware would fail because we prefer writable.\n // eslint-disable-next-line react/require-default-props, react/no-unused-prop-types\n readonly middleware?: readonly DecoratorMiddleware[] | undefined;\n};\n\nfunction DecoratorComposer(props: DecoratorComposerProps) {\n const { children, middleware } = validateProps(decoratorComposerPropsSchema, props);\n\n useMemo(() => {\n if (!is(warnInvalidMiddlewarePropsSchema, middleware)) {\n console.warn(\n 'botframework-webchat: \"middleware\" props passed to <DecoratorComposer> should be created using createXXXMiddleware() functions.',\n { middleware }\n );\n }\n }, [middleware]);\n\n return middleware ? (\n <InternalDecoratorComposer middleware={middleware} priority=\"normal\">\n {children}\n </InternalDecoratorComposer>\n ) : (\n // We can't return `children` unless we are not using memo().\n <Fragment>{children}</Fragment>\n );\n}\n\nexport default memo(DecoratorComposer);\nexport { decoratorComposerPropsSchema, type DecoratorComposerProps };\n","import { useContext } from 'react';\nimport { ActivityBorderDecoratorRequest } from './ActivityBorder/ActivityBorderDecorator';\n\nexport default function useDecoratorRequest(type: typeof ActivityBorderDecoratorRequest) {\n const request = useContext(type)?.request;\n\n if (!request) {\n throw new Error(`useDecoratorRequest must be used within a ${type}Provider`);\n }\n\n return request;\n}\n\nexport type InferDecoratorRequest<T extends typeof ActivityBorderDecoratorRequest> =\n T extends React.Context<infer U> ? (U extends { request: infer R } ? R : never) : never;\n","import {\n getActivityLivestreamingMetadata,\n getVoiceActivityRole,\n isVoiceActivity,\n type WebChatActivity\n} from 'botframework-webchat-core';\nimport React, { memo, useMemo, type ReactNode } from 'react';\n\nimport {\n ActivityBorderDecoratorMiddlewareProxy,\n createActivityBorderMiddleware,\n type ActivityBorderDecoratorMiddlewareRequest\n} from './private/ActivityBorderDecoratorMiddleware';\nimport ActivityBorderDecoratorRequestContext from './private/ActivityBorderDecoratorRequestContext';\n\nconst supportedActivityRoles: ActivityBorderDecoratorMiddlewareRequest['from'][] = [\n 'bot',\n 'channel',\n 'user',\n undefined\n];\n\ntype ActivityBorderDecoratorProps = Readonly<{\n activity?: WebChatActivity | undefined;\n children?: ReactNode | undefined;\n}>;\n\nfunction ActivityBorderDecorator({ activity, children }: ActivityBorderDecoratorProps) {\n const request = useMemo<ActivityBorderDecoratorMiddlewareRequest>(() => {\n const { type } = getActivityLivestreamingMetadata(activity) || {};\n\n return {\n from: isVoiceActivity(activity)\n ? getVoiceActivityRole(activity)\n : supportedActivityRoles.includes(activity?.from?.role)\n ? activity?.from?.role\n : undefined,\n modality: new Set(isVoiceActivity(activity) ? ['audio', 'text'] : ['text']),\n livestreamingState:\n type === 'final activity'\n ? 'completing'\n : type === 'informative message'\n ? 'preparing'\n : type === 'interim activity'\n ? 'ongoing'\n : type === 'contentless'\n ? undefined // No bubble is shown for \"contentless\" livestream, should not decorate.\n : undefined\n };\n }, [activity]);\n\n return <ActivityBorderDecoratorMiddlewareProxy request={request}>{children}</ActivityBorderDecoratorMiddlewareProxy>;\n}\n\nexport default memo(ActivityBorderDecorator);\nexport { createActivityBorderMiddleware, type ActivityBorderDecoratorProps };\nexport { ActivityBorderDecoratorRequestContext as ActivityBorderDecoratorRequest };\n","import React, { Fragment, memo, type ReactNode } from 'react';\n\ntype PassthroughFallbackProps = Readonly<{\n children?: ReactNode | undefined;\n}>;\n\nfunction PassthroughFallback({ children }: PassthroughFallbackProps) {\n return <Fragment>{children}</Fragment>;\n}\n\nexport default memo(PassthroughFallback);\nexport { type PassthroughFallbackProps };\n","import PassthroughFallback from './PassthroughFallback';\nimport DecoratorComposerContext from './DecoratorComposerContext';\nimport React, { memo, useContext, useMemo, type Context, type ComponentType, type ReactNode } from 'react';\nimport { ComponentMiddleware, createChainOfResponsibility } from 'react-chain-of-responsibility';\nimport { middlewareFactoryMarker } from '../../middleware/private/templateMiddleware';\n\nconst decoratorChain = createChainOfResponsibility<undefined, any, any>();\n\nexport default function templateDecorator<\n const P extends { children?: ReactNode | undefined },\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n const R extends {},\n const Name extends string = string\n>(\n name: Name,\n DecoratorRequestContext: Context<{ request: R }>,\n FinalComponent: ComponentType<P> = PassthroughFallback\n) {\n type FullProps = P & {\n Next: ComponentType<P>;\n request: R;\n };\n type Middleware = (name: Name) => ReturnType<ComponentMiddleware<undefined, FullProps, typeof name>> | false;\n\n function buildComponent<T extends P>(\n Component: ComponentType<FullProps>,\n Next: ComponentType<P>\n ): React.ComponentType<T> {\n function ChainNext(props: T) {\n const request = useContext(DecoratorRequestContext)?.request;\n return <Component {...props} Next={Next} request={request} />;\n }\n\n ChainNext.displayName = `ChainNext(Next ${name})`;\n return memo<T>(ChainNext);\n }\n\n function createMiddleware(Component: ComponentType<FullProps>): Middleware {\n const factory: Middleware = (init: string): ReturnType<Middleware> | false => {\n if (init !== name) {\n return false;\n }\n\n return next => () => {\n const Next = next(undefined);\n return Next && buildComponent(Component, Next);\n };\n };\n\n // This is for checking if the middleware is created via factory function or not.\n // We recommend middleware to be created using factory function.\n factory[middlewareFactoryMarker satisfies symbol] = middlewareFactoryMarker;\n\n return factory;\n }\n\n // Reuse global chain, but cast it to the correct type.\n const { Provider: DecoratorChainProvider, useBuildComponentCallback } = decoratorChain as ReturnType<\n typeof createChainOfResponsibility<undefined, P, unknown>\n >;\n\n function Chain(props: P) {\n const buildMiddleware = useBuildComponentCallback();\n const Proxy = useMemo(() => buildMiddleware(undefined, { fallbackComponent: FinalComponent }), [buildMiddleware]);\n\n return Proxy && <Proxy {...props} />;\n }\n\n Chain.displayName = `DecoratorChain(Chain ${name})`;\n\n const MemoChain = memo<P>(Chain);\n\n function DecoratorProxy(props: P & Readonly<{ request: R }>) {\n const { request } = props;\n const { middleware } = useContext(DecoratorComposerContext);\n const decoratorMiddleware = useMemo(\n () =>\n middleware\n .map(middleware => middleware(name))\n .filter(enhancer => enhancer)\n // Conversion from internal props to actual middleware stack props.\n .map(enhancer => () => enhancer) as ComponentMiddleware<undefined, P, unknown>[],\n [middleware]\n );\n\n const value = useMemo(() => ({ request }), [request]);\n\n return (\n <DecoratorRequestContext.Provider value={value}>\n <DecoratorChainProvider init={name} middleware={decoratorMiddleware}>\n <MemoChain {...props} />\n </DecoratorChainProvider>\n </DecoratorRequestContext.Provider>\n );\n }\n\n DecoratorProxy.displayName = `DecoratorProxy(Decorator ${name})`;\n\n return {\n createMiddleware,\n Proxy: memo<P & Readonly<{ request: R }>>(DecoratorProxy),\n // This is for type inference, so we can use it in other files.\n '~types': undefined as unknown as {\n middleware: Middleware;\n request: R;\n props: P;\n }\n };\n}\n\nexport type InferMiddleware<T extends ReturnType<typeof templateDecorator>> = T['~types']['middleware'];\nexport type InferProps<T extends ReturnType<typeof templateDecorator>> = T['~types']['props'];\nexport type InferRequest<T extends ReturnType<typeof templateDecorator>> = T['~types']['request'];\n","import { createContext } from 'react';\n\ntype ActivityBorderDecoratorRequest = Readonly<{\n /**\n * Decorate the activity as it participate in a livestreaming session.\n *\n * - `\"completing\"` - decorate as the livestreaming is completing\n * - `\"ongoing\"` - decorate as the livestreaming is ongoing\n * - `\"preparing\"` - decorate as the livestreaming is being prepared\n * - `undefined` - not participated in a livestreaming session\n */\n livestreamingState: 'completing' | 'ongoing' | 'preparing' | undefined;\n\n /**\n * Gets the role of the sender for the activity.\n *\n * - `\"bot\"` - the sender is a bot or other users\n * - `\"channel\"` - the sender is the channel service\n * - `\"user\"` - the sender is the current user\n * - `undefined` - the sender is unknown\n */\n from: 'bot' | 'channel' | `user` | undefined;\n\n /**\n * Gets the modalities of the activity.\n *\n * - `'audio'` - the activity originated from audio/voice input\n * - `'text'` - the activity originated from text input\n */\n modality: Set<'audio' | 'text'>;\n}>;\n\ntype ActivityBorderDecoratorRequestContextType = Readonly<{\n request: ActivityBorderDecoratorRequest;\n}>;\n\nconst ActivityBorderDecoratorRequestContext = createContext<ActivityBorderDecoratorRequestContextType>(\n Object.freeze({\n request: Object.freeze({\n from: undefined,\n modality: new Set<'audio' | 'text'>(),\n livestreamingState: undefined\n })\n })\n);\n\nexport default ActivityBorderDecoratorRequestContext;\nexport { type ActivityBorderDecoratorRequestContextType, type ActivityBorderDecoratorRequest };\n","import { type ReactNode } from 'react';\nimport templateDecorator, {\n InferRequest,\n type InferMiddleware,\n type InferProps\n} from '../../private/templateDecorator';\nimport ActivityBorderDecoratorRequestContext, {\n type ActivityBorderDecoratorRequest\n} from './ActivityBorderDecoratorRequestContext';\n\ntype Props = Readonly<{\n children?: ReactNode | undefined;\n showFlair?: boolean | undefined;\n showLoader?: boolean | undefined;\n}>;\n\nconst template = templateDecorator<Props, ActivityBorderDecoratorRequest>(\n 'activity border',\n ActivityBorderDecoratorRequestContext\n);\n\nconst { createMiddleware: createActivityBorderMiddleware, Proxy: ActivityBorderDecoratorMiddlewareProxy } = template;\n\ntype ActivityBorderDecoratorMiddleware = InferMiddleware<typeof template>;\ntype ActivityBorderDecoratorMiddlewareProps = InferProps<typeof template>;\ntype ActivityBorderDecoratorMiddlewareRequest = InferRequest<typeof template>;\n\nexport {\n ActivityBorderDecoratorMiddlewareProxy,\n createActivityBorderMiddleware,\n type ActivityBorderDecoratorMiddleware,\n type ActivityBorderDecoratorMiddlewareProps,\n type ActivityBorderDecoratorMiddlewareRequest\n};\n","import { type WebChatActivity } from 'botframework-webchat-core';\nimport React, { memo, useContext, useMemo, type ReactNode } from 'react';\n\nimport DecoratorComposerContext from '../private/DecoratorComposerContext';\nimport PassthroughFallback from '../private/PassthroughFallback';\nimport {\n ActivityGroupingDecoratorMiddlewareProvider,\n ActivityGroupingDecoratorMiddlewareProxy,\n createActivityGroupingMiddleware,\n extractActivityGroupingDecoratorMiddleware,\n type ActivityGroupingDecoratorMiddlewareRequest\n} from './private/ActivityGroupingDecoratorMiddleware';\n\ntype ActivityGroupingDecoratorProps = Readonly<{\n activities: readonly WebChatActivity[];\n children?: ReactNode | undefined;\n groupingName: string;\n}>;\n\nfunction ActivityGroupingDecorator({ activities, children, groupingName }: ActivityGroupingDecoratorProps) {\n const request = useMemo<ActivityGroupingDecoratorMiddlewareRequest>(() => ({ groupingName }), [groupingName]);\n const { middleware } = useContext(DecoratorComposerContext);\n\n const activityGroupingMiddleware = useMemo(\n () => extractActivityGroupingDecoratorMiddleware(middleware),\n [middleware]\n );\n\n return (\n <ActivityGroupingDecoratorMiddlewareProvider middleware={activityGroupingMiddleware}>\n <ActivityGroupingDecoratorMiddlewareProxy\n activities={activities}\n fallbackComponent={PassthroughFallback}\n request={request}\n >\n {children}\n </ActivityGroupingDecoratorMiddlewareProxy>\n </ActivityGroupingDecoratorMiddlewareProvider>\n );\n}\n\nexport default memo(ActivityGroupingDecorator);\nexport { createActivityGroupingMiddleware, type ActivityGroupingDecoratorProps };\n","import { type WebChatActivity } from 'botframework-webchat-core';\nimport templateMiddleware, {\n type InferMiddleware,\n type InferProps,\n type InferRequest\n} from '../../../middleware/private/templateMiddleware';\n\ntype Request = Readonly<{\n /**\n * Name of the grouping from the result of `groupActivitesMiddleware()`.\n */\n groupingName: string;\n}>;\n\ntype Props = Readonly<{\n activities: readonly WebChatActivity[];\n}>;\n\nconst template = templateMiddleware<Request, Props>('activity grouping');\n\nconst {\n createMiddleware: createActivityGroupingMiddleware,\n extractMiddleware: extractActivityGroupingDecoratorMiddleware,\n Provider: ActivityGroupingDecoratorMiddlewareProvider,\n Proxy: ActivityGroupingDecoratorMiddlewareProxy\n} = template;\n\ntype ActivityGroupingDecoratorMiddleware = InferMiddleware<typeof template>;\ntype ActivityGroupingDecoratorMiddlewareProps = InferProps<typeof template>;\ntype ActivityGroupingDecoratorMiddlewareRequest = InferRequest<typeof template>;\n\nexport {\n ActivityGroupingDecoratorMiddlewareProvider,\n ActivityGroupingDecoratorMiddlewareProxy,\n createActivityGroupingMiddleware,\n extractActivityGroupingDecoratorMiddleware,\n type ActivityGroupingDecoratorMiddleware,\n type ActivityGroupingDecoratorMiddlewareProps,\n type ActivityGroupingDecoratorMiddlewareRequest\n};\n"],"mappings":"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","names":["React","Fragment","memo","useMemo","array","custom","is","object","optional","pipe","readonly","decoratorComposerPropsSchema","pipe","object","optional","c","array","custom","value","readonly","warnInvalidMiddlewarePropsSchema","middlewareFactoryMarker","DecoratorComposer","props","children","middleware","o","useMemo","is","React","InternalDecoratorComposer_default","Fragment","DecoratorComposer_default","memo","useContext","useDecoratorRequest","type","request","getActivityLivestreamingMetadata","getVoiceActivityRole","isVoiceActivity","React","memo","useMemo","React","Fragment","memo","PassthroughFallback","children","PassthroughFallback_default","React","memo","useContext","useMemo","createChainOfResponsibility","decoratorChain","createChainOfResponsibility","templateDecorator","name","DecoratorRequestContext","FinalComponent","PassthroughFallback_default","buildComponent","Component","Next","ChainNext","props","request","useContext","React","memo","createMiddleware","factory","init","next","middlewareFactoryMarker","DecoratorChainProvider","useBuildComponentCallback","Chain","buildMiddleware","Proxy","useMemo","MemoChain","DecoratorProxy","middleware","DecoratorComposerContext_default","decoratorMiddleware","enhancer","value","createContext","ActivityBorderDecoratorRequestContext","ActivityBorderDecoratorRequestContext_default","template","templateDecorator","ActivityBorderDecoratorRequestContext_default","createActivityBorderMiddleware","ActivityBorderDecoratorMiddlewareProxy","supportedActivityRoles","ActivityBorderDecorator","activity","children","request","useMemo","type","getActivityLivestreamingMetadata","isVoiceActivity","getVoiceActivityRole","React","ActivityBorderDecoratorMiddlewareProxy","ActivityBorderDecorator_default","memo","React","memo","useContext","useMemo","template","templateMiddleware_default","createActivityGroupingMiddleware","extractActivityGroupingDecoratorMiddleware","ActivityGroupingDecoratorMiddlewareProvider","ActivityGroupingDecoratorMiddlewareProxy","ActivityGroupingDecorator","activities","children","groupingName","request","useMemo","middleware","useContext","DecoratorComposerContext_default","activityGroupingMiddleware","extractActivityGroupingDecoratorMiddleware","React","ActivityGroupingDecoratorMiddlewareProvider","ActivityGroupingDecoratorMiddlewareProxy","PassthroughFallback_default","ActivityGroupingDecorator_default","memo"]}
|
|
1
|
+
{"version":3,"sources":["../src/decorator/private/DecoratorComposer.tsx","../src/decorator/private/createDecoratorComposer.tsx","../src/decorator/private/ActivityBorderDecoratorMiddleware.ts","../src/decorator/private/ActivityDecorator.tsx"],"sourcesContent":["import { memo } from 'react';\nimport createDecoratorComposer from './createDecoratorComposer';\n\nexport const DecoratorComposer = memo(createDecoratorComposer());\n\nDecoratorComposer.displayName = 'DecoratorComposer';\n","import React, { useMemo, type ReactNode } from 'react';\nimport {\n ActivityBorderDecoratorMiddlewareProvider,\n activityBorderDecoratorTypeName,\n initActivityBorderDecoratorMiddleware,\n type ActivityBorderDecoratorMiddleware\n} from './ActivityBorderDecoratorMiddleware';\n\ntype DecoratorMiddlewareInit = typeof activityBorderDecoratorTypeName;\n\nexport type DecoratorComposerComponent = (\n props: Readonly<{\n children?: ReactNode;\n middleware?: DecoratorMiddleware[];\n }>\n) => React.JSX.Element;\n\nexport type DecoratorMiddleware = (\n init: DecoratorMiddlewareInit\n) => ReturnType<ActivityBorderDecoratorMiddleware> | false;\n\nconst EMPTY_ARRAY = [];\n\nexport default (): DecoratorComposerComponent =>\n ({ children, middleware = EMPTY_ARRAY }) => {\n const borderMiddlewares = useMemo(\n () => initActivityBorderDecoratorMiddleware(middleware, activityBorderDecoratorTypeName),\n [middleware]\n );\n\n return (\n <ActivityBorderDecoratorMiddlewareProvider middleware={borderMiddlewares}>\n {children}\n </ActivityBorderDecoratorMiddlewareProvider>\n );\n };\n","import { type EmptyObject } from 'type-fest';\n\nimport ActivityDecoratorRequest from './activityDecoratorRequest';\nimport templateMiddleware from './templateMiddleware';\n\nconst {\n initMiddleware: initActivityBorderDecoratorMiddleware,\n Provider: ActivityBorderDecoratorMiddlewareProvider,\n Proxy: ActivityBorderDecoratorMiddlewareProxy,\n types\n} = templateMiddleware<typeof activityBorderDecoratorTypeName, ActivityDecoratorRequest, EmptyObject>(\n 'ActivityBorderDecoratorMiddleware'\n);\n\ntype ActivityBorderDecoratorMiddleware = typeof types.middleware;\ntype ActivityBorderDecoratorMiddlewareInit = typeof types.init;\ntype ActivityBorderDecoratorMiddlewareProps = typeof types.props;\ntype ActivityBorderDecoratorMiddlewareRequest = typeof types.request;\n\nconst activityBorderDecoratorTypeName = 'activity border' as const;\n\nexport {\n ActivityBorderDecoratorMiddlewareProvider,\n ActivityBorderDecoratorMiddlewareProxy,\n activityBorderDecoratorTypeName,\n initActivityBorderDecoratorMiddleware,\n type ActivityBorderDecoratorMiddleware,\n type ActivityBorderDecoratorMiddlewareInit,\n type ActivityBorderDecoratorMiddlewareProps,\n type ActivityBorderDecoratorMiddlewareRequest\n};\n","import { WebChatActivity } from 'botframework-webchat-core';\nimport React, { Fragment, memo, useMemo, type ReactNode } from 'react';\nimport { ActivityDecoratorRequest } from '..';\nimport { ActivityBorderDecoratorMiddlewareProxy } from './ActivityBorderDecoratorMiddleware';\n\nconst ActivityDecoratorFallback = memo(({ children }) => <Fragment>{children}</Fragment>);\n\nActivityDecoratorFallback.displayName = 'ActivityDecoratorFallback';\n\nconst supportedActivityRoles: ActivityDecoratorRequest['from'][] = ['bot', 'channel', 'user', undefined];\nconst supportedActivityStates: ActivityDecoratorRequest['state'][] = ['informative', 'completion', undefined];\n\nfunction ActivityDecorator({ children, activity }: Readonly<{ activity?: WebChatActivity; children?: ReactNode }>) {\n const request = useMemo<ActivityDecoratorRequest>(\n () => ({\n from: supportedActivityRoles.includes(activity?.from?.role) ? activity?.from?.role : undefined,\n state: supportedActivityStates.includes(activity?.channelData?.streamType)\n ? activity?.channelData?.streamType\n : undefined\n }),\n [activity]\n );\n\n return (\n <ActivityBorderDecoratorMiddlewareProxy fallbackComponent={ActivityDecoratorFallback} request={request}>\n {children}\n </ActivityBorderDecoratorMiddlewareProxy>\n );\n}\n\nexport default memo(ActivityDecorator);\n"],"mappings":"sEAAA,OAAS,QAAAA,MAAY,QCArB,OAAOC,GAAS,WAAAC,MAA+B,QCK/C,GAAM,CACJ,eAAgBC,EAChB,SAAUC,EACV,MAAOC,EACP,MAAAC,CACF,EAAIC,EACF,mCACF,EAOMC,EAAkC,kBDExC,IAAMC,EAAc,CAAC,EAEdC,EAAQ,IACb,CAAC,CAAE,SAAAC,EAAU,WAAAC,EAAaH,CAAY,IAAM,CAC1C,IAAMI,EAAoBC,EACxB,IAAMC,EAAsCH,EAAYI,CAA+B,EACvF,CAACJ,CAAU,CACb,EAEA,OACEK,EAAA,cAACC,EAAA,CAA0C,WAAYL,GACpDF,CACH,CAEJ,EDhCK,IAAMQ,EAAoBC,EAAKC,EAAwB,CAAC,EAE/DF,EAAkB,YAAc,oBGJhC,OAAOG,GAAS,YAAAC,EAAU,QAAAC,EAAM,WAAAC,MAA+B,QAI/D,IAAMC,EAA4BC,EAAK,CAAC,CAAE,SAAAC,CAAS,IAAMC,EAAA,cAACC,EAAA,KAAUF,CAAS,CAAW,EAExFF,EAA0B,YAAc,4BAExC,IAAMK,EAA6D,CAAC,MAAO,UAAW,OAAQ,MAAS,EACjGC,EAA+D,CAAC,cAAe,aAAc,MAAS,EAE5G,SAASC,EAAkB,CAAE,SAAAL,EAAU,SAAAM,CAAS,EAAmE,CACjH,IAAMC,EAAUC,EACd,KAAO,CACL,KAAML,EAAuB,SAASG,GAAU,MAAM,IAAI,EAAIA,GAAU,MAAM,KAAO,OACrF,MAAOF,EAAwB,SAASE,GAAU,aAAa,UAAU,EACrEA,GAAU,aAAa,WACvB,MACN,GACA,CAACA,CAAQ,CACX,EAEA,OACEL,EAAA,cAACQ,EAAA,CAAuC,kBAAmBX,EAA2B,QAASS,GAC5FP,CACH,CAEJ,CAEA,IAAOU,EAAQX,EAAKM,CAAiB","names":["memo","React","useMemo","initActivityBorderDecoratorMiddleware","ActivityBorderDecoratorMiddlewareProvider","ActivityBorderDecoratorMiddlewareProxy","types","templateMiddleware","activityBorderDecoratorTypeName","EMPTY_ARRAY","createDecoratorComposer_default","children","middleware","borderMiddlewares","useMemo","initActivityBorderDecoratorMiddleware","activityBorderDecoratorTypeName","React","ActivityBorderDecoratorMiddlewareProvider","DecoratorComposer","memo","createDecoratorComposer_default","React","Fragment","memo","useMemo","ActivityDecoratorFallback","memo","children","React","Fragment","supportedActivityRoles","supportedActivityStates","ActivityDecorator","activity","request","useMemo","ActivityBorderDecoratorMiddlewareProxy","ActivityDecorator_default"]}
|
|
@@ -1,68 +1,3 @@
|
|
|
1
|
-
import * as valibot from 'valibot';
|
|
2
|
-
import { InferInput } from 'valibot';
|
|
3
|
-
import { WebChatActivity } from 'botframework-webchat-core';
|
|
4
|
-
import * as react from 'react';
|
|
5
|
-
import react__default, { ReactNode } from 'react';
|
|
6
|
-
export { a as __INTERNAL_DO_NOT_USE__avatarPolymiddlewareRequestStyleOptionsSymbol } from './_dtsroll-chunks/B1b7R2eH-avatarMiddleware-CHa011_j.js';
|
|
7
|
-
import { D as DecoratorMiddleware } from './types-BZzd7aAk.mjs';
|
|
8
|
-
import { S as StyleOptions, a as StrictStyleOptions } from './StyleOptions-4TkRjGbQ.mjs';
|
|
9
|
-
import 'react-chain-of-responsibility/preview';
|
|
10
|
-
import './_dtsroll-chunks/Dtb0H_Ee-handler-chain.js';
|
|
11
|
-
import 'react-chain-of-responsibility';
|
|
12
|
-
import './templateMiddleware-BEttHPJk.mjs';
|
|
13
|
-
|
|
14
|
-
type LowPriorityDecoratorComposerProps = Readonly<{
|
|
15
|
-
children?: ReactNode | undefined;
|
|
16
|
-
middleware: readonly DecoratorMiddleware[];
|
|
17
|
-
}>;
|
|
18
|
-
declare function LowPriorityDecoratorDecomposer({ children, middleware }: LowPriorityDecoratorComposerProps): react__default.JSX.Element;
|
|
19
|
-
declare const _default$1: react__default.MemoExoticComponent<typeof LowPriorityDecoratorDecomposer>;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Hook to post voice activities (fire-and-forget, no echo back).
|
|
23
|
-
* Use this for DTMF and other voice-related event activities.
|
|
24
|
-
*/
|
|
25
|
-
declare function usePostVoiceActivity(): (activity: WebChatActivity) => void;
|
|
26
|
-
|
|
27
1
|
declare function useSetDictateState(): (dictateState: number) => void;
|
|
28
2
|
|
|
29
|
-
|
|
30
|
-
* Internal hook to determine if the microphone button should be shown based on:
|
|
31
|
-
* - `showMicrophoneButton` style option ('auto' | 'hide')
|
|
32
|
-
* - Adapter voice capability (voiceConfiguration)
|
|
33
|
-
*
|
|
34
|
-
* - 'auto': Show if adapter has voiceConfiguration capability, hide otherwise
|
|
35
|
-
* - 'hide': Never show
|
|
36
|
-
*/
|
|
37
|
-
declare function useShouldShowMicrophoneButton(): boolean;
|
|
38
|
-
|
|
39
|
-
type LegacyActivityContextType = {
|
|
40
|
-
readonly hideTimestamp: boolean;
|
|
41
|
-
readonly showCallout: boolean;
|
|
42
|
-
};
|
|
43
|
-
declare const LegacyActivityContextProvider: react.Provider<LegacyActivityContextType>;
|
|
44
|
-
|
|
45
|
-
declare const styleOptionsComposerPropsSchema: valibot.SchemaWithPipe<readonly [valibot.ObjectSchema<{
|
|
46
|
-
readonly children: valibot.OptionalSchema<valibot.CustomSchema<react__default.ReactNode, undefined>, undefined>;
|
|
47
|
-
readonly styleOptions: valibot.OptionalSchema<valibot.CustomSchema<StyleOptions, undefined>, undefined>;
|
|
48
|
-
}, undefined>, valibot.ReadonlyAction<{
|
|
49
|
-
children?: react__default.ReactNode;
|
|
50
|
-
styleOptions?: Partial<Omit<StrictStyleOptions, "bubbleFromUserNubOffset" | "bubbleNubOffset" | "emojiSet">> & {
|
|
51
|
-
bubbleImageHeight?: number | undefined;
|
|
52
|
-
bubbleMaxWidth?: number | undefined;
|
|
53
|
-
bubbleMinWidth?: number | undefined;
|
|
54
|
-
hideUploadButton?: boolean | undefined;
|
|
55
|
-
bubbleFromUserNubOffset?: number | "bottom" | "top" | undefined;
|
|
56
|
-
bubbleNubOffset?: number | "bottom" | "top" | undefined;
|
|
57
|
-
emojiSet?: boolean | Record<string, string> | undefined;
|
|
58
|
-
};
|
|
59
|
-
}>]>;
|
|
60
|
-
type StyleOptionsComposerProps = InferInput<typeof styleOptionsComposerPropsSchema>;
|
|
61
|
-
declare function StyleOptionsComposer(props: StyleOptionsComposerProps): react__default.JSX.Element;
|
|
62
|
-
declare namespace StyleOptionsComposer {
|
|
63
|
-
var displayName: string;
|
|
64
|
-
}
|
|
65
|
-
declare const _default: react__default.MemoExoticComponent<typeof StyleOptionsComposer>;
|
|
66
|
-
|
|
67
|
-
export { LegacyActivityContextProvider, _default$1 as LowPriorityDecoratorComposer, _default as StyleOptionsComposer, usePostVoiceActivity, useSetDictateState, useShouldShowMicrophoneButton };
|
|
68
|
-
export type { LegacyActivityContextType };
|
|
3
|
+
export { useSetDictateState };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as t}from"./chunk-ZAMHKQQC.mjs";import"./chunk-J6D5YEY6.mjs";function e(){return t().setDictateState}export{e as useSetDictateState};
|
|
2
|
+
/*! For license information please see botframework-webchat-api.internal.mjs.LEGAL.txt */
|
|
2
3
|
//# sourceMappingURL=botframework-webchat-api.internal.mjs.map
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/
|
|
1
|
+
{"version":3,"sources":["../src/hooks/internal/useSetDictateState.ts"],"sourcesContent":["import useWebChatAPIContext from './useWebChatAPIContext';\n\nexport default function useSetDictateState(): (dictateState: number) => void {\n return useWebChatAPIContext().setDictateState;\n}\n"],"mappings":"sEAEe,SAARA,GAAsE,CAC3E,OAAOC,EAAqB,EAAE,eAChC","names":["useSetDictateState","useWebChatAPIContext"]}
|