@hiver/connector-agent 4.16.1 → 4.17.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/README.md +9 -9
- 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/constants/tracking-events.d.ts +8 -0
- package/constants/tracking-events.d.ts.map +1 -1
- package/features/email-logger/omni/components/LogEmailPill.d.ts.map +1 -1
- package/features/email-logger/omni/components/LogEmailPill.test.d.ts +2 -0
- package/features/email-logger/omni/components/LogEmailPill.test.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/api/users.d.ts +11 -0
- package/features/slack/api/users.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/AnimatedDots.d.ts +2 -0
- package/features/slack/components/AnimatedDots.d.ts.map +1 -0
- package/features/slack/components/HeroIllustration.d.ts +14 -0
- package/features/slack/components/HeroIllustration.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ChannelStateView.d.ts +21 -0
- package/features/slack/components/LinkedConversationPanel/ChannelStateView.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts +28 -0
- package/features/slack/components/LinkedConversationPanel/ChannelThreadGroup.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/Composer.d.ts +50 -0
- package/features/slack/components/LinkedConversationPanel/Composer.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/ConfirmDeleteModal.d.ts +24 -0
- package/features/slack/components/LinkedConversationPanel/ConfirmDeleteModal.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/DeletedTombstone.d.ts +16 -0
- package/features/slack/components/LinkedConversationPanel/DeletedTombstone.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 +27 -0
- package/features/slack/components/LinkedConversationPanel/MentionPicker.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts +31 -0
- package/features/slack/components/LinkedConversationPanel/MessageItem.d.ts.map +1 -0
- package/features/slack/components/LinkedConversationPanel/NotMemberTooltip.d.ts +5 -0
- package/features/slack/components/LinkedConversationPanel/NotMemberTooltip.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 +18 -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/__tests__/MessageItem.test.d.ts +2 -0
- package/features/slack/components/LinkedConversationPanel/__tests__/MessageItem.test.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 +114 -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 +10 -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/MemberSelect.d.ts +9 -0
- package/features/slack/components/StartModal/MemberSelect.d.ts.map +1 -0
- package/features/slack/components/StartModal/MentionTextarea.d.ts +28 -0
- package/features/slack/components/StartModal/MentionTextarea.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 +23 -0
- package/features/slack/components/StartModal/SlackChannelTab.d.ts.map +1 -0
- package/features/slack/components/StartModal/SlackThreadTab.d.ts +26 -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/__tests__/MemberSelect.test.d.ts +2 -0
- package/features/slack/components/StartModal/__tests__/MemberSelect.test.d.ts.map +1 -0
- package/features/slack/components/StartModal/dropdownOmni.d.ts +121 -0
- package/features/slack/components/StartModal/dropdownOmni.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 +39 -0
- package/features/slack/components/StartModal/style.d.ts.map +1 -0
- package/features/slack/components/figma-tokens.d.ts +94 -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 +13 -0
- package/features/slack/constants/api.d.ts.map +1 -0
- package/features/slack/context.d.ts +75 -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 +205 -0
- package/features/slack/types/wire.d.ts.map +1 -0
- package/features/slack/utils/emoji.d.ts +7 -0
- package/features/slack/utils/emoji.d.ts.map +1 -0
- package/features/slack/utils/mentions.d.ts +18 -0
- package/features/slack/utils/mentions.d.ts.map +1 -0
- package/features/slack/utils/text.d.ts +7 -0
- package/features/slack/utils/text.d.ts.map +1 -0
- package/features/toast-message/ToastRoot.d.ts.map +1 -1
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -1
- package/index.es.js +19553 -13397
- package/index.umd.js +1051 -427
- package/main-dev.d.ts.map +1 -1
- package/package.json +1 -1
- package/testing/mocks/handlers/fetch-cards.d.ts +2 -2
- package/testing/mocks/handlers/slack.d.ts +36 -0
- package/testing/mocks/handlers/slack.d.ts.map +1 -0
- package/testing/mocks/handlers.d.ts.map +1 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
export declare const isOmniDropdownHost: () => boolean;
|
|
2
|
+
/** Resolved values from outlook-ui apps/v2 .../fields/{SelectNew,WrapNew}.vue. */
|
|
3
|
+
export declare const OMNI_DROPDOWN: {
|
|
4
|
+
readonly triggerBorderColor: "#d6dde8";
|
|
5
|
+
readonly triggerBorderHover: "#94a3b8";
|
|
6
|
+
readonly triggerBorderFocus: "#276cf0";
|
|
7
|
+
readonly triggerRadius: 6;
|
|
8
|
+
readonly triggerMinHeight: 40;
|
|
9
|
+
readonly chevronSize: 20;
|
|
10
|
+
readonly panelRadius: 8;
|
|
11
|
+
readonly panelShadow: "0 6px 30px #00000010";
|
|
12
|
+
readonly panelMinWidth: 180;
|
|
13
|
+
readonly panelGap: "4px";
|
|
14
|
+
readonly optionMargin: "0 6px";
|
|
15
|
+
readonly optionPadding: "6px 10px";
|
|
16
|
+
readonly optionRadius: 6;
|
|
17
|
+
readonly optionColor: "#334155";
|
|
18
|
+
readonly optionActiveColor: "#3e4c5a";
|
|
19
|
+
readonly optionHighlightBg: "#f1f5f9";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Omni override block appended to a field trigger's Emotion template
|
|
23
|
+
* (SelectTrigger / InputShell). Empty string on non-omni hosts, so the
|
|
24
|
+
* base rules stand untouched. Appended last → wins by cascade order.
|
|
25
|
+
*/
|
|
26
|
+
export declare const omniTriggerOverrides: () => string;
|
|
27
|
+
/**
|
|
28
|
+
* Paper sx for SelectField's MUI Menu — soft omni shadow + rounded panel,
|
|
29
|
+
* with a little top/bottom list padding so the first/last inset pill keeps a
|
|
30
|
+
* touch of breathing room from the panel edge.
|
|
31
|
+
*/
|
|
32
|
+
export declare const omniMenuPaperSx: () => {
|
|
33
|
+
borderRadius: string;
|
|
34
|
+
boxShadow: "0 6px 30px #00000010";
|
|
35
|
+
minWidth: 180;
|
|
36
|
+
border: string;
|
|
37
|
+
'& .MuiList-root': {
|
|
38
|
+
paddingTop: string;
|
|
39
|
+
paddingBottom: string;
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
42
|
+
borderRadius?: undefined;
|
|
43
|
+
boxShadow?: undefined;
|
|
44
|
+
minWidth?: undefined;
|
|
45
|
+
border?: undefined;
|
|
46
|
+
'& .MuiList-root'?: undefined;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Per-item sx for SelectField's MUI MenuItem — inset rounded rows (horizontal
|
|
50
|
+
* inset + rounded corners), no vertical gap between rows, compact geometry
|
|
51
|
+
* (MUI forces a 48px min-height), and ONE shared colour for hover + selected.
|
|
52
|
+
*/
|
|
53
|
+
export declare const omniMenuItemSx: () => {
|
|
54
|
+
minHeight: string;
|
|
55
|
+
margin: "0 6px";
|
|
56
|
+
padding: "6px 10px";
|
|
57
|
+
borderRadius: string;
|
|
58
|
+
color: "#334155";
|
|
59
|
+
'&:hover': {
|
|
60
|
+
backgroundColor: "#f1f5f9";
|
|
61
|
+
color: "#3e4c5a";
|
|
62
|
+
};
|
|
63
|
+
'&.Mui-selected': {
|
|
64
|
+
backgroundColor: string;
|
|
65
|
+
color: "#3e4c5a";
|
|
66
|
+
};
|
|
67
|
+
'&.Mui-selected:hover': {
|
|
68
|
+
backgroundColor: string;
|
|
69
|
+
color: "#3e4c5a";
|
|
70
|
+
};
|
|
71
|
+
} | {
|
|
72
|
+
minHeight?: undefined;
|
|
73
|
+
margin?: undefined;
|
|
74
|
+
padding?: undefined;
|
|
75
|
+
borderRadius?: undefined;
|
|
76
|
+
color?: undefined;
|
|
77
|
+
'&:hover'?: undefined;
|
|
78
|
+
'&.Mui-selected'?: undefined;
|
|
79
|
+
'&.Mui-selected:hover'?: undefined;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Popper sx for the channel/member Autocompletes — matches the omni panel
|
|
83
|
+
* chrome, a gap below the input, and inset rounded option rows that share one
|
|
84
|
+
* highlight colour for focus + selected.
|
|
85
|
+
*/
|
|
86
|
+
export declare const omniAutocompletePopperSx: () => {
|
|
87
|
+
'& .MuiAutocomplete-paper': {
|
|
88
|
+
borderRadius: string;
|
|
89
|
+
boxShadow: "0 6px 30px #00000010";
|
|
90
|
+
border: string;
|
|
91
|
+
marginTop: "4px";
|
|
92
|
+
};
|
|
93
|
+
'& .MuiAutocomplete-listbox': {
|
|
94
|
+
paddingTop: string;
|
|
95
|
+
paddingBottom: string;
|
|
96
|
+
};
|
|
97
|
+
'& .MuiAutocomplete-option': {
|
|
98
|
+
minHeight: string;
|
|
99
|
+
margin: "0 6px";
|
|
100
|
+
padding: "6px 10px";
|
|
101
|
+
borderRadius: string;
|
|
102
|
+
color: "#334155";
|
|
103
|
+
};
|
|
104
|
+
'& .MuiAutocomplete-option.Mui-focused': {
|
|
105
|
+
backgroundColor: string;
|
|
106
|
+
};
|
|
107
|
+
'& .MuiAutocomplete-option[aria-selected="true"]': {
|
|
108
|
+
backgroundColor: string;
|
|
109
|
+
};
|
|
110
|
+
'& .MuiAutocomplete-option[aria-selected="true"].Mui-focused': {
|
|
111
|
+
backgroundColor: string;
|
|
112
|
+
};
|
|
113
|
+
} | {
|
|
114
|
+
'& .MuiAutocomplete-paper'?: undefined;
|
|
115
|
+
'& .MuiAutocomplete-listbox'?: undefined;
|
|
116
|
+
'& .MuiAutocomplete-option'?: undefined;
|
|
117
|
+
'& .MuiAutocomplete-option.Mui-focused'?: undefined;
|
|
118
|
+
'& .MuiAutocomplete-option[aria-selected="true"]'?: undefined;
|
|
119
|
+
'& .MuiAutocomplete-option[aria-selected="true"].Mui-focused'?: undefined;
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=dropdownOmni.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdownOmni.d.ts","sourceRoot":"","sources":["../../../../../src/features/slack/components/StartModal/dropdownOmni.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,kBAAkB,QAAO,OAAuE,CAAC;AAE9G,kFAAkF;AAClF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;CAwBhB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAO,MAchC,CAAC;AAET;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CASpB,CAAC;AAET;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBnB,CAAC;AAET;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC7B,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,EAAyB,MAAM,OAAO,CAAC;AA+BlD,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,CAoM1C,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 FormError: StyledComponent<BoxProps>;
|
|
37
|
+
export declare const CancelButton: StyledComponent<ButtonProps>;
|
|
38
|
+
export declare const PrimaryButton: StyledComponent<ButtonProps>;
|
|
39
|
+
//# 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;AAMvD;;;;;;;;;;;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,CAgBhD,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,CA6BlF,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,CAAC,QAAQ,CAOjD,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;AAIF,eAAO,MAAM,SAAS,EAAE,eAAe,CAAC,QAAQ,CAK/C,CAAC;AAOF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,WAAW,CA0BrD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,WAAW,CAuBtD,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
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 slateSurfaceDark600: "#475569";
|
|
35
|
+
readonly errorTextSubtle: "#b81717";
|
|
36
|
+
readonly errorSurfaceDefault: "#b81717";
|
|
37
|
+
readonly errorSurfaceHover: "#9e1414";
|
|
38
|
+
readonly primarySurfaceDefault: "#276cf0";
|
|
39
|
+
readonly primaryBorderDefault: "#276cf0";
|
|
40
|
+
readonly primarySurfaceSubtle: "#e6effd";
|
|
41
|
+
readonly primaryBorderSubtle: "#d4e2fc";
|
|
42
|
+
readonly indigoSurfaceSubtle: "#f5f7ff";
|
|
43
|
+
readonly hotBorderMain: "#f3f4f6";
|
|
44
|
+
readonly violetSurfaceFaint: "#fcf0ff";
|
|
45
|
+
readonly slackAubergine: "#4a154b";
|
|
46
|
+
readonly slackAubergineHover: "#3a103b";
|
|
47
|
+
};
|
|
48
|
+
readonly space: {
|
|
49
|
+
readonly xs: 2;
|
|
50
|
+
readonly sm: 4;
|
|
51
|
+
readonly md: 6;
|
|
52
|
+
readonly lg: 8;
|
|
53
|
+
readonly xl: 12;
|
|
54
|
+
readonly xxl: 16;
|
|
55
|
+
readonly panel: 20;
|
|
56
|
+
};
|
|
57
|
+
readonly radius: {
|
|
58
|
+
readonly none: 0;
|
|
59
|
+
readonly xs: 2;
|
|
60
|
+
readonly sm: 4;
|
|
61
|
+
readonly md: 6;
|
|
62
|
+
readonly lg: 8;
|
|
63
|
+
readonly full: 9999;
|
|
64
|
+
};
|
|
65
|
+
readonly font: {
|
|
66
|
+
readonly family: "'Hanken Grotesk', system-ui, sans-serif";
|
|
67
|
+
readonly weightRegular: 400;
|
|
68
|
+
readonly weightMedium: 500;
|
|
69
|
+
};
|
|
70
|
+
readonly textStyles: {
|
|
71
|
+
readonly bodyXs: {
|
|
72
|
+
readonly fontSize: 13;
|
|
73
|
+
readonly lineHeight: "19px";
|
|
74
|
+
readonly fontWeight: 500;
|
|
75
|
+
};
|
|
76
|
+
readonly body: {
|
|
77
|
+
readonly fontSize: 14;
|
|
78
|
+
readonly lineHeight: "20px";
|
|
79
|
+
readonly fontWeight: 400;
|
|
80
|
+
};
|
|
81
|
+
readonly bodyMedium: {
|
|
82
|
+
readonly fontSize: 14;
|
|
83
|
+
readonly lineHeight: "20px";
|
|
84
|
+
readonly fontWeight: 500;
|
|
85
|
+
};
|
|
86
|
+
readonly caption: {
|
|
87
|
+
readonly fontSize: 12;
|
|
88
|
+
readonly lineHeight: "18px";
|
|
89
|
+
readonly fontWeight: 400;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export type SlackTokens = typeof slackTokens;
|
|
94
|
+
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFd,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:663263 (Conversation_Open).
|
|
17
|
+
* The tab content area is a subtle-gray backdrop with 8px padding; the
|
|
18
|
+
* hero + copy + CTA live inside a rounded white card. The card fills
|
|
19
|
+
* the available height and centers its content vertically, so the gray
|
|
20
|
+
* shows only as a thin 8px border around the full-height 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,CAatD,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,13 @@
|
|
|
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
|
+
export declare const SLACK_WORKSPACE_USERS_API: string;
|
|
13
|
+
//# 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;AASzE,eAAO,MAAM,yBAAyB,EAAE,MAAoC,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
* Host-injected emoji picker. The composer renders only the trigger button;
|
|
36
|
+
* when the agent clicks it we hand the host the button's DOM node plus a
|
|
37
|
+
* sink for the chosen emoji, and the host renders its own picker anchored
|
|
38
|
+
* there. This lets outlook-ui reuse its exact Vue emoji picker (pixel-
|
|
39
|
+
* identical to the rest of the app) without embedding Vue in this React
|
|
40
|
+
* library. When absent (dev mounts / hosts that don't inject one), the
|
|
41
|
+
* composer falls back to a small built-in emoji grid.
|
|
42
|
+
*/
|
|
43
|
+
openEmojiPicker?: (args: {
|
|
44
|
+
anchorEl: HTMLElement;
|
|
45
|
+
onSelect: (emoji: string) => void;
|
|
46
|
+
onClose?: () => void;
|
|
47
|
+
}) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Slack-notification deep-link: the `ts` of the message that triggered the
|
|
50
|
+
* notification. When set, the linked-conversation panel scrolls that message
|
|
51
|
+
* into view and paints it with the highlight wash (then fades). Sourced by
|
|
52
|
+
* the host from the notification's `message-ts` query param.
|
|
53
|
+
*/
|
|
54
|
+
highlightMessageTs?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Thread root ts of the triggering message, set when it's a reply. In channel
|
|
57
|
+
* mode the list only shows thread roots (replies are lazy-loaded), so we
|
|
58
|
+
* highlight the thread's top-level message — `highlightThreadTs` — instead of
|
|
59
|
+
* the reply. Absent for top-level messages (highlight falls back to
|
|
60
|
+
* `highlightMessageTs`).
|
|
61
|
+
*/
|
|
62
|
+
highlightThreadTs?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Called once the panel has consumed the highlight (scrolled + painted) so the
|
|
65
|
+
* host can strip the deep-link params from the URL — a tab re-mount or refresh
|
|
66
|
+
* then won't re-trigger the highlight.
|
|
67
|
+
*/
|
|
68
|
+
onHighlightConsumed?: () => void;
|
|
69
|
+
}
|
|
70
|
+
export declare const SlackContextProvider: FC<{
|
|
71
|
+
value: SlackContextData;
|
|
72
|
+
children: ReactNode;
|
|
73
|
+
}>;
|
|
74
|
+
export declare const useSlackContext: () => SlackContextData;
|
|
75
|
+
//# 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;IAClE;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IACrH;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;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;;YAGA,CAAC,MAAM,MAAM,OAAO,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,CAAC,CAAC;EAiBtE"}
|
|
@@ -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,CAiBnE"}
|
|
@@ -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"}
|