wlwy-package 3.2.3-httpOnlyCookie.0 → 3.2.3
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/editor/index.es.js +1 -1
- package/dist/{editor-core-C7ZO3umt.js → editor-core-DizrH1p6.js} +2 -2
- package/dist/{index-BPPIVUm2.js → index-DVGXAKlY.js} +1 -1
- package/dist/{index-DtK1XQdW.js → index-KquGST1J.js} +40 -22
- package/dist/style.css +1 -1
- package/dist/types/packages/axios/service.d.ts +2 -2
- package/dist/types/packages/axios/types/index.d.ts +1 -4
- package/dist/types/packages/components/table/warnDeprecated.d.ts +2 -0
- package/dist/types/packages/hooks/private/src/useRenderCell.d.ts +6 -4
- package/dist/types/packages/utils/formatCellValue.d.ts +5 -1
- package/dist/wlwy-package.es.js +53 -24
- package/package.json +2 -2
package/dist/editor/index.es.js
CHANGED
|
@@ -2,8 +2,8 @@ import { defineComponent, createElementBlock, openBlock, ref, shallowRef, onMoun
|
|
|
2
2
|
import "xe-utils";
|
|
3
3
|
import { theme, message } from "ant-design-vue";
|
|
4
4
|
import "vue-router";
|
|
5
|
-
import { u as useI18n, b as useLocale, A as API } from "./index-
|
|
6
|
-
import { _ as _export_sfc$1 } from "./index-
|
|
5
|
+
import { u as useI18n, b as useLocale, A as API } from "./index-KquGST1J.js";
|
|
6
|
+
import { _ as _export_sfc$1 } from "./index-DVGXAKlY.js";
|
|
7
7
|
var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
|
|
8
8
|
function t(e10) {
|
|
9
9
|
return e10 && e10.__esModule && Object.prototype.hasOwnProperty.call(e10, "default") ? e10.default : e10;
|
|
@@ -22,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
}),
|
|
23
23
|
emits: /* @__PURE__ */ mergeModels(["change", "focus", "blur"], ["update:html", "update:text"]),
|
|
24
24
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
25
|
-
const EditorCore = defineAsyncComponent(() => import("./editor-core-
|
|
25
|
+
const EditorCore = defineAsyncComponent(() => import("./editor-core-DizrH1p6.js"));
|
|
26
26
|
const html = useModel(__props, "html");
|
|
27
27
|
const text = useModel(__props, "text");
|
|
28
28
|
const props = __props;
|
|
@@ -181,7 +181,7 @@ const useTabsNavStoreWithOut = () => {
|
|
|
181
181
|
function getConfig() {
|
|
182
182
|
return window._CONFIG ?? {};
|
|
183
183
|
}
|
|
184
|
-
function getCookie(key) {
|
|
184
|
+
function getCookie$1(key) {
|
|
185
185
|
return cookie.get(key) || "";
|
|
186
186
|
}
|
|
187
187
|
function setCookie(key, value, options = {}) {
|
|
@@ -207,7 +207,7 @@ function getTopLevelDomain(url) {
|
|
|
207
207
|
}
|
|
208
208
|
function useCookie() {
|
|
209
209
|
return {
|
|
210
|
-
getCookie,
|
|
210
|
+
getCookie: getCookie$1,
|
|
211
211
|
setCookie,
|
|
212
212
|
removeCookie,
|
|
213
213
|
getCookieAll
|
|
@@ -2705,6 +2705,7 @@ const {
|
|
|
2705
2705
|
mergeConfig
|
|
2706
2706
|
} = axios;
|
|
2707
2707
|
const DEFAULT_LOADING = false;
|
|
2708
|
+
const { getCookie } = useCookie();
|
|
2708
2709
|
const { getLanguage: getLanguage$1 } = useLocale();
|
|
2709
2710
|
class service {
|
|
2710
2711
|
constructor(config2) {
|
|
@@ -2713,40 +2714,40 @@ class service {
|
|
|
2713
2714
|
__publicField(this, "interceptors");
|
|
2714
2715
|
__publicField(this, "showLoading");
|
|
2715
2716
|
__publicField(this, "spinning");
|
|
2716
|
-
__publicField(this, "
|
|
2717
|
-
var _a, _b, _c, _d
|
|
2717
|
+
__publicField(this, "tokenKey");
|
|
2718
|
+
var _a, _b, _c, _d;
|
|
2718
2719
|
this.interceptors = config2.interceptors;
|
|
2719
2720
|
this.showLoading = config2.showLoading || DEFAULT_LOADING;
|
|
2720
|
-
|
|
2721
|
-
this.systemType = config2.systemType || (typeof headerSystemType === "string" ? headerSystemType : "T");
|
|
2721
|
+
this.tokenKey = config2.tokenKey || "ttoken";
|
|
2722
2722
|
delete config2.interceptors;
|
|
2723
2723
|
delete config2.showLoading;
|
|
2724
2724
|
delete config2.tokenKey;
|
|
2725
|
-
delete config2.systemType;
|
|
2726
|
-
config2.withCredentials = true;
|
|
2727
2725
|
this.instance = axios.create(config2);
|
|
2726
|
+
this.instance.interceptors.request.use((_a = this.interceptors) == null ? void 0 : _a.requestInterceptor, (_b = this.interceptors) == null ? void 0 : _b.requestInterceptorCatch);
|
|
2728
2727
|
this.instance.interceptors.response.use((_c = this.interceptors) == null ? void 0 : _c.responseInterceptor, (_d = this.interceptors) == null ? void 0 : _d.responseInterceptorCatch);
|
|
2729
2728
|
this.instance.interceptors.request.use(
|
|
2730
2729
|
(config22) => {
|
|
2731
|
-
var _a2;
|
|
2732
2730
|
if (this.spinning ?? this.showLoading) {
|
|
2733
2731
|
const commonStore = useCommonStoreWithOut();
|
|
2734
2732
|
commonStore.setLoading(true);
|
|
2735
2733
|
}
|
|
2736
|
-
config22.headers
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2734
|
+
Object.assign(config22.headers, {
|
|
2735
|
+
// 添加TOKEN
|
|
2736
|
+
Satoken: getCookie(this.tokenKey) ?? "",
|
|
2737
|
+
// 添加语言
|
|
2738
|
+
language: getLanguage$1(),
|
|
2739
|
+
// 添加SystemType
|
|
2740
|
+
"System-Type": "T",
|
|
2741
|
+
// 添加时区
|
|
2742
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
2743
|
+
...config22.headers
|
|
2744
|
+
});
|
|
2743
2745
|
return config22;
|
|
2744
2746
|
},
|
|
2745
2747
|
(error) => {
|
|
2746
2748
|
return error;
|
|
2747
2749
|
}
|
|
2748
2750
|
);
|
|
2749
|
-
this.instance.interceptors.request.use((_e = this.interceptors) == null ? void 0 : _e.requestInterceptor, (_f = this.interceptors) == null ? void 0 : _f.requestInterceptorCatch);
|
|
2750
2751
|
this.instance.interceptors.response.use(
|
|
2751
2752
|
(response) => {
|
|
2752
2753
|
const commonStore = useCommonStoreWithOut();
|
|
@@ -8471,14 +8472,23 @@ const DEFAULT_TEMPORAL_PATTERNS = {
|
|
|
8471
8472
|
datetime: DEFAULT_DATETIME_FORMAT
|
|
8472
8473
|
};
|
|
8473
8474
|
const INTL_MAX_FRACTION_DIGITS = 20;
|
|
8474
|
-
function resolvePlaceholder() {
|
|
8475
|
-
return DEFAULT_PLACEHOLDER;
|
|
8475
|
+
function resolvePlaceholder(emptyPlaceholder) {
|
|
8476
|
+
return emptyPlaceholder ?? DEFAULT_PLACEHOLDER;
|
|
8476
8477
|
}
|
|
8477
8478
|
function isEmptyCellValue(value) {
|
|
8478
8479
|
if (value === null || value === void 0) return true;
|
|
8479
8480
|
if (value === "") return true;
|
|
8480
8481
|
return false;
|
|
8481
8482
|
}
|
|
8483
|
+
function isEmptyTemporalValue(value) {
|
|
8484
|
+
if (isEmptyCellValue(value)) return true;
|
|
8485
|
+
if (value === 0 || value === "0") return true;
|
|
8486
|
+
if (typeof value === "string" && value.trim() === "") return true;
|
|
8487
|
+
return false;
|
|
8488
|
+
}
|
|
8489
|
+
function isTemporalFormatType(type) {
|
|
8490
|
+
return type === "date" || type === "time" || type === "datetime";
|
|
8491
|
+
}
|
|
8482
8492
|
function preserveRawCellValue(value) {
|
|
8483
8493
|
if (value === null || value === void 0) return "";
|
|
8484
8494
|
return String(value);
|
|
@@ -8548,6 +8558,7 @@ function resolveNumberPrecision(precision) {
|
|
|
8548
8558
|
};
|
|
8549
8559
|
}
|
|
8550
8560
|
function formatTemporalValue(value, temporalType, options) {
|
|
8561
|
+
if (isEmptyTemporalValue(value)) return "";
|
|
8551
8562
|
const d = coerceToValidDate(value, DEFAULT_DATE_MIN_YEAR, DEFAULT_DATE_MAX_YEAR);
|
|
8552
8563
|
if (!d) return preserveRawCellValue(value);
|
|
8553
8564
|
try {
|
|
@@ -8607,7 +8618,10 @@ function formatCellValueCore(value, options) {
|
|
|
8607
8618
|
const n = coerceFiniteNumber(value);
|
|
8608
8619
|
if (n === null) return preserveRawCellValue(value);
|
|
8609
8620
|
try {
|
|
8610
|
-
return new Intl.NumberFormat(void 0,
|
|
8621
|
+
return new Intl.NumberFormat(void 0, {
|
|
8622
|
+
...resolveNumberPrecision(options.precision),
|
|
8623
|
+
...options.useGrouping !== void 0 ? { useGrouping: options.useGrouping } : {}
|
|
8624
|
+
}).format(n);
|
|
8611
8625
|
} catch {
|
|
8612
8626
|
return preserveRawCellValue(value);
|
|
8613
8627
|
}
|
|
@@ -8654,9 +8668,13 @@ function formatCellValueCore(value, options) {
|
|
|
8654
8668
|
return preserveRawCellValue(value);
|
|
8655
8669
|
}
|
|
8656
8670
|
}
|
|
8657
|
-
function formatCellValue(value, options) {
|
|
8671
|
+
function formatCellValue(value, options, emptyPlaceholder = DEFAULT_PLACEHOLDER) {
|
|
8672
|
+
const placeholder = resolvePlaceholder(emptyPlaceholder);
|
|
8658
8673
|
if (isEmptyCellValue(value)) {
|
|
8659
|
-
return
|
|
8674
|
+
return placeholder;
|
|
8675
|
+
}
|
|
8676
|
+
if (isTemporalFormatType(options.type) && isEmptyTemporalValue(value)) {
|
|
8677
|
+
return placeholder;
|
|
8660
8678
|
}
|
|
8661
8679
|
return formatCellValueCore(value, options);
|
|
8662
8680
|
}
|