@qlibs/utils 1.9.1 → 1.10.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.
@@ -117,7 +117,19 @@ function getStandardError(err, config) {
117
117
  handleFormValidation(errors || [], config.formRef);
118
118
  }
119
119
  if ((config === null || config === void 0 ? void 0 : config.showToast) && (config === null || config === void 0 ? void 0 : config.toastFunction)) {
120
- config.toastFunction.error(message);
120
+ if (config.toastFunction.confirm) {
121
+ config.toastFunction.error({
122
+ title: 'Failed',
123
+ content: message,
124
+ closable: true,
125
+ });
126
+ }
127
+ else if (config.toastFunction.error) {
128
+ config.toastFunction.error(message);
129
+ }
130
+ else if (typeof config.toastFunction === 'function') {
131
+ config.toastFunction(message);
132
+ }
121
133
  }
122
134
  return {
123
135
  code,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qlibs/utils",
3
- "version": "1.9.1",
3
+ "version": "1.10.0",
4
4
  "description": "",
5
5
  "author": "QBIT Developer",
6
6
  "license": "MIT",