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