@stack-spot/portal-layout 2.15.0 → 2.16.1
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.
- package/CHANGELOG.md +14 -0
- package/dist/components/PortalSwitcher.d.ts +4 -0
- package/dist/components/PortalSwitcher.d.ts.map +1 -1
- package/dist/components/PortalSwitcher.js +3 -2
- package/dist/components/PortalSwitcher.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/PortalSwitcher.tsx +7 -2
- package/src/types.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.16.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.16.0...portal-layout@v2.16.1) (2024-11-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* switch account ([#508](https://github.com/stack-spot/portal-commons/issues/508)) ([2768ec2](https://github.com/stack-spot/portal-commons/commit/2768ec21e0938d4b60c55e751da7fd0ed8b3f578))
|
|
9
|
+
|
|
10
|
+
## [2.16.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.15.0...portal-layout@v2.16.0) (2024-11-22)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* switch account ([#504](https://github.com/stack-spot/portal-commons/issues/504)) ([ae13407](https://github.com/stack-spot/portal-commons/commit/ae13407f16219872591cdb4d7cae6c3ff087de74))
|
|
16
|
+
|
|
3
17
|
## [2.15.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.14.1...portal-layout@v2.15.0) (2024-11-22)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalSwitcher.d.ts","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"PortalSwitcher.d.ts","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAUxC,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA0DD;;;;GAIG;AACH,eAAO,MAAM,cAAc,gBAAsB,mBAAmB,4CAwCnE,CAAA"}
|
|
@@ -11,6 +11,7 @@ const Logos = {
|
|
|
11
11
|
'EDP': _jsx(EDP, {}),
|
|
12
12
|
'HUB': _jsx(HUB, {}),
|
|
13
13
|
'CS': _jsx(CS, {}),
|
|
14
|
+
'ACCOUNT': _jsx(Logo, {}),
|
|
14
15
|
};
|
|
15
16
|
const PortalSwitcherBox = styled(Flex) `
|
|
16
17
|
flex-direction: column;
|
|
@@ -79,12 +80,12 @@ export const PortalSwitcher = ({ portals = [] }) => {
|
|
|
79
80
|
_jsx(Button, { className: "current-portal", appearance: "text", colorScheme: "light", "aria-controls": PORTAL_SWITCHER_ID, "aria-expanded": visible, onClick: () => {
|
|
80
81
|
setVisible(!visible);
|
|
81
82
|
}, children: _jsxs(Flex, { alignItems: "center", className: "portal-switcher", children: [Logos[currentPortal.acronym], _jsx(IconBox, { size: "xs", ml: 3, children: _jsx(Select, {}) })] }) }) :
|
|
82
|
-
_jsx(Logo, {}), _jsx(SelectionList, { id: PORTAL_SWITCHER_ID, items: portals?.map(portal => ({
|
|
83
|
+
_jsx(Logo, {}), _jsx(SelectionList, { id: PORTAL_SWITCHER_ID, items: portals?.filter((portal) => portal.showOnList !== false).map(portal => ({
|
|
83
84
|
label: {
|
|
84
85
|
id: portal.acronym,
|
|
85
86
|
element: _jsx(Flex, { w: "250px", children: Logos[portal.acronym] }),
|
|
86
87
|
},
|
|
87
|
-
target: '
|
|
88
|
+
target: '_blank',
|
|
88
89
|
href: portal.url,
|
|
89
90
|
active: currentPortal?.acronym == portal.acronym,
|
|
90
91
|
iconActive: _jsx(CheckCircleFill, {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalSwitcher.js","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAGtC,MAAM,KAAK,GAAqC;IAC9C,IAAI,EAAE,KAAC,EAAE,KAAG;IACZ,KAAK,EAAE,KAAC,GAAG,KAAG;IACd,KAAK,EAAE,KAAC,GAAG,KAAG;IACd,IAAI,EAAE,KAAC,EAAE,KAAG;
|
|
1
|
+
{"version":3,"file":"PortalSwitcher.js","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,EAA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AE,OAAO,EAChB,SAAS,EAAC,OAAO,EACjB,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,IAClB,CAAA;AACvB,CAAC,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type PortalAcronym = 'EDP' | 'AI' | 'HUB' | 'CS';
|
|
1
|
+
export type PortalAcronym = 'EDP' | 'AI' | 'HUB' | 'CS' | 'ACCOUNT';
|
|
2
2
|
export type RightPanelSize = 'small' | 'medium' | 'large';
|
|
3
3
|
export type ModalSize = RightPanelSize | 'fit-content';
|
|
4
4
|
export type CustomModalSize = ModalSize | 'full';
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,CAAA;AACnE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AACzD,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,aAAa,CAAA;AACtD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ const Logos: Record<PortalAcronym, ReactNode> = {
|
|
|
12
12
|
'EDP': <EDP />,
|
|
13
13
|
'HUB': <HUB />,
|
|
14
14
|
'CS': <CS />,
|
|
15
|
+
'ACCOUNT': <Logo />,
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export interface Portal {
|
|
@@ -23,6 +24,10 @@ export interface Portal {
|
|
|
23
24
|
* The URL to the Stackspot Portal.
|
|
24
25
|
*/
|
|
25
26
|
url: string,
|
|
27
|
+
/**
|
|
28
|
+
* Show portal on List
|
|
29
|
+
*/
|
|
30
|
+
showOnList?: boolean,
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
export interface PortalSwitcherProps {
|
|
@@ -118,12 +123,12 @@ export const PortalSwitcher = ({ portals = [] }: PortalSwitcherProps) => {
|
|
|
118
123
|
<Logo />}
|
|
119
124
|
<SelectionList
|
|
120
125
|
id={PORTAL_SWITCHER_ID}
|
|
121
|
-
items={portals?.map(portal => ({
|
|
126
|
+
items={portals?.filter((portal) => portal.showOnList !== false).map(portal => ({
|
|
122
127
|
label: {
|
|
123
128
|
id: portal.acronym,
|
|
124
129
|
element: <Flex w="250px">{Logos[portal.acronym]}</Flex>,
|
|
125
130
|
},
|
|
126
|
-
target: '
|
|
131
|
+
target: '_blank',
|
|
127
132
|
href: portal.url,
|
|
128
133
|
active: currentPortal?.acronym == portal.acronym,
|
|
129
134
|
iconActive: <CheckCircleFill />,
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type PortalAcronym = 'EDP' | 'AI' | 'HUB' | 'CS'
|
|
1
|
+
export type PortalAcronym = 'EDP' | 'AI' | 'HUB' | 'CS' | 'ACCOUNT'
|
|
2
2
|
export type RightPanelSize = 'small' | 'medium' | 'large'
|
|
3
3
|
export type ModalSize = RightPanelSize | 'fit-content'
|
|
4
4
|
export type CustomModalSize = ModalSize | 'full'
|