@learningpool/ui 1.15.5 → 1.16.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 (84) hide show
  1. package/assets/Images.js +7 -18
  2. package/components/atoms/Autocomplete/Autocomplete.js +3 -14
  3. package/components/atoms/Button/Button.js +2 -13
  4. package/components/atoms/Checkbox/Checkbox.js +3 -26
  5. package/components/atoms/IconButton/IconButton.js +2 -13
  6. package/components/atoms/Radio/Radio.js +3 -26
  7. package/components/atoms/Select/Select.js +3 -26
  8. package/components/atoms/Slider/Slider.js +3 -26
  9. package/components/atoms/Switch/Switch.js +3 -26
  10. package/components/atoms/TextField/TextField.js +2 -13
  11. package/components/atoms/ToggleButton/ToggleButton.js +3 -26
  12. package/components/datadisplay/Avatar/Avatar.js +13 -28
  13. package/components/datadisplay/Chip/Chip.js +3 -26
  14. package/components/datadisplay/List/List.js +2 -13
  15. package/components/feedback/Alert/Alert.js +3 -26
  16. package/components/landmarks/Header/Header.js +15 -41
  17. package/components/landmarks/Header/HeaderActionButtons.d.ts +1 -2
  18. package/components/landmarks/Header/HeaderActionButtons.js +22 -33
  19. package/components/landmarks/Header/HeaderStyles.js +54 -11
  20. package/components/navigation/Drawer/Drawer.js +5 -31
  21. package/components/navigation/MobileNavigation/MobileNavigation.js +70 -82
  22. package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +75 -83
  23. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +102 -52
  24. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +71 -13
  25. package/components/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +1 -1
  26. package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +41 -68
  27. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +34 -18
  28. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +133 -20
  29. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +22 -45
  30. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +8 -19
  31. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +151 -52
  32. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +171 -50
  33. package/components/navigation/MobileNavigation/MobileNavigationMotion.js +11 -11
  34. package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +11 -15
  35. package/components/navigation/MobileNavigation/MobileNavigationSearch.d.ts +1 -2
  36. package/components/navigation/MobileNavigation/MobileNavigationSearch.js +25 -34
  37. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +34 -18
  38. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.js +47 -9
  39. package/components/navigation/MobileNavigation/MobileNavigationStyles.js +262 -66
  40. package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +21 -20
  41. package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +21 -20
  42. package/components/navigation/VerticalNavigation/VerticalNavigation.js +150 -185
  43. package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +50 -61
  44. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +102 -52
  45. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +86 -14
  46. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +27 -51
  47. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +15 -28
  48. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +135 -39
  49. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +167 -29
  50. package/components/navigation/VerticalNavigation/VerticalNavigationMotion.js +11 -11
  51. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +34 -18
  52. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +236 -42
  53. package/components/navigation/helpers.d.ts +1 -2
  54. package/components/navigation/helpers.js +28 -32
  55. package/components/pages/ErrorPage/ErrorPage.js +6 -17
  56. package/components/pages/ErrorPage/ErrorPageStyles.js +13 -18
  57. package/components/pages/SideInSide/SideInSide.js +12 -23
  58. package/components/pages/SideInSide/SideInSideStyles.js +6 -6
  59. package/components/stream/AppHub/AppHub.js +13 -42
  60. package/components/stream/AppHub/AppHubAdvertStyles.js +24 -8
  61. package/components/stream/AppHub/AppHubBannerAdvert.d.ts +1 -2
  62. package/components/stream/AppHub/AppHubBannerAdvert.js +9 -20
  63. package/components/stream/AppHub/AppHubCustom.js +8 -19
  64. package/components/stream/AppHub/AppHubCustomStyles.d.ts +1 -1
  65. package/components/stream/AppHub/AppHubCustomStyles.js +78 -18
  66. package/components/stream/AppHub/AppHubProduct.js +26 -48
  67. package/components/stream/AppHub/AppHubProductStyles.js +104 -19
  68. package/components/stream/AppHub/AppHubStyles.js +31 -11
  69. package/components/stream/AppHub/constants.d.ts +1 -2
  70. package/components/stream/AppHub/constants.js +14 -14
  71. package/components/stream/AppSwitcher/AppSwitcher.js +225 -316
  72. package/components/stream/AppSwitcher/AppSwitcherItem.js +11 -22
  73. package/components/stream/AppSwitcher/AppSwitcherStyles.js +337 -42
  74. package/components/stream/AppSwitcher/AppSwitcherStylesStandalone.js +255 -21
  75. package/components/stream/AppSwitcher/PromotionalCampaignItem.js +7 -19
  76. package/components/stream/AppSwitcher/constants.js +3 -3
  77. package/lang/en-us.js +1 -1
  78. package/package.json +7 -2
  79. package/utils/constants.d.ts +7 -0
  80. package/utils/constants.js +11 -4
  81. package/utils/dataAttributes.js +1 -1
  82. package/utils/helpers.js +33 -40
  83. package/utils/hooks.js +10 -11
  84. package/utils/theme.js +26 -19
@@ -1,22 +1,256 @@
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
1
  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;
2
+ export const AppSwitcherPanel = styled.div `
3
+ background-color: #fff;
4
+ border-radius: 4px;
5
+ 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;
6
+ box-sizing: border-box;
7
+ height: 450px;
8
+ padding: 1rem 1.5rem;
9
+ position: absolute;
10
+ width: 360px;
11
+ `;
12
+ export const List = styled.ul `
13
+ `;
14
+ export const MenuContent = styled.div `
15
+ align-items: flex-start;
16
+ flex-direction: row;
17
+ flex-wrap: wrap;
18
+ justify-content: flex-start;
19
+ margin-top: 1rem;
20
+ `;
21
+ export const SearchContent = styled.div `
22
+ align-items: flex-start;
23
+ box-sizing: border-box;
24
+ flex-direction: column;
25
+ justify-content: flex-start;
26
+ padding: 1rem 1rem 2rem;
27
+ `;
28
+ export const AppListHeader = styled.p `
29
+ align-items: center;
30
+ color: #757575;
31
+ display: flex;
32
+ font-weight: normal;
33
+ justify-content: flex-start;
34
+ padding: 0.5rem 1.25rem 0;
35
+ text-transform: uppercase;
36
+
37
+ & svg {
38
+ height: 24px;
39
+ margin-right: 0.5rem;
40
+ width: 24px;
41
+ }
42
+ `;
43
+ export const AppListItem = styled.div `
44
+ align-items: center;
45
+ align-self: stretch;
46
+ box-sizing: border-box;
47
+ flex-direction: column;
48
+ flex: 0 0 ${100 / 3}%;
49
+ overflow: visible;
50
+ padding: 0.25rem;
51
+ position: relative;
52
+
53
+ &:hover {
54
+ background-color: transparent;
55
+ }
56
+ `;
57
+ export const AppLink = styled.a `
58
+ align-items: center;
59
+ border-radius: 4px;
60
+ box-shadow: none;
61
+ box-sizing: border-box;
62
+ display: flex;
63
+ flex-direction: column;
64
+ font-size: 0.85rem;
65
+ justify-content: center;
66
+ overflow: hidden;
67
+ padding: 1rem 0 0.5rem;
68
+ position: relative;
69
+ text-align: center;
70
+ text-decoration: none;
71
+ transition: all 200ms ease;
72
+ width: 100%;
73
+
74
+ & .MuiTouchRipple-rippleVisible {
75
+ color: #004071;
76
+ opacity: 0.25;
77
+ }
78
+
79
+ &:hover,
80
+ &:focus {
81
+ background-color: #ecf4fb;
82
+ text-decoration: none;
83
+ }
84
+
85
+ &:active {
86
+ background-color: #f1f1f1;
87
+ }
88
+
89
+ & svg {
90
+ height: 60px;
91
+ width: 60px;
92
+ }
93
+
94
+ &:hover + span,
95
+ &:focus + span {
96
+ opacity: 1;
97
+ }
98
+ `;
99
+ export const BackButton = styled.button `
100
+ align-items: center;
101
+ background: transparent;
102
+ border: 0;
103
+ color: #aaa;
104
+ cursor: pointer;
105
+ display: flex;
106
+ padding: 0.25rem 0;
107
+ text-align: left;
108
+ width: 100%;
109
+
110
+ &:focus,
111
+ &:hover {
112
+ background-color: #eee;
113
+ }
114
+ `;
115
+ export const SearchBox = styled.input `
116
+ background: #f4f4f4;
117
+ border: thin solid #888;
118
+ box-sizing: border-box;
119
+ color: #777;
120
+ padding: 0.5rem;
121
+ width: 100%;
122
+
123
+ &:hover .MuiOutlinedInput-notchedOutline {
124
+ border-color: #888;
125
+ }
126
+
127
+ & .MuiOutlinedInput-root {
128
+ border-radius: 0;
129
+ color: #777;
130
+ padding: 0;
131
+ }
132
+
133
+ & .MuiOutlinedInput-input {
134
+ padding: 0.5rem;
135
+ }
136
+
137
+ & ::placeholder {
138
+ opacity: 0.75;
139
+ }
140
+ `;
141
+ export const AppName = styled.p `
142
+ color: #00497D;
143
+ font-weight: normal;
144
+ margin: 0.5rem 0 0;
145
+ white-space: nowrap;
146
+ `;
147
+ export const AppOrganisationCount = styled.span `
148
+ background: #00497D;
149
+ border-color: #616161;
150
+ border-radius: 4px;
151
+ border: none;
152
+ color: white;
153
+ font-size: 1rem;
154
+ font-weight: bold;
155
+ height: 50px;
156
+ left: 50%;
157
+ line-height: 50px;
158
+ margin-top: 0;
159
+ opacity: 0;
160
+ pointer-events: none;
161
+ position: absolute;
162
+ top: 43%;
163
+ transform: translate(-50%, -50%);
164
+ width: 50px;
165
+ z-index: 1;
166
+ `;
167
+ export const SelectedOrganisation = styled.div `
168
+ align-items: center;
169
+ color: #757575;
170
+ display: flex;
171
+ flex-direction: row;
172
+ justify-content: flex-start;
173
+ padding: 1.5rem 0;
174
+ text-transform: uppercase;
175
+ width: 100%;
176
+
177
+ & svg,
178
+ & svg image {
179
+ height: 24px;
180
+ width: 24px;
181
+ }
182
+
183
+ & h6 {
184
+ font-size: 1.2rem;
185
+ font-weight: 600;
186
+ margin: 0 0 0 1rem;
187
+ }
188
+ `;
189
+ export const StyledSVG = styled.svg `
190
+ box-sizing: content-box;
191
+ display: inline-block;
192
+ fill: currentcolor;
193
+ flex-shrink: 0;
194
+ font-size: 1.5rem;
195
+ height: 1em;
196
+ margin: 4px;
197
+ padding: 0;
198
+ user-select: none;
199
+ width: 1em;
200
+ `;
201
+ export const StyledLogoSVG = styled.svg `
202
+ background-color: #E6EAF0;
203
+ border: thin solid #E6EAF0;
204
+ position: relative;
205
+ z-index: 1;
206
+ `;
207
+ export const OrganisationList = styled.div `
208
+ height: 300px;
209
+ overflow: auto;
210
+ padding-top: 0.5rem;
211
+ width: 100%;
212
+ `;
213
+ export const OrganisationLink = styled.a `
214
+ align-items: center;
215
+ border-radius: 4px;
216
+ box-shadow: none;
217
+ color: #777;
218
+ display: flex;
219
+ font-size: 1rem;
220
+ justify-content: space-between;
221
+ margin: 0 0.125rem;
222
+ padding: 0.5rem;
223
+ text-decoration: none;
224
+ transition: all 200ms ease;
225
+
226
+ & .MuiTouchRipple-rippleVisible {
227
+ color: #004071;
228
+ opacity: 0.25;
229
+ }
230
+
231
+ &:focus,
232
+ &:hover {
233
+ background-color: #f5f5f5;
234
+
235
+ & svg {
236
+ visibility: visible;
237
+ }
238
+ }
239
+
240
+ &:active {
241
+ background-color: #f1f1f1;
242
+ }
243
+
244
+ & .MuiLink-root {
245
+ align-items: center;
246
+ color: #777;
247
+ display: flex;
248
+ justify-content: space-between;
249
+ text-decoration: none;
250
+ width: 100%;
251
+ }
252
+
253
+ & svg {
254
+ visibility: hidden;
255
+ }
256
+ `;
@@ -1,22 +1,10 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
13
2
  import { CardMedia } from '@mui/material';
14
3
  import { useState } from 'react';
15
4
  import { PromotionalCampaignCardStyled, PromotionalCampaignCardActionArea } from './AppSwitcherStyles';
16
- var PromotionalCampaignItem = function (_a) {
17
- var imageUrl = _a.imageUrl, altText = _a.altText, linkUrl = _a.linkUrl, onImageError = _a.onImageError;
18
- var _b = useState(true), imageLoaded = _b[0], setImageLoaded = _b[1];
19
- var handleImageError = function () {
5
+ const PromotionalCampaignItem = ({ imageUrl, altText, linkUrl, onImageError }) => {
6
+ const [imageLoaded, setImageLoaded] = useState(true);
7
+ const handleImageError = () => {
20
8
  setImageLoaded(false);
21
9
  if (onImageError) {
22
10
  onImageError();
@@ -24,11 +12,11 @@ var PromotionalCampaignItem = function (_a) {
24
12
  };
25
13
  if (!imageLoaded)
26
14
  return null;
27
- return (_jsx(PromotionalCampaignCardStyled, { children: _jsx(PromotionalCampaignCardActionArea, __assign({ onClick: function () { return window.open(linkUrl, '_blank'); } }, { children: _jsx(CardMedia, __assign({ component: "div", sx: {
15
+ return (_jsx(PromotionalCampaignCardStyled, { children: _jsx(PromotionalCampaignCardActionArea, { onClick: () => window.open(linkUrl, '_blank'), children: _jsx(CardMedia, { component: "div", sx: {
28
16
  width: '100%',
29
17
  height: '100%',
30
18
  position: 'relative'
31
- } }, { children: _jsx("img", { src: imageUrl, alt: altText, onError: handleImageError, style: {
19
+ }, children: _jsx("img", { src: imageUrl, alt: altText, onError: handleImageError, style: {
32
20
  width: '100%',
33
21
  height: '100%',
34
22
  objectFit: 'cover',
@@ -36,6 +24,6 @@ var PromotionalCampaignItem = function (_a) {
36
24
  position: 'absolute',
37
25
  top: 0,
38
26
  left: 0
39
- } }) })) })) }));
27
+ } }) }) }) }));
40
28
  };
41
29
  export default PromotionalCampaignItem;
@@ -1,4 +1,4 @@
1
- export var Constants = Object.freeze({
1
+ export const Constants = Object.freeze({
2
2
  LocalStorageKey: {
3
3
  Token: 'lp-home-access-token',
4
4
  Applications: 'lp-home-applications',
@@ -40,7 +40,7 @@ export var Constants = Object.freeze({
40
40
  },
41
41
  DefaultStreamHomeUrl: 'https://home.learningpool.com'
42
42
  });
43
- export var applications = [
43
+ export const applications = [
44
44
  { applicationId: 1, applicationName: 'Stream LXP', shortName: 'LXP', internalName: 'stream', url: 'https://learningpool.com' },
45
45
  { applicationId: 2, applicationName: 'Stream Analytics', shortName: 'Long Wrapping Test Stream Analytics', internalName: 'analytics', url: 'https://learningpool.com?Analytics' },
46
46
  { applicationId: 3, applicationName: 'Stream Automation', shortName: 'Event Management', internalName: 'automation', customName: 'Waves 1', url: 'https://learningpool.com?AutomationEventManagement' },
@@ -49,7 +49,7 @@ export var applications = [
49
49
  { applicationId: 4, applicationName: 'Stream Authoring', shortName: 'Authoring', internalName: 'authoring', url: 'https://learningpool.com?Authoring' },
50
50
  { applicationId: 8, applicationName: 'IQ', shortName: 'IQ', internalName: 'iq', url: 'https://data.applications.com?IQ' }
51
51
  ];
52
- export var promotionalContent = [
52
+ export const promotionalContent = [
53
53
  {
54
54
  id: 1,
55
55
  name: 'AIC campaign',
package/lang/en-us.js CHANGED
@@ -1,4 +1,4 @@
1
- export var defaultMessages = {
1
+ export const defaultMessages = {
2
2
  // App Switcher
3
3
  'app-switcher': 'App Switcher',
4
4
  'your-apps': 'Your Apps',
package/package.json CHANGED
@@ -9,30 +9,35 @@
9
9
  "components",
10
10
  "ui"
11
11
  ],
12
- "version": "1.15.5",
12
+ "version": "1.16.0",
13
13
  "private": false,
14
14
  "main": "index.js",
15
15
  "module": "index.js",
16
16
  "dependencies": {
17
17
  "@emotion/react": "^11.7.1",
18
18
  "@emotion/styled": "^11.6.0",
19
+ "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
19
20
  "@learningpool/design-tokens": "^1.1.0-beta.7",
20
21
  "@mui/icons-material": "^5.14.15",
21
22
  "@mui/material": "5.10.6",
22
23
  "@mui/x-data-grid": "^5.12.3",
23
24
  "@react-spring/web": "^9.7.3",
24
25
  "@types/jest": "^27.4.0",
25
- "@types/node": "^16.18.59",
26
+ "@types/node": "^18.19.15",
26
27
  "@types/react": "^17.0.69",
27
28
  "@types/react-dom": "^17.0.22",
28
29
  "@typescript-eslint/parser": "^5.31.0",
29
30
  "anysort": "^2.0.0",
31
+ "babel-plugin-formatjs": "^10.5.13",
32
+ "crypto-browserify": "^3.12.0",
30
33
  "eslint-plugin-n": "^15.2.4",
31
34
  "focus-trap-react": "^8.11.0",
32
35
  "jwt-decode": "^3.1.2",
36
+ "path-browserify": "^1.0.1",
33
37
  "polished": "^4.2.2",
34
38
  "postcss": "^8.4.31",
35
39
  "query-string": "^7.1.1",
40
+ "stream-browserify": "^3.0.0",
36
41
  "styled-components": "^5.3.6",
37
42
  "tss-react": "^3.3.6",
38
43
  "typescript": "^4.9.5",
@@ -9,3 +9,10 @@ export declare const VERTNAV_COLORS: {
9
9
  DARKEN_AMOUNT: number;
10
10
  };
11
11
  export declare const DEFAULT_MAX_CHARACTERS_PER_LINE = 50;
12
+ export declare const EVENT_KEYS: {
13
+ Tab: string;
14
+ Enter: string;
15
+ Shift: string;
16
+ Escape: string;
17
+ Keydown: string;
18
+ };
@@ -1,13 +1,20 @@
1
- export var DEFAULT_REACT_APP_ID = 'root';
2
- export var MOBILE_NAV_PANEL_TYPES = {
1
+ export const DEFAULT_REACT_APP_ID = 'root';
2
+ export const MOBILE_NAV_PANEL_TYPES = {
3
3
  DRAWER: 'drawer',
4
4
  SEARCH: 'search',
5
5
  AVATAR: 'avatar'
6
6
  };
7
- export var VERTNAV_COLORS = {
7
+ export const VERTNAV_COLORS = {
8
8
  LIGHTEN_AMOUNT: 0.1,
9
9
  DARKEN_AMOUNT: 0.1
10
10
  };
11
11
  // 50 seems a reasonable default limit
12
12
  // https://m2.material.io/design/typography/understanding-typography.html#readability
13
- export var DEFAULT_MAX_CHARACTERS_PER_LINE = 50;
13
+ export const DEFAULT_MAX_CHARACTERS_PER_LINE = 50;
14
+ export const EVENT_KEYS = {
15
+ Tab: 'Tab',
16
+ Enter: 'Enter',
17
+ Shift: 'Shift',
18
+ Escape: 'Escape',
19
+ Keydown: 'Keydown'
20
+ };
@@ -1,4 +1,4 @@
1
- export var defaultAttributes = {
1
+ export const defaultAttributes = {
2
2
  // VerticalNavigation data IDs
3
3
  VerticalNavigationContainer: 'vertnav-container',
4
4
  VerticalNavigationBrand: 'vertnav-brand',
package/utils/helpers.js CHANGED
@@ -1,14 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import { useEffect, useRef } from 'react';
13
2
  import { useSpring, config } from '@react-spring/web';
14
3
  /**
@@ -16,34 +5,33 @@ import { useSpring, config } from '@react-spring/web';
16
5
  * @param avatarName string - Expected full name but accepts any string
17
6
  * @returns string
18
7
  */
19
- export var handleAvatarInitials = function (avatarName) {
20
- var _a, _b;
21
- var firstInitial = avatarName.split('')[0] || '';
22
- var secondInitial = '';
23
- if (((_a = avatarName.split(' ')) === null || _a === void 0 ? void 0 : _a.length) > 1) {
8
+ export const handleAvatarInitials = (avatarName) => {
9
+ let firstInitial = avatarName.split('')[0] || '';
10
+ let secondInitial = '';
11
+ if (avatarName.split(' ')?.length > 1) {
24
12
  firstInitial = avatarName.split(' ')[0][0];
25
- if (((_b = avatarName.split(' ')[1]) === null || _b === void 0 ? void 0 : _b.length) > 0) {
26
- secondInitial = avatarName === null || avatarName === void 0 ? void 0 : avatarName.split(' ')[1][0];
13
+ if (avatarName.split(' ')[1]?.length > 0) {
14
+ secondInitial = avatarName?.split(' ')[1][0];
27
15
  }
28
16
  }
29
- return "".concat(firstInitial).concat(secondInitial);
17
+ return `${firstInitial}${secondInitial}`;
30
18
  };
31
19
  /**
32
20
  * Accepts a string and returns a color hex code e.g. #000000
33
21
  * @param string string - Accepts any string
34
22
  * @returns string
35
23
  */
36
- export var stringToColor = function (string) {
37
- var hash = 0;
38
- var i;
24
+ export const stringToColor = (string) => {
25
+ let hash = 0;
26
+ let i;
39
27
  /* eslint-disable no-bitwise */
40
28
  for (i = 0; i < string.length; i += 1) {
41
29
  hash = string.charCodeAt(i) + ((hash << 5) - hash);
42
30
  }
43
- var color = '#';
31
+ let color = '#';
44
32
  for (i = 0; i < 3; i += 1) {
45
- var value = (hash >> (i * 8)) & 0xff;
46
- color += "00".concat(value.toString(16)).slice(-2);
33
+ const value = (hash >> (i * 8)) & 0xff;
34
+ color += `00${value.toString(16)}`.slice(-2);
47
35
  }
48
36
  /* eslint-enable no-bitwise */
49
37
  return color;
@@ -53,7 +41,7 @@ export var stringToColor = function (string) {
53
41
  * @param string string - Accepts any string
54
42
  * @returns string
55
43
  */
56
- export var stringAvatar = function (name) {
44
+ export const stringAvatar = (name) => {
57
45
  return {
58
46
  sx: {
59
47
  bgcolor: stringToColor(name)
@@ -61,7 +49,7 @@ export var stringAvatar = function (name) {
61
49
  children: handleAvatarInitials(name)
62
50
  };
63
51
  };
64
- var STAGGER_ITEMS_DELAY = 70;
52
+ const STAGGER_ITEMS_DELAY = 70;
65
53
  /**
66
54
  * Accepts an order, optional in/out toggle and returns
67
55
  * a react-spring style object from useSpring based on the
@@ -71,14 +59,21 @@ var STAGGER_ITEMS_DELAY = 70;
71
59
  * @param reverse boolean - Toggles the direction of the animation
72
60
  * @returns Object
73
61
  */
74
- var useStaggerIn = function (animationConfig, delayOrder, reverse) {
75
- var defaultAnimationConfig = {
76
- reverse: reverse,
77
- config: __assign(__assign({}, config.default), { mass: 1 })
62
+ const useStaggerIn = (animationConfig, delayOrder, reverse) => {
63
+ const defaultAnimationConfig = {
64
+ reverse,
65
+ config: {
66
+ ...config.default,
67
+ mass: 1
68
+ }
78
69
  };
79
- var animationCountRef = useRef(0);
80
- var staggerInAnimation = useSpring(__assign(__assign(__assign({}, defaultAnimationConfig), animationConfig), { delay: STAGGER_ITEMS_DELAY * delayOrder }));
81
- useEffect(function () {
70
+ const animationCountRef = useRef(0);
71
+ const staggerInAnimation = useSpring({
72
+ ...defaultAnimationConfig,
73
+ ...animationConfig,
74
+ delay: STAGGER_ITEMS_DELAY * delayOrder
75
+ });
76
+ useEffect(() => {
82
77
  animationCountRef.current += 1;
83
78
  });
84
79
  return staggerInAnimation;
@@ -91,9 +86,8 @@ var useStaggerIn = function (animationConfig, delayOrder, reverse) {
91
86
  * @param reverse boolean - Toggles the direction of the animation
92
87
  * @returns Object
93
88
  */
94
- export var useFadeIn = function (delayOrder, reverse) {
95
- if (reverse === void 0) { reverse = false; }
96
- var animationConfig = {
89
+ export const useFadeIn = (delayOrder, reverse = false) => {
90
+ const animationConfig = {
97
91
  from: { opacity: 0 },
98
92
  to: { opacity: 1 }
99
93
  };
@@ -107,9 +101,8 @@ export var useFadeIn = function (delayOrder, reverse) {
107
101
  * @param reverse boolean - Toggles the direction of the animation
108
102
  * @returns Object
109
103
  */
110
- export var useFadeAndMoveIn = function (delayOrder, reverse) {
111
- if (reverse === void 0) { reverse = false; }
112
- var animationConfig = {
104
+ export const useFadeAndMoveIn = (delayOrder, reverse = false) => {
105
+ const animationConfig = {
113
106
  from: { opacity: 0, y: 10 },
114
107
  to: { opacity: 1, y: 0 }
115
108
  };
package/utils/hooks.js CHANGED
@@ -1,26 +1,25 @@
1
1
  import { useState, useEffect } from 'react';
2
- var getWidth = function () {
3
- var _a, _b;
4
- return (_b = (_a = window.innerWidth) !== null && _a !== void 0 ? _a : document.documentElement.clientWidth) !== null && _b !== void 0 ? _b : document.body.clientWidth;
5
- };
6
- export var useCurrentWidth = function () {
2
+ const getWidth = () => window.innerWidth ??
3
+ document.documentElement.clientWidth ??
4
+ document.body.clientWidth;
5
+ export const useCurrentWidth = () => {
7
6
  // save current window width in the state object
8
- var _a = useState(getWidth()), width = _a[0], setWidth = _a[1];
7
+ const [width, setWidth] = useState(getWidth());
9
8
  // in this case useEffect will execute only once because
10
9
  // it does not have any dependencies.
11
- useEffect(function () {
10
+ useEffect(() => {
12
11
  // timeoutId for debounce mechanism
13
- var timeoutId;
14
- var resizeListener = function () {
12
+ let timeoutId;
13
+ const resizeListener = () => {
15
14
  // prevent execution of previous setTimeout
16
15
  clearTimeout(timeoutId);
17
16
  // change width from the state object after 150 milliseconds
18
- timeoutId = setTimeout(function () { return setWidth(getWidth()); }, 150);
17
+ timeoutId = setTimeout(() => setWidth(getWidth()), 150);
19
18
  };
20
19
  // set resize listener
21
20
  window.addEventListener('resize', resizeListener);
22
21
  // clean up function
23
- return function () {
22
+ return () => {
24
23
  // remove resize listener
25
24
  window.removeEventListener('resize', resizeListener);
26
25
  };