@learningpool/ui 1.13.0 → 1.14.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.
@@ -57,7 +57,7 @@ import { Constants } from '../../stream/AppSwitcher/constants';
57
57
  var VerticalNavigation = function (props) {
58
58
  var _a;
59
59
  var theme = useTheme();
60
- var items = props.items, secondaryItems = props.secondaryItems, logo = props.logo, logoText = props.logoText, logoOnClick = props.logoOnClick, appRootID = props.appRootID, hasStreamHome = props.hasStreamHome, hideStreamHomeButton = props.hideStreamHomeButton, StreamHomeUrl = props.StreamHomeUrl, streamHomeApiKey = props.streamHomeApiKey, streamHomeBaseUrl = props.streamHomeBaseUrl, localization = props.localization, streamHomeAccessToken = props.streamHomeAccessToken, streamHomeApplications = props.streamHomeApplications, avatarName = props.avatarName, dataAttributes = props.dataAttributes, showSupportLinks = props.showSupportLinks, avatarPanelShowHelpLinks = props.avatarPanelShowHelpLinks, rest = __rest(props, ["items", "secondaryItems", "logo", "logoText", "logoOnClick", "appRootID", "hasStreamHome", "hideStreamHomeButton", "StreamHomeUrl", "streamHomeApiKey", "streamHomeBaseUrl", "localization", "streamHomeAccessToken", "streamHomeApplications", "avatarName", "dataAttributes", "showSupportLinks", "avatarPanelShowHelpLinks"]);
60
+ var items = props.items, secondaryItems = props.secondaryItems, logo = props.logo, logoText = props.logoText, logoOnClick = props.logoOnClick, appRootID = props.appRootID, hasStreamHome = props.hasStreamHome, hideStreamHomeButton = props.hideStreamHomeButton, StreamHomeUrl = props.StreamHomeUrl, streamHomeApiKey = props.streamHomeApiKey, streamHomeBaseUrl = props.streamHomeBaseUrl, localization = props.localization, streamHomeAccessToken = props.streamHomeAccessToken, streamHomeApplications = props.streamHomeApplications, avatarName = props.avatarName, dataAttributes = props.dataAttributes, showSupportLinks = props.showSupportLinks, hidePromotionalCampaign = props.hidePromotionalCampaign, avatarPanelShowHelpLinks = props.avatarPanelShowHelpLinks, promotionalCampaigns = props.promotionalCampaigns, rest = __rest(props, ["items", "secondaryItems", "logo", "logoText", "logoOnClick", "appRootID", "hasStreamHome", "hideStreamHomeButton", "StreamHomeUrl", "streamHomeApiKey", "streamHomeBaseUrl", "localization", "streamHomeAccessToken", "streamHomeApplications", "avatarName", "dataAttributes", "showSupportLinks", "hidePromotionalCampaign", "avatarPanelShowHelpLinks", "promotionalCampaigns"]);
61
61
  var messages = __assign(__assign({}, defaultMessages), localization);
62
62
  var dataIds = __assign(__assign({}, defaultAttributes), dataAttributes);
63
63
  var propIsDrawerOpen = typeof (props === null || props === void 0 ? void 0 : props.isDrawerOpen) === 'boolean' ? props.isDrawerOpen : undefined;
@@ -97,7 +97,7 @@ var VerticalNavigation = function (props) {
97
97
  }, [avatarName, hasAvatar]);
98
98
  // This fixes an issue with how MUI handles the modal and aria-hidden.
99
99
  // When open, the Modal adds aria-hidden="true" to a top-level element,
100
- // which causes some screen readers to annouce the elements as "blank".
100
+ // which causes some screen readers to announce the elements as "blank".
101
101
  // This fix just overrides the default aria-hidden attribute.
102
102
  //
103
103
  // https://github.com/mui/material-ui/issues/19450
@@ -240,7 +240,7 @@ var VerticalNavigation = function (props) {
240
240
  var _a;
241
241
  return (_createElement(VerticalNavigationItem, __assign({}, item, { "data-id": dataIds.VerticalNavigationSecondaryListItem, key: "".concat(item.label, " - ").concat(index), index: index, isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, style: animationRefs.current[((_a = items === null || items === void 0 ? void 0 : items.length) !== null && _a !== void 0 ? _a : 0) + index + 1] })));
242
242
  }), hasStreamHome
243
- ? (_jsx(VerticalNavigationItem, { id: dataIds.VerticalNavigationAppSwitcherToggle, "data-id": dataIds.VerticalNavigationAppSwitcherToggle, label: messages['app-switcher'], icon: _jsx(AppsIcon, {}), onClick: handleToggleAppSwitcher, content: (_jsx(AppSwitcher, { isAppSwitcherOpen: isAppSwitcherOpen, handleToggleAppSwitcher: handleToggleAppSwitcher, applications: streamHomeApplications, apiKey: streamHomeApiKey !== null && streamHomeApiKey !== void 0 ? streamHomeApiKey : '', baseUrl: streamHomeBaseUrl !== null && streamHomeBaseUrl !== void 0 ? streamHomeBaseUrl : '', token: streamHomeAccessToken !== null && streamHomeAccessToken !== void 0 ? streamHomeAccessToken : '', isDrawerOpen: isDrawerOpen, hideStreamHomeButton: hideStreamHomeButton || false, StreamHomeUrl: StreamHomeUrl !== null && StreamHomeUrl !== void 0 ? StreamHomeUrl : Constants.DefaultStreamHomeUrl })), isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, hasCustomContent: true, style: animationRefs.current[((_a = items === null || items === void 0 ? void 0 : items.length) !== null && _a !== void 0 ? _a : 0) + ((_b = defaultSupportLinks === null || defaultSupportLinks === void 0 ? void 0 : defaultSupportLinks.length) !== null && _b !== void 0 ? _b : 0) + 1], isContentOpen: isAppSwitcherOpen }))
243
+ ? (_jsx(VerticalNavigationItem, { id: dataIds.VerticalNavigationAppSwitcherToggle, "data-id": dataIds.VerticalNavigationAppSwitcherToggle, label: messages['app-switcher'], icon: _jsx(AppsIcon, {}), onClick: handleToggleAppSwitcher, content: (_jsx(AppSwitcher, { isAppSwitcherOpen: isAppSwitcherOpen, handleToggleAppSwitcher: handleToggleAppSwitcher, applications: streamHomeApplications, apiKey: streamHomeApiKey !== null && streamHomeApiKey !== void 0 ? streamHomeApiKey : '', baseUrl: streamHomeBaseUrl !== null && streamHomeBaseUrl !== void 0 ? streamHomeBaseUrl : '', token: streamHomeAccessToken !== null && streamHomeAccessToken !== void 0 ? streamHomeAccessToken : '', isDrawerOpen: isDrawerOpen, hideStreamHomeButton: hideStreamHomeButton || false, StreamHomeUrl: StreamHomeUrl !== null && StreamHomeUrl !== void 0 ? StreamHomeUrl : Constants.DefaultStreamHomeUrl, hidePromotionalCampaign: hidePromotionalCampaign !== null && hidePromotionalCampaign !== void 0 ? hidePromotionalCampaign : false, promotionalCampaigns: promotionalCampaigns })), isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, hasCustomContent: true, style: animationRefs.current[((_a = items === null || items === void 0 ? void 0 : items.length) !== null && _a !== void 0 ? _a : 0) + ((_b = defaultSupportLinks === null || defaultSupportLinks === void 0 ? void 0 : defaultSupportLinks.length) !== null && _b !== void 0 ? _b : 0) + 1], isContentOpen: isAppSwitcherOpen }))
244
244
  : null, secondaryItems && secondaryItems.length > 0 && secondaryItems.map(function (item, index) {
245
245
  var _a, _b;
246
246
  return (_createElement(VerticalNavigationItem, __assign({}, item, { "data-id": dataIds.VerticalNavigationSecondaryListItem, key: "".concat(item.label, " - ").concat(index), index: index, isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, style: animationRefs.current[((_a = items === null || items === void 0 ? void 0 : items.length) !== null && _a !== void 0 ? _a : 0) + ((_b = defaultSupportLinks === null || defaultSupportLinks === void 0 ? void 0 : defaultSupportLinks.length) !== null && _b !== void 0 ? _b : 0) + index + 1] })));
@@ -72,7 +72,7 @@ export var getDefaultSupportLinks = function (messages) {
72
72
  onClick: function () { return null; },
73
73
  children: [
74
74
  { label: messages['help-center'], onClick: function () { return window.open('https://learningpool.zendesk.com/', '_blank'); } },
75
- { label: messages['submit-feedback'], onClick: function () { return window.open('https://app.smartsheet.com/b/form/823248624a324630a904e825098ca816', '_blank'); } },
75
+ { label: messages['submit-feedback'], onClick: function () { return window.open('https://learningpool.com/feature-request/', '_blank'); } },
76
76
  { label: messages['contact-us'], onClick: function () { return window.open('https://learningpool.com/support/', '_blank'); } }
77
77
  ]
78
78
  }
@@ -1,5 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { IPromotionalCampaign } from '../../../types/components/stream/AppSwitcher';
3
4
  interface IApplication {
4
5
  applicationId: number;
5
6
  applicationName: string;
@@ -24,6 +25,8 @@ interface IProps {
24
25
  dataAttributes?: any;
25
26
  StreamHomeUrl?: string;
26
27
  hideStreamHomeButton?: boolean;
28
+ hidePromotionalCampaign?: boolean;
29
+ promotionalCampaigns?: IPromotionalCampaign[] | null;
27
30
  }
28
31
  declare const AppSwitcher: {
29
32
  (props: IProps): ReactElement | null;
@@ -36,6 +39,7 @@ declare const AppSwitcher: {
36
39
  localization: PropTypes.Requireable<object>;
37
40
  currentApplicationId: PropTypes.Requireable<number>;
38
41
  applications: PropTypes.Requireable<any[]>;
42
+ hidePromotionalCampaign: PropTypes.Requireable<boolean>;
39
43
  };
40
44
  defaultProps: {
41
45
  layout: string;
@@ -55,23 +55,96 @@ import { AppListHeader, AppListItem, AppOrganisationCount, StyledSVG, BackButton
55
55
  import { Constants } from './constants';
56
56
  import { defaultAttributes } from '../../../utils/dataAttributes';
57
57
  import ChevronRightIcon from '@mui/icons-material/ChevronRight';
58
+ import PromotionalCampaignItem from './PromotionalCampaignItem';
59
+ var addUtmParams = function (baseUrl, source, medium, campaign) {
60
+ var url = new URL(baseUrl);
61
+ url.searchParams.append('utm_source,', source);
62
+ url.searchParams.append('utm_medium', medium);
63
+ url.searchParams.append('utm_campaign', campaign);
64
+ return url.toString();
65
+ };
58
66
  var AppSwitcher = function (props) {
59
67
  var _a;
60
68
  var isAppSwitcherOpen = props.isAppSwitcherOpen, handleToggleAppSwitcher = props.handleToggleAppSwitcher, isDrawerOpen = props.isDrawerOpen, localization = props.localization, dataAttributes = props.dataAttributes, _b = props.apiKey, apiKey = _b === void 0 ? '' : _b, baseUrl = props.baseUrl;
61
69
  var token = props.token;
62
70
  // Holds the applications which are displayed.
63
71
  var _c = useState([]), applications = _c[0], setApplications = _c[1];
72
+ // Holds the latest promotional campaign advert.
73
+ var _d = useState(null), promotionalCampaigns = _d[0], setPromotionalCampaigns = _d[1];
64
74
  // Controls which tab is active.
65
- var _d = useState(Constants.Tabs.ListApplications), activeTab = _d[0], setActiveTab = _d[1];
75
+ var _e = useState(Constants.Tabs.ListApplications), activeTab = _e[0], setActiveTab = _e[1];
66
76
  // Holds the list of filtered organisations (on the second tab).
67
- var _e = useState([]), filteredOrgs = _e[0], setFilteredOrgs = _e[1];
77
+ var _f = useState([]), filteredOrgs = _f[0], setFilteredOrgs = _f[1];
68
78
  // Holds a reference to the active application (on the second tab).
69
- var _f = useState(null), activeApplication = _f[0], setActiveApplication = _f[1];
79
+ var _g = useState(null), activeApplication = _g[0], setActiveApplication = _g[1];
70
80
  // Stores any org filter text (on the second tab).
71
- var _g = useState(''), searchString = _g[0], setSearchString = _g[1];
81
+ var _h = useState(''), searchString = _h[0], setSearchString = _h[1];
72
82
  var messages = __assign(__assign({}, Constants.DefaultMessages), localization);
73
83
  var dataIds = __assign(__assign({}, defaultAttributes), dataAttributes);
74
84
  var userId = (_a = props.userId) !== null && _a !== void 0 ? _a : '';
85
+ /**
86
+ * Queries the Hub/Home API to fetch latest promotional campaign.
87
+ * @returns {Promise<IApplication[]>} Get a Promotional Campaign to show.
88
+ */
89
+ var getLatestPromotionalCampaign = function () { return __awaiter(void 0, void 0, void 0, function () {
90
+ var decodedToken, response, data, error_1;
91
+ return __generator(this, function (_a) {
92
+ switch (_a.label) {
93
+ case 0:
94
+ if (!(token && typeof token === 'string' &&
95
+ token !== window.localStorage.getItem(Constants.LocalStorageKey.Token))) return [3 /*break*/, 6];
96
+ if (!userId) {
97
+ decodedToken = jwtDecode(token);
98
+ userId = decodedToken[Constants.HomeAttributes.UserId];
99
+ }
100
+ _a.label = 1;
101
+ case 1:
102
+ _a.trys.push([1, 4, , 5]);
103
+ return [4 /*yield*/, fetch("".concat(baseUrl !== null && baseUrl !== void 0 ? baseUrl : Constants.BaseUrl, "/promotional-campaigns?onlyLatest=true"), {
104
+ method: 'get',
105
+ headers: new Headers({
106
+ Authorization: "Bearer ".concat(token),
107
+ 'x-api-key': apiKey
108
+ })
109
+ })];
110
+ case 2:
111
+ response = _a.sent();
112
+ if (response.status !== 200) {
113
+ console.error('Unable to retrieve latest promotional campaign from Stream Home');
114
+ return [2 /*return*/, null];
115
+ }
116
+ return [4 /*yield*/, response.json()
117
+ // Store the latest access token.
118
+ ];
119
+ case 3:
120
+ data = _a.sent();
121
+ // Store the latest access token.
122
+ window.localStorage.setItem(Constants.LocalStorageKey.Token, token);
123
+ if (data && data.length > 0) {
124
+ return [2 /*return*/, data.map(function (_a) {
125
+ var id = _a.id, name = _a.name, appSwitcherImageUrl = _a.appSwitcherImageUrl, hubImageUrl = _a.hubImageUrl, altText = _a.altText, basePromoUrl = _a.basePromoUrl, isActive = _a.isActive;
126
+ return ({
127
+ id: id,
128
+ name: name,
129
+ appSwitcherImageUrl: appSwitcherImageUrl,
130
+ hubImageUrl: hubImageUrl,
131
+ altText: altText,
132
+ basePromoUrl: basePromoUrl,
133
+ isActive: isActive
134
+ });
135
+ })];
136
+ }
137
+ return [3 /*break*/, 5];
138
+ case 4:
139
+ error_1 = _a.sent();
140
+ console.error('Unable to retrieve latest promotional campaign from Stream Home', error_1);
141
+ return [2 /*return*/, null];
142
+ case 5: return [3 /*break*/, 7];
143
+ case 6: return [2 /*return*/, null];
144
+ case 7: return [2 /*return*/, null];
145
+ }
146
+ });
147
+ }); };
75
148
  /**
76
149
  * Handles closing of the application dialog.
77
150
  */
@@ -173,12 +246,13 @@ var AppSwitcher = function (props) {
173
246
  }); };
174
247
  useEffect(function () {
175
248
  var loadData = function () { return __awaiter(void 0, void 0, void 0, function () {
176
- var applicationInstances, userApplications, parsedQueryString, match, uniqueApplicationIds, localApplications;
249
+ var applicationInstances, userApplications, promotionalCampaigns, parsedQueryString, match, uniqueApplicationIds, localApplications, localPromotionalCampaignsJson, parsedCampaigns;
177
250
  return __generator(this, function (_a) {
178
251
  switch (_a.label) {
179
252
  case 0:
180
253
  applicationInstances = [];
181
254
  userApplications = [];
255
+ promotionalCampaigns = null;
182
256
  if (!token) {
183
257
  parsedQueryString = queryString.parse(window.location.search);
184
258
  if (parsedQueryString.token && typeof parsedQueryString.token === 'string') {
@@ -246,6 +320,30 @@ var AppSwitcher = function (props) {
246
320
  }
247
321
  // Store the user's applications.
248
322
  setApplications(userApplications);
323
+ if (!(!props.promotionalCampaigns || props.promotionalCampaigns.length === 0)) return [3 /*break*/, 5];
324
+ return [4 /*yield*/, getLatestPromotionalCampaign()];
325
+ case 4:
326
+ promotionalCampaigns = _a.sent();
327
+ return [3 /*break*/, 6];
328
+ case 5:
329
+ promotionalCampaigns = props.promotionalCampaigns;
330
+ _a.label = 6;
331
+ case 6:
332
+ if (Array.isArray(promotionalCampaigns) && promotionalCampaigns.length) {
333
+ // Serialize and cache the promotional campaigns returned.
334
+ window.localStorage.setItem(Constants.LocalStorageKey.PromotionalCampaigns, JSON.stringify(promotionalCampaigns));
335
+ }
336
+ else {
337
+ localPromotionalCampaignsJson = window.localStorage.getItem(Constants.LocalStorageKey.PromotionalCampaigns);
338
+ if (localPromotionalCampaignsJson) {
339
+ parsedCampaigns = JSON.parse(localPromotionalCampaignsJson);
340
+ // Type assertion to ensure type safety
341
+ if (Array.isArray(parsedCampaigns)) {
342
+ promotionalCampaigns = parsedCampaigns;
343
+ }
344
+ }
345
+ setPromotionalCampaigns(promotionalCampaigns);
346
+ }
249
347
  return [2 /*return*/];
250
348
  }
251
349
  });
@@ -284,11 +382,13 @@ var AppSwitcher = function (props) {
284
382
  if (!props.applications && (!token || !apiKey)) {
285
383
  return null;
286
384
  }
385
+ var hasPromotionalCampaign = !!promotionalCampaigns;
386
+ var _j = props.hidePromotionalCampaign, hidePromotionalCampaign = _j === void 0 ? false : _j;
287
387
  return (_jsxs(AppSwitcherPanel, __assign({ id: "app-switcher-menu", style: {
288
388
  display: isAppSwitcherOpen ? 'block' : 'none',
289
389
  left: isDrawerOpen ? Constants.DrawerWidth.Expanded : Constants.DrawerWidth.Collapsed - 3
290
- }, role: 'dialog', "aria-label": "App Switcher", onKeyDown: handleKeyDown, "data-id": dataIds.AppSwitcherContainer, onMouseDown: function (event) { return event.stopPropagation(); } }, { children: [activeTab === Constants.Tabs.ListApplications
291
- ? (_jsxs("div", { children: [_jsxs(AppListHeader, __assign({ "data-id": dataIds.AppSwitcherHeader }, { children: [messages['your-apps'], !props.hideStreamHomeButton &&
390
+ }, role: 'dialog', "aria-label": "App Switcher", onKeyDown: handleKeyDown, "data-id": dataIds.AppSwitcherContainer, hasPromotionalCampaign: hasPromotionalCampaign, onMouseDown: function (event) { return event.stopPropagation(); } }, { children: [activeTab === Constants.Tabs.ListApplications
391
+ ? (_jsxs("div", { children: [!hidePromotionalCampaign && promotionalCampaigns && promotionalCampaigns.length > 0 && (_jsx("div", __assign({ className: "promotional-campaigns-container" }, { children: promotionalCampaigns.map(function (campaign) { return (_jsx(PromotionalCampaignItem, { imageUrl: campaign.appSwitcherImageUrl, altText: campaign.altText, linkUrl: addUtmParams(campaign.basePromoUrl, 'stream-home', 'app_switcher', campaign.name) }, campaign.id)); }) }))), _jsxs(AppListHeader, __assign({ "data-id": dataIds.AppSwitcherHeader }, { children: [messages['your-apps'], !props.hideStreamHomeButton &&
292
392
  _jsx(StyleHomeButton, __assign({ "aria-label": messages['go-to-hub'], endIcon: _jsx(ChevronRightIcon, {}), onClick: function (e) { var _a; return window.open((_a = props.StreamHomeUrl) !== null && _a !== void 0 ? _a : Constants.DefaultStreamHomeUrl); } }, { children: messages['go-to-hub'] }))] })), _jsx(MenuContent, __assign({ style: {
293
393
  display: activeTab === 1 ? 'flex' : 'none'
294
394
  }, "data-id": dataIds.AppSwitcherList }, { children: applications.map(function (_a) {
@@ -312,7 +412,8 @@ AppSwitcher.propTypes = {
312
412
  baseUrl: PropTypes.string,
313
413
  localization: PropTypes.object,
314
414
  currentApplicationId: PropTypes.number,
315
- applications: PropTypes.array
415
+ applications: PropTypes.array,
416
+ hidePromotionalCampaign: PropTypes.bool
316
417
  };
317
418
  AppSwitcher.defaultProps = {
318
419
  layout: Constants.Layout.Vertical,
@@ -1,23 +1,25 @@
1
1
  /// <reference types="react" />
2
- export declare const AppSwitcherPanel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
- export declare const List: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
4
- export declare const MenuContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
- export declare const SearchContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
- export declare const AppListHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
- export declare const AppListItem: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
- export declare const AppLink: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
9
- export declare const AppName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
10
- export declare const BackButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
11
- export declare const SearchBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
12
- export declare const AppOrganisationCount: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
13
- export declare const SelectedOrganisation: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
14
- export declare const StyledSVG: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").SVGProps<SVGSVGElement>, {}>;
15
- export declare const OrganisationList: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
16
- export declare const OrganisationLink: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
17
- export declare const StyledLogoSVG: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").SVGProps<SVGSVGElement>, {}>;
2
+ export declare const AppSwitcherPanel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
3
+ hasPromotionalCampaign: boolean;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
+ export declare const List: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
6
+ export declare const MenuContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
+ export declare const SearchContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
+ export declare const AppListHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
+ export declare const AppListItem: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
10
+ export declare const AppLink: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
11
+ export declare const AppName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
12
+ export declare const BackButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
13
+ export declare const SearchBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
14
+ export declare const AppOrganisationCount: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
15
+ export declare const SelectedOrganisation: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
16
+ export declare const StyledSVG: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").SVGProps<SVGSVGElement>, {}>;
17
+ export declare const OrganisationList: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
18
+ export declare const OrganisationLink: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
19
+ export declare const StyledLogoSVG: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").SVGProps<SVGSVGElement>, {}>;
18
20
  export declare const StyleHomeButton: import("@emotion/styled").StyledComponent<{
19
21
  children?: import("react").ReactNode;
20
- classes?: Partial<import("@mui/material/Button").ButtonClasses> | undefined;
22
+ classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
21
23
  color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
22
24
  disabled?: boolean | undefined;
23
25
  disableElevation?: boolean | undefined;
@@ -27,7 +29,7 @@ export declare const StyleHomeButton: import("@emotion/styled").StyledComponent<
27
29
  href?: string | undefined;
28
30
  size?: "small" | "large" | "medium" | undefined;
29
31
  startIcon?: import("react").ReactNode;
30
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
32
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
31
33
  variant?: "text" | "outlined" | "contained" | undefined;
32
34
  } & Omit<{
33
35
  action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
@@ -41,10 +43,65 @@ export declare const StyleHomeButton: import("@emotion/styled").StyledComponent<
41
43
  focusVisibleClassName?: string | undefined;
42
44
  LinkComponent?: import("react").ElementType<any> | undefined;
43
45
  onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
44
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
46
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
45
47
  tabIndex?: number | undefined;
46
48
  TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
47
49
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
48
50
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
49
51
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
50
- }, 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"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
52
+ }, 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"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
53
+ export declare const PromotionalCampaignImage: import("@emotion/styled").StyledComponent<{
54
+ children?: import("react").ReactNode;
55
+ classes?: Partial<import("@mui/material").CardMediaClasses> | undefined;
56
+ image?: string | undefined;
57
+ src?: string | undefined;
58
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
59
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
60
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
61
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "image" | "children" | "src" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
62
+ export declare const PromotionalCampaignCard: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").PaperProps<"div", {}>, "classes"> & {
63
+ classes?: Partial<import("@mui/material").CardClasses> | undefined;
64
+ raised?: boolean | undefined;
65
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
66
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
67
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
68
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "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" | "square" | "elevation" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
69
+ export declare const PromotionalCampaignCardStyled: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").PaperProps<"div", {}>, "classes"> & {
70
+ classes?: Partial<import("@mui/material").CardClasses> | undefined;
71
+ raised?: boolean | undefined;
72
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
73
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
74
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
75
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "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" | "square" | "elevation" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
76
+ export declare const PromotionalCampaignCardActionArea: import("@emotion/styled").StyledComponent<{
77
+ classes?: Partial<import("@mui/material").CardActionAreaClasses> | undefined;
78
+ focusVisibleClassName?: string | undefined;
79
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
80
+ } & Omit<{
81
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
82
+ centerRipple?: boolean | undefined;
83
+ children?: import("react").ReactNode;
84
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
85
+ disabled?: boolean | undefined;
86
+ disableRipple?: boolean | undefined;
87
+ disableTouchRipple?: boolean | undefined;
88
+ focusRipple?: boolean | undefined;
89
+ focusVisibleClassName?: string | undefined;
90
+ LinkComponent?: import("react").ElementType<any> | undefined;
91
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
92
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
93
+ tabIndex?: number | undefined;
94
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
95
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
96
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
97
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
98
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "children" | "sx" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
99
+ export declare const PromotionalCampaignCardMedia: import("@emotion/styled").StyledComponent<{
100
+ children?: import("react").ReactNode;
101
+ classes?: Partial<import("@mui/material").CardMediaClasses> | undefined;
102
+ image?: string | undefined;
103
+ src?: string | undefined;
104
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
105
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
106
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
107
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "image" | "children" | "src" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -2,13 +2,14 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
2
2
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
3
  return cooked;
4
4
  };
5
+ import { Card, CardActionArea, CardMedia } from '@mui/material';
5
6
  import { styled } from '@mui/material/styles';
6
7
  import Button from '@mui/material/Button';
7
- export var AppSwitcherPanel = styled('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 0 4px 4px 0;\n bottom: 0;\n box-shadow: ", ";\n box-sizing: border-box;\n font-family: 'Roboto';\n height: 450px;\n left: ", ";\n right: ", ";\n overflow: auto;\n overflow-x: hidden;\n padding: 1rem 1.5rem;\n position: fixed;\n width: 360px;\n z-index: 1;\n\n & > div {\n padding-bottom: 3rem;\n }\n"], ["\n background-color: ", ";\n border-radius: 0 4px 4px 0;\n bottom: 0;\n box-shadow: ", ";\n box-sizing: border-box;\n font-family: 'Roboto';\n height: 450px;\n left: ", ";\n right: ", ";\n overflow: auto;\n overflow-x: hidden;\n padding: 1rem 1.5rem;\n position: fixed;\n width: 360px;\n z-index: 1;\n\n & > div {\n padding-bottom: 3rem;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
8
+ export var AppSwitcherPanel = styled('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 0 4px 4px 0;\n bottom: 0;\n box-shadow: ", ";\n box-sizing: border-box;\n font-family: 'Roboto';\n height: ", ";\n left: ", ";\n right: ", ";\n overflow: auto;\n overflow-x: hidden;\n padding: 1rem 1.5rem;\n position: fixed;\n width: 360px;\n z-index: 1;\n\n & > div {\n padding-bottom: 3rem;\n }\n"], ["\n background-color: ", ";\n border-radius: 0 4px 4px 0;\n bottom: 0;\n box-shadow: ", ";\n box-sizing: border-box;\n font-family: 'Roboto';\n height: ", ";\n left: ", ";\n right: ", ";\n overflow: auto;\n overflow-x: hidden;\n padding: 1rem 1.5rem;\n position: fixed;\n width: 360px;\n z-index: 1;\n\n & > div {\n padding-bottom: 3rem;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
8
9
  ? props.theme.palette.primary.dark
9
10
  : '#E6EAF0'; }, function (props) { return props.theme.direction === 'ltr'
10
11
  ? '5px 7px 8px -10px rgb(0 0 0 / 20%), 5px 12px 17px -10px rgb(0 0 0 / 14%), 5px 5px 22px -10px rgb(0 0 0 / 12%)'
11
- : '-5px 7px 8px -10px rgb(0 0 0 / 20%), -5px 12px 17px -10px rgb(0 0 0 / 14%), -5px 5px 22px -10px rgb(0 0 0 / 12%)'; }, function (props) { return props.theme.direction === 'ltr' ? '57px' : 'auto'; }, function (props) { return props.theme.direction === 'rtl' ? '57px' : 'auto'; });
12
+ : '-5px 7px 8px -10px rgb(0 0 0 / 20%), -5px 12px 17px -10px rgb(0 0 0 / 14%), -5px 5px 22px -10px rgb(0 0 0 / 12%)'; }, function (props) { return props.hasPromotionalCampaign ? 'calc(450px + 100px)' : '450px'; }, function (props) { return props.theme.direction === 'ltr' ? '57px' : 'auto'; }, function (props) { return props.theme.direction === 'rtl' ? '57px' : 'auto'; });
12
13
  export var List = styled('ul')(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n"], ["\n"])));
13
14
  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"])));
14
15
  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"])));
@@ -49,4 +50,16 @@ export var StyledLogoSVG = styled('svg')(templateObject_16 || (templateObject_16
49
50
  ? props.theme.palette.primary.dark
50
51
  : '#E6EAF0'; });
51
52
  export var StyleHomeButton = styled(Button)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n align-items: center;\n color: #00538e;\n display: flex;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n text-decoration: none;\n text-transform: none;\n\n &:hover {\n background-color: transparent;\n }\n"], ["\n align-items: center;\n color: #00538e;\n display: flex;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n text-decoration: none;\n text-transform: none;\n\n &:hover {\n background-color: transparent;\n }\n"])));
52
- 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, templateObject_17;
53
+ export var PromotionalCampaignImage = styled(CardMedia)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n height: 150px;\n width: 300px;\n"], ["\n height: 150px;\n width: 300px;\n"])));
54
+ export var PromotionalCampaignCard = styled(Card)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), function (props) { return props.theme.palette.primary.main; });
55
+ export var PromotionalCampaignCardStyled = styled(Card)(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n width: 100%;\n height: 162px;\n margin-bottom: 4px;\n background: ", ";\n"], ["\n width: 100%;\n height: 162px;\n margin-bottom: 4px;\n background: ", ";\n"])), function (props) { return props.theme.palette.primary.main; });
56
+ export var PromotionalCampaignCardActionArea = styled(CardActionArea)(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 8px;\n"], ["\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 8px;\n"])));
57
+ export var PromotionalCampaignCardMedia = styled(CardMedia)(function () { return ({
58
+ width: '100%',
59
+ height: '100%',
60
+ objectFit: 'cover',
61
+ '&.MuiCardMedia-img': {
62
+ objectPosition: 'center'
63
+ }
64
+ }); });
65
+ 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, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21;
@@ -0,0 +1,8 @@
1
+ import { ReactElement } from 'react';
2
+ interface IPromotionalCampaignItemProps {
3
+ imageUrl: string;
4
+ altText: string;
5
+ linkUrl: string;
6
+ }
7
+ declare const PromotionalCampaignItem: ({ imageUrl, altText, linkUrl }: IPromotionalCampaignItemProps) => ReactElement;
8
+ export default PromotionalCampaignItem;
@@ -0,0 +1,31 @@
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";
13
+ import { CardMedia } from '@mui/material';
14
+ import React, { useState } from 'react';
15
+ import { PromotionalCampaignCardStyled, PromotionalCampaignCardActionArea } from './AppSwitcherStyles';
16
+ var PromotionalCampaignItem = function (_a) {
17
+ var imageUrl = _a.imageUrl, altText = _a.altText, linkUrl = _a.linkUrl;
18
+ var _b = useState(true), imageLoaded = _b[0], setImageLoaded = _b[1];
19
+ var handleImageError = function () {
20
+ setImageLoaded(false);
21
+ };
22
+ return (_jsx(React.Fragment, { children: imageLoaded && (_jsx(PromotionalCampaignCardStyled, { children: _jsx(PromotionalCampaignCardActionArea, __assign({ onClick: function () { return window.open(linkUrl, '_blank'); } }, { children: _jsx(CardMedia, { component: "img", image: imageUrl, alt: altText, onError: handleImageError, sx: {
23
+ width: '100%',
24
+ height: '100%',
25
+ objectFit: 'cover',
26
+ '&.MuiCardMedia-img': {
27
+ objectPosition: 'center'
28
+ }
29
+ } }) })) })) }));
30
+ };
31
+ export default PromotionalCampaignItem;
@@ -2,6 +2,7 @@ export declare const Constants: Readonly<{
2
2
  LocalStorageKey: {
3
3
  Token: string;
4
4
  Applications: string;
5
+ PromotionalCampaigns: string;
5
6
  };
6
7
  HomeAttributes: {
7
8
  UserId: string;
@@ -53,3 +54,12 @@ export declare const applications: ({
53
54
  customName: string;
54
55
  url: string;
55
56
  })[];
57
+ export declare const promotionalContent: {
58
+ id: number;
59
+ name: string;
60
+ appSwitcherImageUrl: string;
61
+ hubImageUrl: string;
62
+ altText: string;
63
+ basePromoUrl: string;
64
+ isActive: boolean;
65
+ }[];
@@ -1,7 +1,8 @@
1
1
  export var Constants = Object.freeze({
2
2
  LocalStorageKey: {
3
3
  Token: 'lp-home-access-token',
4
- Applications: 'lp-home-applications'
4
+ Applications: 'lp-home-applications',
5
+ PromotionalCampaigns: 'lp-home-promotionalCampaigns'
5
6
  },
6
7
  HomeAttributes: {
7
8
  UserId: 'lp-home-user-id'
@@ -40,9 +41,21 @@ export var Constants = Object.freeze({
40
41
  });
41
42
  export var applications = [
42
43
  { applicationId: 1, applicationName: 'Stream LXP', shortName: 'LXP', internalName: 'stream', url: 'https://learningpool.com' },
43
- { applicationId: 2, applicationName: 'Stream Analytics', shortName: 'Long Wrapping Test Stream Analytics', internalName: 'analytics', url: 'https://learningpool.com' },
44
- { applicationId: 3, applicationName: 'Stream Automation', shortName: 'Event Management', internalName: 'automation', customName: 'Waves 1', url: 'https://learningpool.com' },
45
- { applicationId: 3, applicationName: 'Stream Automation', shortName: 'Automation', internalName: 'automation', customName: 'Waves 2', url: 'https://learningpool.com' },
46
- { applicationId: 7, applicationName: 'Stream LMS', shortName: 'LMS', internalName: 'lms', customName: '', url: 'https://learningpool.com' },
47
- { applicationId: 4, applicationName: 'Stream Authoring', shortName: 'Authoring', internalName: 'authoring', customName: '', url: 'https://learningpool.com' }
44
+ { applicationId: 2, applicationName: 'Stream Analytics', shortName: 'Long Wrapping Test Stream Analytics', internalName: 'analytics', url: 'https://learningpool.com?Analytics' },
45
+ { applicationId: 3, applicationName: 'Stream Automation', shortName: 'Event Management', internalName: 'automation', customName: 'Waves 1', url: 'https://learningpool.com?AutomationEventManagement' },
46
+ { applicationId: 3, applicationName: 'Stream Automation', shortName: 'Automation', internalName: 'automation', customName: 'Waves 2', url: 'https://learningpool.com?Automation' },
47
+ { applicationId: 7, applicationName: 'Stream LMS', shortName: 'LMS', internalName: 'lms', url: 'https://learningpool.com?LMS' },
48
+ { applicationId: 4, applicationName: 'Stream Authoring', shortName: 'Authoring', internalName: 'authoring', url: 'https://learningpool.com?Authoring' },
49
+ { applicationId: 8, applicationName: 'IQ', shortName: 'IQ', internalName: 'iq', url: 'https://data.applications.com?IQ' }
50
+ ];
51
+ export var promotionalContent = [
52
+ {
53
+ id: 1,
54
+ name: 'AIC campaign',
55
+ appSwitcherImageUrl: 'https://i.ibb.co/GJryH41/AIC-advert.jpg',
56
+ hubImageUrl: '',
57
+ altText: 'AIC',
58
+ basePromoUrl: 'https://aic.lp-home-web-sever.js.com',
59
+ isActive: true
60
+ }
48
61
  ];
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "components",
10
10
  "ui"
11
11
  ],
12
- "version": "1.13.0",
12
+ "version": "1.14.0",
13
13
  "private": false,
14
14
  "main": "index.js",
15
15
  "module": "index.js",
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IApplication } from '../stream/AppSwitcher';
2
+ import { IApplication, IPromotionalCampaign } from '../stream/AppSwitcher';
3
3
  import { IAvatarMenuItemProps } from './VerticalNavigationAvatar';
4
4
  export interface IVerticalNavigationItemProps {
5
5
  label: string;
@@ -40,6 +40,8 @@ export interface IVerticalNavigationProps {
40
40
  localization?: any;
41
41
  dataAttributes?: any;
42
42
  showSupportLinks?: boolean;
43
+ hidePromotionalCampaign?: boolean;
44
+ promotionalCampaigns?: IPromotionalCampaign[];
43
45
  hasAvatar?: boolean;
44
46
  avatarPanelLogoutString?: string;
45
47
  avatarPanelOnClickSwitchDirection?: any;
@@ -7,3 +7,12 @@ export interface IApplication {
7
7
  url: string;
8
8
  children?: object[];
9
9
  }
10
+ export interface IPromotionalCampaign {
11
+ id: number;
12
+ name: string;
13
+ appSwitcherImageUrl: string;
14
+ hubImageUrl: string;
15
+ altText: string;
16
+ basePromoUrl: string;
17
+ isActive: boolean;
18
+ }