@elliemae/ds-chat-sidebar 3.11.0-next.5 → 3.11.0-next.7
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.
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SideBarChat.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\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 { DSChatSidebarT, defaultProps, chatSidebarProps } from './react-desc-prop-types';\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);\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 = 'SideBarChat';\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;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcrB;AAdF,mBAAyC;AACzC,0BAAuF;AACvF,sBAAyC;AACzC,0BAA2B;AAC3B,oBAAsE;AACtE,2BAA8B;AAC9B,mCAA+D;AAE/D,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,4CAAC;AAAA,EACC,MAAK;AAAA,EACL,MAAM,CAAC,WAAW,+BAAe;AAAA,EACjC,SAAS,WAAW,gBAAgB;AAAA,EACpC,gBAAc;AAAA,EACd,cAAY,uBAAuB;AAAA,CACrC;AAGF,MAA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ts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled';\nimport { propsSidebarButton, defaultSidebarButton, SidebarButtonProps } from './props';\n\nexport const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element => {\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.propTypes = propsSidebarButton;\nSidebarButton.defaultProps = defaultSidebarButton;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADUnB;AAVJ,mBAAkB;AAClB,oBAAuF;AACvF,mBAA6E;AAEtE,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,SAAS,KAAK,MAAuC;AACzG,QAAM,cAAc,aAAAA,QAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,6CAAC;AAAA,IAA+B,eAAa,kBAAkB;AAAA,IAAQ,SAAS;AAAA,IAAc,GAAG;AAAA,IAC/F;AAAA,kDAAC;AAAA,QAAwB,YAAW;AAAA,QAAS,gBAAe;AAAA,QAC1D,sDAAC;AAAA,UAAK,MAAK;AAAA,SAAI;AAAA,OACjB;AAAA,MACC,SAAS,4CAAC;AAAA,QAA0B;AAAA,OAAM;AAAA;AAAA,KAJnB,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/SideBarChat.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { TileButton } from '@elliemae/ds-chat-tile';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { SidebarButton } from './sidebar-button/SidebarButton';\nimport { DSChatSidebarT, defaultProps, chatSidebarProps } from './react-desc-prop-types';\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);\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 = 'SideBarChat';\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACcrB,cAsCE,YAtCF;AAdF,OAAOA,YAAkC;AACzC,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,cAAc,kBAAkB;AACzC,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB,qCAAqC;AACtE,SAAS,qBAAqB;AAC9B,SAAyB,cAAc,wBAAwB;AAE/D,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACE,oBAAC;AAAA,EACC,MAAK;AAAA,EACL,MAAM,CAAC,WAAW,eAAe;AAAA,EACjC,SAAS,WAAW,gBAAgB;AAAA,EACpC,gBAAc;AAAA,EACd,cAAY,uBAAuB;AAAA,CACrC;AAGF,MAAM,cAAyD,CAAC,UAAU;AACxE,QAAM,mBAAmB,6BAAmD,OAAO,YAAY;AAC/F,iCAA+B,kBAAkB,gBAAgB;AAEjE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,SAAS,QAAQ,IAAIA,OAAM,OAAuC,CAAC,CAAC;AAC5E,QAAM,oBAAoBA,OAAM;AAAA,IAC9B,CAAC,QAAqB;AACpB,UAAI,KAAK,SAAS;AAAK,gBAAQ,IAAI,QAAQ,OAAO;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;AAAA,IAAuB,MAAM,CAAC,OAAO,MAAM;AAAA,IAC1C;AAAA,0BAAC;AAAA,QACE,uBAAa,IAAI,CAAC,MACjB,oBAAC;AAAA,UAEC,UAAU;AAAA,UACT,GAAG;AAAA,UACJ,UAAU,iBAAiB,EAAE;AAAA,UAC7B;AAAA,UACA,gBAAgB,4BAA4B,QAAQ,CAAC;AAAA,WALhD,EAAE,IAMT,CACD;AAAA,OACH;AAAA,MACA,oBAAC;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/sidebar-button/SidebarButton.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled';\nimport { propsSidebarButton, defaultSidebarButton, SidebarButtonProps } from './props';\n\nexport const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element => {\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.propTypes = propsSidebarButton;\nSidebarButton.defaultProps = defaultSidebarButton;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACUnB,SAEI,KAFJ;AAVJ,OAAOA,YAAW;AAClB,SAAS,qBAAqB,0BAA0B,+BAA+B;AACvF,SAAS,oBAAoB,4BAAgD;AAEtE,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,SAAS,KAAK,MAAuC;AACzG,QAAM,cAAcA,OAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,qBAAC;AAAA,IAA+B,eAAa,kBAAkB;AAAA,IAAQ,SAAS;AAAA,IAAc,GAAG;AAAA,IAC/F;AAAA,0BAAC;AAAA,QAAwB,YAAW;AAAA,QAAS,gBAAe;AAAA,QAC1D,8BAAC;AAAA,UAAK,MAAK;AAAA,SAAI;AAAA,OACjB;AAAA,MACC,SAAS,oBAAC;AAAA,QAA0B;AAAA,OAAM;AAAA;AAAA,KAJnB,IAK1B;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat-sidebar",
|
|
3
|
-
"version": "3.11.0-next.
|
|
3
|
+
"version": "3.11.0-next.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat Sidebar",
|
|
6
6
|
"files": [
|
|
@@ -63,18 +63,13 @@
|
|
|
63
63
|
"typeSafety": true
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@elliemae/ds-chat-tile": "3.11.0-next.
|
|
67
|
-
"@elliemae/ds-grid": "3.11.0-next.
|
|
68
|
-
"@elliemae/ds-icons": "3.11.0-next.
|
|
69
|
-
"@elliemae/ds-system": "3.11.0-next.
|
|
70
|
-
"@elliemae/ds-
|
|
71
|
-
"@elliemae/ds-utilities": "3.11.0-next.5"
|
|
66
|
+
"@elliemae/ds-chat-tile": "3.11.0-next.7",
|
|
67
|
+
"@elliemae/ds-grid": "3.11.0-next.7",
|
|
68
|
+
"@elliemae/ds-icons": "3.11.0-next.7",
|
|
69
|
+
"@elliemae/ds-system": "3.11.0-next.7",
|
|
70
|
+
"@elliemae/ds-utilities": "3.11.0-next.7"
|
|
72
71
|
},
|
|
73
72
|
"devDependencies": {
|
|
74
|
-
"@testing-library/dom": "~8.13.0",
|
|
75
|
-
"@testing-library/jest-dom": "~5.16.4",
|
|
76
|
-
"@testing-library/react": "~12.1.3",
|
|
77
|
-
"@testing-library/user-event": "~13.5.0",
|
|
78
73
|
"styled-components": "~5.3.5"
|
|
79
74
|
},
|
|
80
75
|
"peerDependencies": {
|
|
@@ -86,9 +81,12 @@
|
|
|
86
81
|
"scripts": {
|
|
87
82
|
"test": "node ../../scripts/testing/test.mjs",
|
|
88
83
|
"lint": "node ../../scripts/lint.mjs",
|
|
84
|
+
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
|
|
89
85
|
"dts": "node ../../scripts/dts.mjs",
|
|
90
86
|
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
91
87
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
88
|
+
"dev:build": "pnpm --filter {.}... build && pnpm --filter {.}... dts",
|
|
89
|
+
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
92
90
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
93
91
|
}
|
|
94
92
|
}
|