@elliemae/ds-chat-sidebar 3.37.2 → 3.38.0-rc.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.
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var DSChatSidebarDataTestIds_exports = {};
30
+ __export(DSChatSidebarDataTestIds_exports, {
31
+ DSChatSidebarDataTestIds: () => DSChatSidebarDataTestIds
32
+ });
33
+ module.exports = __toCommonJS(DSChatSidebarDataTestIds_exports);
34
+ var React = __toESM(require("react"));
35
+ const DSChatSidebarDataTestIds = {
36
+ ROOT: "ds-chat-sidebar"
37
+ };
38
+ //# sourceMappingURL=DSChatSidebarDataTestIds.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/DSChatSidebarDataTestIds.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const DSChatSidebarDataTestIds = {\n ROOT: 'ds-chat-sidebar',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,2BAA2B;AAAA,EACtC,MAAM;AACR;",
6
+ "names": []
7
+ }
@@ -42,6 +42,7 @@ var import_styled = require("./styled.js");
42
42
  var import_SidebarButton = require("./sidebar-button/SidebarButton.js");
43
43
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
44
44
  var import_DSChatSidebarDefinitions = require("./DSChatSidebarDefinitions.js");
45
+ var import_DSChatSidebarDataTestIds = require("./DSChatSidebarDataTestIds.js");
45
46
  const FooterChat = ({
46
47
  expanded,
47
48
  onFooterClose,
@@ -83,7 +84,7 @@ const SideBarChat = (props) => {
83
84
  actionRef.current.listRef = listRef;
84
85
  }
85
86
  }, [sidebarItems, expanded, actionRef, listRef]);
86
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledSideBarContainer, { rows: ["1fr", "auto"], children: [
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledSideBarContainer, { rows: ["1fr", "auto"], "data-testid": import_DSChatSidebarDataTestIds.DSChatSidebarDataTestIds.ROOT, children: [
87
88
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSideBarButtonsContainer, { children: sidebarItems.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
89
  import_ds_chat_tile.TileButton,
89
90
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SideBarChat.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { TileButton } from '@elliemae/ds-chat-tile';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled.js';\nimport { SidebarButton } from './sidebar-button/SidebarButton.js';\nimport type { DSChatSidebarT } from './react-desc-prop-types.js';\nimport { defaultProps, chatSidebarProps } from './react-desc-prop-types.js';\nimport { DSChatSidebarName } from './DSChatSidebarDefinitions.js';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<DSChatSidebarT.DefaultProps, '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<DSChatSidebarT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSidebarT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps, DSChatSidebarName);\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<{ [key: string]: HTMLElement }>({});\n const registerReference = React.useCallback(\n (ref: HTMLElement) => {\n if (ref?.dataset?.key) 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={['1fr', 'auto']}>\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.displayName = DSChatSidebarName;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBrB;AAhBF,mBAAkB;AAClB,8BAAuF;AACvF,sBAAyC;AACzC,0BAA2B;AAC3B,oBAAsE;AACtE,2BAA8B;AAE9B,mCAA+C;AAC/C,sCAAkC;AAElC,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC,MAAK;AAAA,IACL,MAAM,CAAC,WAAW,+BAAe;AAAA,IACjC,SAAS,WAAW,gBAAgB;AAAA,IACpC,gBAAc;AAAA,IACd,cAAY,uBAAuB,YAAY;AAAA;AACjD;AAGF,MAAM,cAAyD,CAAC,UAAU;AACxE,QAAM,uBAAmB,sDAA2D,OAAO,yCAAY;AACvG,8DAA+B,kBAAkB,+CAAkB,iDAAiB;AACpF,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,IAAI,aAAAA,QAAM,OAAuC,CAAC,CAAC;AAC5E,QAAM,oBAAoB,aAAAA,QAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI,KAAK,SAAS,IAAK,SAAQ,IAAI,QAAQ,GAAG,IAAI;AAAA,IACpD;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AACA,eAAAA,QAAM,UAAU,MAAM;AACpB,QAAI,WAAW,SAAS,SAAS;AAC/B,gBAAU,QAAQ,UAAU;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,cAAc,UAAU,WAAW,OAAO,CAAC;AAE/C,SACE,6CAAC,wCAAuB,MAAM,CAAC,OAAO,MAAM,GAC1C;AAAA,gDAAC,+CACE,uBAAa,IAAI,CAAC,MACjB;AAAA,MAAC;AAAA;AAAA,QAEC,UAAU;AAAA,QACT,GAAG;AAAA,QACJ,UAAU,iBAAiB,EAAE;AAAA,QAC7B;AAAA,QACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA;AAAA,MALhD,EAAE;AAAA,IAMT,CACD,GACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;",
4
+ "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { TileButton } from '@elliemae/ds-chat-tile';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled.js';\nimport { SidebarButton } from './sidebar-button/SidebarButton.js';\nimport type { DSChatSidebarT } from './react-desc-prop-types.js';\nimport { defaultProps, chatSidebarProps } from './react-desc-prop-types.js';\nimport { DSChatSidebarName } from './DSChatSidebarDefinitions.js';\nimport { DSChatSidebarDataTestIds } from './DSChatSidebarDataTestIds.js';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<DSChatSidebarT.DefaultProps, '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<DSChatSidebarT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSidebarT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps, DSChatSidebarName);\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<{ [key: string]: HTMLElement }>({});\n const registerReference = React.useCallback(\n (ref: HTMLElement) => {\n if (ref?.dataset?.key) 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={['1fr', 'auto']} data-testid={DSChatSidebarDataTestIds.ROOT}>\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.displayName = DSChatSidebarName;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBrB;AAjBF,mBAAkB;AAClB,8BAAuF;AACvF,sBAAyC;AACzC,0BAA2B;AAC3B,oBAAsE;AACtE,2BAA8B;AAE9B,mCAA+C;AAC/C,sCAAkC;AAClC,sCAAyC;AAEzC,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC,MAAK;AAAA,IACL,MAAM,CAAC,WAAW,+BAAe;AAAA,IACjC,SAAS,WAAW,gBAAgB;AAAA,IACpC,gBAAc;AAAA,IACd,cAAY,uBAAuB,YAAY;AAAA;AACjD;AAGF,MAAM,cAAyD,CAAC,UAAU;AACxE,QAAM,uBAAmB,sDAA2D,OAAO,yCAAY;AACvG,8DAA+B,kBAAkB,+CAAkB,iDAAiB;AACpF,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,IAAI,aAAAA,QAAM,OAAuC,CAAC,CAAC;AAC5E,QAAM,oBAAoB,aAAAA,QAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI,KAAK,SAAS,IAAK,SAAQ,IAAI,QAAQ,GAAG,IAAI;AAAA,IACpD;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AACA,eAAAA,QAAM,UAAU,MAAM;AACpB,QAAI,WAAW,SAAS,SAAS;AAC/B,gBAAU,QAAQ,UAAU;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,cAAc,UAAU,WAAW,OAAO,CAAC;AAE/C,SACE,6CAAC,wCAAuB,MAAM,CAAC,OAAO,MAAM,GAAG,eAAa,yDAAyB,MACnF;AAAA,gDAAC,+CACE,uBAAa,IAAI,CAAC,MACjB;AAAA,MAAC;AAAA;AAAA,QAEC,UAAU;AAAA,QACT,GAAG;AAAA,QACJ,UAAU,iBAAiB,EAAE;AAAA,QAC7B;AAAA,QACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA;AAAA,MALhD,EAAE;AAAA,IAMT,CACD,GACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\n\nexport declare namespace DSChatSidebarT {\n type TooltipPlacementT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n\n export interface DefaultProps {\n sidebarItems: DSChatTileT.Props[];\n expanded: boolean;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, string>;\n tooltipPlacement: TooltipPlacementT;\n enableTooltipWhenIsClosed: boolean;\n }\n\n export interface OptionalProps {\n selectedItem?: string | number;\n actionRef?: React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n }>;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatSidebarT.DefaultProps = {\n expanded: false,\n sidebarItems: [],\n onFooterExpand: noop,\n onFooterClose: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'right',\n enableTooltipWhenIsClosed: false,\n};\n\nexport const chatSidebarProps = {\n sidebarItems: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat')\n .defaultValue(defaultProps.sidebarItems),\n expanded: PropTypes.bool\n .description('Whether to show the chat expanded or collapsed')\n .defaultValue(defaultProps.expanded),\n selectedItem: PropTypes.string.description('The id of the chat item you want to be opened'),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n enableTooltipWhenIsClosed: PropTypes.bool\n .description('Enable tooltip when is closed')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterExpand: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterClose: PropTypes.func\n .description('The function to call when the chat is closed via the footer')\n .defaultValue(defaultProps.onFooterClose),\n onHeaderExpand: PropTypes.func\n .description('The function to call when the chat is opened via the header')\n .defaultValue(defaultProps.onHeaderExpand),\n onHeaderClose: PropTypes.func\n .description('The function to call when the chat is closed via the header')\n .defaultValue(defaultProps.onHeaderClose),\n footerButtonExtraProps: PropTypes.object\n .description('Expand/collapse footer button extra props')\n .defaultValue(defaultProps.footerButtonExtraProps),\n actionRef: PropTypes.object.description(\n `Action ref for sidebar\n {\n listRef: references to Tiles\n }\n `,\n ),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,oBAAqB;AAyCd,MAAM,eAA4C;AAAA,EACvD,UAAU;AAAA,EACV,cAAc,CAAC;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEO,MAAM,mBAAmB;AAAA,EAC9B,cAAc,kCAAU,QAAQ,kCAAU,MAAM,EAC7C,YAAY,yFAAyF,EACrG,aAAa,aAAa,YAAY;AAAA,EACzC,UAAU,kCAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,aAAa,QAAQ;AAAA,EACrC,cAAc,kCAAU,OAAO,YAAY,+CAA+C;AAAA,EAC1F,kBAAkB,kCAAU,MAAM;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+DAA+D,EAC3E,aAAa,SAAS;AAAA,EACzB,2BAA2B,kCAAU,KAClC,YAAY,+BAA+B,EAC3C,aAAa,aAAa,cAAc;AAAA,EAC3C,gBAAgB,kCAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,kCAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,gBAAgB,kCAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,kCAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,wBAAwB,kCAAU,OAC/B,YAAY,2CAA2C,EACvD,aAAa,aAAa,sBAAsB;AAAA,EACnD,WAAW,kCAAU,OAAO;AAAA,IAC1B;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF;AACF;",
4
+ "sourcesContent": ["import type { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\n\nexport declare namespace DSChatSidebarT {\n type TooltipPlacementT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n sidebarItems: DSChatTileT.Props[];\n expanded: boolean;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, string>;\n tooltipPlacement: TooltipPlacementT;\n enableTooltipWhenIsClosed: boolean;\n }\n\n export interface OptionalProps {\n selectedItem?: string | number;\n actionRef?: React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n }>;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {}\n}\n\nexport const defaultProps: DSChatSidebarT.DefaultProps = {\n expanded: false,\n sidebarItems: [],\n onFooterExpand: noop,\n onFooterClose: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'right',\n enableTooltipWhenIsClosed: false,\n};\n\nexport const chatSidebarProps = {\n sidebarItems: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat')\n .defaultValue(defaultProps.sidebarItems),\n expanded: PropTypes.bool\n .description('Whether to show the chat expanded or collapsed')\n .defaultValue(defaultProps.expanded),\n selectedItem: PropTypes.string.description('The id of the chat item you want to be opened'),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n enableTooltipWhenIsClosed: PropTypes.bool\n .description('Enable tooltip when is closed')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterExpand: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterClose: PropTypes.func\n .description('The function to call when the chat is closed via the footer')\n .defaultValue(defaultProps.onFooterClose),\n onHeaderExpand: PropTypes.func\n .description('The function to call when the chat is opened via the header')\n .defaultValue(defaultProps.onHeaderExpand),\n onHeaderClose: PropTypes.func\n .description('The function to call when the chat is closed via the header')\n .defaultValue(defaultProps.onHeaderClose),\n footerButtonExtraProps: PropTypes.object\n .description('Expand/collapse footer button extra props')\n .defaultValue(defaultProps.footerButtonExtraProps),\n actionRef: PropTypes.object.description(\n `Action ref for sidebar\n {\n listRef: references to Tiles\n }\n `,\n ),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,oBAAqB;AA2Cd,MAAM,eAA4C;AAAA,EACvD,UAAU;AAAA,EACV,cAAc,CAAC;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEO,MAAM,mBAAmB;AAAA,EAC9B,cAAc,kCAAU,QAAQ,kCAAU,MAAM,EAC7C,YAAY,yFAAyF,EACrG,aAAa,aAAa,YAAY;AAAA,EACzC,UAAU,kCAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,aAAa,QAAQ;AAAA,EACrC,cAAc,kCAAU,OAAO,YAAY,+CAA+C;AAAA,EAC1F,kBAAkB,kCAAU,MAAM;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+DAA+D,EAC3E,aAAa,SAAS;AAAA,EACzB,2BAA2B,kCAAU,KAClC,YAAY,+BAA+B,EAC3C,aAAa,aAAa,cAAc;AAAA,EAC3C,gBAAgB,kCAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,kCAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,gBAAgB,kCAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,kCAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,wBAAwB,kCAAU,OAC/B,YAAY,2CAA2C,EACvD,aAAa,aAAa,sBAAsB;AAAA,EACnD,WAAW,kCAAU,OAAO;AAAA,IAC1B;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF;AACF;",
6
6
  "names": []
7
7
  }
@@ -24,8 +24,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  var React = __toESM(require("react"));
25
25
  var import_jsx_runtime = require("react/jsx-runtime");
26
26
  var import_react = require("react");
27
- var import__ = require("../index.js");
28
27
  var import_lodash = require("lodash");
28
+ var import__ = require("../index.js");
29
29
  const ref = (0, import_react.createRef)();
30
30
  const MockSidebarItems = [
31
31
  {
@@ -37,9 +37,9 @@ const MockSidebarItems = [
37
37
  dsId: "2",
38
38
  label: "ED",
39
39
  title: "Example ED"
40
- },
41
- ,
40
+ }
42
41
  ];
42
+ const testRequiredProps = {};
43
43
  const testOptionalProps = {
44
44
  actionRef: ref,
45
45
  selectedItem: ""
@@ -50,10 +50,12 @@ const testPartialDefaults = {
50
50
  tooltipPlacement: "bottom"
51
51
  };
52
52
  const testProps = {
53
+ ...testRequiredProps,
53
54
  ...testOptionalProps,
54
55
  ...testPartialDefaults
55
56
  };
56
57
  const testPropsAsSyntax = {
58
+ ...testRequiredProps,
57
59
  ...testOptionalProps,
58
60
  ...testPartialDefaults
59
61
  };
@@ -69,10 +71,12 @@ const testCompleteDefaults = {
69
71
  enableTooltipWhenIsClosed: false
70
72
  };
71
73
  const testInternalProps = {
74
+ ...testRequiredProps,
72
75
  ...testOptionalProps,
73
76
  ...testCompleteDefaults
74
77
  };
75
78
  const testInternalPropsAsSyntax = {
79
+ ...testRequiredProps,
76
80
  ...testOptionalProps,
77
81
  ...testCompleteDefaults
78
82
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-chat-sidebar-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport type { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { SideBarChat } from '../index.js';\nimport type { DSChatSidebarT } from '../index.js';\nimport { noop } from 'lodash';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatSidebarT.Props;\ntype ComponentPropsInternals = DSChatSidebarT.InternalProps;\ntype ComponentPropsDefaultProps = DSChatSidebarT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChatSidebarT.OptionalProps;\n\nconst ref = createRef() as React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n}>;\n\nconst MockSidebarItems = [\n {\n dsId: '1',\n label: 'AB',\n title: 'Example AB',\n },\n {\n dsId: '2',\n label: 'ED',\n title: 'Example ED',\n },\n ,\n] as DSChatTileT.Props[];\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n actionRef: ref,\n selectedItem: '',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n sidebarItems: MockSidebarItems,\n expanded: true,\n tooltipPlacement: 'bottom',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <SideBarChat {...testExplicitDefinition} />\n <SideBarChat {...testInferedTypeCompatibility} />\n <SideBarChat {...testDefinitionAsConst} />\n {/* works with inline values */}\n <SideBarChat\n sidebarItems={MockSidebarItems}\n expanded\n onFooterClose={noop}\n onFooterExpand={noop}\n onHeaderExpand={noop}\n onHeaderClose={noop}\n footerButtonExtraProps={{ 'aria-label': 'expand or collapse button' }}\n tooltipPlacement=\"bottom\"\n enableTooltipWhenIsClosed={false}\n />\n </>\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACoHrB;AAnHF,mBAA0B;AAE1B,eAA4B;AAE5B,oBAAqB;AAQrB,MAAM,UAAM,wBAAU;AAItB,MAAM,mBAAmB;AAAA,EACvB;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AACF;AAEA,MAAM,oBAAiD;AAAA,EACrD,WAAW;AAAA,EACX,cAAc;AAChB;AAIA,MAAM,sBAA2D;AAAA,EAC/D,cAAc;AAAA,EACd,UAAU;AAAA,EACV,kBAAkB;AACpB;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAGA,MAAM,+BAA+B;AAAA,EACnC,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,wBAAwB;AAAA,EAC5B,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,wBAAa,GAAG,wBAAwB;AAAA,EACzC,4CAAC,wBAAa,GAAG,8BAA8B;AAAA,EAC/C,4CAAC,wBAAa,GAAG,uBAAuB;AAAA,EAExC;AAAA,IAAC;AAAA;AAAA,MACC,cAAc;AAAA,MACd,UAAQ;AAAA,MACR,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,MACpE,kBAAiB;AAAA,MACjB,2BAA2B;AAAA;AAAA,EAC7B;AAAA,GACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport type { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { noop } from 'lodash';\nimport { SideBarChat } from '../index.js';\nimport type { DSChatSidebarT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatSidebarT.Props;\ntype ComponentPropsInternals = DSChatSidebarT.InternalProps;\ntype ComponentPropsDefaultProps = DSChatSidebarT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChatSidebarT.OptionalProps;\ntype ComponentPropsRequiredProps = DSChatSidebarT.RequiredProps;\n\nconst ref = createRef() as React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n}>;\n\nconst MockSidebarItems = [\n {\n dsId: '1',\n label: 'AB',\n title: 'Example AB',\n },\n {\n dsId: '2',\n label: 'ED',\n title: 'Example ED',\n },\n] as DSChatTileT.Props[];\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n actionRef: ref,\n selectedItem: '',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n sidebarItems: MockSidebarItems,\n expanded: true,\n tooltipPlacement: 'bottom',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <SideBarChat {...testExplicitDefinition} />\n <SideBarChat {...testInferedTypeCompatibility} />\n <SideBarChat {...testDefinitionAsConst} />\n {/* works with inline values */}\n <SideBarChat\n sidebarItems={MockSidebarItems}\n expanded\n onFooterClose={noop}\n onFooterExpand={noop}\n onHeaderExpand={noop}\n onHeaderClose={noop}\n footerButtonExtraProps={{ 'aria-label': 'expand or collapse button' }}\n tooltipPlacement=\"bottom\"\n enableTooltipWhenIsClosed={false}\n />\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC0HrB;AAzHF,mBAA0B;AAE1B,oBAAqB;AACrB,eAA4B;AAU5B,MAAM,UAAM,wBAAU;AAItB,MAAM,mBAAmB;AAAA,EACvB;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEA,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD;AAAA,EACrD,WAAW;AAAA,EACX,cAAc;AAChB;AAIA,MAAM,sBAA2D;AAAA,EAC/D,cAAc;AAAA,EACd,UAAU;AAAA,EACV,kBAAkB;AACpB;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAGA,MAAM,+BAA+B;AAAA,EACnC,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,wBAAwB;AAAA,EAC5B,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,wBAAa,GAAG,wBAAwB;AAAA,EACzC,4CAAC,wBAAa,GAAG,8BAA8B;AAAA,EAC/C,4CAAC,wBAAa,GAAG,uBAAuB;AAAA,EAExC;AAAA,IAAC;AAAA;AAAA,MACC,cAAc;AAAA,MACd,UAAQ;AAAA,MACR,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,MACpE,kBAAiB;AAAA,MACjB,2BAA2B;AAAA;AAAA,EAC7B;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ const DSChatSidebarDataTestIds = {
3
+ ROOT: "ds-chat-sidebar"
4
+ };
5
+ export {
6
+ DSChatSidebarDataTestIds
7
+ };
8
+ //# sourceMappingURL=DSChatSidebarDataTestIds.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSChatSidebarDataTestIds.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSChatSidebarDataTestIds = {\n ROOT: 'ds-chat-sidebar',\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,2BAA2B;AAAA,EACtC,MAAM;AACR;",
6
+ "names": []
7
+ }
@@ -8,6 +8,7 @@ import { StyledSideBarContainer, StyledSideBarButtonsContainer } from "./styled.
8
8
  import { SidebarButton } from "./sidebar-button/SidebarButton.js";
9
9
  import { defaultProps, chatSidebarProps } from "./react-desc-prop-types.js";
10
10
  import { DSChatSidebarName } from "./DSChatSidebarDefinitions.js";
11
+ import { DSChatSidebarDataTestIds } from "./DSChatSidebarDataTestIds.js";
11
12
  const FooterChat = ({
12
13
  expanded,
13
14
  onFooterClose,
@@ -49,7 +50,7 @@ const SideBarChat = (props) => {
49
50
  actionRef.current.listRef = listRef;
50
51
  }
51
52
  }, [sidebarItems, expanded, actionRef, listRef]);
52
- return /* @__PURE__ */ jsxs(StyledSideBarContainer, { rows: ["1fr", "auto"], children: [
53
+ return /* @__PURE__ */ jsxs(StyledSideBarContainer, { rows: ["1fr", "auto"], "data-testid": DSChatSidebarDataTestIds.ROOT, children: [
53
54
  /* @__PURE__ */ jsx(StyledSideBarButtonsContainer, { children: sidebarItems.map((p) => /* @__PURE__ */ jsx(
54
55
  TileButton,
55
56
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/SideBarChat.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { TileButton } from '@elliemae/ds-chat-tile';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled.js';\nimport { SidebarButton } from './sidebar-button/SidebarButton.js';\nimport type { DSChatSidebarT } from './react-desc-prop-types.js';\nimport { defaultProps, chatSidebarProps } from './react-desc-prop-types.js';\nimport { DSChatSidebarName } from './DSChatSidebarDefinitions.js';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<DSChatSidebarT.DefaultProps, '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<DSChatSidebarT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSidebarT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps, DSChatSidebarName);\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<{ [key: string]: HTMLElement }>({});\n const registerReference = React.useCallback(\n (ref: HTMLElement) => {\n if (ref?.dataset?.key) 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={['1fr', 'auto']}>\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.displayName = DSChatSidebarName;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACiBrB,cAqCE,YArCF;AAhBF,OAAOA,YAAW;AAClB,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,cAAc,kBAAkB;AACzC,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB,qCAAqC;AACtE,SAAS,qBAAqB;AAE9B,SAAS,cAAc,wBAAwB;AAC/C,SAAS,yBAAyB;AAElC,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC,MAAK;AAAA,IACL,MAAM,CAAC,WAAW,eAAe;AAAA,IACjC,SAAS,WAAW,gBAAgB;AAAA,IACpC,gBAAc;AAAA,IACd,cAAY,uBAAuB,YAAY;AAAA;AACjD;AAGF,MAAM,cAAyD,CAAC,UAAU;AACxE,QAAM,mBAAmB,6BAA2D,OAAO,YAAY;AACvG,iCAA+B,kBAAkB,kBAAkB,iBAAiB;AACpF,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,OAAuC,CAAC,CAAC;AAC5E,QAAM,oBAAoBA,OAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI,KAAK,SAAS,IAAK,SAAQ,IAAI,QAAQ,GAAG,IAAI;AAAA,IACpD;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AACA,EAAAA,OAAM,UAAU,MAAM;AACpB,QAAI,WAAW,SAAS,SAAS;AAC/B,gBAAU,QAAQ,UAAU;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,cAAc,UAAU,WAAW,OAAO,CAAC;AAE/C,SACE,qBAAC,0BAAuB,MAAM,CAAC,OAAO,MAAM,GAC1C;AAAA,wBAAC,iCACE,uBAAa,IAAI,CAAC,MACjB;AAAA,MAAC;AAAA;AAAA,QAEC,UAAU;AAAA,QACT,GAAG;AAAA,QACJ,UAAU,iBAAiB,EAAE;AAAA,QAC7B;AAAA,QACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA;AAAA,MALhD,EAAE;AAAA,IAMT,CACD,GACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { TileButton } from '@elliemae/ds-chat-tile';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled.js';\nimport { SidebarButton } from './sidebar-button/SidebarButton.js';\nimport type { DSChatSidebarT } from './react-desc-prop-types.js';\nimport { defaultProps, chatSidebarProps } from './react-desc-prop-types.js';\nimport { DSChatSidebarName } from './DSChatSidebarDefinitions.js';\nimport { DSChatSidebarDataTestIds } from './DSChatSidebarDataTestIds.js';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<DSChatSidebarT.DefaultProps, '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<DSChatSidebarT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatSidebarT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps, DSChatSidebarName);\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<{ [key: string]: HTMLElement }>({});\n const registerReference = React.useCallback(\n (ref: HTMLElement) => {\n if (ref?.dataset?.key) 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={['1fr', 'auto']} data-testid={DSChatSidebarDataTestIds.ROOT}>\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.displayName = DSChatSidebarName;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACkBrB,cAqCE,YArCF;AAjBF,OAAOA,YAAW;AAClB,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,cAAc,kBAAkB;AACzC,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB,qCAAqC;AACtE,SAAS,qBAAqB;AAE9B,SAAS,cAAc,wBAAwB;AAC/C,SAAS,yBAAyB;AAClC,SAAS,gCAAgC;AAEzC,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC,MAAK;AAAA,IACL,MAAM,CAAC,WAAW,eAAe;AAAA,IACjC,SAAS,WAAW,gBAAgB;AAAA,IACpC,gBAAc;AAAA,IACd,cAAY,uBAAuB,YAAY;AAAA;AACjD;AAGF,MAAM,cAAyD,CAAC,UAAU;AACxE,QAAM,mBAAmB,6BAA2D,OAAO,YAAY;AACvG,iCAA+B,kBAAkB,kBAAkB,iBAAiB;AACpF,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,OAAuC,CAAC,CAAC;AAC5E,QAAM,oBAAoBA,OAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI,KAAK,SAAS,IAAK,SAAQ,IAAI,QAAQ,GAAG,IAAI;AAAA,IACpD;AAAA,IACA,CAAC,OAAO;AAAA,EACV;AACA,EAAAA,OAAM,UAAU,MAAM;AACpB,QAAI,WAAW,SAAS,SAAS;AAC/B,gBAAU,QAAQ,UAAU;AAAA,IAC9B;AAAA,EACF,GAAG,CAAC,cAAc,UAAU,WAAW,OAAO,CAAC;AAE/C,SACE,qBAAC,0BAAuB,MAAM,CAAC,OAAO,MAAM,GAAG,eAAa,yBAAyB,MACnF;AAAA,wBAAC,iCACE,uBAAa,IAAI,CAAC,MACjB;AAAA,MAAC;AAAA;AAAA,QAEC,UAAU;AAAA,QACT,GAAG;AAAA,QACJ,UAAU,iBAAiB,EAAE;AAAA,QAC7B;AAAA,QACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA;AAAA,MALhD,EAAE;AAAA,IAMT,CACD,GACH;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\n\nexport declare namespace DSChatSidebarT {\n type TooltipPlacementT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n\n export interface DefaultProps {\n sidebarItems: DSChatTileT.Props[];\n expanded: boolean;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, string>;\n tooltipPlacement: TooltipPlacementT;\n enableTooltipWhenIsClosed: boolean;\n }\n\n export interface OptionalProps {\n selectedItem?: string | number;\n actionRef?: React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n }>;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatSidebarT.DefaultProps = {\n expanded: false,\n sidebarItems: [],\n onFooterExpand: noop,\n onFooterClose: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'right',\n enableTooltipWhenIsClosed: false,\n};\n\nexport const chatSidebarProps = {\n sidebarItems: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat')\n .defaultValue(defaultProps.sidebarItems),\n expanded: PropTypes.bool\n .description('Whether to show the chat expanded or collapsed')\n .defaultValue(defaultProps.expanded),\n selectedItem: PropTypes.string.description('The id of the chat item you want to be opened'),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n enableTooltipWhenIsClosed: PropTypes.bool\n .description('Enable tooltip when is closed')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterExpand: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterClose: PropTypes.func\n .description('The function to call when the chat is closed via the footer')\n .defaultValue(defaultProps.onFooterClose),\n onHeaderExpand: PropTypes.func\n .description('The function to call when the chat is opened via the header')\n .defaultValue(defaultProps.onHeaderExpand),\n onHeaderClose: PropTypes.func\n .description('The function to call when the chat is closed via the header')\n .defaultValue(defaultProps.onHeaderClose),\n footerButtonExtraProps: PropTypes.object\n .description('Expand/collapse footer button extra props')\n .defaultValue(defaultProps.footerButtonExtraProps),\n actionRef: PropTypes.object.description(\n `Action ref for sidebar\n {\n listRef: references to Tiles\n }\n `,\n ),\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAyCd,MAAM,eAA4C;AAAA,EACvD,UAAU;AAAA,EACV,cAAc,CAAC;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEO,MAAM,mBAAmB;AAAA,EAC9B,cAAc,UAAU,QAAQ,UAAU,MAAM,EAC7C,YAAY,yFAAyF,EACrG,aAAa,aAAa,YAAY;AAAA,EACzC,UAAU,UAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,aAAa,QAAQ;AAAA,EACrC,cAAc,UAAU,OAAO,YAAY,+CAA+C;AAAA,EAC1F,kBAAkB,UAAU,MAAM;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+DAA+D,EAC3E,aAAa,SAAS;AAAA,EACzB,2BAA2B,UAAU,KAClC,YAAY,+BAA+B,EAC3C,aAAa,aAAa,cAAc;AAAA,EAC3C,gBAAgB,UAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,UAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,gBAAgB,UAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,UAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,wBAAwB,UAAU,OAC/B,YAAY,2CAA2C,EACvD,aAAa,aAAa,sBAAsB;AAAA,EACnD,WAAW,UAAU,OAAO;AAAA,IAC1B;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\n\nexport declare namespace DSChatSidebarT {\n type TooltipPlacementT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n sidebarItems: DSChatTileT.Props[];\n expanded: boolean;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, string>;\n tooltipPlacement: TooltipPlacementT;\n enableTooltipWhenIsClosed: boolean;\n }\n\n export interface OptionalProps {\n selectedItem?: string | number;\n actionRef?: React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n }>;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {}\n}\n\nexport const defaultProps: DSChatSidebarT.DefaultProps = {\n expanded: false,\n sidebarItems: [],\n onFooterExpand: noop,\n onFooterClose: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'right',\n enableTooltipWhenIsClosed: false,\n};\n\nexport const chatSidebarProps = {\n sidebarItems: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat')\n .defaultValue(defaultProps.sidebarItems),\n expanded: PropTypes.bool\n .description('Whether to show the chat expanded or collapsed')\n .defaultValue(defaultProps.expanded),\n selectedItem: PropTypes.string.description('The id of the chat item you want to be opened'),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n enableTooltipWhenIsClosed: PropTypes.bool\n .description('Enable tooltip when is closed')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterExpand: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterClose: PropTypes.func\n .description('The function to call when the chat is closed via the footer')\n .defaultValue(defaultProps.onFooterClose),\n onHeaderExpand: PropTypes.func\n .description('The function to call when the chat is opened via the header')\n .defaultValue(defaultProps.onHeaderExpand),\n onHeaderClose: PropTypes.func\n .description('The function to call when the chat is closed via the header')\n .defaultValue(defaultProps.onHeaderClose),\n footerButtonExtraProps: PropTypes.object\n .description('Expand/collapse footer button extra props')\n .defaultValue(defaultProps.footerButtonExtraProps),\n actionRef: PropTypes.object.description(\n `Action ref for sidebar\n {\n listRef: references to Tiles\n }\n `,\n ),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AA2Cd,MAAM,eAA4C;AAAA,EACvD,UAAU;AAAA,EACV,cAAc,CAAC;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEO,MAAM,mBAAmB;AAAA,EAC9B,cAAc,UAAU,QAAQ,UAAU,MAAM,EAC7C,YAAY,yFAAyF,EACrG,aAAa,aAAa,YAAY;AAAA,EACzC,UAAU,UAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,aAAa,QAAQ;AAAA,EACrC,cAAc,UAAU,OAAO,YAAY,+CAA+C;AAAA,EAC1F,kBAAkB,UAAU,MAAM;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+DAA+D,EAC3E,aAAa,SAAS;AAAA,EACzB,2BAA2B,UAAU,KAClC,YAAY,+BAA+B,EAC3C,aAAa,aAAa,cAAc;AAAA,EAC3C,gBAAgB,UAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,UAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,gBAAgB,UAAU,KACvB,YAAY,6DAA6D,EACzE,aAAa,aAAa,cAAc;AAAA,EAC3C,eAAe,UAAU,KACtB,YAAY,6DAA6D,EACzE,aAAa,aAAa,aAAa;AAAA,EAC1C,wBAAwB,UAAU,OAC/B,YAAY,2CAA2C,EACvD,aAAa,aAAa,sBAAsB;AAAA,EACnD,WAAW,UAAU,OAAO;AAAA,IAC1B;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { createRef } from "react";
4
- import { SideBarChat } from "../index.js";
5
4
  import { noop } from "lodash";
5
+ import { SideBarChat } from "../index.js";
6
6
  const ref = createRef();
7
7
  const MockSidebarItems = [
8
8
  {
@@ -14,9 +14,9 @@ const MockSidebarItems = [
14
14
  dsId: "2",
15
15
  label: "ED",
16
16
  title: "Example ED"
17
- },
18
- ,
17
+ }
19
18
  ];
19
+ const testRequiredProps = {};
20
20
  const testOptionalProps = {
21
21
  actionRef: ref,
22
22
  selectedItem: ""
@@ -27,10 +27,12 @@ const testPartialDefaults = {
27
27
  tooltipPlacement: "bottom"
28
28
  };
29
29
  const testProps = {
30
+ ...testRequiredProps,
30
31
  ...testOptionalProps,
31
32
  ...testPartialDefaults
32
33
  };
33
34
  const testPropsAsSyntax = {
35
+ ...testRequiredProps,
34
36
  ...testOptionalProps,
35
37
  ...testPartialDefaults
36
38
  };
@@ -46,10 +48,12 @@ const testCompleteDefaults = {
46
48
  enableTooltipWhenIsClosed: false
47
49
  };
48
50
  const testInternalProps = {
51
+ ...testRequiredProps,
49
52
  ...testOptionalProps,
50
53
  ...testCompleteDefaults
51
54
  };
52
55
  const testInternalPropsAsSyntax = {
56
+ ...testRequiredProps,
53
57
  ...testOptionalProps,
54
58
  ...testCompleteDefaults
55
59
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-chat-sidebar-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport type { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { SideBarChat } from '../index.js';\nimport type { DSChatSidebarT } from '../index.js';\nimport { noop } from 'lodash';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatSidebarT.Props;\ntype ComponentPropsInternals = DSChatSidebarT.InternalProps;\ntype ComponentPropsDefaultProps = DSChatSidebarT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChatSidebarT.OptionalProps;\n\nconst ref = createRef() as React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n}>;\n\nconst MockSidebarItems = [\n {\n dsId: '1',\n label: 'AB',\n title: 'Example AB',\n },\n {\n dsId: '2',\n label: 'ED',\n title: 'Example ED',\n },\n ,\n] as DSChatTileT.Props[];\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n actionRef: ref,\n selectedItem: '',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n sidebarItems: MockSidebarItems,\n expanded: true,\n tooltipPlacement: 'bottom',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <SideBarChat {...testExplicitDefinition} />\n <SideBarChat {...testInferedTypeCompatibility} />\n <SideBarChat {...testDefinitionAsConst} />\n {/* works with inline values */}\n <SideBarChat\n sidebarItems={MockSidebarItems}\n expanded\n onFooterClose={noop}\n onFooterExpand={noop}\n onHeaderExpand={noop}\n onHeaderClose={noop}\n footerButtonExtraProps={{ 'aria-label': 'expand or collapse button' }}\n tooltipPlacement=\"bottom\"\n enableTooltipWhenIsClosed={false}\n />\n </>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACoHrB,mBAEE,KAFF;AAnHF,SAAS,iBAAiB;AAE1B,SAAS,mBAAmB;AAE5B,SAAS,YAAY;AAQrB,MAAM,MAAM,UAAU;AAItB,MAAM,mBAAmB;AAAA,EACvB;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AACF;AAEA,MAAM,oBAAiD;AAAA,EACrD,WAAW;AAAA,EACX,cAAc;AAChB;AAIA,MAAM,sBAA2D;AAAA,EAC/D,cAAc;AAAA,EACd,UAAU;AAAA,EACV,kBAAkB;AACpB;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAGA,MAAM,+BAA+B;AAAA,EACnC,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,wBAAwB;AAAA,EAC5B,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,eAAa,GAAG,wBAAwB;AAAA,EACzC,oBAAC,eAAa,GAAG,8BAA8B;AAAA,EAC/C,oBAAC,eAAa,GAAG,uBAAuB;AAAA,EAExC;AAAA,IAAC;AAAA;AAAA,MACC,cAAc;AAAA,MACd,UAAQ;AAAA,MACR,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,MACpE,kBAAiB;AAAA,MACjB,2BAA2B;AAAA;AAAA,EAC7B;AAAA,GACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport type { DSChatTileT } from '@elliemae/ds-chat-tile';\nimport { noop } from 'lodash';\nimport { SideBarChat } from '../index.js';\nimport type { DSChatSidebarT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatSidebarT.Props;\ntype ComponentPropsInternals = DSChatSidebarT.InternalProps;\ntype ComponentPropsDefaultProps = DSChatSidebarT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChatSidebarT.OptionalProps;\ntype ComponentPropsRequiredProps = DSChatSidebarT.RequiredProps;\n\nconst ref = createRef() as React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n}>;\n\nconst MockSidebarItems = [\n {\n dsId: '1',\n label: 'AB',\n title: 'Example AB',\n },\n {\n dsId: '2',\n label: 'ED',\n title: 'Example ED',\n },\n] as DSChatTileT.Props[];\n\nconst testRequiredProps: ComponentPropsRequiredProps = {};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n actionRef: ref,\n selectedItem: '',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n sidebarItems: MockSidebarItems,\n expanded: true,\n tooltipPlacement: 'bottom',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n sidebarItems: MockSidebarItems,\n expanded: false,\n onFooterClose: noop,\n onFooterExpand: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'bottom',\n enableTooltipWhenIsClosed: false,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <SideBarChat {...testExplicitDefinition} />\n <SideBarChat {...testInferedTypeCompatibility} />\n <SideBarChat {...testDefinitionAsConst} />\n {/* works with inline values */}\n <SideBarChat\n sidebarItems={MockSidebarItems}\n expanded\n onFooterClose={noop}\n onFooterExpand={noop}\n onHeaderExpand={noop}\n onHeaderClose={noop}\n footerButtonExtraProps={{ 'aria-label': 'expand or collapse button' }}\n tooltipPlacement=\"bottom\"\n enableTooltipWhenIsClosed={false}\n />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC0HrB,mBAEE,KAFF;AAzHF,SAAS,iBAAiB;AAE1B,SAAS,YAAY;AACrB,SAAS,mBAAmB;AAU5B,MAAM,MAAM,UAAU;AAItB,MAAM,mBAAmB;AAAA,EACvB;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEA,MAAM,oBAAiD,CAAC;AAExD,MAAM,oBAAiD;AAAA,EACrD,WAAW;AAAA,EACX,cAAc;AAChB;AAIA,MAAM,sBAA2D;AAAA,EAC/D,cAAc;AAAA,EACd,UAAU;AAAA,EACV,kBAAkB;AACpB;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAGA,MAAM,+BAA+B;AAAA,EACnC,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,wBAAwB;AAAA,EAC5B,cAAc;AAAA,EACd,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,EACpE,kBAAkB;AAAA,EAClB,2BAA2B;AAC7B;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,eAAa,GAAG,wBAAwB;AAAA,EACzC,oBAAC,eAAa,GAAG,8BAA8B;AAAA,EAC/C,oBAAC,eAAa,GAAG,uBAAuB;AAAA,EAExC;AAAA,IAAC;AAAA;AAAA,MACC,cAAc;AAAA,MACd,UAAQ;AAAA,MACR,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,wBAAwB,EAAE,cAAc,4BAA4B;AAAA,MACpE,kBAAiB;AAAA,MACjB,2BAA2B;AAAA;AAAA,EAC7B;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,3 @@
1
+ export declare const DSChatSidebarDataTestIds: {
2
+ ROOT: string;
3
+ };
@@ -2,6 +2,8 @@
2
2
  import type { DSChatTileT } from '@elliemae/ds-chat-tile';
3
3
  export declare namespace DSChatSidebarT {
4
4
  type TooltipPlacementT = 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
5
+ interface RequiredProps {
6
+ }
5
7
  interface DefaultProps {
6
8
  sidebarItems: DSChatTileT.Props[];
7
9
  expanded: boolean;
@@ -21,9 +23,9 @@ export declare namespace DSChatSidebarT {
21
23
  };
22
24
  }>;
23
25
  }
24
- interface Props extends Partial<DefaultProps>, OptionalProps {
26
+ interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {
25
27
  }
26
- interface InternalProps extends DefaultProps, OptionalProps {
28
+ interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {
27
29
  }
28
30
  }
29
31
  export declare const defaultProps: DSChatSidebarT.DefaultProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { SidebarButtonProps } from './props.js';
3
2
  export declare const SidebarButton: {
4
3
  ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-chat-sidebar",
3
- "version": "3.37.2",
3
+ "version": "3.38.0-rc.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Chat Sidebar",
6
6
  "files": [
@@ -64,16 +64,16 @@
64
64
  "typeSafety": true
65
65
  },
66
66
  "dependencies": {
67
- "@elliemae/ds-chat-tile": "3.37.2",
68
- "@elliemae/ds-grid": "3.37.2",
69
- "@elliemae/ds-props-helpers": "3.37.2",
70
- "@elliemae/ds-icons": "3.37.2",
71
- "@elliemae/ds-system": "3.37.2"
67
+ "@elliemae/ds-grid": "3.38.0-rc.0",
68
+ "@elliemae/ds-icons": "3.38.0-rc.0",
69
+ "@elliemae/ds-system": "3.38.0-rc.0",
70
+ "@elliemae/ds-chat-tile": "3.38.0-rc.0",
71
+ "@elliemae/ds-props-helpers": "3.38.0-rc.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@elliemae/pui-cli": "9.0.0-next.50",
75
75
  "styled-components": "~5.3.9",
76
- "@elliemae/ds-monorepo-devops": "3.37.2"
76
+ "@elliemae/ds-monorepo-devops": "3.38.0-rc.0"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "lodash": "^4.17.21",