botframework-webchat-api 4.18.1 → 4.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/boot/deprecated/decorator.js +7 -0
- package/boot/deprecated/decorator.mjs +5 -0
- package/boot/deprecated/graph.js +7 -0
- package/boot/deprecated/graph.mjs +5 -0
- package/boot/deprecated/hook.js +7 -0
- package/boot/deprecated/hook.mjs +5 -0
- package/boot/deprecated/internal.js +7 -0
- package/boot/deprecated/internal.mjs +5 -0
- package/boot/deprecated/middleware.js +7 -0
- package/boot/deprecated/middleware.mjs +5 -0
- package/decorator.js +1 -1
- package/dist/StyleOptions-4TkRjGbQ.d.mts +802 -0
- package/dist/StyleOptions-4TkRjGbQ.d.ts +802 -0
- package/dist/_dtsroll-chunks/B1b7R2eH-avatarMiddleware-CHa011_j.d.ts +109 -0
- package/dist/_dtsroll-chunks/CEcj2Npa-botframework-webchat-redux-store.d.ts +16 -0
- package/dist/_dtsroll-chunks/DnThgHcF-botframework-webchat-api-middleware.d.ts +231 -0
- package/dist/_dtsroll-chunks/Dtb0H_Ee-handler-chain.d.ts +4 -0
- package/dist/_dtsroll-chunks/N-ttGLxs-botframework-webchat-base.utils.d.ts +4 -0
- package/dist/_dtsroll-chunks/qKTV3q17-avatarMiddleware-CHa011_j.d.ts +93 -0
- package/dist/botframework-webchat-api.d.mts +173 -1250
- package/dist/botframework-webchat-api.d.ts +387 -0
- package/dist/botframework-webchat-api.decorator.d.mts +71 -26
- package/dist/botframework-webchat-api.decorator.d.ts +81 -0
- package/dist/botframework-webchat-api.decorator.js +2 -0
- package/dist/botframework-webchat-api.decorator.js.map +1 -0
- package/dist/botframework-webchat-api.decorator.mjs +1 -2
- package/dist/botframework-webchat-api.decorator.mjs.map +1 -1
- package/dist/botframework-webchat-api.graph.d.mts +5 -0
- package/dist/botframework-webchat-api.graph.d.ts +2 -0
- package/dist/botframework-webchat-api.graph.js +2 -0
- package/dist/botframework-webchat-api.graph.js.map +1 -0
- package/dist/botframework-webchat-api.graph.mjs +2 -0
- package/dist/botframework-webchat-api.hook.d.mts +9 -0
- package/dist/botframework-webchat-api.hook.d.ts +9 -0
- package/dist/botframework-webchat-api.hook.js +2 -0
- package/dist/botframework-webchat-api.hook.js.map +1 -0
- package/dist/botframework-webchat-api.hook.mjs +2 -0
- package/dist/botframework-webchat-api.hook.mjs.map +1 -0
- package/dist/botframework-webchat-api.internal.d.mts +66 -1
- package/dist/botframework-webchat-api.internal.d.ts +68 -0
- package/dist/botframework-webchat-api.internal.js +2 -0
- package/dist/botframework-webchat-api.internal.js.map +1 -0
- package/dist/botframework-webchat-api.internal.mjs +1 -2
- package/dist/botframework-webchat-api.internal.mjs.map +1 -1
- package/dist/botframework-webchat-api.js +2 -0
- package/dist/botframework-webchat-api.js.map +1 -0
- package/dist/botframework-webchat-api.middleware.d.mts +45 -0
- package/dist/botframework-webchat-api.middleware.d.ts +45 -0
- package/dist/botframework-webchat-api.middleware.js +2 -0
- package/dist/botframework-webchat-api.middleware.js.map +1 -0
- package/dist/botframework-webchat-api.middleware.mjs +2 -0
- package/dist/botframework-webchat-api.middleware.mjs.map +1 -0
- package/dist/botframework-webchat-api.mjs +1 -139
- package/dist/botframework-webchat-api.mjs.LEGAL.txt +2 -27
- package/dist/botframework-webchat-api.mjs.map +1 -1
- package/dist/chunk-3YCFZWVR.js +2 -0
- package/dist/chunk-3YCFZWVR.js.map +1 -0
- package/dist/chunk-42OUJPJV.js +2 -0
- package/dist/chunk-42OUJPJV.js.map +1 -0
- package/dist/chunk-5HALOM2E.mjs +2 -0
- package/dist/chunk-5HALOM2E.mjs.map +1 -0
- package/dist/chunk-5JETBPYY.mjs +2 -0
- package/dist/chunk-5JETBPYY.mjs.map +1 -0
- package/dist/chunk-5X4VJZOM.js +2 -0
- package/dist/chunk-5X4VJZOM.js.map +1 -0
- package/dist/chunk-62M3VAKR.js +2 -0
- package/dist/chunk-62M3VAKR.js.map +1 -0
- package/dist/chunk-7GV72C4W.js +2 -0
- package/dist/chunk-7GV72C4W.js.map +1 -0
- package/dist/chunk-A6GQOZT3.js +2 -0
- package/dist/chunk-A6GQOZT3.js.map +1 -0
- package/dist/chunk-BWPBSJNH.js +2 -0
- package/dist/chunk-BWPBSJNH.js.map +1 -0
- package/dist/chunk-CIL5QUZ4.js +2 -0
- package/dist/chunk-CIL5QUZ4.js.map +1 -0
- package/dist/chunk-EVD4K5QH.mjs +2 -0
- package/dist/chunk-EVD4K5QH.mjs.map +1 -0
- package/dist/chunk-FA2GLWPN.mjs +2 -0
- package/dist/chunk-FA2GLWPN.mjs.map +1 -0
- package/dist/chunk-FD7QXXVX.js +2 -0
- package/dist/chunk-FD7QXXVX.js.map +1 -0
- package/dist/chunk-G5ZR6XJL.js +2 -0
- package/dist/chunk-G5ZR6XJL.js.map +1 -0
- package/dist/chunk-JKWDQH6P.mjs +2 -0
- package/dist/chunk-JKWDQH6P.mjs.map +1 -0
- package/dist/chunk-L5VFUNB4.js +2 -0
- package/dist/chunk-L5VFUNB4.js.map +1 -0
- package/dist/chunk-LIZ64UIL.mjs +2 -0
- package/dist/chunk-LIZ64UIL.mjs.map +1 -0
- package/dist/chunk-LW6LHF6Z.mjs +2 -0
- package/dist/chunk-LW6LHF6Z.mjs.map +1 -0
- package/dist/chunk-MMNBOGJJ.mjs +2 -0
- package/dist/chunk-MMNBOGJJ.mjs.map +1 -0
- package/dist/chunk-RLEJOP6E.mjs +2 -0
- package/dist/chunk-RLEJOP6E.mjs.map +1 -0
- package/dist/chunk-UK6V7R7K.js +2 -0
- package/dist/chunk-UK6V7R7K.js.map +1 -0
- package/dist/{chunk-J6D5YEY6.mjs → chunk-VAX7AB37.mjs} +1 -2
- package/dist/chunk-VAX7AB37.mjs.map +1 -0
- package/dist/chunk-VNGDFILB.mjs +2 -0
- package/dist/chunk-VNGDFILB.mjs.map +1 -0
- package/dist/chunk-XVCIEKX5.mjs +2 -0
- package/dist/chunk-XVCIEKX5.mjs.map +1 -0
- package/dist/hook-BXcgekzo.d.mts +536 -0
- package/dist/hook-C8NHjp6P.d.ts +536 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -1
- package/dist/templateMiddleware-BEttHPJk.d.mts +20 -0
- package/dist/templateMiddleware-BEttHPJk.d.ts +20 -0
- package/dist/types-BKuj7f2p.d.ts +228 -0
- package/dist/types-BZzd7aAk.d.mts +228 -0
- package/graph.js +3 -0
- package/hook.js +3 -0
- package/internal.js +1 -1
- package/middleware.js +3 -0
- package/package.json +158 -90
- package/src/StyleOptions.ts +400 -285
- package/src/__tests__/addMetaTag.spec.js +9 -0
- package/src/__tests__/addMetaTag.spec.mjs +9 -0
- package/src/boot/decorator.ts +21 -0
- package/src/boot/graph.ts +1 -0
- package/src/boot/hook.ts +82 -0
- package/src/boot/internal.ts +7 -0
- package/src/boot/middleware.ts +60 -0
- package/src/buildInfo.ts +9 -0
- package/src/decorator/ActivityBorder/ActivityBorderDecorator.tsx +57 -0
- package/src/decorator/ActivityBorder/private/ActivityBorderDecoratorMiddleware.ts +34 -0
- package/src/decorator/ActivityBorder/private/ActivityBorderDecoratorRequestContext.ts +48 -0
- package/src/decorator/ActivityGrouping/ActivityGroupingDecorator.tsx +43 -0
- package/src/decorator/ActivityGrouping/private/ActivityGroupingDecoratorMiddleware.ts +40 -0
- package/src/decorator/DecoratorComposer.tsx +51 -0
- package/src/decorator/internal/InternalDecoratorComposer.tsx +33 -0
- package/src/decorator/internal/LowPriorityDecoratorComposer.tsx +19 -0
- package/src/decorator/private/DecoratorComposerContext.ts +16 -0
- package/src/decorator/private/PassthroughFallback.tsx +12 -0
- package/src/decorator/private/templateDecorator.tsx +113 -0
- package/src/decorator/types.ts +4 -0
- package/src/decorator/useDecoratorRequest.ts +15 -0
- package/src/defaultStyleOptions.ts +40 -23
- package/src/env.d.ts +9 -0
- package/src/errorBox/errorBoxTelemetryPolymiddleware.ts +53 -0
- package/src/hooks/Composer.tsx +204 -142
- package/src/hooks/index.ts +19 -2
- package/src/hooks/internal/Tracker.ts +1 -1
- package/src/hooks/internal/WebChatAPIContext.ts +7 -12
- package/src/hooks/internal/WebChatReduxContext.js +3 -2
- package/src/hooks/internal/usePostVoiceActivity.ts +18 -0
- package/src/hooks/internal/useRegisterVoiceHandler.ts +23 -0
- package/src/hooks/internal/useShouldShowMicrophoneButton.ts +22 -0
- package/src/hooks/internal/useVoiceHandlers.ts +11 -0
- package/src/hooks/internal/useVoiceStateWritable.ts +18 -0
- package/src/hooks/middleware/UserlandBoundary.js +2 -2
- package/src/hooks/middleware/activityFallbackPolymiddleware.ts +23 -0
- package/src/hooks/middleware/applyMiddleware.js +5 -5
- package/src/hooks/middleware/concatMiddleware.spec.js +20 -0
- package/src/hooks/middleware/concatMiddleware.ts +7 -6
- package/src/hooks/private/reduceIterable.spec.ts +0 -2
- package/src/hooks/useActiveTyping.ts +3 -2
- package/src/hooks/useActivities.ts +62 -3
- package/src/hooks/useCreateActivityRenderer.ts +27 -6
- package/src/hooks/useCreateActivityStatusRenderer.tsx +13 -33
- package/src/hooks/useCreateAvatarRenderer.ts +19 -33
- package/src/hooks/useDebouncedNotifications.spec.js +1 -0
- package/src/hooks/useDisabled.ts +8 -2
- package/src/hooks/useLocalizer.ts +3 -3
- package/src/hooks/useRenderAttachment.ts +2 -2
- package/src/hooks/useSendBoxAttachments.ts +2 -0
- package/src/hooks/useSendFiles.ts +1 -1
- package/src/hooks/useSendTimeoutForActivity.ts +2 -0
- package/src/hooks/useStartVoice.ts +9 -0
- package/src/hooks/useStopVoice.ts +9 -0
- package/src/hooks/useStyleOptions.ts +1 -6
- package/src/hooks/useSuggestedActions.ts +9 -23
- package/src/hooks/useTrackEvent.ts +3 -3
- package/src/hooks/useUIState.ts +18 -0
- package/src/hooks/useVoiceRecordingMuted.ts +24 -0
- package/src/hooks/useVoiceState.ts +15 -0
- package/src/hooks/validation/uiState.parseUIState.spec.ts +21 -0
- package/src/hooks/validation/uiState.ts +10 -0
- package/src/index.ts +52 -94
- package/src/legacy/LegacyActivityBridge.tsx +77 -0
- package/src/legacy/LegacyActivityBridgeContext.ts +23 -0
- package/src/legacy/createActivityPolymiddlewareFromLegacy.tsx +123 -0
- package/src/legacy/createAvatarPolymiddlewareFromLegacy.tsx +102 -0
- package/src/localization/ar-SA.json +134 -111
- package/src/localization/bg-BG.json +134 -111
- package/src/localization/ca-ES.json +134 -111
- package/src/localization/cs-CZ.json +134 -111
- package/src/localization/da-DK.json +134 -111
- package/src/localization/de-DE.json +134 -111
- package/src/localization/el-GR.json +134 -111
- package/src/localization/en-US.json +45 -19
- package/src/localization/es-ES.json +134 -111
- package/src/localization/et-EE.json +134 -111
- package/src/localization/eu-ES.json +134 -111
- package/src/localization/fi-FI.json +134 -111
- package/src/localization/fr-FR.json +134 -111
- package/src/localization/gl-ES.json +134 -111
- package/src/localization/he-IL.json +134 -111
- package/src/localization/hi-IN.json +134 -111
- package/src/localization/hr-HR.json +134 -111
- package/src/localization/hu-HU.json +134 -111
- package/src/localization/id-ID.json +134 -111
- package/src/localization/it-IT.json +134 -111
- package/src/localization/ja-JP.json +134 -111
- package/src/localization/kk-KZ.json +134 -111
- package/src/localization/ko-KR.json +134 -111
- package/src/localization/lt-LT.json +134 -111
- package/src/localization/lv-LV.json +134 -111
- package/src/localization/ms-MY.json +134 -111
- package/src/localization/nb-NO.json +134 -111
- package/src/localization/nl-NL.json +134 -111
- package/src/localization/pl-PL.json +134 -111
- package/src/localization/pt-BR.json +134 -111
- package/src/localization/pt-PT.json +134 -111
- package/src/localization/ro-RO.json +134 -111
- package/src/localization/ru-RU.json +134 -111
- package/src/localization/sk-SK.json +134 -111
- package/src/localization/sl-SI.json +134 -111
- package/src/localization/sr-Cyrl-CS.json +134 -111
- package/src/localization/sr-Latn-CS.json +134 -111
- package/src/localization/sv-SE.json +134 -111
- package/src/localization/th-TH.json +134 -111
- package/src/localization/tr-TR.json +134 -111
- package/src/localization/uk-UA.json +134 -111
- package/src/localization/vi-VN.json +134 -111
- package/src/localization/yue.json +5 -16
- package/src/localization/zh-CN.json +134 -111
- package/src/localization/zh-HK.json +134 -111
- package/src/localization/zh-TW.json +134 -111
- package/src/middleware/AvatarPolymiddlewareProxy.tsx +46 -0
- package/src/middleware/SendBoxMiddleware.ts +28 -0
- package/src/middleware/SendBoxToolbarMiddleware.ts +28 -0
- package/src/middleware/private/templateMiddleware.check.test.tsx +47 -0
- package/src/{decorator → middleware}/private/templateMiddleware.test.tsx +19 -17
- package/src/middleware/private/templateMiddleware.tsx +106 -0
- package/src/middleware/useBuildRenderAvatarCallback.ts +37 -0
- package/src/normalizeStyleOptions.ts +51 -76
- package/src/providers/ActivityKeyer/ActivityKeyerComposer.tsx +197 -40
- package/src/providers/ActivityKeyer/private/someIterable.spec.ts +0 -2
- package/src/providers/ActivityListener/ActivityListenerComposer.tsx +1 -1
- package/src/providers/ActivitySendStatus/ActivitySendStatusComposer.tsx +6 -3
- package/src/providers/ActivityTyping/ActivityTypingComposer.tsx +145 -59
- package/src/providers/ActivityTyping/private/useReduceActivities.spec.tsx +236 -0
- package/src/providers/ActivityTyping/private/useReduceActivities.ts +49 -0
- package/src/providers/Capabilities/CapabilitiesComposer.tsx +53 -0
- package/src/providers/Capabilities/private/Context.ts +13 -0
- package/src/providers/Capabilities/private/capabilityRegistry.ts +45 -0
- package/src/providers/Capabilities/private/fetchCapabilitiesFromAdapter.ts +59 -0
- package/src/providers/Capabilities/private/shallowEqual.ts +18 -0
- package/src/providers/Capabilities/private/useContext.ts +12 -0
- package/src/providers/Capabilities/types/Capabilities.ts +16 -0
- package/src/providers/Capabilities/useCapabilities.ts +25 -0
- package/src/providers/GroupActivities/GroupActivitiesComposer.tsx +116 -0
- package/src/providers/GroupActivities/private/GroupActivitiesContext.ts +23 -0
- package/src/providers/GroupActivities/private/createDefaultGroupActivitiesMiddleware.ts +113 -0
- package/src/providers/GroupActivities/private/isGroupingValid.ts +41 -0
- package/src/providers/GroupActivities/private/useGroupActivitiesContext.ts +6 -0
- package/src/providers/GroupActivities/useGroupActivities.ts +20 -0
- package/src/providers/GroupActivities/useGroupActivitiesByName.ts +17 -0
- package/src/providers/SpeechToSpeech/SpeechToSpeechComposer.tsx +20 -0
- package/src/providers/SpeechToSpeech/private/VoiceHandlerBridge.tsx +23 -0
- package/src/providers/SpeechToSpeech/private/VoiceRecorderBridge.tsx +49 -0
- package/src/providers/SpeechToSpeech/private/useAudioPlayer.spec.tsx +355 -0
- package/src/providers/SpeechToSpeech/private/useAudioPlayer.ts +92 -0
- package/src/providers/SpeechToSpeech/private/useRecorder.spec.tsx +344 -0
- package/src/providers/SpeechToSpeech/private/useRecorder.ts +220 -0
- package/src/providers/StyleOptions/StyleOptionsComposer.tsx +46 -0
- package/src/providers/StyleOptions/private/StyleOptionsContext.ts +20 -0
- package/src/providers/StyleOptions/private/rectifyStyleOptions.ts +6 -0
- package/src/providers/StyleOptions/useStyleOptions.ts +6 -0
- package/src/tsconfig.json +5 -14
- package/src/types/ActivityStatusMiddleware.ts +1 -9
- package/src/types/AttachmentForScreenReaderMiddleware.ts +9 -2
- package/src/types/AvatarMiddleware.ts +12 -1
- package/src/types/CardActionMiddleware.ts +2 -0
- package/src/types/ComponentMiddleware.ts +1 -1
- package/src/types/GroupActivitiesMiddleware.ts +7 -11
- package/dist/botframework-webchat-api.decorator.mjs.LEGAL.txt +0 -0
- package/dist/botframework-webchat-api.internal.mjs.LEGAL.txt +0 -0
- package/dist/chunk-2S76JUVM.mjs +0 -3
- package/dist/chunk-2S76JUVM.mjs.LEGAL.txt +0 -0
- package/dist/chunk-2S76JUVM.mjs.map +0 -1
- package/dist/chunk-J6D5YEY6.mjs.LEGAL.txt +0 -0
- package/dist/chunk-ZAMHKQQC.mjs +0 -3
- package/dist/chunk-ZAMHKQQC.mjs.LEGAL.txt +0 -0
- package/dist/chunk-ZAMHKQQC.mjs.map +0 -1
- package/lib/StyleOptions.d.ts +0 -697
- package/lib/StyleOptions.d.ts.map +0 -1
- package/lib/StyleOptions.js +0 -2
- package/lib/decorator/index.d.ts +0 -5
- package/lib/decorator/index.d.ts.map +0 -1
- package/lib/decorator/index.js +0 -28
- package/lib/decorator/private/ActivityBorderDecoratorMiddleware.d.ts +0 -27
- package/lib/decorator/private/ActivityBorderDecoratorMiddleware.d.ts.map +0 -1
- package/lib/decorator/private/ActivityBorderDecoratorMiddleware.js +0 -19
- package/lib/decorator/private/ActivityDecorator.d.ts +0 -9
- package/lib/decorator/private/ActivityDecorator.d.ts.map +0 -1
- package/lib/decorator/private/ActivityDecorator.js +0 -36
- package/lib/decorator/private/DecoratorComposer.d.ts +0 -3
- package/lib/decorator/private/DecoratorComposer.d.ts.map +0 -1
- package/lib/decorator/private/DecoratorComposer.js +0 -13
- package/lib/decorator/private/activityDecoratorRequest.d.ts +0 -6
- package/lib/decorator/private/activityDecoratorRequest.d.ts.map +0 -1
- package/lib/decorator/private/activityDecoratorRequest.js +0 -2
- package/lib/decorator/private/createDecoratorComposer.d.ts +0 -11
- package/lib/decorator/private/createDecoratorComposer.d.ts.map +0 -1
- package/lib/decorator/private/createDecoratorComposer.js +0 -27
- package/lib/decorator/private/templateMiddleware.d.ts +0 -30
- package/lib/decorator/private/templateMiddleware.d.ts.map +0 -1
- package/lib/decorator/private/templateMiddleware.js +0 -53
- package/lib/decorator/private/templateMiddleware.test.d.ts +0 -3
- package/lib/decorator/private/templateMiddleware.test.d.ts.map +0 -1
- package/lib/defaultStyleOptions.d.ts +0 -4
- package/lib/defaultStyleOptions.d.ts.map +0 -1
- package/lib/defaultStyleOptions.js +0 -277
- package/lib/external/PrecompiledGlobalize.js +0 -6361
- package/lib/hooks/Composer.d.ts +0 -88
- package/lib/hooks/Composer.d.ts.map +0 -1
- package/lib/hooks/Composer.js +0 -605
- package/lib/hooks/index.d.ts +0 -73
- package/lib/hooks/index.d.ts.map +0 -1
- package/lib/hooks/index.js +0 -504
- package/lib/hooks/internal/ErrorBox.js +0 -47
- package/lib/hooks/internal/SendBoxMiddleware.d.ts +0 -37
- package/lib/hooks/internal/SendBoxMiddleware.d.ts.map +0 -1
- package/lib/hooks/internal/SendBoxMiddleware.js +0 -17
- package/lib/hooks/internal/SendBoxToolbarMiddleware.d.ts +0 -37
- package/lib/hooks/internal/SendBoxToolbarMiddleware.d.ts.map +0 -1
- package/lib/hooks/internal/SendBoxToolbarMiddleware.js +0 -17
- package/lib/hooks/internal/Tracker.d.ts +0 -4
- package/lib/hooks/internal/Tracker.d.ts.map +0 -1
- package/lib/hooks/internal/Tracker.js +0 -15
- package/lib/hooks/internal/WebChatAPIContext.d.ts +0 -80
- package/lib/hooks/internal/WebChatAPIContext.d.ts.map +0 -1
- package/lib/hooks/internal/WebChatAPIContext.js +0 -12
- package/lib/hooks/internal/WebChatReduxContext.js +0 -17
- package/lib/hooks/internal/defaultSelectVoice.js +0 -28
- package/lib/hooks/internal/private/templateMiddleware.d.ts +0 -3
- package/lib/hooks/internal/private/templateMiddleware.d.ts.map +0 -1
- package/lib/hooks/internal/private/templateMiddleware.js +0 -12
- package/lib/hooks/internal/useCreateActivityRendererInternal.d.ts +0 -4
- package/lib/hooks/internal/useCreateActivityRendererInternal.d.ts.map +0 -1
- package/lib/hooks/internal/useCreateActivityRendererInternal.js +0 -37
- package/lib/hooks/internal/useDebugDeps.js +0 -39
- package/lib/hooks/internal/useDirFromProps.js +0 -12
- package/lib/hooks/internal/useErrorBoxClass.js +0 -14
- package/lib/hooks/internal/useForceRender.js +0 -24
- package/lib/hooks/internal/useLocalizedGlobalize.js +0 -12
- package/lib/hooks/internal/useLocalizedStrings.js +0 -14
- package/lib/hooks/internal/useMarkActivity.js +0 -12
- package/lib/hooks/internal/usePrevious.d.ts +0 -3
- package/lib/hooks/internal/usePrevious.d.ts.map +0 -1
- package/lib/hooks/internal/usePrevious.js +0 -15
- package/lib/hooks/internal/useReadTelemetryDimensions.js +0 -20
- package/lib/hooks/internal/useSetDictateState.d.ts +0 -2
- package/lib/hooks/internal/useSetDictateState.d.ts.map +0 -1
- package/lib/hooks/internal/useSetDictateState.js +0 -12
- package/lib/hooks/internal/useTimer.d.ts +0 -5
- package/lib/hooks/internal/useTimer.d.ts.map +0 -1
- package/lib/hooks/internal/useTimer.js +0 -43
- package/lib/hooks/internal/useTracker.js +0 -42
- package/lib/hooks/internal/useValueRef.d.ts +0 -3
- package/lib/hooks/internal/useValueRef.d.ts.map +0 -1
- package/lib/hooks/internal/useValueRef.js +0 -22
- package/lib/hooks/internal/useWebChatAPIContext.d.ts +0 -83
- package/lib/hooks/internal/useWebChatAPIContext.d.ts.map +0 -1
- package/lib/hooks/internal/useWebChatAPIContext.js +0 -17
- package/lib/hooks/middleware/UserlandBoundary.js +0 -48
- package/lib/hooks/middleware/applyMiddleware.js +0 -122
- package/lib/hooks/middleware/concatMiddleware.d.ts +0 -6
- package/lib/hooks/middleware/concatMiddleware.d.ts.map +0 -1
- package/lib/hooks/middleware/concatMiddleware.js +0 -33
- package/lib/hooks/middleware/createDefaultCardActionMiddleware.d.ts +0 -3
- package/lib/hooks/middleware/createDefaultCardActionMiddleware.d.ts.map +0 -1
- package/lib/hooks/middleware/createDefaultCardActionMiddleware.js +0 -43
- package/lib/hooks/middleware/createDefaultGroupActivitiesMiddleware.d.ts +0 -7
- package/lib/hooks/middleware/createDefaultGroupActivitiesMiddleware.d.ts.map +0 -1
- package/lib/hooks/middleware/createDefaultGroupActivitiesMiddleware.js +0 -68
- package/lib/hooks/private/numberWithInfinity.d.ts +0 -3
- package/lib/hooks/private/numberWithInfinity.d.ts.map +0 -1
- package/lib/hooks/private/numberWithInfinity.js +0 -17
- package/lib/hooks/private/numberWithInfinity.spec.d.ts +0 -2
- package/lib/hooks/private/numberWithInfinity.spec.d.ts.map +0 -1
- package/lib/hooks/private/reduceIterable.d.ts +0 -2
- package/lib/hooks/private/reduceIterable.d.ts.map +0 -1
- package/lib/hooks/private/reduceIterable.js +0 -26
- package/lib/hooks/private/reduceIterable.spec.d.ts +0 -2
- package/lib/hooks/private/reduceIterable.spec.d.ts.map +0 -1
- package/lib/hooks/useActiveTyping.d.ts +0 -4
- package/lib/hooks/useActiveTyping.d.ts.map +0 -1
- package/lib/hooks/useActiveTyping.js +0 -81
- package/lib/hooks/useActivities.d.ts +0 -3
- package/lib/hooks/useActivities.d.ts.map +0 -1
- package/lib/hooks/useActivities.js +0 -14
- package/lib/hooks/useActivityKeys.d.ts +0 -3
- package/lib/hooks/useActivityKeys.d.ts.map +0 -1
- package/lib/hooks/useActivityKeys.js +0 -11
- package/lib/hooks/useActivityKeysByRead.d.ts +0 -3
- package/lib/hooks/useActivityKeysByRead.d.ts.map +0 -1
- package/lib/hooks/useActivityKeysByRead.js +0 -11
- package/lib/hooks/useAvatarForBot.d.ts +0 -5
- package/lib/hooks/useAvatarForBot.d.ts.map +0 -1
- package/lib/hooks/useAvatarForBot.js +0 -26
- package/lib/hooks/useAvatarForUser.d.ts +0 -5
- package/lib/hooks/useAvatarForUser.d.ts.map +0 -1
- package/lib/hooks/useAvatarForUser.js +0 -26
- package/lib/hooks/useByteFormatter.d.ts +0 -2
- package/lib/hooks/useByteFormatter.d.ts.map +0 -1
- package/lib/hooks/useByteFormatter.js +0 -43
- package/lib/hooks/useConnectivityStatus.d.ts +0 -2
- package/lib/hooks/useConnectivityStatus.d.ts.map +0 -1
- package/lib/hooks/useConnectivityStatus.js +0 -14
- package/lib/hooks/useCreateActivityRenderer.d.ts +0 -3
- package/lib/hooks/useCreateActivityRenderer.d.ts.map +0 -1
- package/lib/hooks/useCreateActivityRenderer.js +0 -14
- package/lib/hooks/useCreateActivityStatusRenderer.d.ts +0 -10
- package/lib/hooks/useCreateActivityStatusRenderer.d.ts.map +0 -1
- package/lib/hooks/useCreateActivityStatusRenderer.js +0 -72
- package/lib/hooks/useCreateAttachmentForScreenReaderRenderer.d.ts +0 -3
- package/lib/hooks/useCreateAttachmentForScreenReaderRenderer.d.ts.map +0 -1
- package/lib/hooks/useCreateAttachmentForScreenReaderRenderer.js +0 -12
- package/lib/hooks/useCreateAvatarRenderer.d.ts +0 -6
- package/lib/hooks/useCreateAvatarRenderer.d.ts.map +0 -1
- package/lib/hooks/useCreateAvatarRenderer.js +0 -44
- package/lib/hooks/useCreateScrollToEndButtonRenderer.d.ts +0 -3
- package/lib/hooks/useCreateScrollToEndButtonRenderer.d.ts.map +0 -1
- package/lib/hooks/useCreateScrollToEndButtonRenderer.js +0 -12
- package/lib/hooks/useDateFormatter.d.ts +0 -2
- package/lib/hooks/useDateFormatter.d.ts.map +0 -1
- package/lib/hooks/useDateFormatter.js +0 -35
- package/lib/hooks/useDebouncedNotifications.d.ts +0 -13
- package/lib/hooks/useDebouncedNotifications.d.ts.map +0 -1
- package/lib/hooks/useDebouncedNotifications.js +0 -118
- package/lib/hooks/useDictateInterims.d.ts +0 -2
- package/lib/hooks/useDictateInterims.d.ts.map +0 -1
- package/lib/hooks/useDictateInterims.js +0 -16
- package/lib/hooks/useDictateState.d.ts +0 -2
- package/lib/hooks/useDictateState.d.ts.map +0 -1
- package/lib/hooks/useDictateState.js +0 -15
- package/lib/hooks/useDirection.d.ts +0 -2
- package/lib/hooks/useDirection.d.ts.map +0 -1
- package/lib/hooks/useDirection.js +0 -38
- package/lib/hooks/useDisabled.d.ts +0 -2
- package/lib/hooks/useDisabled.d.ts.map +0 -1
- package/lib/hooks/useDisabled.js +0 -12
- package/lib/hooks/useDismissNotification.d.ts +0 -2
- package/lib/hooks/useDismissNotification.d.ts.map +0 -1
- package/lib/hooks/useDismissNotification.js +0 -12
- package/lib/hooks/useEmitTypingIndicator.d.ts +0 -2
- package/lib/hooks/useEmitTypingIndicator.d.ts.map +0 -1
- package/lib/hooks/useEmitTypingIndicator.js +0 -12
- package/lib/hooks/useGetActivitiesByKey.d.ts +0 -3
- package/lib/hooks/useGetActivitiesByKey.d.ts.map +0 -1
- package/lib/hooks/useGetActivitiesByKey.js +0 -11
- package/lib/hooks/useGetActivityByKey.d.ts +0 -3
- package/lib/hooks/useGetActivityByKey.d.ts.map +0 -1
- package/lib/hooks/useGetActivityByKey.js +0 -11
- package/lib/hooks/useGetHasAcknowledgedByActivityKey.d.ts +0 -3
- package/lib/hooks/useGetHasAcknowledgedByActivityKey.d.ts.map +0 -1
- package/lib/hooks/useGetHasAcknowledgedByActivityKey.js +0 -11
- package/lib/hooks/useGetKeyByActivity.d.ts +0 -3
- package/lib/hooks/useGetKeyByActivity.d.ts.map +0 -1
- package/lib/hooks/useGetKeyByActivity.js +0 -11
- package/lib/hooks/useGetKeyByActivityId.d.ts +0 -3
- package/lib/hooks/useGetKeyByActivityId.d.ts.map +0 -1
- package/lib/hooks/useGetKeyByActivityId.js +0 -11
- package/lib/hooks/useGetSendTimeoutForActivity.d.ts +0 -5
- package/lib/hooks/useGetSendTimeoutForActivity.d.ts.map +0 -1
- package/lib/hooks/useGetSendTimeoutForActivity.js +0 -33
- package/lib/hooks/useGrammars.d.ts +0 -2
- package/lib/hooks/useGrammars.d.ts.map +0 -1
- package/lib/hooks/useGrammars.js +0 -12
- package/lib/hooks/useGroupActivities.d.ts +0 -8
- package/lib/hooks/useGroupActivities.d.ts.map +0 -1
- package/lib/hooks/useGroupActivities.js +0 -12
- package/lib/hooks/useGroupTimestamp.d.ts +0 -2
- package/lib/hooks/useGroupTimestamp.d.ts.map +0 -1
- package/lib/hooks/useGroupTimestamp.js +0 -21
- package/lib/hooks/useLanguage.d.ts +0 -2
- package/lib/hooks/useLanguage.d.ts.map +0 -1
- package/lib/hooks/useLanguage.js +0 -19
- package/lib/hooks/useLastAcknowledgedActivityKey.d.ts +0 -3
- package/lib/hooks/useLastAcknowledgedActivityKey.d.ts.map +0 -1
- package/lib/hooks/useLastAcknowledgedActivityKey.js +0 -11
- package/lib/hooks/useLastReadActivityKey.d.ts +0 -3
- package/lib/hooks/useLastReadActivityKey.d.ts.map +0 -1
- package/lib/hooks/useLastReadActivityKey.js +0 -11
- package/lib/hooks/useLocalizer.d.ts +0 -13
- package/lib/hooks/useLocalizer.d.ts.map +0 -1
- package/lib/hooks/useLocalizer.js +0 -75
- package/lib/hooks/useMarkActivityAsSpoken.d.ts +0 -3
- package/lib/hooks/useMarkActivityAsSpoken.d.ts.map +0 -1
- package/lib/hooks/useMarkActivityAsSpoken.js +0 -16
- package/lib/hooks/useMarkActivityKeyAsRead.d.ts +0 -3
- package/lib/hooks/useMarkActivityKeyAsRead.d.ts.map +0 -1
- package/lib/hooks/useMarkActivityKeyAsRead.js +0 -11
- package/lib/hooks/useMarkAllAsAcknowledged.d.ts +0 -3
- package/lib/hooks/useMarkAllAsAcknowledged.d.ts.map +0 -1
- package/lib/hooks/useMarkAllAsAcknowledged.js +0 -11
- package/lib/hooks/useNotifications.d.ts +0 -3
- package/lib/hooks/useNotifications.d.ts.map +0 -1
- package/lib/hooks/useNotifications.js +0 -14
- package/lib/hooks/usePerformCardAction.d.ts +0 -3
- package/lib/hooks/usePerformCardAction.d.ts.map +0 -1
- package/lib/hooks/usePerformCardAction.js +0 -12
- package/lib/hooks/usePonyfill.d.ts +0 -3
- package/lib/hooks/usePonyfill.d.ts.map +0 -1
- package/lib/hooks/usePonyfill.js +0 -11
- package/lib/hooks/usePostActivity.d.ts +0 -3
- package/lib/hooks/usePostActivity.d.ts.map +0 -1
- package/lib/hooks/usePostActivity.js +0 -12
- package/lib/hooks/useReferenceGrammarID.d.ts +0 -2
- package/lib/hooks/useReferenceGrammarID.d.ts.map +0 -1
- package/lib/hooks/useReferenceGrammarID.js +0 -14
- package/lib/hooks/useRelativeTimeFormatter.d.ts +0 -2
- package/lib/hooks/useRelativeTimeFormatter.d.ts.map +0 -1
- package/lib/hooks/useRelativeTimeFormatter.js +0 -61
- package/lib/hooks/useRenderAttachment.d.ts +0 -3
- package/lib/hooks/useRenderAttachment.d.ts.map +0 -1
- package/lib/hooks/useRenderAttachment.js +0 -14
- package/lib/hooks/useRenderToast.d.ts +0 -3
- package/lib/hooks/useRenderToast.d.ts.map +0 -1
- package/lib/hooks/useRenderToast.js +0 -12
- package/lib/hooks/useRenderTypingIndicator.d.ts +0 -3
- package/lib/hooks/useRenderTypingIndicator.d.ts.map +0 -1
- package/lib/hooks/useRenderTypingIndicator.js +0 -12
- package/lib/hooks/useSendBoxAttachments.d.ts +0 -6
- package/lib/hooks/useSendBoxAttachments.d.ts.map +0 -1
- package/lib/hooks/useSendBoxAttachments.js +0 -23
- package/lib/hooks/useSendBoxValue.d.ts +0 -2
- package/lib/hooks/useSendBoxValue.d.ts.map +0 -1
- package/lib/hooks/useSendBoxValue.js +0 -16
- package/lib/hooks/useSendEvent.d.ts +0 -2
- package/lib/hooks/useSendEvent.d.ts.map +0 -1
- package/lib/hooks/useSendEvent.js +0 -12
- package/lib/hooks/useSendFiles.d.ts +0 -10
- package/lib/hooks/useSendFiles.d.ts.map +0 -1
- package/lib/hooks/useSendFiles.js +0 -35
- package/lib/hooks/useSendMessage.d.ts +0 -6
- package/lib/hooks/useSendMessage.d.ts.map +0 -1
- package/lib/hooks/useSendMessage.js +0 -33
- package/lib/hooks/useSendMessageBack.d.ts +0 -2
- package/lib/hooks/useSendMessageBack.d.ts.map +0 -1
- package/lib/hooks/useSendMessageBack.js +0 -12
- package/lib/hooks/useSendPostBack.d.ts +0 -2
- package/lib/hooks/useSendPostBack.d.ts.map +0 -1
- package/lib/hooks/useSendPostBack.js +0 -12
- package/lib/hooks/useSendStatusByActivityKey.d.ts +0 -22
- package/lib/hooks/useSendStatusByActivityKey.d.ts.map +0 -1
- package/lib/hooks/useSendStatusByActivityKey.js +0 -31
- package/lib/hooks/useSendTimeoutForActivity.d.ts +0 -4
- package/lib/hooks/useSendTimeoutForActivity.d.ts.map +0 -1
- package/lib/hooks/useSendTimeoutForActivity.js +0 -22
- package/lib/hooks/useSendTypingIndicator.d.ts +0 -2
- package/lib/hooks/useSendTypingIndicator.d.ts.map +0 -1
- package/lib/hooks/useSendTypingIndicator.js +0 -14
- package/lib/hooks/useSetNotification.d.ts +0 -3
- package/lib/hooks/useSetNotification.d.ts.map +0 -1
- package/lib/hooks/useSetNotification.js +0 -12
- package/lib/hooks/useShouldSpeakIncomingActivity.d.ts +0 -2
- package/lib/hooks/useShouldSpeakIncomingActivity.d.ts.map +0 -1
- package/lib/hooks/useShouldSpeakIncomingActivity.js +0 -22
- package/lib/hooks/useStartDictate.d.ts +0 -2
- package/lib/hooks/useStartDictate.d.ts.map +0 -1
- package/lib/hooks/useStartDictate.js +0 -12
- package/lib/hooks/useStopDictate.d.ts +0 -2
- package/lib/hooks/useStopDictate.d.ts.map +0 -1
- package/lib/hooks/useStopDictate.js +0 -12
- package/lib/hooks/useStyleOptions.d.ts +0 -3
- package/lib/hooks/useStyleOptions.d.ts.map +0 -1
- package/lib/hooks/useStyleOptions.js +0 -12
- package/lib/hooks/useSubmitSendBox.d.ts +0 -4
- package/lib/hooks/useSubmitSendBox.d.ts.map +0 -1
- package/lib/hooks/useSubmitSendBox.js +0 -49
- package/lib/hooks/useSuggestedActions.d.ts +0 -3
- package/lib/hooks/useSuggestedActions.d.ts.map +0 -1
- package/lib/hooks/useSuggestedActions.js +0 -25
- package/lib/hooks/useTimeoutForSend.d.ts +0 -3
- package/lib/hooks/useTimeoutForSend.d.ts.map +0 -1
- package/lib/hooks/useTimeoutForSend.js +0 -21
- package/lib/hooks/useTrackDimension.d.ts +0 -2
- package/lib/hooks/useTrackDimension.d.ts.map +0 -1
- package/lib/hooks/useTrackDimension.js +0 -14
- package/lib/hooks/useTrackEvent.d.ts +0 -10
- package/lib/hooks/useTrackEvent.d.ts.map +0 -1
- package/lib/hooks/useTrackEvent.js +0 -51
- package/lib/hooks/useTrackException.d.ts +0 -2
- package/lib/hooks/useTrackException.d.ts.map +0 -1
- package/lib/hooks/useTrackException.js +0 -31
- package/lib/hooks/useTrackTiming.d.ts +0 -2
- package/lib/hooks/useTrackTiming.d.ts.map +0 -1
- package/lib/hooks/useTrackTiming.js +0 -93
- package/lib/hooks/useUserID.d.ts +0 -2
- package/lib/hooks/useUserID.d.ts.map +0 -1
- package/lib/hooks/useUserID.js +0 -12
- package/lib/hooks/useUsername.d.ts +0 -2
- package/lib/hooks/useUsername.d.ts.map +0 -1
- package/lib/hooks/useUsername.js +0 -12
- package/lib/hooks/useVoiceSelector.d.ts +0 -2
- package/lib/hooks/useVoiceSelector.d.ts.map +0 -1
- package/lib/hooks/useVoiceSelector.js +0 -16
- package/lib/hooks/utils/ErrorBoundary.js +0 -68
- package/lib/hooks/utils/observableToPromise.d.ts +0 -3
- package/lib/hooks/utils/observableToPromise.d.ts.map +0 -1
- package/lib/hooks/utils/observableToPromise.js +0 -28
- package/lib/index.d.ts +0 -37
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -88
- package/lib/internal.d.ts +0 -3
- package/lib/internal.d.ts.map +0 -1
- package/lib/internal.js +0 -14
- package/lib/localization/Localize.d.ts +0 -4
- package/lib/localization/Localize.d.ts.map +0 -1
- package/lib/localization/Localize.js +0 -50
- package/lib/localization/ar-EG.json +0 -42
- package/lib/localization/ar-JO.json +0 -45
- package/lib/localization/ar-SA.json +0 -112
- package/lib/localization/bg-BG.json +0 -112
- package/lib/localization/ca-ES.json +0 -112
- package/lib/localization/cs-CZ.json +0 -112
- package/lib/localization/da-DK.json +0 -112
- package/lib/localization/de-DE.json +0 -112
- package/lib/localization/el-GR.json +0 -112
- package/lib/localization/en-US.json +0 -183
- package/lib/localization/es-ES.json +0 -112
- package/lib/localization/et-EE.json +0 -112
- package/lib/localization/eu-ES.json +0 -112
- package/lib/localization/fi-FI.json +0 -112
- package/lib/localization/fr-FR.json +0 -112
- package/lib/localization/getAllLocalizedStrings.d.ts +0 -6
- package/lib/localization/getAllLocalizedStrings.d.ts.map +0 -1
- package/lib/localization/getAllLocalizedStrings.js +0 -117
- package/lib/localization/getRTLList.d.ts +0 -2
- package/lib/localization/getRTLList.d.ts.map +0 -1
- package/lib/localization/getRTLList.js +0 -46
- package/lib/localization/gl-ES.json +0 -112
- package/lib/localization/he-IL.json +0 -112
- package/lib/localization/hi-IN.json +0 -112
- package/lib/localization/hr-HR.json +0 -112
- package/lib/localization/hu-HU.json +0 -112
- package/lib/localization/id-ID.json +0 -112
- package/lib/localization/it-IT.json +0 -112
- package/lib/localization/ja-JP.json +0 -112
- package/lib/localization/kk-KZ.json +0 -112
- package/lib/localization/ko-KR.json +0 -112
- package/lib/localization/lt-LT.json +0 -112
- package/lib/localization/lv-LV.json +0 -112
- package/lib/localization/mergeLocalizedStrings.d.ts +0 -7
- package/lib/localization/mergeLocalizedStrings.d.ts.map +0 -1
- package/lib/localization/mergeLocalizedStrings.js +0 -49
- package/lib/localization/ms-MY.json +0 -112
- package/lib/localization/nb-NO.json +0 -112
- package/lib/localization/nl-NL.json +0 -112
- package/lib/localization/overrides.json +0 -257
- package/lib/localization/pl-PL.json +0 -112
- package/lib/localization/pt-BR.json +0 -112
- package/lib/localization/pt-PT.json +0 -112
- package/lib/localization/ro-RO.json +0 -112
- package/lib/localization/ru-RU.json +0 -112
- package/lib/localization/sk-SK.json +0 -112
- package/lib/localization/sl-SI.json +0 -112
- package/lib/localization/sl-SL.json +0 -3
- package/lib/localization/sr-Cyrl-CS.json +0 -112
- package/lib/localization/sr-Cyrl.json +0 -3
- package/lib/localization/sr-Latn-CS.json +0 -112
- package/lib/localization/sr-Latn.json +0 -3
- package/lib/localization/sv-SE.json +0 -112
- package/lib/localization/th-TH.json +0 -112
- package/lib/localization/tr-TR.json +0 -112
- package/lib/localization/uk-UA.json +0 -112
- package/lib/localization/vi-VN.json +0 -112
- package/lib/localization/yue.json +0 -115
- package/lib/localization/zh-CN.json +0 -112
- package/lib/localization/zh-HK.json +0 -112
- package/lib/localization/zh-TW.json +0 -112
- package/lib/normalizeStyleOptions.d.ts +0 -3
- package/lib/normalizeStyleOptions.d.ts.map +0 -1
- package/lib/normalizeStyleOptions.js +0 -147
- package/lib/patchStyleOptionsFromDeprecatedProps.js +0 -21
- package/lib/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.d.ts +0 -6
- package/lib/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.d.ts.map +0 -1
- package/lib/providers/ActivityAcknowledgement/ActivityAcknowledgementComposer.js +0 -153
- package/lib/providers/ActivityAcknowledgement/private/Context.d.ts +0 -13
- package/lib/providers/ActivityAcknowledgement/private/Context.d.ts.map +0 -1
- package/lib/providers/ActivityAcknowledgement/private/Context.js +0 -14
- package/lib/providers/ActivityAcknowledgement/private/useContext.d.ts +0 -3
- package/lib/providers/ActivityAcknowledgement/private/useContext.d.ts.map +0 -1
- package/lib/providers/ActivityAcknowledgement/private/useContext.js +0 -18
- package/lib/providers/ActivityAcknowledgement/useActivityKeysByRead.d.ts +0 -5
- package/lib/providers/ActivityAcknowledgement/useActivityKeysByRead.d.ts.map +0 -1
- package/lib/providers/ActivityAcknowledgement/useActivityKeysByRead.js +0 -15
- package/lib/providers/ActivityAcknowledgement/useGetHasAcknowledgedByActivityKey.d.ts +0 -2
- package/lib/providers/ActivityAcknowledgement/useGetHasAcknowledgedByActivityKey.d.ts.map +0 -1
- package/lib/providers/ActivityAcknowledgement/useGetHasAcknowledgedByActivityKey.js +0 -12
- package/lib/providers/ActivityAcknowledgement/useLastAcknowledgedActivityKey.d.ts +0 -2
- package/lib/providers/ActivityAcknowledgement/useLastAcknowledgedActivityKey.d.ts.map +0 -1
- package/lib/providers/ActivityAcknowledgement/useLastAcknowledgedActivityKey.js +0 -12
- package/lib/providers/ActivityAcknowledgement/useLastReadActivityKey.d.ts +0 -2
- package/lib/providers/ActivityAcknowledgement/useLastReadActivityKey.d.ts.map +0 -1
- package/lib/providers/ActivityAcknowledgement/useLastReadActivityKey.js +0 -12
- package/lib/providers/ActivityAcknowledgement/useMarkActivityKeyAsRead.d.ts +0 -2
- package/lib/providers/ActivityAcknowledgement/useMarkActivityKeyAsRead.d.ts.map +0 -1
- package/lib/providers/ActivityAcknowledgement/useMarkActivityKeyAsRead.js +0 -12
- package/lib/providers/ActivityAcknowledgement/useMarkAllAsAcknowledged.d.ts +0 -2
- package/lib/providers/ActivityAcknowledgement/useMarkAllAsAcknowledged.d.ts.map +0 -1
- package/lib/providers/ActivityAcknowledgement/useMarkAllAsAcknowledged.js +0 -12
- package/lib/providers/ActivityKeyer/ActivityKeyerComposer.d.ts +0 -20
- package/lib/providers/ActivityKeyer/ActivityKeyerComposer.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/ActivityKeyerComposer.js +0 -149
- package/lib/providers/ActivityKeyer/private/Context.d.ts +0 -13
- package/lib/providers/ActivityKeyer/private/Context.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/private/Context.js +0 -10
- package/lib/providers/ActivityKeyer/private/getActivityId.d.ts +0 -3
- package/lib/providers/ActivityKeyer/private/getActivityId.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/private/getActivityId.js +0 -10
- package/lib/providers/ActivityKeyer/private/getClientActivityId.d.ts +0 -3
- package/lib/providers/ActivityKeyer/private/getClientActivityId.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/private/getClientActivityId.js +0 -11
- package/lib/providers/ActivityKeyer/private/lastOf.d.ts +0 -2
- package/lib/providers/ActivityKeyer/private/lastOf.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/private/lastOf.js +0 -10
- package/lib/providers/ActivityKeyer/private/lastOf.spec.d.ts +0 -2
- package/lib/providers/ActivityKeyer/private/lastOf.spec.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/private/someIterable.d.ts +0 -2
- package/lib/providers/ActivityKeyer/private/someIterable.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/private/someIterable.js +0 -27
- package/lib/providers/ActivityKeyer/private/someIterable.spec.d.ts +0 -2
- package/lib/providers/ActivityKeyer/private/someIterable.spec.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/private/uniqueId.d.ts +0 -2
- package/lib/providers/ActivityKeyer/private/uniqueId.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/private/uniqueId.js +0 -15
- package/lib/providers/ActivityKeyer/private/useContext.d.ts +0 -3
- package/lib/providers/ActivityKeyer/private/useContext.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/private/useContext.js +0 -18
- package/lib/providers/ActivityKeyer/useActivityKeys.d.ts +0 -2
- package/lib/providers/ActivityKeyer/useActivityKeys.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/useActivityKeys.js +0 -12
- package/lib/providers/ActivityKeyer/useGetActivitiesByKey.d.ts +0 -3
- package/lib/providers/ActivityKeyer/useGetActivitiesByKey.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/useGetActivitiesByKey.js +0 -12
- package/lib/providers/ActivityKeyer/useGetActivityByKey.d.ts +0 -3
- package/lib/providers/ActivityKeyer/useGetActivityByKey.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/useGetActivityByKey.js +0 -12
- package/lib/providers/ActivityKeyer/useGetKeyByActivity.d.ts +0 -3
- package/lib/providers/ActivityKeyer/useGetKeyByActivity.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/useGetKeyByActivity.js +0 -12
- package/lib/providers/ActivityKeyer/useGetKeyByActivityId.d.ts +0 -2
- package/lib/providers/ActivityKeyer/useGetKeyByActivityId.d.ts.map +0 -1
- package/lib/providers/ActivityKeyer/useGetKeyByActivityId.js +0 -12
- package/lib/providers/ActivityListener/ActivityListenerComposer.d.ts +0 -7
- package/lib/providers/ActivityListener/ActivityListenerComposer.d.ts.map +0 -1
- package/lib/providers/ActivityListener/ActivityListenerComposer.js +0 -55
- package/lib/providers/ActivityListener/private/Context.d.ts +0 -8
- package/lib/providers/ActivityListener/private/Context.d.ts.map +0 -1
- package/lib/providers/ActivityListener/private/Context.js +0 -15
- package/lib/providers/ActivityListener/private/useContext.d.ts +0 -2
- package/lib/providers/ActivityListener/private/useContext.d.ts.map +0 -1
- package/lib/providers/ActivityListener/private/useContext.js +0 -13
- package/lib/providers/ActivityListener/useUpsertedActivities.d.ts +0 -3
- package/lib/providers/ActivityListener/useUpsertedActivities.d.ts.map +0 -1
- package/lib/providers/ActivityListener/useUpsertedActivities.js +0 -12
- package/lib/providers/ActivitySendStatus/ActivitySendStatusComposer.d.ts +0 -4
- package/lib/providers/ActivitySendStatus/ActivitySendStatusComposer.d.ts.map +0 -1
- package/lib/providers/ActivitySendStatus/ActivitySendStatusComposer.js +0 -149
- package/lib/providers/ActivitySendStatus/private/Context.d.ts +0 -9
- package/lib/providers/ActivitySendStatus/private/Context.d.ts.map +0 -1
- package/lib/providers/ActivitySendStatus/private/Context.js +0 -13
- package/lib/providers/ActivitySendStatus/private/isMapEqual.d.ts +0 -7
- package/lib/providers/ActivitySendStatus/private/isMapEqual.d.ts.map +0 -1
- package/lib/providers/ActivitySendStatus/private/isMapEqual.js +0 -55
- package/lib/providers/ActivitySendStatus/private/useContext.d.ts +0 -3
- package/lib/providers/ActivitySendStatus/private/useContext.d.ts.map +0 -1
- package/lib/providers/ActivitySendStatus/private/useContext.js +0 -18
- package/lib/providers/ActivitySendStatus/useSendStatusByActivityKey.d.ts +0 -22
- package/lib/providers/ActivitySendStatus/useSendStatusByActivityKey.d.ts.map +0 -1
- package/lib/providers/ActivitySendStatus/useSendStatusByActivityKey.js +0 -31
- package/lib/providers/ActivitySendStatusTelemetry/ActivitySendStatusTelemetryComposer.d.ts +0 -3
- package/lib/providers/ActivitySendStatusTelemetry/ActivitySendStatusTelemetryComposer.d.ts.map +0 -1
- package/lib/providers/ActivitySendStatusTelemetry/ActivitySendStatusTelemetryComposer.js +0 -71
- package/lib/providers/ActivityTyping/ActivityTypingComposer.d.ts +0 -9
- package/lib/providers/ActivityTyping/ActivityTypingComposer.d.ts.map +0 -1
- package/lib/providers/ActivityTyping/ActivityTypingComposer.js +0 -98
- package/lib/providers/ActivityTyping/private/Context.d.ts +0 -8
- package/lib/providers/ActivityTyping/private/Context.d.ts.map +0 -1
- package/lib/providers/ActivityTyping/private/Context.js +0 -15
- package/lib/providers/ActivityTyping/private/useContext.d.ts +0 -3
- package/lib/providers/ActivityTyping/private/useContext.d.ts.map +0 -1
- package/lib/providers/ActivityTyping/private/useContext.js +0 -13
- package/lib/providers/ActivityTyping/private/useMemoWithPrevious.d.ts +0 -3
- package/lib/providers/ActivityTyping/private/useMemoWithPrevious.d.ts.map +0 -1
- package/lib/providers/ActivityTyping/private/useMemoWithPrevious.js +0 -22
- package/lib/providers/ActivityTyping/types/AllTyping.d.ts +0 -9
- package/lib/providers/ActivityTyping/types/AllTyping.d.ts.map +0 -1
- package/lib/providers/ActivityTyping/types/AllTyping.js +0 -2
- package/lib/providers/ActivityTyping/useAllTyping.d.ts +0 -3
- package/lib/providers/ActivityTyping/useAllTyping.d.ts.map +0 -1
- package/lib/providers/ActivityTyping/useAllTyping.js +0 -12
- package/lib/providers/Ponyfill/PonyfillComposer.d.ts +0 -17
- package/lib/providers/Ponyfill/PonyfillComposer.d.ts.map +0 -1
- package/lib/providers/Ponyfill/PonyfillComposer.js +0 -87
- package/lib/providers/Ponyfill/private/PonyfillContext.d.ts +0 -8
- package/lib/providers/Ponyfill/private/PonyfillContext.d.ts.map +0 -1
- package/lib/providers/Ponyfill/private/PonyfillContext.js +0 -10
- package/lib/providers/Ponyfill/private/useContext.d.ts +0 -6
- package/lib/providers/Ponyfill/private/useContext.d.ts.map +0 -1
- package/lib/providers/Ponyfill/private/useContext.js +0 -17
- package/lib/providers/Ponyfill/usePonyfill.d.ts +0 -3
- package/lib/providers/Ponyfill/usePonyfill.d.ts.map +0 -1
- package/lib/providers/Ponyfill/usePonyfill.js +0 -12
- package/lib/tsconfig.json +0 -18
- package/lib/types/ActivityMiddleware.d.ts +0 -24
- package/lib/types/ActivityMiddleware.d.ts.map +0 -1
- package/lib/types/ActivityMiddleware.js +0 -2
- package/lib/types/ActivityStatusMiddleware.d.ts +0 -17
- package/lib/types/ActivityStatusMiddleware.d.ts.map +0 -1
- package/lib/types/ActivityStatusMiddleware.js +0 -2
- package/lib/types/AttachmentForScreenReaderMiddleware.d.ts +0 -14
- package/lib/types/AttachmentForScreenReaderMiddleware.d.ts.map +0 -1
- package/lib/types/AttachmentForScreenReaderMiddleware.js +0 -2
- package/lib/types/AttachmentMiddleware.d.ts +0 -12
- package/lib/types/AttachmentMiddleware.d.ts.map +0 -1
- package/lib/types/AttachmentMiddleware.js +0 -2
- package/lib/types/AvatarMiddleware.d.ts +0 -15
- package/lib/types/AvatarMiddleware.d.ts.map +0 -1
- package/lib/types/AvatarMiddleware.js +0 -2
- package/lib/types/CardActionMiddleware.d.ts +0 -19
- package/lib/types/CardActionMiddleware.d.ts.map +0 -1
- package/lib/types/CardActionMiddleware.js +0 -2
- package/lib/types/ComponentMiddleware.d.ts +0 -31
- package/lib/types/ComponentMiddleware.d.ts.map +0 -1
- package/lib/types/ComponentMiddleware.js +0 -2
- package/lib/types/ContextOf.d.ts +0 -4
- package/lib/types/ContextOf.d.ts.map +0 -1
- package/lib/types/ContextOf.js +0 -2
- package/lib/types/FunctionMiddleware.d.ts +0 -6
- package/lib/types/FunctionMiddleware.d.ts.map +0 -1
- package/lib/types/FunctionMiddleware.js +0 -2
- package/lib/types/GroupActivitiesMiddleware.d.ts +0 -22
- package/lib/types/GroupActivitiesMiddleware.d.ts.map +0 -1
- package/lib/types/GroupActivitiesMiddleware.js +0 -2
- package/lib/types/LocalizedStrings.d.ts +0 -5
- package/lib/types/LocalizedStrings.d.ts.map +0 -1
- package/lib/types/LocalizedStrings.js +0 -2
- package/lib/types/Notification.d.ts +0 -10
- package/lib/types/Notification.d.ts.map +0 -1
- package/lib/types/Notification.js +0 -2
- package/lib/types/PrecompiledGlobalize.d.ts +0 -13
- package/lib/types/PrecompiledGlobalize.d.ts.map +0 -1
- package/lib/types/PrecompiledGlobalize.js +0 -2
- package/lib/types/ScrollToEndButtonMiddleware.d.ts +0 -30
- package/lib/types/ScrollToEndButtonMiddleware.d.ts.map +0 -1
- package/lib/types/ScrollToEndButtonMiddleware.js +0 -2
- package/lib/types/SendStatus.d.ts +0 -3
- package/lib/types/SendStatus.d.ts.map +0 -1
- package/lib/types/SendStatus.js +0 -2
- package/lib/types/TelemetryMeasurementEvent.d.ts +0 -31
- package/lib/types/TelemetryMeasurementEvent.d.ts.map +0 -1
- package/lib/types/TelemetryMeasurementEvent.js +0 -2
- package/lib/types/ToastMiddleware.d.ts +0 -11
- package/lib/types/ToastMiddleware.d.ts.map +0 -1
- package/lib/types/ToastMiddleware.js +0 -2
- package/lib/types/Typing.d.ts +0 -8
- package/lib/types/Typing.d.ts.map +0 -1
- package/lib/types/Typing.js +0 -2
- package/lib/types/TypingIndicatorMiddleware.d.ts +0 -17
- package/lib/types/TypingIndicatorMiddleware.d.ts.map +0 -1
- package/lib/types/TypingIndicatorMiddleware.js +0 -2
- package/lib/types/WebSpeechPonyfill.d.ts +0 -19
- package/lib/types/WebSpeechPonyfill.d.ts.map +0 -1
- package/lib/types/WebSpeechPonyfill.js +0 -2
- package/lib/types/WebSpeechPonyfillFactory.d.ts +0 -6
- package/lib/types/WebSpeechPonyfillFactory.d.ts.map +0 -1
- package/lib/types/WebSpeechPonyfillFactory.js +0 -2
- package/lib/utils/createCustomEvent.d.ts +0 -4
- package/lib/utils/createCustomEvent.d.ts.map +0 -1
- package/lib/utils/createCustomEvent.js +0 -34
- package/lib/utils/findLastIndex.d.ts +0 -2
- package/lib/utils/findLastIndex.d.ts.map +0 -1
- package/lib/utils/findLastIndex.js +0 -22
- package/lib/utils/findMin.d.ts +0 -7
- package/lib/utils/findMin.d.ts.map +0 -1
- package/lib/utils/findMin.js +0 -46
- package/lib/utils/freezeArray.d.ts +0 -8
- package/lib/utils/freezeArray.d.ts.map +0 -1
- package/lib/utils/freezeArray.js +0 -19
- package/lib/utils/isObject.js +0 -12
- package/lib/utils/mapMap.d.ts +0 -6
- package/lib/utils/mapMap.d.ts.map +0 -1
- package/lib/utils/mapMap.js +0 -27
- package/lib/utils/normalizeLanguage.d.ts +0 -2
- package/lib/utils/normalizeLanguage.d.ts.map +0 -1
- package/lib/utils/normalizeLanguage.js +0 -115
- package/lib/utils/randomId.d.ts +0 -2
- package/lib/utils/randomId.d.ts.map +0 -1
- package/lib/utils/randomId.js +0 -15
- package/lib/utils/warnOnce.d.ts +0 -2
- package/lib/utils/warnOnce.d.ts.map +0 -1
- package/lib/utils/warnOnce.js +0 -16
- package/src/decorator/index.ts +0 -4
- package/src/decorator/private/ActivityBorderDecoratorMiddleware.ts +0 -31
- package/src/decorator/private/ActivityDecorator.tsx +0 -31
- package/src/decorator/private/DecoratorComposer.tsx +0 -6
- package/src/decorator/private/activityDecoratorRequest.ts +0 -6
- package/src/decorator/private/createDecoratorComposer.tsx +0 -36
- package/src/decorator/private/templateMiddleware.ts +0 -58
- package/src/hooks/internal/ErrorBox.js +0 -34
- package/src/hooks/internal/SendBoxMiddleware.ts +0 -21
- package/src/hooks/internal/SendBoxToolbarMiddleware.ts +0 -21
- package/src/hooks/internal/private/templateMiddleware.ts +0 -4
- package/src/hooks/internal/useCreateActivityRendererInternal.ts +0 -46
- package/src/hooks/internal/useDebugDeps.js +0 -30
- package/src/hooks/internal/useErrorBoxClass.js +0 -7
- package/src/hooks/middleware/createDefaultGroupActivitiesMiddleware.ts +0 -75
- package/src/hooks/useGroupActivities.ts +0 -10
- package/src/internal.ts +0 -3
- package/src/patchStyleOptionsFromDeprecatedProps.js +0 -14
- package/src/providers/ActivityTyping/private/useMemoWithPrevious.ts +0 -17
- package/src/types/ActivityMiddleware.ts +0 -36
- package/src/types/AttachmentMiddleware.ts +0 -16
- package/src/utils/isObject.js +0 -5
- package/src/utils/warnOnce.ts +0 -10
- /package/dist/{chunk-J6D5YEY6.mjs.map → botframework-webchat-api.graph.mjs.map} +0 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { L as LegacyActivityMiddleware, a as LegacyAttachmentMiddleware, b as LegacyRenderAttachment } from './_dtsroll-chunks/DnThgHcF-botframework-webchat-api-middleware.js';
|
|
2
|
+
import { Polymiddleware } from './botframework-webchat-api.middleware.mjs';
|
|
3
|
+
export { c as ActivityComponentFactory } from './_dtsroll-chunks/DnThgHcF-botframework-webchat-api-middleware.js';
|
|
4
|
+
import { S as SendStatus, C as ComponentFactory, a as ComponentMiddleware, d as AttachmentForScreenReaderMiddleware, e as CardActionMiddleware, A as AttachmentForScreenReaderComponentFactory, b as CallFunction, P as PerformCardAction, c as ScrollToEndButtonComponentFactory, N as Notification, R as RenderToast, F as FunctionMiddleware, f as ScrollToEndButtonMiddleware, T as ToastMiddleware, g as TypingIndicatorMiddleware } from './hook-C8NHjp6P.js';
|
|
5
|
+
export { h as ActivityStatusRenderer, D as DebouncedNotification, i as DebouncedNotifications, j as PostActivityFile, k as RenderTypingIndicator, l as Typing, m as hooks } from './hook-C8NHjp6P.js';
|
|
6
|
+
import { a as StrictStyleOptions, S as StyleOptions } from './StyleOptions-4TkRjGbQ.js';
|
|
7
|
+
import { O as OneOrMany } from './_dtsroll-chunks/N-ttGLxs-botframework-webchat-base.utils.js';
|
|
8
|
+
import { WebChatActivity, DirectLineJSBotConnection, Observable, sendFiles, sendMessage, setSendBoxAttachments, GlobalScopePonyfill } from 'botframework-webchat-core';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import * as react from 'react';
|
|
11
|
+
import react__default, { ReactElement, ReactNode, Context } from 'react';
|
|
12
|
+
import * as react_chain_of_responsibility from 'react-chain-of-responsibility';
|
|
13
|
+
import { E as Enhancer$1 } from './_dtsroll-chunks/Dtb0H_Ee-handler-chain.js';
|
|
14
|
+
import { I as InferMiddleware, a as InferProps, b as InferRequest } from './templateMiddleware-BEttHPJk.js';
|
|
15
|
+
import { _ as __INTERNAL_DO_NOT_USE__legacyAvatarMiddlewareOriginalRequestSymbol } from './_dtsroll-chunks/B1b7R2eH-avatarMiddleware-CHa011_j.js';
|
|
16
|
+
import { AvatarPolymiddlewareRequest } from './botframework-webchat-api.middleware.mjs';
|
|
17
|
+
import 'valibot';
|
|
18
|
+
import 'react-chain-of-responsibility/preview';
|
|
19
|
+
import './_dtsroll-chunks/CEcj2Npa-botframework-webchat-redux-store.js';
|
|
20
|
+
|
|
21
|
+
declare const DEFAULT_OPTIONS: StrictStyleOptions;
|
|
22
|
+
|
|
23
|
+
declare const template$1: {
|
|
24
|
+
createMiddleware: (enhancer: Enhancer$1<false | react.ComponentType<{
|
|
25
|
+
className?: string | undefined;
|
|
26
|
+
}>, void>) => react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
27
|
+
className?: string | undefined;
|
|
28
|
+
}, string>;
|
|
29
|
+
extractMiddleware: (middleware: readonly ((init: string) => false | Enhancer$1<false | react.ComponentType<unknown>, unknown>)[] | undefined) => readonly react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
30
|
+
className?: string | undefined;
|
|
31
|
+
}, string>[];
|
|
32
|
+
Provider: react.MemoExoticComponent<({ children, middleware }: {
|
|
33
|
+
readonly children?: react.ReactNode | undefined;
|
|
34
|
+
readonly middleware: readonly react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
35
|
+
className?: string | undefined;
|
|
36
|
+
}, string>[];
|
|
37
|
+
}) => react.JSX.Element>;
|
|
38
|
+
Proxy: react.ComponentType<{
|
|
39
|
+
className?: string | undefined;
|
|
40
|
+
} & {
|
|
41
|
+
readonly fallbackComponent?: react.ComponentType<{
|
|
42
|
+
className?: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
readonly request: void;
|
|
45
|
+
}>;
|
|
46
|
+
'~types': {
|
|
47
|
+
middleware: react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
48
|
+
className?: string | undefined;
|
|
49
|
+
}, string>;
|
|
50
|
+
props: {
|
|
51
|
+
className?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
request: void;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
declare const extractSendBoxMiddleware: (middleware: readonly ((init: string) => false | Enhancer$1<false | react.ComponentType<unknown>, unknown>)[] | undefined) => readonly react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
57
|
+
className?: string | undefined;
|
|
58
|
+
}, string>[];
|
|
59
|
+
declare const SendBoxMiddlewareProxy: react.ComponentType<{
|
|
60
|
+
className?: string | undefined;
|
|
61
|
+
} & {
|
|
62
|
+
readonly fallbackComponent?: react.ComponentType<{
|
|
63
|
+
className?: string | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
readonly request: void;
|
|
66
|
+
}>;
|
|
67
|
+
type SendBoxMiddleware = InferMiddleware<typeof template$1>;
|
|
68
|
+
type SendBoxMiddlewareProps = InferProps<typeof template$1>;
|
|
69
|
+
type SendBoxMiddlewareRequest = InferRequest<typeof template$1>;
|
|
70
|
+
|
|
71
|
+
declare const template: {
|
|
72
|
+
createMiddleware: (enhancer: Enhancer$1<false | react.ComponentType<{
|
|
73
|
+
className?: string | undefined;
|
|
74
|
+
}>, void>) => react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
75
|
+
className?: string | undefined;
|
|
76
|
+
}, string>;
|
|
77
|
+
extractMiddleware: (middleware: readonly ((init: string) => false | Enhancer$1<false | react.ComponentType<unknown>, unknown>)[] | undefined) => readonly react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
78
|
+
className?: string | undefined;
|
|
79
|
+
}, string>[];
|
|
80
|
+
Provider: react.MemoExoticComponent<({ children, middleware }: {
|
|
81
|
+
readonly children?: react.ReactNode | undefined;
|
|
82
|
+
readonly middleware: readonly react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
83
|
+
className?: string | undefined;
|
|
84
|
+
}, string>[];
|
|
85
|
+
}) => react.JSX.Element>;
|
|
86
|
+
Proxy: react.ComponentType<{
|
|
87
|
+
className?: string | undefined;
|
|
88
|
+
} & {
|
|
89
|
+
readonly fallbackComponent?: react.ComponentType<{
|
|
90
|
+
className?: string | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
readonly request: void;
|
|
93
|
+
}>;
|
|
94
|
+
'~types': {
|
|
95
|
+
middleware: react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
96
|
+
className?: string | undefined;
|
|
97
|
+
}, string>;
|
|
98
|
+
props: {
|
|
99
|
+
className?: string | undefined;
|
|
100
|
+
};
|
|
101
|
+
request: void;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
declare const extractSendBoxToolbarMiddleware: (middleware: readonly ((init: string) => false | Enhancer$1<false | react.ComponentType<unknown>, unknown>)[] | undefined) => readonly react_chain_of_responsibility.ComponentMiddleware<void, {
|
|
105
|
+
className?: string | undefined;
|
|
106
|
+
}, string>[];
|
|
107
|
+
declare const SendBoxToolbarMiddlewareProxy: react.ComponentType<{
|
|
108
|
+
className?: string | undefined;
|
|
109
|
+
} & {
|
|
110
|
+
readonly fallbackComponent?: react.ComponentType<{
|
|
111
|
+
className?: string | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
readonly request: void;
|
|
114
|
+
}>;
|
|
115
|
+
type SendBoxToolbarMiddleware = InferMiddleware<typeof template>;
|
|
116
|
+
type SendBoxToolbarMiddlewareProps = InferProps<typeof template>;
|
|
117
|
+
type SendBoxToolbarMiddlewareRequest = InferRequest<typeof template>;
|
|
118
|
+
|
|
119
|
+
type RenderActivityStatusOptions = {
|
|
120
|
+
activity: WebChatActivity;
|
|
121
|
+
hideTimestamp: boolean;
|
|
122
|
+
sendState: SendStatus;
|
|
123
|
+
};
|
|
124
|
+
type RenderActivityStatus = (options: RenderActivityStatusOptions) => ReactElement;
|
|
125
|
+
type ActivityStatusEnhancer = (next: RenderActivityStatus) => RenderActivityStatus;
|
|
126
|
+
type ActivityStatusMiddleware = () => ActivityStatusEnhancer;
|
|
127
|
+
|
|
128
|
+
type AvatarComponentFactoryArguments = [
|
|
129
|
+
{
|
|
130
|
+
[__INTERNAL_DO_NOT_USE__legacyAvatarMiddlewareOriginalRequestSymbol]: AvatarPolymiddlewareRequest;
|
|
131
|
+
activity: WebChatActivity;
|
|
132
|
+
fromUser: boolean;
|
|
133
|
+
styleOptions: StrictStyleOptions;
|
|
134
|
+
}
|
|
135
|
+
];
|
|
136
|
+
type AvatarComponentFactory = ComponentFactory<AvatarComponentFactoryArguments, {}>;
|
|
137
|
+
type AvatarMiddleware = ComponentMiddleware<[], AvatarComponentFactoryArguments, {}>;
|
|
138
|
+
|
|
139
|
+
type ContextOf<T> = T extends Context<infer P> ? P : never;
|
|
140
|
+
|
|
141
|
+
type GroupedActivities = readonly (readonly WebChatActivity[])[];
|
|
142
|
+
type GroupActivities = CallFunction<[
|
|
143
|
+
Readonly<{
|
|
144
|
+
activities: readonly WebChatActivity[];
|
|
145
|
+
}>
|
|
146
|
+
], {
|
|
147
|
+
[key: string]: GroupedActivities;
|
|
148
|
+
}>;
|
|
149
|
+
type GroupActivitiesMiddleware = FunctionMiddleware<[
|
|
150
|
+
string
|
|
151
|
+
], [
|
|
152
|
+
Readonly<{
|
|
153
|
+
activities: readonly WebChatActivity[];
|
|
154
|
+
}>
|
|
155
|
+
], {
|
|
156
|
+
[key: string]: GroupedActivities;
|
|
157
|
+
}>;
|
|
158
|
+
|
|
159
|
+
type LocalizedStrings = {
|
|
160
|
+
[stringId: string]: boolean | string;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
type BaseTelemetryMeasurementEvent = {
|
|
164
|
+
dimension?: any;
|
|
165
|
+
};
|
|
166
|
+
type TelemetryEventMeasurementEvent = BaseTelemetryMeasurementEvent & {
|
|
167
|
+
type: 'event';
|
|
168
|
+
name: string;
|
|
169
|
+
level: 'debug' | 'info' | 'warn' | 'error';
|
|
170
|
+
data?: number | string | {
|
|
171
|
+
[key: string]: number | string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
type TelemetryExceptionMeasurementEvent = BaseTelemetryMeasurementEvent & {
|
|
175
|
+
type: 'exception';
|
|
176
|
+
error: Error;
|
|
177
|
+
fatal: boolean;
|
|
178
|
+
};
|
|
179
|
+
type TelemetryTimingStartMeasurementEvent = BaseTelemetryMeasurementEvent & {
|
|
180
|
+
type: 'timingstart';
|
|
181
|
+
name: string;
|
|
182
|
+
timingId: string;
|
|
183
|
+
};
|
|
184
|
+
type TelemetryTimingEndMeasurementEvent = BaseTelemetryMeasurementEvent & {
|
|
185
|
+
type: 'timingend';
|
|
186
|
+
name: string;
|
|
187
|
+
timingId: string;
|
|
188
|
+
duration: number;
|
|
189
|
+
};
|
|
190
|
+
type TelemetryMeasurementEvent = TelemetryEventMeasurementEvent | TelemetryExceptionMeasurementEvent | TelemetryTimingStartMeasurementEvent | TelemetryTimingEndMeasurementEvent;
|
|
191
|
+
|
|
192
|
+
type PrecompiledGlobalize = {
|
|
193
|
+
dateFormatter: ({ skeleton }: {
|
|
194
|
+
skeleton: 'MMMMdhm';
|
|
195
|
+
}) => string;
|
|
196
|
+
relativeTimeFormatter: (format: 'hour' | 'minute') => string;
|
|
197
|
+
unitFormatter: ((unit: 'byte', options: {
|
|
198
|
+
form: 'long';
|
|
199
|
+
}) => string) | ((unit: 'kilobyte' | 'megabyte' | 'gigabyte', options: {
|
|
200
|
+
form: 'short';
|
|
201
|
+
}) => string);
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
type WebChatAPIContextType = {
|
|
205
|
+
activityStatusRenderer: RenderActivityStatus;
|
|
206
|
+
attachmentForScreenReaderRenderer?: AttachmentForScreenReaderComponentFactory;
|
|
207
|
+
attachmentRenderer?: LegacyRenderAttachment;
|
|
208
|
+
clearSuggestedActions?: () => void;
|
|
209
|
+
dir?: string;
|
|
210
|
+
directLine?: DirectLineJSBotConnection;
|
|
211
|
+
dismissNotification?: (id: string) => void;
|
|
212
|
+
downscaleImageToDataURL?: (blob: Blob, maxWidth: number, maxHeight: number, type: string, quality: number) => Promise<URL>;
|
|
213
|
+
emitTypingIndicator?: () => void;
|
|
214
|
+
grammars?: any;
|
|
215
|
+
groupActivities?: GroupActivities;
|
|
216
|
+
language?: string;
|
|
217
|
+
localizedGlobalizeState?: PrecompiledGlobalize[];
|
|
218
|
+
localizedStrings?: {
|
|
219
|
+
[language: string]: LocalizedStrings;
|
|
220
|
+
};
|
|
221
|
+
markActivity?: (activity: {
|
|
222
|
+
id: string;
|
|
223
|
+
}, name: string, value?: any) => void;
|
|
224
|
+
onCardAction?: PerformCardAction;
|
|
225
|
+
onTelemetry?: (event: TelemetryMeasurementEvent) => void;
|
|
226
|
+
postActivity?: (activity: WebChatActivity) => Observable<string>;
|
|
227
|
+
renderMarkdown?: (markdown: string, newLineOptions: {
|
|
228
|
+
markdownRespectCRLF: boolean;
|
|
229
|
+
}, linkOptions: {
|
|
230
|
+
externalLinkAlt: string;
|
|
231
|
+
}) => string;
|
|
232
|
+
scrollToEndButtonRenderer?: ScrollToEndButtonComponentFactory;
|
|
233
|
+
selectVoice?: (voices: (typeof window.SpeechSynthesisVoice)[], activity: WebChatActivity) => typeof window.SpeechSynthesisVoice;
|
|
234
|
+
sendEvent?: (name: string, value: any) => void;
|
|
235
|
+
sendFiles?: (...args: Parameters<typeof sendFiles>) => void;
|
|
236
|
+
sendMessage?: (...args: Parameters<typeof sendMessage>) => void;
|
|
237
|
+
sendMessageBack?: (value: any, text?: string, displayText?: string) => void;
|
|
238
|
+
sendPostBack?: (value?: any) => void;
|
|
239
|
+
sendTypingIndicator?: boolean;
|
|
240
|
+
setDictateInterims?: (interims: string[]) => void;
|
|
241
|
+
setDictateState?: (dictateState: number) => void;
|
|
242
|
+
setNotification?: (notification: Notification) => void;
|
|
243
|
+
setSendBox?: (value: string) => void;
|
|
244
|
+
setSendBoxAttachments?: (...args: Parameters<typeof setSendBoxAttachments>) => void;
|
|
245
|
+
setSendTimeout?: (timeout: number) => void;
|
|
246
|
+
startDictate?: () => void;
|
|
247
|
+
startSpeakingActivity?: () => void;
|
|
248
|
+
startVoice?: () => void;
|
|
249
|
+
stopDictate?: () => void;
|
|
250
|
+
stopSpeakingActivity?: () => void;
|
|
251
|
+
stopVoice?: () => void;
|
|
252
|
+
submitSendBox?: (method?: string, { channelData }?: {
|
|
253
|
+
channelData: any;
|
|
254
|
+
}) => void;
|
|
255
|
+
telemetryDimensionsRef?: React.Ref<any>;
|
|
256
|
+
toastRenderer?: RenderToast;
|
|
257
|
+
trackDimension?: (name: string, data: any) => void;
|
|
258
|
+
typingIndicatorRenderer?: any;
|
|
259
|
+
uiState: 'blueprint' | 'disabled' | undefined;
|
|
260
|
+
userID?: string;
|
|
261
|
+
username?: string;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
type ComposerCoreProps = Readonly<{
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated Use `polymiddleware` instead. The `activityMiddleware` prop is being deprecated, please use `polymiddleware` instead. This prop will be removed on or after 2027-08-21.
|
|
267
|
+
*/
|
|
268
|
+
activityMiddleware?: OneOrMany<LegacyActivityMiddleware> | undefined;
|
|
269
|
+
activityStatusMiddleware?: OneOrMany<ActivityStatusMiddleware> | undefined;
|
|
270
|
+
attachmentForScreenReaderMiddleware?: OneOrMany<AttachmentForScreenReaderMiddleware> | undefined;
|
|
271
|
+
attachmentMiddleware?: OneOrMany<LegacyAttachmentMiddleware> | undefined;
|
|
272
|
+
/**
|
|
273
|
+
* @deprecated Use `polymiddleware` instead. The `avatarMiddleware` prop is being deprecated, please use `polymiddleware` instead. This prop will be removed on or after 2028-03-16.
|
|
274
|
+
*/
|
|
275
|
+
avatarMiddleware?: OneOrMany<AvatarMiddleware> | undefined;
|
|
276
|
+
cardActionMiddleware?: OneOrMany<CardActionMiddleware> | undefined;
|
|
277
|
+
children?: ReactNode | ((context: ContextOf<react__default.Context<WebChatAPIContextType>>) => ReactNode);
|
|
278
|
+
dir?: string;
|
|
279
|
+
directLine: DirectLineJSBotConnection;
|
|
280
|
+
/**
|
|
281
|
+
* @deprecated Please use `uiState="disabled"` instead. This feature will be removed on or after 2026-09-04.
|
|
282
|
+
*/
|
|
283
|
+
disabled?: boolean;
|
|
284
|
+
downscaleImageToDataURL?: (blob: Blob, maxWidth: number, maxHeight: number, type: string, quality: number) => Promise<URL>;
|
|
285
|
+
grammars?: any;
|
|
286
|
+
groupActivitiesMiddleware?: OneOrMany<GroupActivitiesMiddleware> | undefined;
|
|
287
|
+
locale?: string;
|
|
288
|
+
polymiddleware?: readonly Polymiddleware[] | undefined;
|
|
289
|
+
onTelemetry?: (event: TelemetryMeasurementEvent) => void;
|
|
290
|
+
overrideLocalizedStrings?: LocalizedStrings | ((strings: LocalizedStrings, language: string) => LocalizedStrings);
|
|
291
|
+
renderMarkdown?: (markdown: string, newLineOptions: {
|
|
292
|
+
markdownRespectCRLF: boolean;
|
|
293
|
+
}, linkOptions: {
|
|
294
|
+
externalLinkAlt: string;
|
|
295
|
+
}) => string;
|
|
296
|
+
scrollToEndButtonMiddleware?: OneOrMany<ScrollToEndButtonMiddleware> | undefined;
|
|
297
|
+
selectVoice?: (voices: (typeof window.SpeechSynthesisVoice)[], activity: WebChatActivity) => void;
|
|
298
|
+
sendBoxMiddleware?: readonly SendBoxMiddleware[] | undefined;
|
|
299
|
+
sendBoxToolbarMiddleware?: readonly SendBoxToolbarMiddleware[] | undefined;
|
|
300
|
+
sendTypingIndicator?: boolean;
|
|
301
|
+
toastMiddleware?: OneOrMany<ToastMiddleware> | undefined;
|
|
302
|
+
typingIndicatorMiddleware?: OneOrMany<TypingIndicatorMiddleware> | undefined;
|
|
303
|
+
/**
|
|
304
|
+
* Sets the state of the UI.
|
|
305
|
+
*
|
|
306
|
+
* - `undefined` will render normally
|
|
307
|
+
* - `"blueprint"` will render as few UI elements as possible and should be non-functional
|
|
308
|
+
* - Useful for loading scenarios
|
|
309
|
+
* - `"disabled"` will render most UI elements as non-functional
|
|
310
|
+
* - Scrolling may continue to trigger read acknowledgements
|
|
311
|
+
*/
|
|
312
|
+
uiState?: 'blueprint' | 'disabled' | undefined;
|
|
313
|
+
userID?: string;
|
|
314
|
+
username?: string;
|
|
315
|
+
}>;
|
|
316
|
+
type ComposerWithStoreProps = ComposerCoreProps & Readonly<{
|
|
317
|
+
store?: any;
|
|
318
|
+
}>;
|
|
319
|
+
type ComposerProps = ComposerWithStoreProps & {
|
|
320
|
+
readonly internalRenderErrorBox?: any;
|
|
321
|
+
/**
|
|
322
|
+
* Ponyfill to overrides specific global scope members. This prop cannot be changed after initial render.
|
|
323
|
+
*
|
|
324
|
+
* This option is for development use only. Not all features in Web Chat are ponyfilled.
|
|
325
|
+
*
|
|
326
|
+
* To fake timers, `setTimeout` and related functions can be passed to overrides the original global scope members.
|
|
327
|
+
*
|
|
328
|
+
* Please see [#4662](https://github.com/microsoft/BotFramework-WebChat/pull/4662) for details.
|
|
329
|
+
*/
|
|
330
|
+
readonly ponyfill?: Partial<GlobalScopePonyfill> | undefined;
|
|
331
|
+
readonly styleOptions?: StyleOptions | undefined;
|
|
332
|
+
};
|
|
333
|
+
declare const Composer: {
|
|
334
|
+
({ internalRenderErrorBox, onTelemetry, ponyfill, styleOptions, ...props }: ComposerProps): any;
|
|
335
|
+
defaultProps: {
|
|
336
|
+
internalRenderErrorBox: any;
|
|
337
|
+
onTelemetry: any;
|
|
338
|
+
ponyfill: any;
|
|
339
|
+
store: any;
|
|
340
|
+
};
|
|
341
|
+
propTypes: {
|
|
342
|
+
internalRenderErrorBox: PropTypes.Requireable<any>;
|
|
343
|
+
onTelemetry: PropTypes.Requireable<(...args: any[]) => any>;
|
|
344
|
+
ponyfill: PropTypes.Requireable<any>;
|
|
345
|
+
store: PropTypes.Requireable<any>;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
type Work<T> = (...args: unknown[]) => T;
|
|
350
|
+
type Enhancer<T> = (next: Work<T>) => Work<T>;
|
|
351
|
+
type Middleware<Setup, Result> = (setup: Setup) => Enhancer<Result>;
|
|
352
|
+
declare function concatMiddleware<Setup, Result>(...middleware: readonly Middleware<Setup, Result>[]): Middleware<Setup, Result>;
|
|
353
|
+
|
|
354
|
+
declare function localize(id: string, language: string, ...args: string[]): string | boolean;
|
|
355
|
+
|
|
356
|
+
declare function normalizeStyleOptions({ bubbleImageHeight, bubbleMaxWidth, bubbleMinWidth, disableFileUpload, hideUploadButton, slowConnectionAfter, ...options }?: StyleOptions): StrictStyleOptions;
|
|
357
|
+
|
|
358
|
+
type WebSpeechPonyfill = {
|
|
359
|
+
/**
|
|
360
|
+
* Function to resume `AudioContext` object when called.
|
|
361
|
+
*
|
|
362
|
+
* Web Chat will call this function on user gestures to resume suspended `AudioContext`.
|
|
363
|
+
*/
|
|
364
|
+
resumeAudioContext?: () => Promise<void>;
|
|
365
|
+
/** Polyfill for Web Speech API `SpeechGrammarList` class. */
|
|
366
|
+
SpeechGrammarList?: typeof SpeechGrammarList;
|
|
367
|
+
/** Polyfill for Web Speech API `SpeechRecognition` class. */
|
|
368
|
+
SpeechRecognition?: typeof SpeechRecognition;
|
|
369
|
+
/** Polyfill for Web Speech API `speechSynthesis` instance. */
|
|
370
|
+
speechSynthesis?: SpeechSynthesis;
|
|
371
|
+
/** Polyfill for Web Speech API `SpeechSynthesisUtterance` class. */
|
|
372
|
+
SpeechSynthesisUtterance?: typeof SpeechSynthesisUtterance;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
type WebSpeechPonyfillFactory = ({ referenceGrammarID }: {
|
|
376
|
+
referenceGrammarID?: string;
|
|
377
|
+
}) => WebSpeechPonyfill;
|
|
378
|
+
|
|
379
|
+
declare const buildInfoObject: {
|
|
380
|
+
readonly buildTool?: string | undefined;
|
|
381
|
+
readonly moduleFormat?: string | undefined;
|
|
382
|
+
readonly version?: string | undefined;
|
|
383
|
+
};
|
|
384
|
+
declare const version: string;
|
|
385
|
+
|
|
386
|
+
export { LegacyActivityMiddleware as ActivityMiddleware, AttachmentForScreenReaderComponentFactory, AttachmentForScreenReaderMiddleware, LegacyAttachmentMiddleware as AttachmentMiddleware, CardActionMiddleware, Composer, Notification, PerformCardAction, LegacyRenderAttachment as RenderAttachment, RenderToast, ScrollToEndButtonComponentFactory, ScrollToEndButtonMiddleware, SendBoxMiddlewareProxy, SendBoxToolbarMiddlewareProxy, SendStatus, StrictStyleOptions, StyleOptions, ToastMiddleware, TypingIndicatorMiddleware, buildInfoObject as buildInfo, concatMiddleware, DEFAULT_OPTIONS as defaultStyleOptions, extractSendBoxMiddleware, extractSendBoxToolbarMiddleware, localize, normalizeStyleOptions, version };
|
|
387
|
+
export type { ActivityStatusMiddleware, AvatarComponentFactory, AvatarMiddleware, ComposerProps, ContextOf, GroupActivities, GroupActivitiesMiddleware, RenderActivityStatus, SendBoxMiddleware, SendBoxMiddlewareProps, SendBoxMiddlewareRequest, SendBoxToolbarMiddleware, SendBoxToolbarMiddlewareProps, SendBoxToolbarMiddlewareRequest, WebSpeechPonyfill, WebSpeechPonyfillFactory };
|
|
@@ -1,36 +1,81 @@
|
|
|
1
|
+
import * as valibot from 'valibot';
|
|
2
|
+
import { InferInput } from 'valibot';
|
|
1
3
|
import * as react from 'react';
|
|
2
4
|
import react__default, { ReactNode } from 'react';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
+
import { D as DecoratorMiddleware } from './types-BZzd7aAk.mjs';
|
|
6
|
+
export { c as createActivityBorderMiddleware, a as createActivityGroupingMiddleware } from './types-BZzd7aAk.mjs';
|
|
5
7
|
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';
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
declare const decoratorComposerPropsSchema: valibot.SchemaWithPipe<readonly [valibot.ObjectSchema<{
|
|
13
|
+
readonly children: valibot.OptionalSchema<valibot.CustomSchema<react__default.ReactNode, undefined>, undefined>;
|
|
14
|
+
readonly middleware: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.ArraySchema<valibot.CustomSchema<DecoratorMiddleware, undefined>, undefined>, valibot.ReadonlyAction<DecoratorMiddleware[]>]>, undefined>;
|
|
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;
|
|
10
21
|
};
|
|
22
|
+
declare function DecoratorComposer(props: DecoratorComposerProps): react__default.JSX.Element;
|
|
23
|
+
declare const _default$2: react__default.MemoExoticComponent<typeof DecoratorComposer>;
|
|
11
24
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
type ActivityBorderDecoratorRequest = Readonly<{
|
|
26
|
+
/**
|
|
27
|
+
* Decorate the activity as it participate in a livestreaming session.
|
|
28
|
+
*
|
|
29
|
+
* - `"completing"` - decorate as the livestreaming is completing
|
|
30
|
+
* - `"ongoing"` - decorate as the livestreaming is ongoing
|
|
31
|
+
* - `"preparing"` - decorate as the livestreaming is being prepared
|
|
32
|
+
* - `undefined` - not participated in a livestreaming session
|
|
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
|
+
}>>;
|
|
20
55
|
|
|
21
|
-
type
|
|
22
|
-
|
|
23
|
-
children?: ReactNode;
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
56
|
+
type ActivityBorderDecoratorProps = Readonly<{
|
|
57
|
+
activity?: WebChatActivity | undefined;
|
|
58
|
+
children?: ReactNode | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
declare function ActivityBorderDecorator({ activity, children }: ActivityBorderDecoratorProps): react__default.JSX.Element;
|
|
61
|
+
declare const _default$1: react__default.MemoExoticComponent<typeof ActivityBorderDecorator>;
|
|
27
62
|
|
|
28
|
-
declare
|
|
63
|
+
declare function useDecoratorRequest(type: typeof ActivityBorderDecoratorRequestContext): Readonly<{
|
|
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;
|
|
29
71
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
children?: ReactNode;
|
|
33
|
-
|
|
34
|
-
|
|
72
|
+
type ActivityGroupingDecoratorProps = Readonly<{
|
|
73
|
+
activities: readonly WebChatActivity[];
|
|
74
|
+
children?: ReactNode | undefined;
|
|
75
|
+
groupingName: string;
|
|
76
|
+
}>;
|
|
77
|
+
declare function ActivityGroupingDecorator({ activities, children, groupingName }: ActivityGroupingDecoratorProps): react__default.JSX.Element;
|
|
78
|
+
declare const _default: react__default.MemoExoticComponent<typeof ActivityGroupingDecorator>;
|
|
35
79
|
|
|
36
|
-
export { _default as
|
|
80
|
+
export { _default$1 as ActivityBorderDecorator, ActivityBorderDecoratorRequestContext as ActivityBorderDecoratorRequest, _default as ActivityGroupingDecorator, _default$2 as DecoratorComposer, DecoratorMiddleware, useDecoratorRequest };
|
|
81
|
+
export type { ActivityBorderDecoratorProps, InferDecoratorRequest };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as valibot from 'valibot';
|
|
2
|
+
import { InferInput } from 'valibot';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import react__default, { ReactNode } from 'react';
|
|
5
|
+
import { D as DecoratorMiddleware } from './types-BKuj7f2p.js';
|
|
6
|
+
export { c as createActivityBorderMiddleware, a as createActivityGroupingMiddleware } from './types-BKuj7f2p.js';
|
|
7
|
+
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.js';
|
|
11
|
+
|
|
12
|
+
declare const decoratorComposerPropsSchema: valibot.SchemaWithPipe<readonly [valibot.ObjectSchema<{
|
|
13
|
+
readonly children: valibot.OptionalSchema<valibot.CustomSchema<react__default.ReactNode, undefined>, undefined>;
|
|
14
|
+
readonly middleware: valibot.OptionalSchema<valibot.SchemaWithPipe<readonly [valibot.ArraySchema<valibot.CustomSchema<DecoratorMiddleware, undefined>, undefined>, valibot.ReadonlyAction<DecoratorMiddleware[]>]>, undefined>;
|
|
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;
|
|
21
|
+
};
|
|
22
|
+
declare function DecoratorComposer(props: DecoratorComposerProps): react__default.JSX.Element;
|
|
23
|
+
declare const _default$2: react__default.MemoExoticComponent<typeof DecoratorComposer>;
|
|
24
|
+
|
|
25
|
+
type ActivityBorderDecoratorRequest = Readonly<{
|
|
26
|
+
/**
|
|
27
|
+
* Decorate the activity as it participate in a livestreaming session.
|
|
28
|
+
*
|
|
29
|
+
* - `"completing"` - decorate as the livestreaming is completing
|
|
30
|
+
* - `"ongoing"` - decorate as the livestreaming is ongoing
|
|
31
|
+
* - `"preparing"` - decorate as the livestreaming is being prepared
|
|
32
|
+
* - `undefined` - not participated in a livestreaming session
|
|
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
|
+
}>>;
|
|
55
|
+
|
|
56
|
+
type ActivityBorderDecoratorProps = Readonly<{
|
|
57
|
+
activity?: WebChatActivity | undefined;
|
|
58
|
+
children?: ReactNode | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
declare function ActivityBorderDecorator({ activity, children }: ActivityBorderDecoratorProps): react__default.JSX.Element;
|
|
61
|
+
declare const _default$1: react__default.MemoExoticComponent<typeof ActivityBorderDecorator>;
|
|
62
|
+
|
|
63
|
+
declare function useDecoratorRequest(type: typeof ActivityBorderDecoratorRequestContext): Readonly<{
|
|
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;
|
|
71
|
+
|
|
72
|
+
type ActivityGroupingDecoratorProps = Readonly<{
|
|
73
|
+
activities: readonly WebChatActivity[];
|
|
74
|
+
children?: ReactNode | undefined;
|
|
75
|
+
groupingName: string;
|
|
76
|
+
}>;
|
|
77
|
+
declare function ActivityGroupingDecorator({ activities, children, groupingName }: ActivityGroupingDecoratorProps): react__default.JSX.Element;
|
|
78
|
+
declare const _default: react__default.MemoExoticComponent<typeof ActivityGroupingDecorator>;
|
|
79
|
+
|
|
80
|
+
export { _default$1 as ActivityBorderDecorator, ActivityBorderDecoratorRequestContext as ActivityBorderDecoratorRequest, _default as ActivityGroupingDecorator, _default$2 as DecoratorComposer, DecoratorMiddleware, useDecoratorRequest };
|
|
81
|
+
export type { ActivityBorderDecoratorProps, InferDecoratorRequest };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkCIL5QUZ4js = require('./chunk-CIL5QUZ4.js');var _chunk5X4VJZOMjs = require('./chunk-5X4VJZOM.js');var _chunkG5ZR6XJLjs = require('./chunk-G5ZR6XJL.js');require('./chunk-A6GQOZT3.js');require('./chunk-7GV72C4W.js');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _valibot = require('valibot');var Q=_valibot.pipe.call(void 0, _valibot.object.call(void 0, {children:_valibot.optional.call(void 0, _chunkG5ZR6XJLjs.a.call(void 0, )),middleware:_valibot.optional.call(void 0, _valibot.pipe.call(void 0, _valibot.array.call(void 0, _valibot.custom.call(void 0, e=>typeof e=="function")),_valibot.readonly.call(void 0, )))}),_valibot.readonly.call(void 0, )),Y=_valibot.optional.call(void 0, _valibot.array.call(void 0, _valibot.custom.call(void 0, e=>e[_chunkCIL5QUZ4js.a]===_chunkCIL5QUZ4js.a)));function Z(e){let{children:t,middleware:r}=_chunkG5ZR6XJLjs.b.call(void 0, Q,e);return _react.useMemo.call(void 0, ()=>{_valibot.is.call(void 0, Y,r)||console.warn('botframework-webchat: "middleware" props passed to <DecoratorComposer> should be created using createXXXMiddleware() functions.',{middleware:r})},[r]),r?_react2.default.createElement(_chunk5X4VJZOMjs.b,{middleware:r,priority:"normal"},t):_react2.default.createElement(_react.Fragment,null,t)}var _=_react.memo.call(void 0, Z);function I(e){var r;let t=(r=_react.useContext.call(void 0, e))==null?void 0:r.request;if(!t)throw new Error(`useDecoratorRequest must be used within a ${e}Provider`);return t}var _botframeworkwebchatcore = require('botframework-webchat-core');function ie({children:e}){return _react2.default.createElement(_react.Fragment,null,e)}var f=_react.memo.call(void 0, ie);var _reactchainofresponsibility = require('react-chain-of-responsibility');var de=_reactchainofresponsibility.createChainOfResponsibility.call(void 0, );function x(e,t,r=f){function a(d,o){function i(u){var n;let s=(n=_react.useContext.call(void 0, t))==null?void 0:n.request;return _react2.default.createElement(d,{...u,Next:o,request:s})}return i.displayName=`ChainNext(Next ${e})`,_react.memo.call(void 0, i)}function p(d){let o=i=>i!==e?!1:u=>()=>{let s=u(void 0);return s&&a(d,s)};return o[_chunkCIL5QUZ4js.a]=_chunkCIL5QUZ4js.a,o}let{Provider:c,useBuildComponentCallback:L}=de;function A(d){let o=L(),i=_react.useMemo.call(void 0, ()=>o(void 0,{fallbackComponent:r}),[o]);return i&&_react2.default.createElement(i,{...d})}A.displayName=`DecoratorChain(Chain ${e})`;let U=_react.memo.call(void 0, A);function R(d){let{request:o}=d,{middleware:i}=_react.useContext.call(void 0, _chunk5X4VJZOMjs.a),u=_react.useMemo.call(void 0, ()=>i.map(n=>n(e)).filter(n=>n).map(n=>()=>n),[i]),s=_react.useMemo.call(void 0, ()=>({request:o}),[o]);return _react2.default.createElement(t.Provider,{value:s},_react2.default.createElement(c,{init:e,middleware:u},_react2.default.createElement(U,{...d})))}return R.displayName=`DecoratorProxy(Decorator ${e})`,{createMiddleware:p,Proxy:_react.memo.call(void 0, R),"~types":void 0}}var pe=_react.createContext.call(void 0, Object.freeze({request:Object.freeze({from:void 0,modality:new Set,livestreamingState:void 0})})),w= exports.ActivityBorderDecoratorRequest =pe;var ce=x("activity border",w),{createMiddleware:F,Proxy:k}=ce;var fe=["bot","channel","user",void 0];function we({activity:e,children:t}){let r=_react.useMemo.call(void 0, ()=>{var p,c;let{type:a}=_botframeworkwebchatcore.getActivityLivestreamingMetadata.call(void 0, e)||{};return{from:_botframeworkwebchatcore.isVoiceActivity.call(void 0, e)?_botframeworkwebchatcore.getVoiceActivityRole.call(void 0, e):fe.includes((p=e==null?void 0:e.from)==null?void 0:p.role)?(c=e==null?void 0:e.from)==null?void 0:c.role:void 0,modality:new Set(_botframeworkwebchatcore.isVoiceActivity.call(void 0, e)?["audio","text"]:["text"]),livestreamingState:a==="final activity"?"completing":a==="informative message"?"preparing":a==="interim activity"?"ongoing":void 0}},[e]);return _react2.default.createElement(k,{request:r},t)}var ve=_react.memo.call(void 0, we);var De=_chunkCIL5QUZ4js.b.call(void 0, "activity grouping"),{createMiddleware:W,extractMiddleware:O,Provider:$,Proxy:j}=De;function Ae({activities:e,children:t,groupingName:r}){let a=_react.useMemo.call(void 0, ()=>({groupingName:r}),[r]),{middleware:p}=_react.useContext.call(void 0, _chunk5X4VJZOMjs.a),c=_react.useMemo.call(void 0, ()=>O(p),[p]);return _react2.default.createElement($,{middleware:c},_react2.default.createElement(j,{activities:e,fallbackComponent:f,request:a},t))}var Re=_react.memo.call(void 0, Ae);exports.ActivityBorderDecorator = ve; exports.ActivityBorderDecoratorRequest = w; exports.ActivityGroupingDecorator = Re; exports.DecoratorComposer = _; exports.createActivityBorderMiddleware = F; exports.createActivityGroupingMiddleware = W; exports.useDecoratorRequest = I;
|
|
2
|
+
//# sourceMappingURL=botframework-webchat-api.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/__w/1/s/BotFramework-WebChat/packages/api/dist/botframework-webchat-api.decorator.js","../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"],"names":["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","useDecoratorRequest","type","_a","request","useContext","PassthroughFallback","PassthroughFallback_default","decoratorChain","createChainOfResponsibility","templateDecorator","name","DecoratorRequestContext","FinalComponent","buildComponent","Component","Next","ChainNext","createMiddleware","factory","init","next","DecoratorChainProvider","useBuildComponentCallback","Chain","buildMiddleware","Proxy","MemoChain","DecoratorProxy","decoratorMiddleware","enhancer","ActivityBorderDecoratorRequestContext","createContext","ActivityBorderDecoratorRequestContext_default","template","createActivityBorderMiddleware","ActivityBorderDecoratorMiddlewareProxy","supportedActivityRoles","ActivityBorderDecorator","activity","_b","getActivityLivestreamingMetadata","isVoiceActivity","getVoiceActivityRole","ActivityBorderDecorator_default","templateMiddleware_default","createActivityGroupingMiddleware","extractActivityGroupingDecoratorMiddleware","ActivityGroupingDecoratorMiddlewareProvider","ActivityGroupingDecoratorMiddlewareProxy","ActivityGroupingDecorator","activities","groupingName","activityGroupingMiddleware","ActivityGroupingDecorator_default"],"mappings":"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","file":"/__w/1/s/BotFramework-WebChat/packages/api/dist/botframework-webchat-api.decorator.js","sourcesContent":[null,"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"]}
|