@deviceinsight/ng-ui-components 7.20.0 → 7.21.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/index.cjs +30 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -10
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -191
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/messageBox/messageBox.d.ts +8 -2
- package/dist/types/modules/messageBox/messageBox.d.ts.map +1 -1
- package/package.json +24 -23
package/dist/index.js
CHANGED
|
@@ -63,7 +63,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/modules/messageBox/messageBox.tsx
|
|
65
65
|
var groupNamesToToastIds = {};
|
|
66
|
+
var DEFAULT_AUTO_CLOSE_MS = 3e3;
|
|
67
|
+
var globalMessageBoxOptions = {};
|
|
66
68
|
var globalErrorMessageBoxOptions = { autoClose: false };
|
|
69
|
+
/**
|
|
70
|
+
* Base options merged into every messageBox call (success, info, warn and error).
|
|
71
|
+
* Per-call options and, for errors, the error specific global options take precedence.
|
|
72
|
+
*/
|
|
73
|
+
var setGlobalMessageBoxOptions = (options) => {
|
|
74
|
+
globalMessageBoxOptions = options;
|
|
75
|
+
};
|
|
67
76
|
var setGlobalErrorMessageBoxOptions = (options) => {
|
|
68
77
|
globalErrorMessageBoxOptions = options;
|
|
69
78
|
};
|
|
@@ -72,19 +81,29 @@ var storeGroupName = (groupName, toastId) => {
|
|
|
72
81
|
else groupNamesToToastIds[groupName] = [toastId];
|
|
73
82
|
};
|
|
74
83
|
var messageBoxSuccess = (content, options, groupName) => {
|
|
75
|
-
const toastId = toast.success(content,
|
|
84
|
+
const toastId = toast.success(content, {
|
|
85
|
+
...globalMessageBoxOptions,
|
|
86
|
+
...options
|
|
87
|
+
});
|
|
76
88
|
if (groupName) storeGroupName(groupName, toastId);
|
|
77
89
|
};
|
|
78
90
|
var messageBoxInfo = (content, options, groupName) => {
|
|
79
|
-
const toastId = toast.info(content,
|
|
91
|
+
const toastId = toast.info(content, {
|
|
92
|
+
...globalMessageBoxOptions,
|
|
93
|
+
...options
|
|
94
|
+
});
|
|
80
95
|
if (groupName) storeGroupName(groupName, toastId);
|
|
81
96
|
};
|
|
82
97
|
var messageBoxWarn = (content, options, groupName) => {
|
|
83
|
-
const toastId = toast.warn(content,
|
|
98
|
+
const toastId = toast.warn(content, {
|
|
99
|
+
...globalMessageBoxOptions,
|
|
100
|
+
...options
|
|
101
|
+
});
|
|
84
102
|
if (groupName) storeGroupName(groupName, toastId);
|
|
85
103
|
};
|
|
86
104
|
var messageBoxError = (content, options, groupName) => {
|
|
87
105
|
const toastId = toast.error(content, {
|
|
106
|
+
...globalMessageBoxOptions,
|
|
88
107
|
...globalErrorMessageBoxOptions,
|
|
89
108
|
...options
|
|
90
109
|
});
|
|
@@ -103,12 +122,13 @@ var messageBoxDismissAll = () => {
|
|
|
103
122
|
groupNamesToToastIds = {};
|
|
104
123
|
toast.dismiss();
|
|
105
124
|
};
|
|
106
|
-
var MessageBoxContainer = () => /* @__PURE__ */ jsx(ToastContainer, {
|
|
107
|
-
position
|
|
108
|
-
theme
|
|
109
|
-
autoClose
|
|
110
|
-
hideProgressBar
|
|
111
|
-
transition
|
|
125
|
+
var MessageBoxContainer = ({ position = "top-center", theme = "colored", autoClose = DEFAULT_AUTO_CLOSE_MS, hideProgressBar = true, transition = Slide, ...props } = {}) => /* @__PURE__ */ jsx(ToastContainer, {
|
|
126
|
+
position,
|
|
127
|
+
theme,
|
|
128
|
+
autoClose,
|
|
129
|
+
hideProgressBar,
|
|
130
|
+
transition,
|
|
131
|
+
...props
|
|
112
132
|
});
|
|
113
133
|
//#endregion
|
|
114
134
|
//#region src/modules/utils/uuidGen.ts
|
|
@@ -3571,6 +3591,6 @@ var Slider = ({ min, max, step, value, tooltip = true, labels, format, onChange,
|
|
|
3571
3591
|
});
|
|
3572
3592
|
};
|
|
3573
3593
|
//#endregion
|
|
3574
|
-
export { Chart, GridColorPicker as ColorPicker, GridColorPicker, ContentHeader, DateInput, DateTimeInput, FileUpload, GradientColorPicker, ImageUpload, InfoBox, MessageBoxContainer, MultiMenuFunctional as MultiMenu, MultiMenuItem, Pagination, PeriodPicker, Reactable, ReactableWithClientSidePagination, RouteLink, RouteTabs, SelectWithSearch, SelectWithSearchAsync, Slider, SvgImage, TreeView, UrnInput, ValidatedTextInput, getMutableNodeList_default as getMutableNodeList, getSvgElement_default as getSvgElement, getTreeNodePathById, initializeTranslation, messageBoxDismissAll, messageBoxDismissGroup, messageBoxDismissSingle, messageBoxError, messageBoxInfo, messageBoxSuccess, messageBoxWarn, nanoid10, setGlobalErrorMessageBoxOptions, uuidV4, validateSvg_default as validateSvg, withPrompt };
|
|
3594
|
+
export { Chart, GridColorPicker as ColorPicker, GridColorPicker, ContentHeader, DateInput, DateTimeInput, FileUpload, GradientColorPicker, ImageUpload, InfoBox, MessageBoxContainer, MultiMenuFunctional as MultiMenu, MultiMenuItem, Pagination, PeriodPicker, Reactable, ReactableWithClientSidePagination, RouteLink, RouteTabs, SelectWithSearch, SelectWithSearchAsync, Slider, SvgImage, TreeView, UrnInput, ValidatedTextInput, getMutableNodeList_default as getMutableNodeList, getSvgElement_default as getSvgElement, getTreeNodePathById, initializeTranslation, messageBoxDismissAll, messageBoxDismissGroup, messageBoxDismissSingle, messageBoxError, messageBoxInfo, messageBoxSuccess, messageBoxWarn, nanoid10, setGlobalErrorMessageBoxOptions, setGlobalMessageBoxOptions, uuidV4, validateSvg_default as validateSvg, withPrompt };
|
|
3575
3595
|
|
|
3576
3596
|
//# sourceMappingURL=index.js.map
|