@telicent-oss/ds 0.24.0 → 0.25.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/ds.js +18 -0
- package/dist/ds.umd.cjs +18 -0
- package/dist/logout-syncer/sw.js +1 -1
- package/dist/src/export.d.ts +1 -1
- package/dist/src/v1/components/utils/ErrorFallback/ErrorFallback.d.ts +6 -0
- package/dist/src/v1/components/utils/ErrorFallback/ErrorFallback.stories.d.ts +26 -0
- package/dist/src/v1/components/utils/ErrorFallback/ErrorFallbackText.d.ts +7 -0
- package/dist/src/v1/components/utils/ErrorFallback/ErrorFallbackText.stories.d.ts +47 -0
- package/dist/src/v1/components/utils/ErrorFallback/ErrorFallbackWrapper.d.ts +9 -0
- package/dist/src/v1/components/utils/ErrorFallback/ErrorFallbackWrapper.stories.d.ts +65 -0
- package/dist/src/v1/components/utils/ErrorFallback/index.d.ts +3 -0
- package/dist/src/v1/components/utils/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/ds.js
CHANGED
|
@@ -61224,6 +61224,21 @@ const Modal2 = ({
|
|
|
61224
61224
|
children2
|
|
61225
61225
|
] }) });
|
|
61226
61226
|
};
|
|
61227
|
+
const ErrorFallbackText = ({
|
|
61228
|
+
name,
|
|
61229
|
+
message
|
|
61230
|
+
}) => /* @__PURE__ */ jsx$1(Typography, { textAlign: "center", color: "textSecondary", children: message ?? `⚠️ ${name || "Component"} failed to load` });
|
|
61231
|
+
const ErrorFallbackWrapper = ({
|
|
61232
|
+
children: children2,
|
|
61233
|
+
height: height2 = 256,
|
|
61234
|
+
sx
|
|
61235
|
+
}) => /* @__PURE__ */ jsx$1(Box, { display: "flex", justifyContent: "center", alignItems: "center", height: height2, sx, children: children2 });
|
|
61236
|
+
const ErrorFallback = ({
|
|
61237
|
+
name,
|
|
61238
|
+
message,
|
|
61239
|
+
height: height2 = 256,
|
|
61240
|
+
sx
|
|
61241
|
+
}) => /* @__PURE__ */ jsx$1(ErrorFallbackWrapper, { height: height2, sx, children: /* @__PURE__ */ jsx$1(ErrorFallbackText, { name, message }) });
|
|
61227
61242
|
const MountedMapsContext = React$2.createContext(null);
|
|
61228
61243
|
const MapProvider = (props) => {
|
|
61229
61244
|
const [maps, setMaps] = useState({});
|
|
@@ -81066,6 +81081,9 @@ export {
|
|
|
81066
81081
|
DragHandleIcon,
|
|
81067
81082
|
DropdownButton,
|
|
81068
81083
|
ENCODE_SEARCH_PARAMS_MODES_Schema,
|
|
81084
|
+
ErrorFallback,
|
|
81085
|
+
ErrorFallbackText,
|
|
81086
|
+
ErrorFallbackWrapper,
|
|
81069
81087
|
FeatureMap,
|
|
81070
81088
|
Panel as FixedPanel,
|
|
81071
81089
|
FlexBox,
|
package/dist/ds.umd.cjs
CHANGED
|
@@ -61242,6 +61242,21 @@ Please use another name.` : formatMuiErrorMessage$1(18));
|
|
|
61242
61242
|
children2
|
|
61243
61243
|
] }) });
|
|
61244
61244
|
};
|
|
61245
|
+
const ErrorFallbackText = ({
|
|
61246
|
+
name,
|
|
61247
|
+
message
|
|
61248
|
+
}) => /* @__PURE__ */ jsx$1(Typography, { textAlign: "center", color: "textSecondary", children: message ?? `⚠️ ${name || "Component"} failed to load` });
|
|
61249
|
+
const ErrorFallbackWrapper = ({
|
|
61250
|
+
children: children2,
|
|
61251
|
+
height: height2 = 256,
|
|
61252
|
+
sx
|
|
61253
|
+
}) => /* @__PURE__ */ jsx$1(Box, { display: "flex", justifyContent: "center", alignItems: "center", height: height2, sx, children: children2 });
|
|
61254
|
+
const ErrorFallback = ({
|
|
61255
|
+
name,
|
|
61256
|
+
message,
|
|
61257
|
+
height: height2 = 256,
|
|
61258
|
+
sx
|
|
61259
|
+
}) => /* @__PURE__ */ jsx$1(ErrorFallbackWrapper, { height: height2, sx, children: /* @__PURE__ */ jsx$1(ErrorFallbackText, { name, message }) });
|
|
61245
61260
|
const MountedMapsContext = React__namespace.createContext(null);
|
|
61246
61261
|
const MapProvider = (props) => {
|
|
61247
61262
|
const [maps, setMaps] = React$2.useState({});
|
|
@@ -81088,6 +81103,9 @@ uniform ${i3} ${s4} u_${a3};
|
|
|
81088
81103
|
exports2.DragHandleIcon = DragHandleIcon;
|
|
81089
81104
|
exports2.DropdownButton = DropdownButton;
|
|
81090
81105
|
exports2.ENCODE_SEARCH_PARAMS_MODES_Schema = ENCODE_SEARCH_PARAMS_MODES_Schema;
|
|
81106
|
+
exports2.ErrorFallback = ErrorFallback;
|
|
81107
|
+
exports2.ErrorFallbackText = ErrorFallbackText;
|
|
81108
|
+
exports2.ErrorFallbackWrapper = ErrorFallbackWrapper;
|
|
81091
81109
|
exports2.FeatureMap = FeatureMap;
|
|
81092
81110
|
exports2.FixedPanel = Panel;
|
|
81093
81111
|
exports2.FlexBox = FlexBox;
|
package/dist/logout-syncer/sw.js
CHANGED
package/dist/src/export.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export * from './v1/components/inputs';
|
|
|
11
11
|
export * from './v1/components/layout';
|
|
12
12
|
export * from './v1/components/surfaces';
|
|
13
13
|
export * from './v1/theme';
|
|
14
|
-
export
|
|
14
|
+
export * from './v1/components/utils/index';
|
|
15
15
|
export * from './component-library/Map';
|
|
16
16
|
export { getCodec, type Codec, base64Codec, uriComponentCodec, ENCODE_SEARCH_PARAMS_MODES_Schema, type ENCODE_SEARCH_PARAMS_MODES_Type, toStringEncoded, type URLSearchParamsInit, GRAPH_APP, } from './candidate-packages/utils-lib/src/index';
|
|
17
17
|
export { setupWipe, WipeConfigSchema, type WipeConfig, } from './candidate-packages/logout-syncer/setupWipe';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ErrorFallbackTextProps } from './ErrorFallbackText';
|
|
3
|
+
import { ErrorFallbackWrapperProps } from './ErrorFallbackWrapper';
|
|
4
|
+
|
|
5
|
+
export type ErrorFallbackProps = Omit<ErrorFallbackWrapperProps, "children"> & ErrorFallbackTextProps;
|
|
6
|
+
export declare const ErrorFallback: React.FC<ErrorFallbackProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ErrorFallbackProps } from './ErrorFallback';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').FC<ErrorFallbackProps>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {
|
|
9
|
+
name: string;
|
|
10
|
+
message: undefined;
|
|
11
|
+
height: number;
|
|
12
|
+
sx: undefined;
|
|
13
|
+
};
|
|
14
|
+
decorators: ((Story: import('@storybook/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
15
|
+
height?: (number | string) | undefined;
|
|
16
|
+
sx?: import('@mui/material').SxProps<import('@mui/material').Theme> | undefined;
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
message?: string | undefined;
|
|
19
|
+
}>) => import("@emotion/react/jsx-runtime").JSX.Element)[];
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export declare const DefaultError: Story;
|
|
24
|
+
export declare const CustomMessage: Story;
|
|
25
|
+
export declare const CustomNameAndStyle: Story;
|
|
26
|
+
export declare const ExplicitHeight: Story;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ErrorFallbackTextProps } from './ErrorFallbackText';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').FC<ErrorFallbackTextProps>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {
|
|
9
|
+
name: string;
|
|
10
|
+
message: undefined;
|
|
11
|
+
};
|
|
12
|
+
decorators: ((Story: import('@storybook/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
13
|
+
name?: string | undefined;
|
|
14
|
+
message?: string | undefined;
|
|
15
|
+
}>) => import("@emotion/react/jsx-runtime").JSX.Element)[];
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
/**
|
|
20
|
+
* DefaultText:
|
|
21
|
+
* - When `message` is passed, it overrides `name`.
|
|
22
|
+
* - Renders exactly the given `message`.
|
|
23
|
+
*/
|
|
24
|
+
export declare const Defaults: Story;
|
|
25
|
+
/**
|
|
26
|
+
* WithMessage:
|
|
27
|
+
* - When `message` is passed, it overrides `name`.
|
|
28
|
+
* - Renders exactly the given `message`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const DefaultText: Story;
|
|
31
|
+
/**
|
|
32
|
+
* WithName:
|
|
33
|
+
* - When `message` is undefined, uses `name` to generate:
|
|
34
|
+
* "⚠️ {name} failed to load".
|
|
35
|
+
*/
|
|
36
|
+
export declare const WithName: Story;
|
|
37
|
+
/**
|
|
38
|
+
* WithNameAndMessage:
|
|
39
|
+
* - When `message` and `name` set, `message` wins
|
|
40
|
+
*/
|
|
41
|
+
export declare const WithNameAndMessage: Story;
|
|
42
|
+
/**
|
|
43
|
+
* WithNameAndMessage:
|
|
44
|
+
* - When `message` is undefined, uses `name` to generate:
|
|
45
|
+
* "⚠️ {name} failed to load".
|
|
46
|
+
*/
|
|
47
|
+
export declare const Long: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
export type ErrorFallbackWrapperProps = {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
height?: number | string;
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
|
+
};
|
|
9
|
+
export declare const ErrorFallbackWrapper: React.FC<ErrorFallbackWrapperProps>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ErrorFallbackWrapperProps } from './ErrorFallbackWrapper';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').FC<ErrorFallbackWrapperProps>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {};
|
|
9
|
+
decorators: ((Story: import('@storybook/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
10
|
+
children: import('react').ReactNode;
|
|
11
|
+
height?: (number | string) | undefined;
|
|
12
|
+
sx?: import('@mui/material').SxProps<import('@mui/material').Theme> | undefined;
|
|
13
|
+
}>) => import("@emotion/react/jsx-runtime").JSX.Element)[];
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
/**
|
|
18
|
+
* Default:
|
|
19
|
+
* - Uses ErrorFallbackWrapper with default `height = 256`.
|
|
20
|
+
* - Renders `<ErrorFallbackText name="MyComponent" />` inside.
|
|
21
|
+
*/
|
|
22
|
+
export declare const Default: Story;
|
|
23
|
+
/**
|
|
24
|
+
* CustomMessage:
|
|
25
|
+
* - Pass `message` to ErrorFallbackText for custom error text.
|
|
26
|
+
*/
|
|
27
|
+
export declare const CustomMessage: Story;
|
|
28
|
+
/**
|
|
29
|
+
* CustomHeight:
|
|
30
|
+
* - Overrides `height` prop on ErrorFallbackWrapper (150px vs default 256px).
|
|
31
|
+
*/
|
|
32
|
+
export declare const CustomHeight: Story;
|
|
33
|
+
/**
|
|
34
|
+
* StyledWrapper:
|
|
35
|
+
* - Locally wraps ErrorFallbackWrapper in a MUI ThemeProvider that defines
|
|
36
|
+
* `background.paper` and `error.main` tokens so the background renders.
|
|
37
|
+
*/
|
|
38
|
+
export declare const StyledWrapper: {
|
|
39
|
+
args: {
|
|
40
|
+
height: number;
|
|
41
|
+
sx: (theme: any) => {
|
|
42
|
+
width: string;
|
|
43
|
+
backgroundColor: any;
|
|
44
|
+
border: number;
|
|
45
|
+
borderColor: any;
|
|
46
|
+
borderRadius: number;
|
|
47
|
+
p: number;
|
|
48
|
+
};
|
|
49
|
+
children: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
50
|
+
};
|
|
51
|
+
render: (args: ErrorFallbackWrapperProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
52
|
+
parameters: {
|
|
53
|
+
docs: {
|
|
54
|
+
description: {
|
|
55
|
+
story: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* TextOnly:
|
|
62
|
+
* - Demonstrates using ErrorFallbackText on its own (no wrapper).
|
|
63
|
+
* - Useful when centering or container is handled externally.
|
|
64
|
+
*/
|
|
65
|
+
export declare const TextOnly: Story;
|