@elliemae/ds-global-header 1.61.10 → 1.61.13

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.
Files changed (43) hide show
  1. package/cjs/GlobalHeader.js.map +1 -1
  2. package/cjs/GlobalHeaderContainer.js.map +1 -1
  3. package/cjs/GlobalHeaderContext.js.map +1 -1
  4. package/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +1 -1
  5. package/cjs/components/Breadcrumb/PureBreadcrumb.js.map +1 -1
  6. package/cjs/components/Breadcrumb/styles.js.map +1 -1
  7. package/cjs/components/Title/GlobalHeaderTitle.js.map +1 -1
  8. package/cjs/components/Toolbar/GlobalHeaderToolbar.js.map +1 -1
  9. package/cjs/components/Toolbar/ToolbarItems.js.map +1 -1
  10. package/cjs/components/Toolbar/styles.js.map +1 -1
  11. package/cjs/config/useGetPropsWithDefaults.js.map +1 -1
  12. package/cjs/config/useGlobalHeader.js.map +1 -1
  13. package/cjs/config/useValidateProps.js.map +1 -1
  14. package/cjs/config/validateHelpers.js.map +1 -1
  15. package/cjs/defaultProps.js.map +1 -1
  16. package/cjs/outOfTheBox/AppPicker/AppPicker.js.map +1 -1
  17. package/cjs/outOfTheBox/PopupMenu/PopupMenu.js.map +1 -1
  18. package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js.map +1 -1
  19. package/cjs/outOfTheBox/PopupMenu/styles.js.map +1 -1
  20. package/cjs/propTypes.js.map +1 -1
  21. package/cjs/styles.js.map +1 -1
  22. package/esm/GlobalHeader.js.map +1 -1
  23. package/esm/GlobalHeaderContainer.js.map +1 -1
  24. package/esm/GlobalHeaderContext.js.map +1 -1
  25. package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +1 -1
  26. package/esm/components/Breadcrumb/PureBreadcrumb.js.map +1 -1
  27. package/esm/components/Breadcrumb/styles.js.map +1 -1
  28. package/esm/components/Title/GlobalHeaderTitle.js.map +1 -1
  29. package/esm/components/Toolbar/GlobalHeaderToolbar.js.map +1 -1
  30. package/esm/components/Toolbar/ToolbarItems.js.map +1 -1
  31. package/esm/components/Toolbar/styles.js.map +1 -1
  32. package/esm/config/useGetPropsWithDefaults.js.map +1 -1
  33. package/esm/config/useGlobalHeader.js.map +1 -1
  34. package/esm/config/useValidateProps.js.map +1 -1
  35. package/esm/config/validateHelpers.js.map +1 -1
  36. package/esm/defaultProps.js.map +1 -1
  37. package/esm/outOfTheBox/AppPicker/AppPicker.js.map +1 -1
  38. package/esm/outOfTheBox/PopupMenu/PopupMenu.js.map +1 -1
  39. package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js.map +1 -1
  40. package/esm/outOfTheBox/PopupMenu/styles.js.map +1 -1
  41. package/esm/propTypes.js.map +1 -1
  42. package/esm/styles.js.map +1 -1
  43. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeader.js","sources":["../../src/GlobalHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { globalHeaderProps } from './propTypes';\nimport type { GlobalHeaderPropsT as Props } from './index.d';\nimport { GlobalHeaderTitle } from './components/Title/GlobalHeaderTitle';\nimport { GlobalHeaderBreadcrumb } from './components/Breadcrumb/GlobalHeaderBreadcrumb';\nimport { GlobalHeaderToolbar } from './components/Toolbar/GlobalHeaderToolbar';\nimport { GlobalHeaderContext } from './GlobalHeaderContext';\nimport { useGlobalHeader } from './config/useGlobalHeader';\nimport { defaultProps } from './defaultProps';\nimport { GlobalHeaderContainer } from './GlobalHeaderContainer';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst GlobalHeader = (props: Props): JSX.Element => {\n useValidateProps(props);\n const ctx = useGlobalHeader(props);\n return (\n <GlobalHeaderContainer>\n <GlobalHeaderContext.Provider value={ctx}>\n <GlobalHeaderTitle />\n <GlobalHeaderBreadcrumb />\n <GlobalHeaderToolbar />\n </GlobalHeaderContext.Provider>\n </GlobalHeaderContainer>\n );\n};\n\nGlobalHeader.defaultProps = defaultProps;\n\nGlobalHeader.propTypes = globalHeaderProps;\nconst GlobalHeaderWithSchema = describe(GlobalHeader);\nGlobalHeaderWithSchema.propTypes = globalHeaderProps;\n\nexport { GlobalHeader, GlobalHeaderWithSchema };\n"],"names":["GlobalHeader","props","useValidateProps","ctx","useGlobalHeader","React","GlobalHeaderContainer","GlobalHeaderContext","GlobalHeaderTitle","GlobalHeaderBreadcrumb","GlobalHeaderToolbar","defaultProps","propTypes","globalHeaderProps","GlobalHeaderWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAA+B;AAClDC,EAAAA,wCAAgB,CAACD,KAAD,CAAhB;AACA,MAAME,GAAG,GAAGC,sCAAe,CAACH,KAAD,CAA3B;AACA,sBACEI,wCAACC,2CAAD,qBACED,wCAACE,uCAAD,CAAqB,QAArB;AAA8B,IAAA,KAAK,EAAEJ;AAArC,kBACEE,wCAACG,oDAAD,OADF,eAEEH,wCAACI,mEAAD,OAFF,eAGEJ,wCAACK,0DAAD,OAHF,CADF,CADF;AASD;;AAEDV,YAAY,CAACW,YAAb,GAA4BA,yBAA5B;AAEAX,YAAY,CAACY,SAAb,GAAyBC,2BAAzB;IACMC,sBAAsB,GAAGC,kBAAQ,CAACf,YAAD;AACvCc,sBAAsB,CAACF,SAAvB,GAAmCC,2BAAnC;;;;;"}
1
+ {"version":3,"file":"GlobalHeader.js","sources":["../../src/GlobalHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { globalHeaderProps } from './propTypes';\nimport type { GlobalHeaderPropsT as Props } from './index.d';\nimport { GlobalHeaderTitle } from './components/Title/GlobalHeaderTitle';\nimport { GlobalHeaderBreadcrumb } from './components/Breadcrumb/GlobalHeaderBreadcrumb';\nimport { GlobalHeaderToolbar } from './components/Toolbar/GlobalHeaderToolbar';\nimport { GlobalHeaderContext } from './GlobalHeaderContext';\nimport { useGlobalHeader } from './config/useGlobalHeader';\nimport { defaultProps } from './defaultProps';\nimport { GlobalHeaderContainer } from './GlobalHeaderContainer';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst GlobalHeader = (props: Props): JSX.Element => {\n useValidateProps(props);\n const ctx = useGlobalHeader(props);\n return (\n <GlobalHeaderContainer>\n <GlobalHeaderContext.Provider value={ctx}>\n <GlobalHeaderTitle />\n <GlobalHeaderBreadcrumb />\n <GlobalHeaderToolbar />\n </GlobalHeaderContext.Provider>\n </GlobalHeaderContainer>\n );\n};\n\nGlobalHeader.defaultProps = defaultProps;\n\nGlobalHeader.propTypes = globalHeaderProps;\nconst GlobalHeaderWithSchema = describe(GlobalHeader);\nGlobalHeaderWithSchema.propTypes = globalHeaderProps;\n\nexport { GlobalHeader, GlobalHeaderWithSchema };\n"],"names":["GlobalHeader","props","useValidateProps","ctx","useGlobalHeader","React","GlobalHeaderContainer","GlobalHeaderContext","GlobalHeaderTitle","GlobalHeaderBreadcrumb","GlobalHeaderToolbar","defaultProps","propTypes","globalHeaderProps","GlobalHeaderWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAA+B;EAClDC,wCAAgB,CAACD,KAAD,CAAhB;EACA,IAAME,GAAG,GAAGC,sCAAe,CAACH,KAAD,CAA3B;EACA,oBACEI,wCAACC,2CAAD,qBACED,wCAACE,uCAAD,CAAqB,QAArB;IAA8B,KAAK,EAAEJ;kBACnCE,wCAACG,oDAAD,OADF,eAEEH,wCAACI,mEAAD,OAFF,eAGEJ,wCAACK,0DAAD,OAHF,CADF,CADF;AASD;;AAEDV,YAAY,CAACW,YAAb,GAA4BA,yBAA5B;AAEAX,YAAY,CAACY,SAAb,GAAyBC,2BAAzB;IACMC,sBAAsB,GAAGC,kBAAQ,CAACf,YAAD;AACvCc,sBAAsB,CAACF,SAAvB,GAAmCC,2BAAnC;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderContainer.js","sources":["../../src/GlobalHeaderContainer.tsx"],"sourcesContent":["import React from 'react';\nimport type { GlobalHeaderContainerT } from './index.d';\nimport { Wrapper } from './styles';\n\nexport const GlobalHeaderContainer = ({ children }: GlobalHeaderContainerT): JSX.Element => (\n <header data-testid=\"ds-global-header\">\n <Wrapper cols={['auto', '1fr', 'auto']}>{children}</Wrapper>\n </header>\n);\n"],"names":["GlobalHeaderContainer","children","React","Wrapper"],"mappings":";;;;;;;;;;;;;IAIaA,qBAAqB,GAAG,SAAxBA,qBAAwB;AAAA,MAAGC,QAAH,QAAGA,QAAH;AAAA,sBACnCC;AAAQ,mBAAY;AAApB,kBACEA,wCAACC,cAAD;AAAS,IAAA,IAAI,EAAE,CAAC,MAAD,EAAS,KAAT,EAAgB,MAAhB;AAAf,KAAyCF,QAAzC,CADF,CADmC;AAAA;;;;"}
1
+ {"version":3,"file":"GlobalHeaderContainer.js","sources":["../../src/GlobalHeaderContainer.tsx"],"sourcesContent":["import React from 'react';\nimport type { GlobalHeaderContainerT } from './index.d';\nimport { Wrapper } from './styles';\n\nexport const GlobalHeaderContainer = ({ children }: GlobalHeaderContainerT): JSX.Element => (\n <header data-testid=\"ds-global-header\">\n <Wrapper cols={['auto', '1fr', 'auto']}>{children}</Wrapper>\n </header>\n);\n"],"names":["GlobalHeaderContainer","children","React","Wrapper"],"mappings":";;;;;;;;;;;;;IAIaA,qBAAqB,GAAG,SAAxBA,qBAAwB;EAAA,IAAGC,QAAH,QAAGA,QAAH;EAAA,oBACnCC;IAAQ,eAAY;kBAClBA,wCAACC,cAAD;IAAS,IAAI,EAAE,CAAC,MAAD,EAAS,KAAT,EAAgB,MAAhB;KAA0BF,QAAzC,CADF,CADmC;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderContext.js","sources":["../../src/GlobalHeaderContext.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport { defaultProps } from './defaultProps';\nimport type { ContextT } from './index.d';\n\nconst noop = () => null;\n\nconst defaultContext = {\n props: defaultProps,\n showIconOnly: false,\n setShowIconOnly: noop,\n instanceUID: '',\n globalHeaderToolbarGrid: [],\n globalHeaderBreadcrumbGrid: [],\n};\n\nexport const GlobalHeaderContext = createContext<ContextT>(defaultContext);\n"],"names":["noop","defaultContext","props","defaultProps","showIconOnly","setShowIconOnly","instanceUID","globalHeaderToolbarGrid","globalHeaderBreadcrumbGrid","GlobalHeaderContext","createContext"],"mappings":";;;;;;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAO;AAAA,SAAM,IAAN;AAAA,CAAb;;AAEA,IAAMC,cAAc,GAAG;AACrBC,EAAAA,KAAK,EAAEC,yBADc;AAErBC,EAAAA,YAAY,EAAE,KAFO;AAGrBC,EAAAA,eAAe,EAAEL,IAHI;AAIrBM,EAAAA,WAAW,EAAE,EAJQ;AAKrBC,EAAAA,uBAAuB,EAAE,EALJ;AAMrBC,EAAAA,0BAA0B,EAAE;AANP,CAAvB;IASaC,mBAAmB,gBAAGC,mBAAa,CAAWT,cAAX;;;;"}
1
+ {"version":3,"file":"GlobalHeaderContext.js","sources":["../../src/GlobalHeaderContext.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport { defaultProps } from './defaultProps';\nimport type { ContextT } from './index.d';\n\nconst noop = () => null;\n\nconst defaultContext = {\n props: defaultProps,\n showIconOnly: false,\n setShowIconOnly: noop,\n instanceUID: '',\n globalHeaderToolbarGrid: [],\n globalHeaderBreadcrumbGrid: [],\n};\n\nexport const GlobalHeaderContext = createContext<ContextT>(defaultContext);\n"],"names":["noop","defaultContext","props","defaultProps","showIconOnly","setShowIconOnly","instanceUID","globalHeaderToolbarGrid","globalHeaderBreadcrumbGrid","GlobalHeaderContext","createContext"],"mappings":";;;;;;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAO;EAAA,OAAM,IAAN;AAAA,CAAb;;AAEA,IAAMC,cAAc,GAAG;EACrBC,KAAK,EAAEC,yBADc;EAErBC,YAAY,EAAE,KAFO;EAGrBC,eAAe,EAAEL,IAHI;EAIrBM,WAAW,EAAE,EAJQ;EAKrBC,uBAAuB,EAAE,EALJ;EAMrBC,0BAA0B,EAAE;AANP,CAAvB;IASaC,mBAAmB,gBAAGC,mBAAa,CAAWT,cAAX;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderBreadcrumb.js","sources":["../../../../src/components/Breadcrumb/GlobalHeaderBreadcrumb.tsx"],"sourcesContent":["import React, { useEffect, useContext, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Pipe } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { PureBreadcrumb } from './PureBreadcrumb';\n\nexport const GlobalHeaderBreadcrumb = (): JSX.Element => {\n const {\n props: { breadcrumb },\n instanceUID,\n showIconOnly,\n setShowIconOnly,\n globalHeaderBreadcrumbGrid,\n } = useContext(GlobalHeaderContext);\n const breakpoint = useRef<number | null>(null);\n const flexRegion = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const evaluateShowIconOnly = () => {\n if (flexRegion && flexRegion.current && flexRegion?.current.offsetWidth <= 0 && !breakpoint.current) {\n setShowIconOnly(true);\n breakpoint.current = window.innerWidth;\n } else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {\n setShowIconOnly(false);\n breakpoint.current = null;\n }\n };\n\n evaluateShowIconOnly();\n\n window.addEventListener('resize', evaluateShowIconOnly);\n return () => window.removeEventListener('resize', evaluateShowIconOnly);\n }, [breakpoint, flexRegion, setShowIconOnly]);\n\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n aria-label=\"breadcrumbs\"\n cols={globalHeaderBreadcrumbGrid}\n role=\"navigation\"\n >\n <Pipe showIconOnly={showIconOnly} />\n {breadcrumb?.map((item) => {\n const { label, hasNext, isSelected, onClick } = item;\n return (\n <PureBreadcrumb\n label={label}\n hasNext={hasNext}\n isSelected={isSelected}\n onClick={onClick}\n length={breadcrumb.length}\n key={`${instanceUID}-breadcrumb-item-${label}`}\n />\n );\n })}\n <div id=\"global-header-flex-region\" ref={flexRegion}></div>\n </Grid>\n );\n};\n"],"names":["GlobalHeaderBreadcrumb","useContext","GlobalHeaderContext","breadcrumb","props","instanceUID","showIconOnly","setShowIconOnly","globalHeaderBreadcrumbGrid","breakpoint","useRef","flexRegion","useEffect","evaluateShowIconOnly","current","offsetWidth","window","innerWidth","addEventListener","removeEventListener","React","Grid","Pipe","map","item","label","hasNext","isSelected","onClick","PureBreadcrumb","length"],"mappings":";;;;;;;;;;;;;;;;;IAMaA,sBAAsB,GAAG,SAAzBA,sBAAyB,GAAmB;AACvD,oBAMIC,gBAAU,CAACC,uCAAD,CANd;AAAA,MACWC,UADX,eACEC,KADF,CACWD,UADX;AAAA,MAEEE,WAFF,eAEEA,WAFF;AAAA,MAGEC,YAHF,eAGEA,YAHF;AAAA,MAIEC,eAJF,eAIEA,eAJF;AAAA,MAKEC,0BALF,eAKEA,0BALF;;AAOA,MAAMC,UAAU,GAAGC,YAAM,CAAgB,IAAhB,CAAzB;AACA,MAAMC,UAAU,GAAGD,YAAM,CAAiB,IAAjB,CAAzB;AAEAE,EAAAA,eAAS,CAAC,YAAM;AACd,QAAMC,oBAAoB,GAAG,SAAvBA,oBAAuB,GAAM;AACjC,UAAIF,UAAU,IAAIA,UAAU,CAACG,OAAzB,IAAoC,CAAAH,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU,CAAEG,OAAZ,CAAoBC,WAApB,KAAmC,CAAvE,IAA4E,CAACN,UAAU,CAACK,OAA5F,EAAqG;AACnGP,QAAAA,eAAe,CAAC,IAAD,CAAf;AACAE,QAAAA,UAAU,CAACK,OAAX,GAAqBE,MAAM,CAACC,UAA5B;AACD,OAHD,MAGO,IAAIR,UAAU,IAAIA,UAAU,CAACK,OAAX,KAAuB,IAArC,IAA6CE,MAAM,CAACC,UAAP,IAA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C,IAAA,GAAG,EAAET;AAAzC,IAtBF,CADF;AA0BD;;;;"}
1
+ {"version":3,"file":"GlobalHeaderBreadcrumb.js","sources":["../../../../src/components/Breadcrumb/GlobalHeaderBreadcrumb.tsx"],"sourcesContent":["import React, { useEffect, useContext, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Pipe } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { PureBreadcrumb } from './PureBreadcrumb';\n\nexport const GlobalHeaderBreadcrumb = (): JSX.Element => {\n const {\n props: { breadcrumb },\n instanceUID,\n showIconOnly,\n setShowIconOnly,\n globalHeaderBreadcrumbGrid,\n } = useContext(GlobalHeaderContext);\n const breakpoint = useRef<number | null>(null);\n const flexRegion = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const evaluateShowIconOnly = () => {\n if (flexRegion && flexRegion.current && flexRegion?.current.offsetWidth <= 0 && !breakpoint.current) {\n setShowIconOnly(true);\n breakpoint.current = window.innerWidth;\n } else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {\n setShowIconOnly(false);\n breakpoint.current = null;\n }\n };\n\n evaluateShowIconOnly();\n\n window.addEventListener('resize', evaluateShowIconOnly);\n return () => window.removeEventListener('resize', evaluateShowIconOnly);\n }, [breakpoint, flexRegion, setShowIconOnly]);\n\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n aria-label=\"breadcrumbs\"\n cols={globalHeaderBreadcrumbGrid}\n role=\"navigation\"\n >\n <Pipe showIconOnly={showIconOnly} />\n {breadcrumb?.map((item) => {\n const { label, hasNext, isSelected, onClick } = item;\n return (\n <PureBreadcrumb\n label={label}\n hasNext={hasNext}\n isSelected={isSelected}\n onClick={onClick}\n length={breadcrumb.length}\n key={`${instanceUID}-breadcrumb-item-${label}`}\n />\n );\n })}\n <div id=\"global-header-flex-region\" ref={flexRegion}></div>\n </Grid>\n );\n};\n"],"names":["GlobalHeaderBreadcrumb","useContext","GlobalHeaderContext","breadcrumb","props","instanceUID","showIconOnly","setShowIconOnly","globalHeaderBreadcrumbGrid","breakpoint","useRef","flexRegion","useEffect","evaluateShowIconOnly","current","offsetWidth","window","innerWidth","addEventListener","removeEventListener","React","Grid","Pipe","map","item","label","hasNext","isSelected","onClick","PureBreadcrumb","length"],"mappings":";;;;;;;;;;;;;;;;;IAMaA,sBAAsB,GAAG,SAAzBA,sBAAyB,GAAmB;EACvD,kBAMIC,gBAAU,CAACC,uCAAD,CANd;MACWC,UADX,eACEC,KADF,CACWD,UADX;MAEEE,WAFF,eAEEA,WAFF;MAGEC,YAHF,eAGEA,YAHF;MAIEC,eAJF,eAIEA,eAJF;MAKEC,0BALF,eAKEA,0BALF;;EAOA,IAAMC,UAAU,GAAGC,YAAM,CAAgB,IAAhB,CAAzB;EACA,IAAMC,UAAU,GAAGD,YAAM,CAAiB,IAAjB,CAAzB;EAEAE,eAAS,CAAC,YAAM;IACd,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAuB,GAAM;MACjC,IAAIF,UAAU,IAAIA,UAAU,CAACG,OAAzB,IAAoC,CAAAH,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU,CAAEG,OAAZ,CAAoBC,WAApB,KAAmC,CAAvE,IAA4E,CAACN,UAAU,CAACK,OAA5F,EAAqG;QACnGP,eAAe,CAAC,IAAD,CAAf;QACAE,UAAU,CAACK,OAAX,GAAqBE,MAAM,CAACC,UAA5B;OAFF,MAGO,IAAIR,UAAU,IAAIA,UAAU,CAACK,OAAX,KAAuB,IAArC,IAA6CE,MAAM,CAACC,UAAP,IAAqBR,UAAU,CAACK,OAAjF,EAA0F;QAC/FP,eAAe,CAAC,KAAD,CAAf;QACAE,UAAU,CAACK,OAAX,GAAqB,IAArB;;KANJ;;IAUAD,oBAAoB;IAEpBG,MAAM,CAACE,gBAAP,CAAwB,QAAxB,EAAkCL,oBAAlC;IACA,OAAO;MAAA,OAAMG,MAAM,CAACG,mBAAP,CAA2B,QAA3B,EAAqCN,oBAArC,CAAN;KAAP;GAdO,EAeN,CAACJ,UAAD,EAAaE,UAAb,EAAyBJ,eAAzB,CAfM,CAAT;EAiBA,oBACEa,wCAACC,WAAD;IACE,MAAM,EAAC,MADT;IAEE,UAAU,EAAC,QAFb;IAGE,cAAc,EAAC,YAHjB;IAIE,cAAW,aAJb;IAKE,IAAI,EAAEb,0BALR;IAME,IAAI,EAAC;kBAELY,wCAACE,iCAAD;IAAM,YAAY,EAAEhB;IARtB,EASGH,UATH,aASGA,UATH,uBASGA,UAAU,CAAEoB,GAAZ,CAAgB,UAACC,IAAD,EAAU;IACzB,IAAQC,KAAR,GAAgDD,IAAhD,CAAQC,KAAR;QAAeC,OAAf,GAAgDF,IAAhD,CAAeE,OAAf;QAAwBC,UAAxB,GAAgDH,IAAhD,CAAwBG,UAAxB;QAAoCC,OAApC,GAAgDJ,IAAhD,CAAoCI,OAApC;IACA,oBACER,wCAACS,mDAAD;MACE,KAAK,EAAEJ,KADT;MAEE,OAAO,EAAEC,OAFX;MAGE,UAAU,EAAEC,UAHd;MAIE,OAAO,EAAEC,OAJX;MAKE,MAAM,EAAEzB,UAAU,CAAC2B,MALrB;MAME,GAAG,YAAKzB,WAAL,8BAAoCoB,KAApC;MAPP;GAFD,CATH,eAsBEL;IAAK,EAAE,EAAC,2BAAR;IAAoC,GAAG,EAAET;IAtB3C,CADF;AA0BD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PureBreadcrumb.js","sources":["../../../../src/components/Breadcrumb/PureBreadcrumb.tsx"],"sourcesContent":["import React from 'react';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\nimport { BreadcrumbItem, LabelButton, Label } from './styles';\nimport type { BreadcrumbItemT as Props } from '../../index.d';\n\nexport const PureBreadcrumb = React.memo(({ onClick, isSelected, length, label, hasNext }: Props) => (\n <BreadcrumbItem>\n <LabelButton onClick={onClick} aria-selected={isSelected} data-testid=\"gh-breadcrumb-btn\">\n <Label isSelected={!!isSelected} isOnlyItem={length === 1}>\n {label}\n </Label>\n </LabelButton>\n {hasNext && <ChevronSmallRight size=\"m\" fill=\"#FFF\" />}\n </BreadcrumbItem>\n));\n"],"names":["PureBreadcrumb","React","memo","onClick","isSelected","length","label","hasNext","BreadcrumbItem","LabelButton","Label","ChevronSmallRight"],"mappings":";;;;;;;;;;;;;IAKaA,cAAc,gBAAGC,yBAAK,CAACC,IAAN,CAAW;AAAA,MAAGC,OAAH,QAAGA,OAAH;AAAA,MAAYC,UAAZ,QAAYA,UAAZ;AAAA,MAAwBC,MAAxB,QAAwBA,MAAxB;AAAA,MAAgCC,KAAhC,QAAgCA,KAAhC;AAAA,MAAuCC,OAAvC,QAAuCA,OAAvC;AAAA,sBACvCN,wCAACO,2CAAD,qBACEP,wCAACQ,wCAAD;AAAa,IAAA,OAAO,EAAEN,OAAtB;AAA+B,qBAAeC,UAA9C;AAA0D,mBAAY;AAAtE,kBACEH,wCAACS,kCAAD;AAAO,IAAA,UAAU,EAAE,CAAC,CAACN,UAArB;AAAiC,IAAA,UAAU,EAAEC,MAAM,KAAK;AAAxD,KACGC,KADH,CADF,CADF,EAMGC,OAAO,iBAAIN,wCAACU,yBAAD;AAAmB,IAAA,IAAI,EAAC,GAAxB;AAA4B,IAAA,IAAI,EAAC;AAAjC,IANd,CADuC;AAAA,CAAX;;;;"}
1
+ {"version":3,"file":"PureBreadcrumb.js","sources":["../../../../src/components/Breadcrumb/PureBreadcrumb.tsx"],"sourcesContent":["import React from 'react';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\nimport { BreadcrumbItem, LabelButton, Label } from './styles';\nimport type { BreadcrumbItemT as Props } from '../../index.d';\n\nexport const PureBreadcrumb = React.memo(({ onClick, isSelected, length, label, hasNext }: Props) => (\n <BreadcrumbItem>\n <LabelButton onClick={onClick} aria-selected={isSelected} data-testid=\"gh-breadcrumb-btn\">\n <Label isSelected={!!isSelected} isOnlyItem={length === 1}>\n {label}\n </Label>\n </LabelButton>\n {hasNext && <ChevronSmallRight size=\"m\" fill=\"#FFF\" />}\n </BreadcrumbItem>\n));\n"],"names":["PureBreadcrumb","React","memo","onClick","isSelected","length","label","hasNext","BreadcrumbItem","LabelButton","Label","ChevronSmallRight"],"mappings":";;;;;;;;;;;;;IAKaA,cAAc,gBAAGC,yBAAK,CAACC,IAAN,CAAW;EAAA,IAAGC,OAAH,QAAGA,OAAH;MAAYC,UAAZ,QAAYA,UAAZ;MAAwBC,MAAxB,QAAwBA,MAAxB;MAAgCC,KAAhC,QAAgCA,KAAhC;MAAuCC,OAAvC,QAAuCA,OAAvC;EAAA,oBACvCN,wCAACO,2CAAD,qBACEP,wCAACQ,wCAAD;IAAa,OAAO,EAAEN,OAAtB;IAA+B,iBAAeC,UAA9C;IAA0D,eAAY;kBACpEH,wCAACS,kCAAD;IAAO,UAAU,EAAE,CAAC,CAACN,UAArB;IAAiC,UAAU,EAAEC,MAAM,KAAK;KACrDC,KADH,CADF,CADF,EAMGC,OAAO,iBAAIN,wCAACU,yBAAD;IAAmB,IAAI,EAAC,GAAxB;IAA4B,IAAI,EAAC;IAN/C,CADuC;AAAA,CAAX;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Breadcrumb/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { LabelT, PipeT } from '../../index.d';\n\nexport const Pipe = styled.span<PipeT>`\n margin: 0 7px 0 0;\n border-left: ${({ showIconOnly }) => (showIconOnly ? 'none' : '1px solid #fff')};\n height: 20px;\n`;\n\nexport const BreadcrumbItem = styled.div`\n display: flex;\n align-items: center;\n height: 100%;\n`;\n\nexport const LabelButton = styled.button`\n width: fit-content;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n position: relative;\n &:focus {\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: -7px;\n width: calc(100% + 14px);\n height: 100%;\n border: 4px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 6px;\n }\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: -5px;\n width: calc(100% + 10px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n\nexport const Label = styled.p<LabelT>`\n color: ${({ theme }) => theme.colors.neutral['000']};\n ${({ theme, isSelected }) =>\n `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`};\n font-size: 16px;\n text-transform: uppercase;\n border-bottom: ${({ isSelected, isOnlyItem }) => `2px solid ${isSelected && !isOnlyItem ? '#FFF' : 'transparent'}`};\n margin: 3px 5px 0 5px;\n :hover {\n ${({ theme }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`};\n }\n`;\n"],"names":["Pipe","styled","span","showIconOnly","BreadcrumbItem","div","LabelButton","button","theme","colors","brand","neutral","Label","p","isSelected","isOnlyItem"],"mappings":";;;;;;;;;;IAGaA,IAAI,gBAAGC,0BAAM,CAACC,IAAV;AAAA;AAAA,uDAEA;AAAA,MAAGC,YAAH,QAAGA,YAAH;AAAA,SAAuBA,YAAY,GAAG,MAAH,GAAY,gBAA/C;AAAA,CAFA;IAMJC,cAAc,gBAAGH,0BAAM,CAACI,GAAV;AAAA;AAAA;IAMdC,WAAW,gBAAGL,0BAAM,CAACM,MAAV;AAAA;AAAA,scAkBE;AAAA,MAAGC,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CAlBF,EA6BE;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CA7BF;IAmCXC,KAAK,gBAAGX,0BAAM,CAACY,CAAV;AAAA;AAAA,sHACP;AAAA,MAAGL,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CADO,EAEd;AAAA,MAAGH,KAAH,SAAGA,KAAH;AAAA,MAAUM,UAAV,SAAUA,UAAV;AAAA,+CAC+BA,UAAU,GAAGN,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAH,GAAiC,aAD1E;AAAA,CAFc,EAMC;AAAA,MAAGG,UAAH,SAAGA,UAAH;AAAA,MAAeC,UAAf,SAAeA,UAAf;AAAA,6BAA6CD,UAAU,IAAI,CAACC,UAAf,GAA4B,MAA5B,GAAqC,aAAlF;AAAA,CAND,EASZ;AAAA,MAAGP,KAAH,SAAGA,KAAH;AAAA,8CAA6CA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAA7C;AAAA,CATY;;;;;;;"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Breadcrumb/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { LabelT, PipeT } from '../../index.d';\n\nexport const Pipe = styled.span<PipeT>`\n margin: 0 7px 0 0;\n border-left: ${({ showIconOnly }) => (showIconOnly ? 'none' : '1px solid #fff')};\n height: 20px;\n`;\n\nexport const BreadcrumbItem = styled.div`\n display: flex;\n align-items: center;\n height: 100%;\n`;\n\nexport const LabelButton = styled.button`\n width: fit-content;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n position: relative;\n &:focus {\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: -7px;\n width: calc(100% + 14px);\n height: 100%;\n border: 4px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 6px;\n }\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: -5px;\n width: calc(100% + 10px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n\nexport const Label = styled.p<LabelT>`\n color: ${({ theme }) => theme.colors.neutral['000']};\n ${({ theme, isSelected }) =>\n `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`};\n font-size: 16px;\n text-transform: uppercase;\n border-bottom: ${({ isSelected, isOnlyItem }) => `2px solid ${isSelected && !isOnlyItem ? '#FFF' : 'transparent'}`};\n margin: 3px 5px 0 5px;\n :hover {\n ${({ theme }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`};\n }\n`;\n"],"names":["Pipe","styled","span","showIconOnly","BreadcrumbItem","div","LabelButton","button","theme","colors","brand","neutral","Label","p","isSelected","isOnlyItem"],"mappings":";;;;;;;;;;IAGaA,IAAI,gBAAGC,0BAAM,CAACC,IAAV;EAAA;AAAA,uDAEA;EAAA,IAAGC,YAAH,QAAGA,YAAH;EAAA,OAAuBA,YAAY,GAAG,MAAH,GAAY,gBAA/C;AAAA,CAFA;IAMJC,cAAc,gBAAGH,0BAAM,CAACI,GAAV;EAAA;AAAA;IAMdC,WAAW,gBAAGL,0BAAM,CAACM,MAAV;EAAA;AAAA,scAkBE;EAAA,IAAGC,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CAlBF,EA6BE;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CA7BF;IAmCXC,KAAK,gBAAGX,0BAAM,CAACY,CAAV;EAAA;AAAA,sHACP;EAAA,IAAGL,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CADO,EAEd;EAAA,IAAGH,KAAH,SAAGA,KAAH;MAAUM,UAAV,SAAUA,UAAV;EAAA,6CAC+BA,UAAU,GAAGN,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAH,GAAiC,aAD1E;AAAA,CAFc,EAMC;EAAA,IAAGG,UAAH,SAAGA,UAAH;MAAeC,UAAf,SAAeA,UAAf;EAAA,2BAA6CD,UAAU,IAAI,CAACC,UAAf,GAA4B,MAA5B,GAAqC,aAAlF;AAAA,CAND,EASZ;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,4CAA6CA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAA7C;AAAA,CATY;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderTitle.js","sources":["../../../../src/components/Title/GlobalHeaderTitle.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderTitle = (): JSX.Element => {\n const {\n props: { Logo, LogoWithBrand },\n showIconOnly,\n } = useContext(GlobalHeaderContext);\n\n return (\n <Grid alignItems=\"center\" pr={showIconOnly ? '0px' : '36px'} cols={showIconOnly ? ['auto'] : ['auto', '1fr']}>\n {Logo && showIconOnly && <Logo />}\n {LogoWithBrand && !showIconOnly && <LogoWithBrand />}\n </Grid>\n );\n};\n"],"names":["GlobalHeaderTitle","useContext","GlobalHeaderContext","props","Logo","LogoWithBrand","showIconOnly","React","Grid"],"mappings":";;;;;;;;;;;;;IAIaA,iBAAiB,GAAG,SAApBA,iBAAoB,GAAmB;AAClD,oBAGIC,gBAAU,CAACC,uCAAD,CAHd;AAAA,sCACEC,KADF;AAAA,MACWC,IADX,qBACWA,IADX;AAAA,MACiBC,aADjB,qBACiBA,aADjB;AAAA,MAEEC,YAFF,eAEEA,YAFF;;AAKA,sBACEC,wCAACC,WAAD;AAAM,IAAA,UAAU,EAAC,QAAjB;AAA0B,IAAA,EAAE,EAAEF,YAAY,GAAG,KAAH,GAAW,MAArD;AAA6D,IAAA,IAAI,EAAEA,YAAY,GAAG,CAAC,MAAD,CAAH,GAAc,CAAC,MAAD,EAAS,KAAT;AAA7F,KACGF,IAAI,IAAIE,YAAR,iBAAwBC,wCAAC,IAAD,OAD3B,EAEGF,aAAa,IAAI,CAACC,YAAlB,iBAAkCC,wCAAC,aAAD,OAFrC,CADF;AAMD;;;;"}
1
+ {"version":3,"file":"GlobalHeaderTitle.js","sources":["../../../../src/components/Title/GlobalHeaderTitle.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderTitle = (): JSX.Element => {\n const {\n props: { Logo, LogoWithBrand },\n showIconOnly,\n } = useContext(GlobalHeaderContext);\n\n return (\n <Grid alignItems=\"center\" pr={showIconOnly ? '0px' : '36px'} cols={showIconOnly ? ['auto'] : ['auto', '1fr']}>\n {Logo && showIconOnly && <Logo />}\n {LogoWithBrand && !showIconOnly && <LogoWithBrand />}\n </Grid>\n );\n};\n"],"names":["GlobalHeaderTitle","useContext","GlobalHeaderContext","props","Logo","LogoWithBrand","showIconOnly","React","Grid"],"mappings":";;;;;;;;;;;;;IAIaA,iBAAiB,GAAG,SAApBA,iBAAoB,GAAmB;EAClD,kBAGIC,gBAAU,CAACC,uCAAD,CAHd;sCACEC,KADF;MACWC,IADX,qBACWA,IADX;MACiBC,aADjB,qBACiBA,aADjB;MAEEC,YAFF,eAEEA,YAFF;;EAKA,oBACEC,wCAACC,WAAD;IAAM,UAAU,EAAC,QAAjB;IAA0B,EAAE,EAAEF,YAAY,GAAG,KAAH,GAAW,MAArD;IAA6D,IAAI,EAAEA,YAAY,GAAG,CAAC,MAAD,CAAH,GAAc,CAAC,MAAD,EAAS,KAAT;KAC1FF,IAAI,IAAIE,YAAR,iBAAwBC,wCAAC,IAAD,OAD3B,EAEGF,aAAa,IAAI,CAACC,YAAlB,iBAAkCC,wCAAC,aAAD,OAFrC,CADF;AAMD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderToolbar.js","sources":["../../../../src/components/Toolbar/GlobalHeaderToolbar.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ToolbarItems } from './ToolbarItems';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderToolbar = (): JSX.Element => {\n const { globalHeaderToolbarGrid } = useContext(GlobalHeaderContext);\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gutter=\"xxs\"\n cols={globalHeaderToolbarGrid}\n role=\"toolbar\"\n >\n <ToolbarItems />\n </Grid>\n );\n};\n"],"names":["GlobalHeaderToolbar","useContext","GlobalHeaderContext","globalHeaderToolbarGrid","React","Grid","ToolbarItems"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKaA,mBAAmB,GAAG,SAAtBA,mBAAsB,GAAmB;AACpD,oBAAoCC,gBAAU,CAACC,uCAAD,CAA9C;AAAA,MAAQC,uBAAR,eAAQA,uBAAR;;AACA,sBACEC,wCAACC,WAAD;AACE,IAAA,MAAM,EAAC,MADT;AAEE,IAAA,UAAU,EAAC,QAFb;AAGE,IAAA,cAAc,EAAC,QAHjB;AAIE,IAAA,MAAM,EAAC,KAJT;AAKE,IAAA,IAAI,EAAEF,uBALR;AAME,IAAA,IAAI,EAAC;AANP,kBAQEC,wCAACE,4CAAD,OARF,CADF;AAYD;;;;"}
1
+ {"version":3,"file":"GlobalHeaderToolbar.js","sources":["../../../../src/components/Toolbar/GlobalHeaderToolbar.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ToolbarItems } from './ToolbarItems';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderToolbar = (): JSX.Element => {\n const { globalHeaderToolbarGrid } = useContext(GlobalHeaderContext);\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gutter=\"xxs\"\n cols={globalHeaderToolbarGrid}\n role=\"toolbar\"\n >\n <ToolbarItems />\n </Grid>\n );\n};\n"],"names":["GlobalHeaderToolbar","useContext","GlobalHeaderContext","globalHeaderToolbarGrid","React","Grid","ToolbarItems"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKaA,mBAAmB,GAAG,SAAtBA,mBAAsB,GAAmB;EACpD,kBAAoCC,gBAAU,CAACC,uCAAD,CAA9C;MAAQC,uBAAR,eAAQA,uBAAR;;EACA,oBACEC,wCAACC,WAAD;IACE,MAAM,EAAC,MADT;IAEE,UAAU,EAAC,QAFb;IAGE,cAAc,EAAC,QAHjB;IAIE,MAAM,EAAC,KAJT;IAKE,IAAI,EAAEF,uBALR;IAME,IAAI,EAAC;kBAELC,wCAACE,4CAAD,OARF,CADF;AAYD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarItems.js","sources":["../../../../src/components/Toolbar/ToolbarItems.tsx"],"sourcesContent":["/* eslint-disable no-case-declarations */\nimport React, { useContext, useMemo } from 'react';\nimport { AppPicker, PopupMenu } from '../../outOfTheBox';\nimport { Button } from './styles';\nimport type { AppPickerProps, PopupPropsT } from '../../index.d';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\n const itemsList = useMemo(\n () =>\n toolbar?.map((item) => {\n const { Icon, type, onClick, componentProps, label } = item;\n\n switch (type) {\n case 'ds-popup-menu':\n const { options, closeOnClick } = componentProps as PopupPropsT;\n return (\n <PopupMenu\n onClick={onClick}\n title={label}\n Icon={Icon}\n options={options}\n closeOnClick={closeOnClick}\n key={`${instanceUID}-ds-popup-menu-${label}`}\n />\n );\n case 'ds-app-picker':\n return (\n <AppPicker\n label={label}\n key={`${instanceUID}-ds-app-picker-${label}`}\n {...(componentProps as AppPickerProps)}\n />\n );\n default:\n return (\n <Button\n onClick={onClick}\n key={`${instanceUID}-ds-toolbar-button-${label}`}\n title={label}\n data-testid=\"gh-toolbar-item\"\n >\n <Icon fill=\"#FFF\" size=\"m\" />\n </Button>\n );\n }\n }),\n [toolbar, instanceUID],\n );\n\n return <>{itemsList}</>;\n};\n"],"names":["ToolbarItems","useContext","GlobalHeaderContext","toolbar","props","instanceUID","itemsList","useMemo","map","item","Icon","type","onClick","componentProps","label","options","closeOnClick","React","PopupMenu","AppPicker","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAOaA,YAAY,GAAG,SAAfA,YAAe,GAAmB;AAC7C,oBAGIC,gBAAU,CAACC,uCAAD,CAHd;AAAA,MACWC,OADX,eACEC,KADF,CACWD,OADX;AAAA,MAEEE,WAFF,eAEEA,WAFF;;AAKA,MAAMC,SAAS,GAAGC,aAAO,CACvB;AAAA,WACEJ,OADF,aACEA,OADF,uBACEA,OAAO,CAAEK,GAAT,CAAa,UAACC,IAAD,EAAU;AACrB,UAAQC,IAAR,GAAuDD,IAAvD,CAAQC,IAAR;AAAA,UAAcC,IAAd,GAAuDF,IAAvD,CAAcE,IAAd;AAAA,UAAoBC,OAApB,GAAuDH,IAAvD,CAAoBG,OAApB;AAAA,UAA6BC,cAA7B,GAAuDJ,IAAvD,CAA6BI,cAA7B;AAAA,UAA6CC,KAA7C,GAAuDL,IAAvD,CAA6CK,KAA7C;;AAEA,cAAQH,IAAR;AACE,aAAK,eAAL;AACE,qBAAkCE,cAAlC;AAAA,cAAQE,OAAR,QAAQA,OAAR;AAAA,cAAiBC,YAAjB,QAAiBA,YAAjB;AACA,8BACEC,wCAACC,yCAAD;AACE,YAAA,OAAO,EAAEN,OADX;AAEE,YAAA,KAAK,EAAEE,KAFT;AAGE,YAAA,IAAI,EAAEJ,IAHR;AAIE,YAAA,OAAO,EAAEK,OAJX;AAKE,YAAA,YAAY,EAAEC,YALhB;AAME,YAAA,GAAG,YAAKX,WAAL,4BAAkCS,KAAlC;AANL,YADF;;AAUF,aAAK,eAAL;AACE,8BACEG,wCAACE,yCAAD;AACE,YAAA,KAAK,EAAEL,KADT;AAEE,YAAA,GAAG,YAAKT,WAAL,4BAAkCS,KAAlC;AAFL,aAGOD,cAHP,EADF;;AAOF;AACE,8BACEI,wCAACG,gCAAD;AACE,YAAA,OAAO,EAAER,OADX;AAEE,YAAA,GAAG,YAAKP,WAAL,gCAAsCS,KAAtC,CAFL;AAGE,YAAA,KAAK,EAAEA,KAHT;AAIE,2BAAY;AAJd,0BAMEG,wCAAC,IAAD;AAAM,YAAA,IAAI,EAAC,MAAX;AAAkB,YAAA,IAAI,EAAC;AAAvB,YANF,CADF;AAtBJ;AAiCD,KApCD,CADF;AAAA,GADuB,EAuCvB,CAACd,OAAD,EAAUE,WAAV,CAvCuB,CAAzB;AA0CA,sBAAOY,kFAAGX,SAAH,CAAP;AACD;;;;"}
1
+ {"version":3,"file":"ToolbarItems.js","sources":["../../../../src/components/Toolbar/ToolbarItems.tsx"],"sourcesContent":["/* eslint-disable no-case-declarations */\nimport React, { useContext, useMemo } from 'react';\nimport { AppPicker, PopupMenu } from '../../outOfTheBox';\nimport { Button } from './styles';\nimport type { AppPickerProps, PopupPropsT } from '../../index.d';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\n const itemsList = useMemo(\n () =>\n toolbar?.map((item) => {\n const { Icon, type, onClick, componentProps, label } = item;\n\n switch (type) {\n case 'ds-popup-menu':\n const { options, closeOnClick } = componentProps as PopupPropsT;\n return (\n <PopupMenu\n onClick={onClick}\n title={label}\n Icon={Icon}\n options={options}\n closeOnClick={closeOnClick}\n key={`${instanceUID}-ds-popup-menu-${label}`}\n />\n );\n case 'ds-app-picker':\n return (\n <AppPicker\n label={label}\n key={`${instanceUID}-ds-app-picker-${label}`}\n {...(componentProps as AppPickerProps)}\n />\n );\n default:\n return (\n <Button\n onClick={onClick}\n key={`${instanceUID}-ds-toolbar-button-${label}`}\n title={label}\n data-testid=\"gh-toolbar-item\"\n >\n <Icon fill=\"#FFF\" size=\"m\" />\n </Button>\n );\n }\n }),\n [toolbar, instanceUID],\n );\n\n return <>{itemsList}</>;\n};\n"],"names":["ToolbarItems","useContext","GlobalHeaderContext","toolbar","props","instanceUID","itemsList","useMemo","map","item","Icon","type","onClick","componentProps","label","options","closeOnClick","React","PopupMenu","AppPicker","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAOaA,YAAY,GAAG,SAAfA,YAAe,GAAmB;EAC7C,kBAGIC,gBAAU,CAACC,uCAAD,CAHd;MACWC,OADX,eACEC,KADF,CACWD,OADX;MAEEE,WAFF,eAEEA,WAFF;;EAKA,IAAMC,SAAS,GAAGC,aAAO,CACvB;IAAA,OACEJ,OADF,aACEA,OADF,uBACEA,OAAO,CAAEK,GAAT,CAAa,UAACC,IAAD,EAAU;MACrB,IAAQC,IAAR,GAAuDD,IAAvD,CAAQC,IAAR;UAAcC,IAAd,GAAuDF,IAAvD,CAAcE,IAAd;UAAoBC,OAApB,GAAuDH,IAAvD,CAAoBG,OAApB;UAA6BC,cAA7B,GAAuDJ,IAAvD,CAA6BI,cAA7B;UAA6CC,KAA7C,GAAuDL,IAAvD,CAA6CK,KAA7C;;MAEA,QAAQH,IAAR;QACE,KAAK,eAAL;UACE,WAAkCE,cAAlC;cAAQE,OAAR,QAAQA,OAAR;cAAiBC,YAAjB,QAAiBA,YAAjB;UACA,oBACEC,wCAACC,yCAAD;YACE,OAAO,EAAEN,OADX;YAEE,KAAK,EAAEE,KAFT;YAGE,IAAI,EAAEJ,IAHR;YAIE,OAAO,EAAEK,OAJX;YAKE,YAAY,EAAEC,YALhB;YAME,GAAG,YAAKX,WAAL,4BAAkCS,KAAlC;YAPP;;QAUF,KAAK,eAAL;UACE,oBACEG,wCAACE,yCAAD;YACE,KAAK,EAAEL,KADT;YAEE,GAAG,YAAKT,WAAL,4BAAkCS,KAAlC;aACED,cAHP,EADF;;QAOF;UACE,oBACEI,wCAACG,gCAAD;YACE,OAAO,EAAER,OADX;YAEE,GAAG,YAAKP,WAAL,gCAAsCS,KAAtC,CAFL;YAGE,KAAK,EAAEA,KAHT;YAIE,eAAY;0BAEZG,wCAAC,IAAD;YAAM,IAAI,EAAC,MAAX;YAAkB,IAAI,EAAC;YANzB,CADF;;KAzBN,CADF;GADuB,EAuCvB,CAACd,OAAD,EAAUE,WAAV,CAvCuB,CAAzB;EA0CA,oBAAOY,kFAAGX,SAAH,CAAP;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Toolbar/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const Button = styled.button`\n height: 40px;\n width: 40px;\n border: none;\n background-color: transparent;\n cursor: pointer;\n position: relative;\n outline: none;\n &:hover:not(:focus) {\n background-color: ${({ theme }) => theme.colors.brand[700]};\n outline: none;\n }\n &:focus {\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 4px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 4px;\n }\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: 2px;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n"],"names":["Button","styled","button","theme","colors","brand","neutral"],"mappings":";;;;;;;;;;IAEaA,MAAM,gBAAGC,0BAAM,CAACC,MAAV;AAAA;AAAA,icASK;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CATL,EAoBO;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CApBP,EA+BO;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CA/BP;;;;"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Toolbar/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const Button = styled.button`\n height: 40px;\n width: 40px;\n border: none;\n background-color: transparent;\n cursor: pointer;\n position: relative;\n outline: none;\n &:hover:not(:focus) {\n background-color: ${({ theme }) => theme.colors.brand[700]};\n outline: none;\n }\n &:focus {\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 4px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 4px;\n }\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: 2px;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n"],"names":["Button","styled","button","theme","colors","brand","neutral"],"mappings":";;;;;;;;;;IAEaA,MAAM,gBAAGC,0BAAM,CAACC,MAAV;EAAA;AAAA,icASK;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CATL,EAoBO;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CApBP,EA+BO;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CA/BP;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useGetPropsWithDefaults.js","sources":["../../../src/config/useGetPropsWithDefaults.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport { useMemo } from 'react';\nimport type { GlobalHeaderPropsT } from '../index.d';\nimport { defaultProps } from '../defaultProps';\n\nexport const useGetPropsWithDefaults = (props: GlobalHeaderPropsT): GlobalHeaderPropsT => {\n const { toolbar, breadcrumb, Logo, LogoWithBrand } = props;\n\n return useMemo(\n () => ({\n ...defaultProps,\n ...props,\n }),\n [toolbar, breadcrumb, Logo, LogoWithBrand],\n );\n};\n"],"names":["useGetPropsWithDefaults","props","toolbar","breadcrumb","Logo","LogoWithBrand","useMemo","defaultProps"],"mappings":";;;;;;;;;;;;;;;IAKaA,uBAAuB,GAAG,SAA1BA,uBAA0B,CAACC,KAAD,EAAmD;AACxF,MAAQC,OAAR,GAAqDD,KAArD,CAAQC,OAAR;AAAA,MAAiBC,UAAjB,GAAqDF,KAArD,CAAiBE,UAAjB;AAAA,MAA6BC,IAA7B,GAAqDH,KAArD,CAA6BG,IAA7B;AAAA,MAAmCC,aAAnC,GAAqDJ,KAArD,CAAmCI,aAAnC;AAEA,SAAOC,aAAO,CACZ;AAAA,2CACKC,yBADL,GAEKN,KAFL;AAAA,GADY,EAKZ,CAACC,OAAD,EAAUC,UAAV,EAAsBC,IAAtB,EAA4BC,aAA5B,CALY,CAAd;AAOD;;;;"}
1
+ {"version":3,"file":"useGetPropsWithDefaults.js","sources":["../../../src/config/useGetPropsWithDefaults.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport { useMemo } from 'react';\nimport type { GlobalHeaderPropsT } from '../index.d';\nimport { defaultProps } from '../defaultProps';\n\nexport const useGetPropsWithDefaults = (props: GlobalHeaderPropsT): GlobalHeaderPropsT => {\n const { toolbar, breadcrumb, Logo, LogoWithBrand } = props;\n\n return useMemo(\n () => ({\n ...defaultProps,\n ...props,\n }),\n [toolbar, breadcrumb, Logo, LogoWithBrand],\n );\n};\n"],"names":["useGetPropsWithDefaults","props","toolbar","breadcrumb","Logo","LogoWithBrand","useMemo","defaultProps"],"mappings":";;;;;;;;;;;;;;;IAKaA,uBAAuB,GAAG,SAA1BA,uBAA0B,CAACC,KAAD,EAAmD;EACxF,IAAQC,OAAR,GAAqDD,KAArD,CAAQC,OAAR;MAAiBC,UAAjB,GAAqDF,KAArD,CAAiBE,UAAjB;MAA6BC,IAA7B,GAAqDH,KAArD,CAA6BG,IAA7B;MAAmCC,aAAnC,GAAqDJ,KAArD,CAAmCI,aAAnC;EAEA,OAAOC,aAAO,CACZ;IAAA,uCACKC,yBADL,GAEKN,KAFL;GADY,EAKZ,CAACC,OAAD,EAAUC,UAAV,EAAsBC,IAAtB,EAA4BC,aAA5B,CALY,CAAd;AAOD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useGlobalHeader.js","sources":["../../../src/config/useGlobalHeader.tsx"],"sourcesContent":["import React, { useState, useMemo } from 'react';\nimport { uid } from 'uid';\nimport type { ContextT, GlobalHeaderPropsT } from '../index.d';\nimport { useGetPropsWithDefaults } from './useGetPropsWithDefaults';\n\nexport const useGlobalHeader = (props: GlobalHeaderPropsT): ContextT => {\n const [showIconOnly, setShowIconOnly] = useState<boolean>(false);\n\n const instanceUID = useMemo(() => uid(5), []);\n\n const globalHeaderToolbarGrid = useMemo(() => new Array(props?.toolbar?.length ?? 0).fill('1fr'), [props.toolbar]);\n const globalHeaderBreadcrumbGrid = useMemo(\n () => ['auto', ...new Array(props?.breadcrumb?.length ?? 0).fill('auto'), '1fr'],\n [props.breadcrumb],\n );\n\n const propsWithDefaults = useGetPropsWithDefaults(props);\n\n const ctx = React.useMemo(\n () => ({\n props: propsWithDefaults,\n showIconOnly,\n setShowIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n globalHeaderBreadcrumbGrid,\n }),\n [propsWithDefaults, showIconOnly, instanceUID, globalHeaderToolbarGrid, globalHeaderBreadcrumbGrid],\n );\n\n return ctx;\n};\n"],"names":["useGlobalHeader","props","useState","showIconOnly","setShowIconOnly","instanceUID","useMemo","uid","globalHeaderToolbarGrid","Array","toolbar","length","fill","globalHeaderBreadcrumbGrid","breadcrumb","propsWithDefaults","useGetPropsWithDefaults","ctx","React"],"mappings":";;;;;;;;;;;;;;;;;;IAKaA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAyC;AACtE,kBAAwCC,cAAQ,CAAU,KA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useGlobalHeader.tsx"],"sourcesContent":["import React, { useState, useMemo } from 'react';\nimport { uid } from 'uid';\nimport type { ContextT, GlobalHeaderPropsT } from '../index.d';\nimport { useGetPropsWithDefaults } from './useGetPropsWithDefaults';\n\nexport const useGlobalHeader = (props: GlobalHeaderPropsT): ContextT => {\n const [showIconOnly, setShowIconOnly] = useState<boolean>(false);\n\n const instanceUID = useMemo(() => uid(5), []);\n\n const globalHeaderToolbarGrid = useMemo(() => new Array(props?.toolbar?.length ?? 0).fill('1fr'), [props.toolbar]);\n const globalHeaderBreadcrumbGrid = useMemo(\n () => ['auto', ...new Array(props?.breadcrumb?.length ?? 0).fill('auto'), '1fr'],\n [props.breadcrumb],\n );\n\n const propsWithDefaults = useGetPropsWithDefaults(props);\n\n const ctx = React.useMemo(\n () => ({\n props: propsWithDefaults,\n showIconOnly,\n setShowIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n globalHeaderBreadcrumbGrid,\n }),\n [propsWithDefaults, showIconOnly, instanceUID, globalHeaderToolbarGrid, globalHeaderBreadcrumbGrid],\n );\n\n return ctx;\n};\n"],"names":["useGlobalHeader","props","useState","showIconOnly","setShowIconOnly","instanceUID","useMemo","uid","globalHeaderToolbarGrid","Array","toolbar","length","fill","globalHeaderBreadcrumbGrid","breadcrumb","propsWithDefaults","useGetPropsWithDefaults","ctx","React"],"mappings":";;;;;;;;;;;;;;;;;;IAKaA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAyC;EACtE,gBAAwCC,cAAQ,CAAU,KAAV,CAAhD;;MAAOC,YAAP;MAAqBC,eAArB;;EAEA,IAAMC,WAAW,GAAGC,aAAO,CAAC;IAAA,OAAMC,OAAG,CAAC,CAAD,CAAT;GAAD,EAAe,EAAf,CAA3B;EAEA,IAAMC,uBAAuB,GAAGF,aAAO,CAAC;IAAA;;IAAA,OAAM,IAAIG,KAAJ,0BAAUR,KAAV,aAAUA,KAAV,yCAAUA,KAAK,CAAES,OAAjB,mDAAU,eAAgBC,MAA1B,yEAAoC,CAApC,EAAuCC,IAAvC,CAA4C,KAA5C,CAAN;GAAD,EAA2D,CAACX,KAAK,CAACS,OAAP,CAA3D,CAAvC;EACA,IAAMG,0BAA0B,GAAGP,aAAO,CACxC;IAAA;;IAAA,QAAO,MAAP,gDAAkB,IAAIG,KAAJ,0BAAUR,KAAV,aAAUA,KAAV,4CAAUA,KAAK,CAAEa,UAAjB,sDAAU,kBAAmBH,MAA7B,yEAAuC,CAAvC,EAA0CC,IAA1C,CAA+C,MAA/C,CAAlB,IAA0E,KAA1E;GADwC,EAExC,CAACX,KAAK,CAACa,UAAP,CAFwC,CAA1C;EAKA,IAAMC,iBAAiB,GAAGC,sDAAuB,CAACf,KAAD,CAAjD;EAEA,IAAMgB,GAAG,GAAGC,yBAAK,CAACZ,OAAN,CACV;IAAA,OAAO;MACLL,KAAK,EAAEc,iBADF;MAELZ,YAAY,EAAZA,YAFK;MAGLC,eAAe,EAAfA,eAHK;MAILC,WAAW,EAAXA,WAJK;MAKLG,uBAAuB,EAAvBA,uBALK;MAMLK,0BAA0B,EAA1BA;KANF;GADU,EASV,CAACE,iBAAD,EAAoBZ,YAApB,EAAkCE,WAAlC,EAA+CG,uBAA/C,EAAwEK,0BAAxE,CATU,CAAZ;EAYA,OAAOI,GAAP;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useValidateProps.js","sources":["../../../src/config/useValidateProps.tsx"],"sourcesContent":["import { AppPickerProps, GlobalHeaderPropsT, PopupPropsT, ToolbarItemT } from '../index.d';\nimport {\n throwToolbarPopupItemError,\n throwToolbarAppPickerItemError,\n throwToolbarItemGenericError,\n throwLogoError,\n throwBreadcrumbItemError,\n isValidToolbarType,\n isObject,\n} from './validateHelpers';\n\nconst validatePopupItem = (componentProps: PopupPropsT): void => {\n if (componentProps.options && !Array.isArray(componentProps.options)) {\n throwToolbarPopupItemError('options', componentProps.options);\n }\n if (componentProps.closeOnClick && typeof componentProps.closeOnClick !== 'boolean') {\n throwToolbarPopupItemError('closeOnClick', componentProps.closeOnClick);\n }\n};\n\nconst validateAppPickerItem = (componentProps: AppPickerProps): void => {\n if (componentProps.apps && !Array.isArray(componentProps.apps)) {\n throwToolbarAppPickerItemError('apps', componentProps.apps);\n }\n if (componentProps.customApps && !Array.isArray(componentProps.customApps)) {\n throwToolbarAppPickerItemError('customApps', componentProps.customApps);\n }\n if (componentProps.sectionTitle && typeof componentProps.sectionTitle !== 'string') {\n throwToolbarAppPickerItemError('sectionTitle', componentProps.sectionTitle);\n }\n if (componentProps.customSectionTitle && typeof componentProps.customSectionTitle !== 'string') {\n throwToolbarAppPickerItemError('customSectionTitle', componentProps.customSectionTitle);\n }\n};\n\nconst validateGenericToolbarItem = (item: ToolbarItemT): void => {\n if (item.label && typeof item.label !== 'string') {\n throwToolbarItemGenericError('label', item.label);\n }\n if (item.onClick && typeof item.onClick !== 'function') {\n throwToolbarItemGenericError('onClick', item.onClick);\n }\n if (item.Icon && typeof item.Icon !== 'function') {\n if (item.type === 'ds-app-picker') return;\n throwToolbarItemGenericError('Icon', item.Icon);\n }\n};\n\nexport const useValidateProps = (props: GlobalHeaderPropsT): void => {\n const { breadcrumb, toolbar, Logo, LogoWithBrand } = props;\n\n if (Logo && typeof Logo !== 'function') {\n throwLogoError('Logo', Logo);\n }\n\n if (LogoWithBrand && typeof LogoWithBrand !== 'function') {\n throwLogoError('LogoWithBrand', LogoWithBrand);\n }\n\n breadcrumb?.forEach((breadcrumbItem) => {\n if (breadcrumbItem.label && typeof breadcrumbItem.label !== 'string') {\n throwBreadcrumbItemError('label', breadcrumbItem.label);\n }\n if (breadcrumbItem.onClick && typeof breadcrumbItem.onClick !== 'function') {\n throwBreadcrumbItemError('onClick', breadcrumbItem.onClick);\n }\n if (breadcrumbItem.hasNext && typeof breadcrumbItem.hasNext !== 'boolean') {\n throwBreadcrumbItemError('hasNext', breadcrumbItem.hasNext);\n }\n if (breadcrumbItem.isSelected && typeof breadcrumbItem.isSelected !== 'boolean') {\n throwBreadcrumbItemError('isSelected', breadcrumbItem.isSelected);\n }\n });\n\n toolbar?.forEach((toolbarItem) => {\n validateGenericToolbarItem(toolbarItem);\n if (toolbarItem.type) {\n if (!isValidToolbarType(toolbarItem.type)) {\n throwToolbarItemGenericError('type', toolbarItem.type);\n }\n if (toolbarItem.componentProps && !isObject(toolbarItem.componentProps)) {\n throwToolbarItemGenericError('componentProps', toolbarItem.componentProps);\n }\n if (toolbarItem.type === 'ds-popup-menu') {\n validatePopupItem(toolbarItem.componentProps as PopupPropsT);\n } else {\n validateAppPickerItem(toolbarItem.componentProps as AppPickerProps);\n }\n }\n });\n};\n"],"names":["validatePopupItem","componentProps","options","Array","isArray","throwToolbarPopupItemError","closeOnClick","validateAppPickerItem","apps","throwToolbarAppPickerItemError","customApps","sectionTitle","customSectionTitle","validateGenericToolbarItem","item","label","throwToolbarItemGenericError","onClick","Icon","type","useValidateProps","props","breadcrumb","toolbar","Logo","LogoWithBrand","throwLogoError","forEach","breadcrumbItem","throwBreadcrumbItemError","hasNext","isSelected","toolbarItem","isValidToolbarType","isObject"],"mappings":";;;;;;;AAWA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,cAAD,EAAuC;AAC/D,MAAIA,cAAc,CAACC,OAAf,IAA0B,CAACC,KAAK,CAACC,OAAN,CAAcH,cAAc,CAACC,OAA7B,CAA/B,EAAsE;AACpEG,IAAAA,iDAA0B,CAAC,SAAD,EAAYJ,cAAc,CAACC,OAA3B,CAA1B;AACD;;AACD,MAAID,cAAc,CAACK,YAAf,IAA+B,OAAOL,cAAc,CAACK,YAAtB,KAAuC,SAA1E,EAAqF;AACnFD,IAAAA,iDAA0B,CAAC,cAAD,EAAiBJ,cAAc,CAACK,YAAhC,CAA1B;AACD;AACF,CAPD;;AASA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACN,cAAD,EAA0C;AACtE,MAAIA,cAAc,CAACO,IAAf,IAAuB,CAACL,KAAK,CAACC,OAAN,CAAc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;AACD;AACF,GAbD;AAeAR,EAAAA,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAEI,OAAT,CAAiB,UAACK,WAAD,EAAiB;AAChCnB,IAAAA,0BAA0B,CAACmB,WAAD,CAA1B;;AACA,QAAIA,WAAW,CAACb,IAAhB,EAAsB;AACpB,UAAI,CAACc,yCAAkB,CAACD,WAAW,CAACb,IAAb,CAAvB,EAA2C;AACzCH,QAAAA,mDAA4B,CAAC,MAAD,EAASgB,WAAW,CAACb,IAArB,CAA5B;AACD;;AACD,UAAIa,WAAW,CAAC/B,cAAZ,IAA8B,CAACiC,+BAAQ,CAACF,WAAW,CAAC/B,cAAb,CAA3C,EAAyE;AACvEe,QAAAA,mDAA4B,CAAC,gBAAD,EAAmBgB,WAAW,CAAC/B,cAA/B,CAA5B;AACD;;AACD,UAAI+B,WAAW,CAACb,IAAZ,KAAqB,eAAzB,EAA0C;AACxCnB,QAAAA,iBAAiB,CAACgC,WAAW,CAAC/B,cAAb,CAAjB;AACD,OAFD,MAEO;AACLM,QAAAA,qBAAqB,CAACyB,WAAW,CAAC/B,cAAb,CAArB;AACD;AACF;AACF,GAfD;AAgBD;;;;"}
1
+ {"version":3,"file":"useValidateProps.js","sources":["../../../src/config/useValidateProps.tsx"],"sourcesContent":["import { AppPickerProps, GlobalHeaderPropsT, PopupPropsT, ToolbarItemT } from '../index.d';\nimport {\n throwToolbarPopupItemError,\n throwToolbarAppPickerItemError,\n throwToolbarItemGenericError,\n throwLogoError,\n throwBreadcrumbItemError,\n isValidToolbarType,\n isObject,\n} from './validateHelpers';\n\nconst validatePopupItem = (componentProps: PopupPropsT): void => {\n if (componentProps.options && !Array.isArray(componentProps.options)) {\n throwToolbarPopupItemError('options', componentProps.options);\n }\n if (componentProps.closeOnClick && typeof componentProps.closeOnClick !== 'boolean') {\n throwToolbarPopupItemError('closeOnClick', componentProps.closeOnClick);\n }\n};\n\nconst validateAppPickerItem = (componentProps: AppPickerProps): void => {\n if (componentProps.apps && !Array.isArray(componentProps.apps)) {\n throwToolbarAppPickerItemError('apps', componentProps.apps);\n }\n if (componentProps.customApps && !Array.isArray(componentProps.customApps)) {\n throwToolbarAppPickerItemError('customApps', componentProps.customApps);\n }\n if (componentProps.sectionTitle && typeof componentProps.sectionTitle !== 'string') {\n throwToolbarAppPickerItemError('sectionTitle', componentProps.sectionTitle);\n }\n if (componentProps.customSectionTitle && typeof componentProps.customSectionTitle !== 'string') {\n throwToolbarAppPickerItemError('customSectionTitle', componentProps.customSectionTitle);\n }\n};\n\nconst validateGenericToolbarItem = (item: ToolbarItemT): void => {\n if (item.label && typeof item.label !== 'string') {\n throwToolbarItemGenericError('label', item.label);\n }\n if (item.onClick && typeof item.onClick !== 'function') {\n throwToolbarItemGenericError('onClick', item.onClick);\n }\n if (item.Icon && typeof item.Icon !== 'function') {\n if (item.type === 'ds-app-picker') return;\n throwToolbarItemGenericError('Icon', item.Icon);\n }\n};\n\nexport const useValidateProps = (props: GlobalHeaderPropsT): void => {\n const { breadcrumb, toolbar, Logo, LogoWithBrand } = props;\n\n if (Logo && typeof Logo !== 'function') {\n throwLogoError('Logo', Logo);\n }\n\n if (LogoWithBrand && typeof LogoWithBrand !== 'function') {\n throwLogoError('LogoWithBrand', LogoWithBrand);\n }\n\n breadcrumb?.forEach((breadcrumbItem) => {\n if (breadcrumbItem.label && typeof breadcrumbItem.label !== 'string') {\n throwBreadcrumbItemError('label', breadcrumbItem.label);\n }\n if (breadcrumbItem.onClick && typeof breadcrumbItem.onClick !== 'function') {\n throwBreadcrumbItemError('onClick', breadcrumbItem.onClick);\n }\n if (breadcrumbItem.hasNext && typeof breadcrumbItem.hasNext !== 'boolean') {\n throwBreadcrumbItemError('hasNext', breadcrumbItem.hasNext);\n }\n if (breadcrumbItem.isSelected && typeof breadcrumbItem.isSelected !== 'boolean') {\n throwBreadcrumbItemError('isSelected', breadcrumbItem.isSelected);\n }\n });\n\n toolbar?.forEach((toolbarItem) => {\n validateGenericToolbarItem(toolbarItem);\n if (toolbarItem.type) {\n if (!isValidToolbarType(toolbarItem.type)) {\n throwToolbarItemGenericError('type', toolbarItem.type);\n }\n if (toolbarItem.componentProps && !isObject(toolbarItem.componentProps)) {\n throwToolbarItemGenericError('componentProps', toolbarItem.componentProps);\n }\n if (toolbarItem.type === 'ds-popup-menu') {\n validatePopupItem(toolbarItem.componentProps as PopupPropsT);\n } else {\n validateAppPickerItem(toolbarItem.componentProps as AppPickerProps);\n }\n }\n });\n};\n"],"names":["validatePopupItem","componentProps","options","Array","isArray","throwToolbarPopupItemError","closeOnClick","validateAppPickerItem","apps","throwToolbarAppPickerItemError","customApps","sectionTitle","customSectionTitle","validateGenericToolbarItem","item","label","throwToolbarItemGenericError","onClick","Icon","type","useValidateProps","props","breadcrumb","toolbar","Logo","LogoWithBrand","throwLogoError","forEach","breadcrumbItem","throwBreadcrumbItemError","hasNext","isSelected","toolbarItem","isValidToolbarType","isObject"],"mappings":";;;;;;;AAWA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,cAAD,EAAuC;EAC/D,IAAIA,cAAc,CAACC,OAAf,IAA0B,CAACC,KAAK,CAACC,OAAN,CAAcH,cAAc,CAACC,OAA7B,CAA/B,EAAsE;IACpEG,iDAA0B,CAAC,SAAD,EAAYJ,cAAc,CAACC,OAA3B,CAA1B;;;EAEF,IAAID,cAAc,CAACK,YAAf,IAA+B,OAAOL,cAAc,CAACK,YAAtB,KAAuC,SAA1E,EAAqF;IACnFD,iDAA0B,CAAC,cAAD,EAAiBJ,cAAc,CAACK,YAAhC,CAA1B;;AAEH,CAPD;;AASA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACN,cAAD,EAA0C;EACtE,IAAIA,cAAc,CAACO,IAAf,IAAuB,CAACL,KAAK,CAACC,OAAN,CAAcH,cAAc,CAACO,IAA7B,CAA5B,EAAgE;IAC9DC,qDAA8B,CAAC,MAAD,EAASR,cAAc,CAACO,IAAxB,CAA9B;;;EAEF,IAAIP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AC,MAAD,EAASgB,WAAW,CAACb,IAArB,CAA5B;;;MAEF,IAAIa,WAAW,CAAC/B,cAAZ,IAA8B,CAACiC,+BAAQ,CAACF,WAAW,CAAC/B,cAAb,CAA3C,EAAyE;QACvEe,mDAA4B,CAAC,gBAAD,EAAmBgB,WAAW,CAAC/B,cAA/B,CAA5B;;;MAEF,IAAI+B,WAAW,CAACb,IAAZ,KAAqB,eAAzB,EAA0C;QACxCnB,iBAAiB,CAACgC,WAAW,CAAC/B,cAAb,CAAjB;OADF,MAEO;QACLM,qBAAqB,CAACyB,WAAW,CAAC/B,cAAb,CAArB;;;GAZN;AAgBD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"validateHelpers.js","sources":["../../../src/config/validateHelpers.tsx"],"sourcesContent":["export const breadcrumbProps = {\n label: 'string',\n onClick: 'function',\n hasNext: 'boolean',\n isSelected: 'boolean',\n};\n\nexport const toolbarProps = {\n label: 'string',\n type: '\"ds-app-picker\" or \"ds-popup-menu\"',\n componentProps: 'object',\n Icon: 'react component',\n onClick: 'function',\n options: 'array',\n closeOnClick: 'boolean',\n apps: 'array',\n customApps: 'array',\n sectionTitle: 'string',\n customSectionTitle: 'string',\n};\n\nexport const isObject = (obj: unknown): boolean => typeof obj === 'object' && !!obj && !Array.isArray(obj);\n\nexport const getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nexport const isValidToolbarType = (string: unknown): boolean =>\n string === 'ds-app-picker' || string === 'ds-popup-menu';\n\nexport const throwBreadcrumbItemError = (validPropKey: keyof typeof breadcrumbProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a breadcrumb item, please provide a valid type.\n\n Received: ${invalidProp} (${typeof invalidProp})\n Expected: (${breadcrumbProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarPopupItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-popup-menu \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarAppPickerItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-app-picker \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarItemGenericError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwLogoError = (validPropKey: string, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a global header, \n remember to provide both Logo and LogoWithBrand properties with a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)}).\n Expected: (react component).\n `,\n );\n};\n"],"names":["breadcrumbProps","label","onClick","hasNext","isSelected","toolbarProps","type","componentProps","Icon","options","closeOnClick","apps","customApps","sectionTitle","customSectionTitle","isObject","obj","_typeof","Array","isArray","getVariableType","arg","undefined","isValidToolbarType","string","throwBreadcrumbItemError","validPropKey","invalidProp","Error","throwToolbarPopupItemError","throwToolbarAppPickerItemError","throwToolbarItemGenericError","throwLogoError"],"mappings":";;;;;;;;;;IAAaA,eAAe,GAAG;AAC7BC,EAAAA,KAAK,EAAE,QADsB;AAE7BC,EAAAA,OAAO,EAAE,UAFoB;AAG7BC,EAAAA,OAAO,EAAE,SAHoB;AAI7BC,EAAAA,UAAU,EAAE;AAJiB;IAOlBC,YAAY,GAAG;AAC1BJ,EAAAA,KAAK,EAAE,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,WAAD,CAJrC,6BAKOtB,YAAY,CAACqB,YAAD,CALnB,WAAN;AAQD;IAEYI,8BAA8B,GAAG,SAAjCA,8BAAiC,CAACJ,YAAD,EAA0CC,WAA1C,EAAyE;AACrH,QAAM,IAAIC,KAAJ,gDACmCF,YADnC,mIAIMC,WAJN,eAIsBP,eAAe,CAACO,WAAD,CAJrC,6BAKOtB,YAAY,CAACqB,YAAD,CALnB,WAAN;AAQD;IAEYK,4BAA4B,GAAG,SAA/BA,4BAA+B,CAACL,YAAD,EAA0CC,WAA1C,EAAyE;AACnH,QAAM,IAAIC,KAAJ,gDACmCF,YADnC,yFAGMC,WAHN,eAGsBP,eAAe,CAACO,WAAD,CAHrC,6BAIOtB,YAAY,CAACqB,YAAD,CAJnB,WAAN;AAOD;IAEYM,cAAc,GAAG,SAAjBA,cAAiB,CAACN,YAAD,EAAuBC,WAAvB,EAAsD;AAClF,QAAM,IAAIC,KAAJ,gDACmCF,YADnC,iJAIMC,WAJN,eAIsBP,eAAe,CAACO,WAAD,CAJrC,4CAAN;AAQD;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"validateHelpers.js","sources":["../../../src/config/validateHelpers.tsx"],"sourcesContent":["export const breadcrumbProps = {\n label: 'string',\n onClick: 'function',\n hasNext: 'boolean',\n isSelected: 'boolean',\n};\n\nexport const toolbarProps = {\n label: 'string',\n type: '\"ds-app-picker\" or \"ds-popup-menu\"',\n componentProps: 'object',\n Icon: 'react component',\n onClick: 'function',\n options: 'array',\n closeOnClick: 'boolean',\n apps: 'array',\n customApps: 'array',\n sectionTitle: 'string',\n customSectionTitle: 'string',\n};\n\nexport const isObject = (obj: unknown): boolean => typeof obj === 'object' && !!obj && !Array.isArray(obj);\n\nexport const getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nexport const isValidToolbarType = (string: unknown): boolean =>\n string === 'ds-app-picker' || string === 'ds-popup-menu';\n\nexport const throwBreadcrumbItemError = (validPropKey: keyof typeof breadcrumbProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a breadcrumb item, please provide a valid type.\n\n Received: ${invalidProp} (${typeof invalidProp})\n Expected: (${breadcrumbProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarPopupItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-popup-menu \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarAppPickerItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-app-picker \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarItemGenericError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwLogoError = (validPropKey: string, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a global header, \n remember to provide both Logo and LogoWithBrand properties with a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)}).\n Expected: (react component).\n `,\n );\n};\n"],"names":["breadcrumbProps","label","onClick","hasNext","isSelected","toolbarProps","type","componentProps","Icon","options","closeOnClick","apps","customApps","sectionTitle","customSectionTitle","isObject","obj","_typeof","Array","isArray","getVariableType","arg","undefined","isValidToolbarType","string","throwBreadcrumbItemError","validPropKey","invalidProp","Error","throwToolbarPopupItemError","throwToolbarAppP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;IAEYG,0BAA0B,GAAG,SAA7BA,0BAA6B,CAACH,YAAD,EAA0CC,WAA1C,EAAyE;EACjH,MAAM,IAAIC,KAAJ,gDACmCF,YADnC,mIAIMC,WAJN,eAIsBP,eAAe,CAACO,WAAD,CAJrC,6BAKOtB,YAAY,CAACqB,YAAD,CALnB,WAAN;AAQD;IAEYI,8BAA8B,GAAG,SAAjCA,8BAAiC,CAACJ,YAAD,EAA0CC,WAA1C,EAAyE;EACrH,MAAM,IAAIC,KAAJ,gDACmCF,YADnC,mIAIMC,WAJN,eAIsBP,eAAe,CAACO,WAAD,CAJrC,6BAKOtB,YAAY,CAACqB,YAAD,CALnB,WAAN;AAQD;IAEYK,4BAA4B,GAAG,SAA/BA,4BAA+B,CAACL,YAAD,EAA0CC,WAA1C,EAAyE;EACnH,MAAM,IAAIC,KAAJ,gDACmCF,YADnC,yFAGMC,WAHN,eAGsBP,eAAe,CAACO,WAAD,CAHrC,6BAIOtB,YAAY,CAACqB,YAAD,CAJnB,WAAN;AAOD;IAEYM,cAAc,GAAG,SAAjBA,cAAiB,CAACN,YAAD,EAAuBC,WAAvB,EAAsD;EAClF,MAAM,IAAIC,KAAJ,gDACmCF,YADnC,iJAIMC,WAJN,eAIsBP,eAAe,CAACO,WAAD,CAJrC,4CAAN;AAQD;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["import type { GlobalHeaderPropsT } from './index.d';\n\nconst emptyComp = () => null;\n\nexport const defaultProps: GlobalHeaderPropsT = {\n breadcrumb: [],\n toolbar: [],\n LogoWithBrand: emptyComp,\n Logo: emptyComp,\n};\n"],"names":["emptyComp","defaultProps","breadcrumb","toolbar","LogoWithBrand","Logo"],"mappings":";;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY;AAAA,SAAM,IAAN;AAAA,CAAlB;;IAEaC,YAAgC,GAAG;AAC9CC,EAAAA,UAAU,EAAE,EADkC;AAE9CC,EAAAA,OAAO,EAAE,EAFqC;AAG9CC,EAAAA,aAAa,EAAEJ,SAH+B;AAI9CK,EAAAA,IAAI,EAAEL;AAJwC;;;;"}
1
+ {"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["import type { GlobalHeaderPropsT } from './index.d';\n\nconst emptyComp = () => null;\n\nexport const defaultProps: GlobalHeaderPropsT = {\n breadcrumb: [],\n toolbar: [],\n LogoWithBrand: emptyComp,\n Logo: emptyComp,\n};\n"],"names":["emptyComp","defaultProps","breadcrumb","toolbar","LogoWithBrand","Logo"],"mappings":";;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY;EAAA,OAAM,IAAN;AAAA,CAAlB;;IAEaC,YAAgC,GAAG;EAC9CC,UAAU,EAAE,EADkC;EAE9CC,OAAO,EAAE,EAFqC;EAG9CC,aAAa,EAAEJ,SAH+B;EAI9CK,IAAI,EAAEL;AAJwC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AppPicker.js","sources":["../../../../src/outOfTheBox/AppPicker/AppPicker.tsx"],"sourcesContent":["import React, { useState, useRef, useCallback, useMemo } from 'react';\nimport { DSAppPicker } from '@elliemae/ds-app-picker';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { Button } from '../../components/Toolbar/styles';\n\ntype AppPickerProps = React.ComponentProps<typeof DSAppPicker>;\n\nexport const AppPicker = ({\n label,\n apps,\n icon,\n customApps,\n sectionTitle,\n customSectionTitle,\n actionRef,\n isOpen: userIsOpen,\n onKeyDown: userOnKeyDown,\n onClickOutside: userOnClickOutside,\n renderTrigger: userRenderTrigger,\n onClose,\n triggerRef,\n triggerOnClick,\n}: AppPickerProps & {\n label: string;\n triggerOnClick?: React.MouseEventHandler;\n}): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n const handleTriggerKeyDown: React.KeyboardEventHandler = useCallback((e) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n }, []);\n\n const handleAppPickerOnKeyDown: AppPickerProps['onKeyDown'] = useCallback((e) => {\n if (e.code === 'Escape') {\n setIsOpen(false);\n buttonRef?.current?.focus();\n }\n }, []);\n\n const handleOnClickOutside: AppPickerProps['onClickOutside'] = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleOnClick: React.MouseEventHandler = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const renderTrigger: AppPickerProps['renderTrigger'] = useMemo(\n () =>\n ({ ref }) =>\n (\n <div ref={ref}>\n <Button\n onClick={triggerOnClick ?? handleOnClick}\n onKeyDown={handleTriggerKeyDown}\n ref={mergeRefs(buttonRef, triggerRef)}\n title={label}\n data-testid=\"gh-toolbar-item\"\n >\n <MenuPicker fill=\"#FFF\" size=\"m\" />\n </Button>\n </div>\n ),\n [triggerOnClick, handleOnClick, handleTriggerKeyDown, label],\n );\n\n return (\n <DSAppPicker\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n icon={icon}\n onKeyDown={userOnKeyDown ?? handleAppPickerOnKeyDown}\n actionRef={actionRef}\n onClickOutside={userOnClickOutside ?? handleOnClickOutside}\n renderTrigger={userRenderTrigger ?? renderTrigger}\n isOpen={userIsOpen ?? isOpen}\n onClose={onClose}\n triggerRef={triggerRef}\n />\n );\n};\n"],"names":["AppPicker","label","apps","icon","customApps","sectionTitle","customSectionTitle","actionRef","userIsOpen","isOpen","userOnKeyDown","onKeyDown","userOnClickOutside","onClickOutside","userRenderTrigger","renderTrigger","onClose","triggerRef","triggerOnClick","useState","setIsOpen","buttonRef","useRef","handleTriggerKeyDown","useCallback","e","code","handleAppPickerOnKeyDown","current","focus","handleOnClickOutside","handleOnClick","useMemo","ref","React","Button","mergeRefs","MenuPicker","DSAppPicker"],"mappings":";;;;;;;;;;;;;;;;;IAQaA,SAAS,GAAG,SAAZA,SAAY,OAkBN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,EAAEP,UAAF,aAAEA,UAAF,cAAEA,UAAF,GAAgBC,MAVxB;AAWE,IAAA,OAAO,EAAEO,OAXX;AAYE,IAAA,UAAU,EAAEC;AAZd,IADF;AAgBD;;;;"}
1
+ {"version":3,"file":"AppPicker.js","sources":["../../../../src/outOfTheBox/AppPicker/AppPicker.tsx"],"sourcesContent":["import React, { useState, useRef, useCallback, useMemo } from 'react';\nimport { DSAppPicker } from '@elliemae/ds-app-picker';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { Button } from '../../components/Toolbar/styles';\n\ntype AppPickerProps = React.ComponentProps<typeof DSAppPicker>;\n\nexport const AppPicker = ({\n label,\n apps,\n icon,\n customApps,\n sectionTitle,\n customSectionTitle,\n actionRef,\n isOpen: userIsOpen,\n onKeyDown: userOnKeyDown,\n onClickOutside: userOnClickOutside,\n renderTrigger: userRenderTrigger,\n onClose,\n triggerRef,\n triggerOnClick,\n}: AppPickerProps & {\n label: string;\n triggerOnClick?: React.MouseEventHandler;\n}): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n const handleTriggerKeyDown: React.KeyboardEventHandler = useCallback((e) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n }, []);\n\n const handleAppPickerOnKeyDown: AppPickerProps['onKeyDown'] = useCallback((e) => {\n if (e.code === 'Escape') {\n setIsOpen(false);\n buttonRef?.current?.focus();\n }\n }, []);\n\n const handleOnClickOutside: AppPickerProps['onClickOutside'] = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleOnClick: React.MouseEventHandler = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const renderTrigger: AppPickerProps['renderTrigger'] = useMemo(\n () =>\n ({ ref }) =>\n (\n <div ref={ref}>\n <Button\n onClick={triggerOnClick ?? handleOnClick}\n onKeyDown={handleTriggerKeyDown}\n ref={mergeRefs(buttonRef, triggerRef)}\n title={label}\n data-testid=\"gh-toolbar-item\"\n >\n <MenuPicker fill=\"#FFF\" size=\"m\" />\n </Button>\n </div>\n ),\n [triggerOnClick, handleOnClick, handleTriggerKeyDown, label],\n );\n\n return (\n <DSAppPicker\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n icon={icon}\n onKeyDown={userOnKeyDown ?? handleAppPickerOnKeyDown}\n actionRef={actionRef}\n onClickOutside={userOnClickOutside ?? handleOnClickOutside}\n renderTrigger={userRenderTrigger ?? renderTrigger}\n isOpen={userIsOpen ?? isOpen}\n onClose={onClose}\n triggerRef={triggerRef}\n />\n );\n};\n"],"names":["AppPicker","label","apps","icon","customApps","sectionTitle","customSectionTitle","actionRef","userIsOpen","isOpen","userOnKeyDown","onKeyDown","userOnClickOutside","onClickOutside","userRenderTrigger","renderTrigger","onClose","triggerRef","triggerOnClick","useState","setIsOpen","buttonRef","useRef","handleTriggerKeyDown","useCallback","e","code","handleAppPickerOnKeyDown","current","focus","handleOnClickOutside","handleOnClick","useMemo","ref","React","Button","mergeRefs","MenuPicker","DSAppPicker"],"mappings":";;;;;;;;;;;;;;;;;IAQaA,SAAS,GAAG,SAAZA,SAAY,OAkBN;EAAA,IAjBjBC,KAiBiB,QAjBjBA,KAiBiB;MAhBjBC,IAgBiB,QAhBjBA,IAgBiB;MAfjBC,IAeiB,QAfjBA,IAeiB;MAdjBC,UAciB,QAdjBA,UAciB;MAbjBC,YAaiB,QAbjBA,YAaiB;MAZjBC,kBAYiB,QAZjBA,kBAYiB;MAXjBC,SAWiB,QAXjBA,SAWiB;MAVTC,UAUS,QAVjBC,MAUiB;MATNC,aASM,QATjBC,SASiB;MARDC,kBAQC,QARjBC,cAQiB;MAPFC,iBAOE,QAPjBC,aAOiB;MANjBC,OAMiB,QANjBA,OAMiB;MALjBC,UAKiB,QALjBA,UAKiB;MAJjBC,cAIiB,QAJjBA,cAIiB;;EACjB,gBAA4BC,cAAQ,CAAU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AD,EAAiBa,aAAjB,EAAgCR,oBAAhC,EAAsDtB,KAAtD,CAhB4D,CAA9D;EAmBA,oBACEiC,wCAACI,uBAAD;IACE,IAAI,EAAEpC,IADR;IAEE,UAAU,EAAEE,UAFd;IAGE,YAAY,EAAEC,YAHhB;IAIE,kBAAkB,EAAEC,kBAJtB;IAKE,IAAI,EAAEH,IALR;IAME,SAAS,EAAEO,aAAF,aAAEA,aAAF,cAAEA,aAAF,GAAmBiB,wBAN9B;IAOE,SAAS,EAAEpB,SAPb;IAQE,cAAc,EAAEK,kBAAF,aAAEA,kBAAF,cAAEA,kBAAF,GAAwBkB,oBARxC;IASE,aAAa,EAAEhB,iBAAF,aAAEA,iBAAF,cAAEA,iBAAF,GAAuBC,aATtC;IAUE,MAAM,EAAEP,UAAF,aAAEA,UAAF,cAAEA,UAAF,GAAgBC,MAVxB;IAWE,OAAO,EAAEO,OAXX;IAYE,UAAU,EAAEC;IAbhB;AAgBD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PopupMenu.js","sources":["../../../../src/outOfTheBox/PopupMenu/PopupMenu.tsx"],"sourcesContent":["import React, { useState, useRef, useCallback, useMemo } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { PopupMenuContent } from './PopupMenuContent';\nimport { Button } from '../../components/Toolbar/styles';\nimport type { PopupPropsT as Props } from '../../index.d';\n\nexport const PopupMenu = ({ Icon, options, closeOnClick, title, onClick }: Props): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const [buttonRef, setButtonRef] = useState<HTMLButtonElement | null>(null);\n\n const handleKeyPress = useCallback((e: React.KeyboardEvent) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n }, []);\n\n const handleOnClose = useCallback(() => {\n setIsOpen(false);\n buttonRef?.focus();\n }, [buttonRef]);\n\n const handleTriggerOnClick = useCallback(\n (e) => {\n setIsOpen(true);\n onClick(e);\n },\n [onClick],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick) handleOnClose();\n }, [closeOnClick, handleOnClose]);\n\n const content = useMemo(\n () => <PopupMenuContent options={options} onItemClick={handleItemClick} onClose={handleOnClose} />,\n [options, handleItemClick, handleOnClose],\n );\n\n return (\n <div>\n <Button\n onClick={handleTriggerOnClick}\n onKeyPress={handleKeyPress}\n title={title}\n ref={setButtonRef}\n data-testid=\"gh-toolbar-item\"\n >\n {Icon && <Icon fill=\"#FFF\" size=\"m\" />}\n </Button>\n <DSPopperJS referenceElement={buttonRef} showPopover={isOpen} closeContextMenu={handleOnClose}>\n {content}\n </DSPopperJS>\n </div>\n );\n};\n"],"names":["PopupMenu","Icon","options","closeOnClick","title","onClick","useState","isOpen","setIsOpen","buttonRef","setButtonRef","handleKeyPress","useCallback","e","code","handleOnClose","focus","handleTriggerOnClick","handleItemClick","content","useMemo","React","PopupMenuContent","Button","DSPopperJS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAMaA,SAAS,GAAG,SAAZA,SAAY,OAAyE;AAAA,MAAtEC,IAAsE,QAAtEA,IAAsE;AAAA,MAAhEC,OAAgE,QAAhEA,OAAgE;AAAA,MAAvDC,YAAuD,QAAvDA,YAAuD;AAAA,MAAzCC,KAAyC,QAAzCA,KAAyC;AAAA,MAAlCC,OAAkC,QAAlCA,OAAkC;;AAChG,kBAA4BC,cAAQ,CAAU,KAAV,CAApC;AAAA;AAAA,MAAOC,MAAP;AAAA,MAAeC,SAAf;;AACA,mBAAkCF,cAAQ,CAA2B,IAA3B,CAA1C;AAAA;AAAA,MAAOG,SAAP;AAAA,MAAkBC,YAAlB;;AAEA,MAAMC,cAAc,GAAGC,iBAAW,CAAC,UAACC,CAAD,EAA4B;AAC7D,QAAIA,CAAC,CAACC,IAAF,KAAW,OAAX,IAAsBD,CAAC,CAACC,IAAF,KAAW,OAArC,EAA8C;AAC5CN,MAAAA,SAAS,CAAC,IAAD,CAAT;AACD;AACF,GAJiC,EAI/B,EAJ+B,CAAlC;AAMA,MAAM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"PopupMenu.js","sources":["../../../../src/outOfTheBox/PopupMenu/PopupMenu.tsx"],"sourcesContent":["import React, { useState, useRef, useCallback, useMemo } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { PopupMenuContent } from './PopupMenuContent';\nimport { Button } from '../../components/Toolbar/styles';\nimport type { PopupPropsT as Props } from '../../index.d';\n\nexport const PopupMenu = ({ Icon, options, closeOnClick, title, onClick }: Props): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const [buttonRef, setButtonRef] = useState<HTMLButtonElement | null>(null);\n\n const handleKeyPress = useCallback((e: React.KeyboardEvent) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n }, []);\n\n const handleOnClose = useCallback(() => {\n setIsOpen(false);\n buttonRef?.focus();\n }, [buttonRef]);\n\n const handleTriggerOnClick = useCallback(\n (e) => {\n setIsOpen(true);\n onClick(e);\n },\n [onClick],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick) handleOnClose();\n }, [closeOnClick, handleOnClose]);\n\n const content = useMemo(\n () => <PopupMenuContent options={options} onItemClick={handleItemClick} onClose={handleOnClose} />,\n [options, handleItemClick, handleOnClose],\n );\n\n return (\n <div>\n <Button\n onClick={handleTriggerOnClick}\n onKeyPress={handleKeyPress}\n title={title}\n ref={setButtonRef}\n data-testid=\"gh-toolbar-item\"\n >\n {Icon && <Icon fill=\"#FFF\" size=\"m\" />}\n </Button>\n <DSPopperJS referenceElement={buttonRef} showPopover={isOpen} closeContextMenu={handleOnClose}>\n {content}\n </DSPopperJS>\n </div>\n );\n};\n"],"names":["PopupMenu","Icon","options","closeOnClick","title","onClick","useState","isOpen","setIsOpen","buttonRef","setButtonRef","handleKeyPress","useCallback","e","code","handleOnClose","focus","handleTriggerOnClick","handleItemClick","content","useMemo","React","PopupMenuContent","Button","DSPopperJS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAMaA,SAAS,GAAG,SAAZA,SAAY,OAAyE;E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,kEACEA,wCAACE,gCAAD;IACE,OAAO,EAAEN,oBADX;IAEE,UAAU,EAAEN,cAFd;IAGE,KAAK,EAAEP,KAHT;IAIE,GAAG,EAAEM,YAJP;IAKE,eAAY;KAEXT,IAAI,iBAAIoB,wCAAC,IAAD;IAAM,IAAI,EAAC,MAAX;IAAkB,IAAI,EAAC;IAPlC,CADF,eAUEA,wCAACG,qBAAD;IAAY,gBAAgB,EAAEf,SAA9B;IAAyC,WAAW,EAAEF,MAAtD;IAA8D,gBAAgB,EAAEQ;KAC7EI,OADH,CAVF,CADF;AAgBD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PopupMenuContent.js","sources":["../../../../src/outOfTheBox/PopupMenu/PopupMenuContent.tsx"],"sourcesContent":["import React, { useRef, useEffect, useMemo, useContext } from 'react';\nimport { getAriaProps, getDataProps } from '@elliemae/ds-props-helpers';\nimport { Separator, ItemWrapper, Label, List } from './styles';\nimport type { PopupMenuContentPropsT as Props } from '../../index.d';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const PopupMenuContent = React.memo(({ options, onItemClick, onClose }: Props): JSX.Element => {\n const { instanceUID } = useContext(GlobalHeaderContext);\n\n const menuRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n (menuRef.current?.firstChild as HTMLButtonElement)?.focus();\n }, []);\n\n const content = useMemo(\n () =>\n options.map((option) => {\n const { type, Icon, label = '', onClick, Content } = option;\n\n const ariaAndDataProps = {\n ...getAriaProps(option),\n ...getDataProps(option),\n };\n\n const handleClick = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {\n onItemClick(e);\n if (onClick) onClick(e);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.code === 'Escape') onClose();\n };\n\n switch (type) {\n case 'separator':\n return <Separator key={`${instanceUID}-separator-${label}`} {...ariaAndDataProps} />;\n case 'custom':\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n {...ariaAndDataProps}\n >\n {Content && <Content />}\n </ItemWrapper>\n );\n default:\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n {...ariaAndDataProps}\n >\n {Icon && <Icon />}\n {Label && <Label>{label}</Label>}\n </ItemWrapper>\n );\n }\n }),\n [onClose, onItemClick, options, instanceUID],\n );\n return <List ref={menuRef}>{content}</List>;\n});\n"],"names":["PopupMenuContent","React","memo","options","onItemClick","onClose","useContext","GlobalHeaderContext","instanceUID","menuRef","useRef","useEffect","current","firstChild","focus","content","useMemo","map","option","type","Icon","label","onClick","Content","ariaAndDataProps","getAriaProps","getDataProps","handleClick","e","handleKeyDown","code","Separator","ItemWrapper","Label","List"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAMaA,gBAAgB,gBAAGC,yBAAK,CAACC,IAAN,CAAW,gBAA2D;AAAA,MAAxDC,OAAwD,QAAxDA,OAAwD;AAAA,MAA/CC,WAA+C,QAA/CA,WAA+C;AAAA,MAAlCC,OAAkC,QAAlCA,OAAkC;;AACpG,oBAAwBC,gBAAU,CAACC,uCAAD,CAAlC;AAAA,MAAQC,WAAR,eAAQA,WAAR;;AAEA,MAAMC,OAAO,GAAGC,YAAM,CAAiB,IAAjB,CAAtB;AAEAC,EAAAA,eAAS,CAAC,YAAM;AAAA;;AACd,wBAACF,OAAO,CAACG,OAAT,8EAAC,iBAAiBC,UAAlB,gFAAoDC,KAApD;AACD,GAFQ,EAEN,EAFM,CAAT;AAIA,MAAMC,OAAO,GAAGC,aAAO,CACrB;AAAA,WACEb,OAAO,CAACc,GAAR,CAAY,UAACC,MAAD,EAAY;AACtB,UAAQC,IAAR,GAAqDD,MAArD,CAAQC,IAAR;AAAA,UAAcC,IAAd,GAAqDF,MAArD,CAAcE,IAAd;AAAA,0BAAqDF,MAArD,CAAoBG,KAApB;AAAA,UAAoBA,KAApB,8BAA4B,EAA5B;AAAA,UAAgCC,OAAhC,GAAqD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B;AAiDA,sBAAOP,wCAACiC,iCAAD;AAAM,IAAA,GAAG,EAAEzB;AAAX,KAAqBM,OAArB,CAAP;AACD,CA3D+B;;;;"}
1
+ {"version":3,"file":"PopupMenuContent.js","sources":["../../../../src/outOfTheBox/PopupMenu/PopupMenuContent.tsx"],"sourcesContent":["import React, { useRef, useEffect, useMemo, useContext } from 'react';\nimport { getAriaProps, getDataProps } from '@elliemae/ds-props-helpers';\nimport { Separator, ItemWrapper, Label, List } from './styles';\nimport type { PopupMenuContentPropsT as Props } from '../../index.d';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const PopupMenuContent = React.memo(({ options, onItemClick, onClose }: Props): JSX.Element => {\n const { instanceUID } = useContext(GlobalHeaderContext);\n\n const menuRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n (menuRef.current?.firstChild as HTMLButtonElement)?.focus();\n }, []);\n\n const content = useMemo(\n () =>\n options.map((option) => {\n const { type, Icon, label = '', onClick, Content } = option;\n\n const ariaAndDataProps = {\n ...getAriaProps(option),\n ...getDataProps(option),\n };\n\n const handleClick = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {\n onItemClick(e);\n if (onClick) onClick(e);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.code === 'Escape') onClose();\n };\n\n switch (type) {\n case 'separator':\n return <Separator key={`${instanceUID}-separator-${label}`} {...ariaAndDataProps} />;\n case 'custom':\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n {...ariaAndDataProps}\n >\n {Content && <Content />}\n </ItemWrapper>\n );\n default:\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n {...ariaAndDataProps}\n >\n {Icon && <Icon />}\n {Label && <Label>{label}</Label>}\n </ItemWrapper>\n );\n }\n }),\n [onClose, onItemClick, options, instanceUID],\n );\n return <List ref={menuRef}>{content}</List>;\n});\n"],"names":["PopupMenuContent","React","memo","options","onItemClick","onClose","useContext","GlobalHeaderContext","instanceUID","menuRef","useRef","useEffect","current","firstChild","focus","content","useMemo","map","option","type","Icon","label","onClick","Content","ariaAndDataProps","getAriaProps","getDataProps","handleClick","e","handleKeyDown","code","Separator","ItemWrapper","Label","List"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAMaA,gBAAgB,gBAAGC,yBAAK,CAACC,IAAN,CAAW,gBAA2D;EAAA,IAAxDC,OAAwD,QAAxDA,OAAwD;MAA/CC,WAA+C,QAA/CA,WAA+C;MAAlCC,OAAkC,QAAlCA,OAAkC;;EACpG,kBAAwBC,gBAAU,CAACC,uCAAD,CAAlC;MAAQC,WAAR,eAAQA,WAAR;;EAEA,IAAMC,OAAO,GAAGC,YAAM,CAAiB,IAAjB,CAAtB;EAEAC,eAAS,CAAC,YAAM;IAAA;;IACd,oBAACF,OAAO,CAACG,OAAT,8EAAC,iBAAiBC,UAAlB,gFAAoDC,KAApD;GADO,EAEN,EAFM,CAAT;EAIA,IAAMC,OAAO,GAAGC,aAAO,CACrB;IAAA,OACEb,OAAO,CAACc,GAAR,CAAY,UAACC,MAAD,EAAY;MACtB,IAAQC,IAAR,GAAqDD,MAArD,CAAQC,IAAR;UAAcC,IAAd,GAAqDF,MAArD,CAAcE,IAAd;0BAAqDF,MAArD,CAAoBG,KAApB;UAAoBA,KAApB,8BAA4B,EAA5B;UAAgCC,OAAhC,GAAqDJ,MAArD,CAAgCI,OAAhC;UAAyCC,OAAzC,GAAqDL,MAArD,CAAyCK,OAAzC;;MAEA,IAAMC,gBAAgB,mCACjBC,2BAAY,CAACP,MAAD,CADK,GAEjBQ,2BAAY,CAACR,MAAD,CAFK,CAAtB;;MAKA,IAAMS,WAAW,GAAG,SAAdA,WAAc,CAACC,CAAD,EAAkD;QACpExB,WAAW,CAACwB,CAAD,CAAX;QACA,IAAIN,OAAJ,EAAaA,OAAO,CAACM,CAAD,CAAP;OAFf;;MAKA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACD,CAAD,EAA4B;QAChD,IAAIA,CAAC,CAACE,IAAF,KAAW,QAAf,EAAyBzB,OAAO;OADlC;;MAIA,QAAQc,IAAR;QACE,KAAK,WAAL;UACE,oBAAOlB,wCAAC8B,sCAAD;YAAW,GAAG,YAAKvB,WAAL,wBAA8Ba,KAA9B;aAA2CG,gBAAzD,EAAP;;QACF,KAAK,QAAL;UACE,oBACEvB,wCAAC+B,wCAAD;YACE,OAAO,EAAEL,WADX;YAEE,SAAS,EAAEE,aAFb;YAGE,GAAG,YAAKrB,WAAL,oBAA0Ba,KAA1B;aACCG,gBAJN,GAMGD,OAAO,iBAAItB,wCAAC,OAAD,OANd,CADF;;QAUF;UACE,oBACEA,wCAAC+B,wCAAD;YACE,OAAO,EAAEL,WADX;YAEE,SAAS,EAAEE,aAFb;YAGE,GAAG,YAAKrB,WAAL,oBAA0Ba,KAA1B;aACCG,gBAJN,GAMGJ,IAAI,iBAAInB,wCAAC,IAAD,OANX,EAOGgC,kCAAK,iBAAIhC,wCAACgC,kCAAD,QAAQZ,KAAR,CAPZ,CADF;;KAhCN,CADF;GADqB,EA+CrB,CAAChB,OAAD,EAAUD,WAAV,EAAuBD,OAAvB,EAAgCK,WAAhC,CA/CqB,CAAvB;EAiDA,oBAAOP,wCAACiC,iCAAD;IAAM,GAAG,EAAEzB;KAAUM,OAArB,CAAP;AACD,CA3D+B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/outOfTheBox/PopupMenu/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const List = styled.div`\n padding: 5px 0px;\n`;\n\nexport const ItemWrapper = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 0 20px;\n cursor: pointer;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n :hover,\n :focus {\n border: ${({ theme }) => `1px solid ${theme.colors.brand[600]}`};\n }\n`;\n\nexport const Label = styled.p`\n width: 100%;\n font-size: 14px;\n margin: 10px;\n`;\n\nexport const Separator = styled.div`\n width: 100%;\n border: none;\n border-bottom: 1px solid #ccc;\n`;\n"],"names":["List","styled","div","ItemWrapper","button","theme","colors","brand","Label","p","Separator"],"mappings":";;;;;;;;;;IAEaA,IAAI,gBAAGC,0BAAM,CAACC,GAAV;AAAA;AAAA;IAIJC,WAAW,gBAAGF,0BAAM,CAACG,MAAV;AAAA;AAAA,2MAYV;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,6BAA4BA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAA5B;AAAA,CAZU;IAgBXC,KAAK,gBAAGP,0BAAM,CAACQ,CAAV;AAAA;AAAA;IAMLC,SAAS,gBAAGT,0BAAM,CAACC,GAAV;AAAA;AAAA;;;;;;;"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/outOfTheBox/PopupMenu/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const List = styled.div`\n padding: 5px 0px;\n`;\n\nexport const ItemWrapper = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 0 20px;\n cursor: pointer;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n :hover,\n :focus {\n border: ${({ theme }) => `1px solid ${theme.colors.brand[600]}`};\n }\n`;\n\nexport const Label = styled.p`\n width: 100%;\n font-size: 14px;\n margin: 10px;\n`;\n\nexport const Separator = styled.div`\n width: 100%;\n border: none;\n border-bottom: 1px solid #ccc;\n`;\n"],"names":["List","styled","div","ItemWrapper","button","theme","colors","brand","Label","p","Separator"],"mappings":";;;;;;;;;;IAEaA,IAAI,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA;IAIJC,WAAW,gBAAGF,0BAAM,CAACG,MAAV;EAAA;AAAA,2MAYV;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,2BAA4BA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAA5B;AAAA,CAZU;IAgBXC,KAAK,gBAAGP,0BAAM,CAACQ,CAAV;EAAA;AAAA;IAMLC,SAAS,gBAAGT,0BAAM,CAACC,GAAV;EAAA;AAAA;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"propTypes.js","sources":["../../src/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const breadcrumbItem = PropTypes.shape({\n label: PropTypes.string.description('breadrcrumb item label'),\n hasNext: PropTypes.bool.description('whether the item has a child or not'),\n isSelected: PropTypes.bool.description('whether the item is selected or not'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const toolbarItem = PropTypes.shape({\n label: PropTypes.string.description('title tag description'),\n type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu']).description(\n 'use to select one of the out-of-the-box types of items',\n ),\n componentProps: PropTypes.object.description('props of out-of-the-box component'),\n Icon: PropTypes.func.description('Icon to display'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const globalHeaderProps = {\n Logo: PropTypes.func.description(\n 'Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n LogoWithBrand: PropTypes.func.description(\n 'Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n breadcrumb: PropTypes.arrayOf(breadcrumbItem).description('Breadcrumb items to display. max 3 levels'),\n toolbar: PropTypes.arrayOf(toolbarItem).description('Toolbar items'),\n};\n"],"names":["breadcrumbItem","PropTypes","shape","label","string","description","hasNext","bool","isSelected","onClick","func","toolbarItem","type","oneOf","componentProps","object","Icon","globalHeaderProps","Logo","LogoWithBrand","breadcrumb","arrayOf","toolbar"],"mappings":";;;;;;IAEaA,cAAc,GAAGC,mBAAS,CAACC,KAAV,CAAgB;AAC5CC,EAAAA,KAAK,EAAEF,mBAAS,CAACG,MAAV,CAAiBC,WAAjB,CAA6B,wBAA7B,CADqC;AAE5CC,EAAAA,OAAO,EAAEL,mBAAS,CAACM,IAAV,CAAeF,WAAf,CAA2B,qCAA3B,CAFmC;AAG5CG,EAAAA,UAAU,EAAEP,mBAAS,CAACM,IAAV,CAAeF,WAAf,CAA2B,qCAA3B,CAHgC;AAI5CI,EAAAA,OAAO,EAAER,mBAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,4BAA3B;AAJmC,CAAhB;IAOjBM,WAAW,GAAGV,mBAAS,CAACC,KAAV,CAAgB;AACzCC,EAAAA,KAAK,EAAEF,mBAAS,CAACG,MAAV,CAAiBC,WAAjB,CAA6B,uBAA7B,CADkC;AAEzCO,EAAAA,IAAI,EAAEX,mBAAS,CAACY,KAAV,CAAgB,CAAC,eAAD,EAAkB,eAAlB,CAAhB,EAAoDR,WAApD,CACJ,wDADI,CAFmC;AAKzCS,EAAAA,cAAc,EAAEb,mBAAS,CAACc,MAAV,CAAiBV,WAAjB,CAA6B,mCAA7B,CALyB;AAMzCW,EAAAA,IAAI,EAAEf,mBAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,iBAA3B,CANmC;AAOzCI,EAAAA,OAAO,EAAER,mBAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,4BAA3B;AAPgC,CAAhB;IAUdY,iBAAiB,GAAG;AAC/BC,EAAAA,IAAI,EAAEjB,mBAAS,CAACS,IAAV,CAAeL,WAAf,CACJ,gGADI,CADyB;AAI/Bc,EAAAA,aAAa,EAAElB,mBAAS,CAACS,IAAV,CAAeL,WAAf,CACb,iHADa,CAJgB;AAO/Be,EAAAA,UAAU,EAAEnB,mBAAS,CAACoB,OAAV,CAAkBrB,cAAlB,EAAkCK,WAAlC,CAA8C,2CAA9C,CAPmB;AAQ/BiB,EAAAA,OAAO,EAAErB,mBAAS,CAACoB,OAAV,CAAkBV,WAAlB,EAA+BN,WAA/B,CAA2C,eAA3C;AARsB;;;;;;"}
1
+ {"version":3,"file":"propTypes.js","sources":["../../src/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const breadcrumbItem = PropTypes.shape({\n label: PropTypes.string.description('breadrcrumb item label'),\n hasNext: PropTypes.bool.description('whether the item has a child or not'),\n isSelected: PropTypes.bool.description('whether the item is selected or not'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const toolbarItem = PropTypes.shape({\n label: PropTypes.string.description('title tag description'),\n type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu']).description(\n 'use to select one of the out-of-the-box types of items',\n ),\n componentProps: PropTypes.object.description('props of out-of-the-box component'),\n Icon: PropTypes.func.description('Icon to display'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const globalHeaderProps = {\n Logo: PropTypes.func.description(\n 'Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n LogoWithBrand: PropTypes.func.description(\n 'Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n breadcrumb: PropTypes.arrayOf(breadcrumbItem).description('Breadcrumb items to display. max 3 levels'),\n toolbar: PropTypes.arrayOf(toolbarItem).description('Toolbar items'),\n};\n"],"names":["breadcrumbItem","PropTypes","shape","label","string","description","hasNext","bool","isSelected","onClick","func","toolbarItem","type","oneOf","componentProps","object","Icon","globalHeaderProps","Logo","LogoWithBrand","breadcrumb","arrayOf","toolbar"],"mappings":";;;;;;IAEaA,cAAc,GAAGC,mBAAS,CAACC,KAAV,CAAgB;EAC5CC,KAAK,EAAEF,mBAAS,CAACG,MAAV,CAAiBC,WAAjB,CAA6B,wBAA7B,CADqC;EAE5CC,OAAO,EAAEL,mBAAS,CAACM,IAAV,CAAeF,WAAf,CAA2B,qCAA3B,CAFmC;EAG5CG,UAAU,EAAEP,mBAAS,CAACM,IAAV,CAAeF,WAAf,CAA2B,qCAA3B,CAHgC;EAI5CI,OAAO,EAAER,mBAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,4BAA3B;AAJmC,CAAhB;IAOjBM,WAAW,GAAGV,mBAAS,CAACC,KAAV,CAAgB;EACzCC,KAAK,EAAEF,mBAAS,CAACG,MAAV,CAAiBC,WAAjB,CAA6B,uBAA7B,CADkC;EAEzCO,IAAI,EAAEX,mBAAS,CAACY,KAAV,CAAgB,CAAC,eAAD,EAAkB,eAAlB,CAAhB,EAAoDR,WAApD,CACJ,wDADI,CAFmC;EAKzCS,cAAc,EAAEb,mBAAS,CAACc,MAAV,CAAiBV,WAAjB,CAA6B,mCAA7B,CALyB;EAMzCW,IAAI,EAAEf,mBAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,iBAA3B,CANmC;EAOzCI,OAAO,EAAER,mBAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,4BAA3B;AAPgC,CAAhB;IAUdY,iBAAiB,GAAG;EAC/BC,IAAI,EAAEjB,mBAAS,CAACS,IAAV,CAAeL,WAAf,CACJ,gGADI,CADyB;EAI/Bc,aAAa,EAAElB,mBAAS,CAACS,IAAV,CAAeL,WAAf,CACb,iHADa,CAJgB;EAO/Be,UAAU,EAAEnB,mBAAS,CAACoB,OAAV,CAAkBrB,cAAlB,EAAkCK,WAAlC,CAA8C,2CAA9C,CAPmB;EAQ/BiB,OAAO,EAAErB,mBAAS,CAACoB,OAAV,CAAkBV,WAAlB,EAA+BN,WAA/B,CAA2C,eAA3C;AARsB;;;;;;"}
package/cjs/styles.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../src/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { GridContainer } from '@elliemae/ds-grid';\n\nexport const Wrapper = styled(GridContainer)`\n background-image: linear-gradient(45deg, #0f364a 0%, #1b6392 54%, #164566 100%);\n color: ${({ theme }) => theme.colors.neutral['000']};\n width: 100%;\n height: 40px;\n padding: 0 24px 0 12px;\n`;\n"],"names":["Wrapper","styled","GridContainer","theme","colors","neutral"],"mappings":";;;;;;;;;;;IAGaA,OAAO,gBAAGC,0BAAM,CAACC,oBAAD,CAAT;AAAA;AAAA,6IAET;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,OAAb,CAAqB,KAArB,CAAf;AAAA,CAFS;;;;"}
1
+ {"version":3,"file":"styles.js","sources":["../../src/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { GridContainer } from '@elliemae/ds-grid';\n\nexport const Wrapper = styled(GridContainer)`\n background-image: linear-gradient(45deg, #0f364a 0%, #1b6392 54%, #164566 100%);\n color: ${({ theme }) => theme.colors.neutral['000']};\n width: 100%;\n height: 40px;\n padding: 0 24px 0 12px;\n`;\n"],"names":["Wrapper","styled","GridContainer","theme","colors","neutral"],"mappings":";;;;;;;;;;;IAGaA,OAAO,gBAAGC,0BAAM,CAACC,oBAAD,CAAT;EAAA;AAAA,6IAET;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaC,OAAb,CAAqB,KAArB,CAAf;AAAA,CAFS;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeader.js","sources":["../../src/GlobalHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { globalHeaderProps } from './propTypes';\nimport type { GlobalHeaderPropsT as Props } from './index.d';\nimport { GlobalHeaderTitle } from './components/Title/GlobalHeaderTitle';\nimport { GlobalHeaderBreadcrumb } from './components/Breadcrumb/GlobalHeaderBreadcrumb';\nimport { GlobalHeaderToolbar } from './components/Toolbar/GlobalHeaderToolbar';\nimport { GlobalHeaderContext } from './GlobalHeaderContext';\nimport { useGlobalHeader } from './config/useGlobalHeader';\nimport { defaultProps } from './defaultProps';\nimport { GlobalHeaderContainer } from './GlobalHeaderContainer';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst GlobalHeader = (props: Props): JSX.Element => {\n useValidateProps(props);\n const ctx = useGlobalHeader(props);\n return (\n <GlobalHeaderContainer>\n <GlobalHeaderContext.Provider value={ctx}>\n <GlobalHeaderTitle />\n <GlobalHeaderBreadcrumb />\n <GlobalHeaderToolbar />\n </GlobalHeaderContext.Provider>\n </GlobalHeaderContainer>\n );\n};\n\nGlobalHeader.defaultProps = defaultProps;\n\nGlobalHeader.propTypes = globalHeaderProps;\nconst GlobalHeaderWithSchema = describe(GlobalHeader);\nGlobalHeaderWithSchema.propTypes = globalHeaderProps;\n\nexport { GlobalHeader, GlobalHeaderWithSchema };\n"],"names":["GlobalHeader","props","useValidateProps","ctx","useGlobalHeader","defaultProps","propTypes","globalHeaderProps","GlobalHeaderWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAA+B;AAClDC,EAAAA,gBAAgB,CAACD,KAAD,CAAhB;AACA,MAAME,GAAG,GAAGC,eAAe,CAACH,KAAD,CAA3B;AACA,sBACE,oBAAC,qBAAD,qBACE,oBAAC,mBAAD,CAAqB,QAArB;AAA8B,IAAA,KAAK,EAAEE;AAArC,kBACE,oBAAC,iBAAD,OADF,eAEE,oBAAC,sBAAD,OAFF,eAGE,oBAAC,mBAAD,OAHF,CADF,CADF;AASD;;AAEDH,YAAY,CAACK,YAAb,GAA4BA,YAA5B;AAEAL,YAAY,CAACM,SAAb,GAAyBC,iBAAzB;IACMC,sBAAsB,GAAGC,QAAQ,CAACT,YAAD;AACvCQ,sBAAsB,CAACF,SAAvB,GAAmCC,iBAAnC;;;;"}
1
+ {"version":3,"file":"GlobalHeader.js","sources":["../../src/GlobalHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { globalHeaderProps } from './propTypes';\nimport type { GlobalHeaderPropsT as Props } from './index.d';\nimport { GlobalHeaderTitle } from './components/Title/GlobalHeaderTitle';\nimport { GlobalHeaderBreadcrumb } from './components/Breadcrumb/GlobalHeaderBreadcrumb';\nimport { GlobalHeaderToolbar } from './components/Toolbar/GlobalHeaderToolbar';\nimport { GlobalHeaderContext } from './GlobalHeaderContext';\nimport { useGlobalHeader } from './config/useGlobalHeader';\nimport { defaultProps } from './defaultProps';\nimport { GlobalHeaderContainer } from './GlobalHeaderContainer';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst GlobalHeader = (props: Props): JSX.Element => {\n useValidateProps(props);\n const ctx = useGlobalHeader(props);\n return (\n <GlobalHeaderContainer>\n <GlobalHeaderContext.Provider value={ctx}>\n <GlobalHeaderTitle />\n <GlobalHeaderBreadcrumb />\n <GlobalHeaderToolbar />\n </GlobalHeaderContext.Provider>\n </GlobalHeaderContainer>\n );\n};\n\nGlobalHeader.defaultProps = defaultProps;\n\nGlobalHeader.propTypes = globalHeaderProps;\nconst GlobalHeaderWithSchema = describe(GlobalHeader);\nGlobalHeaderWithSchema.propTypes = globalHeaderProps;\n\nexport { GlobalHeader, GlobalHeaderWithSchema };\n"],"names":["GlobalHeader","props","useValidateProps","ctx","useGlobalHeader","defaultProps","propTypes","globalHeaderProps","GlobalHeaderWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAA+B;EAClDC,gBAAgB,CAACD,KAAD,CAAhB;EACA,IAAME,GAAG,GAAGC,eAAe,CAACH,KAAD,CAA3B;EACA,oBACE,oBAAC,qBAAD,qBACE,oBAAC,mBAAD,CAAqB,QAArB;IAA8B,KAAK,EAAEE;kBACnC,oBAAC,iBAAD,OADF,eAEE,oBAAC,sBAAD,OAFF,eAGE,oBAAC,mBAAD,OAHF,CADF,CADF;AASD;;AAEDH,YAAY,CAACK,YAAb,GAA4BA,YAA5B;AAEAL,YAAY,CAACM,SAAb,GAAyBC,iBAAzB;IACMC,sBAAsB,GAAGC,QAAQ,CAACT,YAAD;AACvCQ,sBAAsB,CAACF,SAAvB,GAAmCC,iBAAnC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderContainer.js","sources":["../../src/GlobalHeaderContainer.tsx"],"sourcesContent":["import React from 'react';\nimport type { GlobalHeaderContainerT } from './index.d';\nimport { Wrapper } from './styles';\n\nexport const GlobalHeaderContainer = ({ children }: GlobalHeaderContainerT): JSX.Element => (\n <header data-testid=\"ds-global-header\">\n <Wrapper cols={['auto', '1fr', 'auto']}>{children}</Wrapper>\n </header>\n);\n"],"names":["GlobalHeaderContainer","children"],"mappings":";;;;;IAIaA,qBAAqB,GAAG,SAAxBA,qBAAwB;AAAA,MAAGC,QAAH,QAAGA,QAAH;AAAA,sBACnC;AAAQ,mBAAY;AAApB,kBACE,oBAAC,OAAD;AAAS,IAAA,IAAI,EAAE,CAAC,MAAD,EAAS,KAAT,EAAgB,MAAhB;AAAf,KAAyCA,QAAzC,CADF,CADmC;AAAA;;;;"}
1
+ {"version":3,"file":"GlobalHeaderContainer.js","sources":["../../src/GlobalHeaderContainer.tsx"],"sourcesContent":["import React from 'react';\nimport type { GlobalHeaderContainerT } from './index.d';\nimport { Wrapper } from './styles';\n\nexport const GlobalHeaderContainer = ({ children }: GlobalHeaderContainerT): JSX.Element => (\n <header data-testid=\"ds-global-header\">\n <Wrapper cols={['auto', '1fr', 'auto']}>{children}</Wrapper>\n </header>\n);\n"],"names":["GlobalHeaderContainer","children"],"mappings":";;;;;IAIaA,qBAAqB,GAAG,SAAxBA,qBAAwB;EAAA,IAAGC,QAAH,QAAGA,QAAH;EAAA,oBACnC;IAAQ,eAAY;kBAClB,oBAAC,OAAD;IAAS,IAAI,EAAE,CAAC,MAAD,EAAS,KAAT,EAAgB,MAAhB;KAA0BA,QAAzC,CADF,CADmC;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderContext.js","sources":["../../src/GlobalHeaderContext.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport { defaultProps } from './defaultProps';\nimport type { ContextT } from './index.d';\n\nconst noop = () => null;\n\nconst defaultContext = {\n props: defaultProps,\n showIconOnly: false,\n setShowIconOnly: noop,\n instanceUID: '',\n globalHeaderToolbarGrid: [],\n globalHeaderBreadcrumbGrid: [],\n};\n\nexport const GlobalHeaderContext = createContext<ContextT>(defaultContext);\n"],"names":["noop","defaultContext","props","defaultProps","showIconOnly","setShowIconOnly","instanceUID","globalHeaderToolbarGrid","globalHeaderBreadcrumbGrid","GlobalHeaderContext","createContext"],"mappings":";;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAO;AAAA,SAAM,IAAN;AAAA,CAAb;;AAEA,IAAMC,cAAc,GAAG;AACrBC,EAAAA,KAAK,EAAEC,YADc;AAErBC,EAAAA,YAAY,EAAE,KAFO;AAGrBC,EAAAA,eAAe,EAAEL,IAHI;AAIrBM,EAAAA,WAAW,EAAE,EAJQ;AAKrBC,EAAAA,uBAAuB,EAAE,EALJ;AAMrBC,EAAAA,0BAA0B,EAAE;AANP,CAAvB;IASaC,mBAAmB,gBAAGC,aAAa,CAAWT,cAAX;;;;"}
1
+ {"version":3,"file":"GlobalHeaderContext.js","sources":["../../src/GlobalHeaderContext.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport { defaultProps } from './defaultProps';\nimport type { ContextT } from './index.d';\n\nconst noop = () => null;\n\nconst defaultContext = {\n props: defaultProps,\n showIconOnly: false,\n setShowIconOnly: noop,\n instanceUID: '',\n globalHeaderToolbarGrid: [],\n globalHeaderBreadcrumbGrid: [],\n};\n\nexport const GlobalHeaderContext = createContext<ContextT>(defaultContext);\n"],"names":["noop","defaultContext","props","defaultProps","showIconOnly","setShowIconOnly","instanceUID","globalHeaderToolbarGrid","globalHeaderBreadcrumbGrid","GlobalHeaderContext","createContext"],"mappings":";;;AAIA,IAAMA,IAAI,GAAG,SAAPA,IAAO;EAAA,OAAM,IAAN;AAAA,CAAb;;AAEA,IAAMC,cAAc,GAAG;EACrBC,KAAK,EAAEC,YADc;EAErBC,YAAY,EAAE,KAFO;EAGrBC,eAAe,EAAEL,IAHI;EAIrBM,WAAW,EAAE,EAJQ;EAKrBC,uBAAuB,EAAE,EALJ;EAMrBC,0BAA0B,EAAE;AANP,CAAvB;IASaC,mBAAmB,gBAAGC,aAAa,CAAWT,cAAX;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderBreadcrumb.js","sources":["../../../../src/components/Breadcrumb/GlobalHeaderBreadcrumb.tsx"],"sourcesContent":["import React, { useEffect, useContext, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Pipe } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { PureBreadcrumb } from './PureBreadcrumb';\n\nexport const GlobalHeaderBreadcrumb = (): JSX.Element => {\n const {\n props: { breadcrumb },\n instanceUID,\n showIconOnly,\n setShowIconOnly,\n globalHeaderBreadcrumbGrid,\n } = useContext(GlobalHeaderContext);\n const breakpoint = useRef<number | null>(null);\n const flexRegion = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const evaluateShowIconOnly = () => {\n if (flexRegion && flexRegion.current && flexRegion?.current.offsetWidth <= 0 && !breakpoint.current) {\n setShowIconOnly(true);\n breakpoint.current = window.innerWidth;\n } else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {\n setShowIconOnly(false);\n breakpoint.current = null;\n }\n };\n\n evaluateShowIconOnly();\n\n window.addEventListener('resize', evaluateShowIconOnly);\n return () => window.removeEventListener('resize', evaluateShowIconOnly);\n }, [breakpoint, flexRegion, setShowIconOnly]);\n\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n aria-label=\"breadcrumbs\"\n cols={globalHeaderBreadcrumbGrid}\n role=\"navigation\"\n >\n <Pipe showIconOnly={showIconOnly} />\n {breadcrumb?.map((item) => {\n const { label, hasNext, isSelected, onClick } = item;\n return (\n <PureBreadcrumb\n label={label}\n hasNext={hasNext}\n isSelected={isSelected}\n onClick={onClick}\n length={breadcrumb.length}\n key={`${instanceUID}-breadcrumb-item-${label}`}\n />\n );\n })}\n <div id=\"global-header-flex-region\" ref={flexRegion}></div>\n </Grid>\n );\n};\n"],"names":["GlobalHeaderBreadcrumb","useContext","GlobalHeaderContext","breadcrumb","props","instanceUID","showIconOnly","setShowIconOnly","globalHeaderBreadcrumbGrid","breakpoint","useRef","flexRegion","useEffect","evaluateShowIconOnly","current","offsetWidth","window","innerWidth","addEventListener","removeEventListener","map","item","label","hasNext","isSelected","onClick","length"],"mappings":";;;;;;;;;IAMaA,sBAAsB,GAAG,SAAzBA,sBAAyB,GAAmB;AACvD,oBAMIC,UAAU,CAACC,mBAAD,CANd;AAAA,MACWC,UADX,eACEC,KADF,CACWD,UADX;AAAA,MAEEE,WAFF,eAEEA,WAFF;AAAA,MAGEC,YAHF,eAGEA,YAHF;AAAA,MAIEC,eAJF,eAIEA,eAJF;AAAA,MAKEC,0BALF,eAKEA,0BALF;;AAOA,MAAMC,UAAU,GAAGC,MAAM,CAAgB,IAAhB,CAAzB;AACA,MAAMC,UAAU,GAAGD,MAAM,CAAiB,IAAjB,CAAzB;AAEAE,EAAAA,SAAS,CAAC,YAAM;AACd,QAAMC,oBAAoB,GAAG,SAAvBA,oBAAuB,GAAM;AACjC,UAAIF,UAAU,IAAIA,UAAU,CAACG,OAAzB,IAAoC,CAAAH,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU,CAAEG,OAAZ,CAAoBC,WAApB,KAAmC,CAAvE,IAA4E,CAACN,UAAU,CAACK,OAA5F,EAAqG;AACnGP,QAAAA,eAAe,CAAC,IAAD,CAAf;AACAE,QAAAA,UAAU,CAACK,OAAX,GAAqBE,MAAM,CAACC,UAA5B;AACD,OAHD,MAGO,IAAIR,UAAU,IAAIA,UAAU,CAACK,OAAX,KAAuB,IAArC,IAA6CE,MAAM,CAACC,UAAP,IAAqBR,UAAU,CAACK,OAAjF,EAA0F;AAC/FP,QAAAA,eAAe,CAAC,KAAD,CAAf;AACAE,QAAAA,UAAU,CAACK,OAAX,GAAqB,IAArB;AACD;AACF,KARD;;AAUAD,IAAAA,oBAAoB;AAEpBG,IAAAA,MAAM,CAACE,gBAAP,CAAwB,QAAxB,EAAkCL,oBAAlC;AACA,WAAO;AAAA,aAAMG,MAAM,CAACG,mBAAP,CAA2B,QAA3B,EAAqCN,oBAArC,CAAN;AAAA,KAAP;AACD,GAfQ,EAeN,CAACJ,UAAD,EAAaE,UAAb,EAAyBJ,eAAzB,CAfM,CAAT;AAiBA,sBACE,oBAAC,IAAD;AACE,IAAA,MAAM,EAAC,MADT;AAEE,IAAA,UAAU,EAAC,QAFb;AAGE,IAAA,cAAc,EAAC,YAHjB;AAIE,kBAAW,aAJb;AAKE,IAAA,IAAI,EAAEC,0BALR;AAME,IAAA,IAAI,EAAC;AANP,kBAQE,oBAAC,IAAD;AAAM,IAAA,YAAY,EAAEF;AAApB,IARF,EASGH,UATH,aASGA,UATH,uBASGA,UAAU,CAAEiB,GAAZ,CAAgB,UAACC,IAAD,EAAU;AACzB,QAAQC,KAAR,GAAgDD,IAAhD,CAAQC,KAAR;AAAA,QAAeC,OAAf,GAAgDF,IAAhD,CAAeE,OAAf;AAAA,QAAwBC,UAAxB,GAAgDH,IAAhD,CAAwBG,UAAxB;AAAA,QAAoCC,OAApC,GAAgDJ,IAAhD,CAAoCI,OAApC;AACA,wBACE,oBAAC,cAAD;AACE,MAAA,KAAK,EAAEH,KADT;AAEE,MAAA,OAAO,EAAEC,OAFX;AAGE,MAAA,UAAU,EAAEC,UAHd;AAIE,MAAA,OAAO,EAAEC,OAJX;AAKE,MAAA,MAAM,EAAEtB,UAAU,CAACuB,MALrB;AAME,MAAA,GAAG,YAAKrB,WAAL,8BAAoCiB,KAApC;AANL,MADF;AAUD,GAZA,CATH,eAsBE;AAAK,IAAA,EAAE,EAAC,2BAAR;AAAoC,IAAA,GAAG,EAAEX;AAAzC,IAtBF,CADF;AA0BD;;;;"}
1
+ {"version":3,"file":"GlobalHeaderBreadcrumb.js","sources":["../../../../src/components/Breadcrumb/GlobalHeaderBreadcrumb.tsx"],"sourcesContent":["import React, { useEffect, useContext, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Pipe } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { PureBreadcrumb } from './PureBreadcrumb';\n\nexport const GlobalHeaderBreadcrumb = (): JSX.Element => {\n const {\n props: { breadcrumb },\n instanceUID,\n showIconOnly,\n setShowIconOnly,\n globalHeaderBreadcrumbGrid,\n } = useContext(GlobalHeaderContext);\n const breakpoint = useRef<number | null>(null);\n const flexRegion = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const evaluateShowIconOnly = () => {\n if (flexRegion && flexRegion.current && flexRegion?.current.offsetWidth <= 0 && !breakpoint.current) {\n setShowIconOnly(true);\n breakpoint.current = window.innerWidth;\n } else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {\n setShowIconOnly(false);\n breakpoint.current = null;\n }\n };\n\n evaluateShowIconOnly();\n\n window.addEventListener('resize', evaluateShowIconOnly);\n return () => window.removeEventListener('resize', evaluateShowIconOnly);\n }, [breakpoint, flexRegion, setShowIconOnly]);\n\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n aria-label=\"breadcrumbs\"\n cols={globalHeaderBreadcrumbGrid}\n role=\"navigation\"\n >\n <Pipe showIconOnly={showIconOnly} />\n {breadcrumb?.map((item) => {\n const { label, hasNext, isSelected, onClick } = item;\n return (\n <PureBreadcrumb\n label={label}\n hasNext={hasNext}\n isSelected={isSelected}\n onClick={onClick}\n length={breadcrumb.length}\n key={`${instanceUID}-breadcrumb-item-${label}`}\n />\n );\n })}\n <div id=\"global-header-flex-region\" ref={flexRegion}></div>\n </Grid>\n );\n};\n"],"names":["GlobalHeaderBreadcrumb","useContext","GlobalHeaderContext","breadcrumb","props","instanceUID","showIconOnly","setShowIconOnly","globalHeaderBreadcrumbGrid","breakpoint","useRef","flexRegion","useEffect","evaluateShowIconOnly","current","offsetWidth","window","innerWidth","addEventListener","removeEventListener","map","item","label","hasNext","isSelected","onClick","length"],"mappings":";;;;;;;;;IAMaA,sBAAsB,GAAG,SAAzBA,sBAAyB,GAAmB;EACvD,kBAMIC,UAAU,CAAC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F;IARtB,EASGH,UATH,aASGA,UATH,uBASGA,UAAU,CAAEiB,GAAZ,CAAgB,UAACC,IAAD,EAAU;IACzB,IAAQC,KAAR,GAAgDD,IAAhD,CAAQC,KAAR;QAAeC,OAAf,GAAgDF,IAAhD,CAAeE,OAAf;QAAwBC,UAAxB,GAAgDH,IAAhD,CAAwBG,UAAxB;QAAoCC,OAApC,GAAgDJ,IAAhD,CAAoCI,OAApC;IACA,oBACE,oBAAC,cAAD;MACE,KAAK,EAAEH,KADT;MAEE,OAAO,EAAEC,OAFX;MAGE,UAAU,EAAEC,UAHd;MAIE,OAAO,EAAEC,OAJX;MAKE,MAAM,EAAEtB,UAAU,CAACuB,MALrB;MAME,GAAG,YAAKrB,WAAL,8BAAoCiB,KAApC;MAPP;GAFD,CATH,eAsBE;IAAK,EAAE,EAAC,2BAAR;IAAoC,GAAG,EAAEX;IAtB3C,CADF;AA0BD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PureBreadcrumb.js","sources":["../../../../src/components/Breadcrumb/PureBreadcrumb.tsx"],"sourcesContent":["import React from 'react';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\nimport { BreadcrumbItem, LabelButton, Label } from './styles';\nimport type { BreadcrumbItemT as Props } from '../../index.d';\n\nexport const PureBreadcrumb = React.memo(({ onClick, isSelected, length, label, hasNext }: Props) => (\n <BreadcrumbItem>\n <LabelButton onClick={onClick} aria-selected={isSelected} data-testid=\"gh-breadcrumb-btn\">\n <Label isSelected={!!isSelected} isOnlyItem={length === 1}>\n {label}\n </Label>\n </LabelButton>\n {hasNext && <ChevronSmallRight size=\"m\" fill=\"#FFF\" />}\n </BreadcrumbItem>\n));\n"],"names":["PureBreadcrumb","React","memo","onClick","isSelected","length","label","hasNext"],"mappings":";;;;;IAKaA,cAAc,gBAAGC,KAAK,CAACC,IAAN,CAAW;AAAA,MAAGC,OAAH,QAAGA,OAAH;AAAA,MAAYC,UAAZ,QAAYA,UAAZ;AAAA,MAAwBC,MAAxB,QAAwBA,MAAxB;AAAA,MAAgCC,KAAhC,QAAgCA,KAAhC;AAAA,MAAuCC,OAAvC,QAAuCA,OAAvC;AAAA,sBACvC,oBAAC,cAAD,qBACE,oBAAC,WAAD;AAAa,IAAA,OAAO,EAAEJ,OAAtB;AAA+B,qBAAeC,UAA9C;AAA0D,mBAAY;AAAtE,kBACE,oBAAC,KAAD;AAAO,IAAA,UAAU,EAAE,CAAC,CAACA,UAArB;AAAiC,IAAA,UAAU,EAAEC,MAAM,KAAK;AAAxD,KACGC,KADH,CADF,CADF,EAMGC,OAAO,iBAAI,oBAAC,iBAAD;AAAmB,IAAA,IAAI,EAAC,GAAxB;AAA4B,IAAA,IAAI,EAAC;AAAjC,IANd,CADuC;AAAA,CAAX;;;;"}
1
+ {"version":3,"file":"PureBreadcrumb.js","sources":["../../../../src/components/Breadcrumb/PureBreadcrumb.tsx"],"sourcesContent":["import React from 'react';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\nimport { BreadcrumbItem, LabelButton, Label } from './styles';\nimport type { BreadcrumbItemT as Props } from '../../index.d';\n\nexport const PureBreadcrumb = React.memo(({ onClick, isSelected, length, label, hasNext }: Props) => (\n <BreadcrumbItem>\n <LabelButton onClick={onClick} aria-selected={isSelected} data-testid=\"gh-breadcrumb-btn\">\n <Label isSelected={!!isSelected} isOnlyItem={length === 1}>\n {label}\n </Label>\n </LabelButton>\n {hasNext && <ChevronSmallRight size=\"m\" fill=\"#FFF\" />}\n </BreadcrumbItem>\n));\n"],"names":["PureBreadcrumb","React","memo","onClick","isSelected","length","label","hasNext"],"mappings":";;;;;IAKaA,cAAc,gBAAGC,KAAK,CAACC,IAAN,CAAW;EAAA,IAAGC,OAAH,QAAGA,OAAH;MAAYC,UAAZ,QAAYA,UAAZ;MAAwBC,MAAxB,QAAwBA,MAAxB;MAAgCC,KAAhC,QAAgCA,KAAhC;MAAuCC,OAAvC,QAAuCA,OAAvC;EAAA,oBACvC,oBAAC,cAAD,qBACE,oBAAC,WAAD;IAAa,OAAO,EAAEJ,OAAtB;IAA+B,iBAAeC,UAA9C;IAA0D,eAAY;kBACpE,oBAAC,KAAD;IAAO,UAAU,EAAE,CAAC,CAACA,UAArB;IAAiC,UAAU,EAAEC,MAAM,KAAK;KACrDC,KADH,CADF,CADF,EAMGC,OAAO,iBAAI,oBAAC,iBAAD;IAAmB,IAAI,EAAC,GAAxB;IAA4B,IAAI,EAAC;IAN/C,CADuC;AAAA,CAAX;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Breadcrumb/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { LabelT, PipeT } from '../../index.d';\n\nexport const Pipe = styled.span<PipeT>`\n margin: 0 7px 0 0;\n border-left: ${({ showIconOnly }) => (showIconOnly ? 'none' : '1px solid #fff')};\n height: 20px;\n`;\n\nexport const BreadcrumbItem = styled.div`\n display: flex;\n align-items: center;\n height: 100%;\n`;\n\nexport const LabelButton = styled.button`\n width: fit-content;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n position: relative;\n &:focus {\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: -7px;\n width: calc(100% + 14px);\n height: 100%;\n border: 4px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 6px;\n }\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: -5px;\n width: calc(100% + 10px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n\nexport const Label = styled.p<LabelT>`\n color: ${({ theme }) => theme.colors.neutral['000']};\n ${({ theme, isSelected }) =>\n `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`};\n font-size: 16px;\n text-transform: uppercase;\n border-bottom: ${({ isSelected, isOnlyItem }) => `2px solid ${isSelected && !isOnlyItem ? '#FFF' : 'transparent'}`};\n margin: 3px 5px 0 5px;\n :hover {\n ${({ theme }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`};\n }\n`;\n"],"names":["Pipe","styled","span","showIconOnly","BreadcrumbItem","div","LabelButton","button","theme","colors","brand","neutral","Label","p","isSelected","isOnlyItem"],"mappings":";;IAGaA,IAAI,gBAAGC,MAAM,CAACC,IAAV;AAAA;AAAA,uDAEA;AAAA,MAAGC,YAAH,QAAGA,YAAH;AAAA,SAAuBA,YAAY,GAAG,MAAH,GAAY,gBAA/C;AAAA,CAFA;IAMJC,cAAc,gBAAGH,MAAM,CAACI,GAAV;AAAA;AAAA;IAMdC,WAAW,gBAAGL,MAAM,CAACM,MAAV;AAAA;AAAA,scAkBE;AAAA,MAAGC,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CAlBF,EA6BE;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CA7BF;IAmCXC,KAAK,gBAAGX,MAAM,CAACY,CAAV;AAAA;AAAA,sHACP;AAAA,MAAGL,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CADO,EAEd;AAAA,MAAGH,KAAH,SAAGA,KAAH;AAAA,MAAUM,UAAV,SAAUA,UAAV;AAAA,+CAC+BA,UAAU,GAAGN,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAH,GAAiC,aAD1E;AAAA,CAFc,EAMC;AAAA,MAAGG,UAAH,SAAGA,UAAH;AAAA,MAAeC,UAAf,SAAeA,UAAf;AAAA,6BAA6CD,UAAU,IAAI,CAACC,UAAf,GAA4B,MAA5B,GAAqC,aAAlF;AAAA,CAND,EASZ;AAAA,MAAGP,KAAH,SAAGA,KAAH;AAAA,8CAA6CA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAA7C;AAAA,CATY;;;;"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Breadcrumb/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { LabelT, PipeT } from '../../index.d';\n\nexport const Pipe = styled.span<PipeT>`\n margin: 0 7px 0 0;\n border-left: ${({ showIconOnly }) => (showIconOnly ? 'none' : '1px solid #fff')};\n height: 20px;\n`;\n\nexport const BreadcrumbItem = styled.div`\n display: flex;\n align-items: center;\n height: 100%;\n`;\n\nexport const LabelButton = styled.button`\n width: fit-content;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n position: relative;\n &:focus {\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: -7px;\n width: calc(100% + 14px);\n height: 100%;\n border: 4px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 6px;\n }\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: -5px;\n width: calc(100% + 10px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n\nexport const Label = styled.p<LabelT>`\n color: ${({ theme }) => theme.colors.neutral['000']};\n ${({ theme, isSelected }) =>\n `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`};\n font-size: 16px;\n text-transform: uppercase;\n border-bottom: ${({ isSelected, isOnlyItem }) => `2px solid ${isSelected && !isOnlyItem ? '#FFF' : 'transparent'}`};\n margin: 3px 5px 0 5px;\n :hover {\n ${({ theme }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`};\n }\n`;\n"],"names":["Pipe","styled","span","showIconOnly","BreadcrumbItem","div","LabelButton","button","theme","colors","brand","neutral","Label","p","isSelected","isOnlyItem"],"mappings":";;IAGaA,IAAI,gBAAGC,MAAM,CAACC,IAAV;EAAA;AAAA,uDAEA;EAAA,IAAGC,YAAH,QAAGA,YAAH;EAAA,OAAuBA,YAAY,GAAG,MAAH,GAAY,gBAA/C;AAAA,CAFA;IAMJC,cAAc,gBAAGH,MAAM,CAACI,GAAV;EAAA;AAAA;IAMdC,WAAW,gBAAGL,MAAM,CAACM,MAAV;EAAA;AAAA,scAkBE;EAAA,IAAGC,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CAlBF,EA6BE;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CA7BF;IAmCXC,KAAK,gBAAGX,MAAM,CAACY,CAAV;EAAA;AAAA,sHACP;EAAA,IAAGL,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CADO,EAEd;EAAA,IAAGH,KAAH,SAAGA,KAAH;MAAUM,UAAV,SAAUA,UAAV;EAAA,6CAC+BA,UAAU,GAAGN,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAH,GAAiC,aAD1E;AAAA,CAFc,EAMC;EAAA,IAAGG,UAAH,SAAGA,UAAH;MAAeC,UAAf,SAAeA,UAAf;EAAA,2BAA6CD,UAAU,IAAI,CAACC,UAAf,GAA4B,MAA5B,GAAqC,aAAlF;AAAA,CAND,EASZ;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,4CAA6CA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAA7C;AAAA,CATY;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderTitle.js","sources":["../../../../src/components/Title/GlobalHeaderTitle.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderTitle = (): JSX.Element => {\n const {\n props: { Logo, LogoWithBrand },\n showIconOnly,\n } = useContext(GlobalHeaderContext);\n\n return (\n <Grid alignItems=\"center\" pr={showIconOnly ? '0px' : '36px'} cols={showIconOnly ? ['auto'] : ['auto', '1fr']}>\n {Logo && showIconOnly && <Logo />}\n {LogoWithBrand && !showIconOnly && <LogoWithBrand />}\n </Grid>\n );\n};\n"],"names":["GlobalHeaderTitle","useContext","GlobalHeaderContext","props","Logo","LogoWithBrand","showIconOnly"],"mappings":";;;;;IAIaA,iBAAiB,GAAG,SAApBA,iBAAoB,GAAmB;AAClD,oBAGIC,UAAU,CAACC,mBAAD,CAHd;AAAA,sCACEC,KADF;AAAA,MACWC,IADX,qBACWA,IADX;AAAA,MACiBC,aADjB,qBACiBA,aADjB;AAAA,MAEEC,YAFF,eAEEA,YAFF;;AAKA,sBACE,oBAAC,IAAD;AAAM,IAAA,UAAU,EAAC,QAAjB;AAA0B,IAAA,EAAE,EAAEA,YAAY,GAAG,KAAH,GAAW,MAArD;AAA6D,IAAA,IAAI,EAAEA,YAAY,GAAG,CAAC,MAAD,CAAH,GAAc,CAAC,MAAD,EAAS,KAAT;AAA7F,KACGF,IAAI,IAAIE,YAAR,iBAAwB,oBAAC,IAAD,OAD3B,EAEGD,aAAa,IAAI,CAACC,YAAlB,iBAAkC,oBAAC,aAAD,OAFrC,CADF;AAMD;;;;"}
1
+ {"version":3,"file":"GlobalHeaderTitle.js","sources":["../../../../src/components/Title/GlobalHeaderTitle.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderTitle = (): JSX.Element => {\n const {\n props: { Logo, LogoWithBrand },\n showIconOnly,\n } = useContext(GlobalHeaderContext);\n\n return (\n <Grid alignItems=\"center\" pr={showIconOnly ? '0px' : '36px'} cols={showIconOnly ? ['auto'] : ['auto', '1fr']}>\n {Logo && showIconOnly && <Logo />}\n {LogoWithBrand && !showIconOnly && <LogoWithBrand />}\n </Grid>\n );\n};\n"],"names":["GlobalHeaderTitle","useContext","GlobalHeaderContext","props","Logo","LogoWithBrand","showIconOnly"],"mappings":";;;;;IAIaA,iBAAiB,GAAG,SAApBA,iBAAoB,GAAmB;EAClD,kBAGIC,UAAU,CAACC,mBAAD,CAHd;sCACEC,KADF;MACWC,IADX,qBACWA,IADX;MACiBC,aADjB,qBACiBA,aADjB;MAEEC,YAFF,eAEEA,YAFF;;EAKA,oBACE,oBAAC,IAAD;IAAM,UAAU,EAAC,QAAjB;IAA0B,EAAE,EAAEA,YAAY,GAAG,KAAH,GAAW,MAArD;IAA6D,IAAI,EAAEA,YAAY,GAAG,CAAC,MAAD,CAAH,GAAc,CAAC,MAAD,EAAS,KAAT;KAC1FF,IAAI,IAAIE,YAAR,iBAAwB,oBAAC,IAAD,OAD3B,EAEGD,aAAa,IAAI,CAACC,YAAlB,iBAAkC,oBAAC,aAAD,OAFrC,CADF;AAMD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeaderToolbar.js","sources":["../../../../src/components/Toolbar/GlobalHeaderToolbar.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ToolbarItems } from './ToolbarItems';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderToolbar = (): JSX.Element => {\n const { globalHeaderToolbarGrid } = useContext(GlobalHeaderContext);\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gutter=\"xxs\"\n cols={globalHeaderToolbarGrid}\n role=\"toolbar\"\n >\n <ToolbarItems />\n </Grid>\n );\n};\n"],"names":["GlobalHeaderToolbar","useContext","GlobalHeaderContext","globalHeaderToolbarGrid"],"mappings":";;;;;;;;;;;;;;;;;;;;IAKaA,mBAAmB,GAAG,SAAtBA,mBAAsB,GAAmB;AACpD,oBAAoCC,UAAU,CAACC,mBAAD,CAA9C;AAAA,MAAQC,uBAAR,eAAQA,uBAAR;;AACA,sBACE,oBAAC,IAAD;AACE,IAAA,MAAM,EAAC,MADT;AAEE,IAAA,UAAU,EAAC,QAFb;AAGE,IAAA,cAAc,EAAC,QAHjB;AAIE,IAAA,MAAM,EAAC,KAJT;AAKE,IAAA,IAAI,EAAEA,uBALR;AAME,IAAA,IAAI,EAAC;AANP,kBAQE,oBAAC,YAAD,OARF,CADF;AAYD;;;;"}
1
+ {"version":3,"file":"GlobalHeaderToolbar.js","sources":["../../../../src/components/Toolbar/GlobalHeaderToolbar.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ToolbarItems } from './ToolbarItems';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderToolbar = (): JSX.Element => {\n const { globalHeaderToolbarGrid } = useContext(GlobalHeaderContext);\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gutter=\"xxs\"\n cols={globalHeaderToolbarGrid}\n role=\"toolbar\"\n >\n <ToolbarItems />\n </Grid>\n );\n};\n"],"names":["GlobalHeaderToolbar","useContext","GlobalHeaderContext","globalHeaderToolbarGrid"],"mappings":";;;;;;;;;;;;;;;;;;;;IAKaA,mBAAmB,GAAG,SAAtBA,mBAAsB,GAAmB;EACpD,kBAAoCC,UAAU,CAACC,mBAAD,CAA9C;MAAQC,uBAAR,eAAQA,uBAAR;;EACA,oBACE,oBAAC,IAAD;IACE,MAAM,EAAC,MADT;IAEE,UAAU,EAAC,QAFb;IAGE,cAAc,EAAC,QAHjB;IAIE,MAAM,EAAC,KAJT;IAKE,IAAI,EAAEA,uBALR;IAME,IAAI,EAAC;kBAEL,oBAAC,YAAD,OARF,CADF;AAYD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarItems.js","sources":["../../../../src/components/Toolbar/ToolbarItems.tsx"],"sourcesContent":["/* eslint-disable no-case-declarations */\nimport React, { useContext, useMemo } from 'react';\nimport { AppPicker, PopupMenu } from '../../outOfTheBox';\nimport { Button } from './styles';\nimport type { AppPickerProps, PopupPropsT } from '../../index.d';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\n const itemsList = useMemo(\n () =>\n toolbar?.map((item) => {\n const { Icon, type, onClick, componentProps, label } = item;\n\n switch (type) {\n case 'ds-popup-menu':\n const { options, closeOnClick } = componentProps as PopupPropsT;\n return (\n <PopupMenu\n onClick={onClick}\n title={label}\n Icon={Icon}\n options={options}\n closeOnClick={closeOnClick}\n key={`${instanceUID}-ds-popup-menu-${label}`}\n />\n );\n case 'ds-app-picker':\n return (\n <AppPicker\n label={label}\n key={`${instanceUID}-ds-app-picker-${label}`}\n {...(componentProps as AppPickerProps)}\n />\n );\n default:\n return (\n <Button\n onClick={onClick}\n key={`${instanceUID}-ds-toolbar-button-${label}`}\n title={label}\n data-testid=\"gh-toolbar-item\"\n >\n <Icon fill=\"#FFF\" size=\"m\" />\n </Button>\n );\n }\n }),\n [toolbar, instanceUID],\n );\n\n return <>{itemsList}</>;\n};\n"],"names":["ToolbarItems","useContext","GlobalHeaderContext","toolbar","props","instanceUID","itemsList","useMemo","map","item","Icon","type","onClick","componentProps","label","options","closeOnClick"],"mappings":";;;;;;;;;;;;;;;;;;IAOaA,YAAY,GAAG,SAAfA,YAAe,GAAmB;AAC7C,oBAGIC,UAAU,CAACC,mBAAD,CAHd;AAAA,MACWC,OADX,eACEC,KADF,CACWD,OADX;AAAA,MAEEE,WAFF,eAEEA,WAFF;;AAKA,MAAMC,SAAS,GAAGC,OAAO,CACvB;AAAA,WACEJ,OADF,aACEA,OADF,uBACEA,OAAO,CAAEK,GAAT,CAAa,UAACC,IAAD,EAAU;AACrB,UAAQC,IAAR,GAAuDD,IAAvD,CAAQC,IAAR;AAAA,UAAcC,IAAd,GAAuDF,IAAvD,CAAcE,IAAd;AAAA,UAAoBC,OAApB,GAAuDH,IAAvD,CAAoBG,OAApB;AAAA,UAA6BC,cAA7B,GAAuDJ,IAAvD,CAA6BI,cAA7B;AAAA,UAA6CC,KAA7C,GAAuDL,IAAvD,CAA6CK,KAA7C;;AAEA,cAAQH,IAAR;AACE,aAAK,eAAL;AACE,qBAAkCE,cAAlC;AAAA,cAAQE,OAAR,QAAQA,OAAR;AAAA,cAAiBC,YAAjB,QAAiBA,YAAjB;AACA,8BACE,oBAAC,SAAD;AACE,YAAA,OAAO,EAAEJ,OADX;AAEE,YAAA,KAAK,EAAEE,KAFT;AAGE,YAAA,IAAI,EAAEJ,IAHR;AAIE,YAAA,OAAO,EAAEK,OAJX;AAKE,YAAA,YAAY,EAAEC,YALhB;AAME,YAAA,GAAG,YAAKX,WAAL,4BAAkCS,KAAlC;AANL,YADF;;AAUF,aAAK,eAAL;AACE,8BACE,oBAAC,SAAD;AACE,YAAA,KAAK,EAAEA,KADT;AAEE,YAAA,GAAG,YAAKT,WAAL,4BAAkCS,KAAlC;AAFL,aAGOD,cAHP,EADF;;AAOF;AACE,8BACE,oBAAC,MAAD;AACE,YAAA,OAAO,EAAED,OADX;AAEE,YAAA,GAAG,YAAKP,WAAL,gCAAsCS,KAAtC,CAFL;AAGE,YAAA,KAAK,EAAEA,KAHT;AAIE,2BAAY;AAJd,0BAME,oBAAC,IAAD;AAAM,YAAA,IAAI,EAAC,MAAX;AAAkB,YAAA,IAAI,EAAC;AAAvB,YANF,CADF;AAtBJ;AAiCD,KApCD,CADF;AAAA,GADuB,EAuCvB,CAACX,OAAD,EAAUE,WAAV,CAvCuB,CAAzB;AA0CA,sBAAO,0CAAGC,SAAH,CAAP;AACD;;;;"}
1
+ {"version":3,"file":"ToolbarItems.js","sources":["../../../../src/components/Toolbar/ToolbarItems.tsx"],"sourcesContent":["/* eslint-disable no-case-declarations */\nimport React, { useContext, useMemo } from 'react';\nimport { AppPicker, PopupMenu } from '../../outOfTheBox';\nimport { Button } from './styles';\nimport type { AppPickerProps, PopupPropsT } from '../../index.d';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\n const itemsList = useMemo(\n () =>\n toolbar?.map((item) => {\n const { Icon, type, onClick, componentProps, label } = item;\n\n switch (type) {\n case 'ds-popup-menu':\n const { options, closeOnClick } = componentProps as PopupPropsT;\n return (\n <PopupMenu\n onClick={onClick}\n title={label}\n Icon={Icon}\n options={options}\n closeOnClick={closeOnClick}\n key={`${instanceUID}-ds-popup-menu-${label}`}\n />\n );\n case 'ds-app-picker':\n return (\n <AppPicker\n label={label}\n key={`${instanceUID}-ds-app-picker-${label}`}\n {...(componentProps as AppPickerProps)}\n />\n );\n default:\n return (\n <Button\n onClick={onClick}\n key={`${instanceUID}-ds-toolbar-button-${label}`}\n title={label}\n data-testid=\"gh-toolbar-item\"\n >\n <Icon fill=\"#FFF\" size=\"m\" />\n </Button>\n );\n }\n }),\n [toolbar, instanceUID],\n );\n\n return <>{itemsList}</>;\n};\n"],"names":["ToolbarItems","useContext","GlobalHeaderContext","toolbar","props","instanceUID","itemsList","useMemo","map","item","Icon","type","onClick","componentProps","label","options","closeOnClick"],"mappings":";;;;;;;;;;;;;;;;;;IAOaA,YAAY,GAAG,SAAfA,YAAe,GAAmB;EAC7C,kBAGIC,UAAU,CAACC,mBAAD,CAHd;MACWC,OADX,eACEC,KADF,CACWD,OADX;MAEEE,WAFF,eAEEA,WAFF;;EAKA,IAAMC,SAAS,GAAGC,OAAO,CACvB;IAAA,OACEJ,OADF,aACEA,OADF,uBACEA,OAAO,CAAEK,GAAT,CAAa,UAACC,IAAD,EAAU;MACrB,IAAQC,IAAR,GAAuDD,IAAvD,CAAQC,IAAR;UAAcC,IAAd,GAAuDF,IAAvD,CAAcE,IAAd;UAAoBC,OAApB,GAAuDH,IAAvD,CAAoBG,OAApB;UAA6BC,cAA7B,GAAuDJ,IAAvD,CAA6BI,cAA7B;UAA6CC,KAA7C,GAAuDL,IAAvD,CAA6CK,KAA7C;;MAEA,QAAQH,IAAR;QACE,KAAK,eAAL;UACE,WAAkCE,cAAlC;cAAQE,OAAR,QAAQA,OAAR;cAAiBC,YAAjB,QAAiBA,YAAjB;UACA,oBACE,oBAAC,SAAD;YACE,OAAO,EAAEJ,OADX;YAEE,KAAK,EAAEE,KAFT;YAGE,IAAI,EAAEJ,IAHR;YAIE,OAAO,EAAEK,OAJX;YAKE,YAAY,EAAEC,YALhB;YAME,GAAG,YAAKX,WAAL,4BAAkCS,KAAlC;YAPP;;QAUF,KAAK,eAAL;UACE,oBACE,oBAAC,SAAD;YACE,KAAK,EAAEA,KADT;YAEE,GAAG,YAAKT,WAAL,4BAAkCS,KAAlC;aACED,cAHP,EADF;;QAOF;UACE,oBACE,oBAAC,MAAD;YACE,OAAO,EAAED,OADX;YAEE,GAAG,YAAKP,WAAL,gCAAsCS,KAAtC,CAFL;YAGE,KAAK,EAAEA,KAHT;YAIE,eAAY;0BAEZ,oBAAC,IAAD;YAAM,IAAI,EAAC,MAAX;YAAkB,IAAI,EAAC;YANzB,CADF;;KAzBN,CADF;GADuB,EAuCvB,CAACX,OAAD,EAAUE,WAAV,CAvCuB,CAAzB;EA0CA,oBAAO,0CAAGC,SAAH,CAAP;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/components/Toolbar/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const Button = styled.button`\n height: 40px;\n width: 40px;\n border: none;\n background-color: transparent;\n cursor: pointer;\n position: relative;\n outline: none;\n &:hover:not(:focus) {\n background-color: ${({ theme }) => theme.colors.brand[700]};\n outline: none;\n }\n &:focus {\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 4px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 4px;\n }\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: 2px;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n"],"names":["Button","styled","button","theme","colors","brand","neutral"],"mappings":";;IAEaA,MAAM,gBAAGC,MAAM,CAACC,MAAV;AAAA;AAAA,icASK;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CATL,EAoBO;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CApBP,EA+BO;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CA/BP;;;;"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/components/Toolbar/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const Button = styled.button`\n height: 40px;\n width: 40px;\n border: none;\n background-color: transparent;\n cursor: pointer;\n position: relative;\n outline: none;\n &:hover:not(:focus) {\n background-color: ${({ theme }) => theme.colors.brand[700]};\n outline: none;\n }\n &:focus {\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 4px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 4px;\n }\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: 2px;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n"],"names":["Button","styled","button","theme","colors","brand","neutral"],"mappings":";;IAEaA,MAAM,gBAAGC,MAAM,CAACC,MAAV;EAAA;AAAA,icASK;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CATL,EAoBO;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CApBP,EA+BO;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CA/BP;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useGetPropsWithDefaults.js","sources":["../../../src/config/useGetPropsWithDefaults.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport { useMemo } from 'react';\nimport type { GlobalHeaderPropsT } from '../index.d';\nimport { defaultProps } from '../defaultProps';\n\nexport const useGetPropsWithDefaults = (props: GlobalHeaderPropsT): GlobalHeaderPropsT => {\n const { toolbar, breadcrumb, Logo, LogoWithBrand } = props;\n\n return useMemo(\n () => ({\n ...defaultProps,\n ...props,\n }),\n [toolbar, breadcrumb, Logo, LogoWithBrand],\n );\n};\n"],"names":["useGetPropsWithDefaults","props","toolbar","breadcrumb","Logo","LogoWithBrand","useMemo","defaultProps"],"mappings":";;;;;;;IAKaA,uBAAuB,GAAG,SAA1BA,uBAA0B,CAACC,KAAD,EAAmD;AACxF,MAAQC,OAAR,GAAqDD,KAArD,CAAQC,OAAR;AAAA,MAAiBC,UAAjB,GAAqDF,KAArD,CAAiBE,UAAjB;AAAA,MAA6BC,IAA7B,GAAqDH,KAArD,CAA6BG,IAA7B;AAAA,MAAmCC,aAAnC,GAAqDJ,KAArD,CAAmCI,aAAnC;AAEA,SAAOC,OAAO,CACZ;AAAA,2CACKC,YADL,GAEKN,KAFL;AAAA,GADY,EAKZ,CAACC,OAAD,EAAUC,UAAV,EAAsBC,IAAtB,EAA4BC,aAA5B,CALY,CAAd;AAOD;;;;"}
1
+ {"version":3,"file":"useGetPropsWithDefaults.js","sources":["../../../src/config/useGetPropsWithDefaults.tsx"],"sourcesContent":["/* eslint-disable react-hooks/exhaustive-deps */\nimport { useMemo } from 'react';\nimport type { GlobalHeaderPropsT } from '../index.d';\nimport { defaultProps } from '../defaultProps';\n\nexport const useGetPropsWithDefaults = (props: GlobalHeaderPropsT): GlobalHeaderPropsT => {\n const { toolbar, breadcrumb, Logo, LogoWithBrand } = props;\n\n return useMemo(\n () => ({\n ...defaultProps,\n ...props,\n }),\n [toolbar, breadcrumb, Logo, LogoWithBrand],\n );\n};\n"],"names":["useGetPropsWithDefaults","props","toolbar","breadcrumb","Logo","LogoWithBrand","useMemo","defaultProps"],"mappings":";;;;;;;IAKaA,uBAAuB,GAAG,SAA1BA,uBAA0B,CAACC,KAAD,EAAmD;EACxF,IAAQC,OAAR,GAAqDD,KAArD,CAAQC,OAAR;MAAiBC,UAAjB,GAAqDF,KAArD,CAAiBE,UAAjB;MAA6BC,IAA7B,GAAqDH,KAArD,CAA6BG,IAA7B;MAAmCC,aAAnC,GAAqDJ,KAArD,CAAmCI,aAAnC;EAEA,OAAOC,OAAO,CACZ;IAAA,uCACKC,YADL,GAEKN,KAFL;GADY,EAKZ,CAACC,OAAD,EAAUC,UAAV,EAAsBC,IAAtB,EAA4BC,aAA5B,CALY,CAAd;AAOD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useGlobalHeader.js","sources":["../../../src/config/useGlobalHeader.tsx"],"sourcesContent":["import React, { useState, useMemo } from 'react';\nimport { uid } from 'uid';\nimport type { ContextT, GlobalHeaderPropsT } from '../index.d';\nimport { useGetPropsWithDefaults } from './useGetPropsWithDefaults';\n\nexport const useGlobalHeader = (props: GlobalHeaderPropsT): ContextT => {\n const [showIconOnly, setShowIconOnly] = useState<boolean>(false);\n\n const instanceUID = useMemo(() => uid(5), []);\n\n const globalHeaderToolbarGrid = useMemo(() => new Array(props?.toolbar?.length ?? 0).fill('1fr'), [props.toolbar]);\n const globalHeaderBreadcrumbGrid = useMemo(\n () => ['auto', ...new Array(props?.breadcrumb?.length ?? 0).fill('auto'), '1fr'],\n [props.breadcrumb],\n );\n\n const propsWithDefaults = useGetPropsWithDefaults(props);\n\n const ctx = React.useMemo(\n () => ({\n props: propsWithDefaults,\n showIconOnly,\n setShowIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n globalHeaderBreadcrumbGrid,\n }),\n [propsWithDefaults, showIconOnly, instanceUID, globalHeaderToolbarGrid, globalHeaderBreadcrumbGrid],\n );\n\n return ctx;\n};\n"],"names":["useGlobalHeader","props","useState","showIconOnly","setShowIconOnly","instanceUID","useMemo","uid","globalHeaderToolbarGrid","Array","toolbar","length","fill","globalHeaderBreadcrumbGrid","breadcrumb","propsWithDefaults","useGetPropsWithDefaults","ctx","React"],"mappings":";;;;;;;;IAKaA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAyC;AACtE,kBAAwCC,QAAQ,CAAU,KAAV,CAAhD;AAAA;AAAA,MAAOC,YAAP;AAAA,MAAqBC,eAArB;;AAEA,MAAMC,WAAW,GAAGC,OAAO,CAAC;AAAA,WAAMC,GAAG,CAAC,CAAD,CAAT;AAAA,GAAD,EAAe,EAAf,CAA3B;AAEA,MAAMC,uBAAuB,GAAGF,OAAO,CAAC;AAAA;;AAAA,WAAM,IAAIG,KAAJ,0BAAUR,KAAV,aAAUA,KAAV,yCAAUA,KAAK,CAAES,OAAjB,mDAAU,eAAgBC,MAA1B,yEAAoC,CAApC,EAAuCC,IAAvC,CAA4C,KAA5C,CAAN;AAAA,GAAD,EAA2D,CAACX,KAAK,CAACS,OAAP,CAA3D,CAAvC;AACA,MAAMG,0BAA0B,GAAGP,OAAO,CACxC;AAAA;;AAAA,YAAO,MAAP,4BAAkB,IAAIG,KAAJ,0BAAUR,KAAV,aAAUA,KAAV,4CAAUA,KAAK,CAAEa,UAAjB,sDAAU,kBAAmBH,MAA7B,yEAAuC,CAAvC,EAA0CC,IAA1C,CAA+C,MAA/C,CAAlB,IAA0E,KAA1E;AAAA,GADwC,EAExC,CAACX,KAAK,CAACa,UAAP,CAFwC,CAA1C;AAKA,MAAMC,iBAAiB,GAAGC,uBAAuB,CAACf,KAAD,CAAjD;AAEA,MAAMgB,GAAG,GAAGC,KAAK,CAACZ,OAAN,CACV;AAAA,WAAO;AACLL,MAAAA,KAAK,EAAEc,iBADF;AAELZ,MAAAA,YAAY,EAAZA,YAFK;AAGLC,MAAAA,eAAe,EAAfA,eAHK;AAILC,MAAAA,WAAW,EAAXA,WAJK;AAKLG,MAAAA,uBAAuB,EAAvBA,uBALK;AAMLK,MAAAA,0BAA0B,EAA1BA;AANK,KAAP;AAAA,GADU,EASV,CAACE,iBAAD,EAAoBZ,YAApB,EAAkCE,WAAlC,EAA+CG,uBAA/C,EAAwEK,0BAAxE,CATU,CAAZ;AAYA,SAAOI,GAAP;AACD;;;;"}
1
+ {"version":3,"file":"useGlobalHeader.js","sources":["../../../src/config/useGlobalHeader.tsx"],"sourcesContent":["import React, { useState, useMemo } from 'react';\nimport { uid } from 'uid';\nimport type { ContextT, GlobalHeaderPropsT } from '../index.d';\nimport { useGetPropsWithDefaults } from './useGetPropsWithDefaults';\n\nexport const useGlobalHeader = (props: GlobalHeaderPropsT): ContextT => {\n const [showIconOnly, setShowIconOnly] = useState<boolean>(false);\n\n const instanceUID = useMemo(() => uid(5), []);\n\n const globalHeaderToolbarGrid = useMemo(() => new Array(props?.toolbar?.length ?? 0).fill('1fr'), [props.toolbar]);\n const globalHeaderBreadcrumbGrid = useMemo(\n () => ['auto', ...new Array(props?.breadcrumb?.length ?? 0).fill('auto'), '1fr'],\n [props.breadcrumb],\n );\n\n const propsWithDefaults = useGetPropsWithDefaults(props);\n\n const ctx = React.useMemo(\n () => ({\n props: propsWithDefaults,\n showIconOnly,\n setShowIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n globalHeaderBreadcrumbGrid,\n }),\n [propsWithDefaults, showIconOnly, instanceUID, globalHeaderToolbarGrid, globalHeaderBreadcrumbGrid],\n );\n\n return ctx;\n};\n"],"names":["useGlobalHeader","props","useState","showIconOnly","setShowIconOnly","instanceUID","useMemo","uid","globalHeaderToolbarGrid","Array","toolbar","length","fill","globalHeaderBreadcrumbGrid","breadcrumb","propsWithDefaults","useGetPropsWithDefaults","ctx","React"],"mappings":";;;;;;;;IAKaA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAyC;EACtE,gBAAwCC,QAAQ,CAAU,KAAV,CAAhD;;MAAOC,YAAP;MAAqBC,eAArB;;EAEA,IAAMC,WAAW,GAAGC,OAAO,CAAC;IAAA,OAAMC,GAAG,CAAC,CAAD,CAAT;GAAD,EAAe,EAAf,CAA3B;EAEA,IAAMC,uBAAuB,GAAGF,OAAO,CAAC;IAAA;;IAAA,OAAM,IAAIG,KAAJ,0BAAUR,KAAV,aAAUA,KAAV,yCAAUA,KAAK,CAAES,OAAjB,mDAAU,eAAgBC,MAA1B,yEAAoC,CAApC,EAAuCC,IAAvC,CAA4C,KAA5C,CAAN;GAAD,EAA2D,CAACX,KAAK,CAACS,OAAP,CAA3D,CAAvC;EACA,IAAMG,0BAA0B,GAAGP,OAAO,CACxC;IAAA;;IAAA,QAAO,MAAP,4BAAkB,IAAIG,KAAJ,0BAAUR,KAAV,aAAUA,KAAV,4CAAUA,KAAK,CAAEa,UAAjB,sDAAU,kBAAmBH,MAA7B,yEAAuC,CAAvC,EAA0CC,IAA1C,CAA+C,MAA/C,CAAlB,IAA0E,KAA1E;GADwC,EAExC,CAACX,KAAK,CAACa,UAAP,CAFwC,CAA1C;EAKA,IAAMC,iBAAiB,GAAGC,uBAAuB,CAACf,KAAD,CAAjD;EAEA,IAAMgB,GAAG,GAAGC,KAAK,CAACZ,OAAN,CACV;IAAA,OAAO;MACLL,KAAK,EAAEc,iBADF;MAELZ,YAAY,EAAZA,YAFK;MAGLC,eAAe,EAAfA,eAHK;MAILC,WAAW,EAAXA,WAJK;MAKLG,uBAAuB,EAAvBA,uBALK;MAMLK,0BAA0B,EAA1BA;KANF;GADU,EASV,CAACE,iBAAD,EAAoBZ,YAApB,EAAkCE,WAAlC,EAA+CG,uBAA/C,EAAwEK,0BAAxE,CATU,CAAZ;EAYA,OAAOI,GAAP;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useValidateProps.js","sources":["../../../src/config/useValidateProps.tsx"],"sourcesContent":["import { AppPickerProps, GlobalHeaderPropsT, PopupPropsT, ToolbarItemT } from '../index.d';\nimport {\n throwToolbarPopupItemError,\n throwToolbarAppPickerItemError,\n throwToolbarItemGenericError,\n throwLogoError,\n throwBreadcrumbItemError,\n isValidToolbarType,\n isObject,\n} from './validateHelpers';\n\nconst validatePopupItem = (componentProps: PopupPropsT): void => {\n if (componentProps.options && !Array.isArray(componentProps.options)) {\n throwToolbarPopupItemError('options', componentProps.options);\n }\n if (componentProps.closeOnClick && typeof componentProps.closeOnClick !== 'boolean') {\n throwToolbarPopupItemError('closeOnClick', componentProps.closeOnClick);\n }\n};\n\nconst validateAppPickerItem = (componentProps: AppPickerProps): void => {\n if (componentProps.apps && !Array.isArray(componentProps.apps)) {\n throwToolbarAppPickerItemError('apps', componentProps.apps);\n }\n if (componentProps.customApps && !Array.isArray(componentProps.customApps)) {\n throwToolbarAppPickerItemError('customApps', componentProps.customApps);\n }\n if (componentProps.sectionTitle && typeof componentProps.sectionTitle !== 'string') {\n throwToolbarAppPickerItemError('sectionTitle', componentProps.sectionTitle);\n }\n if (componentProps.customSectionTitle && typeof componentProps.customSectionTitle !== 'string') {\n throwToolbarAppPickerItemError('customSectionTitle', componentProps.customSectionTitle);\n }\n};\n\nconst validateGenericToolbarItem = (item: ToolbarItemT): void => {\n if (item.label && typeof item.label !== 'string') {\n throwToolbarItemGenericError('label', item.label);\n }\n if (item.onClick && typeof item.onClick !== 'function') {\n throwToolbarItemGenericError('onClick', item.onClick);\n }\n if (item.Icon && typeof item.Icon !== 'function') {\n if (item.type === 'ds-app-picker') return;\n throwToolbarItemGenericError('Icon', item.Icon);\n }\n};\n\nexport const useValidateProps = (props: GlobalHeaderPropsT): void => {\n const { breadcrumb, toolbar, Logo, LogoWithBrand } = props;\n\n if (Logo && typeof Logo !== 'function') {\n throwLogoError('Logo', Logo);\n }\n\n if (LogoWithBrand && typeof LogoWithBrand !== 'function') {\n throwLogoError('LogoWithBrand', LogoWithBrand);\n }\n\n breadcrumb?.forEach((breadcrumbItem) => {\n if (breadcrumbItem.label && typeof breadcrumbItem.label !== 'string') {\n throwBreadcrumbItemError('label', breadcrumbItem.label);\n }\n if (breadcrumbItem.onClick && typeof breadcrumbItem.onClick !== 'function') {\n throwBreadcrumbItemError('onClick', breadcrumbItem.onClick);\n }\n if (breadcrumbItem.hasNext && typeof breadcrumbItem.hasNext !== 'boolean') {\n throwBreadcrumbItemError('hasNext', breadcrumbItem.hasNext);\n }\n if (breadcrumbItem.isSelected && typeof breadcrumbItem.isSelected !== 'boolean') {\n throwBreadcrumbItemError('isSelected', breadcrumbItem.isSelected);\n }\n });\n\n toolbar?.forEach((toolbarItem) => {\n validateGenericToolbarItem(toolbarItem);\n if (toolbarItem.type) {\n if (!isValidToolbarType(toolbarItem.type)) {\n throwToolbarItemGenericError('type', toolbarItem.type);\n }\n if (toolbarItem.componentProps && !isObject(toolbarItem.componentProps)) {\n throwToolbarItemGenericError('componentProps', toolbarItem.componentProps);\n }\n if (toolbarItem.type === 'ds-popup-menu') {\n validatePopupItem(toolbarItem.componentProps as PopupPropsT);\n } else {\n validateAppPickerItem(toolbarItem.componentProps as AppPickerProps);\n }\n }\n });\n};\n"],"names":["validatePopupItem","componentProps","options","Array","isArray","throwToolbarPopupItemError","closeOnClick","validateAppPickerItem","apps","throwToolbarAppPickerItemError","customApps","sectionTitle","customSectionTitle","validateGenericToolbarItem","item","label","throwToolbarItemGenericError","onClick","Icon","type","useValidateProps","props","breadcrumb","toolbar","Logo","LogoWithBrand","throwLogoError","forEach","breadcrumbItem","throwBreadcrumbItemError","hasNext","isSelected","toolbarItem","isValidToolbarType","isObject"],"mappings":";;;AAWA,IAAMA,iBAAiB,GAAG,SAAp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AAgBD;;;;"}
1
+ {"version":3,"file":"useValidateProps.js","sources":["../../../src/config/useValidateProps.tsx"],"sourcesContent":["import { AppPickerProps, GlobalHeaderPropsT, PopupPropsT, ToolbarItemT } from '../index.d';\nimport {\n throwToolbarPopupItemError,\n throwToolbarAppPickerItemError,\n throwToolbarItemGenericError,\n throwLogoError,\n throwBreadcrumbItemError,\n isValidToolbarType,\n isObject,\n} from './validateHelpers';\n\nconst validatePopupItem = (componentProps: PopupPropsT): void => {\n if (componentProps.options && !Array.isArray(componentProps.options)) {\n throwToolbarPopupItemError('options', componentProps.options);\n }\n if (componentProps.closeOnClick && typeof componentProps.closeOnClick !== 'boolean') {\n throwToolbarPopupItemError('closeOnClick', componentProps.closeOnClick);\n }\n};\n\nconst validateAppPickerItem = (componentProps: AppPickerProps): void => {\n if (componentProps.apps && !Array.isArray(componentProps.apps)) {\n throwToolbarAppPickerItemError('apps', componentProps.apps);\n }\n if (componentProps.customApps && !Array.isArray(componentProps.customApps)) {\n throwToolbarAppPickerItemError('customApps', componentProps.customApps);\n }\n if (componentProps.sectionTitle && typeof componentProps.sectionTitle !== 'string') {\n throwToolbarAppPickerItemError('sectionTitle', componentProps.sectionTitle);\n }\n if (componentProps.customSectionTitle && typeof componentProps.customSectionTitle !== 'string') {\n throwToolbarAppPickerItemError('customSectionTitle', componentProps.customSectionTitle);\n }\n};\n\nconst validateGenericToolbarItem = (item: ToolbarItemT): void => {\n if (item.label && typeof item.label !== 'string') {\n throwToolbarItemGenericError('label', item.label);\n }\n if (item.onClick && typeof item.onClick !== 'function') {\n throwToolbarItemGenericError('onClick', item.onClick);\n }\n if (item.Icon && typeof item.Icon !== 'function') {\n if (item.type === 'ds-app-picker') return;\n throwToolbarItemGenericError('Icon', item.Icon);\n }\n};\n\nexport const useValidateProps = (props: GlobalHeaderPropsT): void => {\n const { breadcrumb, toolbar, Logo, LogoWithBrand } = props;\n\n if (Logo && typeof Logo !== 'function') {\n throwLogoError('Logo', Logo);\n }\n\n if (LogoWithBrand && typeof LogoWithBrand !== 'function') {\n throwLogoError('LogoWithBrand', LogoWithBrand);\n }\n\n breadcrumb?.forEach((breadcrumbItem) => {\n if (breadcrumbItem.label && typeof breadcrumbItem.label !== 'string') {\n throwBreadcrumbItemError('label', breadcrumbItem.label);\n }\n if (breadcrumbItem.onClick && typeof breadcrumbItem.onClick !== 'function') {\n throwBreadcrumbItemError('onClick', breadcrumbItem.onClick);\n }\n if (breadcrumbItem.hasNext && typeof breadcrumbItem.hasNext !== 'boolean') {\n throwBreadcrumbItemError('hasNext', breadcrumbItem.hasNext);\n }\n if (breadcrumbItem.isSelected && typeof breadcrumbItem.isSelected !== 'boolean') {\n throwBreadcrumbItemError('isSelected', breadcrumbItem.isSelected);\n }\n });\n\n toolbar?.forEach((toolbarItem) => {\n validateGenericToolbarItem(toolbarItem);\n if (toolbarItem.type) {\n if (!isValidToolbarType(toolbarItem.type)) {\n throwToolbarItemGenericError('type', toolbarItem.type);\n }\n if (toolbarItem.componentProps && !isObject(toolbarItem.componentProps)) {\n throwToolbarItemGenericError('componentProps', toolbarItem.componentProps);\n }\n if (toolbarItem.type === 'ds-popup-menu') {\n validatePopupItem(toolbarItem.componentProps as PopupPropsT);\n } else {\n validateAppPickerItem(toolbarItem.componentProps as AppPickerProps);\n }\n }\n });\n};\n"],"names":["validatePopupItem","componentProps","options","Array","isArray","throwToolbarPopupItemError","closeOnClick","validateAppPickerItem","apps","throwToolbarAppPickerItemError","customApps","sectionTitle","customSectionTitle","validateGenericToolbarItem","item","label","throwToolbarItemGenericError","onClick","Icon","type","useValidateProps","props","breadcrumb","toolbar","Logo","LogoWithBrand","throwLogoError","forEach","breadcrumbItem","throwBreadcrumbItemError","hasNext","isSelected","toolbarItem","isValidToolbarType","isObject"],"mappings":";;;AAWA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,cAAD,EAAuC;EAC/D,IAAIA,cAAc,CAACC,OAAf,IAA0B,CAACC,KAAK,CAACC,OAAN,CAAcH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E,OAAtB,KAAkC,SAAhE,EAA2E;MACzED,wBAAwB,CAAC,SAAD,EAAYD,cAAc,CAACE,OAA3B,CAAxB;;;IAEF,IAAIF,cAAc,CAACG,UAAf,IAA6B,OAAOH,cAAc,CAACG,UAAtB,KAAqC,SAAtE,EAAiF;MAC/EF,wBAAwB,CAAC,YAAD,EAAeD,cAAc,CAACG,UAA9B,CAAxB;;GAXJ;EAeAR,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAEI,OAAT,CAAiB,UAACK,WAAD,EAAiB;IAChCnB,0BAA0B,CAACmB,WAAD,CAA1B;;IACA,IAAIA,WAAW,CAACb,IAAhB,EAAsB;MACpB,IAAI,CAACc,kBAAkB,CAACD,WAAW,CAACb,IAAb,CAAvB,EAA2C;QACzCH,4BAA4B,CAAC,MAAD,EAASgB,WAAW,CAACb,IAArB,CAA5B;;;MAEF,IAAIa,WAAW,CAAC/B,cAAZ,IAA8B,CAACiC,QAAQ,CAACF,WAAW,CAAC/B,cAAb,CAA3C,EAAyE;QACvEe,4BAA4B,CAAC,gBAAD,EAAmBgB,WAAW,CAAC/B,cAA/B,CAA5B;;;MAEF,IAAI+B,WAAW,CAACb,IAAZ,KAAqB,eAAzB,EAA0C;QACxCnB,iBAAiB,CAACgC,WAAW,CAAC/B,cAAb,CAAjB;OADF,MAEO;QACLM,qBAAqB,CAACyB,WAAW,CAAC/B,cAAb,CAArB;;;GAZN;AAgBD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"validateHelpers.js","sources":["../../../src/config/validateHelpers.tsx"],"sourcesContent":["export const breadcrumbProps = {\n label: 'string',\n onClick: 'function',\n hasNext: 'boolean',\n isSelected: 'boolean',\n};\n\nexport const toolbarProps = {\n label: 'string',\n type: '\"ds-app-picker\" or \"ds-popup-menu\"',\n componentProps: 'object',\n Icon: 'react component',\n onClick: 'function',\n options: 'array',\n closeOnClick: 'boolean',\n apps: 'array',\n customApps: 'array',\n sectionTitle: 'string',\n customSectionTitle: 'string',\n};\n\nexport const isObject = (obj: unknown): boolean => typeof obj === 'object' && !!obj && !Array.isArray(obj);\n\nexport const getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nexport const isValidToolbarType = (string: unknown): boolean =>\n string === 'ds-app-picker' || string === 'ds-popup-menu';\n\nexport const throwBreadcrumbItemError = (validPropKey: keyof typeof breadcrumbProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a breadcrumb item, please provide a valid type.\n\n Received: ${invalidProp} (${typeof invalidProp})\n Expected: (${breadcrumbProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarPopupItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-popup-menu \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarAppPickerItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-app-picker \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarItemGenericError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwLogoError = (validPropKey: string, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a global header, \n remember to provide both Logo and LogoWithBrand properties with a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)}).\n Expected: (react component).\n `,\n );\n};\n"],"names":["breadcrumbProps","label","onClick","hasNext","isSelected","toolbarProps","type","componentProps","Icon","options","closeOnClick","apps","customApps","sectionTitle","customSectionTitle","isObject","obj","Array","isArray","getVariableType","arg","undefined","isValidToolbarType","string","throwBreadcrumbItemError","validPropKey","invalidProp","Error","throwToolbarPopupItemError","throwToolbarAppPickerItemError","throwToolbarItemGenericError","throwLogoError"],"mappings":";;IAAaA,eAAe,GAAG;AAC7BC,EAAAA,KAAK,EAAE,QADsB;AAE7BC,EAAAA,OAAO,EAAE,UAFoB;AAG7BC,EAAAA,OAAO,EAAE,SAHoB;AAI7BC,EAAAA,UAAU,EAAE;AAJiB;IAOlBC,YAAY,GAAG;AAC1BJ,EAAAA,KAAK,EAAE,QADmB;AAE1BK,EAAAA,IAAI,EAAE,oCAFoB;AAG1BC,EAAAA,cAAc,EAAE,QAHU;AAI1BC,EAAAA,IAAI,EAAE,iBAJoB;AAK1BN,EAAAA,OAAO,EAAE,UALiB;AAM1BO,EAAAA,OAAO,EAAE,OANiB;AAO1BC,EAAAA,YAAY,EAAE,SAPY;AAQ1BC,EAAAA,IAAI,EAAE,OARoB;AAS1BC,EAAAA,UAAU,EAAE,OATc;AAU1BC,EAAAA,YAAY,EAAE,QAVY;AAW1BC,EAAAA,kBAAkB,EAAE;AAXM;IAcfC,QAAQ,GAAG,SAAXA,QAAW,CAACC,GAAD;AAAA,SAA2B,QAAOA,GAAP,MAAe,QAAf,IAA2B,CAAC,CAACA,GAA7B,IAAoC,CAACC,KAAK,CAACC,OAAN,CAAcF,GAAd,CAAhE;AAAA;IAEXG,eAAe,GAAG,SAAlBA,eAAkB,CAACC,GAAD,EAA0B;AACvD,MAAIH,KAAK,CAACC,OAAN,CAAcE,GAAd,CAAJ,EAAwB,OAAO,OAAP;AACxB,MAAIA,GAAG,KAAK,IAAZ,EAAkB,OAAO,MAAP;AAClB,MAAIA,GAAG,KAAKC,SAAZ,EAAuB,OAAO,WAAP;AACvB,iBAAcD,GAAd;AACD;IAEYE,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,MAAD;AAAA,SAChCA,MAAM,KAAK,eAAX,IAA8BA,MAAM,KAAK,eADT;AAAA;IAGrBC,wBAAwB,GAAG,SAA3BA,wBAA2B,CAACC,YAAD,EAA6CC,WAA7C,EAA4E;AAClH,QAAM,IAAIC,KAAJ,gDACmCF,YADnC,4FAGMC,WAHN,uBAG6BA,WAH7B,8BAIO1B,eAAe,CAACyB,YAAD,CAJtB,WAAN;AAOD;IAEYG,0BAA0B,GAAG,SAA7BA,0BAA6B,CAACH,YAAD,EAA0CC,WAA1C,EAAyE;AACjH,QAAM,IAAIC,KAAJ,gDACmCF,YADnC,mIAIMC,WAJN,eAIsBP,eAAe,CAACO,WAAD,CAJrC,6BAKOrB,YAAY,CAACoB,YAAD,CALnB,WAAN;AAQD;IAEYI,8BAA8B,GAAG,SAAjCA,8BAAiC,CAACJ,YAAD,EAA0CC,WAA1C,EAAyE;AACrH,QAAM,IAAIC,KAAJ,gDACmCF,YADnC,mIAIMC,WAJN,eAIsBP,eAAe,CAACO,WAAD,CAJrC,6BAKOrB,YAAY,CAACoB,YAAD,CALnB,WAAN;AAQD;IAEYK,4BAA4B,GAAG,SAA/BA,4BAA+B,CAACL,YAAD,EAA0CC,WAA1C,EAAyE;AACnH,QAAM,IAAIC,KAAJ,gDACmCF,YADnC,yFAGMC,WAHN,eAGsBP,eAAe,CAACO,WAAD,CAHrC,6BAIOrB,YAAY,CAACoB,YAAD,CAJnB,WAAN;AAOD;IAEYM,cAAc,GAAG,SAAjBA,cAAiB,CAACN,YAAD,EAAuBC,WAAvB,EAAsD;AAClF,QAAM,IAAIC,KAAJ,gDACmCF,YADnC,iJAIMC,WAJN,eAIsBP,eAAe,CAACO,WAAD,CAJrC,4CAAN;AAQD;;;;"}
1
+ {"version":3,"file":"validateHelpers.js","sources":["../../../src/config/validateHelpers.tsx"],"sourcesContent":["export const breadcrumbProps = {\n label: 'string',\n onClick: 'function',\n hasNext: 'boolean',\n isSelected: 'boolean',\n};\n\nexport const toolbarProps = {\n label: 'string',\n type: '\"ds-app-picker\" or \"ds-popup-menu\"',\n componentProps: 'object',\n Icon: 'react component',\n onClick: 'function',\n options: 'array',\n closeOnClick: 'boolean',\n apps: 'array',\n customApps: 'array',\n sectionTitle: 'string',\n customSectionTitle: 'string',\n};\n\nexport const isObject = (obj: unknown): boolean => typeof obj === 'object' && !!obj && !Array.isArray(obj);\n\nexport const getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nexport const isValidToolbarType = (string: unknown): boolean =>\n string === 'ds-app-picker' || string === 'ds-popup-menu';\n\nexport const throwBreadcrumbItemError = (validPropKey: keyof typeof breadcrumbProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a breadcrumb item, please provide a valid type.\n\n Received: ${invalidProp} (${typeof invalidProp})\n Expected: (${breadcrumbProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarPopupItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-popup-menu \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarAppPickerItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-app-picker \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarItemGenericError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwLogoError = (validPropKey: string, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a global header, \n remember to provide both Logo and LogoWithBrand properties with a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)}).\n Expected: (react component).\n `,\n );\n};\n"],"names":["breadcrumbProps","label","onClick","hasNext","isSelected","toolbarProps","type","componentProps","Icon","options","closeOnClick","apps","customApps","sectionTitle","customSectionTitle","isObject","obj","Array","isArray","getVariableType","arg","undefined","isValidToolbarType","string","throwBreadcrumbItemError","validPropKey","invalidProp","Error","throwToolbarPopupItemError","throwToolbarAppPickerItemError","throwToolbarItemGenericError","throwLogoError"],"mappings":";;IAAaA,eAAe,GAAG;EAC7BC,KAAK,EAAE,QADsB;EAE7BC,OAAO,EAAE,UAFoB;EAG7BC,OAAO,EAAE,SAHoB;EAI7BC,UAAU,EAAE;AAJiB;IAOlBC,YAAY,GAAG;EAC1BJ,KAAK,EAAE,QADmB;EAE1BK,IAAI,EAAE,oCAFoB;EAG1BC,cAAc,EAAE,QAHU;EAI1BC,IAAI,EAAE,iBAJoB;EAK1BN,OAAO,EAAE,UALiB;EAM1BO,OAAO,EAAE,OANiB;EAO1BC,YAAY,EAAE,SAPY;EAQ1BC,IAAI,EAAE,OARoB;EAS1BC,UAAU,EAAE,OATc;EAU1BC,YAAY,EAAE,QAVY;EAW1BC,kBAAkB,EAAE;AAXM;IAcfC,QAAQ,GAAG,SAAXA,QAAW,CAACC,GAAD;EAAA,OAA2B,QAAOA,GAAP,MAAe,QAAf,IAA2B,CAAC,CAACA,GAA7B,IAAoC,CAACC,KAAK,CAACC,OAAN,CAAcF,GAAd,CAAhE;AAAA;IAEXG,eAAe,GAAG,SAAlBA,eAAkB,CAACC,GAAD,EAA0B;EACvD,IAAIH,KAAK,CAACC,OAAN,CAAcE,GAAd,CAAJ,EA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D,CAJrC,4CAAN;AAQD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["import type { GlobalHeaderPropsT } from './index.d';\n\nconst emptyComp = () => null;\n\nexport const defaultProps: GlobalHeaderPropsT = {\n breadcrumb: [],\n toolbar: [],\n LogoWithBrand: emptyComp,\n Logo: emptyComp,\n};\n"],"names":["emptyComp","defaultProps","breadcrumb","toolbar","LogoWithBrand","Logo"],"mappings":"AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY;AAAA,SAAM,IAAN;AAAA,CAAlB;;IAEaC,YAAgC,GAAG;AAC9CC,EAAAA,UAAU,EAAE,EADkC;AAE9CC,EAAAA,OAAO,EAAE,EAFqC;AAG9CC,EAAAA,aAAa,EAAEJ,SAH+B;AAI9CK,EAAAA,IAAI,EAAEL;AAJwC;;;;"}
1
+ {"version":3,"file":"defaultProps.js","sources":["../../src/defaultProps.tsx"],"sourcesContent":["import type { GlobalHeaderPropsT } from './index.d';\n\nconst emptyComp = () => null;\n\nexport const defaultProps: GlobalHeaderPropsT = {\n breadcrumb: [],\n toolbar: [],\n LogoWithBrand: emptyComp,\n Logo: emptyComp,\n};\n"],"names":["emptyComp","defaultProps","breadcrumb","toolbar","LogoWithBrand","Logo"],"mappings":"AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY;EAAA,OAAM,IAAN;AAAA,CAAlB;;IAEaC,YAAgC,GAAG;EAC9CC,UAAU,EAAE,EADkC;EAE9CC,OAAO,EAAE,EAFqC;EAG9CC,aAAa,EAAEJ,SAH+B;EAI9CK,IAAI,EAAEL;AAJwC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AppPicker.js","sources":["../../../../src/outOfTheBox/AppPicker/AppPicker.tsx"],"sourcesContent":["import React, { useState, useRef, useCallback, useMemo } from 'react';\nimport { DSAppPicker } from '@elliemae/ds-app-picker';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { Button } from '../../components/Toolbar/styles';\n\ntype AppPickerProps = React.ComponentProps<typeof DSAppPicker>;\n\nexport const AppPicker = ({\n label,\n apps,\n icon,\n customApps,\n sectionTitle,\n customSectionTitle,\n actionRef,\n isOpen: userIsOpen,\n onKeyDown: userOnKeyDown,\n onClickOutside: userOnClickOutside,\n renderTrigger: userRenderTrigger,\n onClose,\n triggerRef,\n triggerOnClick,\n}: AppPickerProps & {\n label: string;\n triggerOnClick?: React.MouseEventHandler;\n}): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n const handleTriggerKeyDown: React.KeyboardEventHandler = useCallback((e) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n }, []);\n\n const handleAppPickerOnKeyDown: AppPickerProps['onKeyDown'] = useCallback((e) => {\n if (e.code === 'Escape') {\n setIsOpen(false);\n buttonRef?.current?.focus();\n }\n }, []);\n\n const handleOnClickOutside: AppPickerProps['onClickOutside'] = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleOnClick: React.MouseEventHandler = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const renderTrigger: AppPickerProps['renderTrigger'] = useMemo(\n () =>\n ({ ref }) =>\n (\n <div ref={ref}>\n <Button\n onClick={triggerOnClick ?? handleOnClick}\n onKeyDown={handleTriggerKeyDown}\n ref={mergeRefs(buttonRef, triggerRef)}\n title={label}\n data-testid=\"gh-toolbar-item\"\n >\n <MenuPicker fill=\"#FFF\" size=\"m\" />\n </Button>\n </div>\n ),\n [triggerOnClick, handleOnClick, handleTriggerKeyDown, label],\n );\n\n return (\n <DSAppPicker\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n icon={icon}\n onKeyDown={userOnKeyDown ?? handleAppPickerOnKeyDown}\n actionRef={actionRef}\n onClickOutside={userOnClickOutside ?? handleOnClickOutside}\n renderTrigger={userRenderTrigger ?? renderTrigger}\n isOpen={userIsOpen ?? isOpen}\n onClose={onClose}\n triggerRef={triggerRef}\n />\n );\n};\n"],"names":["AppPicker","label","apps","icon","customApps","sectionTitle","customSectionTitle","actionRef","userIsOpen","isOpen","userOnKeyDown","onKeyDown","userOnClickOutside","onClickOutside","userRenderTrigger","renderTrigger","onClose","triggerRef","triggerOnClick","useState","setIsOpen","buttonRef","useRef","handleTriggerKeyDown","useCallback","e","code","handleAppPickerOnKeyDown","current","focus","handleOnClickOutside","handleOnClick","useMemo","ref","mergeRefs"],"mappings":";;;;;;;;IAQaA,SAAS,GAAG,SAAZA,SAAY,OAkBN;AAAA,MAjBjBC,KAiBiB,QAjBjBA,KAiBiB;AAAA,MAhBjBC,IAgBiB,QAhBjBA,IAgBiB;AAAA,MAfjBC,IAeiB,QAfjBA,IAeiB;AAAA,MAdjBC,UAciB,QAdjBA,UAciB;AAAA,MAbjBC,YAaiB,QAbjBA,YAaiB;AAAA,MAZjBC,kBAYiB,QAZjBA,kBAYiB;AAAA,MAXjBC,SAWiB,QAXjBA,SAWiB;AAAA,MAVTC,UAUS,QAVjBC,MAUiB;AAAA,MATNC,aASM,QATjBC,SASiB;AAAA,MARDC,kBAQC,QARjBC,cAQiB;AAAA,MAPFC,iBAOE,QAPjBC,aAOiB;AAAA,MANjBC,OAMiB,QANjBA,OAMiB;AAAA,MALjBC,UAKiB,QALjBA,UAKiB;AAAA,MAJjBC,cAIiB,QAJjBA,cAIiB;;AACjB,kBAA4BC,QAAQ,CAAU,KAAV,CAApC;AAAA;AAAA,MAAOV,MAAP;AAAA,MAAeW,SAAf;;AACA,MAAMC,SAAS,GAAGC,MAAM,CAAoB,IAApB,CAAxB;AAEA,MAAMC,oBAAgD,GAAGC,WAAW,CAAC,UAACC,CAAD,EAAO;AAC1E,QAAIA,CAAC,CAACC,IAAF,KAAW,OAAX,IAAsBD,CAAC,CAACC,IAAF,KAAW,OAArC,EAA8C;AAC5CN,MAAAA,SAAS,CAAC,IAA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Fd;AAGE,IAAA,YAAY,EAAEC,YAHhB;AAIE,IAAA,kBAAkB,EAAEC,kBAJtB;AAKE,IAAA,IAAI,EAAEH,IALR;AAME,IAAA,SAAS,EAAEO,aAAF,aAAEA,aAAF,cAAEA,aAAF,GAAmBiB,wBAN9B;AAOE,IAAA,SAAS,EAAEpB,SAPb;AAQE,IAAA,cAAc,EAAEK,kBAAF,aAAEA,kBAAF,cAAEA,kBAAF,GAAwBkB,oBARxC;AASE,IAAA,aAAa,EAAEhB,iBAAF,aAAEA,iBAAF,cAAEA,iBAAF,GAAuBC,aATtC;AAUE,IAAA,MAAM,EAAEP,UAAF,aAAEA,UAAF,cAAEA,UAAF,GAAgBC,MAVxB;AAWE,IAAA,OAAO,EAAEO,OAXX;AAYE,IAAA,UAAU,EAAEC;AAZd,IADF;AAgBD;;;;"}
1
+ {"version":3,"file":"AppPicker.js","sources":["../../../../src/outOfTheBox/AppPicker/AppPicker.tsx"],"sourcesContent":["import React, { useState, useRef, useCallback, useMemo } from 'react';\nimport { DSAppPicker } from '@elliemae/ds-app-picker';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { Button } from '../../components/Toolbar/styles';\n\ntype AppPickerProps = React.ComponentProps<typeof DSAppPicker>;\n\nexport const AppPicker = ({\n label,\n apps,\n icon,\n customApps,\n sectionTitle,\n customSectionTitle,\n actionRef,\n isOpen: userIsOpen,\n onKeyDown: userOnKeyDown,\n onClickOutside: userOnClickOutside,\n renderTrigger: userRenderTrigger,\n onClose,\n triggerRef,\n triggerOnClick,\n}: AppPickerProps & {\n label: string;\n triggerOnClick?: React.MouseEventHandler;\n}): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n const handleTriggerKeyDown: React.KeyboardEventHandler = useCallback((e) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n }, []);\n\n const handleAppPickerOnKeyDown: AppPickerProps['onKeyDown'] = useCallback((e) => {\n if (e.code === 'Escape') {\n setIsOpen(false);\n buttonRef?.current?.focus();\n }\n }, []);\n\n const handleOnClickOutside: AppPickerProps['onClickOutside'] = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleOnClick: React.MouseEventHandler = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const renderTrigger: AppPickerProps['renderTrigger'] = useMemo(\n () =>\n ({ ref }) =>\n (\n <div ref={ref}>\n <Button\n onClick={triggerOnClick ?? handleOnClick}\n onKeyDown={handleTriggerKeyDown}\n ref={mergeRefs(buttonRef, triggerRef)}\n title={label}\n data-testid=\"gh-toolbar-item\"\n >\n <MenuPicker fill=\"#FFF\" size=\"m\" />\n </Button>\n </div>\n ),\n [triggerOnClick, handleOnClick, handleTriggerKeyDown, label],\n );\n\n return (\n <DSAppPicker\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n icon={icon}\n onKeyDown={userOnKeyDown ?? handleAppPickerOnKeyDown}\n actionRef={actionRef}\n onClickOutside={userOnClickOutside ?? handleOnClickOutside}\n renderTrigger={userRenderTrigger ?? renderTrigger}\n isOpen={userIsOpen ?? isOpen}\n onClose={onClose}\n triggerRef={triggerRef}\n />\n );\n};\n"],"names":["AppPicker","label","apps","icon","customApps","sectionTitle","customSectionTitle","actionRef","userIsOpen","isOpen","userOnKeyDown","onKeyDown","userOnClickOutside","onClickOutside","userRenderTrigger","renderTrigger","onClose","triggerRef","triggerOnClick","useState","setIsOpen","buttonRef","useRef","handleTriggerKeyDown","useCallback","e","code","handleAppPickerOnKeyDown","current","focus","handleOnClickOutside","handleOnClick","useMemo","ref","mergeRefs"],"mappings":";;;;;;;;IAQaA,SAAS,GAAG,SAAZA,SAAY,OAkBN;EAAA,IAjBjBC,KAiBiB,QAjBjBA,KAiBiB;MAhBjBC,IAgBiB,QAhBjBA,IAgBiB;MAfjBC,IAeiB,QAfjBA,IAeiB;MAdjBC,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,EAAEA;sBACR,oBAAC,MAAD;QACE,OAAO,EAAEf,cAAF,aAAEA,cAAF,cAAEA,cAAF,GAAoBa,aAD7B;QAEE,SAAS,EAAER,oBAFb;QAGE,GAAG,EAAEW,SAAS,CAACb,SAAD,EAAYJ,UAAZ,CAHhB;QAIE,KAAK,EAAEhB,KAJT;QAKE,eAAY;sBAEZ,oBAAC,UAAD;QAAY,IAAI,EAAC,MAAjB;QAAwB,IAAI,EAAC;QAP/B,CADF,CAFJ;KADF;GAD4D,EAgB5D,CAACiB,cAAD,EAAiBa,aAAjB,EAAgCR,oBAAhC,EAAsDtB,KAAtD,CAhB4D,CAA9D;EAmBA,oBACE,oBAAC,WAAD;IACE,IAAI,EAAEC,IADR;IAEE,UAAU,EAAEE,UAFd;IAGE,YAAY,EAAEC,YAHhB;IAIE,kBAAkB,EAAEC,kBAJtB;IAKE,IAAI,EAAEH,IALR;IAME,SAAS,EAAEO,aAAF,aAAEA,aAAF,cAAEA,aAAF,GAAmBiB,wBAN9B;IAOE,SAAS,EAAEpB,SAPb;IAQE,cAAc,EAAEK,kBAAF,aAAEA,kBAAF,cAAEA,kBAAF,GAAwBkB,oBARxC;IASE,aAAa,EAAEhB,iBAAF,aAAEA,iBAAF,cAAEA,iBAAF,GAAuBC,aATtC;IAUE,MAAM,EAAEP,UAAF,aAAEA,UAAF,cAAEA,UAAF,GAAgBC,MAVxB;IAWE,OAAO,EAAEO,OAXX;IAYE,UAAU,EAAEC;IAbhB;AAgBD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PopupMenu.js","sources":["../../../../src/outOfTheBox/PopupMenu/PopupMenu.tsx"],"sourcesContent":["import React, { useState, useRef, useCallback, useMemo } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { PopupMenuContent } from './PopupMenuContent';\nimport { Button } from '../../components/Toolbar/styles';\nimport type { PopupPropsT as Props } from '../../index.d';\n\nexport const PopupMenu = ({ Icon, options, closeOnClick, title, onClick }: Props): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const [buttonRef, setButtonRef] = useState<HTMLButtonElement | null>(null);\n\n const handleKeyPress = useCallback((e: React.KeyboardEvent) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n }, []);\n\n const handleOnClose = useCallback(() => {\n setIsOpen(false);\n buttonRef?.focus();\n }, [buttonRef]);\n\n const handleTriggerOnClick = useCallback(\n (e) => {\n setIsOpen(true);\n onClick(e);\n },\n [onClick],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick) handleOnClose();\n }, [closeOnClick, handleOnClose]);\n\n const content = useMemo(\n () => <PopupMenuContent options={options} onItemClick={handleItemClick} onClose={handleOnClose} />,\n [options, handleItemClick, handleOnClose],\n );\n\n return (\n <div>\n <Button\n onClick={handleTriggerOnClick}\n onKeyPress={handleKeyPress}\n title={title}\n ref={setButtonRef}\n data-testid=\"gh-toolbar-item\"\n >\n {Icon && <Icon fill=\"#FFF\" size=\"m\" />}\n </Button>\n <DSPopperJS referenceElement={buttonRef} showPopover={isOpen} closeContextMenu={handleOnClose}>\n {content}\n </DSPopperJS>\n </div>\n );\n};\n"],"names":["PopupMenu","Icon","options","closeOnClick","title","onClick","useState","isOpen","setIsOpen","buttonRef","setButtonRef","handleKeyPress","useCallback","e","code","handleOnClose","focus","handleTriggerOnClick","handleItemClick","content","useMemo"],"mappings":";;;;;;;;;;;;;IAMaA,SAAS,GAAG,SAAZA,SAAY,OAAyE;AAAA,MAAtEC,IAAsE,QAAtEA,IAAsE;AAAA,MAAhEC,OAAgE,QAAhEA,OAAgE;AAAA,MAAvDC,YAAuD,QAAvDA,YAAuD;AAAA,MAAzCC,KAAyC,QAAzCA,KAAyC;AAAA,MAAlCC,OAAkC,QAAlCA,OAAkC;;AAChG,kBAA4BC,QAAQ,CAAU,KAAV,CAApC;AAAA;AAAA,MAAOC,MAAP;AAAA,MAAeC,SAAf;;AACA,mBAAkCF,QAAQ,CAA2B,IAA3B,CAA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AAI,iBAAI,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAC,MAAX;AAAkB,IAAA,IAAI,EAAC;AAAvB,IAPX,CADF,eAUE,oBAAC,UAAD;AAAY,IAAA,gBAAgB,EAAEQ,SAA9B;AAAyC,IAAA,WAAW,EAAEF,MAAtD;AAA8D,IAAA,gBAAgB,EAAEQ;AAAhF,KACGI,OADH,CAVF,CADF;AAgBD;;;;"}
1
+ {"version":3,"file":"PopupMenu.js","sources":["../../../../src/outOfTheBox/PopupMenu/PopupMenu.tsx"],"sourcesContent":["import React, { useState, useRef, useCallback, useMemo } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { PopupMenuContent } from './PopupMenuContent';\nimport { Button } from '../../components/Toolbar/styles';\nimport type { PopupPropsT as Props } from '../../index.d';\n\nexport const PopupMenu = ({ Icon, options, closeOnClick, title, onClick }: Props): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const [buttonRef, setButtonRef] = useState<HTMLButtonElement | null>(null);\n\n const handleKeyPress = useCallback((e: React.KeyboardEvent) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n }, []);\n\n const handleOnClose = useCallback(() => {\n setIsOpen(false);\n buttonRef?.focus();\n }, [buttonRef]);\n\n const handleTriggerOnClick = useCallback(\n (e) => {\n setIsOpen(true);\n onClick(e);\n },\n [onClick],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick) handleOnClose();\n }, [closeOnClick, handleOnClose]);\n\n const content = useMemo(\n () => <PopupMenuContent options={options} onItemClick={handleItemClick} onClose={handleOnClose} />,\n [options, handleItemClick, handleOnClose],\n );\n\n return (\n <div>\n <Button\n onClick={handleTriggerOnClick}\n onKeyPress={handleKeyPress}\n title={title}\n ref={setButtonRef}\n data-testid=\"gh-toolbar-item\"\n >\n {Icon && <Icon fill=\"#FFF\" size=\"m\" />}\n </Button>\n <DSPopperJS referenceElement={buttonRef} showPopover={isOpen} closeContextMenu={handleOnClose}>\n {content}\n </DSPopperJS>\n </div>\n );\n};\n"],"names":["PopupMenu","Icon","options","closeOnClick","title","onClick","useState","isOpen","setIsOpen","buttonRef","setButtonRef","handleKeyPress","useCallback","e","code","handleOnClose","focus","handleTriggerOnClick","handleItemClick","content","useMemo"],"mappings":";;;;;;;;;;;;;IAMaA,SAAS,GAAG,SAAZA,SAAY,OAAyE;EAAA,IAAtEC,IAAsE,QAAtEA,IAAsE;MAAhEC,OAAgE,QAAhEA,OAAgE;MAAvDC,YAAuD,QAAvDA,YAAuD;MAAzCC,KAAyC,QAAzCA,KAAyC;MAAlCC,OAAkC,QAAlCA,OAAkC;;EAChG,gBAA4BC,QAAQ,CAAU,KAAV,CAApC;;MAAOC,MAAP;MAAeC,SAAf;;EACA,iBAAkCF,QAAQ,CAA2B,IAA3B,CAA1C;;MAAOG,SAAP;MAAkBC,YAAlB;;EAEA,IAAMC,cAAc,GAAGC,WAAW,CAAC,UAACC,CAAD,EAA4B;IAC7D,IAAIA,CAAC,CAACC,IAAF,KAAW,OAAX,IAAsBD,CAAC,CAACC,IAAF,KAAW,OAArC,EAA8C;MAC5CN,SAAS,CAAC,IAAD,CAAT;;GAF8B,EAI/B,EAJ+B,CAAlC;EAMA,IAAMO,aAAa,GAAGH,WAAW,CAAC,YAAM;IACtCJ,SAAS,CAAC,KAAD,CAAT;IACAC,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEO,KAAX;GAF+B,EAG9B,CAACP,SAAD,CAH8B,CAAjC;EAKA,IAAMQ,oBAAoB,GAAGL,WAAW,CACtC,UAACC,CAAD,EAAO;IACLL,SAAS,CAAC,IAAD,CAAT;IACAH,OAAO,CAACQ,CAAD,CAAP;GAHoC,EAKtC,CAACR,OAAD,CALsC,CAAxC;EAQA,IAAMa,eAAe,GAAGN,WAAW,CAAC,YAAM;IACxC,IAAIT,YAAJ,EAAkBY,aAAa;GADE,EAEhC,CAACZ,YAAD,EAAeY,aAAf,CAFgC,CAAnC;EAIA,IAAMI,OAAO,GAAGC,OAAO,CACrB;IAAA,oBAAM,oBAAC,gBAAD;MAAkB,OAAO,EAAElB,OAA3B;MAAoC,WAAW,EAAEgB,eAAjD;MAAkE,OAAO,EAAEH;MAAjF;GADqB,EAErB,CAACb,OAAD,EAAUgB,eAAV,EAA2BH,aAA3B,CAFqB,CAAvB;EAKA,oBACE,8CACE,oBAAC,MAAD;IACE,OAAO,EAAEE,oBADX;IAEE,UAAU,EAAEN,cAFd;IAGE,KAAK,EAAEP,KAHT;IAIE,GAAG,EAAEM,YAJP;IAKE,eAAY;KAEXT,IAAI,iBAAI,oBAAC,IAAD;IAAM,IAAI,EAAC,MAAX;IAAkB,IAAI,EAAC;IAPlC,CADF,eAUE,oBAAC,UAAD;IAAY,gBAAgB,EAAEQ,SAA9B;IAAyC,WAAW,EAAEF,MAAtD;IAA8D,gBAAgB,EAAEQ;KAC7EI,OADH,CAVF,CADF;AAgBD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PopupMenuContent.js","sources":["../../../../src/outOfTheBox/PopupMenu/PopupMenuContent.tsx"],"sourcesContent":["import React, { useRef, useEffect, useMemo, useContext } from 'react';\nimport { getAriaProps, getDataProps } from '@elliemae/ds-props-helpers';\nimport { Separator, ItemWrapper, Label, List } from './styles';\nimport type { PopupMenuContentPropsT as Props } from '../../index.d';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const PopupMenuContent = React.memo(({ options, onItemClick, onClose }: Props): JSX.Element => {\n const { instanceUID } = useContext(GlobalHeaderContext);\n\n const menuRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n (menuRef.current?.firstChild as HTMLButtonElement)?.focus();\n }, []);\n\n const content = useMemo(\n () =>\n options.map((option) => {\n const { type, Icon, label = '', onClick, Content } = option;\n\n const ariaAndDataProps = {\n ...getAriaProps(option),\n ...getDataProps(option),\n };\n\n const handleClick = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {\n onItemClick(e);\n if (onClick) onClick(e);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.code === 'Escape') onClose();\n };\n\n switch (type) {\n case 'separator':\n return <Separator key={`${instanceUID}-separator-${label}`} {...ariaAndDataProps} />;\n case 'custom':\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n {...ariaAndDataProps}\n >\n {Content && <Content />}\n </ItemWrapper>\n );\n default:\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n {...ariaAndDataProps}\n >\n {Icon && <Icon />}\n {Label && <Label>{label}</Label>}\n </ItemWrapper>\n );\n }\n }),\n [onClose, onItemClick, options, instanceUID],\n );\n return <List ref={menuRef}>{content}</List>;\n});\n"],"names":["PopupMenuContent","React","memo","options","onItemClick","onClose","useContext","GlobalHeaderContext","instanceUID","menuRef","useRef","useEffect","current","firstChild","focus","content","useMemo","map","option","type","Icon","label","onClick","Content","ariaAndDataProps","getAriaProps","getDataProps","handleClick","e","handleKeyDown","code","Label"],"mappings":";;;;;;;;;;;;IAMaA,gBAAgB,gBAAGC,KAAK,CAACC,IAAN,CAAW,gBAA2D;AAAA,MAAxDC,OAAwD,QAAxDA,OAAwD;AAAA,MAA/CC,WAA+C,QAA/CA,WAA+C;AAAA,MAAlCC,OAAkC,QAAlCA,OAAkC;;AACpG,oBAAwBC,UAAU,CAACC,mBAAD,CAAlC;AAAA,MAAQC,WAAR,eAAQA,WAAR;;AAEA,MAAMC,OAAO,GAAGC,MAAM,CAAiB,IAAjB,CAAtB;AAEAC,EAAAA,SAAS,CAAC,YAAM;AAAA;;AACd,wBAACF,OAAO,CAACG,OAAT,8EAAC,iBAAiBC,UAAlB,gFAAoDC,KAApD;AACD,GAFQ,EAEN,EAFM,CAAT;AAIA,MAAMC,OAAO,GAAGC,OAAO,CACrB;AAAA,WACEb,OAAO,CAACc,GAAR,CAAY,UAACC,MAAD,EAAY;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BAAI,oBAAC,KAAD,QAAQV,KAAR,CAPZ,CADF;AAfJ;AA2BD,KA5CD,CADF;AAAA,GADqB,EA+CrB,CAAChB,OAAD,EAAUD,WAAV,EAAuBD,OAAvB,EAAgCK,WAAhC,CA/CqB,CAAvB;AAiDA,sBAAO,oBAAC,IAAD;AAAM,IAAA,GAAG,EAAEC;AAAX,KAAqBM,OAArB,CAAP;AACD,CA3D+B;;;;"}
1
+ {"version":3,"file":"PopupMenuContent.js","sources":["../../../../src/outOfTheBox/PopupMenu/PopupMenuContent.tsx"],"sourcesContent":["import React, { useRef, useEffect, useMemo, useContext } from 'react';\nimport { getAriaProps, getDataProps } from '@elliemae/ds-props-helpers';\nimport { Separator, ItemWrapper, Label, List } from './styles';\nimport type { PopupMenuContentPropsT as Props } from '../../index.d';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const PopupMenuContent = React.memo(({ options, onItemClick, onClose }: Props): JSX.Element => {\n const { instanceUID } = useContext(GlobalHeaderContext);\n\n const menuRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n (menuRef.current?.firstChild as HTMLButtonElement)?.focus();\n }, []);\n\n const content = useMemo(\n () =>\n options.map((option) => {\n const { type, Icon, label = '', onClick, Content } = option;\n\n const ariaAndDataProps = {\n ...getAriaProps(option),\n ...getDataProps(option),\n };\n\n const handleClick = (e: React.MouseEvent<HTMLElement, MouseEvent>) => {\n onItemClick(e);\n if (onClick) onClick(e);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.code === 'Escape') onClose();\n };\n\n switch (type) {\n case 'separator':\n return <Separator key={`${instanceUID}-separator-${label}`} {...ariaAndDataProps} />;\n case 'custom':\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n {...ariaAndDataProps}\n >\n {Content && <Content />}\n </ItemWrapper>\n );\n default:\n return (\n <ItemWrapper\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n key={`${instanceUID}-popup-${label}`}\n {...ariaAndDataProps}\n >\n {Icon && <Icon />}\n {Label && <Label>{label}</Label>}\n </ItemWrapper>\n );\n }\n }),\n [onClose, onItemClick, options, instanceUID],\n );\n return <List ref={menuRef}>{content}</List>;\n});\n"],"names":["PopupMenuContent","React","memo","options","onItemClick","onClose","useContext","GlobalHeaderContext","instanceUID","menuRef","useRef","useEffect","current","firstChild","focus","content","useMemo","map","option","type","Icon","label","onClick","Content","ariaAndDataProps","getAriaProps","getDataProps","handleClick","e","handleKeyDown","code","Label"],"mappings":";;;;;;;;;;;;IAMaA,gBAAgB,gBAAGC,KAAK,CAACC,IAAN,CAAW,gBAA2D;EAAA,IAAxDC,OAAwD,QAAxDA,OAAwD;MAA/CC,WAA+C,QAA/CA,WAA+C;MAAlCC,OAAkC,QAAlCA,OAAkC;;EACpG,kBAAwBC,UAAU,CAACC,mBAAD,CAAlC;MAAQC,WAAR,eAAQA,WAAR;;EAEA,IAAMC,OAAO,GAAGC,MAAM,CAAiB,IAAjB,CAAtB;EAEAC,SAAS,CAAC,YAAM;IAAA;;IACd,oBAACF,OAAO,CAACG,OAAT,8EAAC,iBAAiBC,UAAlB,gFAAoDC,KAApD;GADO,EAEN,EAFM,CAAT;EAIA,IAAMC,OAAO,GAAGC,OAAO,CACrB;IAAA,OACEb,OAAO,CAACc,GAAR,CAAY,UAACC,MAAD,EAAY;MACtB,IAAQC,IAAR,GAAqDD,MAArD,CAAQC,IAAR;UAAcC,IAAd,GAAqDF,MAArD,CAAcE,IAAd;0BAAqDF,MAArD,CAAoBG,KAApB;UAAoBA,KAApB,8BAA4B,EAA5B;UAAgCC,OAAhC,GAAqDJ,MAArD,CAAgCI,OAAhC;UAAyCC,OAAzC,GAAqDL,MAArD,CAAyCK,OAAzC;;MAEA,IAAMC,gBAAgB,mCACjBC,YAAY,CAACP,MAAD,CADK,GAEjBQ,YAAY,CAACR,MAAD,CAFK,CAAtB;;MAKA,IAAMS,WAAW,GAAG,SAAdA,WAAc,CAACC,CAAD,EAAkD;QACpExB,WAAW,CAACwB,CAAD,CAAX;QACA,IAAIN,OAAJ,EAAaA,OAAO,CAACM,CAAD,CAAP;OAFf;;MAKA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACD,CAAD,EAA4B;QAChD,IAAIA,CAAC,CAACE,IAAF,KAAW,QAAf,EAAyBzB,OAAO;OADlC;;MAIA,QAAQc,IAAR;QACE,KAAK,WAAL;UACE,oBAAO,oBAAC,SAAD;YAAW,GAAG,YAAKX,WAAL,wBAA8Ba,KAA9B;aAA2CG,gBAAzD,EAAP;;QACF,KAAK,QAAL;UACE,oBACE,oBAAC,WAAD;YACE,OAAO,EAAEG,WADX;YAEE,SAAS,EAAEE,aAFb;YAGE,GAAG,YAAKrB,WAAL,oBAA0Ba,KAA1B;aACCG,gBAJN,GAMGD,OAAO,iBAAI,oBAAC,OAAD,OANd,CADF;;QAUF;UACE,oBACE,oBAAC,WAAD;YACE,OAAO,EAAEI,WADX;YAEE,SAAS,EAAEE,aAFb;YAGE,GAAG,YAAKrB,WAAL,oBAA0Ba,KAA1B;aACCG,gBAJN,GAMGJ,IAAI,iBAAI,oBAAC,IAAD,OANX,EAOGW,KAAK,iBAAI,oBAAC,KAAD,QAAQV,KAAR,CAPZ,CADF;;KAhCN,CADF;GADqB,EA+CrB,CAAChB,OAAD,EAAUD,WAAV,EAAuBD,OAAvB,EAAgCK,WAAhC,CA/CqB,CAAvB;EAiDA,oBAAO,oBAAC,IAAD;IAAM,GAAG,EAAEC;KAAUM,OAArB,CAAP;AACD,CA3D+B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../src/outOfTheBox/PopupMenu/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const List = styled.div`\n padding: 5px 0px;\n`;\n\nexport const ItemWrapper = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 0 20px;\n cursor: pointer;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n :hover,\n :focus {\n border: ${({ theme }) => `1px solid ${theme.colors.brand[600]}`};\n }\n`;\n\nexport const Label = styled.p`\n width: 100%;\n font-size: 14px;\n margin: 10px;\n`;\n\nexport const Separator = styled.div`\n width: 100%;\n border: none;\n border-bottom: 1px solid #ccc;\n`;\n"],"names":["List","styled","div","ItemWrapper","button","theme","colors","brand","Label","p","Separator"],"mappings":";;IAEaA,IAAI,gBAAGC,MAAM,CAACC,GAAV;AAAA;AAAA;IAIJC,WAAW,gBAAGF,MAAM,CAACG,MAAV;AAAA;AAAA,2MAYV;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,6BAA4BA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAA5B;AAAA,CAZU;IAgBXC,KAAK,gBAAGP,MAAM,CAACQ,CAAV;AAAA;AAAA;IAMLC,SAAS,gBAAGT,MAAM,CAACC,GAAV;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../src/outOfTheBox/PopupMenu/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const List = styled.div`\n padding: 5px 0px;\n`;\n\nexport const ItemWrapper = styled.button`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 0 20px;\n cursor: pointer;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n :hover,\n :focus {\n border: ${({ theme }) => `1px solid ${theme.colors.brand[600]}`};\n }\n`;\n\nexport const Label = styled.p`\n width: 100%;\n font-size: 14px;\n margin: 10px;\n`;\n\nexport const Separator = styled.div`\n width: 100%;\n border: none;\n border-bottom: 1px solid #ccc;\n`;\n"],"names":["List","styled","div","ItemWrapper","button","theme","colors","brand","Label","p","Separator"],"mappings":";;IAEaA,IAAI,gBAAGC,MAAM,CAACC,GAAV;EAAA;AAAA;IAIJC,WAAW,gBAAGF,MAAM,CAACG,MAAV;EAAA;AAAA,2MAYV;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,2BAA4BA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAA5B;AAAA,CAZU;IAgBXC,KAAK,gBAAGP,MAAM,CAACQ,CAAV;EAAA;AAAA;IAMLC,SAAS,gBAAGT,MAAM,CAACC,GAAV;EAAA;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"propTypes.js","sources":["../../src/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const breadcrumbItem = PropTypes.shape({\n label: PropTypes.string.description('breadrcrumb item label'),\n hasNext: PropTypes.bool.description('whether the item has a child or not'),\n isSelected: PropTypes.bool.description('whether the item is selected or not'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const toolbarItem = PropTypes.shape({\n label: PropTypes.string.description('title tag description'),\n type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu']).description(\n 'use to select one of the out-of-the-box types of items',\n ),\n componentProps: PropTypes.object.description('props of out-of-the-box component'),\n Icon: PropTypes.func.description('Icon to display'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const globalHeaderProps = {\n Logo: PropTypes.func.description(\n 'Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n LogoWithBrand: PropTypes.func.description(\n 'Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n breadcrumb: PropTypes.arrayOf(breadcrumbItem).description('Breadcrumb items to display. max 3 levels'),\n toolbar: PropTypes.arrayOf(toolbarItem).description('Toolbar items'),\n};\n"],"names":["breadcrumbItem","PropTypes","shape","label","string","description","hasNext","bool","isSelected","onClick","func","toolbarItem","type","oneOf","componentProps","object","Icon","globalHeaderProps","Logo","LogoWithBrand","breadcrumb","arrayOf","toolbar"],"mappings":";;IAEaA,cAAc,GAAGC,SAAS,CAACC,KAAV,CAAgB;AAC5CC,EAAAA,KAAK,EAAEF,SAAS,CAACG,MAAV,CAAiBC,WAAjB,CAA6B,wBAA7B,CADqC;AAE5CC,EAAAA,OAAO,EAAEL,SAAS,CAACM,IAAV,CAAeF,WAAf,CAA2B,qCAA3B,CAFmC;AAG5CG,EAAAA,UAAU,EAAEP,SAAS,CAACM,IAAV,CAAeF,WAAf,CAA2B,qCAA3B,CAHgC;AAI5CI,EAAAA,OAAO,EAAER,SAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,4BAA3B;AAJmC,CAAhB;IAOjBM,WAAW,GAAGV,SAAS,CAACC,KAAV,CAAgB;AACzCC,EAAAA,KAAK,EAAEF,SAAS,CAACG,MAAV,CAAiBC,WAAjB,CAA6B,uBAA7B,CADkC;AAEzCO,EAAAA,IAAI,EAAEX,SAAS,CAACY,KAAV,CAAgB,CAAC,eAAD,EAAkB,eAAlB,CAAhB,EAAoDR,WAApD,CACJ,wDADI,CAFmC;AAKzCS,EAAAA,cAAc,EAAEb,SAAS,CAACc,MAAV,CAAiBV,WAAjB,CAA6B,mCAA7B,CALyB;AAMzCW,EAAAA,IAAI,EAAEf,SAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,iBAA3B,CANmC;AAOzCI,EAAAA,OAAO,EAAER,SAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,4BAA3B;AAPgC,CAAhB;IAUdY,iBAAiB,GAAG;AAC/BC,EAAAA,IAAI,EAAEjB,SAAS,CAACS,IAAV,CAAeL,WAAf,CACJ,gGADI,CADyB;AAI/Bc,EAAAA,aAAa,EAAElB,SAAS,CAACS,IAAV,CAAeL,WAAf,CACb,iHADa,CAJgB;AAO/Be,EAAAA,UAAU,EAAEnB,SAAS,CAACoB,OAAV,CAAkBrB,cAAlB,EAAkCK,WAAlC,CAA8C,2CAA9C,CAPmB;AAQ/BiB,EAAAA,OAAO,EAAErB,SAAS,CAACoB,OAAV,CAAkBV,WAAlB,EAA+BN,WAA/B,CAA2C,eAA3C;AARsB;;;;"}
1
+ {"version":3,"file":"propTypes.js","sources":["../../src/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const breadcrumbItem = PropTypes.shape({\n label: PropTypes.string.description('breadrcrumb item label'),\n hasNext: PropTypes.bool.description('whether the item has a child or not'),\n isSelected: PropTypes.bool.description('whether the item is selected or not'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const toolbarItem = PropTypes.shape({\n label: PropTypes.string.description('title tag description'),\n type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu']).description(\n 'use to select one of the out-of-the-box types of items',\n ),\n componentProps: PropTypes.object.description('props of out-of-the-box component'),\n Icon: PropTypes.func.description('Icon to display'),\n onClick: PropTypes.func.description('Callback executed on click'),\n});\n\nexport const globalHeaderProps = {\n Logo: PropTypes.func.description(\n 'Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n LogoWithBrand: PropTypes.func.description(\n 'Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing.',\n ),\n breadcrumb: PropTypes.arrayOf(breadcrumbItem).description('Breadcrumb items to display. max 3 levels'),\n toolbar: PropTypes.arrayOf(toolbarItem).description('Toolbar items'),\n};\n"],"names":["breadcrumbItem","PropTypes","shape","label","string","description","hasNext","bool","isSelected","onClick","func","toolbarItem","type","oneOf","componentProps","object","Icon","globalHeaderProps","Logo","LogoWithBrand","breadcrumb","arrayOf","toolbar"],"mappings":";;IAEaA,cAAc,GAAGC,SAAS,CAACC,KAAV,CAAgB;EAC5CC,KAAK,EAAEF,SAAS,CAACG,MAAV,CAAiBC,WAAjB,CAA6B,wBAA7B,CADqC;EAE5CC,OAAO,EAAEL,SAAS,CAACM,IAAV,CAAeF,WAAf,CAA2B,qCAA3B,CAFmC;EAG5CG,UAAU,EAAEP,SAAS,CAACM,IAAV,CAAeF,WAAf,CAA2B,qCAA3B,CAHgC;EAI5CI,OAAO,EAAER,SAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,4BAA3B;AAJmC,CAAhB;IAOjBM,WAAW,GAAGV,SAAS,CAACC,KAAV,CAAgB;EACzCC,KAAK,EAAEF,SAAS,CAACG,MAAV,CAAiBC,WAAjB,CAA6B,uBAA7B,CADkC;EAEzCO,IAAI,EAAEX,SAAS,CAACY,KAAV,CAAgB,CAAC,eAAD,EAAkB,eAAlB,CAAhB,EAAoDR,WAApD,CACJ,wDADI,CAFmC;EAKzCS,cAAc,EAAEb,SAAS,CAACc,MAAV,CAAiBV,WAAjB,CAA6B,mCAA7B,CALyB;EAMzCW,IAAI,EAAEf,SAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,iBAA3B,CANmC;EAOzCI,OAAO,EAAER,SAAS,CAACS,IAAV,CAAeL,WAAf,CAA2B,4BAA3B;AAPgC,CAAhB;IAUdY,iBAAiB,GAAG;EAC/BC,IAAI,EAAEjB,SAAS,CAACS,IAAV,CAAeL,WAAf,CACJ,gGADI,CADyB;EAI/Bc,aAAa,EAAElB,SAAS,CAACS,IAAV,CAAeL,WAAf,CACb,iHADa,CAJgB;EAO/Be,UAAU,EAAEnB,SAAS,CAACoB,OAAV,CAAkBrB,cAAlB,EAAkCK,WAAlC,CAA8C,2CAA9C,CAPmB;EAQ/BiB,OAAO,EAAErB,SAAS,CAACoB,OAAV,CAAkBV,WAAlB,EAA+BN,WAA/B,CAA2C,eAA3C;AARsB;;;;"}
package/esm/styles.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../src/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { GridContainer } from '@elliemae/ds-grid';\n\nexport const Wrapper = styled(GridContainer)`\n background-image: linear-gradient(45deg, #0f364a 0%, #1b6392 54%, #164566 100%);\n color: ${({ theme }) => theme.colors.neutral['000']};\n width: 100%;\n height: 40px;\n padding: 0 24px 0 12px;\n`;\n"],"names":["Wrapper","styled","GridContainer","theme","colors","neutral"],"mappings":";;;IAGaA,OAAO,gBAAGC,MAAM,CAACC,aAAD,CAAT;AAAA;AAAA,6IAET;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,OAAb,CAAqB,KAArB,CAAf;AAAA,CAFS;;;;"}
1
+ {"version":3,"file":"styles.js","sources":["../../src/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { GridContainer } from '@elliemae/ds-grid';\n\nexport const Wrapper = styled(GridContainer)`\n background-image: linear-gradient(45deg, #0f364a 0%, #1b6392 54%, #164566 100%);\n color: ${({ theme }) => theme.colors.neutral['000']};\n width: 100%;\n height: 40px;\n padding: 0 24px 0 12px;\n`;\n"],"names":["Wrapper","styled","GridContainer","theme","colors","neutral"],"mappings":";;;IAGaA,OAAO,gBAAGC,MAAM,CAACC,aAAD,CAAT;EAAA;AAAA,6IAET;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,MAAN,CAAaC,OAAb,CAAqB,KAArB,CAAf;AAAA,CAFS;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-global-header",
3
- "version": "1.61.10",
3
+ "version": "1.61.13",
4
4
  "license": "MIT",
5
5
  "description": "Ellie Mae - Dim Sum - Global Header",
6
6
  "module": "esm/index.js",
@@ -16,14 +16,14 @@
16
16
  "build": "node ../../scripts/build/build.js"
17
17
  },
18
18
  "dependencies": {
19
- "@elliemae/ds-app-picker": "1.61.10",
20
- "@elliemae/ds-classnames": "1.61.10",
21
- "@elliemae/ds-grid": "1.61.10",
22
- "@elliemae/ds-icons": "1.61.10",
23
- "@elliemae/ds-popover": "1.61.10",
24
- "@elliemae/ds-popperjs": "1.61.10",
25
- "@elliemae/ds-props-helpers": "1.61.10",
26
- "@elliemae/ds-utilities": "1.61.10",
19
+ "@elliemae/ds-app-picker": "1.61.13",
20
+ "@elliemae/ds-classnames": "1.61.13",
21
+ "@elliemae/ds-grid": "1.61.13",
22
+ "@elliemae/ds-icons": "1.61.13",
23
+ "@elliemae/ds-popover": "1.61.13",
24
+ "@elliemae/ds-popperjs": "1.61.13",
25
+ "@elliemae/ds-props-helpers": "1.61.13",
26
+ "@elliemae/ds-utilities": "1.61.13",
27
27
  "react-desc": "^4.1.2",
28
28
  "uid": "2.0.0"
29
29
  },