@elliemae/ds-chat-sidebar 3.16.0 → 3.16.1
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/DSChatSidebarDefinitions.js +4 -0
- package/dist/cjs/DSChatSidebarDefinitions.js.map +1 -1
- package/dist/cjs/SideBarChat.js +8 -4
- package/dist/cjs/SideBarChat.js.map +2 -2
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +4 -0
- package/dist/cjs/react-desc-prop-types.js +4 -0
- package/dist/cjs/react-desc-prop-types.js.map +1 -1
- package/dist/cjs/sidebar-button/SidebarButton.js +6 -2
- package/dist/cjs/sidebar-button/SidebarButton.js.map +2 -2
- package/dist/cjs/sidebar-button/index.js +4 -0
- package/dist/cjs/sidebar-button/index.js.map +1 -1
- package/dist/cjs/sidebar-button/props.js +4 -0
- package/dist/cjs/sidebar-button/props.js.map +1 -1
- package/dist/cjs/sidebar-button/styled.js +4 -0
- package/dist/cjs/sidebar-button/styled.js.map +1 -1
- package/dist/cjs/styled.js +4 -0
- package/dist/cjs/styled.js.map +1 -1
- package/dist/esm/SideBarChat.js +4 -4
- package/dist/esm/SideBarChat.js.map +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +4 -0
- package/dist/esm/sidebar-button/SidebarButton.js +2 -2
- package/dist/esm/sidebar-button/SidebarButton.js.map +2 -2
- package/dist/esm/sidebar-button/styled.js.map +1 -1
- package/dist/esm/styled.js.map +1 -1
- package/dist/types/SideBarChat.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/sidebar-button/SidebarButton.d.ts +7 -6
- package/package.json +8 -8
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSChatSidebarDefinitions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const DSChatSidebarName = 'DSChatSidebar';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,oBAAoB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/SideBarChat.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -34,10 +38,10 @@ var import_react = __toESM(require("react"));
|
|
|
34
38
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
39
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
36
40
|
var import_ds_chat_tile = require("@elliemae/ds-chat-tile");
|
|
37
|
-
var import_styled = require("./styled");
|
|
38
|
-
var import_SidebarButton = require("./sidebar-button/SidebarButton");
|
|
39
|
-
var import_react_desc_prop_types = require("./react-desc-prop-types");
|
|
40
|
-
var import_DSChatSidebarDefinitions = require("./DSChatSidebarDefinitions");
|
|
41
|
+
var import_styled = require("./styled.js");
|
|
42
|
+
var import_SidebarButton = require("./sidebar-button/SidebarButton.js");
|
|
43
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
44
|
+
var import_DSChatSidebarDefinitions = require("./DSChatSidebarDefinitions.js");
|
|
41
45
|
const FooterChat = ({
|
|
42
46
|
expanded,
|
|
43
47
|
onFooterClose,
|
|
@@ -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';\nimport { SidebarButton } from './sidebar-button/SidebarButton';\nimport type { DSChatSidebarT } from './react-desc-prop-types';\nimport { defaultProps, chatSidebarProps } from './react-desc-prop-types';\nimport { DSChatSidebarName } from './DSChatSidebarDefinitions';\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.Props>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps, DSChatSidebarName);\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<{ [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.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\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": "
|
|
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.Props>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps, DSChatSidebarName);\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<{ [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.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\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,sDAAmD,OAAO,yCAAY;AAC/F,8DAA+B,kBAAkB,+CAAkB,iDAAiB;AAEpF,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;AAAK,gBAAQ,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,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -29,5 +33,5 @@ __export(src_exports, {
|
|
|
29
33
|
});
|
|
30
34
|
module.exports = __toCommonJS(src_exports);
|
|
31
35
|
var React = __toESM(require("react"));
|
|
32
|
-
var import_SideBarChat = require("./SideBarChat");
|
|
36
|
+
var import_SideBarChat = require("./SideBarChat.js");
|
|
33
37
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { SideBarChat, SideBarChatWithSchema } from './SideBarChat';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export { SideBarChat, SideBarChatWithSchema } from './SideBarChat.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAmD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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 export interface DefaultProps {\n sidebarItems: DSChatTileT.Props[];\n expanded: boolean;\n selectedItem: undefined;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, string>;\n tooltipPlacement:\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 enableTooltipWhenIsClosed: boolean;\n }\n\n export interface OptionalProps {\n actionRef?: React.MutableRefObject<{\n listRef: { [key: string]: HTMLElement };\n }>;\n }\n\n export interface Props extends DefaultProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatSidebarT.DefaultProps = {\n expanded: false,\n selectedItem: undefined,\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\n .description('The id of the chat item you want to be opened')\n .defaultValue(defaultProps.selectedItem),\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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,oBAAqB;AAqCd,MAAM,eAA4C;AAAA,EACvD,UAAU;AAAA,EACV,cAAc;AAAA,EACd,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,OACrB,YAAY,+CAA+C,EAC3D,aAAa,aAAa,YAAY;AAAA,EACzC,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
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -30,8 +34,8 @@ module.exports = __toCommonJS(SidebarButton_exports);
|
|
|
30
34
|
var React = __toESM(require("react"));
|
|
31
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
36
|
var import_react = __toESM(require("react"));
|
|
33
|
-
var import_styled = require("./styled");
|
|
34
|
-
var import_props = require("./props");
|
|
37
|
+
var import_styled = require("./styled.js");
|
|
38
|
+
var import_props = require("./props.js");
|
|
35
39
|
const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
|
|
36
40
|
const handleClick = import_react.default.useCallback(() => {
|
|
37
41
|
if (dsId)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/sidebar-button/SidebarButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled';\nimport type { SidebarButtonProps } from './props';\nimport { propsSidebarButton, defaultSidebarButton } 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled.js';\nimport type { SidebarButtonProps } from './props.js';\nimport { propsSidebarButton, defaultSidebarButton } from './props.js';\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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWnB;AAXJ,mBAAkB;AAClB,oBAAuF;AAEvF,mBAAyD;AAElD,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,MAAM,GAAG,KAAK,MAAuC;AACzG,QAAM,cAAc,aAAAA,QAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,6CAAC,qCAA+B,eAAa,kBAAkB,QAAQ,SAAS,aAAc,GAAG,MAC/F;AAAA,gDAAC,yCAAwB,YAAW,UAAS,gBAAe,UAC1D,sDAAC,QAAK,MAAK,KAAI,GACjB;AAAA,IACC,SAAS,4CAAC,0CAA0B,iBAAM;AAAA,OAJnB,IAK1B;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
17
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
22
|
mod
|
|
19
23
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/sidebar-button/props.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash';\nimport { Comments } from '@elliemae/ds-icons';\n\nexport interface SidebarButtonProps {\n Icon: React.FC<{ size: string }>;\n dsId: string | number;\n label: string;\n onClick: (dsId: string | number) => void;\n title: string;\n}\n\nexport const defaultSidebarButton: SidebarButtonProps = {\n Icon: Comments,\n dsId: '',\n label: '',\n onClick: noop,\n title: '',\n};\n\nexport const propsSidebarButton = {\n Icon: PropTypes.element.description('Icon component').defaultValue(defaultSidebarButton.Icon),\n dsId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('Unique id for the button')\n .defaultValue(defaultSidebarButton.dsId),\n label: PropTypes.string.description('It will display under the icon').defaultValue(defaultSidebarButton.label),\n title: PropTypes.string.description('Tooltip').defaultValue(defaultSidebarButton.title),\n onClick: PropTypes.func\n .description('The function to call when the is clicked')\n .defaultValue(defaultSidebarButton.onClick),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,oBAAqB;AACrB,sBAAyB;AAUlB,MAAM,uBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AACT;AAEO,MAAM,qBAAqB;AAAA,EAChC,MAAM,kCAAU,QAAQ,YAAY,gBAAgB,EAAE,aAAa,qBAAqB,IAAI;AAAA,EAC5F,MAAM,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAC3D,YAAY,0BAA0B,EACtC,aAAa,qBAAqB,IAAI;AAAA,EACzC,OAAO,kCAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,qBAAqB,KAAK;AAAA,EAC7G,OAAO,kCAAU,OAAO,YAAY,SAAS,EAAE,aAAa,qBAAqB,KAAK;AAAA,EACtF,SAAS,kCAAU,KAChB,YAAY,0CAA0C,EACtD,aAAa,qBAAqB,OAAO;AAC9C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/sidebar-button/styled.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Buttons\nexport const StyledSidebarButton = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n outline: none;\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n position: relative;\n border: 0;\n background: transparent;\n &:focus,\n &:hover {\n background: ${(props) => props.theme.colors.neutral['080']};\n }\n cursor: pointer;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n }\n`;\n\nexport const StyledSidebarButtonIcon = styled(Grid)`\n position: relative;\n`;\n\nexport const StyledSidebarButtonLabel = styled.div`\n width: 30px;\n text-transform: uppercase;\n overflow: hidden;\n text-align: center;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,sBAAsB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA,YAK9B;AAAA,WACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMO,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA,6BAGhC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA,YAG5D,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAI9C,MAAM,8BAA0B,yBAAO,mBAAI;AAAA;AAAA;AAI3C,MAAM,2BAA2B,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Sidebar\nexport const StyledSideBarContainer = styled(Grid)`\n height: 100%;\n width: ${MIN_WIDTH_SIDEBAR}px;\n background: ${(props) => props.theme.colors.neutral['050']};\n border-right: 1px solid ${(props) => props.theme.colors.neutral['100']};\n overflow: hidden;\n`;\n\nexport const StyledSideBarButtonsContainer = styled(Grid)`\n overflow-y: auto;\n align-items: flex-start;\n justify-content: flex-start;\n grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);\n overflow-x: hidden;\n\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,6BAAyB,yBAAO,mBAAI;AAAA;AAAA,WAEtC;AAAA,gBACK,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,4BAC/B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAIhE,MAAM,oCAAgC,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA,0CAId;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/SideBarChat.js
CHANGED
|
@@ -4,10 +4,10 @@ import React2 from "react";
|
|
|
4
4
|
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
|
|
5
5
|
import { MenuCollapse, MenuExpand } from "@elliemae/ds-icons";
|
|
6
6
|
import { TileButton } from "@elliemae/ds-chat-tile";
|
|
7
|
-
import { StyledSideBarContainer, StyledSideBarButtonsContainer } from "./styled";
|
|
8
|
-
import { SidebarButton } from "./sidebar-button/SidebarButton";
|
|
9
|
-
import { defaultProps, chatSidebarProps } from "./react-desc-prop-types";
|
|
10
|
-
import { DSChatSidebarName } from "./DSChatSidebarDefinitions";
|
|
7
|
+
import { StyledSideBarContainer, StyledSideBarButtonsContainer } from "./styled.js";
|
|
8
|
+
import { SidebarButton } from "./sidebar-button/SidebarButton.js";
|
|
9
|
+
import { defaultProps, chatSidebarProps } from "./react-desc-prop-types.js";
|
|
10
|
+
import { DSChatSidebarName } from "./DSChatSidebarDefinitions.js";
|
|
11
11
|
const FooterChat = ({
|
|
12
12
|
expanded,
|
|
13
13
|
onFooterClose,
|
|
@@ -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';\nimport { SidebarButton } from './sidebar-button/SidebarButton';\nimport type { DSChatSidebarT } from './react-desc-prop-types';\nimport { defaultProps, chatSidebarProps } from './react-desc-prop-types';\nimport { DSChatSidebarName } from './DSChatSidebarDefinitions';\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.Props>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps, DSChatSidebarName);\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<{ [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.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\nSideBarChat.displayName = DSChatSidebarName;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACiBrB,cAsCE,YAtCF;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;AAAA;
|
|
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.Props>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps, DSChatSidebarName);\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<{ [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.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\nSideBarChat.displayName = DSChatSidebarName;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiBrB,cAsCE,YAtCF;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,6BAAmD,OAAO,YAAY;AAC/F,iCAA+B,kBAAkB,kBAAkB,iBAAiB;AAEpF,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;AAAK,gBAAQ,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,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { SideBarChat, SideBarChatWithSchema } from './SideBarChat';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { SideBarChat, SideBarChatWithSchema } from './SideBarChat.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,aAAa,6BAA6B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React2 from "react";
|
|
4
|
-
import { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from "./styled";
|
|
5
|
-
import { propsSidebarButton, defaultSidebarButton } from "./props";
|
|
4
|
+
import { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from "./styled.js";
|
|
5
|
+
import { propsSidebarButton, defaultSidebarButton } from "./props.js";
|
|
6
6
|
const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
|
|
7
7
|
const handleClick = React2.useCallback(() => {
|
|
8
8
|
if (dsId)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/sidebar-button/SidebarButton.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled';\nimport type { SidebarButtonProps } from './props';\nimport { propsSidebarButton, defaultSidebarButton } 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;ACWnB,SAEI,KAFJ;AAXJ,OAAOA,YAAW;AAClB,SAAS,qBAAqB,0BAA0B,+BAA+B;AAEvF,SAAS,oBAAoB,4BAA4B;AAElD,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled.js';\nimport type { SidebarButtonProps } from './props.js';\nimport { propsSidebarButton, defaultSidebarButton } from './props.js';\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;ACWnB,SAEI,KAFJ;AAXJ,OAAOA,YAAW;AAClB,SAAS,qBAAqB,0BAA0B,+BAA+B;AAEvF,SAAS,oBAAoB,4BAA4B;AAElD,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,MAAM,GAAG,KAAK,MAAuC;AACzG,QAAM,cAAcA,OAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,qBAAC,uBAA+B,eAAa,kBAAkB,QAAQ,SAAS,aAAc,GAAG,MAC/F;AAAA,wBAAC,2BAAwB,YAAW,UAAS,gBAAe,UAC1D,8BAAC,QAAK,MAAK,KAAI,GACjB;AAAA,IACC,SAAS,oBAAC,4BAA0B,iBAAM;AAAA,OAJnB,IAK1B;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/sidebar-button/styled.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Buttons\nexport const StyledSidebarButton = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n outline: none;\n height: ${BUTTON_SIDEBAR_HEIGHT}px;\n width: ${MIN_WIDTH_SIDEBAR}px;\n position: relative;\n border: 0;\n background: transparent;\n &:focus,\n &:hover {\n background: ${(props) => props.theme.colors.neutral['080']};\n }\n cursor: pointer;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n }\n`;\n\nexport const StyledSidebarButtonIcon = styled(Grid)`\n position: relative;\n`;\n\nexport const StyledSidebarButtonLabel = styled.div`\n width: 30px;\n text-transform: uppercase;\n overflow: hidden;\n text-align: center;\n`;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,sBAAsB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,YAK9B;AAAA,WACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMO,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,sBAAsB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,YAK9B;AAAA,WACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMO,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA,6BAGhC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA,YAG5D,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAI9C,MAAM,0BAA0B,OAAO,IAAI;AAAA;AAAA;AAI3C,MAAM,2BAA2B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styled.ts"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nconst MIN_WIDTH_SIDEBAR = 48;\nconst BUTTON_SIDEBAR_HEIGHT = 48;\n// Sidebar\nexport const StyledSideBarContainer = styled(Grid)`\n height: 100%;\n width: ${MIN_WIDTH_SIDEBAR}px;\n background: ${(props) => props.theme.colors.neutral['050']};\n border-right: 1px solid ${(props) => props.theme.colors.neutral['100']};\n overflow: hidden;\n`;\n\nexport const StyledSideBarButtonsContainer = styled(Grid)`\n overflow-y: auto;\n align-items: flex-start;\n justify-content: flex-start;\n grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);\n overflow-x: hidden;\n\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n }\n`;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,yBAAyB,OAAO,IAAI;AAAA;AAAA,WAEtC;AAAA,gBACK,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,MAAM,oBAAoB;AAC1B,MAAM,wBAAwB;AAEvB,MAAM,yBAAyB,OAAO,IAAI;AAAA;AAAA,WAEtC;AAAA,gBACK,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,4BAC/B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAIhE,MAAM,gCAAgC,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA,0CAId;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { DSChatSidebarT } from './react-desc-prop-types';
|
|
2
|
+
import type { DSChatSidebarT } from './react-desc-prop-types.js';
|
|
3
3
|
declare const SideBarChat: React.ComponentType<DSChatSidebarT.Props>;
|
|
4
|
-
declare const SideBarChatWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<DSChatSidebarT.Props>;
|
|
4
|
+
declare const SideBarChatWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSChatSidebarT.Props>;
|
|
5
5
|
export { SideBarChat, SideBarChatWithSchema };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SideBarChat, SideBarChatWithSchema } from './SideBarChat';
|
|
1
|
+
export { SideBarChat, SideBarChatWithSchema } from './SideBarChat.js';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { SidebarButtonProps } from './props.js';
|
|
2
3
|
export declare const SidebarButton: {
|
|
3
4
|
({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element;
|
|
4
5
|
propTypes: {
|
|
5
|
-
Icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
6
|
-
dsId: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
7
|
-
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
8
|
-
title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
9
|
-
onClick: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
6
|
+
Icon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
7
|
+
dsId: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
8
|
+
label: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
9
|
+
title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
10
|
+
onClick: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
10
11
|
};
|
|
11
12
|
defaultProps: SidebarButtonProps;
|
|
12
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat-sidebar",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat Sidebar",
|
|
6
6
|
"files": [
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
"typeSafety": true
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@elliemae/ds-
|
|
67
|
-
"@elliemae/ds-
|
|
68
|
-
"@elliemae/ds-icons": "3.16.
|
|
69
|
-
"@elliemae/ds-props-helpers": "3.16.
|
|
70
|
-
"@elliemae/ds-
|
|
71
|
-
"@elliemae/ds-
|
|
66
|
+
"@elliemae/ds-grid": "3.16.1",
|
|
67
|
+
"@elliemae/ds-chat-tile": "3.16.1",
|
|
68
|
+
"@elliemae/ds-icons": "3.16.1",
|
|
69
|
+
"@elliemae/ds-props-helpers": "3.16.1",
|
|
70
|
+
"@elliemae/ds-system": "3.16.1",
|
|
71
|
+
"@elliemae/ds-utilities": "3.16.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"styled-components": "~5.3.
|
|
74
|
+
"styled-components": "~5.3.9"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"lodash": "^4.17.21",
|