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