@learningpool/ui 1.8.7 → 1.9.0

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 (29) hide show
  1. package/components/atoms/Button/Button.d.ts +1 -1
  2. package/components/landmarks/Header/HeaderStyles.d.ts +1 -1
  3. package/components/navigation/Drawer/Drawer.d.ts +1 -1
  4. package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +46 -31
  5. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +207 -141
  6. package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +39 -27
  7. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +75 -53
  8. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +4 -4
  9. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +6 -6
  10. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +68 -46
  11. package/components/navigation/MobileNavigation/MobileNavigationStyles.d.ts +1 -1
  12. package/components/navigation/VerticalNavigation/VerticalNavigation.js +131 -105
  13. package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +42 -18
  14. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +207 -141
  15. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +4 -4
  16. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +6 -6
  17. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +69 -47
  18. package/components/stream/AppHub/AppHubCustomStyles.d.ts +4 -4
  19. package/components/stream/AppHub/AppHubProductStyles.d.ts +3 -3
  20. package/components/stream/AppHub/AppHubStyles.d.ts +2 -2
  21. package/components/stream/AppSwitcher/AppSwitcher.d.ts +10 -2
  22. package/components/stream/AppSwitcher/AppSwitcher.js +9 -7
  23. package/components/stream/AppSwitcher/AppSwitcherStylesStandalone.d.ts +16 -0
  24. package/components/stream/AppSwitcher/AppSwitcherStylesStandalone.js +22 -0
  25. package/components/stream/AppSwitcher/constants.d.ts +19 -0
  26. package/components/stream/AppSwitcher/constants.js +19 -0
  27. package/package.json +4 -3
  28. package/utils/helpers.d.ts +12 -9
  29. package/utils/helpers.js +41 -21
@@ -26,7 +26,7 @@ export declare const StyledBoxText: import("@emotion/styled").StyledComponent<im
26
26
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
27
27
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "children" | "sx" | "component" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
28
28
  export declare const StyledTypography: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
29
- align?: "inherit" | "left" | "right" | "center" | "justify" | undefined;
29
+ align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
30
30
  children?: import("react").ReactNode;
31
31
  classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
32
32
  gutterBottom?: boolean | undefined;
@@ -39,7 +39,7 @@ export declare const StyledTypography: import("@emotion/styled").StyledComponent
39
39
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
40
40
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "align" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
41
41
  export declare const StyledTypographySubtitle: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
42
- align?: "inherit" | "left" | "right" | "center" | "justify" | undefined;
42
+ align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
43
43
  children?: import("react").ReactNode;
44
44
  classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
45
45
  gutterBottom?: boolean | undefined;
@@ -83,5 +83,5 @@ export declare const StyledButton: import("@emotion/styled").StyledComponent<Pic
83
83
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
84
84
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
85
85
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
86
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "sx" | "variant" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon">, keyof import("@mui/material/OverridableComponent").CommonProps | "form" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "variant" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value"> & import("react").RefAttributes<HTMLButtonElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
86
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "sx" | "variant" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon">, keyof import("@mui/material/OverridableComponent").CommonProps | "form" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "variant" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value"> & import("react").RefAttributes<HTMLButtonElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
87
87
  export declare const StyledAutocomplete: import("@emotion/styled").StyledComponent<import("@mui/material").AutocompleteProps<unknown, boolean | undefined, boolean | undefined, boolean | undefined, "div"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -9,7 +9,7 @@ export declare const AppHubRow: import("@emotion/styled").StyledComponent<import
9
9
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
10
10
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "children" | "sx" | "component" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
11
11
  export declare const AppHubTitle: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
12
- align?: "inherit" | "left" | "right" | "center" | "justify" | undefined;
12
+ align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
13
13
  children?: import("react").ReactNode;
14
14
  classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
15
15
  gutterBottom?: boolean | undefined;
@@ -22,7 +22,7 @@ export declare const AppHubTitle: import("@emotion/styled").StyledComponent<impo
22
22
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
23
23
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "align" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
24
24
  export declare const AppHubHeader: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
25
- align?: "inherit" | "left" | "right" | "center" | "justify" | undefined;
25
+ align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
26
26
  children?: import("react").ReactNode;
27
27
  classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
28
28
  gutterBottom?: boolean | undefined;
@@ -1,6 +1,14 @@
1
1
  import { ReactElement } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { IApplication } from '../../../types';
3
+ interface IApplication {
4
+ applicationId: number;
5
+ applicationName: string;
6
+ shortName: string;
7
+ internalName: string;
8
+ customName?: string;
9
+ url: string;
10
+ children?: object[];
11
+ }
4
12
  interface IProps {
5
13
  userId?: string;
6
14
  layout?: string;
@@ -29,7 +37,7 @@ declare const AppSwitcher: {
29
37
  };
30
38
  defaultProps: {
31
39
  layout: string;
32
- baseUrl: string;
40
+ baseUrl: "https://api.home.learningpool.com/";
33
41
  localization: {};
34
42
  applications: never[];
35
43
  };
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
24
24
  function verb(n) { return function (v) { return step([n, v]); }; }
25
25
  function step(op) {
26
26
  if (f) throw new TypeError("Generator is already executing.");
27
- while (_) try {
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
28
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
29
  if (y = 0, t) op = [op[0] & 2, t.value];
30
30
  switch (op[0]) {
@@ -49,12 +49,10 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
49
49
  import { useState, useEffect } from 'react';
50
50
  import PropTypes from 'prop-types';
51
51
  import jwtDecode from 'jwt-decode';
52
- import queryString from 'query-string';
53
- import { defaultMessages } from '../../../lang/en-us';
52
+ import * as queryString from 'query-string';
54
53
  import AppSwitcherItem, { LogoVariants } from './AppSwitcherItem';
55
54
  import { AppListHeader, AppListItem, AppOrganisationCount, StyledSVG, BackButton, MenuContent, OrganisationLink, OrganisationList, SearchBox, SearchContent, SelectedOrganisation, AppSwitcherPanel } from './AppSwitcherStyles';
56
55
  import { Constants } from './constants';
57
- import { DRAWER_WIDTH } from '../../navigation/VerticalNavigation/VerticalNavigationStyles';
58
56
  import { defaultAttributes } from '../../../utils/dataAttributes';
59
57
  var AppSwitcher = function (props) {
60
58
  var _a;
@@ -70,7 +68,7 @@ var AppSwitcher = function (props) {
70
68
  var _f = useState(null), activeApplication = _f[0], setActiveApplication = _f[1];
71
69
  // Stores any org filter text (on the second tab).
72
70
  var _g = useState(''), searchString = _g[0], setSearchString = _g[1];
73
- var messages = __assign(__assign({}, defaultMessages), localization);
71
+ var messages = __assign(__assign({}, Constants.DefaultMessages), localization);
74
72
  var dataIds = __assign(__assign({}, defaultAttributes), dataAttributes);
75
73
  var userId = (_a = props.userId) !== null && _a !== void 0 ? _a : '';
76
74
  /**
@@ -174,7 +172,7 @@ var AppSwitcher = function (props) {
174
172
  }); };
175
173
  useEffect(function () {
176
174
  var loadData = function () { return __awaiter(void 0, void 0, void 0, function () {
177
- var applicationInstances, userApplications, parsedQueryString, uniqueApplicationIds, localApplications;
175
+ var applicationInstances, userApplications, parsedQueryString, match, uniqueApplicationIds, localApplications;
178
176
  return __generator(this, function (_a) {
179
177
  switch (_a.label) {
180
178
  case 0:
@@ -185,6 +183,10 @@ var AppSwitcher = function (props) {
185
183
  if (parsedQueryString.token && typeof parsedQueryString.token === 'string') {
186
184
  token = parsedQueryString.token;
187
185
  }
186
+ else {
187
+ match = window.location.hash.match(/token=(.*)/);
188
+ token = (match && match.length === 2 && match[1]) || '';
189
+ }
188
190
  }
189
191
  if (!(!props.applications || props.applications.length === 0)) return [3 /*break*/, 2];
190
192
  return [4 /*yield*/, getApplicationsForUser()];
@@ -265,7 +267,7 @@ var AppSwitcher = function (props) {
265
267
  }
266
268
  return (_jsxs(AppSwitcherPanel, __assign({ id: "app-switcher-menu", style: {
267
269
  display: isAppSwitcherOpen ? 'block' : 'none',
268
- left: isDrawerOpen ? DRAWER_WIDTH.Expanded : DRAWER_WIDTH.Collapsed - 3
270
+ left: isDrawerOpen ? Constants.DrawerWidth.Expanded : Constants.DrawerWidth.Collapsed - 3
269
271
  }, role: 'dialog', "aria-label": "App Switcher", onKeyDown: handleKeyDown, "data-id": dataIds.AppSwitcherContainer }, { children: [activeTab === Constants.Tabs.ListApplications
270
272
  ? (_jsxs("div", { children: [_jsxs(AppListHeader, __assign({ "data-id": dataIds.AppSwitcherHeader }, { children: [_jsx("svg", { children: _jsx("image", { xlinkHref: "".concat(Constants.AssetsUrl, "suite/logo/latest/icon.svg"), width: "24", height: "24" }) }), messages['your-apps']] })), _jsx(MenuContent, __assign({ style: {
271
273
  display: activeTab === 1 ? 'flex' : 'none'
@@ -0,0 +1,16 @@
1
+ export declare const AppSwitcherPanel: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const List: import("styled-components").StyledComponent<"ul", any, {}, never>;
3
+ export declare const MenuContent: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const SearchContent: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const AppListHeader: import("styled-components").StyledComponent<"p", any, {}, never>;
6
+ export declare const AppListItem: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const AppLink: import("styled-components").StyledComponent<"a", any, {}, never>;
8
+ export declare const BackButton: import("styled-components").StyledComponent<"button", any, {}, never>;
9
+ export declare const SearchBox: import("styled-components").StyledComponent<"input", any, {}, never>;
10
+ export declare const AppName: import("styled-components").StyledComponent<"p", any, {}, never>;
11
+ export declare const AppOrganisationCount: import("styled-components").StyledComponent<"span", any, {}, never>;
12
+ export declare const SelectedOrganisation: import("styled-components").StyledComponent<"div", any, {}, never>;
13
+ export declare const StyledSVG: import("styled-components").StyledComponent<"svg", any, {}, never>;
14
+ export declare const StyledLogoSVG: import("styled-components").StyledComponent<"svg", any, {}, never>;
15
+ export declare const OrganisationList: import("styled-components").StyledComponent<"div", any, {}, never>;
16
+ export declare const OrganisationLink: import("styled-components").StyledComponent<"a", any, {}, never>;
@@ -0,0 +1,22 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import styled from 'styled-components';
6
+ export var AppSwitcherPanel = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: #fff;\n border-radius: 4px;\n box-shadow: rgb(0 0 0 / 20%) 0px 5px 5px -3px, rgb(0 0 0 / 14%) 0px 8px 10px 1px, rgb(0 0 0 / 12%) 0px 3px 14px 2px;\n box-sizing: border-box;\n height: 450px;\n padding: 1rem 1.5rem;\n position: absolute;\n width: 360px;\n"], ["\n background-color: #fff;\n border-radius: 4px;\n box-shadow: rgb(0 0 0 / 20%) 0px 5px 5px -3px, rgb(0 0 0 / 14%) 0px 8px 10px 1px, rgb(0 0 0 / 12%) 0px 3px 14px 2px;\n box-sizing: border-box;\n height: 450px;\n padding: 1rem 1.5rem;\n position: absolute;\n width: 360px;\n"])));
7
+ export var List = styled.ul(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n"], ["\n"])));
8
+ export var MenuContent = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: flex-start;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: 1rem;\n"], ["\n align-items: flex-start;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: 1rem;\n"])));
9
+ export var SearchContent = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: flex-start;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: flex-start;\n padding: 1rem 1rem 2rem;\n"], ["\n align-items: flex-start;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: flex-start;\n padding: 1rem 1rem 2rem;\n"])));
10
+ export var AppListHeader = styled.p(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n color: #757575;\n display: flex;\n font-weight: normal;\n justify-content: flex-start;\n padding: 0.5rem 1.25rem 0;\n text-transform: uppercase;\n\n & svg {\n height: 24px;\n margin-right: 0.5rem;\n width: 24px;\n }\n"], ["\n align-items: center;\n color: #757575;\n display: flex;\n font-weight: normal;\n justify-content: flex-start;\n padding: 0.5rem 1.25rem 0;\n text-transform: uppercase;\n\n & svg {\n height: 24px;\n margin-right: 0.5rem;\n width: 24px;\n }\n"])));
11
+ export var AppListItem = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n align-self: stretch;\n box-sizing: border-box;\n flex-direction: column;\n flex: 0 0 ", "%;\n overflow: visible;\n padding: 0.25rem;\n position: relative;\n\n &:hover {\n background-color: transparent;\n }\n"], ["\n align-items: center;\n align-self: stretch;\n box-sizing: border-box;\n flex-direction: column;\n flex: 0 0 ", "%;\n overflow: visible;\n padding: 0.25rem;\n position: relative;\n\n &:hover {\n background-color: transparent;\n }\n"])), 100 / 3);
12
+ export var AppLink = styled.a(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n font-size: 0.85rem;\n justify-content: center;\n overflow: hidden;\n padding: 1rem 0 0.5rem;\n position: relative;\n text-align: center;\n text-decoration: none;\n transition: all 200ms ease;\n width: 100%;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:hover,\n &:focus {\n background-color: #ecf4fb;\n text-decoration: none;\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & svg {\n height: 60px;\n width: 60px;\n }\n\n &:hover + span,\n &:focus + span {\n opacity: 1;\n }\n"], ["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n font-size: 0.85rem;\n justify-content: center;\n overflow: hidden;\n padding: 1rem 0 0.5rem;\n position: relative;\n text-align: center;\n text-decoration: none;\n transition: all 200ms ease;\n width: 100%;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:hover,\n &:focus {\n background-color: #ecf4fb;\n text-decoration: none;\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & svg {\n height: 60px;\n width: 60px;\n }\n\n &:hover + span,\n &:focus + span {\n opacity: 1;\n }\n"])));
13
+ export var BackButton = styled.button(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-items: center;\n background: transparent;\n border: 0;\n color: #aaa;\n cursor: pointer;\n display: flex;\n padding: 0.25rem 0;\n text-align: left;\n width: 100%;\n\n &:focus,\n &:hover {\n background-color: #eee;\n }\n"], ["\n align-items: center;\n background: transparent;\n border: 0;\n color: #aaa;\n cursor: pointer;\n display: flex;\n padding: 0.25rem 0;\n text-align: left;\n width: 100%;\n\n &:focus,\n &:hover {\n background-color: #eee;\n }\n"])));
14
+ export var SearchBox = styled.input(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background: #f4f4f4;\n border: thin solid #888;\n box-sizing: border-box;\n color: #777;\n padding: 0.5rem;\n width: 100%;\n\n &:hover .MuiOutlinedInput-notchedOutline {\n border-color: #888;\n }\n\n & .MuiOutlinedInput-root {\n border-radius: 0;\n color: #777;\n padding: 0;\n }\n\n & .MuiOutlinedInput-input {\n padding: 0.5rem;\n }\n\n & ::placeholder {\n opacity: 0.75;\n }\n"], ["\n background: #f4f4f4;\n border: thin solid #888;\n box-sizing: border-box;\n color: #777;\n padding: 0.5rem;\n width: 100%;\n\n &:hover .MuiOutlinedInput-notchedOutline {\n border-color: #888;\n }\n\n & .MuiOutlinedInput-root {\n border-radius: 0;\n color: #777;\n padding: 0;\n }\n\n & .MuiOutlinedInput-input {\n padding: 0.5rem;\n }\n\n & ::placeholder {\n opacity: 0.75;\n }\n"])));
15
+ export var AppName = styled.p(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n color: #00497D;\n font-weight: normal;\n margin: 0.5rem 0 0;\n white-space: nowrap;\n"], ["\n color: #00497D;\n font-weight: normal;\n margin: 0.5rem 0 0;\n white-space: nowrap;\n"])));
16
+ export var AppOrganisationCount = styled.span(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background: #00497D;\n border-color: #616161;\n border-radius: 4px;\n border: none;\n color: white;\n font-size: 1rem;\n font-weight: bold;\n height: 50px;\n left: 50%;\n line-height: 50px;\n margin-top: 0;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 43%;\n transform: translate(-50%, -50%);\n width: 50px;\n z-index: 1;\n"], ["\n background: #00497D;\n border-color: #616161;\n border-radius: 4px;\n border: none;\n color: white;\n font-size: 1rem;\n font-weight: bold;\n height: 50px;\n left: 50%;\n line-height: 50px;\n margin-top: 0;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 43%;\n transform: translate(-50%, -50%);\n width: 50px;\n z-index: 1;\n"])));
17
+ export var SelectedOrganisation = styled.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n color: #757575;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n padding: 1.5rem 0;\n text-transform: uppercase;\n width: 100%;\n\n & svg,\n & svg image {\n height: 24px;\n width: 24px;\n }\n\n & h6 {\n font-size: 1.2rem;\n font-weight: 600;\n margin: 0 0 0 1rem;\n }\n"], ["\n align-items: center;\n color: #757575;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n padding: 1.5rem 0;\n text-transform: uppercase;\n width: 100%;\n\n & svg,\n & svg image {\n height: 24px;\n width: 24px;\n }\n\n & h6 {\n font-size: 1.2rem;\n font-weight: 600;\n margin: 0 0 0 1rem;\n }\n"])));
18
+ export var StyledSVG = styled.svg(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n box-sizing: content-box;\n display: inline-block;\n fill: currentcolor;\n flex-shrink: 0;\n font-size: 1.5rem;\n height: 1em;\n margin: 4px;\n padding: 0;\n user-select: none;\n width: 1em;\n"], ["\n box-sizing: content-box;\n display: inline-block;\n fill: currentcolor;\n flex-shrink: 0;\n font-size: 1.5rem;\n height: 1em;\n margin: 4px;\n padding: 0;\n user-select: none;\n width: 1em;\n"])));
19
+ export var StyledLogoSVG = styled.svg(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: #E6EAF0;\n border: thin solid #E6EAF0;\n position: relative;\n z-index: 1;\n"], ["\n background-color: #E6EAF0;\n border: thin solid #E6EAF0;\n position: relative;\n z-index: 1;\n"])));
20
+ export var OrganisationList = styled.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n height: 300px;\n overflow: auto;\n padding-top: 0.5rem;\n width: 100%;\n"], ["\n height: 300px;\n overflow: auto;\n padding-top: 0.5rem;\n width: 100%;\n"])));
21
+ export var OrganisationLink = styled.a(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n color: #777;\n display: flex;\n font-size: 1rem;\n justify-content: space-between;\n margin: 0 0.125rem;\n padding: 0.5rem;\n text-decoration: none;\n transition: all 200ms ease;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:focus,\n &:hover {\n background-color: #f5f5f5;\n\n & svg {\n visibility: visible;\n }\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & .MuiLink-root {\n align-items: center;\n color: #777;\n display: flex;\n justify-content: space-between;\n text-decoration: none;\n width: 100%;\n }\n\n & svg {\n visibility: hidden;\n }\n"], ["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n color: #777;\n display: flex;\n font-size: 1rem;\n justify-content: space-between;\n margin: 0 0.125rem;\n padding: 0.5rem;\n text-decoration: none;\n transition: all 200ms ease;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:focus,\n &:hover {\n background-color: #f5f5f5;\n\n & svg {\n visibility: visible;\n }\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & .MuiLink-root {\n align-items: center;\n color: #777;\n display: flex;\n justify-content: space-between;\n text-decoration: none;\n width: 100%;\n }\n\n & svg {\n visibility: hidden;\n }\n"])));
22
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16;
@@ -16,6 +16,25 @@ export declare const Constants: Readonly<{
16
16
  ListApplications: number;
17
17
  ListOrgs: number;
18
18
  };
19
+ DefaultMessages: {
20
+ 'app-switcher': string;
21
+ 'your-apps': string;
22
+ 'custom-apps': string;
23
+ 'add-item': string;
24
+ 'lp-apps': string;
25
+ questions: string;
26
+ 'back-to': string;
27
+ 'select-an-organisation': string;
28
+ search: string;
29
+ open: string;
30
+ 'select-org': string;
31
+ 'open-in-new-window': string;
32
+ 'stream-hub-welcome': string;
33
+ };
34
+ DrawerWidth: {
35
+ Collapsed: number;
36
+ Expanded: number;
37
+ };
19
38
  }>;
20
39
  export declare const applications: ({
21
40
  applicationId: number;
@@ -15,6 +15,25 @@ export var Constants = Object.freeze({
15
15
  Tabs: {
16
16
  ListApplications: 1,
17
17
  ListOrgs: 2
18
+ },
19
+ DefaultMessages: {
20
+ 'app-switcher': 'App Switcher',
21
+ 'your-apps': 'Your Apps',
22
+ 'custom-apps': 'Explore Custom Apps',
23
+ 'add-item': 'Add item',
24
+ 'lp-apps': 'Explore Learning Pool Apps',
25
+ questions: 'Questions',
26
+ 'back-to': 'Back',
27
+ 'select-an-organisation': 'Select an organisation',
28
+ search: 'Search',
29
+ open: 'Open',
30
+ 'select-org': 'Organisation',
31
+ 'open-in-new-window': 'opens in a new window',
32
+ 'stream-hub-welcome': 'Welcome to Stream Home'
33
+ },
34
+ DrawerWidth: {
35
+ Collapsed: 60,
36
+ Expanded: 300
18
37
  }
19
38
  });
20
39
  export var applications = [
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "components",
10
10
  "ui"
11
11
  ],
12
- "version": "1.8.7",
12
+ "version": "1.9.0",
13
13
  "private": false,
14
14
  "main": "index.js",
15
15
  "module": "index.js",
@@ -18,7 +18,7 @@
18
18
  "@emotion/styled": "^11.6.0",
19
19
  "@learningpool/design-tokens": "^1.1.0-beta.7",
20
20
  "@mui/icons-material": "^5.8.4",
21
- "@mui/material": "^5.8.5",
21
+ "@mui/material": "5.10.6",
22
22
  "@mui/x-data-grid": "^5.12.3",
23
23
  "@react-spring/web": "9.6.1",
24
24
  "@types/jest": "^27.4.0",
@@ -32,8 +32,9 @@
32
32
  "jwt-decode": "^3.1.2",
33
33
  "polished": "^4.2.2",
34
34
  "query-string": "^7.1.1",
35
+ "styled-components": "^5.3.6",
35
36
  "tss-react": "^3.3.6",
36
- "typescript": "^4.6.2",
37
+ "typescript": "^4.9.5",
37
38
  "web-vitals": "^2.1.4"
38
39
  },
39
40
  "publishConfig": {
@@ -17,17 +17,20 @@ export declare const stringToColor: (string: string) => string;
17
17
  */
18
18
  export declare const stringAvatar: (name: string) => any;
19
19
  /**
20
- * Accepts a number and returns a react-spring style object from useSpring
21
- * @param trigger boolean - Trigger to reverse the animation from main component
22
- * @param animationCount number - Count tracking items from main component
23
- * @param incrementAnimationCount Function - Function to increment animationCount from main component
20
+ * Accepts an order, optional in/out toggle and returns
21
+ * a react-spring style object from useSpring that fades an item
22
+ * in based on it's order
23
+ * @param delayOrder number - Order for delaying items
24
+ * @param reverse boolean - Toggles the direction of the animation
24
25
  * @returns Object
25
26
  */
26
- export declare const useStaggerAnimation: (trigger: boolean, animationCount: number, incrementAnimationCount: Function) => Object;
27
+ export declare const useFadeIn: (delayOrder: number, reverse?: boolean) => Object;
27
28
  /**
28
- * Accepts a number and returns a react-spring style object from useSpring
29
- * @param animationCount number - Count tracking items from main component
30
- * @param incrementAnimationCount Function - Function to increment animationCount from main component
29
+ * Accepts an order, optional in/out toggle and returns
30
+ * a react-spring style object from useSpring that fades and moves
31
+ * an item in based on it's order
32
+ * @param delayOrder number - Order for delaying items
33
+ * @param reverse boolean - Toggles the direction of the animation
31
34
  * @returns Object
32
35
  */
33
- export declare const useFadeIn: (animationCount: number, incrementAnimationCount: Function) => Object;
36
+ export declare const useFadeAndMoveIn: (delayOrder: number, reverse?: boolean) => Object;
package/utils/helpers.js CHANGED
@@ -9,6 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ import { useEffect, useRef } from 'react';
12
13
  import { useSpring, config } from '@react-spring/web';
13
14
  /**
14
15
  * Accepts a string and returns 2 characters (max) as initials e.g. AN from Avatar Name
@@ -62,36 +63,55 @@ export var stringAvatar = function (name) {
62
63
  };
63
64
  var STAGGER_ITEMS_DELAY = 70;
64
65
  /**
65
- * Accepts a number and returns a react-spring style object from useSpring
66
- * @param trigger boolean - Trigger to reverse the animation from main component
67
- * @param animationCount number - Count tracking items from main component
68
- * @param incrementAnimationCount Function - Function to increment animationCount from main component
66
+ * Accepts an order, optional in/out toggle and returns
67
+ * a react-spring style object from useSpring based on the
68
+ * animation configuration provided
69
+ * @param animationConfig object - Config for useSpring animation (react-spring object)
70
+ * @param delayOrder number - Order for delaying items
71
+ * @param reverse boolean - Toggles the direction of the animation
69
72
  * @returns Object
70
73
  */
71
- export var useStaggerAnimation = function (trigger, animationCount, incrementAnimationCount) {
74
+ var useStaggerIn = function (animationConfig, delayOrder, reverse) {
72
75
  var defaultAnimationConfig = {
73
- from: { opacity: 0, y: 10 },
74
- to: { opacity: 1, y: 0 },
75
- reverse: !trigger,
76
+ reverse: reverse,
76
77
  config: __assign(__assign({}, config.default), { mass: 1 })
77
78
  };
78
- var staggerAnimation = useSpring(__assign(__assign({}, defaultAnimationConfig), { delay: trigger ? STAGGER_ITEMS_DELAY * (animationCount + 1) : 0 }));
79
- incrementAnimationCount();
80
- return staggerAnimation;
79
+ var animationCountRef = useRef(0);
80
+ var staggerInAnimation = useSpring(__assign(__assign(__assign({}, defaultAnimationConfig), animationConfig), { delay: STAGGER_ITEMS_DELAY * delayOrder }));
81
+ useEffect(function () {
82
+ animationCountRef.current += 1;
83
+ });
84
+ return staggerInAnimation;
81
85
  };
82
86
  /**
83
- * Accepts a number and returns a react-spring style object from useSpring
84
- * @param animationCount number - Count tracking items from main component
85
- * @param incrementAnimationCount Function - Function to increment animationCount from main component
87
+ * Accepts an order, optional in/out toggle and returns
88
+ * a react-spring style object from useSpring that fades an item
89
+ * in based on it's order
90
+ * @param delayOrder number - Order for delaying items
91
+ * @param reverse boolean - Toggles the direction of the animation
86
92
  * @returns Object
87
93
  */
88
- export var useFadeIn = function (animationCount, incrementAnimationCount) {
89
- var defaultAnimationConfig = {
94
+ export var useFadeIn = function (delayOrder, reverse) {
95
+ if (reverse === void 0) { reverse = false; }
96
+ var animationConfig = {
90
97
  from: { opacity: 0 },
91
- to: { opacity: 1 },
92
- config: __assign(__assign({}, config.default), { mass: 1 })
98
+ to: { opacity: 1 }
99
+ };
100
+ return useStaggerIn(animationConfig, delayOrder, reverse);
101
+ };
102
+ /**
103
+ * Accepts an order, optional in/out toggle and returns
104
+ * a react-spring style object from useSpring that fades and moves
105
+ * an item in based on it's order
106
+ * @param delayOrder number - Order for delaying items
107
+ * @param reverse boolean - Toggles the direction of the animation
108
+ * @returns Object
109
+ */
110
+ export var useFadeAndMoveIn = function (delayOrder, reverse) {
111
+ if (reverse === void 0) { reverse = false; }
112
+ var animationConfig = {
113
+ from: { opacity: 0, y: 10 },
114
+ to: { opacity: 1, y: 0 }
93
115
  };
94
- var staggerFadeInUpAnimation = useSpring(__assign(__assign({}, defaultAnimationConfig), { delay: STAGGER_ITEMS_DELAY * (animationCount + 1) }));
95
- incrementAnimationCount();
96
- return staggerFadeInUpAnimation;
116
+ return useStaggerIn(animationConfig, delayOrder, reverse);
97
117
  };