@stack-spot/portal-layout 2.11.0 → 2.12.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.12.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.11.0...portal-layout@v2.12.0) (2024-10-11)
4
+
5
+
6
+ ### Features
7
+
8
+ * Remove tour from portal ([#408](https://github.com/stack-spot/portal-commons/issues/408)) ([13fe9a4](https://github.com/stack-spot/portal-commons/commit/13fe9a4be17a41b97fefcc80da9adc4567727306))
9
+
3
10
  ## [2.11.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.10.0...portal-layout@v2.11.0) (2024-10-11)
4
11
 
5
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationCenter/index.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB,+CA4C9B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationCenter/index.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,kBAAkB,+CA2C9B,CAAA"}
@@ -9,7 +9,6 @@ import { useEffect, useState } from 'react';
9
9
  import { useNotificationsDictionary } from './dictionary.js';
10
10
  import { NotificationPanel } from './NotificationPanel.js';
11
11
  import { NotificationBox } from './styled.js';
12
- import { useNotificationsTourStep } from './tour.js';
13
12
  import { getFiltersFromName, getNameFromFilters } from './utils.js';
14
13
  const MAX_ITEMS = 10;
15
14
  export const NotificationCenter = () => {
@@ -18,7 +17,6 @@ export const NotificationCenter = () => {
18
17
  const { applyFilters, filters, items, status, error } = useNotificationList({ size: MAX_ITEMS });
19
18
  const hasUnreadNotification = useUnreadNotifications();
20
19
  const controller = useNotificationController();
21
- useNotificationsTourStep();
22
20
  useEffectOnce(() => {
23
21
  controller.checkUnread();
24
22
  });
@@ -1 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@param props the component Props {@link PortalSwitcherProps}.
22
22
  */
23
23
  export declare const PortalSwitcher: ({ portals }: PortalSwitcherProps) => import("react/jsx-runtime").JSX.Element;
24
- /**
25
- * Tutorial: a React hook for retrieving the React Tour step that explains how the portal switcher works. The portal switcher is a component
26
- * at the top left corner of the layout (header) that allows the user to switch between the different Stackspot portals.
27
- * @returns the React Tour step for the PortalSwitcher.
28
- */
29
- export declare const usePortalSwitcherTourStep: () => void;
30
24
  //# sourceMappingURL=PortalSwitcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PortalSwitcher.d.ts","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":"AAQA,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;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA0DD;;;;GAIG;AACH,eAAO,MAAM,cAAc,gBAAsB,mBAAmB,4CAyCnE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,YAkBrC,CAAA"}
1
+ {"version":3,"file":"PortalSwitcher.d.ts","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AASxC,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA0DD;;;;GAIG;AACH,eAAO,MAAM,cAAc,gBAAsB,mBAAmB,4CAwCnE,CAAA"}
@@ -1,13 +1,11 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Box, Button, Flex, IconBox, Image, Text } from '@citric/core';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Flex, IconBox } from '@citric/core';
3
3
  import { ArrowRight, CheckCircleFill, Select } from '@citric/icons';
4
4
  import { SelectionList } from '@stack-spot/portal-components/SelectionList';
5
5
  import { AI, CS, EDP, HUB, Logo } from '@stack-spot/portal-components/svg';
6
6
  import { theme } from '@stack-spot/portal-theme';
7
- import { useTranslate } from '@stack-spot/portal-translate';
8
7
  import { useState } from 'react';
9
8
  import styled from 'styled-components';
10
- import { useTour } from './tour/index.js';
11
9
  const Logos = {
12
10
  'AI': _jsx(AI, {}),
13
11
  'EDP': _jsx(EDP, {}),
@@ -77,7 +75,6 @@ const PORTAL_SWITCHER_ID = 'PortalSwitcher';
77
75
  export const PortalSwitcher = ({ portals = [] }) => {
78
76
  const [visible, setVisible] = useState(false);
79
77
  const currentPortal = portals?.find(portal => location.href.startsWith(portal.url));
80
- usePortalSwitcherTourStep();
81
78
  return _jsxs(PortalSwitcherBox, { children: [currentPortal ?
82
79
  _jsx(Button, { className: "current-portal", appearance: "text", colorScheme: "light", "aria-controls": PORTAL_SWITCHER_ID, "aria-expanded": visible, onClick: () => {
83
80
  setVisible(!visible);
@@ -94,34 +91,4 @@ export const PortalSwitcher = ({ portals = [] }) => {
94
91
  iconRight: portal.acronym !== currentPortal?.acronym ? _jsx(ArrowRight, {}) : undefined,
95
92
  })), visible: visible, maxHeight: "21rem", onHide: () => setVisible(false) })] });
96
93
  };
97
- /**
98
- * Tutorial: a React hook for retrieving the React Tour step that explains how the portal switcher works. The portal switcher is a component
99
- * at the top left corner of the layout (header) that allows the user to switch between the different Stackspot portals.
100
- * @returns the React Tour step for the PortalSwitcher.
101
- */
102
- export const usePortalSwitcherTourStep = () => {
103
- const t = useTranslate(tourTranslations);
104
- const { addStep } = useTour();
105
- addStep({
106
- selector: '.portal-switcher',
107
- title: t.title,
108
- content: _jsxs(_Fragment, { children: [_jsx(Image, { src: "https://marketing.stackspot.com/switch-v2.gif", alt: t.imageAlt }), _jsx(Box, { px: 5, py: 3, children: _jsx(Text, { appearance: "microtext1", colorScheme: "inverse.contrastText", children: t.description }) })] }),
109
- position: 'right',
110
- style: {
111
- width: '300px',
112
- },
113
- });
114
- };
115
- const tourTranslations = {
116
- en: {
117
- title: 'Expand Your Horizons with Stackspot',
118
- description: 'Easily switch between EDP and AI to enhance your projects. Access a wide range of resources with just one click and take your projects to a new level of efficiency. Start your journey now!',
119
- imageAlt: 'GIF describing how to use product switcher and navigate between AI and EDP portals',
120
- },
121
- pt: {
122
- title: 'Expanda Seus Horizontes com Stackspot',
123
- description: 'Troque facilmente entre EDP e AI para aprimorar seus projetos. Acesse uma ampla gama de recursos com apenas um clique e leve seus projetos para um novo nível de eficiência. Comece sua jornada agora!',
124
- imageAlt: 'GIF mostrando como usar o alternador de produtos e navegar entre os portais AI e EDP',
125
- },
126
- };
127
94
  //# sourceMappingURL=PortalSwitcher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PortalSwitcher.js","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACtE,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,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAa,QAAQ,EA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OAAO,CAAC,CAAA;oBACtB,CAAC,YACD,MAAC,IAAI,IAAC,UAAU,EAAC,QAAQ,EAAC,SAAS,EAAC,iBAAiB,aAClD,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,EAC7B,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,EAAC,EAAE,EAAE,CAAC,YACtB,KAAC,MAAM,KAAG,GACF,IACL,GACA,CAAC,CAAC;gBACX,KAAC,IAAI,KAAG,EACV,KAAC,aAAa,IACZ,EAAE,EAAE,kBAAkB,EACtB,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;oBAC7B,KAAK,EAAE;wBACL,EAAE,EAAE,MAAM,CAAC,OAAO;wBAClB,OAAO,EAAE,KAAC,IAAI,IAAC,CAAC,EAAC,OAAO,YAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAQ;qBACxD;oBACD,MAAM,EAAE,OAAO;oBACf,IAAI,EAAE,MAAM,CAAC,GAAG;oBAChB,MAAM,EAAE,aAAa,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO;oBAChD,UAAU,EAAE,KAAC,eAAe,KAAG;oBAC/B,SAAS,EAAE,MAAM,CAAC,OAAO,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,KAAC,UAAU,KAAG,CAAC,CAAC,CAAC,SAAS;iBAClF,CAAC,CAAC,EACH,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,OAAO,EACjB,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,IAClB,CAAA;AACvB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-layout",
3
- "version": "2.11.0",
3
+ "version": "2.12.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,6 @@ import { useEffect, useState } from 'react'
8
8
  import { useNotificationsDictionary } from './dictionary'
9
9
  import { NotificationPanel } from './NotificationPanel'
10
10
  import { NotificationBox } from './styled'
11
- import { useNotificationsTourStep } from './tour'
12
11
  import { getFiltersFromName, getNameFromFilters } from './utils'
13
12
 
14
13
  const MAX_ITEMS = 10
@@ -19,7 +18,6 @@ export const NotificationCenter = () => {
19
18
  const { applyFilters, filters, items, status, error } = useNotificationList({ size: MAX_ITEMS })
20
19
  const hasUnreadNotification = useUnreadNotifications()
21
20
  const controller = useNotificationController()
22
- useNotificationsTourStep()
23
21
 
24
22
  useEffectOnce(() => {
25
23
  controller.checkUnread()
@@ -1,13 +1,11 @@
1
- import { Box, Button, Flex, IconBox, Image, Text } from '@citric/core'
1
+ import { Button, Flex, IconBox } from '@citric/core'
2
2
  import { ArrowRight, CheckCircleFill, Select } from '@citric/icons'
3
3
  import { SelectionList } from '@stack-spot/portal-components/SelectionList'
4
4
  import { AI, CS, EDP, HUB, Logo } from '@stack-spot/portal-components/svg'
5
5
  import { theme } from '@stack-spot/portal-theme'
6
- import { useTranslate } from '@stack-spot/portal-translate'
7
6
  import { ReactNode, useState } from 'react'
8
7
  import styled from 'styled-components'
9
8
  import { PortalAcronym } from '../types'
10
- import { useTour } from './tour'
11
9
 
12
10
  const Logos: Record<PortalAcronym, ReactNode> = {
13
11
  'AI': <AI />,
@@ -98,7 +96,6 @@ const PORTAL_SWITCHER_ID = 'PortalSwitcher'
98
96
  export const PortalSwitcher = ({ portals = [] }: PortalSwitcherProps) => {
99
97
  const [visible, setVisible] = useState<boolean>(false)
100
98
  const currentPortal = portals?.find(portal => location.href.startsWith(portal.url))
101
- usePortalSwitcherTourStep()
102
99
 
103
100
  return <PortalSwitcherBox>
104
101
  {currentPortal ?
@@ -137,41 +134,3 @@ export const PortalSwitcher = ({ portals = [] }: PortalSwitcherProps) => {
137
134
  onHide={() => setVisible(false)} />
138
135
  </PortalSwitcherBox >
139
136
  }
140
-
141
- /**
142
- * Tutorial: a React hook for retrieving the React Tour step that explains how the portal switcher works. The portal switcher is a component
143
- * at the top left corner of the layout (header) that allows the user to switch between the different Stackspot portals.
144
- * @returns the React Tour step for the PortalSwitcher.
145
- */
146
- export const usePortalSwitcherTourStep = () => {
147
- const t = useTranslate(tourTranslations)
148
- const { addStep } = useTour()
149
-
150
- addStep({
151
- selector: '.portal-switcher',
152
- title: t.title,
153
- content: <>
154
- <Image src="https://marketing.stackspot.com/switch-v2.gif" alt={t.imageAlt} />
155
- <Box px={5} py={3}>
156
- <Text appearance="microtext1" colorScheme="inverse.contrastText">{t.description}</Text>
157
- </Box>
158
- </>,
159
- position: 'right',
160
- style: {
161
- width: '300px',
162
- },
163
- })
164
- }
165
-
166
- const tourTranslations = {
167
- en: {
168
- title: 'Expand Your Horizons with Stackspot',
169
- description: 'Easily switch between EDP and AI to enhance your projects. Access a wide range of resources with just one click and take your projects to a new level of efficiency. Start your journey now!',
170
- imageAlt: 'GIF describing how to use product switcher and navigate between AI and EDP portals',
171
- },
172
- pt: {
173
- title: 'Expanda Seus Horizontes com Stackspot',
174
- description: 'Troque facilmente entre EDP e AI para aprimorar seus projetos. Acesse uma ampla gama de recursos com apenas um clique e leve seus projetos para um novo nível de eficiência. Comece sua jornada agora!',
175
- imageAlt: 'GIF mostrando como usar o alternador de produtos e navegar entre os portais AI e EDP',
176
- },
177
- }
@@ -1,2 +0,0 @@
1
- export declare const useNotificationsTourStep: () => void;
2
- //# sourceMappingURL=tour.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tour.d.ts","sourceRoot":"","sources":["../../../src/components/NotificationCenter/tour.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,wBAAwB,YAcpC,CAAA"}
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Box, Text } from '@citric/core';
3
- import { useTour } from '../tour/index.js';
4
- import { useNotificationsDictionary } from './dictionary.js';
5
- export const useNotificationsTourStep = () => {
6
- const t = useNotificationsDictionary();
7
- const { addStep } = useTour();
8
- addStep({
9
- content: _jsx(Box, { px: 5, py: 3, children: _jsx(Text, { appearance: "microtext1", colorScheme: "inverse.contrastText", children: t.tour }) }),
10
- selector: '.notificationsTour',
11
- title: t.notifications,
12
- position: 'bottom',
13
- });
14
- };
15
- //# sourceMappingURL=tour.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tour.js","sourceRoot":"","sources":["../../../src/components/NotificationCenter/tour.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AAEzD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC3C,MAAM,CAAC,GAAG,0BAA0B,EAAE,CAAA;IACtC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAA;IAE7B,OAAO,CAAC;QACN,OAAO,EAAE,KAAC,GAAG,IAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YACxB,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,EAAC,WAAW,EAAC,sBAAsB,YAC7D,CAAC,CAAC,IAAI,GACF,GACH;QACN,QAAQ,EAAE,oBAAoB;QAC9B,KAAK,EAAE,CAAC,CAAC,aAAa;QACtB,QAAQ,EAAE,QAAQ;KACZ,CAAC,CAAA;AACX,CAAC,CAAA"}
@@ -1,19 +0,0 @@
1
- import { Box, Text } from '@citric/core'
2
- import { useTour } from '../tour'
3
- import { useNotificationsDictionary } from './dictionary'
4
-
5
- export const useNotificationsTourStep = () => {
6
- const t = useNotificationsDictionary()
7
- const { addStep } = useTour()
8
-
9
- addStep({
10
- content: <Box px={5} py={3}>
11
- <Text appearance="microtext1" colorScheme="inverse.contrastText">
12
- {t.tour}
13
- </Text>
14
- </Box>,
15
- selector: '.notificationsTour',
16
- title: t.notifications,
17
- position: 'bottom',
18
- } as any)
19
- }