@chayns-components/person-finder 5.0.25 → 5.0.27

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.
@@ -7,7 +7,6 @@ exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _PersonFinderBody = require("./PersonFinderBody.styles");
9
9
  var _PersonFinderProvider = require("../../../PersonFinderProvider");
10
- var _chaynsApi = require("chayns-api");
11
10
  var _personFinder = require("../../../../utils/personFinder");
12
11
  var _personFinder2 = require("../../../../hooks/personFinder");
13
12
  var _PersonFinderGroup = _interopRequireDefault(require("./person-finder-group/PersonFinderGroup"));
@@ -24,9 +23,6 @@ const PersonFinderBody = /*#__PURE__*/(0, _react.forwardRef)(({
24
23
  activeFilter,
25
24
  data
26
25
  } = (0, _PersonFinderProvider.usePersonFinder)();
27
- const {
28
- browser
29
- } = (0, _chaynsApi.useDevice)();
30
26
  const [isScrollTop, setIsScrollTop] = (0, _react.useState)(true);
31
27
  const contentRef = (0, _react.useRef)(null);
32
28
  const currentGroupName = (0, _personFinder2.useClosestElementAbove)(contentRef, 'person-finder-group-name');
@@ -63,7 +59,7 @@ const PersonFinderBody = /*#__PURE__*/(0, _react.forwardRef)(({
63
59
  shouldShowShadow: !isScrollTop && !shouldRenderInline
64
60
  }), /*#__PURE__*/_react.default.createElement(_PersonFinderBody.StyledPersonFinderBodyContent, {
65
61
  ref: contentRef,
66
- $browser: browser === null || browser === void 0 ? void 0 : browser.name,
62
+ className: "chayns-scrollbar",
67
63
  onScroll: handleContentScroll
68
64
  }, content));
69
65
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PersonFinderBody.js","names":["_react","_interopRequireWildcard","require","_PersonFinderBody","_PersonFinderProvider","_chaynsApi","_personFinder","_personFinder2","_PersonFinderGroup","_interopRequireDefault","_PersonFinderHeader","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PersonFinderBody","forwardRef","onAdd","filterTypes","onRemove","shouldRenderInline","ref","activeFilter","data","usePersonFinder","browser","useDevice","isScrollTop","setIsScrollTop","useState","contentRef","useRef","currentGroupName","useClosestElementAbove","shouldShowGroupNames","length","defaultGroupName","getGroupName","keys","handleContentScroll","event","target","scrollTop","content","useMemo","entries","map","key","singleData","index","count","searchString","createElement","filterKey","search","shouldShowGroupName","StyledPersonFinderBody","$shouldRenderInline","shouldShowShadow","StyledPersonFinderBodyContent","$browser","name","onScroll","displayName","_default","exports"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.tsx"],"sourcesContent":["import React, { forwardRef, UIEvent, useMemo, useRef, useState } from 'react';\nimport { StyledPersonFinderBody, StyledPersonFinderBodyContent } from './PersonFinderBody.styles';\nimport { PersonFinderFilterTypes } from '../../../../types/personFinder';\nimport { BrowserName } from '@chayns-components/core';\nimport { usePersonFinder } from '../../../PersonFinderProvider';\nimport { useDevice } from 'chayns-api';\nimport { getGroupName } from '../../../../utils/personFinder';\nimport { useClosestElementAbove } from '../../../../hooks/personFinder';\nimport PersonFinderGroup from './person-finder-group/PersonFinderGroup';\nimport PersonFinderHeader from './person-finder-header/PersonFinderHeader';\n\nexport type PersonFinderBodyProps = {\n onAdd: (id: string) => void;\n onRemove: (id: string) => void;\n filterTypes?: PersonFinderFilterTypes[];\n shouldRenderInline?: boolean;\n};\n\nconst PersonFinderBody = forwardRef<HTMLDivElement, PersonFinderBodyProps>(\n ({ onAdd, filterTypes, onRemove, shouldRenderInline }, ref) => {\n const { activeFilter, data } = usePersonFinder();\n\n const { browser } = useDevice();\n\n const [isScrollTop, setIsScrollTop] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n const currentGroupName = useClosestElementAbove(contentRef, 'person-finder-group-name');\n\n const shouldShowGroupNames = (activeFilter?.length ?? 0) !== 1;\n\n const defaultGroupName = getGroupName(Object.keys(data ?? {})[0] ?? '');\n\n const handleContentScroll = (event: UIEvent<HTMLDivElement>) => {\n setIsScrollTop((event.target as HTMLElement).scrollTop === 0);\n };\n\n const content = useMemo(\n () =>\n Object.entries(data ?? {}).map(([key, singleData], index) => {\n const { count, entries, searchString } = singleData;\n\n return (\n <PersonFinderGroup\n key={`person-finder-group--${key}`}\n filterKey={key as PersonFinderFilterTypes}\n onAdd={onAdd}\n onRemove={onRemove}\n entries={entries}\n count={count}\n search={searchString}\n shouldShowGroupName={shouldShowGroupNames && index !== 0}\n />\n );\n }),\n [data, onAdd, onRemove, shouldShowGroupNames],\n );\n\n return (\n <StyledPersonFinderBody ref={ref} $shouldRenderInline={shouldRenderInline}>\n <PersonFinderHeader\n currentGroupName={currentGroupName}\n defaultGroupName={defaultGroupName}\n filterTypes={filterTypes}\n shouldShowGroupNames={shouldShowGroupNames}\n shouldShowShadow={!isScrollTop && !shouldRenderInline}\n />\n <StyledPersonFinderBodyContent\n ref={contentRef}\n $browser={browser?.name as BrowserName}\n onScroll={handleContentScroll}\n >\n {content}\n </StyledPersonFinderBodyContent>\n </StyledPersonFinderBody>\n );\n },\n);\n\nPersonFinderBody.displayName = 'PersonFinderBody';\n\nexport default PersonFinderBody;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAGA,IAAAE,qBAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAD,sBAAA,CAAAP,OAAA;AAA2E,SAAAO,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAA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,oBACIjD,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAAChE,iBAAA,CAAAoE,sBAAsB;IAACnC,GAAG,EAAEA,GAAI;IAACoC,mBAAmB,EAAErC;EAAmB,gBACtEnC,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAACzD,mBAAA,CAAAG,OAAkB;IACfkC,gBAAgB,EAAEA,gBAAiB;IACnCI,gBAAgB,EAAEA,gBAAiB;IACnClB,WAAW,EAAEA,WAAY;IACzBgB,oBAAoB,EAAEA,oBAAqB;IAC3CwB,gBAAgB,EAAE,CAAC/B,WAAW,IAAI,CAACP;EAAmB,CACzD,CAAC,eACFnC,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAAChE,iBAAA,CAAAuE,6BAA6B;IAC1BtC,GAAG,EAAES,UAAW;IAChB8B,QAAQ,EAAEnC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEoC,IAAoB;IACvCC,QAAQ,EAAEvB;EAAoB,GAE7BI,OAC0B,CACX,CAAC;AAEjC,CACJ,CAAC;AAED5B,gBAAgB,CAACgD,WAAW,GAAG,kBAAkB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAnE,OAAA,GAEnCiB,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"PersonFinderBody.js","names":["_react","_interopRequireWildcard","require","_PersonFinderBody","_PersonFinderProvider","_personFinder","_personFinder2","_PersonFinderGroup","_interopRequireDefault","_PersonFinderHeader","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PersonFinderBody","forwardRef","onAdd","filterTypes","onRemove","shouldRenderInline","ref","activeFilter","data","usePersonFinder","isScrollTop","setIsScrollTop","useState","contentRef","useRef","currentGroupName","useClosestElementAbove","shouldShowGroupNames","length","defaultGroupName","getGroupName","keys","handleContentScroll","event","target","scrollTop","content","useMemo","entries","map","key","singleData","index","count","searchString","createElement","filterKey","search","shouldShowGroupName","StyledPersonFinderBody","$shouldRenderInline","shouldShowShadow","StyledPersonFinderBodyContent","className","onScroll","displayName","_default","exports"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.tsx"],"sourcesContent":["import React, { forwardRef, UIEvent, useMemo, useRef, useState } from 'react';\nimport { StyledPersonFinderBody, StyledPersonFinderBodyContent } from './PersonFinderBody.styles';\nimport { PersonFinderFilterTypes } from '../../../../types/personFinder';\nimport { usePersonFinder } from '../../../PersonFinderProvider';\nimport { getGroupName } from '../../../../utils/personFinder';\nimport { useClosestElementAbove } from '../../../../hooks/personFinder';\nimport PersonFinderGroup from './person-finder-group/PersonFinderGroup';\nimport PersonFinderHeader from './person-finder-header/PersonFinderHeader';\n\nexport type PersonFinderBodyProps = {\n onAdd: (id: string) => void;\n onRemove: (id: string) => void;\n filterTypes?: PersonFinderFilterTypes[];\n shouldRenderInline?: boolean;\n};\n\nconst PersonFinderBody = forwardRef<HTMLDivElement, PersonFinderBodyProps>(\n ({ onAdd, filterTypes, onRemove, shouldRenderInline }, ref) => {\n const { activeFilter, data } = usePersonFinder();\n\n const [isScrollTop, setIsScrollTop] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n const currentGroupName = useClosestElementAbove(contentRef, 'person-finder-group-name');\n\n const shouldShowGroupNames = (activeFilter?.length ?? 0) !== 1;\n\n const defaultGroupName = getGroupName(Object.keys(data ?? {})[0] ?? '');\n\n const handleContentScroll = (event: UIEvent<HTMLDivElement>) => {\n setIsScrollTop((event.target as HTMLElement).scrollTop === 0);\n };\n\n const content = useMemo(\n () =>\n Object.entries(data ?? {}).map(([key, singleData], index) => {\n const { count, entries, searchString } = singleData;\n\n return (\n <PersonFinderGroup\n key={`person-finder-group--${key}`}\n filterKey={key as PersonFinderFilterTypes}\n onAdd={onAdd}\n onRemove={onRemove}\n entries={entries}\n count={count}\n search={searchString}\n shouldShowGroupName={shouldShowGroupNames && index !== 0}\n />\n );\n }),\n [data, onAdd, onRemove, shouldShowGroupNames],\n );\n\n return (\n <StyledPersonFinderBody ref={ref} $shouldRenderInline={shouldRenderInline}>\n <PersonFinderHeader\n currentGroupName={currentGroupName}\n defaultGroupName={defaultGroupName}\n filterTypes={filterTypes}\n shouldShowGroupNames={shouldShowGroupNames}\n shouldShowShadow={!isScrollTop && !shouldRenderInline}\n />\n <StyledPersonFinderBodyContent\n ref={contentRef}\n className=\"chayns-scrollbar\"\n onScroll={handleContentScroll}\n >\n {content}\n </StyledPersonFinderBodyContent>\n </StyledPersonFinderBody>\n );\n },\n);\n\nPersonFinderBody.displayName = 'PersonFinderBody';\n\nexport default PersonFinderBody;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,qBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAD,sBAAA,CAAAN,OAAA;AAA2E,SAAAM,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAS,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAA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CAAC7D,iBAAA,CAAAoE,6BAA6B;IAC1BpC,GAAG,EAAEO,UAAW;IAChB8B,SAAS,EAAC,kBAAkB;IAC5BC,QAAQ,EAAEtB;EAAoB,GAE7BI,OAC0B,CACX,CAAC;AAEjC,CACJ,CAAC;AAED1B,gBAAgB,CAAC6C,WAAW,GAAG,kBAAkB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhE,OAAA,GAEnCiB,gBAAgB","ignoreList":[]}
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.StyledPersonFinderBodyContent = exports.StyledPersonFinderBody = void 0;
7
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  const StyledPersonFinderBody = exports.StyledPersonFinderBody = _styledComponents.default.div`
10
10
  display: flex;
11
11
  flex-direction: column;
@@ -17,40 +17,5 @@ const StyledPersonFinderBodyContent = exports.StyledPersonFinderBodyContent = _s
17
17
  height: 100%;
18
18
  overflow-y: auto;
19
19
  padding-bottom: 10px;
20
-
21
- // Styles for custom scrollbar
22
- ${({
23
- $browser,
24
- theme
25
- }) => $browser === 'firefox' ? (0, _styledComponents.css)`
26
- scrollbar-color: rgba(${theme['text-rgb']}, 0.15) transparent;
27
- scrollbar-width: thin;
28
- ` : (0, _styledComponents.css)`
29
- &::-webkit-scrollbar {
30
- width: 10px;
31
- height: 10px;
32
- }
33
-
34
- &::-webkit-scrollbar-track {
35
- background-color: transparent;
36
- }
37
-
38
- &::-webkit-scrollbar-button {
39
- background-color: transparent;
40
- height: 5px;
41
- width: 5px;
42
- }
43
-
44
- &::-webkit-scrollbar-thumb {
45
- background-color: rgba(${theme['text-rgb']}, 0.15);
46
- border-radius: 20px;
47
- background-clip: padding-box;
48
- border: solid 3px transparent;
49
- }
50
-
51
- &::-webkit-scrollbar-corner {
52
- background-color: transparent;
53
- }
54
- `}
55
20
  `;
56
21
  //# sourceMappingURL=PersonFinderBody.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PersonFinderBody.styles.js","names":["_styledComponents","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledPersonFinderBody","exports","styled","div","$shouldRenderInline","StyledPersonFinderBodyContent","$browser","theme","css"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { BrowserName, WithTheme } from '@chayns-components/core';\n\nexport const StyledPersonFinderBody = styled.div<{ $shouldRenderInline?: boolean }>`\n display: flex;\n flex-direction: column;\n height: ${({ $shouldRenderInline }) => ($shouldRenderInline ? 'auto' : '300px')};\n`;\n\ntype StyledPersonFinderBodyContentProps = WithTheme<{ $browser: BrowserName }>;\n\nexport const StyledPersonFinderBodyContent = styled.div<StyledPersonFinderBodyContentProps>`\n height: 100%;\n overflow-y: auto;\n padding-bottom: 10px;\n\n // Styles for custom scrollbar\n ${({ $browser, theme }: StyledPersonFinderBodyContentProps) =>\n $browser === 'firefox'\n ? css`\n scrollbar-color: rgba(${theme['text-rgb']}, 0.15) transparent;\n scrollbar-width: thin;\n `\n : css`\n &::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n }\n\n &::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n &::-webkit-scrollbar-button {\n background-color: transparent;\n height: 5px;\n width: 5px;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(${theme['text-rgb']}, 0.15);\n border-radius: 20px;\n background-clip: padding-box;\n border: solid 3px transparent;\n }\n\n &::-webkit-scrollbar-corner {\n background-color: transparent;\n }\n `}\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAGzC,MAAMkB,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAGE,yBAAM,CAACC,GAAsC;AACnF;AACA;AACA,cAAc,CAAC;EAAEC;AAAoB,CAAC,KAAMA,mBAAmB,GAAG,MAAM,GAAG,OAAQ;AACnF,CAAC;AAIM,MAAMC,6BAA6B,GAAAJ,OAAA,CAAAI,6BAAA,GAAGH,yBAAM,CAACC,GAAuC;AAC3F;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC;EAAEG,QAAQ;EAAEC;AAA0C,CAAC,KACtDD,QAAQ,KAAK,SAAS,GAChB,IAAAE,qBAAG;AACjB,0CAA0CD,KAAK,CAAC,UAAU,CAAC;AAC3D;AACA,eAAe,GACD,IAAAC,qBAAG;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+CD,KAAK,CAAC,UAAU,CAAC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"PersonFinderBody.styles.js","names":["_styledComponents","_interopRequireDefault","require","e","__esModule","default","StyledPersonFinderBody","exports","styled","div","$shouldRenderInline","StyledPersonFinderBodyContent"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { WithTheme } from '@chayns-components/core';\n\nexport const StyledPersonFinderBody = styled.div<{ $shouldRenderInline?: boolean }>`\n display: flex;\n flex-direction: column;\n height: ${({ $shouldRenderInline }) => ($shouldRenderInline ? 'auto' : '300px')};\n`;\n\ntype StyledPersonFinderBodyContentProps = WithTheme<unknown>;\n\nexport const StyledPersonFinderBodyContent = styled.div<StyledPersonFinderBodyContentProps>`\n height: 100%;\n overflow-y: auto;\n padding-bottom: 10px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGhC,MAAMG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAGE,yBAAM,CAACC,GAAsC;AACnF;AACA;AACA,cAAc,CAAC;EAAEC;AAAoB,CAAC,KAAMA,mBAAmB,GAAG,MAAM,GAAG,OAAQ;AACnF,CAAC;AAIM,MAAMC,6BAA6B,GAAAJ,OAAA,CAAAI,6BAAA,GAAGH,yBAAM,CAACC,GAAuC;AAC3F;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -1,7 +1,6 @@
1
1
  import React, { forwardRef, useMemo, useRef, useState } from 'react';
2
2
  import { StyledPersonFinderBody, StyledPersonFinderBodyContent } from './PersonFinderBody.styles';
3
3
  import { usePersonFinder } from '../../../PersonFinderProvider';
4
- import { useDevice } from 'chayns-api';
5
4
  import { getGroupName } from '../../../../utils/personFinder';
6
5
  import { useClosestElementAbove } from '../../../../hooks/personFinder';
7
6
  import PersonFinderGroup from './person-finder-group/PersonFinderGroup';
@@ -16,9 +15,6 @@ const PersonFinderBody = /*#__PURE__*/forwardRef(({
16
15
  activeFilter,
17
16
  data
18
17
  } = usePersonFinder();
19
- const {
20
- browser
21
- } = useDevice();
22
18
  const [isScrollTop, setIsScrollTop] = useState(true);
23
19
  const contentRef = useRef(null);
24
20
  const currentGroupName = useClosestElementAbove(contentRef, 'person-finder-group-name');
@@ -55,7 +51,7 @@ const PersonFinderBody = /*#__PURE__*/forwardRef(({
55
51
  shouldShowShadow: !isScrollTop && !shouldRenderInline
56
52
  }), /*#__PURE__*/React.createElement(StyledPersonFinderBodyContent, {
57
53
  ref: contentRef,
58
- $browser: browser?.name,
54
+ className: "chayns-scrollbar",
59
55
  onScroll: handleContentScroll
60
56
  }, content));
61
57
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PersonFinderBody.js","names":["React","forwardRef","useMemo","useRef","useState","StyledPersonFinderBody","StyledPersonFinderBodyContent","usePersonFinder","useDevice","getGroupName","useClosestElementAbove","PersonFinderGroup","PersonFinderHeader","PersonFinderBody","onAdd","filterTypes","onRemove","shouldRenderInline","ref","activeFilter","data","browser","isScrollTop","setIsScrollTop","contentRef","currentGroupName","shouldShowGroupNames","length","defaultGroupName","Object","keys","handleContentScroll","event","target","scrollTop","content","entries","map","key","singleData","index","count","searchString","createElement","filterKey","search","shouldShowGroupName","$shouldRenderInline","shouldShowShadow","$browser","name","onScroll","displayName"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.tsx"],"sourcesContent":["import React, { forwardRef, UIEvent, useMemo, useRef, useState } from 'react';\nimport { StyledPersonFinderBody, StyledPersonFinderBodyContent } from './PersonFinderBody.styles';\nimport { PersonFinderFilterTypes } from '../../../../types/personFinder';\nimport { BrowserName } from '@chayns-components/core';\nimport { usePersonFinder } from '../../../PersonFinderProvider';\nimport { useDevice } from 'chayns-api';\nimport { getGroupName } from '../../../../utils/personFinder';\nimport { useClosestElementAbove } from '../../../../hooks/personFinder';\nimport PersonFinderGroup from './person-finder-group/PersonFinderGroup';\nimport PersonFinderHeader from './person-finder-header/PersonFinderHeader';\n\nexport type PersonFinderBodyProps = {\n onAdd: (id: string) => void;\n onRemove: (id: string) => void;\n filterTypes?: PersonFinderFilterTypes[];\n shouldRenderInline?: boolean;\n};\n\nconst PersonFinderBody = forwardRef<HTMLDivElement, PersonFinderBodyProps>(\n ({ onAdd, filterTypes, onRemove, shouldRenderInline }, ref) => {\n const { activeFilter, data } = usePersonFinder();\n\n const { browser } = useDevice();\n\n const [isScrollTop, setIsScrollTop] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n const currentGroupName = useClosestElementAbove(contentRef, 'person-finder-group-name');\n\n const shouldShowGroupNames = (activeFilter?.length ?? 0) !== 1;\n\n const defaultGroupName = getGroupName(Object.keys(data ?? {})[0] ?? '');\n\n const handleContentScroll = (event: UIEvent<HTMLDivElement>) => {\n setIsScrollTop((event.target as HTMLElement).scrollTop === 0);\n };\n\n const content = useMemo(\n () =>\n Object.entries(data ?? {}).map(([key, singleData], index) => {\n const { count, entries, searchString } = singleData;\n\n return (\n <PersonFinderGroup\n key={`person-finder-group--${key}`}\n filterKey={key as PersonFinderFilterTypes}\n onAdd={onAdd}\n onRemove={onRemove}\n entries={entries}\n count={count}\n search={searchString}\n shouldShowGroupName={shouldShowGroupNames && index !== 0}\n />\n );\n }),\n [data, onAdd, onRemove, shouldShowGroupNames],\n );\n\n return (\n <StyledPersonFinderBody ref={ref} $shouldRenderInline={shouldRenderInline}>\n <PersonFinderHeader\n currentGroupName={currentGroupName}\n defaultGroupName={defaultGroupName}\n filterTypes={filterTypes}\n shouldShowGroupNames={shouldShowGroupNames}\n shouldShowShadow={!isScrollTop && !shouldRenderInline}\n />\n <StyledPersonFinderBodyContent\n ref={contentRef}\n $browser={browser?.name as BrowserName}\n onScroll={handleContentScroll}\n >\n {content}\n </StyledPersonFinderBodyContent>\n </StyledPersonFinderBody>\n );\n },\n);\n\nPersonFinderBody.displayName = 'PersonFinderBody';\n\nexport default PersonFinderBody;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAWC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC7E,SAASC,sBAAsB,EAAEC,6BAA6B,QAAQ,2BAA2B;AAGjG,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,SAAS,QAAQ,YAAY;AACtC,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,sBAAsB,QAAQ,gCAAgC;AACvE,OAAOC,iBAAiB,MAAM,yCAAyC;AACvE,OAAOC,kBAAkB,MAAM,2CAA2C;AAS1E,MAAMC,gBAAgB,gBAAGZ,UAAU,CAC/B,CAAC;EAAEa,KAAK;EAAEC,WAAW;EAAEC,QAAQ;EAAEC;AAAmB,CAAC,EA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Ic,KAAK,KAAK;IAAE,CAC5D,CAAC;EAEV,CAAC,CAAC,EACN,CAACpB,IAAI,EAAEN,KAAK,EAAEE,QAAQ,EAAEU,oBAAoB,CAChD,CAAC;EAED,oBACI1B,KAAA,CAAA2C,aAAA,CAACtC,sBAAsB;IAACa,GAAG,EAAEA,GAAI;IAAC6B,mBAAmB,EAAE9B;EAAmB,gBACtEjB,KAAA,CAAA2C,aAAA,CAAC/B,kBAAkB;IACfa,gBAAgB,EAAEA,gBAAiB;IACnCG,gBAAgB,EAAEA,gBAAiB;IACnCb,WAAW,EAAEA,WAAY;IACzBW,oBAAoB,EAAEA,oBAAqB;IAC3CsB,gBAAgB,EAAE,CAAC1B,WAAW,IAAI,CAACL;EAAmB,CACzD,CAAC,eACFjB,KAAA,CAAA2C,aAAA,CAACrC,6BAA6B;IAC1BY,GAAG,EAAEM,UAAW;IAChByB,QAAQ,EAAE5B,OAAO,EAAE6B,IAAoB;IACvCC,QAAQ,EAAEpB;EAAoB,GAE7BI,OAC0B,CACX,CAAC;AAEjC,CACJ,CAAC;AAEDtB,gBAAgB,CAACuC,WAAW,GAAG,kBAAkB;AAEjD,eAAevC,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"PersonFinderBody.js","names":["React","forwardRef","useMemo","useRef","useState","StyledPersonFinderBody","StyledPersonFinderBodyContent","usePersonFinder","getGroupName","useClosestElementAbove","PersonFinderGroup","PersonFinderHeader","PersonFinderBody","onAdd","filterTypes","onRemove","shouldRenderInline","ref","activeFilter","data","isScrollTop","setIsScrollTop","contentRef","currentGroupName","shouldShowGroupNames","length","defaultGroupName","Object","keys","handleContentScroll","event","target","scrollTop","content","entries","map","key","singleData","index","count","searchString","createElement","filterKey","search","shouldShowGroupName","$shouldRenderInline","shouldShowShadow","className","onScroll","displayName"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.tsx"],"sourcesContent":["import React, { forwardRef, UIEvent, useMemo, useRef, useState } from 'react';\nimport { StyledPersonFinderBody, StyledPersonFinderBodyContent } from './PersonFinderBody.styles';\nimport { PersonFinderFilterTypes } from '../../../../types/personFinder';\nimport { usePersonFinder } from '../../../PersonFinderProvider';\nimport { getGroupName } from '../../../../utils/personFinder';\nimport { useClosestElementAbove } from '../../../../hooks/personFinder';\nimport PersonFinderGroup from './person-finder-group/PersonFinderGroup';\nimport PersonFinderHeader from './person-finder-header/PersonFinderHeader';\n\nexport type PersonFinderBodyProps = {\n onAdd: (id: string) => void;\n onRemove: (id: string) => void;\n filterTypes?: PersonFinderFilterTypes[];\n shouldRenderInline?: boolean;\n};\n\nconst PersonFinderBody = forwardRef<HTMLDivElement, PersonFinderBodyProps>(\n ({ onAdd, filterTypes, onRemove, shouldRenderInline }, ref) => {\n const { activeFilter, data } = usePersonFinder();\n\n const [isScrollTop, setIsScrollTop] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n const currentGroupName = useClosestElementAbove(contentRef, 'person-finder-group-name');\n\n const shouldShowGroupNames = (activeFilter?.length ?? 0) !== 1;\n\n const defaultGroupName = getGroupName(Object.keys(data ?? {})[0] ?? '');\n\n const handleContentScroll = (event: UIEvent<HTMLDivElement>) => {\n setIsScrollTop((event.target as HTMLElement).scrollTop === 0);\n };\n\n const content = useMemo(\n () =>\n Object.entries(data ?? {}).map(([key, singleData], index) => {\n const { count, entries, searchString } = singleData;\n\n return (\n <PersonFinderGroup\n key={`person-finder-group--${key}`}\n filterKey={key as PersonFinderFilterTypes}\n onAdd={onAdd}\n onRemove={onRemove}\n entries={entries}\n count={count}\n search={searchString}\n shouldShowGroupName={shouldShowGroupNames && index !== 0}\n />\n );\n }),\n [data, onAdd, onRemove, shouldShowGroupNames],\n );\n\n return (\n <StyledPersonFinderBody ref={ref} $shouldRenderInline={shouldRenderInline}>\n <PersonFinderHeader\n currentGroupName={currentGroupName}\n defaultGroupName={defaultGroupName}\n filterTypes={filterTypes}\n shouldShowGroupNames={shouldShowGroupNames}\n shouldShowShadow={!isScrollTop && !shouldRenderInline}\n />\n <StyledPersonFinderBodyContent\n ref={contentRef}\n className=\"chayns-scrollbar\"\n onScroll={handleContentScroll}\n >\n {content}\n </StyledPersonFinderBodyContent>\n </StyledPersonFinderBody>\n );\n },\n);\n\nPersonFinderBody.displayName = 'PersonFinderBody';\n\nexport default PersonFinderBody;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAWC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC7E,SAASC,sBAAsB,EAAEC,6BAA6B,QAAQ,2BAA2B;AAEjG,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,sBAAsB,QAAQ,gCAAgC;AACvE,OAAOC,iBAAiB,MAAM,yCAAyC;AACvE,OAAOC,kBAAkB,MAAM,2CAA2C;AAS1E,MAAMC,gBAAgB,gBAAGX,UAAU,CAC/B,CAAC;EAAEY,KAAK;EAAEC,WAAW;EAAEC,QAAQ;EAAEC;AAAmB,CAAC,EAAEC,GAAG,KAAK;EAC3D,MAAM;IAAEC,YAAY;IAAEC;EAAK,CAAC,GAAGZ,eAAe,CAAC,CAAC;EAEhD,MAAM,CAACa,WAAW,EAAEC,cAAc,CAAC,GAAGjB,QAAQ,CAAC,IAAI,CAAC;EAEpD,MAAMkB,UAAU,GAAGnB,MAAM,CAAiB,IAAI,CAAC;EAE/C,MAAMoB,gBAAgB,GAAGd,sBAAsB,CAACa,UAAU,EAAE,0BAA0B,CAAC;EAEvF,MAAME,oBAAoB,GAAG,CAACN,YAAY,EAAEO,MAAM,IAAI,CAAC,MAAM,CAAC;EAE9D,MAAMC,gBAAgB,GAAGlB,YAAY,CAACmB,MAAM,CAACC,IAAI,CAACT,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;EAEvE,MAAMU,mBAAmB,GAAIC,KAA8B,IAAK;IAC5DT,cAAc,CAAES,KAAK,CAACC,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AAC;AAEDrB,gBAAgB,CAACqC,WAAW,GAAG,kBAAkB;AAEjD,eAAerC,gBAAgB","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import styled, { css } from 'styled-components';
1
+ import styled from 'styled-components';
2
2
  export const StyledPersonFinderBody = styled.div`
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -10,40 +10,5 @@ export const StyledPersonFinderBodyContent = styled.div`
10
10
  height: 100%;
11
11
  overflow-y: auto;
12
12
  padding-bottom: 10px;
13
-
14
- // Styles for custom scrollbar
15
- ${({
16
- $browser,
17
- theme
18
- }) => $browser === 'firefox' ? css`
19
- scrollbar-color: rgba(${theme['text-rgb']}, 0.15) transparent;
20
- scrollbar-width: thin;
21
- ` : css`
22
- &::-webkit-scrollbar {
23
- width: 10px;
24
- height: 10px;
25
- }
26
-
27
- &::-webkit-scrollbar-track {
28
- background-color: transparent;
29
- }
30
-
31
- &::-webkit-scrollbar-button {
32
- background-color: transparent;
33
- height: 5px;
34
- width: 5px;
35
- }
36
-
37
- &::-webkit-scrollbar-thumb {
38
- background-color: rgba(${theme['text-rgb']}, 0.15);
39
- border-radius: 20px;
40
- background-clip: padding-box;
41
- border: solid 3px transparent;
42
- }
43
-
44
- &::-webkit-scrollbar-corner {
45
- background-color: transparent;
46
- }
47
- `}
48
13
  `;
49
14
  //# sourceMappingURL=PersonFinderBody.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PersonFinderBody.styles.js","names":["styled","css","StyledPersonFinderBody","div","$shouldRenderInline","StyledPersonFinderBodyContent","$browser","theme"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { BrowserName, WithTheme } from '@chayns-components/core';\n\nexport const StyledPersonFinderBody = styled.div<{ $shouldRenderInline?: boolean }>`\n display: flex;\n flex-direction: column;\n height: ${({ $shouldRenderInline }) => ($shouldRenderInline ? 'auto' : '300px')};\n`;\n\ntype StyledPersonFinderBodyContentProps = WithTheme<{ $browser: BrowserName }>;\n\nexport const StyledPersonFinderBodyContent = styled.div<StyledPersonFinderBodyContentProps>`\n height: 100%;\n overflow-y: auto;\n padding-bottom: 10px;\n\n // Styles for custom scrollbar\n ${({ $browser, theme }: StyledPersonFinderBodyContentProps) =>\n $browser === 'firefox'\n ? css`\n scrollbar-color: rgba(${theme['text-rgb']}, 0.15) transparent;\n scrollbar-width: thin;\n `\n : css`\n &::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n }\n\n &::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n &::-webkit-scrollbar-button {\n background-color: transparent;\n height: 5px;\n width: 5px;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(${theme['text-rgb']}, 0.15);\n border-radius: 20px;\n background-clip: padding-box;\n border: solid 3px transparent;\n }\n\n &::-webkit-scrollbar-corner {\n background-color: transparent;\n }\n `}\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAG/C,OAAO,MAAMC,sBAAsB,GAAGF,MAAM,CAACG,GAAsC;AACnF;AACA;AACA,cAAc,CAAC;EAAEC;AAAoB,CAAC,KAAMA,mBAAmB,GAAG,MAAM,GAAG,OAAQ;AACnF,CAAC;AAID,OAAO,MAAMC,6BAA6B,GAAGL,MAAM,CAACG,GAAuC;AAC3F;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC;EAAEG,QAAQ;EAAEC;AAA0C,CAAC,KACtDD,QAAQ,KAAK,SAAS,GAChBL,GAAG;AACjB,0CAA0CM,KAAK,CAAC,UAAU,CAAC;AAC3D;AACA,eAAe,GACDN,GAAG;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+CM,KAAK,CAAC,UAAU,CAAC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"PersonFinderBody.styles.js","names":["styled","StyledPersonFinderBody","div","$shouldRenderInline","StyledPersonFinderBodyContent"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { WithTheme } from '@chayns-components/core';\n\nexport const StyledPersonFinderBody = styled.div<{ $shouldRenderInline?: boolean }>`\n display: flex;\n flex-direction: column;\n height: ${({ $shouldRenderInline }) => ($shouldRenderInline ? 'auto' : '300px')};\n`;\n\ntype StyledPersonFinderBodyContentProps = WithTheme<unknown>;\n\nexport const StyledPersonFinderBodyContent = styled.div<StyledPersonFinderBodyContentProps>`\n height: 100%;\n overflow-y: auto;\n padding-bottom: 10px;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAGtC,OAAO,MAAMC,sBAAsB,GAAGD,MAAM,CAACE,GAAsC;AACnF;AACA;AACA,cAAc,CAAC;EAAEC;AAAoB,CAAC,KAAMA,mBAAmB,GAAG,MAAM,GAAG,OAAQ;AACnF,CAAC;AAID,OAAO,MAAMC,6BAA6B,GAAGJ,MAAM,CAACE,GAAuC;AAC3F;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -1,9 +1,6 @@
1
- import { BrowserName, WithTheme } from '@chayns-components/core';
2
1
  export declare const StyledPersonFinderBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
2
  $shouldRenderInline?: boolean;
4
3
  }>> & string;
5
- type StyledPersonFinderBodyContentProps = WithTheme<{
6
- $browser: BrowserName;
7
- }>;
8
- export declare const StyledPersonFinderBodyContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledPersonFinderBodyContentProps>> & string;
9
- export {};
4
+ export declare const StyledPersonFinderBodyContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
5
+ theme: import("@chayns-components/core").Theme;
6
+ }>> & string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/person-finder",
3
- "version": "5.0.25",
3
+ "version": "5.0.27",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -71,7 +71,7 @@
71
71
  "typescript": "^5.9.3"
72
72
  },
73
73
  "dependencies": {
74
- "@chayns-components/core": "^5.0.25",
74
+ "@chayns-components/core": "^5.0.27",
75
75
  "@chayns/uac-service": "~0.0.62",
76
76
  "lodash.throttle": "^4.1.1",
77
77
  "uuid": "^10.0.0"
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "c7f8c9b84a5800ab68c7608d619f2b74291bee98"
89
+ "gitHead": "da89ab43781279c12a460450c8a9533c0093ff1b"
90
90
  }