@elliemae/ds-chat 3.5.0-rc.7 → 3.5.1-next.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/dist/cjs/exported-related/bubble/ChatBubble.js +63 -33
- package/dist/cjs/exported-related/bubble/ChatBubble.js.map +1 -1
- package/dist/cjs/exported-related/bubble/ChatBubbleArrow.js +83 -60
- package/dist/cjs/exported-related/bubble/ChatBubbleArrow.js.map +2 -2
- package/dist/cjs/exported-related/chat-card/ChatCard.js +28 -14
- package/dist/cjs/exported-related/chat-card/ChatCard.js.map +2 -2
- package/dist/cjs/exported-related/chat-card/props.js +2 -1
- package/dist/cjs/exported-related/chat-card/props.js.map +1 -1
- package/dist/cjs/exported-related/chat-container-header/ChatContainerHeader.js +20 -13
- package/dist/cjs/exported-related/chat-container-header/ChatContainerHeader.js.map +1 -1
- package/dist/cjs/exported-related/chat-empty-state/ChatEmptyState.js +31 -19
- package/dist/cjs/exported-related/chat-empty-state/ChatEmptyState.js.map +2 -2
- package/dist/cjs/exported-related/chat-empty-state/props.js +2 -1
- package/dist/cjs/exported-related/chat-empty-state/props.js.map +1 -1
- package/dist/cjs/exported-related/chat-sidebar/SideBarChat.js +22 -16
- package/dist/cjs/exported-related/chat-sidebar/SideBarChat.js.map +1 -1
- package/dist/cjs/exported-related/chat-sidebar/sidebar-button/SidebarButton.js +16 -9
- package/dist/cjs/exported-related/chat-sidebar/sidebar-button/SidebarButton.js.map +1 -1
- package/dist/cjs/exported-related/floating-button/FloatingButton.js +7 -6
- package/dist/cjs/exported-related/floating-button/FloatingButton.js.map +2 -2
- package/dist/cjs/exported-related/grid-influencer/InfluencerContainer.js +8 -3
- package/dist/cjs/exported-related/grid-influencer/InfluencerContainer.js.map +1 -1
- package/dist/cjs/exported-related/message-delimiter/MessageDelimiter.js +14 -8
- package/dist/cjs/exported-related/message-delimiter/MessageDelimiter.js.map +2 -2
- package/dist/cjs/exported-related/system-message/SystemMessage.js +24 -12
- package/dist/cjs/exported-related/system-message/SystemMessage.js.map +2 -2
- package/dist/cjs/exported-related/tile-button/TileButton.js +59 -35
- package/dist/cjs/exported-related/tile-button/TileButton.js.map +1 -1
- package/dist/cjs/parts/chat-composer/ChatContainerComposer.js +85 -60
- package/dist/cjs/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/dist/cjs/parts/chat-container/ChatContainer.js +64 -50
- package/dist/cjs/parts/chat-container/ChatContainer.js.map +1 -1
- package/dist/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +64 -37
- package/dist/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/dist/esm/exported-related/bubble/ChatBubble.js +63 -33
- package/dist/esm/exported-related/bubble/ChatBubble.js.map +1 -1
- package/dist/esm/exported-related/bubble/ChatBubbleArrow.js +83 -60
- package/dist/esm/exported-related/bubble/ChatBubbleArrow.js.map +2 -2
- package/dist/esm/exported-related/chat-card/ChatCard.js +28 -14
- package/dist/esm/exported-related/chat-card/ChatCard.js.map +2 -2
- package/dist/esm/exported-related/chat-card/props.js +2 -1
- package/dist/esm/exported-related/chat-card/props.js.map +1 -1
- package/dist/esm/exported-related/chat-container-header/ChatContainerHeader.js +20 -13
- package/dist/esm/exported-related/chat-container-header/ChatContainerHeader.js.map +1 -1
- package/dist/esm/exported-related/chat-empty-state/ChatEmptyState.js +31 -19
- package/dist/esm/exported-related/chat-empty-state/ChatEmptyState.js.map +2 -2
- package/dist/esm/exported-related/chat-empty-state/props.js +2 -1
- package/dist/esm/exported-related/chat-empty-state/props.js.map +1 -1
- package/dist/esm/exported-related/chat-sidebar/SideBarChat.js +22 -16
- package/dist/esm/exported-related/chat-sidebar/SideBarChat.js.map +1 -1
- package/dist/esm/exported-related/chat-sidebar/sidebar-button/SidebarButton.js +16 -9
- package/dist/esm/exported-related/chat-sidebar/sidebar-button/SidebarButton.js.map +1 -1
- package/dist/esm/exported-related/floating-button/FloatingButton.js +7 -6
- package/dist/esm/exported-related/floating-button/FloatingButton.js.map +2 -2
- package/dist/esm/exported-related/grid-influencer/InfluencerContainer.js +8 -3
- package/dist/esm/exported-related/grid-influencer/InfluencerContainer.js.map +1 -1
- package/dist/esm/exported-related/message-delimiter/MessageDelimiter.js +14 -8
- package/dist/esm/exported-related/message-delimiter/MessageDelimiter.js.map +2 -2
- package/dist/esm/exported-related/system-message/SystemMessage.js +24 -12
- package/dist/esm/exported-related/system-message/SystemMessage.js.map +2 -2
- package/dist/esm/exported-related/tile-button/TileButton.js +59 -35
- package/dist/esm/exported-related/tile-button/TileButton.js.map +1 -1
- package/dist/esm/parts/chat-composer/ChatContainerComposer.js +85 -60
- package/dist/esm/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/dist/esm/parts/chat-container/ChatContainer.js +64 -50
- package/dist/esm/parts/chat-container/ChatContainer.js.map +1 -1
- package/dist/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +64 -37
- package/dist/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React2 from "react";
|
|
3
4
|
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
|
|
4
5
|
import { MenuCollapse, MenuExpand } from "@elliemae/ds-icons";
|
|
@@ -11,7 +12,7 @@ const FooterChat = ({
|
|
|
11
12
|
onFooterClose,
|
|
12
13
|
onFooterExpand,
|
|
13
14
|
footerButtonExtraProps
|
|
14
|
-
}) => /* @__PURE__ */
|
|
15
|
+
}) => /* @__PURE__ */ jsx(SidebarButton, {
|
|
15
16
|
dsId: "sidebar_footer",
|
|
16
17
|
Icon: !expanded ? MenuCollapse : MenuExpand,
|
|
17
18
|
onClick: expanded ? onFooterClose : onFooterExpand,
|
|
@@ -45,22 +46,27 @@ const SideBarChat = (props) => {
|
|
|
45
46
|
actionRef.current.listRef = listRef;
|
|
46
47
|
}
|
|
47
48
|
}, [sidebarItems, expanded, actionRef, listRef]);
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ jsxs(StyledSideBarContainer, {
|
|
49
50
|
rows: [1, "auto"],
|
|
50
|
-
ref: listRef
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
ref: listRef,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsx(StyledSideBarButtonsContainer, {
|
|
54
|
+
children: sidebarItems.map((p) => /* @__PURE__ */ jsx(TileButton, {
|
|
55
|
+
innerRef: registerReference,
|
|
56
|
+
...p,
|
|
57
|
+
selected: selectedItem === p.dsId,
|
|
58
|
+
tooltipPlacement,
|
|
59
|
+
disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
|
|
60
|
+
}, p.dsId))
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ jsx(FooterChat, {
|
|
63
|
+
expanded,
|
|
64
|
+
onFooterClose,
|
|
65
|
+
onFooterExpand,
|
|
66
|
+
footerButtonExtraProps
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
});
|
|
64
70
|
};
|
|
65
71
|
SideBarChat.propTypes = chatSidebarProps;
|
|
66
72
|
SideBarChat.displayName = "SideBarChat";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/chat-sidebar/SideBarChat.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { TileButton } from '../tile-button';\nimport { SidebarButton } from './sidebar-button/SidebarButton';\nimport { ChatSidebarProps, defaultProps, chatSidebarProps } from './props';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<ChatSidebarProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\n Icon={!expanded ? MenuCollapse : MenuExpand}\n onClick={expanded ? onFooterClose : onFooterExpand}\n aria-pressed={expanded}\n aria-label={footerButtonExtraProps['aria-label']}\n />\n);\n\nconst SideBarChat: React.ComponentType<ChatSidebarProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps);\n\n const {\n sidebarItems,\n expanded,\n onFooterClose,\n onFooterExpand,\n selectedItem,\n footerButtonExtraProps,\n tooltipPlacement,\n enableTooltipWhenIsClosed,\n actionRef,\n } = propsWithDefault;\n const { current: listRef } = React.useRef({});\n const registerReference = React.useCallback(\n (ref: HTMLElement) => {\n if (ref) listRef[ref.dataset.key] = ref;\n },\n [listRef],\n );\n React.useEffect(() => {\n if (actionRef.current?.listRef) {\n actionRef.current.listRef = listRef;\n }\n }, [sidebarItems, expanded, actionRef, listRef]);\n\n return (\n <StyledSideBarContainer rows={[1, 'auto']} ref={listRef}>\n <StyledSideBarButtonsContainer>\n {sidebarItems.map((p) => (\n <TileButton\n key={p.dsId}\n innerRef={registerReference}\n {...p}\n selected={selectedItem === p.dsId}\n tooltipPlacement={tooltipPlacement}\n disableTooltip={enableTooltipWhenIsClosed ? false : !expanded}\n />\n ))}\n </StyledSideBarButtonsContainer>\n <FooterChat\n expanded={expanded}\n onFooterClose={onFooterClose}\n onFooterExpand={onFooterExpand}\n footerButtonExtraProps={footerButtonExtraProps}\n />\n </StyledSideBarContainer>\n );\n};\n\nSideBarChat.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\nSideBarChat.displayName = 'SideBarChat';\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAkC;AACzC,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,cAAc,kBAAkB;AACzC,SAAS,wBAAwB,qCAAqC;AACtE,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAA2B,cAAc,wBAAwB;AAEjE,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,OAAOA,YAAkC;AACzC,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,cAAc,kBAAkB;AACzC,SAAS,wBAAwB,qCAAqC;AACtE,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAA2B,cAAc,wBAAwB;AAEjE,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,oBAAC;AAAA,EACC,MAAK;AAAA,EACL,MAAM,CAAC,WAAW,eAAe;AAAA,EACjC,SAAS,WAAW,gBAAgB;AAAA,EACpC,gBAAc;AAAA,EACd,cAAY,uBAAuB;AAAA,CACrC;AAGF,MAAM,cAAqD,CAAC,UAAU;AACpE,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,gBAAgB;AAEjE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,SAAS,QAAQ,IAAIA,OAAM,OAAO,CAAC,CAAC;AAC5C,QAAM,oBAAoBA,OAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI;AAAK,gBAAQ,IAAI,QAAQ,OAAO;AAAA,IACtC;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AACA,EAAAA,OAAM,UAAU,MAAM;AACpB,QAAI,UAAU,SAAS,SAAS;AAC9B,gBAAU,QAAQ,UAAU;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,cAAc,UAAU,WAAW,OAAO,CAAC;AAE/C,SACE,qBAAC;AAAA,IAAuB,MAAM,CAAC,GAAG,MAAM;AAAA,IAAG,KAAK;AAAA,IAC9C;AAAA,0BAAC;AAAA,QACE,uBAAa,IAAI,CAAC,MACjB,oBAAC;AAAA,UAEC,UAAU;AAAA,UACT,GAAG;AAAA,UACJ,UAAU,iBAAiB,EAAE;AAAA,UAC7B;AAAA,UACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA,WALhD,EAAE,IAMT,CACD;AAAA,OACH;AAAA,MACA,oBAAC;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React2 from "react";
|
|
3
4
|
import { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from "./styled";
|
|
4
5
|
import { propsSidebarButton, defaultSidebarButton } from "./props";
|
|
@@ -7,17 +8,23 @@ const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
|
|
|
7
8
|
if (dsId)
|
|
8
9
|
onClick(dsId);
|
|
9
10
|
}, [onClick, dsId]);
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
key: dsId,
|
|
11
|
+
return /* @__PURE__ */ jsxs(StyledSidebarButton, {
|
|
12
12
|
"data-testid": `sidebar-button-${dsId}`,
|
|
13
13
|
onClick: handleClick,
|
|
14
|
-
...rest
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
...rest,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(StyledSidebarButtonIcon, {
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
justifyContent: "center",
|
|
19
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
20
|
+
size: "m"
|
|
21
|
+
})
|
|
22
|
+
}),
|
|
23
|
+
label && /* @__PURE__ */ jsx(StyledSidebarButtonLabel, {
|
|
24
|
+
children: label
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
}, dsId);
|
|
21
28
|
};
|
|
22
29
|
SidebarButton.propTypes = propsSidebarButton;
|
|
23
30
|
SidebarButton.defaultProps = defaultSidebarButton;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/exported-related/chat-sidebar/sidebar-button/SidebarButton.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled';\nimport { propsSidebarButton, defaultSidebarButton, SidebarButtonProps } from './props';\n\nexport const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element => {\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.propTypes = propsSidebarButton;\nSidebarButton.defaultProps = defaultSidebarButton;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,qBAAqB,0BAA0B,+BAA+B;AACvF,SAAS,oBAAoB,4BAAgD;AAEtE,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,SAAS,KAAK,MAAuC;AACzG,QAAM,cAAcA,OAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,OAAOA,YAAW;AAClB,SAAS,qBAAqB,0BAA0B,+BAA+B;AACvF,SAAS,oBAAoB,4BAAgD;AAEtE,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,SAAS,KAAK,MAAuC;AACzG,QAAM,cAAcA,OAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,qBAAC;AAAA,IAA+B,eAAa,kBAAkB;AAAA,IAAQ,SAAS;AAAA,IAAc,GAAG;AAAA,IAC/F;AAAA,0BAAC;AAAA,QAAwB,YAAW;AAAA,QAAS,gBAAe;AAAA,QAC1D,8BAAC;AAAA,UAAK,MAAK;AAAA,SAAI;AAAA,OACjB;AAAA,MACC,SAAS,oBAAC;AAAA,QAA0B;AAAA,OAAM;AAAA;AAAA,KAJnB,IAK1B;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
|
|
4
4
|
import { Comments } from "@elliemae/ds-icons";
|
|
5
5
|
import { StyledFloatingButton } from "./styled";
|
|
@@ -8,14 +8,15 @@ const FloatingButton = (props) => {
|
|
|
8
8
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultFloatingButton);
|
|
9
9
|
useValidateTypescriptPropTypes(propsWithDefault, propsFloatingButton);
|
|
10
10
|
const { onFocus, innerRef, onClick } = propsWithDefault;
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(StyledFloatingButton, {
|
|
12
12
|
onFocus,
|
|
13
13
|
ref: innerRef,
|
|
14
14
|
"data-testid": "chat-floating-button",
|
|
15
|
-
onClick
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
onClick,
|
|
16
|
+
children: /* @__PURE__ */ jsx(Comments, {
|
|
17
|
+
size: "l"
|
|
18
|
+
})
|
|
19
|
+
});
|
|
19
20
|
};
|
|
20
21
|
FloatingButton.propTypes = propsFloatingButton;
|
|
21
22
|
FloatingButton.displayName = "FloatingButton";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/floating-button/FloatingButton.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\n\nimport { Comments } from '@elliemae/ds-icons';\nimport { StyledFloatingButton } from './styled';\nimport { defaultFloatingButton, propsFloatingButton, FloatingButtonProps } from './props';\n\nconst FloatingButton: React.ComponentType<FloatingButtonProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultFloatingButton);\n useValidateTypescriptPropTypes(propsWithDefault, propsFloatingButton);\n const { onFocus, innerRef, onClick } = propsWithDefault;\n return (\n <StyledFloatingButton onFocus={onFocus} ref={innerRef} data-testid=\"chat-floating-button\" onClick={onClick}>\n <Comments size=\"l\" />\n </StyledFloatingButton>\n );\n};\n\nFloatingButton.propTypes = propsFloatingButton as WeakValidationMap<unknown>;\nFloatingButton.displayName = 'FloatingButton';\nconst FloatingButtonWithSchema = describe(FloatingButton);\nFloatingButtonWithSchema.propTypes = propsFloatingButton as WeakValidationMap<unknown>;\n\nexport { FloatingButton, FloatingButtonWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,UAAU,gCAAgC,oCAAoC;AAEvF,SAAS,gBAAgB;AACzB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB,2BAAgD;AAEhF,MAAM,iBAA2D,CAAC,UAAU;AAC1E,QAAM,mBAAmB,6BAA6B,OAAO,qBAAqB;AAClF,iCAA+B,kBAAkB,mBAAmB;AACpE,QAAM,EAAE,SAAS,UAAU,QAAQ,IAAI;AACvC,SACE,oBAAC;AAAA,IAAqB;AAAA,IAAkB,KAAK;AAAA,IAAU,eAAY;AAAA,IAAuB;AAAA,IACxF,8BAAC;AAAA,MAAS,MAAK;AAAA,KAAI;AAAA,GACrB;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,2BAA2B,SAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React2 from "react";
|
|
3
4
|
import { StyledChatContainer } from "./styled";
|
|
4
5
|
import { ChatContainer } from "../../parts/chat-container/ChatContainer";
|
|
5
6
|
import { SideBarChat } from "../chat-sidebar/SideBarChat";
|
|
6
7
|
const InfluencerContainer = (props) => React2.useMemo(
|
|
7
|
-
() => props.floating ? null : /* @__PURE__ */
|
|
8
|
+
() => props.floating ? null : /* @__PURE__ */ jsxs(StyledChatContainer, {
|
|
8
9
|
cols: ["auto", props.expanded ? 1 : "0px"],
|
|
9
10
|
expanded: props.expanded,
|
|
10
|
-
expandedWidth: props.expandedWidth
|
|
11
|
-
|
|
11
|
+
expandedWidth: props.expandedWidth,
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsx(SideBarChat, {}),
|
|
14
|
+
props.expanded ? /* @__PURE__ */ jsx(ChatContainer, {}) : /* @__PURE__ */ jsx("div", {})
|
|
15
|
+
]
|
|
16
|
+
}),
|
|
12
17
|
[props.floating, props.expanded, props.expandedWidth]
|
|
13
18
|
);
|
|
14
19
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/grid-influencer/InfluencerContainer.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { StyledChatContainer } from './styled';\nimport { ChatContainer } from '../../parts/chat-container/ChatContainer';\nimport { SideBarChat } from '../chat-sidebar/SideBarChat';\n\nexport const InfluencerContainer: React.ComponentType<any> = (props) =>\n React.useMemo(\n () =>\n props.floating ? null : (\n <StyledChatContainer\n cols={['auto', props.expanded ? 1 : '0px']}\n expanded={props.expanded}\n expandedWidth={props.expandedWidth}\n >\n <SideBarChat />\n {props.expanded ? <ChatContainer /> : <div />}\n </StyledChatContainer>\n ),\n [props.floating, props.expanded, props.expandedWidth],\n );\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,OAAOA,YAAW;AAClB,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAErB,MAAM,sBAAgD,CAAC,UAC5DA,OAAM;AAAA,EACJ,MACE,MAAM,WAAW,OACf,qBAAC;AAAA,IACC,MAAM,CAAC,QAAQ,MAAM,WAAW,IAAI,KAAK;AAAA,IACzC,UAAU,MAAM;AAAA,IAChB,eAAe,MAAM;AAAA,IAErB;AAAA,0BAAC,eAAY;AAAA,MACZ,MAAM,WAAW,oBAAC,iBAAc,IAAK,oBAAC,SAAI;AAAA;AAAA,GAC7C;AAAA,EAEJ,CAAC,MAAM,UAAU,MAAM,UAAU,MAAM,aAAa;AACtD;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import {
|
|
4
4
|
describe,
|
|
5
5
|
useGetGlobalAttributes,
|
|
@@ -13,14 +13,20 @@ const MessageDelimiter = (props) => {
|
|
|
13
13
|
useValidateTypescriptPropTypes(propsWithDefault, messageDelimiterProps);
|
|
14
14
|
const globalAttrs = useGetGlobalAttributes(propsWithDefault);
|
|
15
15
|
const { title, size, verticalMargin } = propsWithDefault;
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsxs(Wrapper, {
|
|
17
17
|
cols: ["1fr", "auto", "1fr"],
|
|
18
|
-
...globalAttrs
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
...globalAttrs,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Line, {}),
|
|
21
|
+
/* @__PURE__ */ jsx(Text, {
|
|
22
|
+
size,
|
|
23
|
+
verticalMargin,
|
|
24
|
+
"data-testid": "chat-message-delimiter-title",
|
|
25
|
+
children: title
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ jsx(Line, {})
|
|
28
|
+
]
|
|
29
|
+
});
|
|
24
30
|
};
|
|
25
31
|
MessageDelimiter.propTypes = messageDelimiterProps;
|
|
26
32
|
MessageDelimiter.displayName = "MessageDelimiter";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/message-delimiter/MessageDelimiter.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport {\n describe,\n useGetGlobalAttributes,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n} from '@elliemae/ds-utilities';\nimport { Wrapper, Line, Text } from './styled';\nimport { defaultProps, messageDelimiterProps, MessageDelimiterProps } from './props';\n\nconst MessageDelimiter: React.ComponentType<MessageDelimiterProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, messageDelimiterProps);\n const globalAttrs = useGetGlobalAttributes(propsWithDefault);\n const { title, size, verticalMargin } = propsWithDefault;\n return (\n <Wrapper cols={['1fr', 'auto', '1fr']} {...globalAttrs}>\n <Line />\n <Text size={size} verticalMargin={verticalMargin} data-testid=\"chat-message-delimiter-title\">\n {title}\n </Text>\n <Line />\n </Wrapper>\n );\n};\n\nMessageDelimiter.propTypes = messageDelimiterProps as WeakValidationMap<unknown>;\nMessageDelimiter.displayName = 'MessageDelimiter';\nconst MessageDelimiterWithSchema = describe(MessageDelimiter);\nMessageDelimiterWithSchema.propTypes = messageDelimiterProps as WeakValidationMap<unknown>;\n\nexport { MessageDelimiter, MessageDelimiterWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,SAAS,MAAM,YAAY;AACpC,SAAS,cAAc,6BAAoD;AAE3E,MAAM,mBAA+D,CAAC,UAAU;AAC9E,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,qBAAqB;AACtE,QAAM,cAAc,uBAAuB,gBAAgB;AAC3D,QAAM,EAAE,OAAO,MAAM,eAAe,IAAI;AACxC,SACE,qBAAC;AAAA,IAAQ,MAAM,CAAC,OAAO,QAAQ,KAAK;AAAA,IAAI,GAAG;AAAA,IACzC;AAAA,0BAAC,QAAK;AAAA,MACN,oBAAC;AAAA,QAAK;AAAA,QAAY;AAAA,QAAgC,eAAY;AAAA,QAC3D;AAAA,OACH;AAAA,MACA,oBAAC,QAAK;AAAA;AAAA,GACR;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
|
|
4
4
|
import { Wrapper, Header, Title, Time, Message } from "./style";
|
|
5
5
|
import { systemMessageProps, defaultProps } from "./props";
|
|
@@ -7,17 +7,29 @@ const SystemMessage = (props) => {
|
|
|
7
7
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
8
8
|
useValidateTypescriptPropTypes(propsWithDefault, systemMessageProps);
|
|
9
9
|
const { title, time, body } = propsWithDefault;
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
rows: ["auto", "auto"]
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
return /* @__PURE__ */ jsxs(Wrapper, {
|
|
11
|
+
rows: ["auto", "auto"],
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsxs(Header, {
|
|
14
|
+
cols: ["1fr", "auto", "1fr"],
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx("span", {}),
|
|
17
|
+
/* @__PURE__ */ jsx(Title, {
|
|
18
|
+
"data-testid": "chat-system-message-title",
|
|
19
|
+
children: title
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ jsx(Time, {
|
|
22
|
+
"data-testid": "chat-system-message-time",
|
|
23
|
+
children: time
|
|
24
|
+
})
|
|
25
|
+
]
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ jsx(Message, {
|
|
28
|
+
"data-testid": "chat-system-message-body",
|
|
29
|
+
children: body
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
});
|
|
21
33
|
};
|
|
22
34
|
SystemMessage.propTypes = systemMessageProps;
|
|
23
35
|
SystemMessage.displayName = "SystemMessage";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/system-message/SystemMessage.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { Wrapper, Header, Title, Time, Message } from './style';\nimport { SystemMessageProps, systemMessageProps, defaultProps } from './props';\n\nconst SystemMessage: React.ComponentType<SystemMessageProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, systemMessageProps);\n\n const { title, time, body } = propsWithDefault;\n return (\n <Wrapper rows={['auto', 'auto']}>\n <Header cols={['1fr', 'auto', '1fr']}>\n <span />\n <Title data-testid=\"chat-system-message-title\">{title}</Title>\n <Time data-testid=\"chat-system-message-time\">{time}</Time>\n </Header>\n <Message data-testid=\"chat-system-message-body\">{body}</Message>\n </Wrapper>\n );\n};\n\nSystemMessage.propTypes = systemMessageProps as WeakValidationMap<unknown>;\nSystemMessage.displayName = 'SystemMessage';\nconst SystemMessageWithSchema = describe(SystemMessage);\nSystemMessageWithSchema.propTypes = systemMessageProps as WeakValidationMap<unknown>;\n\nexport { SystemMessage, SystemMessageWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,SAAS,QAAQ,OAAO,MAAM,eAAe;AACtD,SAA6B,oBAAoB,oBAAoB;AAErE,MAAM,gBAAyD,CAAC,UAAU;AACxE,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,kBAAkB;AAEnE,QAAM,EAAE,OAAO,MAAM,KAAK,IAAI;AAC9B,SACE,qBAAC;AAAA,IAAQ,MAAM,CAAC,QAAQ,MAAM;AAAA,IAC5B;AAAA,2BAAC;AAAA,QAAO,MAAM,CAAC,OAAO,QAAQ,KAAK;AAAA,QACjC;AAAA,8BAAC,UAAK;AAAA,UACN,oBAAC;AAAA,YAAM,eAAY;AAAA,YAA6B;AAAA,WAAM;AAAA,UACtD,oBAAC;AAAA,YAAK,eAAY;AAAA,YAA4B;AAAA,WAAK;AAAA;AAAA,OACrD;AAAA,MACA,oBAAC;AAAA,QAAQ,eAAY;AAAA,QAA4B;AAAA,OAAK;AAAA;AAAA,GACxD;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React2 from "react";
|
|
3
4
|
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
|
|
4
5
|
import { DSTooltipV3 } from "@elliemae/ds-tooltip";
|
|
@@ -44,30 +45,41 @@ const TileButton = (props) => {
|
|
|
44
45
|
onClick(dsId, title);
|
|
45
46
|
}, [dsId, onClick, title]);
|
|
46
47
|
const MainContent = React2.useMemo(
|
|
47
|
-
() => /* @__PURE__ */
|
|
48
|
-
alignItems: isHeader ? "center" : void 0
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
() => /* @__PURE__ */ jsxs(StyledWrapperCentralContent, {
|
|
49
|
+
alignItems: isHeader ? "center" : void 0,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx(Grid, {
|
|
52
|
+
width: "100%",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
justifyContent: "center",
|
|
55
|
+
children: /* @__PURE__ */ jsxs(StyledTileButtonIcon, {
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
justifyContent: "center",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
60
|
+
size: "m"
|
|
61
|
+
}),
|
|
62
|
+
badge ? /* @__PURE__ */ jsx(StyledStatusBadge, {
|
|
63
|
+
badgeColor,
|
|
64
|
+
badgePosition,
|
|
65
|
+
"data-testid": `tile-badge-${dsId}`
|
|
66
|
+
}) : null
|
|
67
|
+
]
|
|
68
|
+
})
|
|
69
|
+
}),
|
|
70
|
+
!isHeader ? /* @__PURE__ */ jsx(Grid, {
|
|
71
|
+
width: "100%",
|
|
72
|
+
justifyContent: "center",
|
|
73
|
+
children: label ? /* @__PURE__ */ jsx(StyledTileButtonLabel, {
|
|
74
|
+
children: label
|
|
75
|
+
}) : null
|
|
76
|
+
}) : null
|
|
77
|
+
]
|
|
78
|
+
}),
|
|
66
79
|
[isHeader, Icon, badge, dsId, badgeColor, badgePosition, label]
|
|
67
80
|
);
|
|
68
81
|
const Btn = React2.useMemo(
|
|
69
|
-
() => /* @__PURE__ */
|
|
70
|
-
key: dsId,
|
|
82
|
+
() => /* @__PURE__ */ jsx(StyledTileButton, {
|
|
71
83
|
isHeader,
|
|
72
84
|
value: dsId,
|
|
73
85
|
"data-testid": `tile-button-${dsId}`,
|
|
@@ -81,15 +93,24 @@ const TileButton = (props) => {
|
|
|
81
93
|
badgePosition,
|
|
82
94
|
"aria-pressed": selected,
|
|
83
95
|
"aria-label": ariaLabel,
|
|
84
|
-
ref: innerRef
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
ref: innerRef,
|
|
97
|
+
children: /* @__PURE__ */ jsxs(StyledWrapper, {
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
justifyContent: "center",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx("span", {
|
|
102
|
+
children: MainContent
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ jsx(StyledWrapperLeftBorder, {}),
|
|
105
|
+
showClose && !disabled ? /* @__PURE__ */ jsx(CloseButton, {
|
|
106
|
+
onClick: onClose,
|
|
107
|
+
value: dsId,
|
|
108
|
+
"data-testid": `tile-close-btn-${dsId}`,
|
|
109
|
+
children: /* @__PURE__ */ jsx(CloseXsmall, {})
|
|
110
|
+
}) : null
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
}, dsId),
|
|
93
114
|
[
|
|
94
115
|
MainContent,
|
|
95
116
|
ariaLabel,
|
|
@@ -107,11 +128,14 @@ const TileButton = (props) => {
|
|
|
107
128
|
innerRef
|
|
108
129
|
]
|
|
109
130
|
);
|
|
110
|
-
return title && !disableTooltip ? /* @__PURE__ */
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
131
|
+
return title && !disableTooltip ? /* @__PURE__ */ jsx(StyledTooltipV3ButtonWrapper, {
|
|
132
|
+
children: /* @__PURE__ */ jsx(DSTooltipV3, {
|
|
133
|
+
id: `ds-chat-tile-tooltip-button-${dsId}`,
|
|
134
|
+
text: title,
|
|
135
|
+
startPlacementPreference: tooltipPlacement,
|
|
136
|
+
children: Btn
|
|
137
|
+
})
|
|
138
|
+
}) : Btn;
|
|
115
139
|
};
|
|
116
140
|
TileButton.propTypes = propsTileButton;
|
|
117
141
|
TileButton.displayName = "TileButton";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/tile-button/TileButton.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { Grid } from '@elliemae/ds-grid';\nimport { CloseXsmall } from '@elliemae/ds-icons';\nimport {\n StyledTooltipV3ButtonWrapper,\n StyledTileButton,\n StyledTileButtonIcon,\n StyledTileButtonLabel,\n StyledWrapper,\n StyledWrapperLeftBorder,\n StyledStatusBadge,\n StyledWrapperCentralContent,\n CloseButton,\n} from './styled';\nimport { propsTileButton, defaultTileButton, TileButtonProps } from './props';\n\nconst TileButton: React.ComponentType<TileButtonProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultTileButton);\n useValidateTypescriptPropTypes(propsWithDefault, propsTileButton);\n\n const {\n label,\n title,\n dsId,\n onClick,\n onFocus,\n onBlur,\n Icon,\n showClose,\n onClose,\n badge,\n badgeColor,\n badgePosition,\n disabled,\n selected,\n isHeader,\n ariaLabel,\n tooltipPlacement,\n disableTooltip,\n innerRef,\n } = propsWithDefault;\n const handleClick = React.useCallback(() => {\n onClick(dsId, title);\n }, [dsId, onClick, title]);\n\n const MainContent = React.useMemo(\n () => (\n <StyledWrapperCentralContent alignItems={isHeader ? 'center' : undefined}>\n <Grid width=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n <StyledTileButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n {badge ? (\n <StyledStatusBadge\n badgeColor={badgeColor}\n badgePosition={badgePosition}\n data-testid={`tile-badge-${dsId}`}\n />\n ) : null}\n </StyledTileButtonIcon>\n </Grid>\n {!isHeader ? (\n <Grid width=\"100%\" justifyContent=\"center\">\n {label ? <StyledTileButtonLabel>{label}</StyledTileButtonLabel> : null}\n </Grid>\n ) : null}\n </StyledWrapperCentralContent>\n ),\n [isHeader, Icon, badge, dsId, badgeColor, badgePosition, label],\n );\n\n const Btn = React.useMemo(\n () => (\n <StyledTileButton\n key={dsId}\n isHeader={isHeader}\n value={dsId}\n data-testid={`tile-button-${dsId}`}\n data-key={dsId}\n onClick={handleClick}\n onFocus={onFocus}\n onBlur={onBlur}\n disabled={disabled}\n selected={selected}\n badgeColor={badgeColor}\n badgePosition={badgePosition}\n aria-pressed={selected}\n aria-label={ariaLabel}\n ref={innerRef}\n >\n <StyledWrapper alignItems=\"center\" justifyContent=\"center\">\n <span>{MainContent}</span>\n <StyledWrapperLeftBorder />\n {showClose && !disabled ? (\n <CloseButton onClick={onClose} value={dsId} data-testid={`tile-close-btn-${dsId}`}>\n <CloseXsmall />\n </CloseButton>\n ) : null}\n </StyledWrapper>\n </StyledTileButton>\n ),\n [\n MainContent,\n ariaLabel,\n badgeColor,\n badgePosition,\n disabled,\n dsId,\n handleClick,\n isHeader,\n onBlur,\n onClose,\n onFocus,\n selected,\n showClose,\n innerRef,\n ],\n );\n\n return title && !disableTooltip ? (\n <StyledTooltipV3ButtonWrapper>\n <DSTooltipV3 id={`ds-chat-tile-tooltip-button-${dsId}`} text={title} startPlacementPreference={tooltipPlacement}>\n {Btn}\n </DSTooltipV3>\n </StyledTooltipV3ButtonWrapper>\n ) : (\n Btn\n );\n};\n\nTileButton.propTypes = propsTileButton as WeakValidationMap<unknown>;\nTileButton.displayName = 'TileButton';\nconst TileButtonWithSchema = describe(TileButton);\nTileButtonWithSchema.propTypes = propsTileButton as WeakValidationMap<unknown>;\n\nexport { TileButton, TileButtonWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|