@equinor/cpl-error-snackbar-react 0.0.2 → 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 +9 -1
- package/dist/index.mjs +7 -1
- package/package.json +1 -1
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
|
|
@@ -313,6 +315,7 @@ var FixedWrapper = import_styled_components3.default.div`
|
|
|
313
315
|
}
|
|
314
316
|
return `
|
|
315
317
|
position: fixed;
|
|
318
|
+
z-index: 1000;
|
|
316
319
|
bottom: 0;
|
|
317
320
|
left: 0;
|
|
318
321
|
width: 100%;
|
|
@@ -353,7 +356,10 @@ function parseUnknownError(unknownError) {
|
|
|
353
356
|
title: getTypedPropertyIfExists(unknownError, "title", "string") || "Unkown Error",
|
|
354
357
|
status: getTypedPropertyIfExists(unknownError, "status", "number") || -1,
|
|
355
358
|
detail: getTypedPropertyIfExists(unknownError, "detail", "string"),
|
|
356
|
-
error: innerError
|
|
359
|
+
error: innerError,
|
|
360
|
+
timestamp: getTypedPropertyIfExists(unknownError, "timestamp", "string"),
|
|
361
|
+
traceId: getTypedPropertyIfExists(unknownError, "traceId", "string"),
|
|
362
|
+
instance: getTypedPropertyIfExists(unknownError, "instance", "string")
|
|
357
363
|
};
|
|
358
364
|
}
|
|
359
365
|
function parseInnerError(rawInnerError) {
|
|
@@ -397,9 +403,11 @@ function itemIsDefined(e) {
|
|
|
397
403
|
// Annotate the CommonJS export names for ESM import in node:
|
|
398
404
|
0 && (module.exports = {
|
|
399
405
|
CopyToClipboardButton,
|
|
406
|
+
ERROR_SNACKBARS_FIXED_LIST_TESTID,
|
|
400
407
|
ErrorSnackbar,
|
|
401
408
|
ErrorSnackbarContext,
|
|
402
409
|
ErrorSnackbarContextProvider,
|
|
410
|
+
ErrorSnackbarFixedList,
|
|
403
411
|
ErrorSnackbarListContainer,
|
|
404
412
|
parseUnknownError,
|
|
405
413
|
useErrorSnackbarContext
|
package/dist/index.mjs
CHANGED
|
@@ -272,6 +272,7 @@ var FixedWrapper = styled3.div`
|
|
|
272
272
|
}
|
|
273
273
|
return `
|
|
274
274
|
position: fixed;
|
|
275
|
+
z-index: 1000;
|
|
275
276
|
bottom: 0;
|
|
276
277
|
left: 0;
|
|
277
278
|
width: 100%;
|
|
@@ -312,7 +313,10 @@ function parseUnknownError(unknownError) {
|
|
|
312
313
|
title: getTypedPropertyIfExists(unknownError, "title", "string") || "Unkown Error",
|
|
313
314
|
status: getTypedPropertyIfExists(unknownError, "status", "number") || -1,
|
|
314
315
|
detail: getTypedPropertyIfExists(unknownError, "detail", "string"),
|
|
315
|
-
error: innerError
|
|
316
|
+
error: innerError,
|
|
317
|
+
timestamp: getTypedPropertyIfExists(unknownError, "timestamp", "string"),
|
|
318
|
+
traceId: getTypedPropertyIfExists(unknownError, "traceId", "string"),
|
|
319
|
+
instance: getTypedPropertyIfExists(unknownError, "instance", "string")
|
|
316
320
|
};
|
|
317
321
|
}
|
|
318
322
|
function parseInnerError(rawInnerError) {
|
|
@@ -355,9 +359,11 @@ function itemIsDefined(e) {
|
|
|
355
359
|
}
|
|
356
360
|
export {
|
|
357
361
|
CopyToClipboardButton,
|
|
362
|
+
ERROR_SNACKBARS_FIXED_LIST_TESTID,
|
|
358
363
|
ErrorSnackbar,
|
|
359
364
|
ErrorSnackbarContext,
|
|
360
365
|
ErrorSnackbarContextProvider,
|
|
366
|
+
ErrorSnackbarFixedList,
|
|
361
367
|
ErrorSnackbarListContainer,
|
|
362
368
|
parseUnknownError,
|
|
363
369
|
useErrorSnackbarContext
|