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