@elliemae/ds-left-navigation 3.60.0-next.6 → 3.60.0-next.61

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 (159) hide show
  1. package/dist/cjs/LeftNavigation.js +3 -3
  2. package/dist/cjs/LeftNavigation.js.map +2 -2
  3. package/dist/cjs/LeftNavigationContext.js +3 -19
  4. package/dist/cjs/LeftNavigationContext.js.map +2 -2
  5. package/dist/cjs/{configs → config}/index.js +5 -5
  6. package/dist/cjs/{configs → config}/index.js.map +2 -2
  7. package/dist/cjs/{configs → config}/useLeftNavConfig.js +4 -4
  8. package/dist/cjs/config/useLeftNavConfig.js.map +7 -0
  9. package/dist/cjs/{configs → config}/useLeftNavItems.js +4 -5
  10. package/dist/cjs/config/useLeftNavItems.js.map +7 -0
  11. package/dist/cjs/{configs → config}/useLeftNavSmoothExpand.js.map +1 -1
  12. package/dist/cjs/constants/{constants.js → index.js} +41 -2
  13. package/dist/cjs/constants/{constants.js.map → index.js.map} +3 -3
  14. package/dist/cjs/exported-related/ItemRenderer/index.js +12 -3
  15. package/dist/cjs/exported-related/ItemRenderer/index.js.map +3 -3
  16. package/dist/cjs/exported-related/ItemRenderer/styled.js +1 -1
  17. package/dist/cjs/exported-related/ItemRenderer/styled.js.map +1 -1
  18. package/dist/cjs/exported-related/Notifications/index.js +60 -42
  19. package/dist/cjs/exported-related/Notifications/index.js.map +3 -3
  20. package/dist/cjs/exported-related/index.js +16 -7
  21. package/dist/cjs/exported-related/index.js.map +2 -2
  22. package/dist/cjs/hooks/useKeyboardNavigation.js +1 -1
  23. package/dist/cjs/hooks/useKeyboardNavigation.js.map +1 -1
  24. package/dist/cjs/hooks/useSelectFirstBodyItem.js +1 -1
  25. package/dist/cjs/hooks/useSelectFirstBodyItem.js.map +2 -2
  26. package/dist/cjs/index.js +16 -4
  27. package/dist/cjs/index.js.map +2 -2
  28. package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js +16 -5
  29. package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
  30. package/dist/cjs/outOfTheBox/ItemHeader/index.js +20 -8
  31. package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +3 -3
  32. package/dist/cjs/outOfTheBox/ItemLink/index.js +11 -2
  33. package/dist/cjs/outOfTheBox/ItemLink/index.js.map +3 -3
  34. package/dist/cjs/outOfTheBox/ItemSection/index.js +23 -4
  35. package/dist/cjs/outOfTheBox/ItemSection/index.js.map +3 -3
  36. package/dist/cjs/outOfTheBox/ItemSeparator/index.js +11 -3
  37. package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +3 -3
  38. package/dist/cjs/outOfTheBox/ItemSkeleton/index.js +11 -2
  39. package/dist/cjs/outOfTheBox/ItemSkeleton/index.js.map +3 -3
  40. package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +17 -5
  41. package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +3 -3
  42. package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +7 -1
  43. package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +3 -3
  44. package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +16 -5
  45. package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
  46. package/dist/cjs/outOfTheBox/ItemWithDate/index.js +11 -1
  47. package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +3 -3
  48. package/dist/cjs/outOfTheBox/index.js +6 -8
  49. package/dist/cjs/outOfTheBox/index.js.map +2 -2
  50. package/dist/cjs/outOfTheBox/styled.js +1 -1
  51. package/dist/cjs/outOfTheBox/styled.js.map +1 -1
  52. package/dist/cjs/parts/LeftNavContent/index.js +24 -3
  53. package/dist/cjs/parts/LeftNavContent/index.js.map +2 -2
  54. package/dist/cjs/parts/LeftNavContent/styled.js +1 -1
  55. package/dist/cjs/parts/LeftNavContent/styled.js.map +1 -1
  56. package/dist/cjs/parts/LeftNavFooterItem/index.js +13 -13
  57. package/dist/cjs/parts/LeftNavFooterItem/index.js.map +3 -3
  58. package/dist/cjs/parts/LeftNavFooterItem/styled.js +1 -1
  59. package/dist/cjs/parts/LeftNavFooterItem/styled.js.map +1 -1
  60. package/dist/cjs/parts/LeftNavLoading/index.js +26 -10
  61. package/dist/cjs/parts/LeftNavLoading/index.js.map +3 -3
  62. package/dist/cjs/react-desc-prop-types.js +52 -22
  63. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  64. package/dist/cjs/typescript-testing/slot-props.js +94 -0
  65. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  66. package/dist/cjs/typescript-testing/typescript-left-navigation-valid.js +1 -1
  67. package/dist/cjs/typescript-testing/typescript-left-navigation-valid.js.map +1 -1
  68. package/dist/esm/LeftNavigation.js +4 -4
  69. package/dist/esm/LeftNavigation.js.map +2 -2
  70. package/dist/esm/LeftNavigationContext.js +2 -18
  71. package/dist/esm/LeftNavigationContext.js.map +2 -2
  72. package/dist/esm/{configs → config}/index.js +2 -2
  73. package/dist/esm/{configs → config}/index.js.map +2 -2
  74. package/dist/esm/{configs → config}/useLeftNavConfig.js +3 -3
  75. package/dist/esm/config/useLeftNavConfig.js.map +7 -0
  76. package/dist/esm/{configs → config}/useLeftNavItems.js +1 -2
  77. package/dist/esm/config/useLeftNavItems.js.map +7 -0
  78. package/dist/esm/{configs → config}/useLeftNavSmoothExpand.js.map +1 -1
  79. package/dist/esm/constants/{constants.js → index.js} +41 -2
  80. package/dist/esm/constants/{constants.js.map → index.js.map} +3 -3
  81. package/dist/esm/exported-related/ItemRenderer/index.js +12 -3
  82. package/dist/esm/exported-related/ItemRenderer/index.js.map +3 -3
  83. package/dist/esm/exported-related/ItemRenderer/styled.js +1 -1
  84. package/dist/esm/exported-related/ItemRenderer/styled.js.map +1 -1
  85. package/dist/esm/exported-related/Notifications/index.js +60 -42
  86. package/dist/esm/exported-related/Notifications/index.js.map +3 -3
  87. package/dist/esm/exported-related/index.js +12 -6
  88. package/dist/esm/exported-related/index.js.map +2 -2
  89. package/dist/esm/hooks/useKeyboardNavigation.js +1 -1
  90. package/dist/esm/hooks/useKeyboardNavigation.js.map +1 -1
  91. package/dist/esm/hooks/useSelectFirstBodyItem.js +1 -1
  92. package/dist/esm/hooks/useSelectFirstBodyItem.js.map +2 -2
  93. package/dist/esm/index.js +31 -7
  94. package/dist/esm/index.js.map +2 -2
  95. package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js +14 -3
  96. package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
  97. package/dist/esm/outOfTheBox/ItemHeader/index.js +18 -6
  98. package/dist/esm/outOfTheBox/ItemHeader/index.js.map +3 -3
  99. package/dist/esm/outOfTheBox/ItemLink/index.js +11 -2
  100. package/dist/esm/outOfTheBox/ItemLink/index.js.map +3 -3
  101. package/dist/esm/outOfTheBox/ItemSection/index.js +27 -8
  102. package/dist/esm/outOfTheBox/ItemSection/index.js.map +3 -3
  103. package/dist/esm/outOfTheBox/ItemSeparator/index.js +11 -3
  104. package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +3 -3
  105. package/dist/esm/outOfTheBox/ItemSkeleton/index.js +11 -2
  106. package/dist/esm/outOfTheBox/ItemSkeleton/index.js.map +3 -3
  107. package/dist/esm/outOfTheBox/ItemSubmenu/index.js +16 -4
  108. package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +3 -3
  109. package/dist/esm/outOfTheBox/ItemTextLabel/index.js +7 -1
  110. package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +3 -3
  111. package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +14 -3
  112. package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
  113. package/dist/esm/outOfTheBox/ItemWithDate/index.js +11 -1
  114. package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +3 -3
  115. package/dist/esm/outOfTheBox/index.js +5 -7
  116. package/dist/esm/outOfTheBox/index.js.map +2 -2
  117. package/dist/esm/outOfTheBox/styled.js +1 -1
  118. package/dist/esm/outOfTheBox/styled.js.map +1 -1
  119. package/dist/esm/parts/LeftNavContent/index.js +24 -3
  120. package/dist/esm/parts/LeftNavContent/index.js.map +2 -2
  121. package/dist/esm/parts/LeftNavContent/styled.js +1 -1
  122. package/dist/esm/parts/LeftNavContent/styled.js.map +1 -1
  123. package/dist/esm/parts/LeftNavFooterItem/index.js +11 -11
  124. package/dist/esm/parts/LeftNavFooterItem/index.js.map +2 -2
  125. package/dist/esm/parts/LeftNavFooterItem/styled.js +1 -1
  126. package/dist/esm/parts/LeftNavFooterItem/styled.js.map +1 -1
  127. package/dist/esm/parts/LeftNavLoading/index.js +26 -10
  128. package/dist/esm/parts/LeftNavLoading/index.js.map +3 -3
  129. package/dist/esm/react-desc-prop-types.js +59 -23
  130. package/dist/esm/react-desc-prop-types.js.map +2 -2
  131. package/dist/esm/typescript-testing/slot-props.js +71 -0
  132. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  133. package/dist/esm/typescript-testing/typescript-left-navigation-valid.js +1 -1
  134. package/dist/esm/typescript-testing/typescript-left-navigation-valid.js.map +1 -1
  135. package/dist/types/LeftNavigationContext.d.ts +1 -2
  136. package/dist/types/constants/{constants.d.ts → index.d.ts} +32 -0
  137. package/dist/types/exported-related/index.d.ts +5 -6
  138. package/dist/types/index.d.ts +3 -3
  139. package/dist/types/outOfTheBox/ItemSkeleton/index.d.ts +1 -1
  140. package/dist/types/outOfTheBox/index.d.ts +1 -2
  141. package/dist/types/react-desc-prop-types.d.ts +47 -13
  142. package/dist/types/tests/LeftNavigation.exports.test.d.ts +1 -0
  143. package/dist/types/typescript-testing/slot-props.d.ts +1 -0
  144. package/package.json +27 -29
  145. package/dist/cjs/configs/useLeftNavConfig.js.map +0 -7
  146. package/dist/cjs/configs/useLeftNavItems.js.map +0 -7
  147. package/dist/cjs/exported-related/constants.js +0 -71
  148. package/dist/cjs/exported-related/constants.js.map +0 -7
  149. package/dist/esm/configs/useLeftNavConfig.js.map +0 -7
  150. package/dist/esm/configs/useLeftNavItems.js.map +0 -7
  151. package/dist/esm/exported-related/constants.js +0 -41
  152. package/dist/esm/exported-related/constants.js.map +0 -7
  153. package/dist/types/exported-related/constants.d.ts +0 -31
  154. /package/dist/cjs/{configs → config}/useLeftNavSmoothExpand.js +0 -0
  155. /package/dist/esm/{configs → config}/useLeftNavSmoothExpand.js +0 -0
  156. /package/dist/types/{configs → config}/index.d.ts +0 -0
  157. /package/dist/types/{configs → config}/useLeftNavConfig.d.ts +0 -0
  158. /package/dist/types/{configs → config}/useLeftNavItems.d.ts +0 -0
  159. /package/dist/types/{configs → config}/useLeftNavSmoothExpand.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/exported-related/Notifications/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport Grid from '@elliemae/ds-grid';\nimport {\n AlertsSmallFill,\n ExceptionsSmallFill,\n Notifications as InternalNotifications,\n MessagesSmallFill,\n} from '@elliemae/ds-icons';\nimport { styled } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_DATA_TESTID, LEFT_NAVIGATION_SLOTS } from '../../constants/constants.js';\n\nconst StyledIconContainer = styled('div', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.NOTIFICATIONS_CONTAINER,\n})`\n display: flex;\n flex-direction: column;\n align-items: center;\n`;\ntype NotificationsProps = {\n exceptions?: boolean;\n alerts?: boolean;\n messages?: boolean;\n};\nconst StyledInternalNotifications = styled(InternalNotifications, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.NOTIFICATIONS_ICON,\n})``;\nconst StyledExceptionsSmallFillWrapper = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.EXCEPTIONS_ICON_WRAPPER,\n})``;\nconst StyledAlertsSmallFillWrapper = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.ALERTS_ICON_WRAPPER,\n})``;\nconst StyledMessagesSmallFillWrapper = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.MESSAGES_ICON_WRAPPER,\n})``;\n\nexport const Notifications = ({\n exceptions = false,\n alerts = false,\n messages = false,\n}: NotificationsProps): JSX.Element => (\n <StyledIconContainer\n data-testid={LEFT_NAVIGATION_DATA_TESTID.NOTIFICATIONS_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n >\n <StyledInternalNotifications\n size=\"m\"\n color={['brand-primary', '800']}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.NOTIFICATIONS_ICON} // https://jira.elliemae.io/browse/PUI-15589\n />\n {(exceptions || alerts || messages) && (\n <Grid cols={['1fr', '1fr', '1fr']} gutter=\"xxxs\" mt=\"2px\">\n <StyledExceptionsSmallFillWrapper\n width=\"6px\"\n height=\"6px\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.EXCEPTIONS_ICON_WRAPPER} // https://jira.elliemae.io/browse/PUI-15589\n >\n {exceptions && <ExceptionsSmallFill width=\"6px\" height=\"6px\" color={['warning', '900']} />}\n </StyledExceptionsSmallFillWrapper>\n <StyledAlertsSmallFillWrapper\n width=\"6px\"\n height=\"6px\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ALERTS_ICON_WRAPPER} // https://jira.elliemae.io/browse/PUI-15589\n >\n {alerts && <AlertsSmallFill width=\"6px\" height=\"6px\" color={['danger', '900']} />}\n </StyledAlertsSmallFillWrapper>\n <StyledMessagesSmallFillWrapper\n width=\"6px\"\n height=\"6px\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.MESSAGES_ICON_WRAPPER} // https://jira.elliemae.io/browse/PUI-15589\n >\n {messages && <MessagesSmallFill width=\"6px\" height=\"6px\" color={['success', '900']} />}\n </StyledMessagesSmallFillWrapper>\n </Grid>\n )}\n </StyledIconContainer>\n);\n\nexport default Notifications;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiDnB;AAhDJ,qBAAiB;AACjB,sBAKO;AACP,uBAAuB;AACvB,uBAAyF;AAEzF,MAAM,0BAAsB,yBAAO,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA;AAAA;AAUD,MAAM,kCAA8B,yBAAO,gBAAAA,eAAuB;AAAA,EAChE,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AACD,MAAM,uCAAmC,yBAAO,eAAAC,SAAM;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AACD,MAAM,mCAA+B,yBAAO,eAAAA,SAAM;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AACD,MAAM,qCAAiC,yBAAO,eAAAA,SAAM;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAEM,MAAM,gBAAgB,CAAC;AAAA,EAC5B,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;AACb,MACE;AAAA,EAAC;AAAA;AAAA,IACC,eAAa,6CAA4B;AAAA,IAEzC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAO,CAAC,iBAAiB,KAAK;AAAA,UAC9B,eAAa,6CAA4B;AAAA;AAAA,MAC3C;AAAA,OACE,cAAc,UAAU,aACxB,6CAAC,eAAAA,SAAA,EAAK,MAAM,CAAC,OAAO,OAAO,KAAK,GAAG,QAAO,QAAO,IAAG,OAClD;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,QAAO;AAAA,YACP,eAAa,6CAA4B;AAAA,YAExC,wBAAc,4CAAC,uCAAoB,OAAM,OAAM,QAAO,OAAM,OAAO,CAAC,WAAW,KAAK,GAAG;AAAA;AAAA,QAC1F;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,QAAO;AAAA,YACP,eAAa,6CAA4B;AAAA,YAExC,oBAAU,4CAAC,mCAAgB,OAAM,OAAM,QAAO,OAAM,OAAO,CAAC,UAAU,KAAK,GAAG;AAAA;AAAA,QACjF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAM;AAAA,YACN,QAAO;AAAA,YACP,eAAa,6CAA4B;AAAA,YAExC,sBAAY,4CAAC,qCAAkB,OAAM,OAAM,QAAO,OAAM,OAAO,CAAC,WAAW,KAAK,GAAG;AAAA;AAAA,QACtF;AAAA,SACF;AAAA;AAAA;AAEJ;AAGF,IAAO,wBAAQ;",
6
- "names": ["InternalNotifications", "Grid"]
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport React from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport {\n AlertsSmallFill,\n ExceptionsSmallFill,\n Notifications as InternalNotifications,\n MessagesSmallFill,\n} from '@elliemae/ds-icons';\nimport { styled } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_DATA_TESTID, LEFT_NAVIGATION_SLOTS } from '../../constants/index.js';\nimport { LeftNavContext } from '../../LeftNavigationContext.js';\n\nconst StyledIconContainer = styled('div', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.NOTIFICATIONS_CONTAINER,\n})`\n display: flex;\n flex-direction: column;\n align-items: center;\n`;\ntype NotificationsProps = {\n exceptions?: boolean;\n alerts?: boolean;\n messages?: boolean;\n};\nconst StyledInternalNotifications = styled(InternalNotifications, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.NOTIFICATIONS_ICON,\n})``;\nconst StyledExceptionsSmallFillWrapper = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.EXCEPTIONS_ICON_WRAPPER,\n})``;\nconst StyledAlertsSmallFillWrapper = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.ALERTS_ICON_WRAPPER,\n})``;\nconst StyledMessagesSmallFillWrapper = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.MESSAGES_ICON_WRAPPER,\n})``;\n\nexport const Notifications = ({\n exceptions = false,\n alerts = false,\n messages = false,\n}: NotificationsProps): JSX.Element => {\n const ctx = React.useContext(LeftNavContext);\n const { leftNavProps } = ctx;\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n return (\n <StyledIconContainer\n data-testid={LEFT_NAVIGATION_DATA_TESTID.NOTIFICATIONS_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledInternalNotifications\n size=\"m\"\n color={['brand-primary', '800']}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.NOTIFICATIONS_ICON} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n {(exceptions || alerts || messages) && (\n <Grid cols={['1fr', '1fr', '1fr']} gutter=\"xxxs\" mt=\"2px\">\n <StyledExceptionsSmallFillWrapper\n width=\"6px\"\n height=\"6px\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.EXCEPTIONS_ICON_WRAPPER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {exceptions && <ExceptionsSmallFill width=\"6px\" height=\"6px\" color={['warning', '900']} />}\n </StyledExceptionsSmallFillWrapper>\n <StyledAlertsSmallFillWrapper\n width=\"6px\"\n height=\"6px\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ALERTS_ICON_WRAPPER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {alerts && <AlertsSmallFill width=\"6px\" height=\"6px\" color={['danger', '900']} />}\n </StyledAlertsSmallFillWrapper>\n <StyledMessagesSmallFillWrapper\n width=\"6px\"\n height=\"6px\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.MESSAGES_ICON_WRAPPER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {messages && <MessagesSmallFill width=\"6px\" height=\"6px\" color={['success', '900']} />}\n </StyledMessagesSmallFillWrapper>\n </Grid>\n )}\n </StyledIconContainer>\n );\n};\n\nexport default Notifications;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0DjB;AAzDN,mBAAkB;AAClB,qBAAiB;AACjB,sBAKO;AACP,uBAAuB;AACvB,uBAAyF;AACzF,mCAA+B;AAE/B,MAAM,0BAAsB,yBAAO,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA;AAAA;AAUD,MAAM,kCAA8B,yBAAO,gBAAAA,eAAuB;AAAA,EAChE,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AACD,MAAM,uCAAmC,yBAAO,eAAAC,SAAM;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AACD,MAAM,mCAA+B,yBAAO,eAAAA,SAAM;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AACD,MAAM,qCAAiC,yBAAO,eAAAA,SAAM;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAEM,MAAM,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AAM,QAAO,OAAM,OAAO,CAAC,WAAW,KAAK,GAAG;AAAA;AAAA,UACtF;AAAA,WACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,wBAAQ;",
6
+ "names": ["InternalNotifications", "Grid", "React"]
7
7
  }
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
8
12
  var __copyProps = (to, from, except, desc) => {
9
13
  if (from && typeof from === "object" || typeof from === "function") {
10
14
  for (let key of __getOwnPropNames(from))
@@ -13,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
13
17
  }
14
18
  return to;
15
19
  };
16
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
21
  // If the importer is in node compatibility mode or this is not an ESM
19
22
  // file that has been converted to a CommonJS file using a Babel-
@@ -24,12 +27,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
27
  ));
25
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
29
  var exported_related_exports = {};
30
+ __export(exported_related_exports, {
31
+ ChevronItem: () => import_ChevronItem.ChevronItem,
32
+ Icon: () => import_Icon.Icon,
33
+ ItemRenderer: () => import_ItemRenderer.ItemRenderer,
34
+ Notifications: () => import_Notifications.Notifications,
35
+ OpenWindow: () => import_OpenWindowItem.OpenWindow
36
+ });
27
37
  module.exports = __toCommonJS(exported_related_exports);
28
38
  var React = __toESM(require("react"));
29
- __reExport(exported_related_exports, require("./constants.js"), module.exports);
30
- __reExport(exported_related_exports, require("./ItemRenderer/index.js"), module.exports);
31
- __reExport(exported_related_exports, require("./ChevronItem/index.js"), module.exports);
32
- __reExport(exported_related_exports, require("./Notifications/index.js"), module.exports);
33
- __reExport(exported_related_exports, require("./OpenWindowItem/index.js"), module.exports);
34
- __reExport(exported_related_exports, require("./Icon/index.js"), module.exports);
39
+ var import_ItemRenderer = require("./ItemRenderer/index.js");
40
+ var import_ChevronItem = require("./ChevronItem/index.js");
41
+ var import_Notifications = require("./Notifications/index.js");
42
+ var import_OpenWindowItem = require("./OpenWindowItem/index.js");
43
+ var import_Icon = require("./Icon/index.js");
35
44
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/exported-related/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './constants.js';\nexport * from './ItemRenderer/index.js';\nexport * from './ChevronItem/index.js';\nexport * from './Notifications/index.js';\nexport * from './OpenWindowItem/index.js';\nexport * from './Icon/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAAc,2BAAd;AACA,qCAAc,oCADd;AAEA,qCAAc,mCAFd;AAGA,qCAAc,qCAHd;AAIA,qCAAc,sCAJd;AAKA,qCAAc,4BALd;",
4
+ "sourcesContent": ["export { ItemRenderer } from './ItemRenderer/index.js';\nexport { ChevronItem } from './ChevronItem/index.js';\nexport { Notifications } from './Notifications/index.js';\nexport { OpenWindow } from './OpenWindowItem/index.js';\nexport { Icon } from './Icon/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA6B;AAC7B,yBAA4B;AAC5B,2BAA8B;AAC9B,4BAA2B;AAC3B,kBAAqB;",
6
6
  "names": []
7
7
  }
@@ -33,7 +33,7 @@ __export(useKeyboardNavigation_exports, {
33
33
  module.exports = __toCommonJS(useKeyboardNavigation_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_react = require("react");
36
- var import_constants = require("../exported-related/constants.js");
36
+ var import_constants = require("../constants/index.js");
37
37
  var import_LeftNavigationContext = __toESM(require("../LeftNavigationContext.js"));
38
38
  const nextIndex = (index, length) => (index + 1) % length;
39
39
  const prevIndex = (index, length) => (index - 1 + length) % length;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useKeyboardNavigation.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport type React from 'react';\nimport { useCallback, useMemo, useLayoutEffect, useContext } from 'react';\nimport { CHEVRON_BACK_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../exported-related/constants.js';\nimport type { DSLeftNavigationT } from '../react-desc-prop-types.js';\nimport LeftNavContext from '../LeftNavigationContext.js';\n\nconst nextIndex = (index: number, length: number) => (index + 1) % length;\nconst prevIndex = (index: number, length: number) => (index - 1 + length) % length;\n\ntype UseKeyboardNavigationProps = {\n item: DSLeftNavigationT.GenericItemItemProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClick: (e: any) => void;\n};\n\nexport const useKeyboardNavigation = ({ item, onClick }: UseKeyboardNavigationProps): React.KeyboardEventHandler => {\n const {\n dsId,\n itemOpts: { selectable, openable, closable },\n } = item;\n\n const { visibleItems, visibleItemsRefs } = useContext(LeftNavContext);\n\n const currentIndex = useMemo(\n () => visibleItems.findIndex((visibleItemDsId) => visibleItemDsId === dsId),\n [dsId, visibleItems],\n );\n\n const { setFocusedItem, focusedItem, setSelectedItem } = useContext(LeftNavContext);\n\n const focusAndSelect = useCallback(\n (nextDsId: string) => {\n setFocusedItem(nextDsId);\n setSelectedItem(nextDsId);\n },\n [setFocusedItem, setSelectedItem],\n );\n\n useLayoutEffect(() => {\n if (dsId === focusedItem) visibleItemsRefs.current[dsId]?.current?.focus();\n }, [dsId, focusedItem, visibleItemsRefs]);\n\n const onKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n const { key } = e;\n\n // Prevent default behaviour when not tab\n if (key !== 'Tab') {\n e.preventDefault();\n }\n\n if (dsId && (key === 'Enter' || key === ' ')) {\n if (selectable) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === CHEVRON_BACK_DS_ID) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === FOOTER_MENU_CLOSE_DS_ID) {\n onClick(e);\n setFocusedItem(dsId);\n }\n }\n\n if (openable && key === 'ArrowRight') {\n onClick(e);\n }\n\n if (dsId && closable && key === 'ArrowLeft') {\n onClick(e);\n setFocusedItem(dsId);\n }\n\n if (key === 'ArrowDown') {\n const nextDsId = visibleItems[nextIndex(currentIndex, visibleItems.length)];\n setFocusedItem(nextDsId);\n }\n\n if (key === 'ArrowUp') {\n const prevDsId = visibleItems[prevIndex(currentIndex, visibleItems.length)];\n setFocusedItem(prevDsId);\n }\n\n if (key === 'Home') {\n setFocusedItem(visibleItems[0]);\n }\n\n if (key === 'End') {\n setFocusedItem(visibleItems[visibleItems.length - 1]);\n }\n },\n [\n openable,\n closable,\n selectable,\n focusedItem,\n onClick,\n focusAndSelect,\n dsId,\n setFocusedItem,\n visibleItems,\n currentIndex,\n ],\n );\n\n return onKeyDown;\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport type React from 'react';\nimport { useCallback, useMemo, useLayoutEffect, useContext } from 'react';\nimport { CHEVRON_BACK_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from '../constants/index.js';\nimport type { DSLeftNavigationT } from '../react-desc-prop-types.js';\nimport LeftNavContext from '../LeftNavigationContext.js';\n\nconst nextIndex = (index: number, length: number) => (index + 1) % length;\nconst prevIndex = (index: number, length: number) => (index - 1 + length) % length;\n\ntype UseKeyboardNavigationProps = {\n item: DSLeftNavigationT.GenericItemItemProps;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClick: (e: any) => void;\n};\n\nexport const useKeyboardNavigation = ({ item, onClick }: UseKeyboardNavigationProps): React.KeyboardEventHandler => {\n const {\n dsId,\n itemOpts: { selectable, openable, closable },\n } = item;\n\n const { visibleItems, visibleItemsRefs } = useContext(LeftNavContext);\n\n const currentIndex = useMemo(\n () => visibleItems.findIndex((visibleItemDsId) => visibleItemDsId === dsId),\n [dsId, visibleItems],\n );\n\n const { setFocusedItem, focusedItem, setSelectedItem } = useContext(LeftNavContext);\n\n const focusAndSelect = useCallback(\n (nextDsId: string) => {\n setFocusedItem(nextDsId);\n setSelectedItem(nextDsId);\n },\n [setFocusedItem, setSelectedItem],\n );\n\n useLayoutEffect(() => {\n if (dsId === focusedItem) visibleItemsRefs.current[dsId]?.current?.focus();\n }, [dsId, focusedItem, visibleItemsRefs]);\n\n const onKeyDown: React.KeyboardEventHandler = useCallback(\n (e) => {\n const { key } = e;\n\n // Prevent default behaviour when not tab\n if (key !== 'Tab') {\n e.preventDefault();\n }\n\n if (dsId && (key === 'Enter' || key === ' ')) {\n if (selectable) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === CHEVRON_BACK_DS_ID) {\n onClick(e);\n focusAndSelect(dsId);\n } else if (focusedItem === FOOTER_MENU_CLOSE_DS_ID) {\n onClick(e);\n setFocusedItem(dsId);\n }\n }\n\n if (openable && key === 'ArrowRight') {\n onClick(e);\n }\n\n if (dsId && closable && key === 'ArrowLeft') {\n onClick(e);\n setFocusedItem(dsId);\n }\n\n if (key === 'ArrowDown') {\n const nextDsId = visibleItems[nextIndex(currentIndex, visibleItems.length)];\n setFocusedItem(nextDsId);\n }\n\n if (key === 'ArrowUp') {\n const prevDsId = visibleItems[prevIndex(currentIndex, visibleItems.length)];\n setFocusedItem(prevDsId);\n }\n\n if (key === 'Home') {\n setFocusedItem(visibleItems[0]);\n }\n\n if (key === 'End') {\n setFocusedItem(visibleItems[visibleItems.length - 1]);\n }\n },\n [\n openable,\n closable,\n selectable,\n focusedItem,\n onClick,\n focusAndSelect,\n dsId,\n setFocusedItem,\n visibleItems,\n currentIndex,\n ],\n );\n\n return onKeyDown;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,mBAAkE;AAClE,uBAA4D;AAE5D,mCAA2B;AAE3B,MAAM,YAAY,CAAC,OAAe,YAAoB,QAAQ,KAAK;AACnE,MAAM,YAAY,CAAC,OAAe,YAAoB,QAAQ,IAAI,UAAU;AAQrE,MAAM,wBAAwB,CAAC,EAAE,MAAM,QAAQ,MAA8D;AAClH,QAAM;AAAA,IACJ;AAAA,IACA,UAAU,EAAE,YAAY,UAAU,SAAS;AAAA,EAC7C,IAAI;AAEJ,QAAM,EAAE,cAAc,iBAAiB,QAAI,yBAAW,6BAAAA,OAAc;AAEpE,QAAM,mBAAe;AAAA,IACnB,MAAM,aAAa,UAAU,CAAC,oBAAoB,oBAAoB,IAAI;AAAA,IAC1E,CAAC,MAAM,YAAY;AAAA,EACrB;AAEA,QAAM,EAAE,gBAAgB,aAAa,gBAAgB,QAAI,yBAAW,6BAAAA,OAAc;AAElF,QAAM,qBAAiB;AAAA,IACrB,CAAC,aAAqB;AACpB,qBAAe,QAAQ;AACvB,sBAAgB,QAAQ;AAAA,IAC1B;AAAA,IACA,CAAC,gBAAgB,eAAe;AAAA,EAClC;AAEA,oCAAgB,MAAM;AACpB,QAAI,SAAS,YAAa,kBAAiB,QAAQ,IAAI,GAAG,SAAS,MAAM;AAAA,EAC3E,GAAG,CAAC,MAAM,aAAa,gBAAgB,CAAC;AAExC,QAAM,gBAAwC;AAAA,IAC5C,CAAC,MAAM;AACL,YAAM,EAAE,IAAI,IAAI;AAGhB,UAAI,QAAQ,OAAO;AACjB,UAAE,eAAe;AAAA,MACnB;AAEA,UAAI,SAAS,QAAQ,WAAW,QAAQ,MAAM;AAC5C,YAAI,YAAY;AACd,kBAAQ,CAAC;AACT,yBAAe,IAAI;AAAA,QACrB,WAAW,gBAAgB,qCAAoB;AAC7C,kBAAQ,CAAC;AACT,yBAAe,IAAI;AAAA,QACrB,WAAW,gBAAgB,0CAAyB;AAClD,kBAAQ,CAAC;AACT,yBAAe,IAAI;AAAA,QACrB;AAAA,MACF;AAEA,UAAI,YAAY,QAAQ,cAAc;AACpC,gBAAQ,CAAC;AAAA,MACX;AAEA,UAAI,QAAQ,YAAY,QAAQ,aAAa;AAC3C,gBAAQ,CAAC;AACT,uBAAe,IAAI;AAAA,MACrB;AAEA,UAAI,QAAQ,aAAa;AACvB,cAAM,WAAW,aAAa,UAAU,cAAc,aAAa,MAAM,CAAC;AAC1E,uBAAe,QAAQ;AAAA,MACzB;AAEA,UAAI,QAAQ,WAAW;AACrB,cAAM,WAAW,aAAa,UAAU,cAAc,aAAa,MAAM,CAAC;AAC1E,uBAAe,QAAQ;AAAA,MACzB;AAEA,UAAI,QAAQ,QAAQ;AAClB,uBAAe,aAAa,CAAC,CAAC;AAAA,MAChC;AAEA,UAAI,QAAQ,OAAO;AACjB,uBAAe,aAAa,aAAa,SAAS,CAAC,CAAC;AAAA,MACtD;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
6
6
  "names": ["LeftNavContext"]
7
7
  }
@@ -33,7 +33,7 @@ __export(useSelectFirstBodyItem_exports, {
33
33
  module.exports = __toCommonJS(useSelectFirstBodyItem_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_react = require("react");
36
- var import_constants = require("../exported-related/constants.js");
36
+ var import_constants = require("../constants/index.js");
37
37
  const { LEFT_NAV_ITEM_SEPARATOR, LEFT_NAV_ITEM_SECTION } = import_constants.ITEM_TYPES;
38
38
  const isSelectableOutOfTheBox = (elem) => typeof elem.type === "string" && elem.type !== LEFT_NAV_ITEM_SEPARATOR && elem.type !== LEFT_NAV_ITEM_SECTION;
39
39
  const isSelectableCustom = (elem) => elem.itemOpts.selectable;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useSelectFirstBodyItem.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-params */\nimport type React from 'react';\nimport { useEffect } from 'react';\nimport type { DSLeftNavigationT } from '../react-desc-prop-types.js';\nimport { ITEM_TYPES } from '../exported-related/constants.js';\n\nconst { LEFT_NAV_ITEM_SEPARATOR, LEFT_NAV_ITEM_SECTION } = ITEM_TYPES;\n\nconst isSelectableOutOfTheBox = (elem: DSLeftNavigationT.GenericItemItemProps) =>\n typeof elem.type === 'string' && elem.type !== LEFT_NAV_ITEM_SEPARATOR && elem.type !== LEFT_NAV_ITEM_SECTION;\nconst isSelectableCustom = (elem: DSLeftNavigationT.GenericItemItemProps) => elem.itemOpts.selectable;\n\nconst isItemInsideTheTree = (item: DSLeftNavigationT.GenericItemItemProps, itemID: string | null): boolean =>\n item.dsId === itemID || !!item?.itemOpts?.items?.some((it) => isItemInsideTheTree(it, itemID));\n\nexport const useSelectFirstBodyItem = (\n items: DSLeftNavigationT.GenericItemItemProps[],\n openedItem: string | null,\n selectedItem: string | null,\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>,\n disableDefaultSelection: boolean | undefined,\n): void => {\n useEffect(() => {\n if (!disableDefaultSelection && items && items.length && openedItem) {\n const index = items.findIndex((elem) => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));\n const isItemInside = items.some((it) => isItemInsideTheTree(it, selectedItem));\n if (isItemInside) setSelectedItem(selectedItem);\n else if (index !== -1) setSelectedItem(items[index].dsId ?? '');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [openedItem, setSelectedItem, disableDefaultSelection]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA0B;AAE1B,uBAA2B;AAE3B,MAAM,EAAE,yBAAyB,sBAAsB,IAAI;AAE3D,MAAM,0BAA0B,CAAC,SAC/B,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,2BAA2B,KAAK,SAAS;AAC1F,MAAM,qBAAqB,CAAC,SAAiD,KAAK,SAAS;AAE3F,MAAM,sBAAsB,CAAC,MAA8C,WACzE,KAAK,SAAS,UAAU,CAAC,CAAC,MAAM,UAAU,OAAO,KAAK,CAAC,OAAO,oBAAoB,IAAI,MAAM,CAAC;AAExF,MAAM,yBAAyB,CACpC,OACA,YACA,cACA,iBACA,4BACS;AACT,8BAAU,MAAM;AACd,QAAI,CAAC,2BAA2B,SAAS,MAAM,UAAU,YAAY;AACnE,YAAM,QAAQ,MAAM,UAAU,CAAC,SAAS,wBAAwB,IAAI,KAAK,mBAAmB,IAAI,CAAC;AACjG,YAAM,eAAe,MAAM,KAAK,CAAC,OAAO,oBAAoB,IAAI,YAAY,CAAC;AAC7E,UAAI,aAAc,iBAAgB,YAAY;AAAA,eACrC,UAAU,GAAI,iBAAgB,MAAM,KAAK,EAAE,QAAQ,EAAE;AAAA,IAChE;AAAA,EAEF,GAAG,CAAC,YAAY,iBAAiB,uBAAuB,CAAC;AAC3D;",
4
+ "sourcesContent": ["/* eslint-disable max-params */\nimport type React from 'react';\nimport { useEffect } from 'react';\nimport { ITEM_TYPES } from '../constants/index.js';\nimport type { DSLeftNavigationT } from '../react-desc-prop-types.js';\n\nconst { LEFT_NAV_ITEM_SEPARATOR, LEFT_NAV_ITEM_SECTION } = ITEM_TYPES;\n\nconst isSelectableOutOfTheBox = (elem: DSLeftNavigationT.GenericItemItemProps) =>\n typeof elem.type === 'string' && elem.type !== LEFT_NAV_ITEM_SEPARATOR && elem.type !== LEFT_NAV_ITEM_SECTION;\nconst isSelectableCustom = (elem: DSLeftNavigationT.GenericItemItemProps) => elem.itemOpts.selectable;\n\nconst isItemInsideTheTree = (item: DSLeftNavigationT.GenericItemItemProps, itemID: string | null): boolean =>\n item.dsId === itemID || !!item?.itemOpts?.items?.some((it) => isItemInsideTheTree(it, itemID));\n\nexport const useSelectFirstBodyItem = (\n items: DSLeftNavigationT.GenericItemItemProps[],\n openedItem: string | null,\n selectedItem: string | null,\n setSelectedItem: React.Dispatch<React.SetStateAction<string | null>>,\n disableDefaultSelection: boolean | undefined,\n): void => {\n useEffect(() => {\n if (!disableDefaultSelection && items && items.length && openedItem) {\n const index = items.findIndex((elem) => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));\n const isItemInside = items.some((it) => isItemInsideTheTree(it, selectedItem));\n if (isItemInside) setSelectedItem(selectedItem);\n else if (index !== -1) setSelectedItem(items[index].dsId ?? '');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [openedItem, setSelectedItem, disableDefaultSelection]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA0B;AAC1B,uBAA2B;AAG3B,MAAM,EAAE,yBAAyB,sBAAsB,IAAI;AAE3D,MAAM,0BAA0B,CAAC,SAC/B,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,2BAA2B,KAAK,SAAS;AAC1F,MAAM,qBAAqB,CAAC,SAAiD,KAAK,SAAS;AAE3F,MAAM,sBAAsB,CAAC,MAA8C,WACzE,KAAK,SAAS,UAAU,CAAC,CAAC,MAAM,UAAU,OAAO,KAAK,CAAC,OAAO,oBAAoB,IAAI,MAAM,CAAC;AAExF,MAAM,yBAAyB,CACpC,OACA,YACA,cACA,iBACA,4BACS;AACT,8BAAU,MAAM;AACd,QAAI,CAAC,2BAA2B,SAAS,MAAM,UAAU,YAAY;AACnE,YAAM,QAAQ,MAAM,UAAU,CAAC,SAAS,wBAAwB,IAAI,KAAK,mBAAmB,IAAI,CAAC;AACjG,YAAM,eAAe,MAAM,KAAK,CAAC,OAAO,oBAAoB,IAAI,YAAY,CAAC;AAC7E,UAAI,aAAc,iBAAgB,YAAY;AAAA,eACrC,UAAU,GAAI,iBAAgB,MAAM,KAAK,EAAE,QAAQ,EAAE;AAAA,IAChE;AAAA,EAEF,GAAG,CAAC,YAAY,iBAAiB,uBAAuB,CAAC;AAC3D;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -17,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
21
  // If the importer is in node compatibility mode or this is not an ESM
23
22
  // file that has been converted to a CommonJS file using a Babel-
@@ -29,8 +28,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
29
  var index_exports = {};
31
30
  __export(index_exports, {
31
+ CHEVRON_BACK_DS_ID: () => import_constants.CHEVRON_BACK_DS_ID,
32
+ ChevronItem: () => import_exported_related.ChevronItem,
33
+ DSLeftNavigationItemPropTypesSchema: () => import_react_desc_prop_types.DSLeftNavigationItemPropTypesSchema,
32
34
  DSLeftNavigationName: () => import_constants.DSLeftNavigationName,
35
+ DSLeftNavigationPropTypesSchema: () => import_react_desc_prop_types.DSLeftNavigationPropTypesSchema,
33
36
  DSLeftNavigationSlots: () => import_constants.DSLeftNavigationSlots,
37
+ FOOTER_DS_ID: () => import_constants.FOOTER_DS_ID,
38
+ FOOTER_MENU_CLOSE_DS_ID: () => import_constants.FOOTER_MENU_CLOSE_DS_ID,
39
+ ITEM_TYPES: () => import_constants.ITEM_TYPES,
40
+ Icon: () => import_exported_related.Icon,
41
+ ItemRenderer: () => import_exported_related.ItemRenderer,
42
+ LABEL_OVERFLOW: () => import_constants.LABEL_OVERFLOW,
34
43
  LEFT_NAVIGATION_DATA_TESTID: () => import_constants.LEFT_NAVIGATION_DATA_TESTID,
35
44
  LEFT_NAVIGATION_REGION_FOCUSES: () => import_constants.LEFT_NAVIGATION_REGION_FOCUSES,
36
45
  LEFT_NAVIGATION_SLOTS: () => import_constants.LEFT_NAVIGATION_SLOTS,
@@ -38,14 +47,17 @@ __export(index_exports, {
38
47
  LeftNavItemPropsSchema: () => import_react_desc_prop_types.LeftNavItemPropsSchema,
39
48
  LeftNavigation: () => import_LeftNavigation2.LeftNavigation,
40
49
  LeftNavigationWithSchema: () => import_LeftNavigation2.LeftNavigationWithSchema,
50
+ MAP_ITEMS_TO_SKELETON: () => import_constants.MAP_ITEMS_TO_SKELETON,
51
+ Notifications: () => import_exported_related.Notifications,
52
+ OpenWindow: () => import_exported_related.OpenWindow,
41
53
  default: () => index_default
42
54
  });
43
55
  module.exports = __toCommonJS(index_exports);
44
56
  var React = __toESM(require("react"));
45
57
  var import_LeftNavigation = require("./LeftNavigation.js");
46
- var import_react_desc_prop_types = require("./react-desc-prop-types.js");
58
+ var import_constants = require("./constants/index.js");
59
+ var import_exported_related = require("./exported-related/index.js");
47
60
  var import_LeftNavigation2 = require("./LeftNavigation.js");
48
- __reExport(index_exports, require("./exported-related/index.js"), module.exports);
49
- var import_constants = require("./constants/constants.js");
61
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
50
62
  var index_default = import_LeftNavigation.LeftNavigation;
51
63
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { LeftNavigation } from './LeftNavigation.js';\n\nexport default LeftNavigation;\nexport { LeftNavItemPropsSchema, LeftNavItemOptionsSchema, type DSLeftNavigationT } from './react-desc-prop-types.js';\nexport { LeftNavigation, LeftNavigationWithSchema } from './LeftNavigation.js';\nexport * from './exported-related/index.js';\nexport {\n DSLeftNavigationName,\n LEFT_NAVIGATION_SLOTS,\n LEFT_NAVIGATION_REGION_FOCUSES,\n LEFT_NAVIGATION_DATA_TESTID,\n // re-exporting under old alias to avoid not really useful breaking change\n DSLeftNavigationSlots,\n} from './constants/constants.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;AAG/B,mCAAyF;AACzF,IAAAA,yBAAyD;AACzD,0BAAc,wCALd;AAMA,uBAOO;AAXP,IAAO,gBAAQ;",
4
+ "sourcesContent": ["import { LeftNavigation } from './LeftNavigation.js';\n\nexport default LeftNavigation;\nexport {\n CHEVRON_BACK_DS_ID,\n DSLeftNavigationName,\n DSLeftNavigationSlots,\n FOOTER_DS_ID,\n FOOTER_MENU_CLOSE_DS_ID,\n ITEM_TYPES,\n LABEL_OVERFLOW,\n LEFT_NAVIGATION_DATA_TESTID,\n LEFT_NAVIGATION_REGION_FOCUSES,\n LEFT_NAVIGATION_SLOTS,\n MAP_ITEMS_TO_SKELETON,\n} from './constants/index.js';\nexport { ChevronItem, Icon, ItemRenderer, Notifications, OpenWindow } from './exported-related/index.js';\nexport { LeftNavigation, LeftNavigationWithSchema } from './LeftNavigation.js';\nexport {\n DSLeftNavigationItemPropTypesSchema,\n DSLeftNavigationPropTypesSchema,\n LeftNavItemOptionsSchema,\n LeftNavItemPropsSchema,\n type DSLeftNavigationT,\n} from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAA+B;AAG/B,uBAYO;AACP,8BAA2E;AAC3E,IAAAA,yBAAyD;AACzD,mCAMO;AAtBP,IAAO,gBAAQ;",
6
6
  "names": ["import_LeftNavigation"]
7
7
  }
@@ -35,17 +35,17 @@ var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_ds_icons = require("@elliemae/ds-icons");
37
37
  var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
38
- var import_react = require("react");
39
- var import_constants = require("../../constants/constants.js");
38
+ var import_react = __toESM(require("react"));
39
+ var import_constants = require("../../constants/index.js");
40
40
  var import_exported_related = require("../../exported-related/index.js");
41
41
  var import_ItemSeparator = require("../ItemSeparator/index.js");
42
42
  var import_ItemTextLabel = require("../ItemTextLabel/index.js");
43
43
  var import_ItemWithDate = require("../ItemWithDate/index.js");
44
44
  var import_styled = require("../styled.js");
45
45
  const outOfTheBoxSubitemsComponents = {
46
- [import_exported_related.ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: import_ItemSeparator.ItemSeparator,
47
- [import_exported_related.ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: import_ItemWithDate.ItemWithDate,
48
- [import_exported_related.ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: import_ItemTextLabel.ItemTextLabel
46
+ [import_constants.ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: import_ItemSeparator.ItemSeparator,
47
+ [import_constants.ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: import_ItemWithDate.ItemWithDate,
48
+ [import_constants.ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: import_ItemTextLabel.ItemTextLabel
49
49
  };
50
50
  const OutOfTheBoxMapSubitem = (props) => {
51
51
  const {
@@ -82,9 +82,12 @@ const ItemControlledDrilldown = (props) => {
82
82
  },
83
83
  ctx,
84
84
  ctx: {
85
+ leftNavProps,
85
86
  leftNavProps: { labelOverflow: leftNavLabelOverflow }
86
87
  }
87
88
  } = props;
89
+ const getOwnerProps = import_react.default.useCallback(() => leftNavProps, [leftNavProps]);
90
+ const getOwnerPropsArguments = import_react.default.useCallback(() => ({}), []);
88
91
  const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
89
92
  const arrowIcon = (0, import_react.useMemo)(() => {
90
93
  const Component = isOpened ? import_ds_icons.ArrowheadDown : import_ds_icons.ArrowheadRight;
@@ -118,6 +121,8 @@ const ItemControlledDrilldown = (props) => {
118
121
  pl: "xxs",
119
122
  mt: "-2px",
120
123
  "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.ARROW_CONTAINER,
124
+ getOwnerProps,
125
+ getOwnerPropsArguments,
121
126
  children: arrowIcon
122
127
  }
123
128
  ),
@@ -129,6 +134,8 @@ const ItemControlledDrilldown = (props) => {
129
134
  labelBold,
130
135
  labelColor,
131
136
  "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.LIST_ITEM_LABEL_ID_EXCEPTION,
137
+ getOwnerProps,
138
+ getOwnerPropsArguments,
132
139
  children: labelOverflow === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
133
140
  }
134
141
  ),
@@ -140,12 +147,16 @@ const ItemControlledDrilldown = (props) => {
140
147
  alignItems: "center",
141
148
  gutter: "xxs",
142
149
  "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER,
150
+ getOwnerProps,
151
+ getOwnerPropsArguments,
143
152
  children: [
144
153
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
145
154
  import_styled.StyledDate,
146
155
  {
147
156
  ml: "xxs",
148
157
  "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.ITEM_DATE,
158
+ getOwnerProps,
159
+ getOwnerPropsArguments,
149
160
  children: labelRightSection
150
161
  }
151
162
  ),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React, { useMemo } from 'react';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/constants.js';\nimport { ITEM_TYPES, ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { ItemSeparator } from '../ItemSeparator/index.js';\nimport { ItemTextLabel } from '../ItemTextLabel/index.js';\nimport { ItemWithDate } from '../ItemWithDate/index.js';\nimport { StyledArrowContainer, StyledDate, StyledLabel, StyledRightContainer } from '../styled.js';\n\nconst outOfTheBoxSubitemsComponents: Record<string, React.ComponentType<DSLeftNavigationT.ComponentProps>> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n [ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n};\n\nconst OutOfTheBoxMapSubitem: React.ComponentType<DSLeftNavigationT.ComponentProps> = (props) => {\n const {\n item,\n item: { type, Component },\n ctx,\n } = props;\n\n if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];\n const currentIndent = item.itemOpts?.indent ?? 0;\n const newItem = {\n ...item,\n itemOpts: { ...item.itemOpts, indent: currentIndent + 44 },\n };\n return <OutOfTheBoxComponent item={newItem} ctx={ctx} />;\n }\n if (!Component) return null;\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n\nexport const ItemControlledDrilldown = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n isOpened,\n items,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = isOpened ? ArrowheadDown : ArrowheadRight;\n return <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />;\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />);\n }, [isOpened, items, ctx]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: isOpened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !isOpened,\n closable: isOpened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <StyledArrowContainer\n pl=\"xxs\"\n mt=\"-2px\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ARROW_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n >\n {arrowIcon}\n </StyledArrowContainer>\n <StyledLabel\n pb=\"xxxs\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.LIST_ITEM_LABEL_ID_EXCEPTION}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <StyledRightContainer\n pr=\"xxs2\"\n cols={['auto', 'auto']}\n alignItems=\"center\"\n gutter=\"xxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n >\n <StyledDate\n ml=\"xxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_DATE} // https://jira.elliemae.io/browse/PUI-15589\n >\n {labelRightSection}\n </StyledDate>\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BZ;AA/BX,sBAA8C;AAC9C,uCAA2C;AAC3C,mBAA+B;AAC/B,uBAA4C;AAC5C,8BAAyC;AAEzC,2BAA8B;AAC9B,2BAA8B;AAC9B,0BAA6B;AAC7B,oBAAoF;AAEpF,MAAM,gCAAuG;AAAA,EAC3G,CAAC,mCAAW,uBAAuB,GAAG;AAAA,EACtC,CAAC,mCAAW,uBAAuB,GAAG;AAAA,EACtC,CAAC,mCAAW,wBAAwB,GAAG;AACzC;AAEA,MAAM,wBAA+E,CAAC,UAAU;AAC9F,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;AAAA,IACxB;AAAA,EACF,IAAI;AAEJ,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,8BAA8B,IAAI,GAAG;AACrE,UAAM,uBAAuB,8BAA8B,IAAI;AAC/D,UAAM,gBAAgB,KAAK,UAAU,UAAU;AAC/C,UAAM,UAAU;AAAA,MACd,GAAG;AAAA,MACH,UAAU,EAAE,GAAG,KAAK,UAAU,QAAQ,gBAAgB,GAAG;AAAA,IAC3D;AACA,WAAO,4CAAC,wBAAqB,MAAM,SAAS,K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AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH;AAAA,YACA;AAAA,YACA;AAAA,YACA,eAAa,6CAA4B;AAAA,YAExC,4BAAkB,aAAa,4CAAC,+DAA2B,OAAO,OAAO,WAAU,gBAAe,IAAK;AAAA;AAAA,QAC1G;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,MAAM,CAAC,QAAQ,MAAM;AAAA,YACrB,YAAW;AAAA,YACX,QAAO;AAAA,YACP,eAAa,6CAA4B;AAAA,YAEzC;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,IAAG;AAAA,kBACH,eAAa,6CAA4B;AAAA,kBAExC;AAAA;AAAA,cACH;AAAA,cACC,kBAAkB,4CAAC,kBAAe,KAAU,MAAY;AAAA;AAAA;AAAA,QAC3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
6
- "names": []
4
+ "sourcesContent": ["import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React, { useMemo } from 'react';\nimport { ITEM_TYPES, LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { ItemSeparator } from '../ItemSeparator/index.js';\nimport { ItemTextLabel } from '../ItemTextLabel/index.js';\nimport { ItemWithDate } from '../ItemWithDate/index.js';\nimport { StyledArrowContainer, StyledDate, StyledLabel, StyledRightContainer } from '../styled.js';\n\nconst outOfTheBoxSubitemsComponents: Record<string, React.ComponentType<DSLeftNavigationT.ComponentProps>> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n [ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n};\n\nconst OutOfTheBoxMapSubitem: React.ComponentType<DSLeftNavigationT.ComponentProps> = (props) => {\n const {\n item,\n item: { type, Component },\n ctx,\n } = props;\n\n if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];\n const currentIndent = item.itemOpts?.indent ?? 0;\n const newItem = {\n ...item,\n itemOpts: { ...item.itemOpts, indent: currentIndent + 44 },\n };\n return <OutOfTheBoxComponent item={newItem} ctx={ctx} />;\n }\n if (!Component) return null;\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n\nexport const ItemControlledDrilldown = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n isOpened,\n items,\n },\n },\n ctx,\n ctx: {\n leftNavProps,\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = isOpened ? ArrowheadDown : ArrowheadRight;\n return <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />;\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />);\n }, [isOpened, items, ctx]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: isOpened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !isOpened,\n closable: isOpened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <StyledArrowContainer\n pl=\"xxs\"\n mt=\"-2px\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ARROW_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {arrowIcon}\n </StyledArrowContainer>\n <StyledLabel\n pb=\"xxxs\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.LIST_ITEM_LABEL_ID_EXCEPTION}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <StyledRightContainer\n pr=\"xxs2\"\n cols={['auto', 'auto']}\n alignItems=\"center\"\n gutter=\"xxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledDate\n ml=\"xxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_DATE} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {labelRightSection}\n </StyledDate>\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BZ;AA/BX,sBAA8C;AAC9C,uCAA2C;AAC3C,mBAA+B;AAC/B,uBAAwD;AACxD,8BAA6B;AAE7B,2BAA8B;AAC9B,2BAA8B;AAC9B,0BAA6B;AAC7B,oBAAoF;AAEpF,MAAM,gCAAuG;AAAA,EAC3G,CAAC,4BAAW,uBAAuB,GAAG;AAAA,EACtC,CAAC,4BAAW,uBAA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A;AAAA,EACF;AAEJ;",
6
+ "names": ["React"]
7
7
  }
@@ -33,13 +33,12 @@ __export(ItemHeader_exports, {
33
33
  module.exports = __toCommonJS(ItemHeader_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_react = require("react");
37
36
  var import_ds_icons = require("@elliemae/ds-icons");
38
37
  var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
38
+ var import_react = __toESM(require("react"));
39
+ var import_constants = require("../../constants/index.js");
39
40
  var import_exported_related = require("../../exported-related/index.js");
40
41
  var import_styled = require("../styled.js");
41
- var import_constants = require("../../exported-related/constants.js");
42
- var import_constants2 = require("../../constants/constants.js");
43
42
  const notOpenedShadowStyle = (isSelected) => (theme) => `
44
43
  box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
45
44
 
@@ -61,6 +60,7 @@ const ItemHeader = (props) => {
61
60
  },
62
61
  ctx,
63
62
  ctx: {
63
+ leftNavProps,
64
64
  leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },
65
65
  expandedForAnimation,
66
66
  setFocusedItem,
@@ -68,6 +68,8 @@ const ItemHeader = (props) => {
68
68
  selectedParent
69
69
  }
70
70
  } = props;
71
+ const getOwnerProps = import_react.default.useCallback(() => leftNavProps, [leftNavProps]);
72
+ const getOwnerPropsArguments = import_react.default.useCallback(() => ({}), []);
71
73
  const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
72
74
  const opened = openedItem === dsId;
73
75
  const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === "string" ? `${label}, category` : "category");
@@ -101,7 +103,9 @@ const ItemHeader = (props) => {
101
103
  gutter: "1px",
102
104
  pl: opened ? "xxs" : 0,
103
105
  justifyItems: "center",
104
- "data-testid": import_constants2.LEFT_NAVIGATION_DATA_TESTID.LEFT_CONTAINER,
106
+ "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.LEFT_CONTAINER,
107
+ getOwnerProps,
108
+ getOwnerPropsArguments,
105
109
  children: [
106
110
  opened && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
107
111
  import_styled.StyledChevronLeft,
@@ -115,7 +119,9 @@ const ItemHeader = (props) => {
115
119
  setFocusedItem(import_constants.CHEVRON_BACK_DS_ID);
116
120
  },
117
121
  "aria-label": `Close ${ariaLabel}`,
118
- "data-testid": import_constants2.LEFT_NAVIGATION_DATA_TESTID.ITEM_CHEVRON_BACK,
122
+ "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.ITEM_CHEVRON_BACK,
123
+ getOwnerProps,
124
+ getOwnerPropsArguments,
119
125
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallLeft, { size: "m", color: ["brand-primary", "800"] })
120
126
  }
121
127
  ),
@@ -130,7 +136,9 @@ const ItemHeader = (props) => {
130
136
  mt: "xxxs",
131
137
  mb: "15px",
132
138
  labelOverflow,
133
- "data-testid": labelDataTestId || import_constants2.LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL,
139
+ "data-testid": labelDataTestId || import_constants.LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL,
140
+ getOwnerProps,
141
+ getOwnerPropsArguments,
134
142
  children: labelOverflow === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
135
143
  }
136
144
  ),
@@ -144,7 +152,9 @@ const ItemHeader = (props) => {
144
152
  e.stopPropagation();
145
153
  },
146
154
  onKeyDown: (e) => e.stopPropagation(),
147
- "data-testid": import_constants2.LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER,
155
+ "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER,
156
+ getOwnerProps,
157
+ getOwnerPropsArguments,
148
158
  children: RightComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RightComponent, { ctx, item })
149
159
  }
150
160
  ),
@@ -159,7 +169,9 @@ const ItemHeader = (props) => {
159
169
  e.stopPropagation();
160
170
  },
161
171
  onKeyDown: (e) => e.stopPropagation(),
162
- "data-testid": import_constants2.LEFT_NAVIGATION_DATA_TESTID.BOTTOM_CONTAINER,
172
+ "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.BOTTOM_CONTAINER,
173
+ getOwnerProps,
174
+ getOwnerPropsArguments,
163
175
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BottomComponent, { ctx, item })
164
176
  }
165
177
  )
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/outOfTheBox/ItemHeader/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { ChevronSmallLeft } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport {\n StyledItemLabel,\n StyledBottomContainer,\n StyledLeftContainer,\n StyledRightContainer,\n StyledChevronLeft,\n} from '../styled.js';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants.js';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/constants.js';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? `${label}, category` : 'category');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.LEFT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n >\n {opened && (\n <StyledChevronLeft\n buttonType=\"raw\"\n onClick={(e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => {\n if (onItemClick) onItemClick(item, e as React.MouseEvent<HTMLElement>);\n }}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n aria-label={`Close ${ariaLabel}`}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_CHEVRON_BACK} // https://jira.elliemae.io/browse/PUI-15589\n >\n <ChevronSmallLeft size=\"m\" color={['brand-primary', '800']} />\n </StyledChevronLeft>\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n labelOverflow={labelOverflow}\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e: React.FocusEvent) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e: React.KeyboardEvent) => e.stopPropagation()}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e: React.FocusEvent) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e: React.KeyboardEvent) => e.stopPropagation()}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.BOTTOM_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkFjB;AA9EN,mBAAmC;AACnC,sBAAiC;AACjC,uCAA2C;AAE3C,8BAA6B;AAE7B,oBAMO;AACP,uBAAmC;AACnC,IAAAA,oBAA4C;AAE5C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,IAAG;AAAA,YACH,SAAS,CAAC,MAAwB;AAChC,6BAAe,IAAI;AACnB,gBAAE,gBAAgB;AAAA,YACpB;AAAA,YACA,WAAW,CAAC,MAA2B,EAAE,gBAAgB;AAAA,YACzD,eAAa,8CAA4B;AAAA,YAEzC,sDAAC,mBAAgB,KAAU,MAAY;AAAA;AAAA,QACzC;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
6
- "names": ["import_constants"]
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport { ChevronSmallLeft } from '@elliemae/ds-icons';\nimport type { Theme } from '@elliemae/ds-system';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React, { useCallback } from 'react';\nimport { CHEVRON_BACK_DS_ID, LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport {\n StyledBottomContainer,\n StyledChevronLeft,\n StyledItemLabel,\n StyledLeftContainer,\n StyledRightContainer,\n} from '../styled.js';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps,\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? `${label}, category` : 'category');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.LEFT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {opened && (\n <StyledChevronLeft\n buttonType=\"raw\"\n onClick={(e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => {\n if (onItemClick) onItemClick(item, e as React.MouseEvent<HTMLElement>);\n }}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n aria-label={`Close ${ariaLabel}`}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_CHEVRON_BACK} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <ChevronSmallLeft size=\"m\" color={['brand-primary', '800']} />\n </StyledChevronLeft>\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n labelOverflow={labelOverflow}\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e: React.FocusEvent) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e: React.KeyboardEvent) => e.stopPropagation()}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e: React.FocusEvent) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e: React.KeyboardEvent) => e.stopPropagation()}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.BOTTOM_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YA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G;AAAA,YACH,IAAI,SAAS,SAAS;AAAA,YACtB,SAAS,CAAC,MAAwB;AAChC,6BAAe,IAAI;AACnB,gBAAE,gBAAgB;AAAA,YACpB;AAAA,YACA,WAAW,CAAC,MAA2B,EAAE,gBAAgB;AAAA,YACzD,eAAa,6CAA4B;AAAA,YACzC;AAAA,YACA;AAAA,YAEC,4BAAkB,4CAAC,kBAAe,KAAU,MAAY;AAAA;AAAA,QAC3D;AAAA,QACC,mBACC;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,SAAS,CAAC,MAAwB;AAChC,6BAAe,IAAI;AACnB,gBAAE,gBAAgB;AAAA,YACpB;AAAA,YACA,WAAW,CAAC,MAA2B,EAAE,gBAAgB;AAAA,YACzD,eAAa,6CAA4B;AAAA,YACzC;AAAA,YACA;AAAA,YAEA,sDAAC,mBAAgB,KAAU,MAAY;AAAA;AAAA,QACzC;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
6
+ "names": ["React"]
7
7
  }
@@ -33,11 +33,11 @@ __export(ItemLink_exports, {
33
33
  module.exports = __toCommonJS(ItemLink_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_react = require("react");
37
36
  var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
37
+ var import_react = __toESM(require("react"));
38
+ var import_constants = require("../../constants/index.js");
38
39
  var import_exported_related = require("../../exported-related/index.js");
39
40
  var import_styled = require("../styled.js");
40
- var import_constants = require("../../constants/constants.js");
41
41
  const notOpenedShadowStyle = (isSelected) => (theme) => `
42
42
  box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
43
43
 
@@ -59,11 +59,14 @@ const ItemLink = (props) => {
59
59
  },
60
60
  ctx,
61
61
  ctx: {
62
+ leftNavProps,
62
63
  leftNavProps: { labelOverflow: leftNavLabelOverflow },
63
64
  selectedItem,
64
65
  selectedParent
65
66
  }
66
67
  } = props;
68
+ const getOwnerProps = import_react.default.useCallback(() => leftNavProps, [leftNavProps]);
69
+ const getOwnerPropsArguments = import_react.default.useCallback(() => ({}), []);
67
70
  const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
68
71
  const isSelected = selectedItem === dsId || selectedParent === dsId;
69
72
  const shadowStyle = (0, import_react.useCallback)(
@@ -90,6 +93,8 @@ const ItemLink = (props) => {
90
93
  gutter: "1px",
91
94
  justifyItems: "center",
92
95
  "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.LEFT_CONTAINER,
96
+ getOwnerProps,
97
+ getOwnerPropsArguments,
93
98
  children: CollapsedComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsedComponent, { item, ctx })
94
99
  }
95
100
  ),
@@ -101,6 +106,8 @@ const ItemLink = (props) => {
101
106
  mb: "15px",
102
107
  labelOverflow,
103
108
  "data-testid": labelDataTestId || import_constants.LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL,
109
+ getOwnerProps,
110
+ getOwnerPropsArguments,
104
111
  children: labelOverflow === "truncate" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
105
112
  }
106
113
  ),
@@ -110,6 +117,8 @@ const ItemLink = (props) => {
110
117
  mt: "xxxs",
111
118
  pr: "xxs2",
112
119
  "data-testid": import_constants.LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER,
120
+ getOwnerProps,
121
+ getOwnerPropsArguments,
113
122
  children: RightComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RightComponent, { ctx, item })
114
123
  }
115
124
  )
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/outOfTheBox/ItemLink/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport type { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled.js';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/constants.js';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemLink = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={['38px']}\n gutter=\"1px\"\n justifyItems=\"center\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.LEFT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n >\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"1px\"\n mt=\"xxxs\"\n mb=\"15px\"\n labelOverflow={labelOverflow}\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n mt=\"xxxs\"\n pr=\"xxs2\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiDnB;AAhDJ,mBAAmC;AACnC,uCAA2C;AAE3C,8BAA6B;AAE7B,oBAA2E;AAC3E,uBAA4C;AAE5C,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,aAAa;AAAA;AAAA;AAAA,kCAGlD,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,kCAI9D,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAIlD,MAAM,WAAW,CAAC,UAAyD;AAChF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,eAAe,kBAAkB;AAAA,MACrF,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe,qBAAqB;AAAA,MACpD;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,aAAa,iBAAiB,QAAQ,mBAAmB;AAE/D,QAAM,kBAAc;AAAA,IAClB,CAAC,YAAqB,CAAC,UACrB,CAAC,UAAU,qBAAqB,UAAU,EAAE,KAAK,IAAI;AAAA,IACvD,CAAC,UAAU;AAAA,EACb;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,GAAG;AAAA,QACH,UAAU;AAAA,UACR,WAAW,OAAO,UAAU,WAAW,QAAQ;AAAA,UAC/C,GAAG,KAAK;AAAA,UACR,YAAY;AAAA,QACd;AAAA,MACF;AAAA,MACA;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,CAAC,MAAM;AAAA,YACb,QAAO;AAAA,YACP,cAAa;AAAA,YACb,eAAa,6CAA4B;AAAA,YAExC,gCAAsB,4CAAC,sBAAmB,MAAY,KAAU;AAAA;AAAA,QACnE;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH;AAAA,YACA,eAAa,mBAAmB,6CAA4B;AAAA,YAE3D,4BAAkB,aAAa,4CAAC,+DAA2B,OAAO,OAAO,WAAU,gBAAe,IAAK;AAAA;AAAA,QAC1G;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAG;AAAA,YACH,eAAa,6CAA4B;AAAA,YAExC,4BAAkB,4CAAC,kBAAe,KAAU,MAAY;AAAA;AAAA,QAC3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
6
- "names": []
4
+ "sourcesContent": ["/* eslint-disable indent */\nimport type { Theme } from '@elliemae/ds-system';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React, { useCallback } from 'react';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled.js';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemLink = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps,\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={['38px']}\n gutter=\"1px\"\n justifyItems=\"center\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.LEFT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"1px\"\n mt=\"xxxs\"\n mb=\"15px\"\n labelOverflow={labelOverflow}\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n mt=\"xxxs\"\n pr=\"xxs2\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoDnB;AAlDJ,uCAA2C;AAC3C,mBAAmC;AACnC,uBAA4C;AAC5C,8BAA6B;AAE7B,oBAA2E;AAE3E,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,aAAa;AAAA;AAAA;AAAA,kCAGlD,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,kCAI9D,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAIlD,MAAM,WAAW,CAAC,UAAyD;AAChF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,eAAe,kBAAkB;AAAA,MACrF,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH;AAAA,MACA,cAAc,EAAE,eAAe,qBAAqB;AAAA,MACpD;AAAA,MACA;AAAA,IACF;AA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