@sybz-components/utils 1.0.19 → 1.0.20
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/base.cjs +1 -1
- package/dist/base.mjs +1 -1
- package/dist/format.cjs +1 -1
- package/dist/format.mjs +1 -1
- package/dist/http.cjs +1 -1
- package/dist/http.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{utils.C6JV38T7.mjs → utils.C6u5wfj0.mjs} +7 -4
- package/dist/shared/{utils.s3A3s_9I.cjs → utils.CpSVN1vj.cjs} +7 -4
- package/package.json +1 -1
package/dist/base.cjs
CHANGED
package/dist/base.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'vue';
|
|
2
2
|
import 'consola';
|
|
3
3
|
import 'es-toolkit';
|
|
4
|
-
export { $ as $toast, c as clearStorage, a as clone, b as configureUtils, d as confirm, e as copy, f as debounce, g as delay, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.
|
|
4
|
+
export { $ as $toast, c as clearStorage, a as clone, b as configureUtils, d as confirm, e as copy, f as debounce, g as delay, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.C6u5wfj0.mjs';
|
|
5
5
|
import './confirmSemantic.mjs';
|
|
6
6
|
import 'element-plus';
|
|
7
7
|
import 'axios';
|
package/dist/format.cjs
CHANGED
package/dist/format.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed } from './shared/utils.
|
|
1
|
+
export { z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed } from './shared/utils.C6u5wfj0.mjs';
|
|
2
2
|
import './is.mjs';
|
|
3
3
|
import 'consola';
|
|
4
4
|
import 'vue';
|
package/dist/http.cjs
CHANGED
package/dist/http.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'axios';
|
|
2
|
-
export { H as HttpError, G as configureHttp, I as createHttp, J as http } from './shared/utils.
|
|
2
|
+
export { H as HttpError, G as configureHttp, I as createHttp, J as http } from './shared/utils.C6u5wfj0.mjs';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import 'consola';
|
|
5
5
|
import 'es-toolkit';
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { $ as $toast, H as HttpError, c as clearStorage, a as clone, G as configureHttp, b as configureUtils, d as confirm, e as copy, I as createHttp, f as debounce, g as delay, z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, J as http, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.
|
|
1
|
+
export { $ as $toast, H as HttpError, c as clearStorage, a as clone, G as configureHttp, b as configureUtils, d as confirm, e as copy, I as createHttp, f as debounce, g as delay, z as formatBytes, A as formatBytesConvert, B as formatDurationTime, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed, h as getStorage, i as getType, j as getUtilsBuildTime, k as getVariable, J as http, l as isEmpty, m as log, n as merge, o as mockValue, p as processWidth, r as random, s as setStorage, t as test, q as throttle, u as toLine, v as tryCatch, w as validate, x as validateForm, y as validateOnSubmit } from './shared/utils.C6u5wfj0.mjs';
|
|
2
2
|
export { resolveConfirmSemantic } from './confirmSemantic.mjs';
|
|
3
3
|
export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isNumber, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isStringNumber, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.mjs';
|
|
4
4
|
export { SYBZ_THEME_PREFIX, isSybzTheme, resolveSybzComponentTheme } from './theme.mjs';
|
|
@@ -418,7 +418,8 @@ function $toast(message, type = "success", otherParams = {}) {
|
|
|
418
418
|
}
|
|
419
419
|
function showToast(options) {
|
|
420
420
|
const { theme = utilsConfig.theme, customClass, iconAttrs, handlers, ...messageOptions } = options;
|
|
421
|
-
const
|
|
421
|
+
const appContext = _resolveAppContext(null);
|
|
422
|
+
const appComponents = appContext?.components;
|
|
422
423
|
if (typeof messageOptions.icon === "string") {
|
|
423
424
|
const icon = appComponents?.SIcon ?? appComponents?.["s-icon"];
|
|
424
425
|
if (icon) {
|
|
@@ -445,11 +446,13 @@ function $toast(message, type = "success", otherParams = {}) {
|
|
|
445
446
|
customClass !== "el" && theme !== "default" && `s-antd-message--${theme}`,
|
|
446
447
|
customClass !== "el" && customClass
|
|
447
448
|
);
|
|
448
|
-
|
|
449
|
+
const resolvedMessageOptions = {
|
|
449
450
|
...messageOptions,
|
|
450
451
|
showClose: options.showClose ?? true,
|
|
451
452
|
customClass: resolvedCustomClass
|
|
452
|
-
}
|
|
453
|
+
};
|
|
454
|
+
if (appContext) ElMessage(resolvedMessageOptions, appContext);
|
|
455
|
+
else ElMessage(resolvedMessageOptions);
|
|
453
456
|
}
|
|
454
457
|
if (isToastOptions(message)) {
|
|
455
458
|
showToast(message);
|
|
@@ -1253,7 +1256,7 @@ function getVariable(propertyName, fallback = "") {
|
|
|
1253
1256
|
const DEFAULT_BUILD_TIME_FALLBACK = "\u672A\u6CE8\u5165";
|
|
1254
1257
|
function getUtilsBuildTime(fallback = DEFAULT_BUILD_TIME_FALLBACK) {
|
|
1255
1258
|
{
|
|
1256
|
-
return "2026-11-
|
|
1259
|
+
return "2026-11-20 11:05:15";
|
|
1257
1260
|
}
|
|
1258
1261
|
}
|
|
1259
1262
|
function test() {
|
|
@@ -424,7 +424,8 @@ function $toast(message, type = "success", otherParams = {}) {
|
|
|
424
424
|
}
|
|
425
425
|
function showToast(options) {
|
|
426
426
|
const { theme = utilsConfig.theme, customClass, iconAttrs, handlers, ...messageOptions } = options;
|
|
427
|
-
const
|
|
427
|
+
const appContext = _resolveAppContext(null);
|
|
428
|
+
const appComponents = appContext?.components;
|
|
428
429
|
if (typeof messageOptions.icon === "string") {
|
|
429
430
|
const icon = appComponents?.SIcon ?? appComponents?.["s-icon"];
|
|
430
431
|
if (icon) {
|
|
@@ -451,11 +452,13 @@ function $toast(message, type = "success", otherParams = {}) {
|
|
|
451
452
|
customClass !== "el" && theme !== "default" && `s-antd-message--${theme}`,
|
|
452
453
|
customClass !== "el" && customClass
|
|
453
454
|
);
|
|
454
|
-
|
|
455
|
+
const resolvedMessageOptions = {
|
|
455
456
|
...messageOptions,
|
|
456
457
|
showClose: options.showClose ?? true,
|
|
457
458
|
customClass: resolvedCustomClass
|
|
458
|
-
}
|
|
459
|
+
};
|
|
460
|
+
if (appContext) elementPlus.ElMessage(resolvedMessageOptions, appContext);
|
|
461
|
+
else elementPlus.ElMessage(resolvedMessageOptions);
|
|
459
462
|
}
|
|
460
463
|
if (isToastOptions(message)) {
|
|
461
464
|
showToast(message);
|
|
@@ -1259,7 +1262,7 @@ function getVariable(propertyName, fallback = "") {
|
|
|
1259
1262
|
const DEFAULT_BUILD_TIME_FALLBACK = "\u672A\u6CE8\u5165";
|
|
1260
1263
|
function getUtilsBuildTime(fallback = DEFAULT_BUILD_TIME_FALLBACK) {
|
|
1261
1264
|
{
|
|
1262
|
-
return "2026-11-
|
|
1265
|
+
return "2026-11-20 11:05:15";
|
|
1263
1266
|
}
|
|
1264
1267
|
}
|
|
1265
1268
|
function test() {
|