@equinor/cpl-error-snackbar-react 0.0.3 → 0.0.4
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/index.d.mts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +8 -1
- package/dist/index.mjs +6 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -120,6 +120,20 @@ declare function ErrorSnackbarContextProvider({ children, errorSnackbarObjects:
|
|
|
120
120
|
errorSnackbarObjects?: ErrorSnackbarObject[];
|
|
121
121
|
}): react_jsx_runtime.JSX.Element;
|
|
122
122
|
|
|
123
|
+
interface ErrorSnackbarsFixedListProps {
|
|
124
|
+
/**
|
|
125
|
+
* This component is fixed to the bottom of the screen by default. To disable this behaviour,
|
|
126
|
+
* pass `disablePositionFixed` as a prop.
|
|
127
|
+
*
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
disablePositionFixed?: boolean;
|
|
131
|
+
errorSnackbarObjects: ErrorSnackbarObject[];
|
|
132
|
+
removeErrorSnackbarObjectById: (errorSnackbarId: string) => void;
|
|
133
|
+
}
|
|
134
|
+
declare const ERROR_SNACKBARS_FIXED_LIST_TESTID = "error-snackbars-fixed-wrapper";
|
|
135
|
+
declare function ErrorSnackbarFixedList({ disablePositionFixed, errorSnackbarObjects, removeErrorSnackbarObjectById, }: ErrorSnackbarsFixedListProps): react_jsx_runtime.JSX.Element;
|
|
136
|
+
|
|
123
137
|
interface ErrorSnackbarsContainerProps {
|
|
124
138
|
/**
|
|
125
139
|
* This component is fixed to the bottom of the screen by default. To disable this behaviour,
|
|
@@ -133,4 +147,4 @@ declare function ErrorSnackbarListContainer({ disablePositionFixed, }: ErrorSnac
|
|
|
133
147
|
|
|
134
148
|
declare function parseUnknownError(unknownError: unknown): Error;
|
|
135
149
|
|
|
136
|
-
export { type AccessRequirement, CopyToClipboardButton, type Error, ErrorSnackbar, ErrorSnackbarContext, ErrorSnackbarContextProvider, ErrorSnackbarListContainer, type ErrorSnackbarObject, type InnerError, parseUnknownError, useErrorSnackbarContext };
|
|
150
|
+
export { type AccessRequirement, CopyToClipboardButton, ERROR_SNACKBARS_FIXED_LIST_TESTID, type Error, ErrorSnackbar, ErrorSnackbarContext, ErrorSnackbarContextProvider, ErrorSnackbarFixedList, ErrorSnackbarListContainer, type ErrorSnackbarObject, type InnerError, parseUnknownError, useErrorSnackbarContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -120,6 +120,20 @@ declare function ErrorSnackbarContextProvider({ children, errorSnackbarObjects:
|
|
|
120
120
|
errorSnackbarObjects?: ErrorSnackbarObject[];
|
|
121
121
|
}): react_jsx_runtime.JSX.Element;
|
|
122
122
|
|
|
123
|
+
interface ErrorSnackbarsFixedListProps {
|
|
124
|
+
/**
|
|
125
|
+
* This component is fixed to the bottom of the screen by default. To disable this behaviour,
|
|
126
|
+
* pass `disablePositionFixed` as a prop.
|
|
127
|
+
*
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
disablePositionFixed?: boolean;
|
|
131
|
+
errorSnackbarObjects: ErrorSnackbarObject[];
|
|
132
|
+
removeErrorSnackbarObjectById: (errorSnackbarId: string) => void;
|
|
133
|
+
}
|
|
134
|
+
declare const ERROR_SNACKBARS_FIXED_LIST_TESTID = "error-snackbars-fixed-wrapper";
|
|
135
|
+
declare function ErrorSnackbarFixedList({ disablePositionFixed, errorSnackbarObjects, removeErrorSnackbarObjectById, }: ErrorSnackbarsFixedListProps): react_jsx_runtime.JSX.Element;
|
|
136
|
+
|
|
123
137
|
interface ErrorSnackbarsContainerProps {
|
|
124
138
|
/**
|
|
125
139
|
* This component is fixed to the bottom of the screen by default. To disable this behaviour,
|
|
@@ -133,4 +147,4 @@ declare function ErrorSnackbarListContainer({ disablePositionFixed, }: ErrorSnac
|
|
|
133
147
|
|
|
134
148
|
declare function parseUnknownError(unknownError: unknown): Error;
|
|
135
149
|
|
|
136
|
-
export { type AccessRequirement, CopyToClipboardButton, type Error, ErrorSnackbar, ErrorSnackbarContext, ErrorSnackbarContextProvider, ErrorSnackbarListContainer, type ErrorSnackbarObject, type InnerError, parseUnknownError, useErrorSnackbarContext };
|
|
150
|
+
export { type AccessRequirement, CopyToClipboardButton, ERROR_SNACKBARS_FIXED_LIST_TESTID, type Error, ErrorSnackbar, ErrorSnackbarContext, ErrorSnackbarContextProvider, ErrorSnackbarFixedList, ErrorSnackbarListContainer, type ErrorSnackbarObject, type InnerError, parseUnknownError, useErrorSnackbarContext };
|
package/dist/index.js
CHANGED
|
@@ -51,9 +51,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
51
51
|
var src_exports = {};
|
|
52
52
|
__export(src_exports, {
|
|
53
53
|
CopyToClipboardButton: () => CopyToClipboardButton,
|
|
54
|
+
ERROR_SNACKBARS_FIXED_LIST_TESTID: () => ERROR_SNACKBARS_FIXED_LIST_TESTID,
|
|
54
55
|
ErrorSnackbar: () => ErrorSnackbar,
|
|
55
56
|
ErrorSnackbarContext: () => ErrorSnackbarContext,
|
|
56
57
|
ErrorSnackbarContextProvider: () => ErrorSnackbarContextProvider,
|
|
58
|
+
ErrorSnackbarFixedList: () => ErrorSnackbarFixedList,
|
|
57
59
|
ErrorSnackbarListContainer: () => ErrorSnackbarListContainer,
|
|
58
60
|
parseUnknownError: () => parseUnknownError,
|
|
59
61
|
useErrorSnackbarContext: () => useErrorSnackbarContext
|
|
@@ -354,7 +356,10 @@ function parseUnknownError(unknownError) {
|
|
|
354
356
|
title: getTypedPropertyIfExists(unknownError, "title", "string") || "Unkown Error",
|
|
355
357
|
status: getTypedPropertyIfExists(unknownError, "status", "number") || -1,
|
|
356
358
|
detail: getTypedPropertyIfExists(unknownError, "detail", "string"),
|
|
357
|
-
error: innerError
|
|
359
|
+
error: innerError,
|
|
360
|
+
timestamp: getTypedPropertyIfExists(unknownError, "timestamp", "string"),
|
|
361
|
+
traceId: getTypedPropertyIfExists(unknownError, "traceId", "string"),
|
|
362
|
+
instance: getTypedPropertyIfExists(unknownError, "instance", "string")
|
|
358
363
|
};
|
|
359
364
|
}
|
|
360
365
|
function parseInnerError(rawInnerError) {
|
|
@@ -398,9 +403,11 @@ function itemIsDefined(e) {
|
|
|
398
403
|
// Annotate the CommonJS export names for ESM import in node:
|
|
399
404
|
0 && (module.exports = {
|
|
400
405
|
CopyToClipboardButton,
|
|
406
|
+
ERROR_SNACKBARS_FIXED_LIST_TESTID,
|
|
401
407
|
ErrorSnackbar,
|
|
402
408
|
ErrorSnackbarContext,
|
|
403
409
|
ErrorSnackbarContextProvider,
|
|
410
|
+
ErrorSnackbarFixedList,
|
|
404
411
|
ErrorSnackbarListContainer,
|
|
405
412
|
parseUnknownError,
|
|
406
413
|
useErrorSnackbarContext
|
package/dist/index.mjs
CHANGED
|
@@ -313,7 +313,10 @@ function parseUnknownError(unknownError) {
|
|
|
313
313
|
title: getTypedPropertyIfExists(unknownError, "title", "string") || "Unkown Error",
|
|
314
314
|
status: getTypedPropertyIfExists(unknownError, "status", "number") || -1,
|
|
315
315
|
detail: getTypedPropertyIfExists(unknownError, "detail", "string"),
|
|
316
|
-
error: innerError
|
|
316
|
+
error: innerError,
|
|
317
|
+
timestamp: getTypedPropertyIfExists(unknownError, "timestamp", "string"),
|
|
318
|
+
traceId: getTypedPropertyIfExists(unknownError, "traceId", "string"),
|
|
319
|
+
instance: getTypedPropertyIfExists(unknownError, "instance", "string")
|
|
317
320
|
};
|
|
318
321
|
}
|
|
319
322
|
function parseInnerError(rawInnerError) {
|
|
@@ -356,9 +359,11 @@ function itemIsDefined(e) {
|
|
|
356
359
|
}
|
|
357
360
|
export {
|
|
358
361
|
CopyToClipboardButton,
|
|
362
|
+
ERROR_SNACKBARS_FIXED_LIST_TESTID,
|
|
359
363
|
ErrorSnackbar,
|
|
360
364
|
ErrorSnackbarContext,
|
|
361
365
|
ErrorSnackbarContextProvider,
|
|
366
|
+
ErrorSnackbarFixedList,
|
|
362
367
|
ErrorSnackbarListContainer,
|
|
363
368
|
parseUnknownError,
|
|
364
369
|
useErrorSnackbarContext
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/cpl-error-snackbar-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"react-dom": "^18.2.0",
|
|
25
25
|
"styled-components": "^6.1.11",
|
|
26
26
|
"tsup": "^8.1.0",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
27
|
+
"eslint-config-custom": "0.0.5",
|
|
28
|
+
"tsconfig": "0.0.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@equinor/eds-core-react": ">=0.35.1",
|