Skip to content

Commit 33393f5

Browse files
chore: updated to the latest version
1 parent ed687ab commit 33393f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1628
-27
lines changed

.storybook/data.ts

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
import { GlobalProviderProps } from '@o2s/ui/providers/GlobalProvider';
2+
3+
export const globalProviderConfig: GlobalProviderProps['config'] = {
4+
locales: [
5+
{
6+
value: 'en',
7+
label: 'EN',
8+
},
9+
{
10+
value: 'de',
11+
label: 'DE',
12+
},
13+
{
14+
value: 'pl',
15+
label: 'PL',
16+
},
17+
],
18+
common: {
19+
header: {
20+
id: 'fqj6nnyk4irqq5b7rnc4ogsj',
21+
title: 'MOCK_HEADER_LOGON_EN',
22+
logo: {
23+
url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg',
24+
alt: 'Logo',
25+
width: 92,
26+
height: 24,
27+
},
28+
languageSwitcherLabel: 'Language',
29+
mobileMenuLabel: {
30+
open: 'Open menu',
31+
close: 'Close Menu',
32+
},
33+
userInfo: {
34+
url: '/user-account',
35+
label: 'User Profile',
36+
},
37+
items: [
38+
{
39+
__typename: 'NavigationGroup',
40+
title: 'Customer Portal',
41+
items: [
42+
{
43+
__typename: 'NavigationItem',
44+
label: 'Dashboard',
45+
url: '/',
46+
},
47+
{
48+
__typename: 'NavigationItem',
49+
label: 'Cases',
50+
url: '/cases',
51+
},
52+
{
53+
__typename: 'NavigationItem',
54+
label: 'Invoices',
55+
url: '/invoices',
56+
},
57+
{
58+
__typename: 'NavigationItem',
59+
label: 'Notifications',
60+
url: '/notifications',
61+
},
62+
{
63+
__typename: 'NavigationItem',
64+
label: 'Services',
65+
url: '/services',
66+
},
67+
{
68+
__typename: 'NavigationItem',
69+
label: 'Orders',
70+
url: '/orders',
71+
},
72+
],
73+
},
74+
{
75+
__typename: 'NavigationGroup',
76+
title: 'Help & Support',
77+
items: [
78+
{
79+
__typename: 'NavigationItem',
80+
label: 'Welcome Hub',
81+
url: '/help-and-support',
82+
},
83+
],
84+
},
85+
],
86+
notification: {
87+
url: '/notifications',
88+
label: 'Notifications',
89+
},
90+
contextSwitcher: {
91+
closeLabel: 'Close',
92+
showContextSwitcher: true,
93+
},
94+
},
95+
footer: {
96+
id: 'laee0xa1zmm9uraev3hpruho',
97+
title: 'Legal and privacy',
98+
logo: {
99+
url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg',
100+
alt: 'Logo',
101+
width: 92,
102+
height: 24,
103+
},
104+
items: [
105+
{
106+
__typename: 'NavigationGroup',
107+
title: 'Privacy Policy',
108+
items: [
109+
{
110+
label: 'Privacy Policy 1',
111+
url: 'https://hycom.digital/privacy-policy',
112+
__typename: 'NavigationItem',
113+
},
114+
{
115+
label: 'Privacy Policy 2',
116+
url: 'https://hycom.digital/privacy-policy',
117+
__typename: 'NavigationItem',
118+
},
119+
],
120+
},
121+
{
122+
__typename: 'NavigationGroup',
123+
title: 'Terms of Service',
124+
items: [
125+
{
126+
label: 'Terms of Service 1',
127+
url: 'https://hycom.digital/terms-and-conditions',
128+
__typename: 'NavigationItem',
129+
},
130+
{
131+
label: 'Terms of Service 2',
132+
url: 'https://hycom.digital/terms-and-conditions',
133+
__typename: 'NavigationItem',
134+
},
135+
],
136+
},
137+
{
138+
__typename: 'NavigationGroup',
139+
title: 'Cookies Settings',
140+
items: [
141+
{
142+
label: 'Cookies Settings 1',
143+
url: '/',
144+
__typename: 'NavigationItem',
145+
},
146+
{
147+
label: 'Cookies Settings 2',
148+
url: '/',
149+
__typename: 'NavigationItem',
150+
},
151+
],
152+
},
153+
],
154+
copyright: '© Open Self Service 2025',
155+
},
156+
},
157+
labels: {
158+
errors: {
159+
requestError: {
160+
title: 'Uh oh! Something went wrong.',
161+
content: 'There was a problem with your request.',
162+
},
163+
},
164+
dates: {
165+
today: 'Today',
166+
yesterday: 'Yesterday',
167+
},
168+
actions: {
169+
showMore: 'Show more',
170+
showLess: 'Show less',
171+
show: 'Show',
172+
hide: 'Hide',
173+
edit: 'Edit',
174+
save: 'Save',
175+
cancel: 'Cancel',
176+
delete: 'Delete',
177+
logOut: 'Log out',
178+
settings: 'Settings',
179+
renew: 'Renew',
180+
details: 'Details',
181+
},
182+
},
183+
};
184+
185+
export const globalProviderLabels: GlobalProviderProps['labels'] = {
186+
errors: {
187+
requestError: {
188+
title: 'Uh oh! Something went wrong.',
189+
content: 'There was a problem with your request.',
190+
},
191+
},
192+
dates: {
193+
today: 'Today',
194+
yesterday: 'Yesterday',
195+
},
196+
actions: {
197+
showMore: 'Show more',
198+
showLess: 'Show less',
199+
show: 'Show',
200+
hide: 'Hide',
201+
edit: 'Edit',
202+
save: 'Save',
203+
cancel: 'Cancel',
204+
delete: 'Delete',
205+
logOut: 'Log out',
206+
settings: 'Settings',
207+
renew: 'Renew',
208+
details: 'Details',
209+
},
210+
};
211+
212+
export const globalProviderThemes: GlobalProviderProps['themes'] = {
213+
default: {
214+
name: 'default',
215+
logo: {
216+
url: 'https://raw.githubusercontent.com/o2sdev/openselfservice/refs/heads/main/packages/integrations/mocked/public/images/logo.svg',
217+
alt: 'Logo',
218+
width: 92,
219+
height: 24,
220+
},
221+
},
222+
};
223+
224+
export const globalProviderCurrentTheme: GlobalProviderProps['currentTheme'] = 'default';

.storybook/main.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import type { StorybookConfig } from '@storybook/nextjs';
2+
import * as dotenv from 'dotenv';
3+
4+
const env: {
5+
NEXT_PUBLIC_API_URL?: string;
6+
} = {};
7+
8+
dotenv.config({
9+
path: 'apps/frontend/.env.development',
10+
processEnv: env,
11+
quiet: true,
12+
});
13+
14+
const config: StorybookConfig = {
15+
stories: [
16+
'../apps/frontend/src/**/*.stories.@(js|jsx|mjs|ts|tsx)',
17+
'../packages/blocks/**/src/frontend/**/*.stories.@(js|jsx|mjs|ts|tsx)',
18+
'../packages/ui/**/*.stories.@(js|jsx|mjs|ts|tsx)',
19+
],
20+
addons: ['@storybook/addon-docs', '@storybook/addon-a11y', '@storybook/addon-themes'],
21+
framework: {
22+
name: '@storybook/nextjs',
23+
options: {},
24+
},
25+
typescript: {
26+
reactDocgen: 'react-docgen-typescript',
27+
},
28+
env: (config) => ({
29+
...config,
30+
...env,
31+
}),
32+
};
33+
export default config;

.storybook/preview-head.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<link rel="preconnect" href="https://fonts.googleapis.com">
2+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
3+
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" rel="stylesheet">

.storybook/preview.tsx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import React from 'react';
2+
import { NextIntlClientProvider } from 'next-intl';
3+
import type { Preview } from '@storybook/nextjs';
4+
import { createRouter } from '@storybook/nextjs/router.mock';
5+
import { createNavigation } from '@storybook/nextjs/navigation.mock';
6+
import { withThemeByClassName } from '@storybook/addon-themes';
7+
8+
import { GlobalProvider } from '@o2s/ui/providers/GlobalProvider';
9+
import { AppSpinner } from '@o2s/ui/components/AppSpinner';
10+
import { Toaster } from '@o2s/ui/elements/toaster';
11+
import { TooltipProvider } from '@o2s/ui/elements/tooltip';
12+
13+
import { globalProviderConfig, globalProviderCurrentTheme, globalProviderLabels, globalProviderThemes } from './data';
14+
15+
import '../apps/frontend/src/styles/global.css';
16+
import messages from '../apps/frontend/src/i18n/messages/en.json'
17+
18+
createRouter({});
19+
createNavigation({});
20+
21+
const preview: Preview = {
22+
parameters: {
23+
controls: {
24+
matchers: {
25+
color: /(background|color)$/i,
26+
date: /Date$/i,
27+
},
28+
},
29+
},
30+
decorators: [
31+
withThemeByClassName({
32+
themes: {
33+
default: 'theme-default',
34+
dark: 'theme-dark',
35+
},
36+
defaultTheme: 'default',
37+
}),
38+
(Story) => {
39+
return(
40+
<NextIntlClientProvider locale="en" messages={messages}>
41+
<GlobalProvider config={globalProviderConfig} labels={globalProviderLabels} themes={globalProviderThemes} currentTheme={globalProviderCurrentTheme} locale="en">
42+
<TooltipProvider>
43+
<Story />
44+
45+
<Toaster />
46+
<AppSpinner />
47+
</TooltipProvider>
48+
</GlobalProvider>
49+
</NextIntlClientProvider>
50+
)
51+
}
52+
]
53+
};
54+
55+
export default preview;

apps/api-harmonization/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
"@o2s/blocks.notification-list": "^1.3.0",
3939
"@o2s/blocks.notification-summary": "^1.0.1",
4040
"@o2s/blocks.order-details": "^1.2.0",
41-
"@o2s/blocks.order-list": "^1.3.0",
42-
"@o2s/blocks.orders-summary": "^1.2.0",
41+
"@o2s/blocks.order-list": "^1.3.1",
42+
"@o2s/blocks.orders-summary": "^1.2.1",
4343
"@o2s/blocks.payments-history": "^1.1.2",
44-
"@o2s/blocks.payments-summary": "^1.1.2",
44+
"@o2s/blocks.payments-summary": "^1.1.3",
4545
"@o2s/blocks.product-list": "^0.1.1",
4646
"@o2s/blocks.quick-links": "^1.2.2",
4747
"@o2s/blocks.service-details": "^1.1.2",

apps/frontend/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"@o2s/blocks.notification-list": "^1.3.0",
2828
"@o2s/blocks.notification-summary": "^1.0.1",
2929
"@o2s/blocks.order-details": "^1.2.0",
30-
"@o2s/blocks.order-list": "^1.3.0",
31-
"@o2s/blocks.orders-summary": "^1.2.0",
30+
"@o2s/blocks.order-list": "^1.3.1",
31+
"@o2s/blocks.orders-summary": "^1.2.1",
3232
"@o2s/blocks.payments-history": "^1.1.2",
33-
"@o2s/blocks.payments-summary": "^1.1.2",
33+
"@o2s/blocks.payments-summary": "^1.1.3",
3434
"@o2s/blocks.product-list": "^0.1.1",
3535
"@o2s/blocks.quick-links": "^1.2.2",
3636
"@o2s/blocks.service-details": "^1.1.2",

0 commit comments

Comments
 (0)