bkui-vue 0.0.1-beta.18 → 0.0.1-beta.19
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/bkui-vue.cjs.js +452 -405
- package/dist/bkui-vue.esm.js +451 -403
- package/dist/bkui-vue.umd.js +452 -405
- package/lib/badge/badge.d.ts +1 -1
- package/lib/badge/index.d.ts +4 -4
- package/lib/breadcrumb/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts +5 -5
- package/lib/button/button.d.ts +1 -1
- package/lib/button/index.d.ts +4 -4
- package/lib/date-picker/date-picker.d.ts +2 -2
- package/lib/date-picker/index.d.ts +7 -7
- package/lib/date-picker/index.js +1 -1
- package/lib/dialog/dialog.d.ts +12 -3
- package/lib/dialog/index.d.ts +27 -8
- package/lib/dialog/index.js +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/divider/divider.d.ts +1 -1
- package/lib/divider/index.d.ts +4 -4
- package/lib/exception/exception.d.ts +1 -1
- package/lib/exception/index.d.ts +4 -4
- package/lib/form/form-item.d.ts +2 -2
- package/lib/form/index.d.ts +2 -2
- package/lib/input/index.d.ts +4 -4
- package/lib/input/input.d.ts +1 -1
- package/lib/modal/index.d.ts +24 -1
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +9 -0
- package/lib/modal/props.mixin.d.ts +4 -0
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/popover/index.d.ts +7 -7
- package/lib/popover/popover.d.ts +2 -2
- package/lib/progress/index.d.ts +10 -10
- package/lib/progress/progress.d.ts +3 -3
- package/lib/shared/bk-mask-manager.d.ts +32 -3
- package/lib/shared/bk-pop-manager.d.ts +8 -1
- package/lib/shared/index.js +1 -1
- package/lib/shared/vue-types.d.ts +2 -6
- package/lib/sideslider/index.d.ts +23 -4
- package/lib/sideslider/sideslider.d.ts +10 -1
- package/lib/steps/index.d.ts +4 -4
- package/lib/steps/steps.d.ts +1 -1
- package/lib/tab/index.d.ts +4 -4
- package/lib/tab/tab.d.ts +1 -1
- package/lib/table/index.d.ts +4 -4
- package/lib/table/index.js +1 -1
- package/lib/table/table.d.ts +3 -3
- package/lib/table/utils.d.ts +6 -0
- package/lib/tree/index.d.ts +4 -4
- package/lib/tree/tree.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +7 -7
- package/lib/virtual-render/virtual-render.d.ts +2 -2
- package/package.json +46 -46
package/dist/bkui-vue.umd.js
CHANGED
@@ -37,68 +37,57 @@ var __publicField = (obj, key, value) => {
|
|
37
37
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue")) : typeof define === "function" && define.amd ? define(["exports", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.bkuiVue = {}, global.Vue));
|
38
38
|
})(this, function(exports2, vue) {
|
39
39
|
"use strict";
|
40
|
-
var reset = "
|
41
|
-
var alert = "
|
42
|
-
var backtop = "
|
43
|
-
var badge = "
|
44
|
-
var breadcrumb = "
|
45
|
-
var button = "
|
46
|
-
var card = "
|
47
|
-
var checkbox = "
|
48
|
-
var collapse = "
|
49
|
-
var dialog = "
|
50
|
-
var exception = "
|
51
|
-
var fixedNavbar = "
|
52
|
-
var input = "
|
53
|
-
var link = "
|
54
|
-
var dropdown = "
|
55
|
-
var loading = "
|
56
|
-
var modal = "
|
57
|
-
var popover = "
|
58
|
-
var progress = "
|
59
|
-
var radio = "
|
60
|
-
var rate = "
|
61
|
-
var star$1 = "
|
62
|
-
var select = "
|
63
|
-
var sideslider = "
|
64
|
-
var switcher = "
|
65
|
-
var table = "
|
40
|
+
var reset = "";
|
41
|
+
var alert = "";
|
42
|
+
var backtop = "";
|
43
|
+
var badge = "";
|
44
|
+
var breadcrumb = "";
|
45
|
+
var button = "";
|
46
|
+
var card = "";
|
47
|
+
var checkbox = "";
|
48
|
+
var collapse = "";
|
49
|
+
var dialog = "";
|
50
|
+
var exception = "";
|
51
|
+
var fixedNavbar = "";
|
52
|
+
var input = "";
|
53
|
+
var link = "";
|
54
|
+
var dropdown = "";
|
55
|
+
var loading = "";
|
56
|
+
var modal = "";
|
57
|
+
var popover = "";
|
58
|
+
var progress = "";
|
59
|
+
var radio = "";
|
60
|
+
var rate = "";
|
61
|
+
var star$1 = "";
|
62
|
+
var select = "";
|
63
|
+
var sideslider = "";
|
64
|
+
var switcher = "";
|
65
|
+
var table = "";
|
66
66
|
var tag = "";
|
67
|
-
var form = "
|
68
|
-
var steps = "
|
69
|
-
var message = "
|
70
|
-
var notify = "
|
71
|
-
var tree = "
|
72
|
-
var slider = "
|
73
|
-
var menu = "
|
74
|
-
var navigation = "
|
75
|
-
var datePicker = "
|
76
|
-
var divider = "
|
77
|
-
var tab = "
|
78
|
-
var process = "
|
79
|
-
var virtualRender$1 = "
|
80
|
-
var pagination = "
|
81
|
-
var timeline = "
|
82
|
-
var BKLAYERTYPE;
|
83
|
-
(function(BKLAYERTYPE2) {
|
84
|
-
BKLAYERTYPE2["BOTTOM"] = "bottom";
|
85
|
-
BKLAYERTYPE2["CONTENT"] = "content";
|
86
|
-
BKLAYERTYPE2["NAVI"] = "navi";
|
87
|
-
BKLAYERTYPE2["FULLSCREEN"] = "fullScreen";
|
88
|
-
BKLAYERTYPE2["PLUGINS"] = "plugins";
|
89
|
-
BKLAYERTYPE2["MODAL"] = "modal";
|
90
|
-
BKLAYERTYPE2["MESSAGE"] = "message";
|
91
|
-
BKLAYERTYPE2["POPPER"] = "popper";
|
92
|
-
})(BKLAYERTYPE || (BKLAYERTYPE = {}));
|
67
|
+
var form = "";
|
68
|
+
var steps = "";
|
69
|
+
var message = "";
|
70
|
+
var notify = "";
|
71
|
+
var tree = "";
|
72
|
+
var slider = "";
|
73
|
+
var menu = "";
|
74
|
+
var navigation = "";
|
75
|
+
var datePicker = "";
|
76
|
+
var divider = "";
|
77
|
+
var tab = "";
|
78
|
+
var process = "";
|
79
|
+
var virtualRender$1 = "";
|
80
|
+
var pagination = "";
|
81
|
+
var timeline = "";
|
93
82
|
const BKLAYERD_INDEX_EFAULT_VALUE = {
|
94
|
-
[
|
95
|
-
[
|
96
|
-
[
|
97
|
-
[
|
98
|
-
[
|
99
|
-
[
|
100
|
-
[
|
101
|
-
[
|
83
|
+
["bottom"]: 0,
|
84
|
+
["content"]: 1,
|
85
|
+
["navi"]: 100,
|
86
|
+
["fullScreen"]: 1e3,
|
87
|
+
["modal"]: 3e3,
|
88
|
+
["plugins"]: 8e3,
|
89
|
+
["message"]: 1e4,
|
90
|
+
["popper"]: 99999
|
102
91
|
};
|
103
92
|
class BKZIndexManager {
|
104
93
|
constructor() {
|
@@ -110,20 +99,20 @@ var __publicField = (obj, key, value) => {
|
|
110
99
|
this.storageLayerIndexValue[type] = this.storageLayerIndexValue[type] + 1;
|
111
100
|
return this.storageLayerIndexValue[type];
|
112
101
|
}
|
113
|
-
this.storageLayerIndexValue[
|
114
|
-
return this.storageLayerIndexValue[
|
102
|
+
this.storageLayerIndexValue["modal"] = this.storageLayerIndexValue["modal"] + 1;
|
103
|
+
return this.storageLayerIndexValue["modal"];
|
115
104
|
}
|
116
105
|
getModalNextIndex() {
|
117
|
-
return this.getNextIndex(
|
106
|
+
return this.getNextIndex("modal");
|
118
107
|
}
|
119
108
|
getMessageNextIndex() {
|
120
|
-
return this.getNextIndex(
|
109
|
+
return this.getNextIndex("message");
|
121
110
|
}
|
122
111
|
getFullScreenNextIndex() {
|
123
|
-
return this.getNextIndex(
|
112
|
+
return this.getNextIndex("fullScreen");
|
124
113
|
}
|
125
114
|
getNaviNextIndex() {
|
126
|
-
return this.getNextIndex(
|
115
|
+
return this.getNextIndex("navi");
|
127
116
|
}
|
128
117
|
getPopperIndex() {
|
129
118
|
return BKLAYERD_INDEX_EFAULT_VALUE.popper;
|
@@ -374,6 +363,9 @@ var __publicField = (obj, key, value) => {
|
|
374
363
|
}
|
375
364
|
}
|
376
365
|
var currentNode = getParentNode(element);
|
366
|
+
if (isShadowRoot(currentNode)) {
|
367
|
+
currentNode = currentNode.host;
|
368
|
+
}
|
377
369
|
while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
|
378
370
|
var css = getComputedStyle(currentNode);
|
379
371
|
if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox2 && css.willChange === "filter" || isFirefox2 && css.filter && css.filter !== "none") {
|
@@ -532,13 +524,13 @@ var __publicField = (obj, key, value) => {
|
|
532
524
|
offsetParent = offsetParent;
|
533
525
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
534
526
|
sideY = bottom;
|
535
|
-
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp];
|
527
|
+
var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp];
|
536
528
|
y2 -= offsetY - popperRect.height;
|
537
529
|
y2 *= gpuAcceleration ? 1 : -1;
|
538
530
|
}
|
539
531
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
540
532
|
sideX = right;
|
541
|
-
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp];
|
533
|
+
var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp];
|
542
534
|
x2 -= offsetX - popperRect.width;
|
543
535
|
x2 *= gpuAcceleration ? 1 : -1;
|
544
536
|
}
|
@@ -931,7 +923,7 @@ var __publicField = (obj, key, value) => {
|
|
931
923
|
}, []);
|
932
924
|
var referenceRect = state.rects.reference;
|
933
925
|
var popperRect = state.rects.popper;
|
934
|
-
var checksMap = new Map();
|
926
|
+
var checksMap = /* @__PURE__ */ new Map();
|
935
927
|
var makeFallbackChecks = true;
|
936
928
|
var firstFittingPlacement = placements2[0];
|
937
929
|
for (var i2 = 0; i2 < placements2.length; i2++) {
|
@@ -1260,8 +1252,8 @@ var __publicField = (obj, key, value) => {
|
|
1260
1252
|
};
|
1261
1253
|
}
|
1262
1254
|
function order(modifiers) {
|
1263
|
-
var map = new Map();
|
1264
|
-
var visited = new Set();
|
1255
|
+
var map = /* @__PURE__ */ new Map();
|
1256
|
+
var visited = /* @__PURE__ */ new Set();
|
1265
1257
|
var result = [];
|
1266
1258
|
modifiers.forEach(function(modifier) {
|
1267
1259
|
map.set(modifier.name, modifier);
|
@@ -1466,15 +1458,15 @@ var __publicField = (obj, key, value) => {
|
|
1466
1458
|
}
|
1467
1459
|
return false;
|
1468
1460
|
}
|
1469
|
-
function isObject(value) {
|
1461
|
+
function isObject$1(value) {
|
1470
1462
|
return value !== null && /^\[object (Object|Module)\]/.test(Object.prototype.toString.call(value));
|
1471
1463
|
}
|
1472
1464
|
function clone(source) {
|
1473
1465
|
if (isArray(source)) {
|
1474
1466
|
return source.map(clone);
|
1475
1467
|
}
|
1476
|
-
if (isObject(source)) {
|
1477
|
-
const target = Object.create(null);
|
1468
|
+
if (isObject$1(source)) {
|
1469
|
+
const target = /* @__PURE__ */ Object.create(null);
|
1478
1470
|
const keys = Object.keys(source);
|
1479
1471
|
const klen = keys.length;
|
1480
1472
|
let k2 = 0;
|
@@ -1494,7 +1486,7 @@ var __publicField = (obj, key, value) => {
|
|
1494
1486
|
}
|
1495
1487
|
const tval = target[key];
|
1496
1488
|
const sval = source[key];
|
1497
|
-
if (isObject(tval) && isObject(sval)) {
|
1489
|
+
if (isObject$1(tval) && isObject$1(sval)) {
|
1498
1490
|
merge$1(tval, sval, options);
|
1499
1491
|
} else {
|
1500
1492
|
target[key] = clone(sval);
|
@@ -1503,14 +1495,14 @@ var __publicField = (obj, key, value) => {
|
|
1503
1495
|
function merge$1(target, source, options) {
|
1504
1496
|
const sources = isArray(source) ? source : [source];
|
1505
1497
|
const ilen = sources.length;
|
1506
|
-
if (!isObject(target)) {
|
1498
|
+
if (!isObject$1(target)) {
|
1507
1499
|
return target;
|
1508
1500
|
}
|
1509
1501
|
options = options || {};
|
1510
1502
|
const merger = options.merger || mergerFn;
|
1511
1503
|
for (let i2 = 0; i2 < ilen; ++i2) {
|
1512
1504
|
source = sources[i2];
|
1513
|
-
if (!isObject(source)) {
|
1505
|
+
if (!isObject$1(source)) {
|
1514
1506
|
continue;
|
1515
1507
|
}
|
1516
1508
|
const keys = Object.keys(source);
|
@@ -1560,7 +1552,7 @@ var __publicField = (obj, key, value) => {
|
|
1560
1552
|
function isElement(obj) {
|
1561
1553
|
try {
|
1562
1554
|
return obj instanceof HTMLElement;
|
1563
|
-
} catch (
|
1555
|
+
} catch (e) {
|
1564
1556
|
return typeof obj === "object" && obj.nodeType === 1 && typeof obj.style === "object" && typeof obj.ownerDocument === "object";
|
1565
1557
|
}
|
1566
1558
|
}
|
@@ -1814,6 +1806,8 @@ var __publicField = (obj, key, value) => {
|
|
1814
1806
|
this.uniqueMaskAttrTag = "";
|
1815
1807
|
this.parentNode = document.body;
|
1816
1808
|
this.activeInstance = void 0;
|
1809
|
+
this.zIndexStore = /* @__PURE__ */ new Map();
|
1810
|
+
this.lastUUID = null;
|
1817
1811
|
this.maskStyle = {
|
1818
1812
|
position: "absolute",
|
1819
1813
|
left: 0,
|
@@ -1825,16 +1819,30 @@ var __publicField = (obj, key, value) => {
|
|
1825
1819
|
};
|
1826
1820
|
const { multiInstance = false, maskAttrTag = "auto", parentNode = document.body, maskStyle = {} } = config || {};
|
1827
1821
|
this.activeInstance = void 0;
|
1828
|
-
this.maskStyle = Object.assign({}, this.maskStyle, maskStyle);
|
1829
1822
|
this.multiInstance = multiInstance;
|
1830
1823
|
this.uniqueMaskAttrTag = this.getMaskAttrTag(maskAttrTag);
|
1831
1824
|
this.parentNode = parentNode || document;
|
1832
1825
|
this.mask = this.getMask();
|
1833
1826
|
this.backupMask = this.createMask("data-bk-backup-uid");
|
1834
|
-
this.setMaskStyle();
|
1827
|
+
this.setMaskStyle(Object.assign({}, this.maskStyle, maskStyle));
|
1835
1828
|
}
|
1836
|
-
show(content, zIndex) {
|
1829
|
+
show(content, zIndex, showMask = true, appendStyle = {}, uuid2 = null) {
|
1830
|
+
const uid = uuid2 != null ? uuid2 : random(16);
|
1837
1831
|
const localZIndex = /-?\d+/.test(`${zIndex}`) ? zIndex : bkZIndexManager.getModalNextIndex();
|
1832
|
+
let style = Object.assign({}, this.maskStyle, appendStyle || {});
|
1833
|
+
if (!showMask) {
|
1834
|
+
if (this.lastUUID) {
|
1835
|
+
const preStore = this.zIndexStore.get(this.lastUUID);
|
1836
|
+
style = preStore.style;
|
1837
|
+
}
|
1838
|
+
}
|
1839
|
+
this.storeMaskInsCfg({
|
1840
|
+
zIndex: localZIndex,
|
1841
|
+
style: __spreadValues({}, style),
|
1842
|
+
uuid: uid,
|
1843
|
+
preUID: this.lastUUID
|
1844
|
+
});
|
1845
|
+
this.setMaskStyle(style);
|
1838
1846
|
this.mask.style.setProperty("display", "block");
|
1839
1847
|
this.mask.style.setProperty("z-index", `${localZIndex}`);
|
1840
1848
|
this.backupMask.style.setProperty("z-index", `${localZIndex - 1}`);
|
@@ -1843,12 +1851,28 @@ var __publicField = (obj, key, value) => {
|
|
1843
1851
|
this.appendContentToMask(content);
|
1844
1852
|
}
|
1845
1853
|
}
|
1846
|
-
hide(content) {
|
1854
|
+
hide(content, uuid2) {
|
1847
1855
|
var _a;
|
1856
|
+
const uid = uuid2 != null ? uuid2 : this.lastUUID;
|
1848
1857
|
this.mask.style.setProperty("display", "none");
|
1849
1858
|
content == null ? void 0 : content.remove();
|
1850
1859
|
(_a = this.activeInstance) == null ? void 0 : _a.remove();
|
1851
1860
|
this.activeInstance = void 0;
|
1861
|
+
this.popIndexStore(uid);
|
1862
|
+
}
|
1863
|
+
storeMaskInsCfg(config) {
|
1864
|
+
this.zIndexStore.set(config.uuid, config);
|
1865
|
+
this.lastUUID = config.uuid;
|
1866
|
+
return this.zIndexStore.get(config.uuid);
|
1867
|
+
}
|
1868
|
+
popIndexStore(uuid2) {
|
1869
|
+
if (this.zIndexStore.has(uuid2)) {
|
1870
|
+
const rmIns = this.zIndexStore.get(uuid2);
|
1871
|
+
this.lastUUID = rmIns.preUID;
|
1872
|
+
return this.zIndexStore.delete(uuid2);
|
1873
|
+
}
|
1874
|
+
this.lastUUID = null;
|
1875
|
+
return false;
|
1852
1876
|
}
|
1853
1877
|
backupActiveInstance() {
|
1854
1878
|
if (this.activeInstance) {
|
@@ -1877,9 +1901,9 @@ var __publicField = (obj, key, value) => {
|
|
1877
1901
|
this.parentNode.append(div);
|
1878
1902
|
return div;
|
1879
1903
|
}
|
1880
|
-
setMaskStyle() {
|
1904
|
+
setMaskStyle(maskStyle = {}) {
|
1881
1905
|
if (this.mask) {
|
1882
|
-
Object.entries(
|
1906
|
+
Object.entries(maskStyle).forEach((cfg) => this.mask.style.setProperty(cfg[0], cfg[1]));
|
1883
1907
|
}
|
1884
1908
|
}
|
1885
1909
|
getMaskAttrTag(tag2) {
|
@@ -1898,7 +1922,7 @@ var __publicField = (obj, key, value) => {
|
|
1898
1922
|
this.popInstanceList = [];
|
1899
1923
|
this.uuidAttrName = "data-bk-pop-uuid";
|
1900
1924
|
}
|
1901
|
-
show(content) {
|
1925
|
+
show(content, showMask = true, appendStyle = {}) {
|
1902
1926
|
if (!content) {
|
1903
1927
|
console.warn("pop show error: content is null or undefined");
|
1904
1928
|
return;
|
@@ -1906,19 +1930,21 @@ var __publicField = (obj, key, value) => {
|
|
1906
1930
|
const zIndex = bkZIndexManager.getModalNextIndex();
|
1907
1931
|
const uuid2 = random(16);
|
1908
1932
|
content.setAttribute(this.uuidAttrName, uuid2);
|
1909
|
-
this.popInstanceList.push({ uuid: uuid2, zIndex, content });
|
1910
|
-
bKMaskManager.backupActiveInstance();
|
1911
|
-
bKMaskManager.show(content, zIndex);
|
1933
|
+
this.popInstanceList.push({ uuid: uuid2, zIndex, content, showMask, appendStyle });
|
1934
|
+
showMask && bKMaskManager.backupActiveInstance();
|
1935
|
+
bKMaskManager.show(content, zIndex, showMask, appendStyle, uuid2);
|
1912
1936
|
}
|
1913
1937
|
popHide(removeLastContent = true) {
|
1914
1938
|
if (this.popInstanceList.length) {
|
1915
1939
|
if (removeLastContent) {
|
1916
1940
|
const lastItem = this.popInstanceList.pop();
|
1941
|
+
bKMaskManager.popIndexStore(lastItem.uuid);
|
1917
1942
|
lastItem.remove();
|
1918
1943
|
}
|
1919
1944
|
if (this.popInstanceList.length) {
|
1920
1945
|
const activeItem = this.popInstanceList.slice(-1)[0];
|
1921
|
-
|
1946
|
+
const { zIndex, content, showMask, appendStyle, uuid: uuid2 } = activeItem;
|
1947
|
+
bKMaskManager.show(content, zIndex, showMask, appendStyle, uuid2);
|
1922
1948
|
} else {
|
1923
1949
|
bKMaskManager.hide();
|
1924
1950
|
}
|
@@ -1931,6 +1957,7 @@ var __publicField = (obj, key, value) => {
|
|
1931
1957
|
if (itemIndex >= 0) {
|
1932
1958
|
this.popInstanceList[itemIndex].content.remove();
|
1933
1959
|
this.popInstanceList.splice(itemIndex, 1);
|
1960
|
+
bKMaskManager.popIndexStore(uuid2);
|
1934
1961
|
if (!this.popInstanceList.length) {
|
1935
1962
|
bKMaskManager.hide();
|
1936
1963
|
} else {
|
@@ -1943,215 +1970,236 @@ var __publicField = (obj, key, value) => {
|
|
1943
1970
|
}
|
1944
1971
|
}
|
1945
1972
|
const bkPopIndexManager = new BKPopIndexManager();
|
1946
|
-
|
1947
|
-
|
1973
|
+
/*!
|
1974
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
1975
|
+
*
|
1976
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
1977
|
+
* Released under the MIT License.
|
1978
|
+
*/
|
1979
|
+
function isObject(o2) {
|
1980
|
+
return Object.prototype.toString.call(o2) === "[object Object]";
|
1981
|
+
}
|
1982
|
+
function isPlainObject(o2) {
|
1983
|
+
var ctor, prot;
|
1984
|
+
if (isObject(o2) === false)
|
1985
|
+
return false;
|
1986
|
+
ctor = o2.constructor;
|
1987
|
+
if (ctor === void 0)
|
1988
|
+
return true;
|
1989
|
+
prot = ctor.prototype;
|
1990
|
+
if (isObject(prot) === false)
|
1991
|
+
return false;
|
1992
|
+
if (prot.hasOwnProperty("isPrototypeOf") === false) {
|
1993
|
+
return false;
|
1994
|
+
}
|
1995
|
+
return true;
|
1996
|
+
}
|
1997
|
+
function t() {
|
1998
|
+
return t = Object.assign || function(e) {
|
1948
1999
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
1949
2000
|
var r2 = arguments[t2];
|
1950
2001
|
for (var n2 in r2)
|
1951
|
-
Object.prototype.hasOwnProperty.call(r2, n2) && (
|
2002
|
+
Object.prototype.hasOwnProperty.call(r2, n2) && (e[n2] = r2[n2]);
|
1952
2003
|
}
|
1953
|
-
return
|
1954
|
-
}
|
2004
|
+
return e;
|
2005
|
+
}, t.apply(this, arguments);
|
1955
2006
|
}
|
1956
|
-
function
|
1957
|
-
if (
|
2007
|
+
function r(e, t2) {
|
2008
|
+
if (e == null)
|
1958
2009
|
return {};
|
1959
|
-
var r2, n2,
|
1960
|
-
for (n2 = 0; n2 <
|
1961
|
-
t2.indexOf(r2 =
|
1962
|
-
return
|
2010
|
+
var r2, n2, i2 = {}, o2 = Object.keys(e);
|
2011
|
+
for (n2 = 0; n2 < o2.length; n2++)
|
2012
|
+
t2.indexOf(r2 = o2[n2]) >= 0 || (i2[r2] = e[r2]);
|
2013
|
+
return i2;
|
1963
2014
|
}
|
1964
|
-
function
|
1965
|
-
|
1966
|
-
}
|
1967
|
-
const n = { silent: false }, o = ["validator"], i$1 = Object.prototype, a = i$1.toString, s = i$1.hasOwnProperty, u = /^\s*function (\w+)/;
|
1968
|
-
function l(e2) {
|
2015
|
+
const n = { silent: false, logLevel: "warn" }, i$1 = ["validator"], o = Object.prototype, a = o.toString, s = o.hasOwnProperty, u = /^\s*function (\w+)/;
|
2016
|
+
function l(e) {
|
1969
2017
|
var t2;
|
1970
|
-
const r2 = (t2 =
|
2018
|
+
const r2 = (t2 = e == null ? void 0 : e.type) !== null && t2 !== void 0 ? t2 : e;
|
1971
2019
|
if (r2) {
|
1972
|
-
const
|
1973
|
-
return
|
2020
|
+
const e2 = r2.toString().match(u);
|
2021
|
+
return e2 ? e2[1] : "";
|
1974
2022
|
}
|
1975
2023
|
return "";
|
1976
2024
|
}
|
1977
|
-
const c =
|
1978
|
-
var t2, n2;
|
1979
|
-
return r(e2) !== false && ((t2 = e2.constructor) === void 0 || r(n2 = t2.prototype) !== false && n2.hasOwnProperty("isPrototypeOf") !== false);
|
1980
|
-
}, f = (e2) => e2;
|
2025
|
+
const c = isPlainObject, f = (e) => e;
|
1981
2026
|
let d = f;
|
1982
|
-
const p = (
|
1983
|
-
return typeof
|
1984
|
-
}, v = Array.isArray || function(
|
1985
|
-
return a.call(
|
1986
|
-
}, h = (
|
1987
|
-
function O(
|
1988
|
-
return Object.defineProperty(
|
1989
|
-
}
|
1990
|
-
function m(
|
1991
|
-
let n2,
|
1992
|
-
n2 = c(
|
2027
|
+
const p = (e, t2) => s.call(e, t2), y = Number.isInteger || function(e) {
|
2028
|
+
return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
|
2029
|
+
}, v = Array.isArray || function(e) {
|
2030
|
+
return a.call(e) === "[object Array]";
|
2031
|
+
}, h = (e) => a.call(e) === "[object Function]", b = (e) => c(e) && p(e, "_vueTypes_name"), g = (e) => c(e) && (p(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some((t2) => p(e, t2)));
|
2032
|
+
function O(e, t2) {
|
2033
|
+
return Object.defineProperty(e.bind(t2), "__original", { value: e });
|
2034
|
+
}
|
2035
|
+
function m(e, t2, r2 = false) {
|
2036
|
+
let n2, i2 = true, o2 = "";
|
2037
|
+
n2 = c(e) ? e : { type: e };
|
1993
2038
|
const a2 = b(n2) ? n2._vueTypes_name + " - " : "";
|
1994
2039
|
if (g(n2) && n2.type !== null) {
|
1995
2040
|
if (n2.type === void 0 || n2.type === true)
|
1996
|
-
return
|
2041
|
+
return i2;
|
1997
2042
|
if (!n2.required && t2 === void 0)
|
1998
|
-
return
|
1999
|
-
v(n2.type) ? (
|
2000
|
-
if (
|
2043
|
+
return i2;
|
2044
|
+
v(n2.type) ? (i2 = n2.type.some((e2) => m(e2, t2, true) === true), o2 = n2.type.map((e2) => l(e2)).join(" or ")) : (o2 = l(n2), i2 = o2 === "Array" ? v(t2) : o2 === "Object" ? c(t2) : o2 === "String" || o2 === "Number" || o2 === "Boolean" || o2 === "Function" ? function(e2) {
|
2045
|
+
if (e2 == null)
|
2001
2046
|
return "";
|
2002
|
-
const t3 =
|
2047
|
+
const t3 = e2.constructor.toString().match(u);
|
2003
2048
|
return t3 ? t3[1] : "";
|
2004
|
-
}(t2) ===
|
2049
|
+
}(t2) === o2 : t2 instanceof n2.type);
|
2005
2050
|
}
|
2006
|
-
if (!
|
2007
|
-
const
|
2008
|
-
return r2 === false ? (d(
|
2051
|
+
if (!i2) {
|
2052
|
+
const e2 = `${a2}value "${t2}" should be of type "${o2}"`;
|
2053
|
+
return r2 === false ? (d(e2), false) : e2;
|
2009
2054
|
}
|
2010
2055
|
if (p(n2, "validator") && h(n2.validator)) {
|
2011
|
-
const
|
2012
|
-
if (d = (
|
2013
|
-
|
2014
|
-
},
|
2015
|
-
const
|
2016
|
-
return
|
2056
|
+
const e2 = d, o3 = [];
|
2057
|
+
if (d = (e3) => {
|
2058
|
+
o3.push(e3);
|
2059
|
+
}, i2 = n2.validator(t2), d = e2, !i2) {
|
2060
|
+
const e3 = (o3.length > 1 ? "* " : "") + o3.join("\n* ");
|
2061
|
+
return o3.length = 0, r2 === false ? (d(e3), i2) : e3;
|
2017
2062
|
}
|
2018
2063
|
}
|
2019
|
-
return
|
2064
|
+
return i2;
|
2020
2065
|
}
|
2021
|
-
function j(
|
2022
|
-
const r2 = Object.defineProperties(t2, { _vueTypes_name: { value:
|
2066
|
+
function j(e, t2) {
|
2067
|
+
const r2 = Object.defineProperties(t2, { _vueTypes_name: { value: e, writable: true }, isRequired: { get() {
|
2023
2068
|
return this.required = true, this;
|
2024
|
-
} }, def: { value(
|
2025
|
-
return
|
2069
|
+
} }, def: { value(e2) {
|
2070
|
+
return e2 === void 0 ? (p(this, "default") && delete this.default, this) : h(e2) || m(this, e2, true) === true ? (this.default = v(e2) ? () => [...e2] : c(e2) ? () => Object.assign({}, e2) : e2, this) : (d(`${this._vueTypes_name} - invalid default value: "${e2}"`), this);
|
2026
2071
|
} } }), { validator: n2 } = r2;
|
2027
2072
|
return h(n2) && (r2.validator = O(n2, r2)), r2;
|
2028
2073
|
}
|
2029
|
-
function _(
|
2030
|
-
const r2 = j(
|
2031
|
-
return Object.defineProperty(r2, "validate", { value(
|
2074
|
+
function _(e, t2) {
|
2075
|
+
const r2 = j(e, t2);
|
2076
|
+
return Object.defineProperty(r2, "validate", { value(e2) {
|
2032
2077
|
return h(this.validator) && d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
|
2033
|
-
${JSON.stringify(this)}`), this.validator = O(
|
2078
|
+
${JSON.stringify(this)}`), this.validator = O(e2, this), this;
|
2034
2079
|
} });
|
2035
2080
|
}
|
2036
|
-
function T(
|
2037
|
-
const
|
2038
|
-
const
|
2039
|
-
return Object.getOwnPropertyNames(
|
2040
|
-
|
2041
|
-
}), Object.defineProperties({},
|
2042
|
-
}(
|
2043
|
-
if (
|
2044
|
-
return
|
2045
|
-
const { validator: a2 } = n2, s2 =
|
2081
|
+
function T(e, t2, n2) {
|
2082
|
+
const o2 = function(e2) {
|
2083
|
+
const t3 = {};
|
2084
|
+
return Object.getOwnPropertyNames(e2).forEach((r2) => {
|
2085
|
+
t3[r2] = Object.getOwnPropertyDescriptor(e2, r2);
|
2086
|
+
}), Object.defineProperties({}, t3);
|
2087
|
+
}(t2);
|
2088
|
+
if (o2._vueTypes_name = e, !c(n2))
|
2089
|
+
return o2;
|
2090
|
+
const { validator: a2 } = n2, s2 = r(n2, i$1);
|
2046
2091
|
if (h(a2)) {
|
2047
|
-
let { validator:
|
2048
|
-
|
2049
|
-
return
|
2050
|
-
} : a2,
|
2092
|
+
let { validator: e2 } = o2;
|
2093
|
+
e2 && (e2 = (l2 = (u2 = e2).__original) !== null && l2 !== void 0 ? l2 : u2), o2.validator = O(e2 ? function(t3) {
|
2094
|
+
return e2.call(this, t3) && a2.call(this, t3);
|
2095
|
+
} : a2, o2);
|
2051
2096
|
}
|
2052
2097
|
var u2, l2;
|
2053
|
-
return Object.assign(
|
2098
|
+
return Object.assign(o2, s2);
|
2054
2099
|
}
|
2055
|
-
function $(
|
2056
|
-
return
|
2100
|
+
function $(e) {
|
2101
|
+
return e.replace(/^(?!\s*$)/gm, " ");
|
2057
2102
|
}
|
2058
|
-
const w = () => _("any", {}), P = () => _("function", { type: Function }), x = () => _("boolean", { type: Boolean }), E = () => _("string", { type: String }), N = () => _("number", { type: Number }), q = () => _("array", { type: Array }), A = () => _("object", { type: Object }),
|
2059
|
-
function k(
|
2060
|
-
if (typeof
|
2103
|
+
const w = () => _("any", {}), P = () => _("function", { type: Function }), x = () => _("boolean", { type: Boolean }), E = () => _("string", { type: String }), N = () => _("number", { type: Number }), q = () => _("array", { type: Array }), A = () => _("object", { type: Object }), V = () => j("integer", { type: Number, validator: (e) => y(e) }), S = () => j("symbol", { validator: (e) => typeof e == "symbol" });
|
2104
|
+
function k(e, t2 = "custom validation failed") {
|
2105
|
+
if (typeof e != "function")
|
2061
2106
|
throw new TypeError("[VueTypes error]: You must provide a function as argument");
|
2062
|
-
return j(
|
2063
|
-
const n2 =
|
2107
|
+
return j(e.name || "<<anonymous function>>", { type: null, validator(r2) {
|
2108
|
+
const n2 = e(r2);
|
2064
2109
|
return n2 || d(`${this._vueTypes_name} - ${t2}`), n2;
|
2065
2110
|
} });
|
2066
2111
|
}
|
2067
|
-
function D(
|
2068
|
-
if (!v(
|
2112
|
+
function D(e) {
|
2113
|
+
if (!v(e))
|
2069
2114
|
throw new TypeError("[VueTypes error]: You must provide an array as argument.");
|
2070
|
-
const t2 = `oneOf - value should be one of "${
|
2115
|
+
const t2 = `oneOf - value should be one of "${e.join('", "')}".`, r2 = e.reduce((e2, t3) => {
|
2071
2116
|
if (t3 != null) {
|
2072
2117
|
const r3 = t3.constructor;
|
2073
|
-
|
2118
|
+
e2.indexOf(r3) === -1 && e2.push(r3);
|
2074
2119
|
}
|
2075
|
-
return
|
2120
|
+
return e2;
|
2076
2121
|
}, []);
|
2077
2122
|
return j("oneOf", { type: r2.length > 0 ? r2 : void 0, validator(r3) {
|
2078
|
-
const n2 =
|
2123
|
+
const n2 = e.indexOf(r3) !== -1;
|
2079
2124
|
return n2 || d(t2), n2;
|
2080
2125
|
} });
|
2081
2126
|
}
|
2082
|
-
function
|
2083
|
-
if (!v(
|
2127
|
+
function L(e) {
|
2128
|
+
if (!v(e))
|
2084
2129
|
throw new TypeError("[VueTypes error]: You must provide an array as argument");
|
2085
2130
|
let t2 = false, r2 = [];
|
2086
|
-
for (let
|
2087
|
-
const
|
2088
|
-
if (g(
|
2089
|
-
if (b(
|
2090
|
-
r2 = r2.concat(
|
2131
|
+
for (let n3 = 0; n3 < e.length; n3 += 1) {
|
2132
|
+
const i2 = e[n3];
|
2133
|
+
if (g(i2)) {
|
2134
|
+
if (b(i2) && i2._vueTypes_name === "oneOf" && i2.type) {
|
2135
|
+
r2 = r2.concat(i2.type);
|
2091
2136
|
continue;
|
2092
2137
|
}
|
2093
|
-
if (h(
|
2094
|
-
|
2138
|
+
if (h(i2.validator) && (t2 = true), i2.type === true || !i2.type) {
|
2139
|
+
d('oneOfType - invalid usage of "true" or "null" as types.');
|
2095
2140
|
continue;
|
2096
2141
|
}
|
2097
|
-
|
2098
|
-
|
2142
|
+
r2 = r2.concat(i2.type);
|
2143
|
+
} else
|
2144
|
+
r2.push(i2);
|
2099
2145
|
}
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2146
|
+
r2 = r2.filter((e2, t3) => r2.indexOf(e2) === t3);
|
2147
|
+
const n2 = r2.length > 0 ? r2 : null;
|
2148
|
+
return j("oneOfType", t2 ? { type: n2, validator(t3) {
|
2149
|
+
const r3 = [], n3 = e.some((e2) => {
|
2150
|
+
const n4 = m(b(e2) && e2._vueTypes_name === "oneOf" ? e2.type || null : e2, t3, true);
|
2151
|
+
return typeof n4 == "string" && r3.push(n4), n4 === true;
|
2104
2152
|
});
|
2105
|
-
return
|
2106
|
-
${$(r3.join("\n"))}`),
|
2107
|
-
} } : { type:
|
2153
|
+
return n3 || d(`oneOfType - provided value does not match any of the ${r3.length} passed-in validators:
|
2154
|
+
${$(r3.join("\n"))}`), n3;
|
2155
|
+
} } : { type: n2 });
|
2108
2156
|
}
|
2109
|
-
function
|
2157
|
+
function F(e) {
|
2110
2158
|
return j("arrayOf", { type: Array, validator(t2) {
|
2111
2159
|
let r2 = "";
|
2112
|
-
const n2 = t2.every((t3) => (r2 = m(
|
2160
|
+
const n2 = t2.every((t3) => (r2 = m(e, t3, true), r2 === true));
|
2113
2161
|
return n2 || d(`arrayOf - value validation error:
|
2114
2162
|
${$(r2)}`), n2;
|
2115
2163
|
} });
|
2116
2164
|
}
|
2117
|
-
function Y(
|
2118
|
-
return j("instanceOf", { type:
|
2165
|
+
function Y(e) {
|
2166
|
+
return j("instanceOf", { type: e });
|
2119
2167
|
}
|
2120
|
-
function B(
|
2168
|
+
function B(e) {
|
2121
2169
|
return j("objectOf", { type: Object, validator(t2) {
|
2122
2170
|
let r2 = "";
|
2123
|
-
const n2 = Object.keys(t2).every((n3) => (r2 = m(
|
2171
|
+
const n2 = Object.keys(t2).every((n3) => (r2 = m(e, t2[n3], true), r2 === true));
|
2124
2172
|
return n2 || d(`objectOf - value validation error:
|
2125
2173
|
${$(r2)}`), n2;
|
2126
2174
|
} });
|
2127
2175
|
}
|
2128
|
-
function I(
|
2129
|
-
const t2 = Object.keys(
|
2176
|
+
function I(e) {
|
2177
|
+
const t2 = Object.keys(e), r2 = t2.filter((t3) => {
|
2130
2178
|
var r3;
|
2131
|
-
return !((r3 =
|
2179
|
+
return !((r3 = e[t3]) === null || r3 === void 0 || !r3.required);
|
2132
2180
|
}), n2 = j("shape", { type: Object, validator(n3) {
|
2133
2181
|
if (!c(n3))
|
2134
2182
|
return false;
|
2135
|
-
const
|
2136
|
-
if (r2.length > 0 && r2.some((
|
2137
|
-
const
|
2138
|
-
return d(
|
2183
|
+
const i2 = Object.keys(n3);
|
2184
|
+
if (r2.length > 0 && r2.some((e2) => i2.indexOf(e2) === -1)) {
|
2185
|
+
const e2 = r2.filter((e3) => i2.indexOf(e3) === -1);
|
2186
|
+
return d(e2.length === 1 ? `shape - required property "${e2[0]}" is not defined.` : `shape - required properties "${e2.join('", "')}" are not defined.`), false;
|
2139
2187
|
}
|
2140
|
-
return
|
2188
|
+
return i2.every((r3) => {
|
2141
2189
|
if (t2.indexOf(r3) === -1)
|
2142
2190
|
return this._vueTypes_isLoose === true || (d(`shape - shape definition does not include a "${r3}" property. Allowed keys: "${t2.join('", "')}".`), false);
|
2143
|
-
const
|
2144
|
-
return typeof
|
2145
|
-
${$(
|
2191
|
+
const i3 = m(e[r3], n3[r3], true);
|
2192
|
+
return typeof i3 == "string" && d(`shape - "${r3}" property validation error:
|
2193
|
+
${$(i3)}`), i3 === true;
|
2146
2194
|
});
|
2147
2195
|
} });
|
2148
2196
|
return Object.defineProperty(n2, "_vueTypes_isLoose", { writable: true, value: false }), Object.defineProperty(n2, "loose", { get() {
|
2149
2197
|
return this._vueTypes_isLoose = true, this;
|
2150
2198
|
} }), n2;
|
2151
2199
|
}
|
2152
|
-
const J = ["name", "validate", "getter"], M = (() => {
|
2153
|
-
var
|
2154
|
-
return
|
2200
|
+
const J = ["name", "validate", "getter"], M = /* @__PURE__ */ (() => {
|
2201
|
+
var e, t2;
|
2202
|
+
return t2 = e = class {
|
2155
2203
|
static get any() {
|
2156
2204
|
return w();
|
2157
2205
|
}
|
@@ -2174,62 +2222,50 @@ ${$(r2)}`), n2;
|
|
2174
2222
|
return A().def(this.defaults.object);
|
2175
2223
|
}
|
2176
2224
|
static get integer() {
|
2177
|
-
return
|
2225
|
+
return V().def(this.defaults.integer);
|
2178
2226
|
}
|
2179
2227
|
static get symbol() {
|
2180
|
-
return
|
2181
|
-
}
|
2182
|
-
static extend(
|
2183
|
-
if (v(
|
2184
|
-
return
|
2185
|
-
const { name:
|
2186
|
-
if (p(this,
|
2187
|
-
throw new TypeError(`[VueTypes error]: Type "${
|
2188
|
-
const { type: a2 } =
|
2228
|
+
return S();
|
2229
|
+
}
|
2230
|
+
static extend(e2) {
|
2231
|
+
if (v(e2))
|
2232
|
+
return e2.forEach((e3) => this.extend(e3)), this;
|
2233
|
+
const { name: t3, validate: n2 = false, getter: i2 = false } = e2, o2 = r(e2, J);
|
2234
|
+
if (p(this, t3))
|
2235
|
+
throw new TypeError(`[VueTypes error]: Type "${t3}" already defined`);
|
2236
|
+
const { type: a2 } = o2;
|
2189
2237
|
if (b(a2))
|
2190
|
-
return delete
|
2191
|
-
const
|
2192
|
-
return
|
2238
|
+
return delete o2.type, Object.defineProperty(this, t3, i2 ? { get: () => T(t3, a2, o2) } : { value(...e3) {
|
2239
|
+
const r2 = T(t3, a2, o2);
|
2240
|
+
return r2.validator && (r2.validator = r2.validator.bind(r2, ...e3)), r2;
|
2193
2241
|
} });
|
2194
2242
|
let s2;
|
2195
|
-
return s2 =
|
2196
|
-
const
|
2197
|
-
return n2 ? _(
|
2198
|
-
}, enumerable: true } : { value(...
|
2199
|
-
const
|
2200
|
-
let
|
2201
|
-
return
|
2202
|
-
}, enumerable: true }, Object.defineProperty(this,
|
2203
|
-
}
|
2204
|
-
},
|
2243
|
+
return s2 = i2 ? { get() {
|
2244
|
+
const e3 = Object.assign({}, o2);
|
2245
|
+
return n2 ? _(t3, e3) : j(t3, e3);
|
2246
|
+
}, enumerable: true } : { value(...e3) {
|
2247
|
+
const r2 = Object.assign({}, o2);
|
2248
|
+
let i3;
|
2249
|
+
return i3 = n2 ? _(t3, r2) : j(t3, r2), r2.validator && (i3.validator = r2.validator.bind(i3, ...e3)), i3;
|
2250
|
+
}, enumerable: true }, Object.defineProperty(this, t3, s2);
|
2251
|
+
}
|
2252
|
+
}, e.defaults = {}, e.sensibleDefaults = void 0, e.config = n, e.custom = k, e.oneOf = D, e.instanceOf = Y, e.oneOfType = L, e.arrayOf = F, e.objectOf = B, e.shape = I, e.utils = { validate: (e2, t3) => m(t3, e2, true) === true, toType: (e2, t3, r2 = false) => r2 ? _(e2, t3) : j(e2, t3) }, t2;
|
2205
2253
|
})();
|
2206
|
-
function R(
|
2254
|
+
function R(e = { func: () => {
|
2207
2255
|
}, bool: true, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
|
2208
2256
|
var r2, n2;
|
2209
2257
|
return n2 = r2 = class extends M {
|
2210
2258
|
static get sensibleDefaults() {
|
2211
|
-
return
|
2259
|
+
return t({}, this.defaults);
|
2212
2260
|
}
|
2213
2261
|
static set sensibleDefaults(r3) {
|
2214
|
-
this.defaults = r3 !== false ?
|
2262
|
+
this.defaults = r3 !== false ? t({}, r3 !== true ? r3 : e) : {};
|
2215
2263
|
}
|
2216
|
-
}, r2.defaults =
|
2264
|
+
}, r2.defaults = t({}, e), n2;
|
2217
2265
|
}
|
2218
2266
|
class z extends R() {
|
2219
2267
|
}
|
2220
2268
|
const propTypesNS = R({});
|
2221
|
-
var Size;
|
2222
|
-
(function(Size2) {
|
2223
|
-
Size2["Small"] = "small";
|
2224
|
-
Size2["Large"] = "large";
|
2225
|
-
})(Size || (Size = {}));
|
2226
|
-
var Placements;
|
2227
|
-
(function(Placements2) {
|
2228
|
-
Placements2["Top"] = "top";
|
2229
|
-
Placements2["Left"] = "left";
|
2230
|
-
Placements2["Right"] = "right";
|
2231
|
-
Placements2["Bottom"] = "bottom";
|
2232
|
-
})(Placements || (Placements = {}));
|
2233
2269
|
class PropTypes extends propTypesNS {
|
2234
2270
|
static size(sizes = ["small", "default", "large"]) {
|
2235
2271
|
return j("Size", {
|
@@ -2305,7 +2341,7 @@ ${$(r2)}`), n2;
|
|
2305
2341
|
function classes(dynamicCls, constCls = "") {
|
2306
2342
|
return Object.entries(dynamicCls).filter((entry) => entry[1]).map((entry) => entry[0]).join(" ").concat(constCls ? ` ${constCls}` : "");
|
2307
2343
|
}
|
2308
|
-
const EMPTY_OBJ = Object.create({});
|
2344
|
+
const EMPTY_OBJ = /* @__PURE__ */ Object.create({});
|
2309
2345
|
const isEmptyObj = (target) => Object.keys(target).length < 1;
|
2310
2346
|
const withInstall = (component) => {
|
2311
2347
|
component.install = function(app) {
|
@@ -3500,6 +3536,10 @@ ${$(r2)}`), n2;
|
|
3500
3536
|
scrollable: {
|
3501
3537
|
type: Boolean,
|
3502
3538
|
default: true
|
3539
|
+
},
|
3540
|
+
showMask: {
|
3541
|
+
type: Boolean,
|
3542
|
+
default: true
|
3503
3543
|
}
|
3504
3544
|
};
|
3505
3545
|
var Component$j = vue.defineComponent({
|
@@ -3534,7 +3574,11 @@ ${$(r2)}`), n2;
|
|
3534
3574
|
visible(val) {
|
3535
3575
|
if (val) {
|
3536
3576
|
this.$nextTick(() => {
|
3537
|
-
|
3577
|
+
const hideMaskStyle = {
|
3578
|
+
"background-color": "rgba(0,0,0,0)"
|
3579
|
+
};
|
3580
|
+
const appendStyle = this.showMask ? {} : hideMaskStyle;
|
3581
|
+
bkPopIndexManager.show(this.$el, this.showMask, appendStyle);
|
3538
3582
|
});
|
3539
3583
|
} else {
|
3540
3584
|
bkPopIndexManager.hide(this.$el);
|
@@ -3570,7 +3614,6 @@ ${$(r2)}`), n2;
|
|
3570
3614
|
BkModal,
|
3571
3615
|
BkButton
|
3572
3616
|
},
|
3573
|
-
emits: ["closed", "update:isShow"],
|
3574
3617
|
props: __spreadProps(__spreadValues({}, propsMixin$1), {
|
3575
3618
|
confirmText: {
|
3576
3619
|
type: String,
|
@@ -3580,7 +3623,7 @@ ${$(r2)}`), n2;
|
|
3580
3623
|
type: String,
|
3581
3624
|
default: "\u53D6\u6D88"
|
3582
3625
|
},
|
3583
|
-
|
3626
|
+
title: {
|
3584
3627
|
type: String,
|
3585
3628
|
default: "Title"
|
3586
3629
|
},
|
@@ -3609,6 +3652,7 @@ ${$(r2)}`), n2;
|
|
3609
3652
|
}
|
3610
3653
|
}
|
3611
3654
|
}),
|
3655
|
+
emits: ["closed", "update:isShow"],
|
3612
3656
|
methods: {
|
3613
3657
|
handleClose() {
|
3614
3658
|
this.$emit("update:isShow", false);
|
@@ -3629,7 +3673,7 @@ ${$(r2)}`), n2;
|
|
3629
3673
|
}, [vue.createVNode("span", {
|
3630
3674
|
"class": "bk-dialog-title",
|
3631
3675
|
"style": `text-align: ${this.headerAlign}`
|
3632
|
-
}, [(_c = (_b = (_a = this.$slots).header) == null ? void 0 : _b.call(_a)) != null ? _c : this.
|
3676
|
+
}, [(_c = (_b = (_a = this.$slots).header) == null ? void 0 : _b.call(_a)) != null ? _c : this.title])])]);
|
3633
3677
|
},
|
3634
3678
|
default: () => {
|
3635
3679
|
var _a, _b, _c;
|
@@ -3822,23 +3866,23 @@ ${$(r2)}`), n2;
|
|
3822
3866
|
ctx.emit("change", "");
|
3823
3867
|
ctx.emit("clear");
|
3824
3868
|
}
|
3825
|
-
function handleFocus(
|
3869
|
+
function handleFocus(e) {
|
3826
3870
|
isFocused.value = true;
|
3827
|
-
ctx.emit("focus",
|
3871
|
+
ctx.emit("focus", e);
|
3828
3872
|
}
|
3829
|
-
function handleBlur(
|
3873
|
+
function handleBlur(e) {
|
3830
3874
|
isFocused.value = false;
|
3831
|
-
ctx.emit("blur",
|
3875
|
+
ctx.emit("blur", e);
|
3832
3876
|
}
|
3833
|
-
function handleInput(
|
3834
|
-
ctx.emit("update:modelValue", isNumberInput.value ? +
|
3835
|
-
ctx.emit("input",
|
3877
|
+
function handleInput(e) {
|
3878
|
+
ctx.emit("update:modelValue", isNumberInput.value ? +e.target.value : e.target.value);
|
3879
|
+
ctx.emit("input", e.target.value);
|
3836
3880
|
}
|
3837
|
-
function handleKeydown(
|
3838
|
-
ctx.emit("keydown",
|
3881
|
+
function handleKeydown(e) {
|
3882
|
+
ctx.emit("keydown", e.target.value, e);
|
3839
3883
|
}
|
3840
|
-
function handleChange(
|
3841
|
-
ctx.emit("change",
|
3884
|
+
function handleChange(e) {
|
3885
|
+
ctx.emit("change", e.target.value, e);
|
3842
3886
|
}
|
3843
3887
|
function handleNumber(step, INC = true) {
|
3844
3888
|
const precision = Number.isInteger(props.precision) ? props.precision : 0;
|
@@ -3982,7 +4026,7 @@ ${$(r2)}`), n2;
|
|
3982
4026
|
props: PopoverProps,
|
3983
4027
|
setup(props, ctx) {
|
3984
4028
|
let isPopInstance = false;
|
3985
|
-
let popoverInstance = Object.create(null);
|
4029
|
+
let popoverInstance = /* @__PURE__ */ Object.create(null);
|
3986
4030
|
const {
|
3987
4031
|
width,
|
3988
4032
|
height,
|
@@ -4044,7 +4088,7 @@ ${$(r2)}`), n2;
|
|
4044
4088
|
if (instance.constructor) {
|
4045
4089
|
instance.isShow && instance.hide();
|
4046
4090
|
instance.destroy();
|
4047
|
-
popoverInstance = Object.create(null);
|
4091
|
+
popoverInstance = /* @__PURE__ */ Object.create(null);
|
4048
4092
|
}
|
4049
4093
|
};
|
4050
4094
|
const initPopInstance = () => {
|
@@ -4909,9 +4953,9 @@ ${$(r2)}`), n2;
|
|
4909
4953
|
const isFirefox = typeof navigator !== "undefined" && navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
|
4910
4954
|
const mousewheelHandler = function(element, callback) {
|
4911
4955
|
if (element == null ? void 0 : element.addEventListener) {
|
4912
|
-
element.addEventListener(isFirefox ? "DOMMouseScroll" : "mousewheel", function(
|
4913
|
-
const normalized = normalizeWheel(
|
4914
|
-
callback == null ? void 0 : callback.apply(this, [
|
4956
|
+
element.addEventListener(isFirefox ? "DOMMouseScroll" : "mousewheel", function(e) {
|
4957
|
+
const normalized = normalizeWheel(e);
|
4958
|
+
callback == null ? void 0 : callback.apply(this, [e, normalized]);
|
4915
4959
|
});
|
4916
4960
|
}
|
4917
4961
|
};
|
@@ -4921,7 +4965,7 @@ ${$(r2)}`), n2;
|
|
4921
4965
|
mousewheelHandler(el, binding.value);
|
4922
4966
|
}
|
4923
4967
|
};
|
4924
|
-
const nodeMap = new Map();
|
4968
|
+
const nodeMap = /* @__PURE__ */ new Map();
|
4925
4969
|
function parseBindingValue(value) {
|
4926
4970
|
const isTouch = "ontouchstart" in window || (navigator == null ? void 0 : navigator.maxTouchPoints) > 0;
|
4927
4971
|
const defaultOption = {
|
@@ -5009,7 +5053,7 @@ ${$(r2)}`), n2;
|
|
5009
5053
|
destroy(el);
|
5010
5054
|
}
|
5011
5055
|
};
|
5012
|
-
var popper = "
|
5056
|
+
var popper = "";
|
5013
5057
|
const tooltips = {
|
5014
5058
|
mounted(el, binding) {
|
5015
5059
|
const opts = initOptions();
|
@@ -5150,8 +5194,8 @@ ${$(r2)}`), n2;
|
|
5150
5194
|
} = vue.toRefs(props);
|
5151
5195
|
const states = vue.reactive({
|
5152
5196
|
currentPlaceholder: placeholder.value,
|
5153
|
-
options: new Set(),
|
5154
|
-
selectedOptions: new Set(),
|
5197
|
+
options: /* @__PURE__ */ new Set(),
|
5198
|
+
selectedOptions: /* @__PURE__ */ new Set(),
|
5155
5199
|
currentSelectedLabel: ""
|
5156
5200
|
});
|
5157
5201
|
const selectTriggerRef = vue.ref();
|
@@ -5172,8 +5216,8 @@ ${$(r2)}`), n2;
|
|
5172
5216
|
handleFocus,
|
5173
5217
|
handleBlur
|
5174
5218
|
} = useFocus();
|
5175
|
-
const handleInput = (
|
5176
|
-
searchKey.value =
|
5219
|
+
const handleInput = (e) => {
|
5220
|
+
searchKey.value = e.target.value;
|
5177
5221
|
};
|
5178
5222
|
const isDisabled = vue.computed(() => disabled.value || loading2.value);
|
5179
5223
|
const selectClass = vue.computed(() => ({
|
@@ -5245,8 +5289,8 @@ ${$(r2)}`), n2;
|
|
5245
5289
|
inputRef.value.focus();
|
5246
5290
|
handleResetState();
|
5247
5291
|
};
|
5248
|
-
const handleClear = (
|
5249
|
-
|
5292
|
+
const handleClear = (e) => {
|
5293
|
+
e.stopPropagation();
|
5250
5294
|
states.selectedOptions.clear();
|
5251
5295
|
emitChange(multiple.value ? [] : "");
|
5252
5296
|
hidePopover();
|
@@ -5261,8 +5305,8 @@ ${$(r2)}`), n2;
|
|
5261
5305
|
try {
|
5262
5306
|
searchLoading.value = true;
|
5263
5307
|
await remoteMethod.value(searchKey.value);
|
5264
|
-
} catch (
|
5265
|
-
console.error(
|
5308
|
+
} catch (e) {
|
5309
|
+
console.error(e);
|
5266
5310
|
} finally {
|
5267
5311
|
searchLoading.value = false;
|
5268
5312
|
}
|
@@ -5684,8 +5728,8 @@ ${$(r2)}`), n2;
|
|
5684
5728
|
emit("update:curStep", index);
|
5685
5729
|
emit("click", index);
|
5686
5730
|
}
|
5687
|
-
} catch (
|
5688
|
-
console.warn(
|
5731
|
+
} catch (e) {
|
5732
|
+
console.warn(e);
|
5689
5733
|
}
|
5690
5734
|
};
|
5691
5735
|
vue.onMounted(init2);
|
@@ -5886,7 +5930,7 @@ ${$(r2)}`), n2;
|
|
5886
5930
|
const resolvePropVal = (prop, key, args) => {
|
5887
5931
|
if (Object.prototype.hasOwnProperty.call(prop, key)) {
|
5888
5932
|
if (typeof prop[key] === "function") {
|
5889
|
-
return prop[key].call(
|
5933
|
+
return prop[key].call(globalThis, ...args);
|
5890
5934
|
}
|
5891
5935
|
return prop[key];
|
5892
5936
|
}
|
@@ -6000,6 +6044,7 @@ ${$(r2)}`), n2;
|
|
6000
6044
|
}
|
6001
6045
|
};
|
6002
6046
|
};
|
6047
|
+
const isPercentPixOrNumber = (val) => /^\d+\.?\d*(px|%)?$/.test(`${val}`);
|
6003
6048
|
class TablePlugins {
|
6004
6049
|
constructor(props, ctx) {
|
6005
6050
|
__publicField(this, "props", null);
|
@@ -6172,27 +6217,27 @@ ${$(r2)}`), n2;
|
|
6172
6217
|
typeof callback === "function" && callback(event, targetStartIndex, targetEndIndex, elScrollTop, translateY);
|
6173
6218
|
}
|
6174
6219
|
}
|
6175
|
-
function visibleRender(
|
6220
|
+
function visibleRender(e, wrapper, binding) {
|
6176
6221
|
const { lineHeight = 30, handleScrollCallback, pagination: pagination2 = {} } = binding.value;
|
6177
6222
|
const { startIndex, endIndex, groupItemCount, count, scrollTop } = pagination2;
|
6178
|
-
computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper,
|
6223
|
+
computedVirtualIndex(lineHeight, handleScrollCallback, { scrollTop, startIndex, endIndex, groupItemCount, count }, wrapper, e);
|
6179
6224
|
}
|
6180
|
-
const throttledRender = (delay = 60) => throttle((
|
6225
|
+
const throttledRender = (delay = 60) => throttle((e, wrapper, binding) => visibleRender(e, wrapper, binding), delay);
|
6181
6226
|
let cachedThrottle = null;
|
6182
|
-
const executeThrottledRender = (
|
6227
|
+
const executeThrottledRender = (e, wrapper, binding, delay = 60) => {
|
6183
6228
|
if (!cachedThrottle) {
|
6184
6229
|
cachedThrottle = throttledRender(delay);
|
6185
6230
|
}
|
6186
6231
|
if (typeof cachedThrottle === "function") {
|
6187
|
-
cachedThrottle.call(
|
6232
|
+
cachedThrottle.call(globalThis, e, wrapper, binding);
|
6188
6233
|
}
|
6189
6234
|
};
|
6190
6235
|
var virtualRender = {
|
6191
6236
|
mounted(el, binding) {
|
6192
6237
|
const wrapper = el.parentNode;
|
6193
6238
|
const { throttleDelay } = binding.value;
|
6194
|
-
wrapper.addEventListener("scroll", (
|
6195
|
-
executeThrottledRender(
|
6239
|
+
wrapper.addEventListener("scroll", (e) => {
|
6240
|
+
executeThrottledRender(e, wrapper, binding, throttleDelay);
|
6196
6241
|
});
|
6197
6242
|
},
|
6198
6243
|
updated(el, binding) {
|
@@ -6382,10 +6427,14 @@ ${$(r2)}`), n2;
|
|
6382
6427
|
const contentStyle = vue.computed(() => {
|
6383
6428
|
const resolveHeight = resolveNumberOrStringToPix(props.height);
|
6384
6429
|
const resolveHeadHeight = props.showHead ? resolveNumberOrStringToPix(props.headHeight) : "0";
|
6385
|
-
|
6386
|
-
|
6430
|
+
const isAutoHeight = !isPercentPixOrNumber(props.height);
|
6431
|
+
return __spreadValues({
|
6387
6432
|
display: "block"
|
6388
|
-
}
|
6433
|
+
}, isAutoHeight ? {
|
6434
|
+
maxHeight: `calc(${resolveHeight} - ${resolveHeadHeight} - 2px)`
|
6435
|
+
} : {
|
6436
|
+
height: `calc(${resolveHeight} - ${resolveHeadHeight} - 2px)`
|
6437
|
+
});
|
6389
6438
|
});
|
6390
6439
|
vue.watch(() => [props.activeColumn, props.columns], () => {
|
6391
6440
|
vue.nextTick(() => {
|
@@ -6540,8 +6589,8 @@ ${$(r2)}`), n2;
|
|
6540
6589
|
arr[a2] = arr[b2];
|
6541
6590
|
arr[b2] = swap;
|
6542
6591
|
},
|
6543
|
-
handleTabAdd(
|
6544
|
-
this.tabAdd(
|
6592
|
+
handleTabAdd(e) {
|
6593
|
+
this.tabAdd(e);
|
6545
6594
|
},
|
6546
6595
|
dragstart(index, $event) {
|
6547
6596
|
this.dragStartIndex = index;
|
@@ -6688,23 +6737,23 @@ ${$(r2)}`), n2;
|
|
6688
6737
|
"key": name,
|
6689
6738
|
"onClick": () => this.handleTabChange(name),
|
6690
6739
|
"draggable": getValue(item.sortable, sortable),
|
6691
|
-
"onDragstart": (
|
6692
|
-
"onDragenter": (
|
6693
|
-
|
6740
|
+
"onDragstart": (e) => dragstart(index, e),
|
6741
|
+
"onDragenter": (e) => {
|
6742
|
+
e.preventDefault();
|
6694
6743
|
dragenter(index);
|
6695
6744
|
},
|
6696
|
-
"onDragleave": (
|
6697
|
-
|
6745
|
+
"onDragleave": (e) => {
|
6746
|
+
e.preventDefault();
|
6698
6747
|
},
|
6699
|
-
"onDragover": (
|
6700
|
-
|
6748
|
+
"onDragover": (e) => {
|
6749
|
+
e.preventDefault();
|
6701
6750
|
},
|
6702
|
-
"onDragend": (
|
6703
|
-
|
6751
|
+
"onDragend": (e) => {
|
6752
|
+
e.preventDefault();
|
6704
6753
|
dragend();
|
6705
6754
|
},
|
6706
|
-
"onDrop": (
|
6707
|
-
|
6755
|
+
"onDrop": (e) => {
|
6756
|
+
e.preventDefault();
|
6708
6757
|
drop(index, sortType);
|
6709
6758
|
},
|
6710
6759
|
"class": getNavItemClass()
|
@@ -6785,12 +6834,12 @@ ${$(r2)}`), n2;
|
|
6785
6834
|
"drag"
|
6786
6835
|
],
|
6787
6836
|
methods: {
|
6788
|
-
tabAdd(
|
6837
|
+
tabAdd(e) {
|
6789
6838
|
this.$emit("add", {
|
6790
|
-
e
|
6839
|
+
e
|
6791
6840
|
});
|
6792
6841
|
this.$emit("add-panel", {
|
6793
|
-
e
|
6842
|
+
e
|
6794
6843
|
});
|
6795
6844
|
},
|
6796
6845
|
tabChange(name) {
|
@@ -7420,9 +7469,9 @@ ${$(r2)}`), n2;
|
|
7420
7469
|
key,
|
7421
7470
|
parentKey: parentInfo == null ? void 0 : parentInfo.key
|
7422
7471
|
});
|
7423
|
-
const handleClick = (
|
7472
|
+
const handleClick = (e) => {
|
7424
7473
|
handleActiveChange(key);
|
7425
|
-
emit("click",
|
7474
|
+
emit("click", e);
|
7426
7475
|
};
|
7427
7476
|
vue.onBeforeUnmount(() => unregisterMenuInfo(key));
|
7428
7477
|
return () => {
|
@@ -8280,62 +8329,6 @@ ${$(r2)}`), n2;
|
|
8280
8329
|
var amount = toInteger(dirtyAmount);
|
8281
8330
|
return addMilliseconds(dirtyDate, -amount);
|
8282
8331
|
}
|
8283
|
-
function addLeadingZeros(number, targetLength) {
|
8284
|
-
var sign = number < 0 ? "-" : "";
|
8285
|
-
var output = Math.abs(number).toString();
|
8286
|
-
while (output.length < targetLength) {
|
8287
|
-
output = "0" + output;
|
8288
|
-
}
|
8289
|
-
return sign + output;
|
8290
|
-
}
|
8291
|
-
var formatters$2 = {
|
8292
|
-
y: function(date, token2) {
|
8293
|
-
var signedYear = date.getUTCFullYear();
|
8294
|
-
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
8295
|
-
return addLeadingZeros(token2 === "yy" ? year % 100 : year, token2.length);
|
8296
|
-
},
|
8297
|
-
M: function(date, token2) {
|
8298
|
-
var month = date.getUTCMonth();
|
8299
|
-
return token2 === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
8300
|
-
},
|
8301
|
-
d: function(date, token2) {
|
8302
|
-
return addLeadingZeros(date.getUTCDate(), token2.length);
|
8303
|
-
},
|
8304
|
-
a: function(date, token2) {
|
8305
|
-
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
8306
|
-
switch (token2) {
|
8307
|
-
case "a":
|
8308
|
-
case "aa":
|
8309
|
-
return dayPeriodEnumValue.toUpperCase();
|
8310
|
-
case "aaa":
|
8311
|
-
return dayPeriodEnumValue;
|
8312
|
-
case "aaaaa":
|
8313
|
-
return dayPeriodEnumValue[0];
|
8314
|
-
case "aaaa":
|
8315
|
-
default:
|
8316
|
-
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
8317
|
-
}
|
8318
|
-
},
|
8319
|
-
h: function(date, token2) {
|
8320
|
-
return addLeadingZeros(date.getUTCHours() % 12 || 12, token2.length);
|
8321
|
-
},
|
8322
|
-
H: function(date, token2) {
|
8323
|
-
return addLeadingZeros(date.getUTCHours(), token2.length);
|
8324
|
-
},
|
8325
|
-
m: function(date, token2) {
|
8326
|
-
return addLeadingZeros(date.getUTCMinutes(), token2.length);
|
8327
|
-
},
|
8328
|
-
s: function(date, token2) {
|
8329
|
-
return addLeadingZeros(date.getUTCSeconds(), token2.length);
|
8330
|
-
},
|
8331
|
-
S: function(date, token2) {
|
8332
|
-
var numberOfDigits = token2.length;
|
8333
|
-
var milliseconds = date.getUTCMilliseconds();
|
8334
|
-
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
8335
|
-
return addLeadingZeros(fractionalSeconds, token2.length);
|
8336
|
-
}
|
8337
|
-
};
|
8338
|
-
var formatters$3 = formatters$2;
|
8339
8332
|
var MILLISECONDS_IN_DAY = 864e5;
|
8340
8333
|
function getUTCDayOfYear(dirtyDate) {
|
8341
8334
|
requiredArgs(1, arguments);
|
@@ -8412,7 +8405,7 @@ ${$(r2)}`), n2;
|
|
8412
8405
|
}
|
8413
8406
|
function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
8414
8407
|
requiredArgs(1, arguments);
|
8415
|
-
var date = toDate(dirtyDate
|
8408
|
+
var date = toDate(dirtyDate);
|
8416
8409
|
var year = date.getUTCFullYear();
|
8417
8410
|
var options = dirtyOptions || {};
|
8418
8411
|
var locale2 = options.locale;
|
@@ -8459,6 +8452,62 @@ ${$(r2)}`), n2;
|
|
8459
8452
|
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
8460
8453
|
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
8461
8454
|
}
|
8455
|
+
function addLeadingZeros(number, targetLength) {
|
8456
|
+
var sign = number < 0 ? "-" : "";
|
8457
|
+
var output = Math.abs(number).toString();
|
8458
|
+
while (output.length < targetLength) {
|
8459
|
+
output = "0" + output;
|
8460
|
+
}
|
8461
|
+
return sign + output;
|
8462
|
+
}
|
8463
|
+
var formatters$2 = {
|
8464
|
+
y: function(date, token2) {
|
8465
|
+
var signedYear = date.getUTCFullYear();
|
8466
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
8467
|
+
return addLeadingZeros(token2 === "yy" ? year % 100 : year, token2.length);
|
8468
|
+
},
|
8469
|
+
M: function(date, token2) {
|
8470
|
+
var month = date.getUTCMonth();
|
8471
|
+
return token2 === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
8472
|
+
},
|
8473
|
+
d: function(date, token2) {
|
8474
|
+
return addLeadingZeros(date.getUTCDate(), token2.length);
|
8475
|
+
},
|
8476
|
+
a: function(date, token2) {
|
8477
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
8478
|
+
switch (token2) {
|
8479
|
+
case "a":
|
8480
|
+
case "aa":
|
8481
|
+
return dayPeriodEnumValue.toUpperCase();
|
8482
|
+
case "aaa":
|
8483
|
+
return dayPeriodEnumValue;
|
8484
|
+
case "aaaaa":
|
8485
|
+
return dayPeriodEnumValue[0];
|
8486
|
+
case "aaaa":
|
8487
|
+
default:
|
8488
|
+
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
8489
|
+
}
|
8490
|
+
},
|
8491
|
+
h: function(date, token2) {
|
8492
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token2.length);
|
8493
|
+
},
|
8494
|
+
H: function(date, token2) {
|
8495
|
+
return addLeadingZeros(date.getUTCHours(), token2.length);
|
8496
|
+
},
|
8497
|
+
m: function(date, token2) {
|
8498
|
+
return addLeadingZeros(date.getUTCMinutes(), token2.length);
|
8499
|
+
},
|
8500
|
+
s: function(date, token2) {
|
8501
|
+
return addLeadingZeros(date.getUTCSeconds(), token2.length);
|
8502
|
+
},
|
8503
|
+
S: function(date, token2) {
|
8504
|
+
var numberOfDigits = token2.length;
|
8505
|
+
var milliseconds = date.getUTCMilliseconds();
|
8506
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
8507
|
+
return addLeadingZeros(fractionalSeconds, token2.length);
|
8508
|
+
}
|
8509
|
+
};
|
8510
|
+
var formatters$3 = formatters$2;
|
8462
8511
|
var dayPeriodEnum = {
|
8463
8512
|
am: "am",
|
8464
8513
|
pm: "pm",
|
@@ -9099,7 +9148,7 @@ ${$(r2)}`), n2;
|
|
9099
9148
|
}
|
9100
9149
|
}
|
9101
9150
|
function dateTimeLongFormatter(pattern, formatLong2) {
|
9102
|
-
var matchResult = pattern.match(/(P+)(p+)?/);
|
9151
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
9103
9152
|
var datePattern = matchResult[1];
|
9104
9153
|
var timePattern = matchResult[2];
|
9105
9154
|
if (!timePattern) {
|
@@ -9794,7 +9843,7 @@ ${$(r2)}`), n2;
|
|
9794
9843
|
setup(props, {
|
9795
9844
|
emit
|
9796
9845
|
}) {
|
9797
|
-
let popoverInstance = Object.create(null);
|
9846
|
+
let popoverInstance = /* @__PURE__ */ Object.create(null);
|
9798
9847
|
const refContentRef = vue.ref(null);
|
9799
9848
|
vue.onMounted(() => {
|
9800
9849
|
updateDropdown();
|
@@ -10391,8 +10440,8 @@ ${$(r2)}`), n2;
|
|
10391
10440
|
render() {
|
10392
10441
|
return vue.createVNode("div", {
|
10393
10442
|
"class": ["bk-picker-panel-body-wrapper", this.shortcuts.length ? "bk-picker-panel-with-sidebar" : ""],
|
10394
|
-
"onMousedown": (
|
10395
|
-
|
10443
|
+
"onMousedown": (e) => {
|
10444
|
+
e.preventDefault();
|
10396
10445
|
}
|
10397
10446
|
}, [this.shortcuts.length ? vue.createVNode("div", {
|
10398
10447
|
"class": "bk-picker-panel-sidebar"
|
@@ -10725,8 +10774,8 @@ ${$(r2)}`), n2;
|
|
10725
10774
|
render() {
|
10726
10775
|
return vue.createVNode("div", {
|
10727
10776
|
"class": ["bk-picker-panel-body-wrapper", "bk-date-picker-with-range", this.shortcuts.length || this.$slots.shortcuts ? "bk-picker-panel-with-sidebar" : ""],
|
10728
|
-
"onMousedown": (
|
10729
|
-
|
10777
|
+
"onMousedown": (e) => {
|
10778
|
+
e.preventDefault();
|
10730
10779
|
}
|
10731
10780
|
}, [vue.createVNode("div", {
|
10732
10781
|
"class": ["bk-picker-panel-body", this.showTime ? "bk-picker-panel-body-time" : "bk-picker-panel-body-date"]
|
@@ -11150,25 +11199,25 @@ ${$(r2)}`), n2;
|
|
11150
11199
|
});
|
11151
11200
|
});
|
11152
11201
|
const pickerPanelRef = vue.ref(null);
|
11153
|
-
const handleClose = (
|
11202
|
+
const handleClose = (e) => {
|
11154
11203
|
var _a;
|
11155
11204
|
if (state.disableCloseUnderTransfer) {
|
11156
11205
|
state.disableCloseUnderTransfer = false;
|
11157
11206
|
return false;
|
11158
11207
|
}
|
11159
|
-
if (
|
11160
|
-
|
11161
|
-
|
11208
|
+
if (e && e.type === "mousedown" && state.visible) {
|
11209
|
+
e.preventDefault();
|
11210
|
+
e.stopPropagation();
|
11162
11211
|
return;
|
11163
11212
|
}
|
11164
11213
|
if (state.visible) {
|
11165
11214
|
const pickerPanel = (_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.$el;
|
11166
|
-
if (
|
11215
|
+
if (e && pickerPanel && pickerPanel.contains(e.target)) {
|
11167
11216
|
return;
|
11168
11217
|
}
|
11169
11218
|
state.visible = false;
|
11170
|
-
|
11171
|
-
|
11219
|
+
e == null ? void 0 : e.preventDefault();
|
11220
|
+
e == null ? void 0 : e.stopPropagation();
|
11172
11221
|
return;
|
11173
11222
|
}
|
11174
11223
|
state.isFocused = false;
|
@@ -11187,9 +11236,9 @@ ${$(r2)}`), n2;
|
|
11187
11236
|
state.showClose = true;
|
11188
11237
|
}
|
11189
11238
|
};
|
11190
|
-
const handleInputMouseleave = (
|
11239
|
+
const handleInputMouseleave = (e) => {
|
11191
11240
|
var _a;
|
11192
|
-
if ((_a =
|
11241
|
+
if ((_a = e.toElement) == null ? void 0 : _a.classList.contains("clear-action")) {
|
11193
11242
|
return;
|
11194
11243
|
}
|
11195
11244
|
state.showClose = false;
|
@@ -11204,11 +11253,11 @@ ${$(r2)}`), n2;
|
|
11204
11253
|
}
|
11205
11254
|
});
|
11206
11255
|
};
|
11207
|
-
const handleInputChange = (
|
11256
|
+
const handleInputChange = (e) => {
|
11208
11257
|
var _a;
|
11209
11258
|
const isArrayValue = props.type.includes("range") || props.multiple;
|
11210
11259
|
const oldValue = visualValue.value;
|
11211
|
-
const newValue =
|
11260
|
+
const newValue = e.target.value;
|
11212
11261
|
const newDate = parseDate(newValue, props.type, props.multiple, props.format);
|
11213
11262
|
const valueToTest = isArrayValue ? newDate : newDate[0];
|
11214
11263
|
const isDisabled = (_a = props.disableDate) == null ? void 0 : _a.call(props, valueToTest);
|
@@ -11220,12 +11269,12 @@ ${$(r2)}`), n2;
|
|
11220
11269
|
state.forceInputRerender = state.forceInputRerender + 1;
|
11221
11270
|
}
|
11222
11271
|
};
|
11223
|
-
const handleFocus = (
|
11272
|
+
const handleFocus = (e) => {
|
11224
11273
|
if (props.readonly) {
|
11225
11274
|
return;
|
11226
11275
|
}
|
11227
11276
|
state.isFocused = true;
|
11228
|
-
if (
|
11277
|
+
if (e && e.type === "focus") {
|
11229
11278
|
return;
|
11230
11279
|
}
|
11231
11280
|
if (!props.disabled) {
|
@@ -11236,14 +11285,14 @@ ${$(r2)}`), n2;
|
|
11236
11285
|
var _a;
|
11237
11286
|
(_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.reset();
|
11238
11287
|
};
|
11239
|
-
const handleBlur = (
|
11288
|
+
const handleBlur = (e) => {
|
11240
11289
|
var _a;
|
11241
11290
|
if (state.internalFocus) {
|
11242
11291
|
state.internalFocus = false;
|
11243
11292
|
return;
|
11244
11293
|
}
|
11245
11294
|
if (state.visible) {
|
11246
|
-
|
11295
|
+
e.preventDefault();
|
11247
11296
|
return;
|
11248
11297
|
}
|
11249
11298
|
state.isFocused = false;
|
@@ -11252,19 +11301,19 @@ ${$(r2)}`), n2;
|
|
11252
11301
|
reset2();
|
11253
11302
|
(_a = pickerPanelRef == null ? void 0 : pickerPanelRef.value) == null ? void 0 : _a.onToggleVisibility(false);
|
11254
11303
|
};
|
11255
|
-
const handleKeydown = (
|
11304
|
+
const handleKeydown = (e) => {
|
11256
11305
|
const {
|
11257
11306
|
keyCode
|
11258
|
-
} =
|
11307
|
+
} = e;
|
11259
11308
|
if (keyCode === 9) {
|
11260
11309
|
if (state.visible) {
|
11261
|
-
|
11262
|
-
|
11310
|
+
e.stopPropagation();
|
11311
|
+
e.preventDefault();
|
11263
11312
|
if (isConfirm) {
|
11264
11313
|
const selector = ".bk-picker-confirm > *";
|
11265
11314
|
const tabbable = pickerDropdownRef.$el.querySelectorAll(selector);
|
11266
11315
|
state.internalFocus = true;
|
11267
|
-
const element = [...tabbable][
|
11316
|
+
const element = [...tabbable][e.shiftKey ? "pop" : "shift"]();
|
11268
11317
|
element.focus();
|
11269
11318
|
} else {
|
11270
11319
|
handleClose();
|
@@ -11278,7 +11327,7 @@ ${$(r2)}`), n2;
|
|
11278
11327
|
}
|
11279
11328
|
if (keyCode === 27) {
|
11280
11329
|
if (state.visible) {
|
11281
|
-
|
11330
|
+
e.stopPropagation();
|
11282
11331
|
handleClose();
|
11283
11332
|
}
|
11284
11333
|
}
|
@@ -11286,7 +11335,7 @@ ${$(r2)}`), n2;
|
|
11286
11335
|
return;
|
11287
11336
|
}
|
11288
11337
|
if (state.focusedTime.active) {
|
11289
|
-
|
11338
|
+
e.preventDefault();
|
11290
11339
|
}
|
11291
11340
|
};
|
11292
11341
|
const handleClear = () => {
|
@@ -11694,7 +11743,7 @@ ${$(r2)}`), n2;
|
|
11694
11743
|
return value;
|
11695
11744
|
}
|
11696
11745
|
if (typeof value === "function") {
|
11697
|
-
const txt = value.apply(
|
11746
|
+
const txt = value.apply(globalThis, [item, ...args]);
|
11698
11747
|
if (typeof txt === "string") {
|
11699
11748
|
return txt;
|
11700
11749
|
}
|
@@ -12244,9 +12293,8 @@ ${$(r2)}`), n2;
|
|
12244
12293
|
}
|
12245
12294
|
});
|
12246
12295
|
const BkForm = withInstallProps(Form, { FormItem });
|
12247
|
-
var components = /* @__PURE__ */ Object.freeze({
|
12296
|
+
var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
12248
12297
|
__proto__: null,
|
12249
|
-
[Symbol.toStringTag]: "Module",
|
12250
12298
|
Alert: BkAlert,
|
12251
12299
|
AnimateNumber: BkAnimateNumber,
|
12252
12300
|
Backtop: BkBacktop,
|
@@ -12292,7 +12340,7 @@ ${$(r2)}`), n2;
|
|
12292
12340
|
VirtualRender: BkVirtualRender,
|
12293
12341
|
Form: BkForm,
|
12294
12342
|
FormItem
|
12295
|
-
});
|
12343
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
12296
12344
|
const createInstall = (prefix = "Bk") => (app) => {
|
12297
12345
|
const pre = app.config.globalProperties.bkUIPrefix || prefix;
|
12298
12346
|
Object.keys(components).forEach((key) => {
|
@@ -12358,6 +12406,5 @@ ${$(r2)}`), n2;
|
|
12358
12406
|
exports2.clickoutside = clickoutside;
|
12359
12407
|
exports2["default"] = preset;
|
12360
12408
|
exports2.mousewheel = mousewheel;
|
12361
|
-
Object.
|
12362
|
-
exports2[Symbol.toStringTag] = "Module";
|
12409
|
+
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
12363
12410
|
});
|