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