@sonic-equipment/ui 181.0.0 → 182.0.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/dist/cards/data-card/data-card.d.ts +30 -18
- package/dist/cards/data-card/data-card.js +38 -6
- package/dist/cards/data-card/data-card.module.css.js +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.js +7 -0
- package/dist/exports.d.ts +18 -0
- package/dist/header/connected-header.js +1 -1
- package/dist/header/header.d.ts +3 -1
- package/dist/header/header.js +3 -2
- package/dist/icons/glyph/glyphs-chevrons-bold-up-icon.js +7 -0
- package/dist/index.js +17 -0
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/pages/my-sonic/widgets/components/address-data-card.d.ts +4 -4
- package/dist/styles.css +416 -41
- package/dist/table/data-table.d.ts +19 -0
- package/dist/table/data-table.js +47 -0
- package/dist/table/data-table.module.css.js +3 -0
- package/dist/table/elements/col.d.ts +7 -0
- package/dist/table/elements/col.js +9 -0
- package/dist/table/elements/table-column-properties.d.ts +10 -0
- package/dist/table/elements/table-context.d.ts +18 -0
- package/dist/table/elements/table-context.js +20 -0
- package/dist/table/elements/table-provider.d.ts +22 -0
- package/dist/table/elements/table-provider.js +59 -0
- package/dist/table/elements/table-row-context.d.ts +14 -0
- package/dist/table/elements/table-row-context.js +16 -0
- package/dist/table/elements/table-row-provider.d.ts +4 -0
- package/dist/table/elements/table-row-provider.js +25 -0
- package/dist/table/elements/table-sort-button.d.ts +11 -0
- package/dist/table/elements/table-sort-button.js +17 -0
- package/dist/table/elements/table.d.ts +14 -0
- package/dist/table/elements/table.js +23 -0
- package/dist/table/elements/table.module.css.js +3 -0
- package/dist/table/elements/td.d.ts +6 -0
- package/dist/table/elements/td.js +12 -0
- package/dist/table/elements/th.d.ts +8 -0
- package/dist/table/elements/th.js +12 -0
- package/dist/table/elements/tr.d.ts +8 -0
- package/dist/table/elements/tr.js +12 -0
- package/dist/table/elements/use-table-row.d.ts +1 -0
- package/dist/table/elements/use-table-row.js +8 -0
- package/dist/table/elements/use-table.d.ts +2 -0
- package/dist/table/elements/use-table.js +13 -0
- package/dist/table/elements/use-td.d.ts +2 -0
- package/dist/table/elements/use-td.js +26 -0
- package/dist/table/elements/use-th.d.ts +2 -0
- package/dist/table/elements/use-th.js +22 -0
- package/dist/table/elements/use-tr.d.ts +2 -0
- package/dist/table/elements/use-tr.js +16 -0
- package/dist/text/truncated/truncated.d.ts +6 -0
- package/dist/text/truncated/truncated.js +9 -0
- package/dist/text/truncated/truncated.module.css.js +3 -0
- package/package.json +1 -1
|
@@ -1,27 +1,39 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { TranslationId } from '../../intl/translation-id';
|
|
2
|
-
export interface
|
|
3
|
+
export interface DataItemBase {
|
|
3
4
|
key: string;
|
|
4
|
-
|
|
5
|
-
value: string | undefined | null;
|
|
5
|
+
type?: 'section' | 'field';
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
export interface DataField extends DataItemBase {
|
|
8
|
+
key: string;
|
|
9
|
+
label: TranslationId;
|
|
10
|
+
type?: 'field';
|
|
11
|
+
value: unknown;
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
14
|
-
data:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
export interface DataSection extends DataItemBase {
|
|
14
|
+
data: DataField[];
|
|
15
|
+
heading?: TranslationId;
|
|
16
|
+
key: string;
|
|
17
|
+
type: 'section';
|
|
18
|
+
}
|
|
19
|
+
export type DataItem = DataField | DataSection;
|
|
20
|
+
export interface Rendering {
|
|
21
|
+
label?(args: {
|
|
22
|
+
key: string;
|
|
23
|
+
label: string;
|
|
24
|
+
}): ReactNode;
|
|
25
|
+
value?(args: {
|
|
26
|
+
key: string;
|
|
27
|
+
value: unknown;
|
|
28
|
+
}): ReactNode;
|
|
18
29
|
}
|
|
19
|
-
export interface
|
|
30
|
+
export interface DataCardProps {
|
|
20
31
|
actions?: React.ReactNode[];
|
|
21
|
-
data: DataItem
|
|
22
|
-
|
|
32
|
+
data: DataItem[];
|
|
33
|
+
'data-test-selector'?: string;
|
|
34
|
+
isLoading?: boolean;
|
|
35
|
+
rendering?: Rendering;
|
|
23
36
|
showError?: Error | TranslationId | boolean | null;
|
|
24
37
|
title?: TranslationId;
|
|
25
38
|
}
|
|
26
|
-
export
|
|
27
|
-
export declare function DataCard({ actions, data, 'data-test-selector': dataTestSelector, isLoading, noTranslations, showError, title, }: DataCardProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function DataCard({ actions, data, 'data-test-selector': dataTestSelector, isLoading, rendering, showError, title, }: DataCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,13 +6,45 @@ import { UnauthorizedRequestError } from '../../shared/fetch/request.js';
|
|
|
6
6
|
import { Heading } from '../../typography/heading/heading.js';
|
|
7
7
|
import styles from './data-card.module.css.js';
|
|
8
8
|
|
|
9
|
-
function DataCard({ actions, data, 'data-test-selector': dataTestSelector, isLoading = false,
|
|
10
|
-
const
|
|
9
|
+
function DataCard({ actions, data, 'data-test-selector': dataTestSelector, isLoading = false, rendering, showError = false, title, }) {
|
|
10
|
+
const dataFields = data.flatMap((entry) => entry.type === 'section' ? entry.data : [entry]);
|
|
11
|
+
const visibleData = dataFields.filter(({ value }) => Boolean(value));
|
|
11
12
|
const hasItems = visibleData.length > 0;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const sections = sectionizeItems(data);
|
|
14
|
+
return (jsxs("section", { className: styles['data-card-container'], "data-test-selector": dataTestSelector, children: [title && (jsx(Heading, { className: styles.title, size: "xxs", tag: "h3", children: jsx(FormattedMessage, { id: title }) })), jsx("div", { className: styles['data-card'], children: showError ? (jsx("div", { className: styles['error-container'], children: showError instanceof UnauthorizedRequestError ? (jsx(FormattedMessage, { id: "You are not authorized to access this information." })) : typeof showError === 'string' ? (jsx(FormattedMessage, { id: showError })) : (jsx(FormattedMessage, { id: "An unexpected error occured" })) })) : isLoading ? (jsx("div", { className: styles['loading-container'], children: jsx(ProgressCircle, { variant: "gray" }) })) : hasItems ? (jsxs("div", { className: clsx(styles['container']), children: [jsx("dl", { className: styles['data-table'], children: sections.map(section => (jsx(DataTableSection, { dataSection: section, rendering: rendering }, section.key))) }), actions?.length && (jsx("div", { className: styles['data-card-actions'], children: actions }))] })) : (jsx("div", { className: clsx(styles['no-data-container']), children: jsx(FormattedMessage, { id: "There is no information to display" }) })) })] }));
|
|
15
|
+
}
|
|
16
|
+
function DataTable({ data, rendering, }) {
|
|
17
|
+
return data.map(({ key, label, value }, index) => (jsxs(Fragment, { children: [jsx("dt", { className: clsx(styles['data-table-key'], {
|
|
18
|
+
[styles['data-table-section-end']]: index === data.length - 1,
|
|
19
|
+
}), children: rendering?.label ? (rendering.label({ key, label })) : (jsx(FormattedMessage, { id: label })) }), jsx("dd", { className: styles['data-table-value'], "data-key": key, children: rendering?.value
|
|
20
|
+
? rendering.value({ key, value })
|
|
21
|
+
: value !== undefined && value !== null
|
|
22
|
+
? String(value)
|
|
23
|
+
: null })] }, key)));
|
|
24
|
+
}
|
|
25
|
+
function DataTableSection({ dataSection, rendering, }) {
|
|
26
|
+
return (jsxs(Fragment, { children: [dataSection.heading && (jsx(Heading, { className: styles['data-table-section-heading'], size: "xxxs", tag: "h3", children: dataSection.heading })), jsx(DataTable, { data: dataSection.data, rendering: rendering })] }));
|
|
27
|
+
}
|
|
28
|
+
function sectionizeItems(data) {
|
|
29
|
+
const result = [];
|
|
30
|
+
let currentSection = null;
|
|
31
|
+
data.forEach((item, index) => {
|
|
32
|
+
if (item.type === 'section') {
|
|
33
|
+
currentSection = null;
|
|
34
|
+
result.push(item);
|
|
35
|
+
}
|
|
36
|
+
else if (currentSection) {
|
|
37
|
+
currentSection.data.push(item);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
result.push((currentSection = {
|
|
41
|
+
data: [item],
|
|
42
|
+
key: `section-${index}`,
|
|
43
|
+
type: 'section',
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return result;
|
|
16
48
|
}
|
|
17
49
|
|
|
18
50
|
export { DataCard };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"title":"data-card-module-DMbBO","data-card":"data-card-module-24uin","error-container":"data-card-module-j-RFT","loading-container":"data-card-module-d9zvu","no-data-container":"data-card-module-FVD44","container":"data-card-module-ZefqY","
|
|
1
|
+
var styles = {"data-card-container":"data-card-module-OMXIh","title":"data-card-module-DMbBO","data-card":"data-card-module-24uin","error-container":"data-card-module-j-RFT","loading-container":"data-card-module-d9zvu","no-data-container":"data-card-module-FVD44","container":"data-card-module-ZefqY","data-table":"data-card-module-EDbE-","data-table-section-heading":"data-card-module-CjTal","data-table-section-end":"data-card-module-QixKJ","data-table-key":"data-card-module-FAgmN","data-table-value":"data-card-module-fcSbu","data-card-actions":"data-card-module-Qv5iI"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
|
@@ -11,6 +11,7 @@ const configPerEnvironment = {
|
|
|
11
11
|
ALGOLIA_HOST: 'sonic.local.com:4443',
|
|
12
12
|
BFF_API_URL: '/api/v1/bff',
|
|
13
13
|
COOKIE_DOMAIN: undefined,
|
|
14
|
+
HOME_PAGE_URL: 'https://sonic.local.com:4443/',
|
|
14
15
|
SHOP_API_URL:
|
|
15
16
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
16
17
|
env?.VITE_SHOP_API_URL || '',
|
|
@@ -21,6 +22,7 @@ const configPerEnvironment = {
|
|
|
21
22
|
ALGOLIA_HOST: 'sonicequipment.commerce.insitesandbox.com',
|
|
22
23
|
BFF_API_URL: 'https://localhost:8000/api/v1/bff',
|
|
23
24
|
COOKIE_DOMAIN: '.insitesandbox.com',
|
|
25
|
+
HOME_PAGE_URL: 'https://localhost:8000/',
|
|
24
26
|
SHOP_API_URL:
|
|
25
27
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
26
28
|
env?.VITE_SHOP_API_URL || 'https://localhost:8000',
|
|
@@ -36,6 +38,7 @@ const configPerEnvironment = {
|
|
|
36
38
|
BFF_API_URL: process.env.BFF_API_URL || '',
|
|
37
39
|
// @ts-expect-error: process is not defined in the browser
|
|
38
40
|
COOKIE_DOMAIN: process.env.COOKIE_DOMAIN || '',
|
|
41
|
+
HOME_PAGE_URL: '/',
|
|
39
42
|
// @ts-expect-error: process is not defined in the browser
|
|
40
43
|
SHOP_API_URL: process.env.SHOP_API_URL || '',
|
|
41
44
|
}),
|
|
@@ -45,6 +48,7 @@ const configPerEnvironment = {
|
|
|
45
48
|
ALGOLIA_HOST: 'shop.sonic-equipment.com',
|
|
46
49
|
BFF_API_URL: 'https://shop.sonic-equipment.com/api/v1/bff',
|
|
47
50
|
COOKIE_DOMAIN: '.sonic-equipment.com',
|
|
51
|
+
HOME_PAGE_URL: 'https://sonic-equipment.com/',
|
|
48
52
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
49
53
|
SHOP_API_URL: env?.VITE_SHOP_API_URL || 'https://shop.sonic-equipment.com',
|
|
50
54
|
}),
|
|
@@ -54,6 +58,7 @@ const configPerEnvironment = {
|
|
|
54
58
|
ALGOLIA_HOST: 'shop.accept-sonic-equipment.com',
|
|
55
59
|
BFF_API_URL: 'https://shop.accept-sonic-equipment.com/api/v1/bff',
|
|
56
60
|
COOKIE_DOMAIN: '.accept-sonic-equipment.com',
|
|
61
|
+
HOME_PAGE_URL: 'https://accept.sonic-equipment.com/',
|
|
57
62
|
SHOP_API_URL: 'https://shop.accept-sonic-equipment.com',
|
|
58
63
|
}),
|
|
59
64
|
'sandbox-reverse-proxy': () => ({
|
|
@@ -62,6 +67,7 @@ const configPerEnvironment = {
|
|
|
62
67
|
ALGOLIA_HOST: 'shop-accept.sonic-equipment.workers.dev',
|
|
63
68
|
BFF_API_URL: 'https://shop-accept.sonic-equipment.workers.dev/api/v1/bff',
|
|
64
69
|
COOKIE_DOMAIN: '.workers.dev',
|
|
70
|
+
HOME_PAGE_URL: 'https://shop-accept.sonic-equipment.workers.dev/',
|
|
65
71
|
SHOP_API_URL: 'https://shop-accept.sonic-equipment.workers.dev',
|
|
66
72
|
}),
|
|
67
73
|
storybook: () => ({
|
|
@@ -70,6 +76,7 @@ const configPerEnvironment = {
|
|
|
70
76
|
ALGOLIA_HOST: 'localhost:8000',
|
|
71
77
|
BFF_API_URL: 'https://localhost:8000/api/v1/bff',
|
|
72
78
|
COOKIE_DOMAIN: 'localhost',
|
|
79
|
+
HOME_PAGE_URL: '/shop',
|
|
73
80
|
SHOP_API_URL:
|
|
74
81
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
75
82
|
env?.VITE_SHOP_API_URL || 'https://localhost:8000',
|
package/dist/exports.d.ts
CHANGED
|
@@ -400,7 +400,25 @@ export * from './sidebar/sidebar-provider';
|
|
|
400
400
|
export * from './sidebar/toggle-sidebar-button';
|
|
401
401
|
export * from './sidebar/types';
|
|
402
402
|
export * from './sidebar/use-sidebar';
|
|
403
|
+
export * from './table/data-table';
|
|
404
|
+
export * from './table/elements/col';
|
|
405
|
+
export * from './table/elements/table';
|
|
406
|
+
export * from './table/elements/table-column-properties';
|
|
407
|
+
export * from './table/elements/table-context';
|
|
408
|
+
export * from './table/elements/table-provider';
|
|
409
|
+
export * from './table/elements/table-row-context';
|
|
410
|
+
export * from './table/elements/table-row-provider';
|
|
411
|
+
export * from './table/elements/table-sort-button';
|
|
412
|
+
export * from './table/elements/td';
|
|
413
|
+
export * from './table/elements/th';
|
|
414
|
+
export * from './table/elements/tr';
|
|
415
|
+
export * from './table/elements/use-table';
|
|
416
|
+
export * from './table/elements/use-table-row';
|
|
417
|
+
export * from './table/elements/use-td';
|
|
418
|
+
export * from './table/elements/use-th';
|
|
419
|
+
export * from './table/elements/use-tr';
|
|
403
420
|
export * from './text/highlight-text/highlight-text';
|
|
421
|
+
export * from './text/truncated/truncated';
|
|
404
422
|
export * from './toast/toast';
|
|
405
423
|
export * from './toast/toast-provider';
|
|
406
424
|
export * from './toast/types';
|
|
@@ -7,7 +7,7 @@ import { Header } from './header.js';
|
|
|
7
7
|
function ConnectedHeader({ className, source, }) {
|
|
8
8
|
const cultureCode = useCultureCode();
|
|
9
9
|
const { data } = useFetchNavigationLinks({ cultureCode, source });
|
|
10
|
-
return (jsx(Header, { className: className, links: data?.header ?? [], sticky: true }));
|
|
10
|
+
return (jsx(Header, { className: className, links: data?.header ?? [], source: source, sticky: true }));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export { ConnectedHeader };
|
package/dist/header/header.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { NavigationLink } from '../shared/api/bff/model/bff.model';
|
|
2
|
+
import { NavigationLinkSource } from '../shared/api/bff/services/bff-service';
|
|
2
3
|
export interface HeaderProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
links: NavigationLink[];
|
|
6
|
+
source: NavigationLinkSource;
|
|
5
7
|
sticky?: boolean;
|
|
6
8
|
}
|
|
7
|
-
export declare function Header({ className, links, sticky }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function Header({ className, links, source, sticky }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/header/header.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
+
import { config } from '../config.js';
|
|
5
6
|
import { useDrawer } from '../drawer/use-drawer.js';
|
|
6
7
|
import { useGlobalSearchDisclosure } from '../global-search/global-search-provider/use-search-disclosure.js';
|
|
7
8
|
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
@@ -22,7 +23,7 @@ import { NavigationLinkList } from './link-list/navigation-link-list.js';
|
|
|
22
23
|
import { SonicLogo } from './sonic-logo/sonic-logo.js';
|
|
23
24
|
import styles from './header.module.css.js';
|
|
24
25
|
|
|
25
|
-
function Header({ className, links, sticky }) {
|
|
26
|
+
function Header({ className, links, source, sticky }) {
|
|
26
27
|
const [activeSubmenu, setActiveSubmenu] = useState();
|
|
27
28
|
const t = useFormattedMessage();
|
|
28
29
|
const isXl = useIsBreakpoint('xl');
|
|
@@ -65,7 +66,7 @@ function Header({ className, links, sticky }) {
|
|
|
65
66
|
if (activeSubmenu)
|
|
66
67
|
setDesktopNavigationOpen(true);
|
|
67
68
|
}, [activeSubmenu, setDesktopNavigationOpen]);
|
|
68
|
-
return (jsxs(Fragment, { children: [jsx("header", { ref: headerRef, className: clsx(styles['header'], sticky && styles['sticky'], className), "data-test-selector": "pageHeader", children: jsx(HeaderLayout, { hamburgerButton: jsx(HamburgerButton, { "aria-controls": "mobile-navigation", "data-test-selector": "pageHeaderHamburgerButton", isActive: mobileNavigationOpen, onActiveChange: toggleMobileNavigation }), hasDrawersOpen: hasDrawersOpen, logo: jsx(SonicLogo, { "data-test-selector": "pageHeaderLogo", href:
|
|
69
|
+
return (jsxs(Fragment, { children: [jsx("header", { ref: headerRef, className: clsx(styles['header'], sticky && styles['sticky'], className), "data-test-selector": "pageHeader", children: jsx(HeaderLayout, { hamburgerButton: jsx(HamburgerButton, { "aria-controls": "mobile-navigation", "data-test-selector": "pageHeaderHamburgerButton", isActive: mobileNavigationOpen, onActiveChange: toggleMobileNavigation }), hasDrawersOpen: hasDrawersOpen, logo: jsx(SonicLogo, { "data-test-selector": "pageHeaderLogo", href: source === 'shop' ? config.HOME_PAGE_URL : '/', title: t('Home') }), mainNavigation: jsx(NavigationLinkList, { activeLink: activeSubmenu, "data-test-selector": "pageHeaderMainNavigation", links: links, onSubmenuToggle: link => toggleActiveSubmenu(link) }), navigationActions: jsxs(Fragment, { children: [jsx(ConnectedAccountButton, { "data-test-selector": "pageHeaderAccountButton", href: PATHS.ACCOUNT }), jsx(ConnectedFavoritesButton, { "data-test-selector": "pageHeaderFavoritesButton", href: PATHS.FAVORITES }), jsx(ConnectedCartButton, { "data-test-selector": "pageHeaderCartButton", href: PATHS.CART })] }), search: jsx(SearchButton, { "aria-controls": "global-search", "data-test-selector": "pageHeaderSearchButton", isActive: searchOpen, onActiveChange: toggleSearch }) }) }), jsx(SearchDrawer, { groupId: searchGroupId, instanceId: searchInstanceId }), !isXl && (jsx(MobileNavigationDrawer, { groupId: mobileNavigationDrawer.groupId, instanceId: mobileNavigationDrawer.instanceId, links: links })), isXl && (jsx(DesktopNavigationDrawer, { groupId: desktopNavigationDrawer.groupId, instanceId: desktopNavigationDrawer.instanceId, onClosed: () => setActiveSubmenu(undefined), submenu: activeSubmenu }))] }));
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
export { Header };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
function GlyphsChevronsBoldUpIcon(props) {
|
|
4
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "12", viewBox: "0 0 12 12", width: "12", children: jsx("path", { d: "M5.98800959,2 L1,7.02068966 C1.17585931,7.34252874 1.4636291,7.7045977 1.86330935,8.10689655 C2.03916867,8.28390805 2.21502798,8.44482759 2.39088729,8.58965517 L2.58273381,8.74027586 C2.66906475,8.804 2.74100719,8.85034483 2.79856115,8.87931034 L2.94244604,8.97586207 L5.98800959,5.91034483 L9.05755396,9 C9.39328537,8.80689655 9.7529976,8.51724138 10.1366906,8.13103448 C10.31255,7.95402299 10.4724221,7.77701149 10.616307,7.6 L10.8321343,7.32482759 L10.9280576,7.18965517 L11,7.04482759 L5.98800959,2 Z", fillRule: "evenodd" }) }));
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { GlyphsChevronsBoldUpIcon };
|
package/dist/index.js
CHANGED
|
@@ -398,7 +398,24 @@ export { Sidebar } from './sidebar/sidebar.js';
|
|
|
398
398
|
export { SidebarDetectBreakpoint, SidebarProvider } from './sidebar/sidebar-provider.js';
|
|
399
399
|
export { ToggleSidebarButton } from './sidebar/toggle-sidebar-button.js';
|
|
400
400
|
export { useSidebar, useSidebarActions } from './sidebar/use-sidebar.js';
|
|
401
|
+
export { DataTable } from './table/data-table.js';
|
|
402
|
+
export { Col } from './table/elements/col.js';
|
|
403
|
+
export { Table } from './table/elements/table.js';
|
|
404
|
+
export { TableContext } from './table/elements/table-context.js';
|
|
405
|
+
export { TableProvider } from './table/elements/table-provider.js';
|
|
406
|
+
export { TableRowContext } from './table/elements/table-row-context.js';
|
|
407
|
+
export { TableRowProvider } from './table/elements/table-row-provider.js';
|
|
408
|
+
export { TableSortButton } from './table/elements/table-sort-button.js';
|
|
409
|
+
export { TD } from './table/elements/td.js';
|
|
410
|
+
export { TH } from './table/elements/th.js';
|
|
411
|
+
export { TR } from './table/elements/tr.js';
|
|
412
|
+
export { useTable } from './table/elements/use-table.js';
|
|
413
|
+
export { useTableRow } from './table/elements/use-table-row.js';
|
|
414
|
+
export { useTD } from './table/elements/use-td.js';
|
|
415
|
+
export { useTH } from './table/elements/use-th.js';
|
|
416
|
+
export { useTR } from './table/elements/use-tr.js';
|
|
401
417
|
export { HighlightText } from './text/highlight-text/highlight-text.js';
|
|
418
|
+
export { Truncated } from './text/truncated/truncated.js';
|
|
402
419
|
export { Toast } from './toast/toast.js';
|
|
403
420
|
export { ToastProvider } from './toast/toast-provider.js';
|
|
404
421
|
export { useToast } from './toast/use-toast.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Account' | 'Access denied.' | 'Add order notes' | 'Add to list' | 'Address 1' | 'Address 2' | 'Address 3' | 'Address 4' | 'Address' | 'Amount: {0}' | 'An error occurred while changing the customer.' | 'An error occurred while fetching customers. Please try again later.' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'An unexpected error occured. Please try again.' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'Attention' | 'Availability unknown, please contact customer support for lead time or alternatives.' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Billing' | 'Cancel' | 'Cart' | 'Change customer' | 'Change password' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Checkout order' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Client cases' | 'Close' | 'CoC number' | 'Company name' | 'Conceal value' | 'Confirm password' | 'Continue shopping' | 'Continue to sign in' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Currency Change' | 'Current page' | 'Delivery date' | 'Delivery expected on {0}' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Edit' | 'Email' | 'Enter your email address and we will send you an email that will allow you to recover your password.' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Favorites' | 'Features' | 'Finalize order' | 'Finalize payment' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Hide filters' | 'Home' | 'If an account matches the email address you entered, instructions on how to recover the password will be sent to that email address shortly. If you do not receive this email, please contact Customer Support.' | 'If you want to proceed, click the continue button. If you want to change your country, close this message and select a different country.' | 'Incl. VAT' | 'Includes' | 'Industry' | 'industry.AG' | 'industry.AU' | 'industry.AV' | 'industry.BC' | 'industry.MA' | 'industry.MC' | 'industry.OT' | 'industry.PP' | 'industry.TR' | 'Information' | 'Language' | 'Last name' | 'List name already exists' | 'Log out' | 'Main menu' | 'More than {0} articles' | 'My Sonic' | 'Name' | 'Navigate to...' | 'Navigation' | 'New list name' | 'New user?' | 'No results found. Please refine your search.' | 'Number of favorites' | 'Number of products' | 'of' | 'Or continue as guest' | 'Order confirmation' | 'Order date' | 'Order number' | 'Order' | 'Orders' | 'Our products' | 'Overview' | 'Password does not meet requirements' | 'Password' | 'Passwords do not match' | 'Pay by invoice' | 'Payment method' | 'Payment' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please enter a valid email address' | 'Please enter a valid phone number' | 'please go back to your cart.' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Private account' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quantity' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Recover your password' | 'Remember me' | 'Remove all' | 'Requested delivery date' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search for a customer' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a country' | 'Select a desired delivery date' | 'Select a language' | 'Select a list' | 'Select an industry' | 'Select other customer' | 'Selected customer' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Selecting this country will result in your cart to be converted to the currency {0}' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Shopping cart' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'Sign in or create account' | 'sign in' | 'Sign me up for newsletters and product updates' | 'Signed in' | 'Signed out' | 'Signing in…' | 'Sonic account' | 'Sonic address' | 'Sonic Equipment' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Start checkout' | 'Submenu' | 'Submit email address' | 'Submit' | 'Submitting…' | 'Subtotal' | 'Suggestions' | 'Support' | 'tag.limited' | 'tag.new' | 'The email address you entered is already associated with an existing account. Please sign in to this account or contact Customer Support.' | 'The expected delivery is an indication based on the product availability and the shipping location.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are more customers, please refine your search if needed.' | 'There are no products in your shopping cart.' | 'There is no information to display' | 'Toggle navigation menu' | 'Total amount is' | 'Total' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unknown' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You are not authorized to access this information.' | 'You are not authorized to view customers. Please log in or contact support.' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!' | 'You must ' | 'You selected a country where we invoice in a different currency. This will result in your cart being converted to the new currency. If you would like to review your order, ' | 'Your cart has been emptied.' | 'Your email and password were not recognized.' | 'Your favorites are available on multiple devices' | 'Your new Sonic Equipment account was succesfully created. You should receive an email soon with further instructions on how to activate this account. If you do not receive this email, please contact Customer Support.' | 'Your shopping cart is still empty';
|
|
1
|
+
export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Account' | 'Access denied.' | 'active' | 'Add order notes' | 'Add to list' | 'Address 1' | 'Address 2' | 'Address 3' | 'Address 4' | 'Address' | 'Amount: {0}' | 'An error occurred while changing the customer.' | 'An error occurred while fetching customers. Please try again later.' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'An unexpected error occured. Please try again.' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'ascending' | 'Attention' | 'Availability unknown, please contact customer support for lead time or alternatives.' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Billing' | 'Cancel' | 'Cart' | 'Change customer' | 'Change password' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Checkout order' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Client cases' | 'Close' | 'CoC number' | 'Company name' | 'Conceal value' | 'Confirm password' | 'Continue shopping' | 'Continue to sign in' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Currency Change' | 'Current page' | 'Delivery date' | 'Delivery expected on {0}' | 'descending' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Edit' | 'Email' | 'Enter your email address and we will send you an email that will allow you to recover your password.' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Favorites' | 'Features' | 'Finalize order' | 'Finalize payment' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Hide filters' | 'Home' | 'If an account matches the email address you entered, instructions on how to recover the password will be sent to that email address shortly. If you do not receive this email, please contact Customer Support.' | 'If you want to proceed, click the continue button. If you want to change your country, close this message and select a different country.' | 'Incl. VAT' | 'Includes' | 'Industry' | 'industry.AG' | 'industry.AU' | 'industry.AV' | 'industry.BC' | 'industry.MA' | 'industry.MC' | 'industry.OT' | 'industry.PP' | 'industry.TR' | 'Information' | 'Language' | 'Last name' | 'List name already exists' | 'Log out' | 'Main menu' | 'More than {0} articles' | 'My Sonic' | 'Name' | 'Navigate to...' | 'Navigation' | 'New list name' | 'New user?' | 'No results found. Please refine your search.' | 'Number of favorites' | 'Number of products' | 'of' | 'Or continue as guest' | 'Order confirmation' | 'Order date' | 'Order number' | 'Order' | 'Orders' | 'Our products' | 'Overview' | 'Password does not meet requirements' | 'Password' | 'Passwords do not match' | 'Pay by invoice' | 'Payment method' | 'Payment' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please enter a valid email address' | 'Please enter a valid phone number' | 'please go back to your cart.' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Private account' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quantity' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Recover your password' | 'Remember me' | 'Remove all' | 'Requested delivery date' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search for a customer' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a country' | 'Select a desired delivery date' | 'Select a language' | 'Select a list' | 'Select an industry' | 'Select other customer' | 'Selected customer' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Selecting this country will result in your cart to be converted to the currency {0}' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Shopping cart' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'Sign in or create account' | 'sign in' | 'Sign me up for newsletters and product updates' | 'Signed in' | 'Signed out' | 'Signing in…' | 'Sonic account' | 'Sonic address' | 'Sonic Equipment' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Start checkout' | 'Submenu' | 'Submit email address' | 'Submit' | 'Submitting…' | 'Subtotal' | 'Suggestions' | 'Support' | 'tag.limited' | 'tag.new' | 'The email address you entered is already associated with an existing account. Please sign in to this account or contact Customer Support.' | 'The expected delivery is an indication based on the product availability and the shipping location.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are more customers, please refine your search if needed.' | 'There are no products in your shopping cart.' | 'There is no information to display' | 'Toggle navigation menu' | 'Total amount is' | 'Total' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unknown' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You are not authorized to access this information.' | 'You are not authorized to view customers. Please log in or contact support.' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!' | 'You must ' | 'You selected a country where we invoice in a different currency. This will result in your cart being converted to the new currency. If you would like to review your order, ' | 'Your cart has been emptied.' | 'Your email and password were not recognized.' | 'Your favorites are available on multiple devices' | 'Your new Sonic Equipment account was succesfully created. You should receive an email soon with further instructions on how to activate this account. If you do not receive this email, please contact Customer Support.' | 'Your shopping cart is still empty';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataCardProps } from '../../../../cards/data-card/data-card';
|
|
2
2
|
export interface AddressDataCardProps {
|
|
3
3
|
data: {
|
|
4
4
|
address1: string | undefined;
|
|
@@ -15,9 +15,9 @@ export interface AddressDataCardProps {
|
|
|
15
15
|
postalCode: string | undefined;
|
|
16
16
|
};
|
|
17
17
|
'data-test-selector'?: string;
|
|
18
|
-
isLoading?:
|
|
18
|
+
isLoading?: DataCardProps['isLoading'];
|
|
19
19
|
onEdit?: VoidFunction;
|
|
20
|
-
showError?:
|
|
21
|
-
title?:
|
|
20
|
+
showError?: DataCardProps['showError'];
|
|
21
|
+
title?: DataCardProps['title'];
|
|
22
22
|
}
|
|
23
23
|
export declare function AddressDataCard({ data: { address1, address2, address3, address4, attention, city, country, email, firstName, lastName, phone, postalCode, }, 'data-test-selector': dataTestSelector, isLoading, onEdit, showError, title, }: AddressDataCardProps): import("react/jsx-runtime").JSX.Element;
|