@hiver/connector-agent 4.14.0-multiRef-beta.0 → 4.14.0-slack-beta.2
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/README.md +9 -9
- package/app/connector-cards.d.ts.map +1 -1
- package/app/omni-slack/SlackConnectModalIsland.d.ts +26 -0
- package/app/omni-slack/SlackConnectModalIsland.d.ts.map +1 -0
- package/app/omni-slack/index.d.ts +14 -0
- package/app/omni-slack/index.d.ts.map +1 -0
- package/app/omni-slack/provider.d.ts +15 -0
- package/app/omni-slack/provider.d.ts.map +1 -0
- package/app/provider.d.ts.map +1 -1
- package/constants/tracking-events.d.ts +8 -0
- package/constants/tracking-events.d.ts.map +1 -1
- package/features/connector-cards/api/userAuth.d.ts +25 -0
- package/features/connector-cards/api/userAuth.d.ts.map +1 -0
- package/features/connector-cards/components/card-list/CardWithUserAuth.d.ts +33 -0
- package/features/connector-cards/components/card-list/CardWithUserAuth.d.ts.map +1 -0
- package/features/connector-cards/components/card-list/ListCards.d.ts.map +1 -1
- package/features/connector-cards/components/card-list/NoCardsUserAuthGate.d.ts +24 -0
- package/features/connector-cards/components/card-list/NoCardsUserAuthGate.d.ts.map +1 -0
- package/features/connector-cards/components/connection-in-progress-modal/index.d.ts +19 -0
- package/features/connector-cards/components/connection-in-progress-modal/index.d.ts.map +1 -0
- package/features/connector-cards/components/user-auth-card/__tests__/UserAuthCard.test.d.ts +2 -0
- package/features/connector-cards/components/user-auth-card/__tests__/UserAuthCard.test.d.ts.map +1 -0
- package/features/connector-cards/components/user-auth-card/index.d.ts +33 -0
- package/features/connector-cards/components/user-auth-card/index.d.ts.map +1 -0
- package/features/connector-cards/components/user-auth-card/style.d.ts +29 -0
- package/features/connector-cards/components/user-auth-card/style.d.ts.map +1 -0
- package/features/connector-cards/constants/api.d.ts +2 -0
- package/features/connector-cards/constants/api.d.ts.map +1 -1
- package/features/connector-cards/hooks/useUserAuthFlow.d.ts +42 -0
- package/features/connector-cards/hooks/useUserAuthFlow.d.ts.map +1 -0
- package/features/connector-cards/store/userAuth.d.ts +85 -0
- package/features/connector-cards/store/userAuth.d.ts.map +1 -0
- package/features/connector-cards/store/userAuth.test.d.ts +2 -0
- package/features/connector-cards/store/userAuth.test.d.ts.map +1 -0
- package/features/connector-cards/utils/registerUserAuthCallback.d.ts +13 -0
- package/features/connector-cards/utils/registerUserAuthCallback.d.ts.map +1 -0
- package/features/slack/api/channels.d.ts +11 -0
- package/features/slack/api/channels.d.ts.map +1 -0
- package/features/slack/api/conversations.d.ts +41 -0
- package/features/slack/api/conversations.d.ts.map +1 -0
- package/features/slack/api/effective-config.d.ts +21 -0
- package/features/slack/api/effective-config.d.ts.map +1 -0
- package/features/slack/api/index.d.ts +4 -0
- package/features/slack/api/index.d.ts.map +1 -0
- package/features/slack/api/linked-conv.d.ts +33 -0
- package/features/slack/api/linked-conv.d.ts.map +1 -0
- package/features/slack/api/members.d.ts +10 -0
- package/features/slack/api/members.d.ts.map +1 -0
- package/features/slack/api/messages.d.ts +10 -0
- package/features/slack/api/messages.d.ts.map +1 -0
- package/features/slack/api/normalise.d.ts +3 -0
- package/features/slack/api/normalise.d.ts.map +1 -0
- package/features/slack/avatar/SlackAvatar.d.ts +20 -0
- package/features/slack/avatar/SlackAvatar.d.ts.map +1 -0
- package/features/slack/avatar/cache.d.ts +10 -0
- package/features/slack/avatar/cache.d.ts.map +1 -0
- package/features/slack/avatar/index.d.ts +2 -0
- package/features/slack/avatar/index.d.ts.map +1 -0
- package/features/slack/components/HeroIllustration.d.ts +16 -0
- package/features/slack/components/HeroIllustration.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts +25 -0
- package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/Composer.d.ts +45 -0
- package/features/slack/components/LinkedConversationPanel/Composer.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/LeftChannelBanner.d.ts +26 -0
- package/features/slack/components/LinkedConversationPanel/LeftChannelBanner.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/LoadOlderMessages.d.ts +16 -0
- package/features/slack/components/LinkedConversationPanel/LoadOlderMessages.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/MentionPicker.d.ts +23 -0
- package/features/slack/components/LinkedConversationPanel/MentionPicker.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts +27 -0
- package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ReconnectSlackBanner.d.ts +15 -0
- package/features/slack/components/LinkedConversationPanel/ReconnectSlackBanner.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ThreadDetailView.d.ts +19 -0
- package/features/slack/components/LinkedConversationPanel/ThreadDetailView.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ThreadSkeleton.d.ts +3 -0
- package/features/slack/components/LinkedConversationPanel/ThreadSkeleton.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/index.d.ts +27 -0
- package/features/slack/components/LinkedConversationPanel/index.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/style.d.ts +96 -0
- package/features/slack/components/LinkedConversationPanel/style.d.ts.map +1 -0
- package/features/slack/components/SlackConnectModal.d.ts +29 -0
- package/features/slack/components/SlackConnectModal.d.ts.map +1 -0
- package/features/slack/components/SlackConversationTab.d.ts +31 -0
- package/features/slack/components/SlackConversationTab.d.ts.map +1 -0
- package/features/slack/components/SlackLogo.d.ts +11 -0
- package/features/slack/components/SlackLogo.d.ts.map +1 -0
- package/features/slack/components/StartModal/SelectField.d.ts +19 -0
- package/features/slack/components/StartModal/SelectField.d.ts.map +1 -0
- package/features/slack/components/StartModal/SlackChannelTab.d.ts +21 -0
- package/features/slack/components/StartModal/SlackChannelTab.d.ts.map +1 -0
- package/features/slack/components/StartModal/SlackThreadTab.d.ts +25 -0
- package/features/slack/components/StartModal/SlackThreadTab.d.ts.map +1 -0
- package/features/slack/components/StartModal/TabIcon.d.ts +16 -0
- package/features/slack/components/StartModal/TabIcon.d.ts.map +1 -0
- package/features/slack/components/StartModal/index.d.ts +27 -0
- package/features/slack/components/StartModal/index.d.ts.map +1 -0
- package/features/slack/components/StartModal/style.d.ts +38 -0
- package/features/slack/components/StartModal/style.d.ts.map +1 -0
- package/features/slack/components/figma-tokens.d.ts +89 -0
- package/features/slack/components/figma-tokens.d.ts.map +1 -0
- package/features/slack/components/style.d.ts +54 -0
- package/features/slack/components/style.d.ts.map +1 -0
- package/features/slack/constants/api.d.ts +12 -0
- package/features/slack/constants/api.d.ts.map +1 -0
- package/features/slack/context.d.ts +40 -0
- package/features/slack/context.d.ts.map +1 -0
- package/features/slack/hooks/__tests__/useOlderMessages.test.d.ts +2 -0
- package/features/slack/hooks/__tests__/useOlderMessages.test.d.ts.map +1 -0
- package/features/slack/hooks/useLeftChannelGuard.d.ts +5 -0
- package/features/slack/hooks/useLeftChannelGuard.d.ts.map +1 -0
- package/features/slack/hooks/useOlderMessages.d.ts +51 -0
- package/features/slack/hooks/useOlderMessages.d.ts.map +1 -0
- package/features/slack/hooks/useSlackTabLabel.d.ts +23 -0
- package/features/slack/hooks/useSlackTabLabel.d.ts.map +1 -0
- package/features/slack/messageType.d.ts +16 -0
- package/features/slack/messageType.d.ts.map +1 -0
- package/features/slack/types/wire.d.ts +154 -0
- package/features/slack/types/wire.d.ts.map +1 -0
- package/features/toast-message/ToastRoot.d.ts.map +1 -1
- package/features/write-form/components/map-form-defaults/index.d.ts.map +1 -1
- package/features/write-form/components/write-form/index.d.ts.map +1 -1
- package/features/write-form/store/slice.d.ts.map +1 -1
- package/features/write-form/types/form.d.ts +0 -1
- package/features/write-form/types/form.d.ts.map +1 -1
- package/features/write-form/utils/response.d.ts.map +1 -1
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -1
- package/index.es.js +12486 -9570
- package/index.umd.js +1010 -402
- package/main-dev.d.ts.map +1 -1
- package/package.json +1 -1
- package/store/hooks.d.ts +2 -0
- package/store/hooks.d.ts.map +1 -1
- package/store/index.d.ts +6 -0
- package/store/index.d.ts.map +1 -1
- package/store/slice.d.ts +4 -4
- package/store/slice.d.ts.map +1 -1
- package/testing/mocks/handlers/fetch-cards.d.ts +2 -2
- package/testing/mocks/handlers/fetch-cards.d.ts.map +1 -1
- package/testing/mocks/handlers/slack.d.ts +35 -0
- package/testing/mocks/handlers/slack.d.ts.map +1 -0
- package/testing/mocks/handlers/user-auth.d.ts +31 -0
- package/testing/mocks/handlers/user-auth.d.ts.map +1 -0
- package/testing/mocks/handlers/write-capability.d.ts.map +1 -1
- package/testing/mocks/handlers.d.ts.map +1 -1
- package/types/cards.d.ts +4 -3
- package/types/cards.d.ts.map +1 -1
- package/types/form.d.ts +3 -2
- package/types/form.d.ts.map +1 -1
- package/utils/form.d.ts +3 -3
- package/utils/form.d.ts.map +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface SlackConversationTabProps {
|
|
3
|
+
/** Optional external trigger for parent-driven open. Internal
|
|
4
|
+
* state still owns visibility; the host can listen if it needs to
|
|
5
|
+
* track when the user opens the start flow. */
|
|
6
|
+
onStartFlowRequested?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* UI-1 — Slack tab content inside the host's conversation-thread
|
|
10
|
+
* tab bar (sibling to "Conversation"). The host (outlook-ui) mounts
|
|
11
|
+
* this component inside the active-tab panel of its tab system.
|
|
12
|
+
*
|
|
13
|
+
* State machine collapses several backend signals into one of:
|
|
14
|
+
* - `gated` — effective-config says enabled=false. Soft hint
|
|
15
|
+
* with the reason code; no CTA. Admin needs to
|
|
16
|
+
* configure Slack first.
|
|
17
|
+
* - `disconnected`/`reauth_required`/`workspace_mismatch` —
|
|
18
|
+
* opens <SlackConnectModal> over the whole app.
|
|
19
|
+
* Tab content shows a thin pending state behind.
|
|
20
|
+
* - `linked` — a Slack thread is already linked to this Hiver
|
|
21
|
+
* conv. Renders LinkedConversationPanel (UI-5,
|
|
22
|
+
* placeholder stub until that ships).
|
|
23
|
+
* - `ready` — connected, no link yet. Shows hero
|
|
24
|
+
* illustration + chip row + "Start New" CTA.
|
|
25
|
+
*
|
|
26
|
+
* Loading states fall through to a small inline message — reads
|
|
27
|
+
* are cheap and a single retry is enough.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SlackConversationTab: FC<SlackConversationTabProps>;
|
|
30
|
+
export default SlackConversationTab;
|
|
31
|
+
//# sourceMappingURL=SlackConversationTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlackConversationTab.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackConversationTab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAoC,MAAM,OAAO,CAAC;AAqB7D,UAAU,yBAAyB;IACjC;;oDAEgD;IAChD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAmI9D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Inlined Slack logomark — Slack's brand-approved four-square shape.
|
|
4
|
+
* Inlined rather than fetched from @hiver/hiver-ui-kit because the
|
|
5
|
+
* kit doesn't ship third-party logos, and a single SVG is cheaper
|
|
6
|
+
* than a managed asset for the empty-state hero.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SlackLogo: FC<{
|
|
9
|
+
size?: number;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=SlackLogo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlackLogo.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/SlackLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAO3C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SelectOption<V extends string> {
|
|
3
|
+
value: V;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface SelectFieldProps<V extends string> {
|
|
7
|
+
value: V;
|
|
8
|
+
options: SelectOption<V>[];
|
|
9
|
+
onChange: (value: V) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Bordered select that matches Figma's field chrome. Built on a custom
|
|
13
|
+
* trigger + MUI Menu rather than MUI's <Select> so the border, radius,
|
|
14
|
+
* padding, and chevron land exactly — MUI's Select renders its own
|
|
15
|
+
* standard-variant input that resists `sx` overrides.
|
|
16
|
+
*/
|
|
17
|
+
export declare function SelectField<V extends string>({ value, options, onChange }: SelectFieldProps<V>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=SelectField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectField.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/components/StartModal/SelectField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOjD,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM;IAC5C,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,UAAU,gBAAgB,CAAC,CAAC,SAAS,MAAM;IACzC,KAAK,EAAE,CAAC,CAAC;IACT,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAgC9F"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Form-state shape kept distinct from the wire type. UX uses a
|
|
4
|
+
* 'public' | 'private' string for the channel Type select, and
|
|
5
|
+
* 'message' as the field name on the form; the wire shape uses
|
|
6
|
+
* `isPrivate: boolean` and `messageText` — StartModal transforms
|
|
7
|
+
* at the submit boundary.
|
|
8
|
+
*/
|
|
9
|
+
export interface ChannelFormValues {
|
|
10
|
+
channelName: string;
|
|
11
|
+
channelType: 'public' | 'private';
|
|
12
|
+
memberEmails: string[];
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
interface SlackChannelTabProps {
|
|
16
|
+
values: ChannelFormValues;
|
|
17
|
+
onChange: (next: ChannelFormValues) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const SlackChannelTab: FC<SlackChannelTabProps>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=SlackChannelTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlackChannelTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/components/StartModal/SlackChannelTab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA2B,MAAM,OAAO,CAAC;AAQpD;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,oBAAoB;IAC5B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC7C;AA6BD,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAuFpD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface SlackThreadTabProps {
|
|
3
|
+
channelId: string | null;
|
|
4
|
+
message: string;
|
|
5
|
+
onChannelChange: (channelId: string | null) => void;
|
|
6
|
+
onMessageChange: (message: string) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* UI-3 — Slack thread tab body. Pick an existing channel and write
|
|
10
|
+
* a thread starter. Matches Figma frame 683:665296.
|
|
11
|
+
*
|
|
12
|
+
* The channel picker keeps MUI's Autocomplete for its search + popup
|
|
13
|
+
* logic, but renders into our own bordered field chrome via
|
|
14
|
+
* `renderInput` (InputShell + BareInput) so the border/radius/padding
|
|
15
|
+
* match Figma exactly — see style.ts for why we don't fight MUI's
|
|
16
|
+
* standard-variant input. The `#channel` / `🔒channel` prefix carries
|
|
17
|
+
* Slack's public/private indicator.
|
|
18
|
+
*
|
|
19
|
+
* On submit, parent (StartModal) calls
|
|
20
|
+
* POST /v1/connectors/slack/agent/start/existing-channel
|
|
21
|
+
* with the selected channelId + message.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SlackThreadTab: FC<SlackThreadTabProps>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=SlackThreadTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlackThreadTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/components/StartModal/SlackThreadTab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAkB,MAAM,OAAO,CAAC;AAS3C,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAgElD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Tab-switcher icons rendered inline (not via CSS mask / <img>) so the
|
|
4
|
+
* stroke inherits the tab's active/inactive color through
|
|
5
|
+
* `stroke="currentColor"`. A masked data-URI broke here because the
|
|
6
|
+
* icon stroke colors contain `#`, which truncates the mask url() into
|
|
7
|
+
* a fragment — leaving a solid filled square. Inline SVG sidesteps that
|
|
8
|
+
* entirely. Paths are the exact Figma exports (thread = message bubble,
|
|
9
|
+
* channel = hash).
|
|
10
|
+
*/
|
|
11
|
+
interface TabIconProps {
|
|
12
|
+
variant: 'thread' | 'channel';
|
|
13
|
+
}
|
|
14
|
+
export declare const TabIcon: FC<TabIconProps>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=TabIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabIcon.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/components/StartModal/TabIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B;;;;;;;;GAQG;AACH,UAAU,YAAY;IACpB,OAAO,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC/B;AAED,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CA0BpC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface StartModalProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
/** Called after a successful start, with the linked channel id so
|
|
6
|
+
* the parent can transition to the linked-conv view. */
|
|
7
|
+
onStarted?: (channelId: string) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* UI-2 — shared shell for the "Start new" flow. Two tabs:
|
|
11
|
+
*
|
|
12
|
+
* Slack thread (UI-3, frame 683:665296) — pick an existing
|
|
13
|
+
* channel, post a thread starter.
|
|
14
|
+
* Slack channel (UI-4, frame 683:664668) — create a brand-new
|
|
15
|
+
* private channel + members + first message.
|
|
16
|
+
*
|
|
17
|
+
* Submit/cancel actions are shared. The tab bodies are dedicated
|
|
18
|
+
* components (SlackThreadTab / SlackChannelTab) that own their
|
|
19
|
+
* fields — this shell just orchestrates state + dispatch.
|
|
20
|
+
*
|
|
21
|
+
* The actual API call lands at:
|
|
22
|
+
* POST /v1/connectors/slack/agent/start/existing-channel (thread)
|
|
23
|
+
* POST /v1/connectors/slack/agent/start/new-channel (channel)
|
|
24
|
+
*/
|
|
25
|
+
export declare const StartModal: FC<StartModalProps>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/components/StartModal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AA6BrC,UAAU,eAAe;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;6DACyD;IACzD,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAID;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAqH1C,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BoxProps, ButtonProps, IconButtonProps, StackProps } from '@hiver/hiver-ui-kit';
|
|
2
|
+
import { StyledComponent } from '@emotion/styled';
|
|
3
|
+
/**
|
|
4
|
+
* Start-modal primitives — matches Figma frame 683:665888 (applies to
|
|
5
|
+
* both the Slack thread + Slack channel tabs). <Modal> supplies the
|
|
6
|
+
* dialog frame; this file owns the visual chrome.
|
|
7
|
+
*
|
|
8
|
+
* Design note: rather than fight MUI's standard-variant input
|
|
9
|
+
* internals (the underline + adornment slots resist `sx` overrides),
|
|
10
|
+
* the fields are built from our own bordered container (InputShell /
|
|
11
|
+
* SelectTrigger / MessageTextarea) with a bare input inside. MUI's
|
|
12
|
+
* Autocomplete still drives the dropdown logic via renderInput; we
|
|
13
|
+
* just own the chrome. See SlackThreadTab / SlackChannelTab.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ModalShell: StyledComponent<BoxProps>;
|
|
16
|
+
export declare const ModalHeader: StyledComponent<StackProps>;
|
|
17
|
+
export declare const HeaderTitle: StyledComponent<BoxProps>;
|
|
18
|
+
export declare const CloseIconWrap: StyledComponent<IconButtonProps>;
|
|
19
|
+
export declare const ModalContent: StyledComponent<BoxProps>;
|
|
20
|
+
export declare const FieldStack: StyledComponent<BoxProps>;
|
|
21
|
+
export declare const ModalFooter: StyledComponent<StackProps>;
|
|
22
|
+
export declare const TabTrack: StyledComponent<BoxProps>;
|
|
23
|
+
export declare const TabButton: StyledComponent<ButtonProps & {
|
|
24
|
+
active?: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const FieldLabel: StyledComponent<BoxProps>;
|
|
27
|
+
export declare const InputShell: StyledComponent<BoxProps>;
|
|
28
|
+
export declare const BareInput: StyledComponent<React.InputHTMLAttributes<HTMLInputElement>>;
|
|
29
|
+
export declare const SelectTrigger: StyledComponent<ButtonProps & {
|
|
30
|
+
placeholder?: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const SelectValue: StyledComponent<BoxProps>;
|
|
33
|
+
export declare const MemberChip: StyledComponent<BoxProps>;
|
|
34
|
+
export declare const ChipRemove: StyledComponent<IconButtonProps>;
|
|
35
|
+
export declare const MessageTextarea: StyledComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement>>;
|
|
36
|
+
export declare const CancelButton: StyledComponent<ButtonProps>;
|
|
37
|
+
export declare const PrimaryButton: StyledComponent<ButtonProps>;
|
|
38
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/components/StartModal/style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIvD;;;;;;;;;;;GAWG;AAIH,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAOhD,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,UAAU,CAOnD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,QAAQ,CAMjD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,eAAe,CAY1D,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,QAAQ,CAKlD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAIhD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,UAAU,CAKnD,CAAC;AAIF,eAAO,MAAM,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAO9C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,CAAC,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CA8BzE,CAAC;AAIF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAOhD,CAAC;AAIF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAehD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAelF,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,WAAW,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CA4BlF,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,QAAQ,CAMjD,CAAC;AAIF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAchD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,eAAe,CAUvD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CA6B9F,CAAC;AAOF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,WAAW,CA0BrD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,WAAW,CAuBtD,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens extracted from the Slack M1 Figma file (key
|
|
3
|
+
* l8xIG3MI2gKbvpSfykSR1y) on 2026-06-09 via figma MCP's
|
|
4
|
+
* get_variable_defs + get_design_context for the linked-conv
|
|
5
|
+
* panel (frames 683:666914 tab bar / 683:666932 chat content /
|
|
6
|
+
* 683:667011 composer).
|
|
7
|
+
*
|
|
8
|
+
* Why these live here and not @hiver/hiver-ui-kit: the design
|
|
9
|
+
* system in Figma uses a slate ramp + #276cf0 primary blue that
|
|
10
|
+
* doesn't fully map to hiver-ui-kit's theme.palette today (which
|
|
11
|
+
* leans on purple primary). Rather than mutate the shared theme,
|
|
12
|
+
* we ship Slack-scoped tokens that match Figma exactly. When
|
|
13
|
+
* @hiver/hiver-ui-kit catches up, this file goes away.
|
|
14
|
+
*
|
|
15
|
+
* Token names follow Figma's "Slate/Text/Body" → slateTextBody
|
|
16
|
+
* convention so the design-handoff trace is obvious.
|
|
17
|
+
*/
|
|
18
|
+
export declare const slackTokens: {
|
|
19
|
+
readonly color: {
|
|
20
|
+
readonly slateTextTitle: "#0f172a";
|
|
21
|
+
readonly slateTextBody: "#334155";
|
|
22
|
+
readonly slateTextSubtle: "#64758b";
|
|
23
|
+
readonly slateTextDisabled: "#94a3b8";
|
|
24
|
+
readonly slateTextCaption: "#cbd5e1";
|
|
25
|
+
readonly textLabel: "#0c3e9d";
|
|
26
|
+
readonly blueTextBody: "#0c3e9d";
|
|
27
|
+
readonly slateBorderLight: "#e2e8f0";
|
|
28
|
+
readonly slateBorderMild: "#edf1f6";
|
|
29
|
+
readonly slateSurfaceWhite: "#ffffff";
|
|
30
|
+
readonly slateSurfaceSubtle: "#f8fafc";
|
|
31
|
+
readonly slateSurfaceSubtle100: "#f1f5f9";
|
|
32
|
+
readonly slateSurface150: "#edf1f6";
|
|
33
|
+
readonly slateSurfaceDisabled: "#e2e8f0";
|
|
34
|
+
readonly primarySurfaceDefault: "#276cf0";
|
|
35
|
+
readonly primaryBorderDefault: "#276cf0";
|
|
36
|
+
readonly primarySurfaceSubtle: "#e6effd";
|
|
37
|
+
readonly primaryBorderSubtle: "#d4e2fc";
|
|
38
|
+
readonly hotBorderMain: "#f3f4f6";
|
|
39
|
+
readonly violetSurfaceFaint: "#fcf0ff";
|
|
40
|
+
readonly slackAubergine: "#4a154b";
|
|
41
|
+
readonly slackAubergineHover: "#3a103b";
|
|
42
|
+
};
|
|
43
|
+
readonly space: {
|
|
44
|
+
readonly xs: 2;
|
|
45
|
+
readonly sm: 4;
|
|
46
|
+
readonly md: 6;
|
|
47
|
+
readonly lg: 8;
|
|
48
|
+
readonly xl: 12;
|
|
49
|
+
readonly xxl: 16;
|
|
50
|
+
readonly panel: 20;
|
|
51
|
+
};
|
|
52
|
+
readonly radius: {
|
|
53
|
+
readonly none: 0;
|
|
54
|
+
readonly xs: 2;
|
|
55
|
+
readonly sm: 4;
|
|
56
|
+
readonly md: 6;
|
|
57
|
+
readonly lg: 8;
|
|
58
|
+
readonly full: 9999;
|
|
59
|
+
};
|
|
60
|
+
readonly font: {
|
|
61
|
+
readonly family: "Inter, system-ui, sans-serif";
|
|
62
|
+
readonly weightRegular: 400;
|
|
63
|
+
readonly weightMedium: 500;
|
|
64
|
+
};
|
|
65
|
+
readonly textStyles: {
|
|
66
|
+
readonly bodyXs: {
|
|
67
|
+
readonly fontSize: 13;
|
|
68
|
+
readonly lineHeight: "19px";
|
|
69
|
+
readonly fontWeight: 500;
|
|
70
|
+
};
|
|
71
|
+
readonly body: {
|
|
72
|
+
readonly fontSize: 14;
|
|
73
|
+
readonly lineHeight: "20px";
|
|
74
|
+
readonly fontWeight: 400;
|
|
75
|
+
};
|
|
76
|
+
readonly bodyMedium: {
|
|
77
|
+
readonly fontSize: 14;
|
|
78
|
+
readonly lineHeight: "20px";
|
|
79
|
+
readonly fontWeight: 500;
|
|
80
|
+
};
|
|
81
|
+
readonly caption: {
|
|
82
|
+
readonly fontSize: 12;
|
|
83
|
+
readonly lineHeight: "18px";
|
|
84
|
+
readonly fontWeight: 400;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export type SlackTokens = typeof slackTokens;
|
|
89
|
+
//# sourceMappingURL=figma-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"figma-tokens.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/figma-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { BoxProps, ButtonProps, IconButtonProps, StackProps } from '@hiver/hiver-ui-kit';
|
|
2
|
+
import { StyledComponent } from '@emotion/styled';
|
|
3
|
+
/**
|
|
4
|
+
* Tab content root for the Slack feature. outlook-ui owns the
|
|
5
|
+
* surrounding tab bar; we paint just the body.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TabContentRoot: StyledComponent<BoxProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Ready-state container — Hiver↔Slack hero illustration + body +
|
|
10
|
+
* Start New CTA. Figma frame 683:664077 centers this in the
|
|
11
|
+
* available area.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ReadyStateContainer: StyledComponent<StackProps>;
|
|
14
|
+
export declare const HeroIllustrationWrapper: StyledComponent<BoxProps>;
|
|
15
|
+
/**
|
|
16
|
+
* Ready-state containment — Figma frame 683:663852. The tab content
|
|
17
|
+
* area is a subtle-gray backdrop with 8px padding; the hero + copy +
|
|
18
|
+
* CTA live inside a rounded white card. The card is content-driven
|
|
19
|
+
* (top-anchored), so the gray frame — not the card — takes the flex
|
|
20
|
+
* and shows below the card.
|
|
21
|
+
*/
|
|
22
|
+
export declare const ReadyStateFrame: StyledComponent<BoxProps>;
|
|
23
|
+
export declare const ReadyStateCard: StyledComponent<StackProps>;
|
|
24
|
+
/**
|
|
25
|
+
* Primary CTA — matches Figma's blue (#276cf0) primary surface.
|
|
26
|
+
* 8/16 padding, radius 6, Inter Medium 14/20, white text. The
|
|
27
|
+
* 0 2 3 rgba(0,0,0,0.07) drop shadow matches the Send button per
|
|
28
|
+
* Figma 683:667027.
|
|
29
|
+
*/
|
|
30
|
+
export declare const PrimaryButton: StyledComponent<ButtonProps>;
|
|
31
|
+
/**
|
|
32
|
+
* Connect-Slack CTA — Slack brand aubergine (#4a154b) with a leading
|
|
33
|
+
* hash glyph, per Figma 683:660098. Distinct from the blue
|
|
34
|
+
* PrimaryButton; content-sized (NOT full width), radius 6, 8/32 pad.
|
|
35
|
+
*/
|
|
36
|
+
export declare const ConnectSlackButton: StyledComponent<ButtonProps>;
|
|
37
|
+
export declare const SecondaryButton: StyledComponent<ButtonProps>;
|
|
38
|
+
/**
|
|
39
|
+
* Centered modal — Figma 683:660097 / 660098. Backdrop dims at
|
|
40
|
+
* rgba(0,0,0,0.4) approx; card is 399 wide × auto tall, radius
|
|
41
|
+
* 12px, white bg with a soft large drop shadow.
|
|
42
|
+
*/
|
|
43
|
+
export declare const ModalBackdrop: StyledComponent<BoxProps>;
|
|
44
|
+
export declare const ModalCard: StyledComponent<BoxProps>;
|
|
45
|
+
/**
|
|
46
|
+
* Logo panel inside the Connect modal — lavender wash with the
|
|
47
|
+
* Hiver / swap / Slack icon trio centered. Per Figma 683:660099
|
|
48
|
+
* the inner frame is 383×164 inside the 399×312 modal (i.e. a
|
|
49
|
+
* full-width band that takes the top half).
|
|
50
|
+
*/
|
|
51
|
+
export declare const ModalLogoPanel: StyledComponent<BoxProps>;
|
|
52
|
+
export declare const ModalCloseButton: StyledComponent<IconButtonProps>;
|
|
53
|
+
export declare const LogoImage: StyledComponent<React.ImgHTMLAttributes<HTMLImageElement>>;
|
|
54
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/components/style.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIvD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,QAAQ,CAOpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAAC,UAAU,CAO3D,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAAe,CAAC,QAAQ,CAM7D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,QAAQ,CAQrD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,UAAU,CAYtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,WAAW,CAqBtD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,WAAW,CAwB3D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,WAAW,CAexD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,QAAQ,CASnD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,CAAC,QAAQ,CAa/C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,QAAQ,CASpD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,CAAC,eAAe,CAiB7D,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,CAAC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAIhF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const SLACK_BASE_URL = "/v1/connectors/slack";
|
|
2
|
+
export declare const SLACK_AGENT_BASE = "/v1/connectors/slack/agent";
|
|
3
|
+
export declare const SLACK_START_EXISTING_CHANNEL_API: string;
|
|
4
|
+
export declare const SLACK_START_NEW_CHANNEL_API: string;
|
|
5
|
+
export declare const SLACK_MESSAGES_API: string;
|
|
6
|
+
export declare const SLACK_MESSAGE_BY_ID_API: string;
|
|
7
|
+
export declare const SLACK_EXTERNAL_CONVERSATION_API: string;
|
|
8
|
+
export declare const SLACK_THREAD_API: string;
|
|
9
|
+
export declare const SLACK_EXTERNAL_CONVERSATIONS_BY_TARGET_API: string;
|
|
10
|
+
export declare const SLACK_CHANNEL_MEMBERS_API: string;
|
|
11
|
+
export declare const SLACK_CHANNELS_API: string;
|
|
12
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/constants/api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,yBAAyB,CAAC;AACrD,eAAO,MAAM,gBAAgB,+BAA4B,CAAC;AAE1D,eAAO,MAAM,gCAAgC,EAAE,MAAqD,CAAC;AACrG,eAAO,MAAM,2BAA2B,EAAE,MAAgD,CAAC;AAE3F,eAAO,MAAM,kBAAkB,EAAE,MAAuC,CAAC;AAGzE,eAAO,MAAM,uBAAuB,EAAE,MAA0D,CAAC;AAEjG,eAAO,MAAM,+BAA+B,EAAE,MAAiE,CAAC;AAGhH,eAAO,MAAM,gBAAgB,EAAE,MAAmF,CAAC;AACnH,eAAO,MAAM,0CAA0C,EAAE,MAA+D,CAAC;AAEzH,eAAO,MAAM,yBAAyB,EAAE,MAA8C,CAAC;AAMvF,eAAO,MAAM,kBAAkB,EAAE,MAAuC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { ITrackingData } from '../../context';
|
|
3
|
+
/**
|
|
4
|
+
* Per-panel context the host (outlook-ui) injects when mounting
|
|
5
|
+
* the Slack right-panel. Mirrors EmailLoggerProvider's shape so the
|
|
6
|
+
* Vue→React bridge stays consistent across panels.
|
|
7
|
+
*
|
|
8
|
+
* `connectorId` resolves to the install row for this user-group's
|
|
9
|
+
* Slack connector. The host knows it from its connectors list; we
|
|
10
|
+
* could fetch + match here, but a prop is one round-trip cheaper and
|
|
11
|
+
* keeps the panel rendering immediately on mount.
|
|
12
|
+
*/
|
|
13
|
+
export interface SlackContextData {
|
|
14
|
+
hiverConvId: string;
|
|
15
|
+
connectorId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Shared mailbox id this conversation belongs to. Required for the
|
|
18
|
+
* Phase 9 effective-config endpoint (`/configs/effective?sm_id=`),
|
|
19
|
+
* which gates whether Slack renders for the current agent + SM.
|
|
20
|
+
* Sourced by the host from the conversation's current SM (first
|
|
21
|
+
* non-personal inbox in outlook-ui's case).
|
|
22
|
+
*/
|
|
23
|
+
smId: string;
|
|
24
|
+
isAdmin: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Gainsight tracking sink, injected by the host (outlook-ui passes
|
|
27
|
+
* its `sendEventData`). Unlike the rest of the agent app, the Slack
|
|
28
|
+
* tab mounts via its own provider stack — NOT MainAppProvider — so
|
|
29
|
+
* tracking is threaded through this context instead. Optional so dev
|
|
30
|
+
* mounts / tests that don't wire analytics fall through to a no-op
|
|
31
|
+
* at the call site (`sendTrackingEvent?.(...)`).
|
|
32
|
+
*/
|
|
33
|
+
sendTrackingEvent?: (event: string, data?: ITrackingData) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare const SlackContextProvider: FC<{
|
|
36
|
+
value: SlackContextData;
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const useSlackContext: () => SlackContextData;
|
|
40
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/features/slack/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;CACnE;AAID,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,CAErF,CAAC;AAKF,eAAO,MAAM,eAAe,QAAO,gBAMlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOlderMessages.test.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/hooks/__tests__/useOlderMessages.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLeftChannelGuard.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/hooks/useLeftChannelGuard.ts"],"names":[],"mappings":"AA2BA,wBAAgB,mBAAmB;;YAIxB,CAAC,MAAM,MAAM,OAAO,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,CAAC,CAAC;EAgB9C"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { SlackMessage, SlackOlderPage, SlackThreadGroup } from '../types/wire';
|
|
3
|
+
/**
|
|
4
|
+
* Older-page pagination state for a scrollable list (messages in thread mode,
|
|
5
|
+
* thread-roots in channel mode).
|
|
6
|
+
*
|
|
7
|
+
* Reconciles the live, polled "page 0" window (owned by a useQuery upstream)
|
|
8
|
+
* with on-demand older history: page 0 stays cheap on the 5s poll, while
|
|
9
|
+
* older pages are fetched imperatively here and held in session-local state
|
|
10
|
+
* that is NEVER re-polled (frozen history). The render layer merges
|
|
11
|
+
* `olderItems` with the polled window, deduping by `getKey`.
|
|
12
|
+
*
|
|
13
|
+
* The first older fetch seeds its cursor from page 0's `nextCursor`
|
|
14
|
+
* (`seedCursor`); each subsequent fetch walks back via the previous page's
|
|
15
|
+
* cursor. Scroll position is preserved across prepends so the viewport
|
|
16
|
+
* stays anchored on the same row.
|
|
17
|
+
*/
|
|
18
|
+
interface UseOlderArgs {
|
|
19
|
+
/** Fetch one older page given the cursor (before_ts) and page-size hint. */
|
|
20
|
+
fetchPage: (beforeTs: string, pageSize?: number) => Promise<SlackOlderPage>;
|
|
21
|
+
/** Page-0 cursor (oldest ts of the live window) — seeds the first fetch. */
|
|
22
|
+
seedCursor?: string | null;
|
|
23
|
+
/** Page-0 page-size hint, forwarded to the server. */
|
|
24
|
+
seedPageSize?: number;
|
|
25
|
+
/** Scroll container; used to preserve scroll position across prepend. */
|
|
26
|
+
scrollRef: RefObject<HTMLElement | null>;
|
|
27
|
+
/** Clears accumulated older pages when it changes (e.g. conv/thread id). */
|
|
28
|
+
resetKey: string;
|
|
29
|
+
/** Fired once per SUCCESSFUL older-page fetch (not per scroll event). */
|
|
30
|
+
onLoaded?: () => void;
|
|
31
|
+
}
|
|
32
|
+
export interface UseOlderMessagesResult {
|
|
33
|
+
olderMessages: SlackMessage[];
|
|
34
|
+
loadOlder: () => void;
|
|
35
|
+
isLoadingOlder: boolean;
|
|
36
|
+
olderError: boolean;
|
|
37
|
+
canLoadOlder: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** Thread mode: accumulate older messages (dedup by externalMessageId). */
|
|
40
|
+
export declare function useOlderMessages(args: UseOlderArgs): UseOlderMessagesResult;
|
|
41
|
+
export interface UseOlderThreadsResult {
|
|
42
|
+
olderThreads: SlackThreadGroup[];
|
|
43
|
+
loadOlder: () => void;
|
|
44
|
+
isLoadingOlder: boolean;
|
|
45
|
+
olderError: boolean;
|
|
46
|
+
canLoadOlder: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** Channel mode: accumulate older thread-roots (dedup by rootTs). */
|
|
49
|
+
export declare function useOlderThreads(args: UseOlderArgs): UseOlderThreadsResult;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=useOlderMessages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOlderMessages.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/hooks/useOlderMessages.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAElG;;;;;;;;;;;;;;GAcG;AACH,UAAU,YAAY;IACpB,4EAA4E;IAC5E,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAC5E,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzC,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAwGD,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,sBAAsB,CAO3E;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,qBAAqB,CAOzE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface SlackTabLabel {
|
|
2
|
+
label: string;
|
|
3
|
+
/** True once we have a confirmed link; lets the host render a
|
|
4
|
+
* Slack icon next to the channel name (vs the generic "Slack"
|
|
5
|
+
* fallback) and apply any active-link styling. */
|
|
6
|
+
isLinked: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the tab label outlook-ui renders in its conversation
|
|
10
|
+
* tab bar.
|
|
11
|
+
*
|
|
12
|
+
* - Pre-link: "Slack" (host renders Slack icon + label)
|
|
13
|
+
* - Linked: channel name (e.g. "l2-escalations-zap") from
|
|
14
|
+
* external_conversation; host still renders the Slack
|
|
15
|
+
* icon so the user knows it's the Slack tab.
|
|
16
|
+
*
|
|
17
|
+
* Lives on the connectors-ui side because the linked-conv lookup
|
|
18
|
+
* already happens here for the tab content. Avoids the host
|
|
19
|
+
* duplicating that fetch just to compute a label.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useSlackTabLabel(hiverConvId: string): SlackTabLabel;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=useSlackTabLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSlackTabLabel.d.ts","sourceRoot":"","sources":["../../../../src/features/slack/hooks/useSlackTabLabel.ts"],"names":[],"mappings":"AAEA,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd;;uDAEmD;IACnD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAUnE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SlackMessage } from './types/wire';
|
|
2
|
+
/**
|
|
3
|
+
* Slack message-type policy lives on the UI side: the API sends the raw
|
|
4
|
+
* Slack `subtype` and the client decides what to do with it. Today that
|
|
5
|
+
* means hiding the reply affordance for system messages; a future
|
|
6
|
+
* milestone can branch rendering (e.g. a centered "X joined" notice)
|
|
7
|
+
* off the same field.
|
|
8
|
+
*
|
|
9
|
+
* These system subtypes are channel lifecycle events that Slack does NOT
|
|
10
|
+
* allow thread replies on — attempting to reply 500s on their side.
|
|
11
|
+
*/
|
|
12
|
+
export declare const NON_REPLYABLE_SUBTYPES: ReadonlySet<string>;
|
|
13
|
+
/** Ordinary messages (no subtype) are replyable; system subtypes above
|
|
14
|
+
* are not. Unknown subtypes default to replyable. */
|
|
15
|
+
export declare const isReplyable: (message: Pick<SlackMessage, "subtype">) => boolean;
|
|
16
|
+
//# sourceMappingURL=messageType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messageType.d.ts","sourceRoot":"","sources":["../../../src/features/slack/messageType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAerD,CAAC;AAEH;sDACsD;AACtD,eAAO,MAAM,WAAW,YAAa,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,KAAG,OACH,CAAC"}
|