bkui-vue 0.0.1-beta.444 → 0.0.1-beta.446
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/index.cjs.js +32 -32
- package/dist/index.esm.js +215 -66
- package/dist/index.umd.js +32 -32
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/dialog/dialog.d.ts +5 -9
- package/lib/dialog/index.d.ts +11 -19
- package/lib/dialog/props.d.ts +2 -4
- package/lib/modal/index.d.ts +24 -23
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +7 -9
- package/lib/modal/props.mixin.d.ts +2 -4
- package/lib/plugin-popover/index.js +1 -1
- package/lib/popover/index.js +1 -1
- package/lib/popover/utils.d.ts +5 -0
- package/lib/search-select/search-select.css +4 -1
- package/lib/search-select/search-select.less +5 -1
- package/lib/search-select/search-select.variable.css +4 -1
- package/lib/select/index.d.ts +11 -5
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +8 -2
- package/lib/select/select.d.ts +1 -1
- package/lib/shared/index.js +1 -1
- package/lib/shared/mask-manager.d.ts +7 -3
- package/lib/shared/pop-manager.d.ts +3 -1
- package/lib/sideslider/index.d.ts +11 -19
- package/lib/sideslider/sideslider.css +4 -3
- package/lib/sideslider/sideslider.d.ts +5 -9
- package/lib/sideslider/sideslider.less +4 -3
- package/lib/sideslider/sideslider.variable.css +4 -3
- package/lib/table/components/table-column.d.ts +125 -30
- package/lib/table/index.d.ts +375 -90
- package/lib/table/index.js +1 -1
- package/lib/table/props.d.ts +2 -1
- package/lib/table-column/index.d.ts +375 -90
- package/lib/table-column/index.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -5738,6 +5738,60 @@ class BKZIndexManager {
|
|
5738
5738
|
}
|
5739
5739
|
}
|
5740
5740
|
const bkZIndexManager = new BKZIndexManager();
|
5741
|
+
`__bk_mask_${random(16)}`;
|
5742
|
+
class MaskQueueMaker {
|
5743
|
+
constructor() {
|
5744
|
+
this.timer = null;
|
5745
|
+
this.store = [];
|
5746
|
+
this.maskMap = /* @__PURE__ */ new WeakMap();
|
5747
|
+
}
|
5748
|
+
appendMaker(fn2) {
|
5749
|
+
this.store.push(fn2);
|
5750
|
+
this.executeMaker();
|
5751
|
+
}
|
5752
|
+
pushMaskStyle(parentNode, style2) {
|
5753
|
+
const value = this.getMaskMap(parentNode);
|
5754
|
+
if (!(value == null ? void 0 : value.styles)) {
|
5755
|
+
this.setMaskMap(parentNode, __spreadValues({ styles: [style2] }, value || {}));
|
5756
|
+
} else {
|
5757
|
+
value.styles.push(style2);
|
5758
|
+
}
|
5759
|
+
}
|
5760
|
+
getMaskStyles(parentNode) {
|
5761
|
+
var _a;
|
5762
|
+
return ((_a = this.getMaskMap(parentNode)) == null ? void 0 : _a.styles) || [];
|
5763
|
+
}
|
5764
|
+
setMaskId(parentNode, id) {
|
5765
|
+
const value = this.getMaskMap(parentNode);
|
5766
|
+
if (!value) {
|
5767
|
+
this.setMaskMap(parentNode, __spreadValues({ id }, value || {}));
|
5768
|
+
} else {
|
5769
|
+
Object.assign(value, { id });
|
5770
|
+
this.setMaskMap(parentNode, value);
|
5771
|
+
}
|
5772
|
+
}
|
5773
|
+
getMaskId(parentNode) {
|
5774
|
+
var _a;
|
5775
|
+
return (_a = this.getMaskMap(parentNode)) == null ? void 0 : _a.id;
|
5776
|
+
}
|
5777
|
+
setMaskMap(key2, value) {
|
5778
|
+
this.maskMap.set(key2, value);
|
5779
|
+
}
|
5780
|
+
getMaskMap(key2) {
|
5781
|
+
return this.maskMap.get(key2);
|
5782
|
+
}
|
5783
|
+
executeMaker() {
|
5784
|
+
this.timer && cancelAnimationFrame(this.timer);
|
5785
|
+
this.timer = requestAnimationFrame(() => {
|
5786
|
+
const fn2 = this.store.pop();
|
5787
|
+
if (typeof fn2 === "function") {
|
5788
|
+
Reflect.apply(fn2, this, []);
|
5789
|
+
this.executeMaker();
|
5790
|
+
}
|
5791
|
+
});
|
5792
|
+
}
|
5793
|
+
}
|
5794
|
+
const bkMaskMaker = new MaskQueueMaker();
|
5741
5795
|
class BkMaskManager {
|
5742
5796
|
constructor(config) {
|
5743
5797
|
this.multiInstance = false;
|
@@ -5755,21 +5809,25 @@ class BkMaskManager {
|
|
5755
5809
|
display: "none",
|
5756
5810
|
"background-color": "rgba(0,0,0,.6)"
|
5757
5811
|
};
|
5812
|
+
this.isInit = false;
|
5813
|
+
this.maskAttrTag = "auto";
|
5758
5814
|
const { multiInstance = false, maskAttrTag = "auto", parentNode = document.body, maskStyle = {}, onClick = null } = config || {};
|
5815
|
+
this.maskAttrTag = maskAttrTag;
|
5759
5816
|
this.onClick = onClick;
|
5760
5817
|
this.activeInstance = void 0;
|
5761
5818
|
this.multiInstance = multiInstance;
|
5762
5819
|
this.uniqueMaskAttrTag = this.getMaskAttrTag(maskAttrTag);
|
5763
5820
|
this.parentNode = parentNode || document;
|
5764
|
-
|
5765
|
-
|
5766
|
-
|
5821
|
+
bkMaskMaker.appendMaker(() => {
|
5822
|
+
this.initInstance(maskStyle);
|
5823
|
+
});
|
5767
5824
|
}
|
5768
5825
|
setOption(option) {
|
5769
|
-
const { parentNode = document.body, maskStyle = {}, onClick = null } = option || {};
|
5826
|
+
const { parentNode = document.body, maskStyle = {}, onClick = null, maskAttrTag = this.maskAttrTag } = option || {};
|
5770
5827
|
this.onClick = onClick;
|
5771
5828
|
this.parentNode = parentNode || document;
|
5772
5829
|
this.setMaskStyle(Object.assign({}, this.maskStyle, maskStyle));
|
5830
|
+
this.uniqueMaskAttrTag = this.getMaskAttrTag(maskAttrTag);
|
5773
5831
|
}
|
5774
5832
|
show(content, zIndex, showMask = true, appendStyle = {}, uuid2 = null, transfer2 = false) {
|
5775
5833
|
const uid = uuid2 != null ? uuid2 : random(16);
|
@@ -5778,7 +5836,9 @@ class BkMaskManager {
|
|
5778
5836
|
if (!showMask) {
|
5779
5837
|
if (this.lastUUID) {
|
5780
5838
|
const preStore = this.zIndexStore.get(this.lastUUID);
|
5781
|
-
|
5839
|
+
if (preStore) {
|
5840
|
+
style2 = preStore == null ? void 0 : preStore.style;
|
5841
|
+
}
|
5782
5842
|
}
|
5783
5843
|
}
|
5784
5844
|
this.storeMaskInsCfg({
|
@@ -5787,10 +5847,14 @@ class BkMaskManager {
|
|
5787
5847
|
uuid: uid,
|
5788
5848
|
preUID: this.lastUUID
|
5789
5849
|
});
|
5850
|
+
Object.assign(style2, {
|
5851
|
+
display: "block",
|
5852
|
+
"z-index": `${localZIndex}`,
|
5853
|
+
"pointer-events": "all"
|
5854
|
+
});
|
5855
|
+
this.initInstance(style2);
|
5790
5856
|
this.setMaskStyle(style2);
|
5791
|
-
this.
|
5792
|
-
this.mask.style.setProperty("z-index", `${localZIndex}`);
|
5793
|
-
this.mask.style.setProperty("pointer-events", "all");
|
5857
|
+
bkMaskMaker.pushMaskStyle(this.parentNode, __spreadValues({}, style2));
|
5794
5858
|
this.backupMask.style.setProperty("z-index", `${localZIndex - 1}`);
|
5795
5859
|
if (!showMask) {
|
5796
5860
|
this.mask.style.setProperty("pointer-events", "none");
|
@@ -5800,20 +5864,26 @@ class BkMaskManager {
|
|
5800
5864
|
if (transfer2)
|
5801
5865
|
content.style.setProperty("z-index", `${localZIndex + 1}`);
|
5802
5866
|
this.activeInstance = content;
|
5803
|
-
|
5804
|
-
this.appendContentToMask(content);
|
5867
|
+
this.appendContentToMask(content);
|
5805
5868
|
}
|
5806
5869
|
}
|
5807
5870
|
hide(transfer2 = false, content, uuid2) {
|
5808
5871
|
var _a;
|
5809
5872
|
const uid = uuid2 != null ? uuid2 : this.lastUUID;
|
5810
|
-
this.mask.style.setProperty("display", "none");
|
5811
5873
|
if (!transfer2) {
|
5812
5874
|
content == null ? void 0 : content.remove();
|
5813
5875
|
(_a = this.activeInstance) == null ? void 0 : _a.remove();
|
5814
5876
|
}
|
5815
5877
|
this.activeInstance = void 0;
|
5816
5878
|
this.popIndexStore(uid);
|
5879
|
+
const maskList = bkMaskMaker.getMaskStyles(this.parentNode);
|
5880
|
+
maskList == null ? void 0 : maskList.pop();
|
5881
|
+
if (!(maskList == null ? void 0 : maskList.length)) {
|
5882
|
+
this.mask.style.setProperty("display", "none");
|
5883
|
+
} else {
|
5884
|
+
const style2 = maskList.slice(-1)[0];
|
5885
|
+
this.setMaskStyle(style2);
|
5886
|
+
}
|
5817
5887
|
}
|
5818
5888
|
storeMaskInsCfg(config) {
|
5819
5889
|
this.zIndexStore.set(config.uuid, config);
|
@@ -5840,12 +5910,23 @@ class BkMaskManager {
|
|
5840
5910
|
getActiveContentInstance() {
|
5841
5911
|
return this.activeInstance;
|
5842
5912
|
}
|
5913
|
+
initInstance(maskStyle) {
|
5914
|
+
if (!this.isInit) {
|
5915
|
+
this.isInit = true;
|
5916
|
+
const { instance, isExist } = this.getMask();
|
5917
|
+
this.mask = instance;
|
5918
|
+
this.backupMask = this.getBackupMask();
|
5919
|
+
!isExist && this.setMaskStyle(Object.assign({}, this.maskStyle, maskStyle));
|
5920
|
+
}
|
5921
|
+
}
|
5843
5922
|
getMask() {
|
5844
5923
|
if (this.multiInstance) {
|
5845
|
-
return this.createMask();
|
5924
|
+
return { instance: this.createMask(), isExist: false };
|
5846
5925
|
}
|
5847
|
-
let
|
5926
|
+
let isExist = true;
|
5927
|
+
let div = this.parentNode.querySelector(`[data-bk-mask-uid='${this.uniqueMaskAttrTag}']`);
|
5848
5928
|
if (!div) {
|
5929
|
+
isExist = false;
|
5849
5930
|
div = this.createMask();
|
5850
5931
|
div.addEventListener("click", (e) => {
|
5851
5932
|
if (e.target === div) {
|
@@ -5855,6 +5936,17 @@ class BkMaskManager {
|
|
5855
5936
|
}
|
5856
5937
|
}, true);
|
5857
5938
|
}
|
5939
|
+
return {
|
5940
|
+
instance: div,
|
5941
|
+
isExist
|
5942
|
+
};
|
5943
|
+
}
|
5944
|
+
getBackupMask() {
|
5945
|
+
const attrName = "data-bk-backup-uid";
|
5946
|
+
let div = this.parentNode.querySelector(`[${attrName}]`);
|
5947
|
+
if (!div) {
|
5948
|
+
div = this.createMask(attrName);
|
5949
|
+
}
|
5858
5950
|
return div;
|
5859
5951
|
}
|
5860
5952
|
createMask(attrName = "data-bk-mask-uid") {
|
@@ -5870,7 +5962,10 @@ class BkMaskManager {
|
|
5870
5962
|
}
|
5871
5963
|
getMaskAttrTag(tag2) {
|
5872
5964
|
if (/^(auto|\s+)$/i.test(tag2) || tag2 === null || tag2 === void 0 || tag2 === "") {
|
5873
|
-
|
5965
|
+
if (!bkMaskMaker.getMaskId(this.parentNode)) {
|
5966
|
+
bkMaskMaker.setMaskId(this.parentNode, `__bk_mask_${random(16)}`);
|
5967
|
+
}
|
5968
|
+
return bkMaskMaker.getMaskId(this.parentNode);
|
5874
5969
|
}
|
5875
5970
|
return tag2;
|
5876
5971
|
}
|
@@ -5878,9 +5973,9 @@ class BkMaskManager {
|
|
5878
5973
|
this.mask.append(content);
|
5879
5974
|
}
|
5880
5975
|
}
|
5881
|
-
|
5976
|
+
new BkMaskManager({});
|
5882
5977
|
class BKPopIndexManager {
|
5883
|
-
constructor() {
|
5978
|
+
constructor(options) {
|
5884
5979
|
this.getActiveClickFnIndex = (match2) => {
|
5885
5980
|
const filterFn = (target) => typeof match2 === "string" ? target.getAttribute(this.uuidAttrName) === match2 : target === match2;
|
5886
5981
|
return this.clickFn.findIndex(({ target }) => filterFn(target));
|
@@ -5893,10 +5988,23 @@ class BKPopIndexManager {
|
|
5893
5988
|
this.clickFn = [];
|
5894
5989
|
this.uuidAttrName = "data-bk-pop-uuid";
|
5895
5990
|
this.activePopId = null;
|
5896
|
-
|
5991
|
+
this.bKMaskManagerInstance = new BkMaskManager({
|
5992
|
+
parentNode: this.getParentNode(options == null ? void 0 : options.transfer),
|
5897
5993
|
onClick: this.onMaskClickFn.bind(this)
|
5898
5994
|
});
|
5899
5995
|
}
|
5996
|
+
getParentNode(transfer2) {
|
5997
|
+
if (typeof transfer2 === "string") {
|
5998
|
+
const target = document.querySelector(transfer2);
|
5999
|
+
if (target) {
|
6000
|
+
return target;
|
6001
|
+
}
|
6002
|
+
}
|
6003
|
+
if (isElement$4(transfer2)) {
|
6004
|
+
return transfer2;
|
6005
|
+
}
|
6006
|
+
return document.body;
|
6007
|
+
}
|
5900
6008
|
onMaskClick(callFn, target) {
|
5901
6009
|
this.clickFn.push({ fn: callFn, target });
|
5902
6010
|
}
|
@@ -5909,8 +6017,8 @@ class BKPopIndexManager {
|
|
5909
6017
|
const uuid2 = random(16);
|
5910
6018
|
content.setAttribute(this.uuidAttrName, uuid2);
|
5911
6019
|
this.popInstanceList.push({ uuid: uuid2, zIndex, content, showMask, appendStyle });
|
5912
|
-
showMask &&
|
5913
|
-
|
6020
|
+
showMask && this.bKMaskManagerInstance.backupActiveInstance();
|
6021
|
+
this.bKMaskManagerInstance.show(content, zIndex, showMask, appendStyle, uuid2, transfer2);
|
5914
6022
|
this.activePopId = uuid2;
|
5915
6023
|
}
|
5916
6024
|
destroy(content, transfer2 = false) {
|
@@ -5925,17 +6033,17 @@ class BKPopIndexManager {
|
|
5925
6033
|
if (this.popInstanceList.length) {
|
5926
6034
|
if (removeLastContent) {
|
5927
6035
|
const lastItem = this.popInstanceList.pop();
|
5928
|
-
|
6036
|
+
this.bKMaskManagerInstance.popIndexStore(lastItem.uuid);
|
5929
6037
|
lastItem.remove();
|
5930
6038
|
this.activePopId = null;
|
5931
6039
|
}
|
5932
6040
|
if (this.popInstanceList.length) {
|
5933
6041
|
const activeItem = this.popInstanceList.slice(-1)[0];
|
5934
6042
|
const { zIndex, content, showMask, appendStyle, uuid: uuid2 } = activeItem;
|
5935
|
-
|
6043
|
+
this.bKMaskManagerInstance.show(content, zIndex, showMask, appendStyle, uuid2);
|
5936
6044
|
this.activePopId = uuid2;
|
5937
6045
|
} else {
|
5938
|
-
|
6046
|
+
this.bKMaskManagerInstance.hide();
|
5939
6047
|
this.activePopId = null;
|
5940
6048
|
this.clickFn.length = 0;
|
5941
6049
|
}
|
@@ -5949,9 +6057,9 @@ class BKPopIndexManager {
|
|
5949
6057
|
if (!transfer2)
|
5950
6058
|
this.popInstanceList[itemIndex].content.remove();
|
5951
6059
|
this.popInstanceList.splice(itemIndex, 1);
|
5952
|
-
|
6060
|
+
this.bKMaskManagerInstance.popIndexStore(uuid2);
|
5953
6061
|
if (!this.popInstanceList.length) {
|
5954
|
-
|
6062
|
+
this.bKMaskManagerInstance.hide(transfer2);
|
5955
6063
|
this.activePopId = null;
|
5956
6064
|
this.clickFn.length = 0;
|
5957
6065
|
} else {
|
@@ -5969,7 +6077,7 @@ class BKPopIndexManager {
|
|
5969
6077
|
}
|
5970
6078
|
}
|
5971
6079
|
}
|
5972
|
-
|
6080
|
+
new BKPopIndexManager();
|
5973
6081
|
var rngBrowser = { exports: {} };
|
5974
6082
|
var getRandomValues = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != "undefined" && typeof window.msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto);
|
5975
6083
|
if (getRandomValues) {
|
@@ -11002,7 +11110,7 @@ const propsMixin$1 = {
|
|
11002
11110
|
size: j("size", {}),
|
11003
11111
|
draggable: PropTypes.bool.def(true),
|
11004
11112
|
quickClose: PropTypes.bool.def(true),
|
11005
|
-
transfer: PropTypes.
|
11113
|
+
transfer: PropTypes.oneOfType([Boolean, String, HTMLElement]).def(false),
|
11006
11114
|
zIndex: PropTypes.oneOfType([String, Number]).def("inherit"),
|
11007
11115
|
maxHeight: PropTypes.string,
|
11008
11116
|
direction: PropTypes.string,
|
@@ -11021,7 +11129,8 @@ var Component$u = defineComponent({
|
|
11021
11129
|
data() {
|
11022
11130
|
return {
|
11023
11131
|
visible: false,
|
11024
|
-
closeTimer: null
|
11132
|
+
closeTimer: null,
|
11133
|
+
bkPopIndexManager: new BKPopIndexManager(__spreadValues({}, this.$props))
|
11025
11134
|
};
|
11026
11135
|
},
|
11027
11136
|
computed: {
|
@@ -11065,30 +11174,34 @@ var Component$u = defineComponent({
|
|
11065
11174
|
},
|
11066
11175
|
visible: {
|
11067
11176
|
handler(val) {
|
11177
|
+
var _a, _b;
|
11068
11178
|
if (val) {
|
11069
11179
|
this.$nextTick(() => {
|
11070
|
-
bkPopIndexManager.onMaskClick((_e) => {
|
11180
|
+
this.bkPopIndexManager.onMaskClick((_e) => {
|
11071
11181
|
this.handleClickOutSide();
|
11072
11182
|
}, this.$el);
|
11073
11183
|
const hideMaskStyle = {
|
11074
11184
|
"background-color": "rgba(0,0,0,0)"
|
11075
11185
|
};
|
11076
11186
|
const appendStyle = this.showMask ? {} : hideMaskStyle;
|
11077
|
-
bkPopIndexManager.show(this.$el, this.showMask, appendStyle, this.transfer, this.zIndex);
|
11187
|
+
this.bkPopIndexManager.show(this.$el, this.showMask, appendStyle, !!this.transfer, this.zIndex);
|
11078
11188
|
this.$emit("shown");
|
11079
11189
|
});
|
11080
11190
|
} else {
|
11081
|
-
bkPopIndexManager == null ? void 0 :
|
11082
|
-
bkPopIndexManager == null ? void 0 :
|
11191
|
+
(_a = this.bkPopIndexManager) == null ? void 0 : _a.hide(this.$el, !!this.transfer);
|
11192
|
+
(_b = this.bkPopIndexManager) == null ? void 0 : _b.destroy();
|
11083
11193
|
}
|
11084
11194
|
},
|
11085
11195
|
immediate: true
|
11086
11196
|
}
|
11087
11197
|
},
|
11198
|
+
created() {
|
11199
|
+
},
|
11088
11200
|
beforeUnmount() {
|
11201
|
+
var _a, _b;
|
11089
11202
|
if (this.visible) {
|
11090
|
-
bkPopIndexManager == null ? void 0 :
|
11091
|
-
bkPopIndexManager == null ? void 0 :
|
11203
|
+
(_a = this.bkPopIndexManager) == null ? void 0 : _a.hide(this.$el);
|
11204
|
+
(_b = this.bkPopIndexManager) == null ? void 0 : _b.destroy();
|
11092
11205
|
}
|
11093
11206
|
},
|
11094
11207
|
methods: {
|
@@ -13056,6 +13169,41 @@ var usePlatform = (fullscreenTarget) => {
|
|
13056
13169
|
getClippingRect: getClippingRect2
|
13057
13170
|
};
|
13058
13171
|
};
|
13172
|
+
const CachedConst = {};
|
13173
|
+
const isAvailableId = (query) => {
|
13174
|
+
const container2 = document.querySelector(query);
|
13175
|
+
return container2 instanceof HTMLElement;
|
13176
|
+
};
|
13177
|
+
const getFullscreenUid = () => {
|
13178
|
+
if (!CachedConst.fullscreenReferId) {
|
13179
|
+
CachedConst.fullscreenReferId = `id_${uuid_1.v4()}`;
|
13180
|
+
}
|
13181
|
+
return CachedConst.fullscreenReferId;
|
13182
|
+
};
|
13183
|
+
const isElement = (element) => element instanceof Element || element instanceof HTMLDocument;
|
13184
|
+
const contentAsHTMLElement = (content) => {
|
13185
|
+
if (isElement(content)) {
|
13186
|
+
return {
|
13187
|
+
isElement: true,
|
13188
|
+
content,
|
13189
|
+
vNode: void 0
|
13190
|
+
};
|
13191
|
+
}
|
13192
|
+
if (/^(#|\.)/.test(content)) {
|
13193
|
+
const target = document.querySelector(content);
|
13194
|
+
const isEle = isElement(target);
|
13195
|
+
return {
|
13196
|
+
isElement: isEle,
|
13197
|
+
content: isEle ? target : content,
|
13198
|
+
vNode: isEle ? void 0 : content
|
13199
|
+
};
|
13200
|
+
}
|
13201
|
+
return {
|
13202
|
+
isElement: false,
|
13203
|
+
content,
|
13204
|
+
vNode: content
|
13205
|
+
};
|
13206
|
+
};
|
13059
13207
|
var useFloating = (props2, ctx, {
|
13060
13208
|
refReference,
|
13061
13209
|
refContent,
|
@@ -13101,6 +13249,13 @@ var useFloating = (props2, ctx, {
|
|
13101
13249
|
const elContent = resolveTargetElement((_b = refContent.value) == null ? void 0 : _b.$el);
|
13102
13250
|
const elArrow = props2.arrow ? resolveTargetElement((_c = refArrow.value) == null ? void 0 : _c.$el) : null;
|
13103
13251
|
const root = resolveTargetElement((_d = refRoot.value) == null ? void 0 : _d.$el);
|
13252
|
+
const {
|
13253
|
+
isElement: isElement2,
|
13254
|
+
content
|
13255
|
+
} = contentAsHTMLElement(props2.content);
|
13256
|
+
if (elContent && isElement2 && !(elContent == null ? void 0 : elContent.contains(content))) {
|
13257
|
+
elContent.append(content);
|
13258
|
+
}
|
13104
13259
|
return {
|
13105
13260
|
elReference,
|
13106
13261
|
elContent,
|
@@ -13414,18 +13569,6 @@ var useFloating = (props2, ctx, {
|
|
13414
13569
|
cleanup
|
13415
13570
|
};
|
13416
13571
|
};
|
13417
|
-
const CachedConst = {};
|
13418
|
-
const isAvailableId = (query) => {
|
13419
|
-
const container2 = document.querySelector(query);
|
13420
|
-
return container2 instanceof HTMLElement;
|
13421
|
-
};
|
13422
|
-
const getFullscreenUid = () => {
|
13423
|
-
if (!CachedConst.fullscreenReferId) {
|
13424
|
-
CachedConst.fullscreenReferId = `id_${uuid_1.v4()}`;
|
13425
|
-
}
|
13426
|
-
return CachedConst.fullscreenReferId;
|
13427
|
-
};
|
13428
|
-
const isElement = (element) => element instanceof Element || element instanceof HTMLDocument;
|
13429
13572
|
let popContainerId = null;
|
13430
13573
|
let parentNodeReferId = null;
|
13431
13574
|
var usePopperId = (props2, prefix = "#") => {
|
@@ -13703,23 +13846,10 @@ var Component$r = defineComponent({
|
|
13703
13846
|
});
|
13704
13847
|
const renderContent2 = () => {
|
13705
13848
|
if (props2.allowHtml) {
|
13706
|
-
|
13707
|
-
|
13708
|
-
|
13709
|
-
|
13710
|
-
}
|
13711
|
-
if (/^(#|\.)/.test(props2.content)) {
|
13712
|
-
const target = document.querySelector(props2.content);
|
13713
|
-
if (isElement(target)) {
|
13714
|
-
return h$1("div", {
|
13715
|
-
innerHTML: target.innerHTML
|
13716
|
-
});
|
13717
|
-
}
|
13718
|
-
return content;
|
13719
|
-
}
|
13720
|
-
return h$1("div", {
|
13721
|
-
innerHTML: props2.content
|
13722
|
-
});
|
13849
|
+
const {
|
13850
|
+
vNode
|
13851
|
+
} = contentAsHTMLElement(props2.content);
|
13852
|
+
return vNode;
|
13723
13853
|
}
|
13724
13854
|
return content;
|
13725
13855
|
};
|
@@ -14844,7 +14974,10 @@ function toLowerCase(value = "") {
|
|
14844
14974
|
var BkOption = defineComponent({
|
14845
14975
|
name: "Option",
|
14846
14976
|
props: {
|
14847
|
-
value:
|
14977
|
+
value: {
|
14978
|
+
type: [String, Number, Object],
|
14979
|
+
require: true
|
14980
|
+
},
|
14848
14981
|
label: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).def(""),
|
14849
14982
|
disabled: PropTypes.bool.def(false)
|
14850
14983
|
},
|
@@ -16094,7 +16227,10 @@ var SelectTagInput = defineComponent({
|
|
16094
16227
|
[resolveClassName("select-tag--default")]: true,
|
16095
16228
|
"is-disabled": this.disabled,
|
16096
16229
|
"collapse-tag": this.collapseTags,
|
16097
|
-
"has-prefix": !!prefix
|
16230
|
+
"has-prefix": !!prefix && (prefix == null ? void 0 : prefix.every((item) => {
|
16231
|
+
var _a2;
|
16232
|
+
return !!((_a2 = item.children) == null ? void 0 : _a2.length);
|
16233
|
+
}))
|
16098
16234
|
});
|
16099
16235
|
const tagWrapperClass = classes({
|
16100
16236
|
[resolveClassName("select-tag-wrapper")]: true
|
@@ -16205,6 +16341,7 @@ var Component$k = defineComponent({
|
|
16205
16341
|
scrollHeight,
|
16206
16342
|
list,
|
16207
16343
|
displayKey,
|
16344
|
+
idKey,
|
16208
16345
|
collapseTags,
|
16209
16346
|
autoHeight,
|
16210
16347
|
popoverOptions,
|
@@ -16265,6 +16402,10 @@ var Component$k = defineComponent({
|
|
16265
16402
|
return pre;
|
16266
16403
|
}, {}));
|
16267
16404
|
const activeOptionValue = ref();
|
16405
|
+
const listMap = computed(() => list.value.reduce((pre, item) => {
|
16406
|
+
pre[item[idKey.value]] = item[displayKey.value];
|
16407
|
+
return pre;
|
16408
|
+
}, {}));
|
16268
16409
|
watch(modelValue, () => {
|
16269
16410
|
var _a;
|
16270
16411
|
handleSetSelectedData();
|
@@ -16285,7 +16426,7 @@ var Component$k = defineComponent({
|
|
16285
16426
|
const isDisabled = computed(() => disabled.value || loading2.value);
|
16286
16427
|
const selectedLabel = computed(() => selected.value.map((item) => {
|
16287
16428
|
var _a, _b;
|
16288
|
-
return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(item.value)) == null ? void 0 : _b.label) || item.label;
|
16429
|
+
return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(item.value)) == null ? void 0 : _b.label) || item.label || listMap.value[item.value];
|
16289
16430
|
}));
|
16290
16431
|
const isAllSelected = computed(() => {
|
16291
16432
|
const normalSelectedValues = options.value.reduce((pre, option) => {
|
@@ -16536,7 +16677,7 @@ var Component$k = defineComponent({
|
|
16536
16677
|
}
|
16537
16678
|
}
|
16538
16679
|
}
|
16539
|
-
return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(tmpValue)) == null ? void 0 : _b.label) || cacheSelectedMap.value[tmpValue] || tmpValue;
|
16680
|
+
return ((_b = (_a = optionsMap.value) == null ? void 0 : _a.get(tmpValue)) == null ? void 0 : _b.label) || cacheSelectedMap.value[tmpValue] || listMap.value[tmpValue] || tmpValue;
|
16540
16681
|
};
|
16541
16682
|
const handleSetSelectedData = () => {
|
16542
16683
|
if (Array.isArray(modelValue.value)) {
|
@@ -17556,6 +17697,10 @@ var Column = defineComponent({
|
|
17556
17697
|
}
|
17557
17698
|
nodes.forEach((node) => {
|
17558
17699
|
var _a, _b, _c;
|
17700
|
+
if (Array.isArray(node)) {
|
17701
|
+
reduceColumns(node);
|
17702
|
+
return;
|
17703
|
+
}
|
17559
17704
|
let skipValidateKey0 = true;
|
17560
17705
|
if (((_a = node.type) == null ? void 0 : _a.name) === "TableColumn") {
|
17561
17706
|
skipValidateKey0 = Object.hasOwnProperty.call(node.props || {}, "key");
|
@@ -18979,6 +19124,9 @@ var TableCell = defineComponent({
|
|
18979
19124
|
}) {
|
18980
19125
|
const refRoot = ref();
|
18981
19126
|
const isTipsEnabled = ref(false);
|
19127
|
+
const cellStyle = computed(() => ({
|
19128
|
+
textAlign: props2.column.textAlign
|
19129
|
+
}));
|
18982
19130
|
const resolveSetting = () => {
|
18983
19131
|
if (/boolean|object/.test(typeof props2.column.showOverflowTooltip) && props2.column.showOverflowTooltip !== null) {
|
18984
19132
|
return props2.column;
|
@@ -19079,6 +19227,7 @@ var TableCell = defineComponent({
|
|
19079
19227
|
var _a;
|
19080
19228
|
return createVNode("div", {
|
19081
19229
|
"class": ["cell", props2.column.type],
|
19230
|
+
"style": cellStyle.value,
|
19082
19231
|
"ref": refRoot,
|
19083
19232
|
"title": props2.title
|
19084
19233
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|