bkui-vue 0.0.2-beta.15 → 0.0.2-beta.17
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 +60 -60
- package/dist/index.cjs.source.js +81 -68
- package/dist/index.esm.js +8928 -8918
- package/dist/index.esm.source.js +81 -68
- package/dist/index.umd.js +59 -59
- package/dist/index.umd.source.js +81 -68
- package/dist/style.css +1 -11171
- package/dist/style.variable.css +1 -1
- package/lib/color-picker/index.js +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/message/index.js +1 -1
- package/lib/plugin-popover/index.js +1 -1
- package/lib/popover/index.js +1 -1
- package/lib/shared/index.js +1 -1
- package/lib/shared/pop-manager.d.ts +3 -1
- package/lib/table/index.js +1 -1
- package/lib/table/table.css +1 -5
- package/lib/table/table.less +1 -12
- package/lib/table/table.variable.css +1 -5
- package/lib/table/use-common.d.ts +0 -9
- package/package.json +1 -1
package/dist/index.umd.source.js
CHANGED
@@ -5870,11 +5870,7 @@ var __publicField = (obj, key2, value) => {
|
|
5870
5870
|
}
|
5871
5871
|
pushMaskStyle(parentNode, style2) {
|
5872
5872
|
const value = this.getMaskMap(parentNode);
|
5873
|
-
|
5874
|
-
this.setMaskMap(parentNode, { styles: [style2], ...value || {} });
|
5875
|
-
} else {
|
5876
|
-
value.styles.push(style2);
|
5877
|
-
}
|
5873
|
+
this.setMaskMap(parentNode, { styles: [style2], ...value || {} });
|
5878
5874
|
}
|
5879
5875
|
getMaskStyles(parentNode) {
|
5880
5876
|
var _a;
|
@@ -6066,9 +6062,9 @@ var __publicField = (obj, key2, value) => {
|
|
6066
6062
|
initInstance(maskStyle) {
|
6067
6063
|
if (!this.isInit) {
|
6068
6064
|
this.isInit = true;
|
6065
|
+
this.backupMask = this.getBackupMask();
|
6069
6066
|
const { instance, isExist } = this.getMask();
|
6070
6067
|
this.mask = instance;
|
6071
|
-
this.backupMask = this.getBackupMask();
|
6072
6068
|
!isExist && this.setMaskStyle(Object.assign({}, this.maskStyle, maskStyle));
|
6073
6069
|
}
|
6074
6070
|
}
|
@@ -6150,23 +6146,32 @@ var __publicField = (obj, key2, value) => {
|
|
6150
6146
|
}
|
6151
6147
|
}
|
6152
6148
|
new BkMaskManager({});
|
6149
|
+
const popInstanceStore = /* @__PURE__ */ new WeakMap();
|
6153
6150
|
class BKPopIndexManager {
|
6154
|
-
// private instanceUUID;
|
6155
6151
|
constructor(options) {
|
6156
6152
|
/** 用来缓存弹出层实例 */
|
6157
|
-
__publicField(this, "popInstanceList");
|
6158
6153
|
__publicField(this, "uuidAttrName");
|
6159
6154
|
__publicField(this, "clickFn");
|
6160
6155
|
__publicField(this, "bKMaskManagerInstance");
|
6161
|
-
this
|
6156
|
+
__publicField(this, "transfer");
|
6162
6157
|
this.clickFn = void 0;
|
6163
6158
|
this.uuidAttrName = "data-bk-pop-uuid";
|
6159
|
+
this.transfer = this.getParentNode(options == null ? void 0 : options.transfer);
|
6164
6160
|
this.bKMaskManagerInstance = new BkMaskManager({
|
6165
6161
|
parentNode: this.getParentNode(options == null ? void 0 : options.transfer),
|
6166
6162
|
popInstance: this,
|
6167
6163
|
onClick: this.onMaskClickFn
|
6168
6164
|
});
|
6169
6165
|
}
|
6166
|
+
get popInstanceList() {
|
6167
|
+
if (!popInstanceStore.has(this.transfer)) {
|
6168
|
+
popInstanceStore.set(this.transfer, []);
|
6169
|
+
}
|
6170
|
+
return popInstanceStore.get(this.transfer);
|
6171
|
+
}
|
6172
|
+
set popInstanceList(val) {
|
6173
|
+
popInstanceStore.set(this.transfer, val);
|
6174
|
+
}
|
6170
6175
|
getParentNode(transfer2) {
|
6171
6176
|
if (typeof transfer2 === "string") {
|
6172
6177
|
const target = document.querySelector(transfer2);
|
@@ -6198,8 +6203,10 @@ var __publicField = (obj, key2, value) => {
|
|
6198
6203
|
const zIndex = typeof zindex === "number" ? zindex : bkZIndexManager.getModalNextIndex();
|
6199
6204
|
const uuid2 = random(16);
|
6200
6205
|
content.setAttribute(this.uuidAttrName, uuid2);
|
6206
|
+
if (this.popInstanceList.length > 0) {
|
6207
|
+
showMask && this.bKMaskManagerInstance.backupContentElement(this.popInstanceList.slice(-1)[0].content);
|
6208
|
+
}
|
6201
6209
|
this.popInstanceList.push({ uuid: uuid2, zIndex, content, showMask, appendStyle });
|
6202
|
-
showMask && this.bKMaskManagerInstance.backupActiveInstance();
|
6203
6210
|
this.bKMaskManagerInstance.show(content, zIndex, showMask, appendStyle, uuid2, transfer2);
|
6204
6211
|
}
|
6205
6212
|
/**
|
@@ -13235,7 +13242,6 @@ ${$(r2)}`), n2;
|
|
13235
13242
|
if (!/^body$/i.test(props2.boundary)) {
|
13236
13243
|
if (typeof props2.boundary === "string") {
|
13237
13244
|
if (!isAvailableId(props2.boundary)) {
|
13238
|
-
console.error("props.boundary is not available selector");
|
13239
13245
|
resolvedBoundary = "body";
|
13240
13246
|
return;
|
13241
13247
|
}
|
@@ -21198,7 +21204,6 @@ ${$(r2)}`), n2;
|
|
21198
21204
|
setup(props2, {
|
21199
21205
|
emit
|
21200
21206
|
}) {
|
21201
|
-
var _a;
|
21202
21207
|
const {
|
21203
21208
|
resolveClassName: resolveClassName2
|
21204
21209
|
} = usePrefix();
|
@@ -21209,7 +21214,10 @@ ${$(r2)}`), n2;
|
|
21209
21214
|
const {
|
21210
21215
|
filter
|
21211
21216
|
} = vue.toRefs(props2.column);
|
21212
|
-
const checked = vue.
|
21217
|
+
const checked = vue.computed(() => {
|
21218
|
+
var _a;
|
21219
|
+
return ((_a = filter.value) == null ? void 0 : _a.checked) ?? [];
|
21220
|
+
});
|
21213
21221
|
const state = vue.reactive({
|
21214
21222
|
isOpen: false,
|
21215
21223
|
checked: checked.value
|
@@ -21695,7 +21703,7 @@ ${$(r2)}`), n2;
|
|
21695
21703
|
}
|
21696
21704
|
const fixedOffset = {
|
21697
21705
|
left: 0,
|
21698
|
-
right: hasScrollY2 ? SCROLLY_WIDTH :
|
21706
|
+
right: hasScrollY2 ? SCROLLY_WIDTH : -1
|
21699
21707
|
};
|
21700
21708
|
const fixedPos = resolveFixColPos(column);
|
21701
21709
|
fixedOffset[fixedPos] = getPreColumnOffset(fixedPos, column, fixedOffset[fixedPos]);
|
@@ -21751,12 +21759,13 @@ ${$(r2)}`), n2;
|
|
21751
21759
|
}
|
21752
21760
|
return resolvePropVal(this.props, "rowHeight", ["tbody", row, rowIndex]);
|
21753
21761
|
});
|
21754
|
-
__publicField(this, "getColumnClass", (column, colIndex) =>
|
21762
|
+
__publicField(this, "getColumnClass", (column, colIndex) => ({
|
21755
21763
|
[`${this.uuid}-column-${colIndex}`]: true,
|
21756
21764
|
column_fixed: !!column.fixed,
|
21757
21765
|
column_fixed_left: !!column.fixed,
|
21758
|
-
column_fixed_right: column.fixed === "right"
|
21759
|
-
|
21766
|
+
column_fixed_right: column.fixed === "right",
|
21767
|
+
[`${column.className}`]: true
|
21768
|
+
}));
|
21760
21769
|
__publicField(this, "getHeadColumnClass", (column, colIndex) => ({
|
21761
21770
|
...this.getColumnClass(column, colIndex),
|
21762
21771
|
active: this.isColActive(colIndex)
|
@@ -22062,13 +22071,16 @@ ${$(r2)}`), n2;
|
|
22062
22071
|
return vue.createVNode(vue.Fragment, null, [vue.createVNode("thead", {
|
22063
22072
|
"style": rowStyle
|
22064
22073
|
}, [vue.createVNode(TableRow, null, {
|
22065
|
-
default: () => [vue.createVNode("tr", null, [this.filterColGroups.map((column, index2) =>
|
22066
|
-
"
|
22067
|
-
"
|
22068
|
-
|
22069
|
-
|
22070
|
-
|
22071
|
-
|
22074
|
+
default: () => [vue.createVNode("tr", null, [this.filterColGroups.map((column, index2) => {
|
22075
|
+
console.log("getHeadColumnClass", column, index2, this.getHeadColumnClass(column, index2));
|
22076
|
+
return vue.createVNode("th", vue.mergeProps({
|
22077
|
+
"colspan": 1,
|
22078
|
+
"rowspan": 1,
|
22079
|
+
"class": [this.getHeadColumnClass(column, index2), this.getColumnCustomClass(column), column.align || this.props.headerAlign || this.props.align],
|
22080
|
+
"style": resolveFixedColumnStyle(column, this.styleRef.value.hasScrollY),
|
22081
|
+
"onClick": () => this.handleColumnHeadClick(index2, column)
|
22082
|
+
}, resolveEventListener(column)), [renderHeadCell(column, index2)]);
|
22083
|
+
}), getScrollFix()])]
|
22072
22084
|
})])]);
|
22073
22085
|
}
|
22074
22086
|
/**
|
@@ -22593,15 +22605,6 @@ ${$(r2)}`), n2;
|
|
22593
22605
|
"has-settings": !!props2.settings
|
22594
22606
|
});
|
22595
22607
|
const resolvedColumns = vue.computed(() => getColumns());
|
22596
|
-
const offsetXVarStyle = vue.computed(() => ({
|
22597
|
-
"--var-scroll-left": `${reactiveProp.scrollTranslateX}px`,
|
22598
|
-
"--var-scroll-top": `${reactiveProp.scrollTranslateY}px`
|
22599
|
-
}));
|
22600
|
-
const headOffsetXVarStyle = vue.computed(() => ({
|
22601
|
-
"--var-scroll-left": `${reactiveProp.scrollTranslateX}px`,
|
22602
|
-
"--var-scroll-top": "0px",
|
22603
|
-
right: hasScrollYRef.value ? `${SCROLLY_WIDTH - 2}px` : "0px"
|
22604
|
-
}));
|
22605
22608
|
const config = resolveHeadConfig(props2);
|
22606
22609
|
const headStyle = vue.computed(() => ({
|
22607
22610
|
"--row-height": `${resolvePropVal(config, "height", ["thead"])}px`,
|
@@ -22715,8 +22718,6 @@ ${$(r2)}`), n2;
|
|
22715
22718
|
wrapperStyle,
|
22716
22719
|
contentStyle,
|
22717
22720
|
headStyle,
|
22718
|
-
offsetXVarStyle,
|
22719
|
-
headOffsetXVarStyle,
|
22720
22721
|
resetTableHeight,
|
22721
22722
|
updateBorderClass,
|
22722
22723
|
getColumnsWidthOffsetWidth,
|
@@ -23133,8 +23134,6 @@ ${$(r2)}`), n2;
|
|
23133
23134
|
contentStyle,
|
23134
23135
|
headStyle,
|
23135
23136
|
hasScrollYRef,
|
23136
|
-
offsetXVarStyle,
|
23137
|
-
headOffsetXVarStyle,
|
23138
23137
|
updateBorderClass,
|
23139
23138
|
resetTableHeight,
|
23140
23139
|
getColumnsWidthOffsetWidth,
|
@@ -23315,8 +23314,9 @@ ${$(r2)}`), n2;
|
|
23315
23314
|
if (!root.value) {
|
23316
23315
|
return;
|
23317
23316
|
}
|
23318
|
-
if (props2.height === "100%" || props2.height === "auto")
|
23319
|
-
;
|
23317
|
+
if (props2.height === "100%" || props2.height === "auto") {
|
23318
|
+
resetTableHeight(root.value);
|
23319
|
+
}
|
23320
23320
|
updateBorderClass(root.value);
|
23321
23321
|
const offset2 = getColumnsWidthOffsetWidth();
|
23322
23322
|
resolveColumnWidth(root.value, colgroups, 20, offset2);
|
@@ -23376,6 +23376,10 @@ ${$(r2)}`), n2;
|
|
23376
23376
|
const footerStyle = vue.computed(() => ({
|
23377
23377
|
"--footer-height": hasFooter.value ? `${props2.paginationHeight}px` : "0"
|
23378
23378
|
}));
|
23379
|
+
const fixedContainerStyle = vue.computed(() => ({
|
23380
|
+
right: hasScrollYRef.value ? `${SCROLLY_WIDTH}px` : 0,
|
23381
|
+
...footerStyle.value
|
23382
|
+
}));
|
23379
23383
|
const {
|
23380
23384
|
renderScrollLoading
|
23381
23385
|
} = useScrollLoading(props2, ctx);
|
@@ -23390,25 +23394,6 @@ ${$(r2)}`), n2;
|
|
23390
23394
|
zIndex: 2,
|
23391
23395
|
...props2.prependStyle || {}
|
23392
23396
|
}));
|
23393
|
-
const renderFixedColumns = () => fixedColumns.value.map(({
|
23394
|
-
isExist,
|
23395
|
-
colPos,
|
23396
|
-
column
|
23397
|
-
}) => isExist ? "" : vue.createVNode("div", {
|
23398
|
-
"class": resolveColumnClass(column, reactiveSchema.scrollTranslateX, tableOffsetRight.value),
|
23399
|
-
"style": resolveColumnStyle(colPos)
|
23400
|
-
}, null));
|
23401
|
-
const renderBodyAppend = () => vue.createVNode(vue.Fragment, null, [vue.createVNode("div", {
|
23402
|
-
"class": fixedBottomBorder.value
|
23403
|
-
}, null), vue.createVNode("div", {
|
23404
|
-
"class": fixedWrapperClass,
|
23405
|
-
"style": offsetXVarStyle.value
|
23406
|
-
}, [renderFixedColumns(), vue.createVNode("div", {
|
23407
|
-
"class": resizeColumnClass,
|
23408
|
-
"style": resizeColumnStyle.value
|
23409
|
-
}, null), vue.createVNode("div", {
|
23410
|
-
"class": loadingRowClass
|
23411
|
-
}, [renderScrollLoading()])])]);
|
23412
23397
|
const renderPrepend = () => {
|
23413
23398
|
if (ctx.slots.prepend) {
|
23414
23399
|
return vue.createVNode("div", {
|
@@ -23429,10 +23414,7 @@ ${$(r2)}`), n2;
|
|
23429
23414
|
vue.createVNode("div", {
|
23430
23415
|
"class": headClass,
|
23431
23416
|
"style": headStyle.value
|
23432
|
-
}, [
|
23433
|
-
"class": fixedWrapperClass,
|
23434
|
-
"style": headOffsetXVarStyle.value
|
23435
|
-
}, [renderFixedColumns()])]]),
|
23417
|
+
}, [tableRender.renderTableHeadSchema()]),
|
23436
23418
|
vue.createVNode(BkVirtualRender, vue.mergeProps({
|
23437
23419
|
"ref": refVirtualRender,
|
23438
23420
|
"lineHeight": tableRender.getRowHeight,
|
@@ -23450,8 +23432,26 @@ ${$(r2)}`), n2;
|
|
23450
23432
|
}), {
|
23451
23433
|
beforeContent: () => renderPrepend(),
|
23452
23434
|
default: (scope) => tableRender.renderTableBodySchema(scope.data || pageData),
|
23453
|
-
afterSection: () =>
|
23435
|
+
afterSection: () => vue.createVNode("div", {
|
23436
|
+
"class": fixedBottomBorder.value
|
23437
|
+
}, null)
|
23454
23438
|
}),
|
23439
|
+
vue.createVNode("div", {
|
23440
|
+
"class": fixedWrapperClass,
|
23441
|
+
"style": fixedContainerStyle.value
|
23442
|
+
}, [fixedColumns.value.map(({
|
23443
|
+
isExist,
|
23444
|
+
colPos,
|
23445
|
+
column
|
23446
|
+
}) => isExist ? "" : vue.createVNode("div", {
|
23447
|
+
"class": resolveColumnClass(column, reactiveSchema.scrollTranslateX, tableOffsetRight.value),
|
23448
|
+
"style": resolveColumnStyle(colPos)
|
23449
|
+
}, null)), vue.createVNode("div", {
|
23450
|
+
"class": resizeColumnClass,
|
23451
|
+
"style": resizeColumnStyle.value
|
23452
|
+
}, null), vue.createVNode("div", {
|
23453
|
+
"class": loadingRowClass
|
23454
|
+
}, [renderScrollLoading()])]),
|
23455
23455
|
vue.createVNode("div", {
|
23456
23456
|
"class": footerClass.value,
|
23457
23457
|
"style": footerStyle.value
|
@@ -26147,9 +26147,13 @@ ${$(r2)}`), n2;
|
|
26147
26147
|
offsetWidth,
|
26148
26148
|
offsetTop
|
26149
26149
|
} = e2.trigger;
|
26150
|
+
const msgTree = e2.trigger.closest(".message-tree");
|
26151
|
+
const msgTreeScrollTop = msgTree ? msgTree.scrollTop : 0;
|
26150
26152
|
target.classList.remove(...["success", "error", "is-hidden"]);
|
26151
26153
|
target.classList.add(...[theme, "is-show"]);
|
26152
|
-
|
26154
|
+
const transX = offsetLeft + offsetWidth / 2 - 41;
|
26155
|
+
const transY = offsetTop - msgTreeScrollTop - 40;
|
26156
|
+
target.style.setProperty("transform", `translate(${transX}px, ${transY}px`);
|
26153
26157
|
copyStatusTimer && clearTimeout(copyStatusTimer);
|
26154
26158
|
copyStatusTimer = setTimeout(() => {
|
26155
26159
|
target.classList.remove(...["is-show"]);
|
@@ -26473,7 +26477,10 @@ ${$(r2)}`), n2;
|
|
26473
26477
|
isShow.value = false;
|
26474
26478
|
};
|
26475
26479
|
function update(newValue) {
|
26476
|
-
modalFuncProps.value =
|
26480
|
+
modalFuncProps.value = {
|
26481
|
+
...modalFuncProps.value,
|
26482
|
+
...newValue
|
26483
|
+
};
|
26477
26484
|
}
|
26478
26485
|
expose({
|
26479
26486
|
update
|
@@ -26509,6 +26516,8 @@ ${$(r2)}`), n2;
|
|
26509
26516
|
class: resolveClassName2("info-wrapper"),
|
26510
26517
|
headerAlign: "center",
|
26511
26518
|
footerAlign: "center",
|
26519
|
+
transfer: true,
|
26520
|
+
fullscreen: false,
|
26512
26521
|
...modalFuncProps.value,
|
26513
26522
|
isShow: isShow.value,
|
26514
26523
|
onClosed,
|
@@ -43650,7 +43659,8 @@ ${$(r2)}`), n2;
|
|
43650
43659
|
props: colorPickerProps,
|
43651
43660
|
emits: ["update:modelValue", "change"],
|
43652
43661
|
setup(props2, {
|
43653
|
-
emit
|
43662
|
+
emit,
|
43663
|
+
slots
|
43654
43664
|
}) {
|
43655
43665
|
const formItem = useFormItem();
|
43656
43666
|
const showDropdown = vue.ref(false);
|
@@ -43785,7 +43795,10 @@ ${$(r2)}`), n2;
|
|
43785
43795
|
"class": colorPickerCls.value,
|
43786
43796
|
"onKeydown": handleTriggerKeydown,
|
43787
43797
|
"onClick": toggleDropdown
|
43788
|
-
}, [
|
43798
|
+
}, [typeof slots.trigger === "function" ? slots.trigger({
|
43799
|
+
value: colorStr.value,
|
43800
|
+
isShowDropdown: showDropdown.value
|
43801
|
+
}) : vue.createVNode(vue.Fragment, null, [vue.createVNode("div", {
|
43789
43802
|
"class": `${resolveClassName2("color-picker-color")}`
|
43790
43803
|
}, [vue.createVNode("span", {
|
43791
43804
|
"class": `${resolveClassName2("color-picker-color-square")} ${!colorStr.value && `${resolveClassName2("color-picker-empty")}`}`,
|
@@ -43796,7 +43809,7 @@ ${$(r2)}`), n2;
|
|
43796
43809
|
"class": `${resolveClassName2("color-picker-icon")}`
|
43797
43810
|
}, [vue.createVNode(angleUp, {
|
43798
43811
|
"class": "icon-angle-down"
|
43799
|
-
}, null)]), vue.createVNode(vue.Transition, {
|
43812
|
+
}, null)])]), vue.createVNode(vue.Transition, {
|
43800
43813
|
"name": "bk-fade-down-transition"
|
43801
43814
|
}, {
|
43802
43815
|
default: () => [vue.withDirectives(vue.createVNode(PickerDropdown, {
|