@blueking/ediatable 0.0.1-beta.7 → 0.0.1-beta.9

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.
@@ -1,6 +1,6 @@
1
1
  (function(global2, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("bkui-vue/dist/style.css"), require("bkui-vue")) : typeof define === "function" && define.amd ? define(["exports", "vue", "bkui-vue/dist/style.css", "bkui-vue"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.lesscodeCustomComponentLibrary = {}, global2.Vue, null, global2.bkuiVue));
3
- })(this, function(exports2, vue, style_css, bkuiVue) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("bkui-vue")) : typeof define === "function" && define.amd ? define(["exports", "vue", "bkui-vue"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.lesscodeCustomComponentLibrary = {}, global2.Vue, global2.bkuiVue));
3
+ })(this, function(exports2, vue, bkuiVue) {
4
4
  "use strict";
5
5
  var __vite_style__ = document.createElement("style");
6
6
  __vite_style__.textContent = `@font-face {
@@ -40,20 +40,73 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
40
40
  .icon-plus-fill:before {
41
41
  content: "\\e102";
42
42
  }
43
+ .bk-ediatable-head-column .is-required::after {
44
+ position: absolute;
45
+ top: 0;
46
+ margin-left: 4px;
47
+ font-size: 12px;
48
+ line-height: 40px;
49
+ color: #ea3636;
50
+ content: '*';
51
+ }
52
+ .bk-ediatable-head-column.is-right-fixed {
53
+ position: sticky;
54
+ right: 1px;
55
+ }
56
+ .bk-ediatable-head-column.is-right-fixed::before {
57
+ position: absolute;
58
+ top: 0;
59
+ left: -10px;
60
+ width: 10px;
61
+ height: 100%;
62
+ background: linear-gradient(to left, rgba(0, 0, 0, 0.12), transparent);
63
+ content: '';
64
+ }
65
+ .bk-ediatable-head-column.is-left-fixed {
66
+ position: sticky;
67
+ left: 1px;
68
+ }
69
+ .bk-ediatable-head-column.is-left-fixed::before {
70
+ position: absolute;
71
+ top: 0;
72
+ right: -10px;
73
+ width: 10px;
74
+ height: 100%;
75
+ background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
76
+ content: '';
77
+ }
78
+ .bk-ediatable-head-column .title-memo {
79
+ border-bottom: 1px dashed #979ba5;
80
+ }
43
81
  .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px rgba(154,161,177,.15),0 4px 80px -8px rgba(36,40,47,.25),0 4px 4px -2px rgba(91,94,105,.15);background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.bk-ediatable {
44
82
  position: relative;
45
83
  width: 100%;
46
- overflow-x: auto;
84
+ margin-bottom: -8px;
85
+ overflow-x: scroll;
47
86
  }
48
87
  .bk-ediatable::-webkit-scrollbar {
49
- width: 4px;
50
- height: 4px;
88
+ width: 8px;
89
+ height: 8px;
90
+ background: transparent;
51
91
  }
52
92
  .bk-ediatable::-webkit-scrollbar-thumb {
53
- background: #ddd;
93
+ background: transparent;
94
+ }
95
+ .bk-ediatable:hover::-webkit-scrollbar {
96
+ width: 8px;
97
+ height: 8px;
98
+ }
99
+ .bk-ediatable:hover::-webkit-scrollbar-thumb {
100
+ background: #dcdee5;
54
101
  border-radius: 20px;
55
102
  box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);
56
103
  }
104
+ .bk-ediatable:hover::-webkit-scrollbar-thumb:hover {
105
+ background: #979ba5;
106
+ }
107
+ .bk-ediatable.scrollbar-exists:hover::-webkit-scrollbar {
108
+ background: #f0f1f5;
109
+ }
57
110
  .bk-ediatable table {
58
111
  width: 100%;
59
112
  font-size: 12px;
@@ -77,6 +130,19 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
77
130
  line-height: 0;
78
131
  color: #313238;
79
132
  background: #f0f1f5;
133
+ position: relative;
134
+ }
135
+ .bk-ediatable table th.poiner-right::after {
136
+ content: '';
137
+ position: absolute;
138
+ top: 0;
139
+ bottom: 0;
140
+ right: -3px;
141
+ width: 6px;
142
+ background-color: #3785ff;
143
+ transform: translateX(1px);
144
+ pointer-events: none;
145
+ z-index: 1;
80
146
  }
81
147
  .bk-ediatable table th .th-cell {
82
148
  display: inline-block;
@@ -92,8 +158,38 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
92
158
  top: 0;
93
159
  bottom: 0;
94
160
  display: none;
95
- width: 1px;
96
- background: #dfe0e5;
161
+ width: 2px;
162
+ background: #3c96ff;
163
+ }
164
+ .bk-ediatable .bk-ediatable-right-fixed-column {
165
+ position: sticky;
166
+ right: 1px;
167
+ z-index: 1;
168
+ background-color: #fff;
169
+ }
170
+ .bk-ediatable .bk-ediatable-right-fixed-column::before {
171
+ position: absolute;
172
+ top: 0;
173
+ left: -10px;
174
+ width: 10px;
175
+ height: 100%;
176
+ background: linear-gradient(to left, rgba(0, 0, 0, 0.12), transparent);
177
+ content: '';
178
+ }
179
+ .bk-ediatable .bk-ediatable-left-fixed-column {
180
+ position: sticky;
181
+ left: 1px;
182
+ z-index: 1;
183
+ background-color: #fff;
184
+ }
185
+ .bk-ediatable .bk-ediatable-left-fixed-column::before {
186
+ position: absolute;
187
+ top: 0;
188
+ right: -10px;
189
+ width: 10px;
190
+ height: 100%;
191
+ background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
192
+ content: '';
97
193
  }
98
194
  .db-svg-icon {
99
195
  width: 1em;
@@ -223,77 +319,6 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
223
319
  .bk-ediatable-input .blur-dispaly-main {
224
320
  padding: 0 16px;
225
321
  }
226
- .bk-ediatable-right-fixed-column {
227
- position: sticky;
228
- right: 1px;
229
- z-index: 1;
230
- background-color: #fff;
231
- }
232
- .bk-ediatable-right-fixed-column::before {
233
- position: absolute;
234
- top: 0;
235
- left: -10px;
236
- width: 10px;
237
- height: 100%;
238
- background: linear-gradient(to left, rgba(0, 0, 0, 0.12), transparent);
239
- content: '';
240
- }
241
- .bk-ediatable-left-fixed-column {
242
- position: sticky;
243
- left: 1px;
244
- z-index: 1;
245
- background-color: #fff;
246
- }
247
- .bk-ediatable-left-fixed-column::before {
248
- position: absolute;
249
- top: 0;
250
- right: -10px;
251
- width: 10px;
252
- height: 100%;
253
- background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
254
- content: '';
255
- }
256
- .bk-ediatable-head-column .title-memo {
257
- border-bottom: 1px dashed #979ba5;
258
- }
259
- .bk-ediatable-head-column.is-required {
260
- position: relative;
261
- }
262
- .bk-ediatable-head-column.is-required::after {
263
- position: absolute;
264
- top: 0;
265
- margin-left: 4px;
266
- font-size: 12px;
267
- line-height: 40px;
268
- color: #ea3636;
269
- content: '*';
270
- }
271
- .bk-ediatable-head-column.is-right-fixed {
272
- position: sticky;
273
- right: 1px;
274
- }
275
- .bk-ediatable-head-column.is-right-fixed::before {
276
- position: absolute;
277
- top: 0;
278
- left: -10px;
279
- width: 10px;
280
- height: 100%;
281
- background: linear-gradient(to left, rgba(0, 0, 0, 0.12), transparent);
282
- content: '';
283
- }
284
- .bk-ediatable-head-column.is-left-fixed {
285
- position: sticky;
286
- left: 1px;
287
- }
288
- .bk-ediatable-head-column.is-left-fixed::before {
289
- position: absolute;
290
- top: 0;
291
- right: -10px;
292
- width: 10px;
293
- height: 100%;
294
- background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
295
- content: '';
296
- }
297
322
  .bk-ediatable-operation {
298
323
  display: flex;
299
324
  height: 42px;
@@ -367,7 +392,6 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
367
392
  top: 0;
368
393
  right: 0;
369
394
  bottom: 0;
370
- z-index: 99;
371
395
  display: flex;
372
396
  padding-right: 6px;
373
397
  font-size: 14px;
@@ -5998,10 +6022,8 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
5998
6022
  if (!dragable) {
5999
6023
  return;
6000
6024
  }
6001
- const {
6002
- columnKey,
6003
- minWidth = 100
6004
- } = payload;
6025
+ const { columnKey, minWidth = 100 } = payload;
6026
+ const target = event.target.closest("th");
6005
6027
  const tableEl = tableRef.value;
6006
6028
  const columnEl = tableEl.querySelector(`th.column-${columnKey}`);
6007
6029
  const tableLeft = tableEl.getBoundingClientRect().left;
@@ -6031,6 +6053,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
6031
6053
  resizeProxy.style.display = "block";
6032
6054
  resizeProxyLeft = Math.max(minLeft, proxyLeft);
6033
6055
  resizeProxy.style.left = `${resizeProxyLeft}px`;
6056
+ target.classList.add("poiner-right");
6034
6057
  };
6035
6058
  const handleMouseUp = () => {
6036
6059
  if (dragging.value) {
@@ -6055,15 +6078,22 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
6055
6078
  document.addEventListener("mouseup", handleMouseUp);
6056
6079
  };
6057
6080
  const handleMouseMove = (event) => {
6081
+ var _a;
6082
+ if (dragging.value) {
6083
+ return;
6084
+ }
6058
6085
  const target = event.target.closest("th");
6059
6086
  const rect = target.getBoundingClientRect();
6060
6087
  const bodyStyle = document.body.style;
6061
6088
  if (rect.width > 12 && rect.right - event.pageX < 8) {
6062
6089
  bodyStyle.cursor = "col-resize";
6063
6090
  dragable = true;
6091
+ target.classList.add("poiner-right");
6064
6092
  } else if (!dragging.value) {
6065
6093
  bodyStyle.cursor = "";
6066
6094
  dragable = false;
6095
+ target.classList.remove("poiner-right");
6096
+ (_a = target.previousElementSibling) == null ? void 0 : _a.classList.remove("poiner-right");
6067
6097
  }
6068
6098
  };
6069
6099
  const handleOuterMousemove = _.throttle((event) => {
@@ -6093,1161 +6123,321 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
6093
6123
  handleMouseMove
6094
6124
  };
6095
6125
  }
6096
- const _hoisted_1$7 = { style: { "position": "relative" } };
6097
- const renderTablekey = Symbol("renderTable");
6098
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
6099
- __name: "ediatable",
6100
- setup(__props) {
6101
- const checkTableScroll = () => {
6102
- rowWidth.value = tableRef.value.clientWidth;
6103
- isOverflow.value = tableOuterRef.value.clientWidth < tableRef.value.clientWidth;
6104
- initColumnWidth();
6105
- };
6106
- const tableOuterRef = vue.ref();
6107
- const tableRef = vue.ref();
6108
- const tableColumnResizeRef = vue.ref();
6109
- const isOverflow = vue.ref(false);
6110
- const rowWidth = vue.ref(0);
6111
- const { initColumnWidth } = useColumnResize(tableOuterRef, tableColumnResizeRef, _.debounce(checkTableScroll));
6112
- vue.provide(renderTablekey, {
6113
- isOverflow,
6114
- rowWidth
6115
- });
6116
- vue.onMounted(() => {
6117
- window.addEventListener("resize", checkTableScroll);
6118
- checkTableScroll();
6119
- setTimeout(() => checkTableScroll());
6120
- });
6121
- vue.onBeforeUnmount(() => window.removeEventListener("resize", checkTableScroll));
6122
- return (_ctx, _cache) => {
6123
- return vue.openBlock(), vue.createElementBlock(
6124
- "div",
6125
- {
6126
- id: "ediatableRenderTableKey",
6127
- ref_key: "tableOuterRef",
6128
- ref: tableOuterRef,
6129
- class: "bk-ediatable"
6130
- },
6131
- [
6132
- vue.createElementVNode(
6133
- "table",
6134
- {
6135
- ref_key: "tableRef",
6136
- ref: tableRef
6137
- },
6138
- [
6139
- vue.createElementVNode("thead", null, [
6140
- vue.createElementVNode("tr", _hoisted_1$7, [
6141
- vue.renderSlot(_ctx.$slots, "default")
6142
- ])
6143
- ]),
6144
- vue.createElementVNode("tbody", null, [
6145
- vue.renderSlot(_ctx.$slots, "data")
6146
- ])
6147
- ],
6148
- 512
6149
- /* NEED_PATCH */
6150
- ),
6151
- vue.createElementVNode(
6152
- "div",
6153
- {
6154
- ref_key: "tableColumnResizeRef",
6155
- ref: tableColumnResizeRef,
6156
- class: "table-column-resize"
6157
- },
6158
- null,
6159
- 512
6160
- /* NEED_PATCH */
6161
- )
6162
- ],
6163
- 512
6164
- /* NEED_PATCH */
6165
- );
6166
- };
6126
+ var top = "top";
6127
+ var bottom = "bottom";
6128
+ var right = "right";
6129
+ var left = "left";
6130
+ var auto = "auto";
6131
+ var basePlacements = [top, bottom, right, left];
6132
+ var start = "start";
6133
+ var end = "end";
6134
+ var clippingParents = "clippingParents";
6135
+ var viewport = "viewport";
6136
+ var popper = "popper";
6137
+ var reference = "reference";
6138
+ var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) {
6139
+ return acc.concat([placement + "-" + start, placement + "-" + end]);
6140
+ }, []);
6141
+ var placements$1 = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
6142
+ return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
6143
+ }, []);
6144
+ var beforeRead = "beforeRead";
6145
+ var read = "read";
6146
+ var afterRead = "afterRead";
6147
+ var beforeMain = "beforeMain";
6148
+ var main = "main";
6149
+ var afterMain = "afterMain";
6150
+ var beforeWrite = "beforeWrite";
6151
+ var write = "write";
6152
+ var afterWrite = "afterWrite";
6153
+ var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
6154
+ function getNodeName(element) {
6155
+ return element ? (element.nodeName || "").toLowerCase() : null;
6156
+ }
6157
+ function getWindow(node) {
6158
+ if (node == null) {
6159
+ return window;
6167
6160
  }
6168
- });
6169
- const getRuleMessage = (rule) => {
6170
- if (typeof rule.message === "function") {
6171
- return rule.message();
6161
+ if (node.toString() !== "[object Window]") {
6162
+ var ownerDocument = node.ownerDocument;
6163
+ return ownerDocument ? ownerDocument.defaultView || window : window;
6172
6164
  }
6173
- return rule.message;
6174
- };
6175
- function useValidtor(rules) {
6176
- const state = vue.reactive({
6177
- loading: false,
6178
- error: false,
6179
- message: ""
6180
- });
6181
- const validator = (targetValue) => {
6182
- state.error = false, state.message = "";
6183
- if (!rules) {
6184
- return Promise.resolve(true);
6185
- }
6186
- const run = /* @__PURE__ */ (() => {
6187
- let stepIndex = -1;
6188
- return async () => {
6189
- stepIndex = stepIndex + 1;
6190
- if (stepIndex >= rules.length) {
6191
- return Promise.resolve(true);
6192
- }
6193
- const rule = rules[stepIndex];
6194
- return Promise.resolve().then(() => {
6195
- const result = rule.validator(targetValue);
6196
- if (typeof result !== "boolean" && typeof result.then === "function") {
6197
- return result.then((data) => {
6198
- if (data === false) {
6199
- return Promise.reject(getRuleMessage(rule));
6200
- }
6201
- }).then(() => run(), () => {
6202
- state.error = true;
6203
- const message = getRuleMessage(rule);
6204
- state.message = message;
6205
- return Promise.reject(message);
6206
- });
6207
- }
6208
- if (!result) {
6209
- state.error = true;
6210
- const message = getRuleMessage(rule);
6211
- state.message = message;
6212
- return Promise.reject(message);
6213
- }
6214
- return run();
6215
- });
6216
- };
6217
- })();
6218
- return run();
6219
- };
6220
- return {
6221
- ...vue.toRefs(state),
6222
- validator
6223
- };
6165
+ return node;
6224
6166
  }
6225
- const DbIcon = vue.defineComponent({
6226
- name: "DbIcon",
6227
- props: {
6228
- type: {
6229
- type: String,
6230
- required: true
6231
- },
6232
- svg: {
6233
- type: Boolean,
6234
- default: false
6235
- }
6236
- },
6237
- render() {
6238
- if (this.svg) {
6239
- return vue.h(
6240
- "svg",
6241
- {
6242
- class: {
6243
- "db-svg-icon": true
6244
- }
6245
- },
6246
- [
6247
- vue.h("use", {
6248
- "xlink:href": `#db-icon-${this.type}`
6249
- })
6250
- ]
6251
- );
6167
+ function isElement$1(node) {
6168
+ var OwnElement = getWindow(node).Element;
6169
+ return node instanceof OwnElement || node instanceof Element;
6170
+ }
6171
+ function isHTMLElement(node) {
6172
+ var OwnElement = getWindow(node).HTMLElement;
6173
+ return node instanceof OwnElement || node instanceof HTMLElement;
6174
+ }
6175
+ function isShadowRoot(node) {
6176
+ if (typeof ShadowRoot === "undefined") {
6177
+ return false;
6178
+ }
6179
+ var OwnElement = getWindow(node).ShadowRoot;
6180
+ return node instanceof OwnElement || node instanceof ShadowRoot;
6181
+ }
6182
+ function applyStyles(_ref) {
6183
+ var state = _ref.state;
6184
+ Object.keys(state.elements).forEach(function(name) {
6185
+ var style = state.styles[name] || {};
6186
+ var attributes = state.attributes[name] || {};
6187
+ var element = state.elements[name];
6188
+ if (!isHTMLElement(element) || !getNodeName(element)) {
6189
+ return;
6252
6190
  }
6253
- const classes = {
6254
- "ediatable-icon": true,
6255
- [`icon-${this.type}`]: true
6256
- };
6257
- return vue.h("i", {
6258
- class: classes
6191
+ Object.assign(element.style, style);
6192
+ Object.keys(attributes).forEach(function(name2) {
6193
+ var value = attributes[name2];
6194
+ if (value === false) {
6195
+ element.removeAttribute(name2);
6196
+ } else {
6197
+ element.setAttribute(name2, value === true ? "" : value);
6198
+ }
6259
6199
  });
6200
+ });
6201
+ }
6202
+ function effect$2(_ref2) {
6203
+ var state = _ref2.state;
6204
+ var initialStyles = {
6205
+ popper: {
6206
+ position: state.options.strategy,
6207
+ left: "0",
6208
+ top: "0",
6209
+ margin: "0"
6210
+ },
6211
+ arrow: {
6212
+ position: "absolute"
6213
+ },
6214
+ reference: {}
6215
+ };
6216
+ Object.assign(state.elements.popper.style, initialStyles.popper);
6217
+ state.styles = initialStyles;
6218
+ if (state.elements.arrow) {
6219
+ Object.assign(state.elements.arrow.style, initialStyles.arrow);
6260
6220
  }
6261
- });
6262
- const _hoisted_1$6 = {
6263
- key: 0,
6264
- class: "input-error"
6265
- };
6266
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
6267
- __name: "date-time-picker",
6268
- props: /* @__PURE__ */ vue.mergeModels({
6269
- placeholder: { default: "" },
6270
- rules: { default: void 0 },
6271
- type: { default: void 0 },
6272
- disabled: { type: Boolean, default: false }
6273
- }, {
6274
- "modelValue": {},
6275
- "modelModifiers": {}
6276
- }),
6277
- emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
6278
- setup(__props, { expose: __expose, emit: __emit }) {
6279
- const props = __props;
6280
- const emits = __emit;
6281
- const modelValue = vue.useModel(__props, "modelValue");
6282
- const attrs = vue.useAttrs();
6283
- const slots = vue.useSlots();
6284
- const { message: errorMessage, validator } = useValidtor(props.rules);
6285
- const handleChange = (value) => {
6286
- modelValue.value = value;
6287
- validator(modelValue.value).then(() => {
6288
- emits("change", modelValue.value);
6289
- });
6290
- };
6291
- const handleOpenChange = (open) => {
6292
- if (!open) {
6293
- validator(modelValue.value);
6294
- }
6295
- };
6296
- __expose({
6297
- getValue() {
6298
- return validator(modelValue.value).then(() => modelValue.value);
6221
+ return function() {
6222
+ Object.keys(state.elements).forEach(function(name) {
6223
+ var element = state.elements[name];
6224
+ var attributes = state.attributes[name] || {};
6225
+ var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]);
6226
+ var style = styleProperties.reduce(function(style2, property) {
6227
+ style2[property] = "";
6228
+ return style2;
6229
+ }, {});
6230
+ if (!isHTMLElement(element) || !getNodeName(element)) {
6231
+ return;
6299
6232
  }
6233
+ Object.assign(element.style, style);
6234
+ Object.keys(attributes).forEach(function(attribute) {
6235
+ element.removeAttribute(attribute);
6236
+ });
6300
6237
  });
6301
- return (_ctx, _cache) => {
6302
- const _directive_bk_tooltips = vue.resolveDirective("bk-tooltips");
6303
- return vue.openBlock(), vue.createElementBlock(
6304
- "div",
6305
- {
6306
- class: vue.normalizeClass(["bk-ediatable-time-picker", {
6307
- "is-error": Boolean(vue.unref(errorMessage)),
6308
- "is-disabled": _ctx.disabled
6309
- }])
6310
- },
6311
- [
6312
- vue.createVNode(vue.unref(bkuiVue.DatePicker), vue.mergeProps({
6313
- "append-to-body": "",
6314
- clearable: false,
6315
- "model-value": modelValue.value,
6316
- placeholder: _ctx.placeholder,
6317
- style: { "width": "100%" },
6318
- type: _ctx.type
6319
- }, vue.unref(attrs), {
6320
- onChange: handleChange,
6321
- onOpenChange: handleOpenChange
6322
- }), vue.createSlots({
6323
- _: 2
6324
- /* DYNAMIC */
6325
- }, [
6326
- vue.unref(slots).footer ? {
6327
- name: "footer",
6328
- fn: vue.withCtx(() => [
6329
- vue.renderSlot(_ctx.$slots, "footer")
6330
- ]),
6331
- key: "0"
6332
- } : void 0
6333
- ]), 1040, ["model-value", "placeholder", "type"]),
6334
- vue.unref(errorMessage) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
6335
- vue.withDirectives(vue.createVNode(
6336
- vue.unref(DbIcon),
6337
- { type: "exclamation-fill" },
6338
- null,
6339
- 512
6340
- /* NEED_PATCH */
6341
- ), [
6342
- [_directive_bk_tooltips, vue.unref(errorMessage)]
6343
- ])
6344
- ])) : vue.createCommentVNode("v-if", true)
6345
- ],
6346
- 2
6347
- /* CLASS */
6348
- );
6349
- };
6350
- }
6351
- });
6352
- const random = () => `${_.random(0, 999999)}_${Date.now()}_${_.random(0, 999999)}`;
6353
- const encodeMult = (text) => {
6354
- const temp = document.createElement("textarea");
6355
- temp.value = text;
6356
- return temp.value;
6357
- };
6358
- const _hoisted_1$5 = {
6359
- key: 1,
6360
- class: "blur-dispaly-main"
6238
+ };
6239
+ }
6240
+ const applyStyles$1 = {
6241
+ name: "applyStyles",
6242
+ enabled: true,
6243
+ phase: "write",
6244
+ fn: applyStyles,
6245
+ effect: effect$2,
6246
+ requires: ["computeStyles"]
6361
6247
  };
6362
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
6363
- __name: "input",
6364
- props: /* @__PURE__ */ vue.mergeModels({
6365
- placeholder: { default: "请输入" },
6366
- rules: { default: void 0 },
6367
- disabled: { type: Boolean, default: false },
6368
- type: { default: "text" },
6369
- min: { default: Number.MIN_SAFE_INTEGER },
6370
- max: { default: Number.MAX_SAFE_INTEGER },
6371
- isShowBlur: { type: Boolean, default: false },
6372
- precision: { default: 0 }
6373
- }, {
6374
- "modelValue": {
6375
- default: ""
6376
- },
6377
- "modelModifiers": {}
6378
- }),
6379
- emits: /* @__PURE__ */ vue.mergeModels(["submit"], ["update:modelValue"]),
6380
- setup(__props, { expose: __expose, emit: __emit }) {
6381
- const props = __props;
6382
- const emits = __emit;
6383
- const modelValue = vue.useModel(__props, "modelValue");
6384
- const rootRef = vue.ref();
6385
- const isBlur = vue.ref(true);
6386
- const isPassword = vue.computed(() => props.type === "password");
6387
- let oldInputText = "";
6388
- const {
6389
- message: errorMessage,
6390
- validator
6391
- } = useValidtor(props.rules);
6392
- const handleInput = (value) => {
6393
- isBlur.value = false;
6394
- modelValue.value = value;
6395
- };
6396
- const handleBlur = (event) => {
6397
- isBlur.value = true;
6398
- if (props.disabled) {
6399
- event.preventDefault();
6400
- return;
6401
- }
6402
- if (modelValue.value) {
6403
- if (oldInputText === modelValue.value) {
6404
- return;
6405
- }
6406
- oldInputText = modelValue.value;
6407
- validator(modelValue.value).then(() => {
6408
- emits("submit", modelValue.value);
6409
- });
6410
- return;
6411
- }
6412
- emits("submit", modelValue.value);
6413
- };
6414
- const handleKeydown = (_value, event) => {
6415
- if (props.disabled) {
6416
- event.preventDefault();
6417
- return;
6418
- }
6419
- if (event.isComposing) {
6420
- return;
6421
- }
6422
- if (event.which === 13 || event.key === "Enter") {
6423
- if (oldInputText === modelValue.value) {
6424
- return;
6425
- }
6426
- oldInputText = modelValue.value;
6427
- event.preventDefault();
6428
- validator(modelValue.value).then((result) => {
6429
- if (result) {
6430
- emits("submit", modelValue.value);
6431
- }
6432
- });
6433
- }
6434
- };
6435
- const handlePaste = (_value, event) => {
6436
- event.preventDefault();
6437
- let paste = (event.clipboardData || window.clipboardData).getData("text");
6438
- paste = encodeMult(paste);
6439
- modelValue.value += paste.replace(/^\s+|\s+$/g, "");
6440
- };
6441
- __expose({
6442
- getValue() {
6443
- return validator(modelValue.value).then(() => modelValue.value);
6444
- },
6445
- focus() {
6446
- var _a;
6447
- (_a = rootRef.value.querySelector("input")) == null ? void 0 : _a.focus();
6448
- }
6449
- });
6450
- return (_ctx, _cache) => {
6451
- const _directive_bk_tooltips = vue.resolveDirective("bk-tooltips");
6452
- return vue.openBlock(), vue.createElementBlock(
6453
- "div",
6454
- {
6455
- ref_key: "rootRef",
6456
- ref: rootRef,
6457
- class: vue.normalizeClass(["bk-ediatable-input", {
6458
- "is-error": Boolean(vue.unref(errorMessage)),
6459
- "is-disabled": _ctx.disabled,
6460
- "is-password": isPassword.value
6461
- }])
6462
- },
6463
- [
6464
- vue.createVNode(vue.unref(bkuiVue.Input), vue.mergeProps({
6465
- class: "input-box",
6466
- disabled: _ctx.disabled,
6467
- max: _ctx.max,
6468
- min: _ctx.min,
6469
- "model-value": modelValue.value,
6470
- placeholder: _ctx.placeholder,
6471
- type: _ctx.type
6472
- }, _ctx.$attrs, {
6473
- precision: _ctx.precision,
6474
- onBlur: handleBlur,
6475
- onChange: handleInput,
6476
- onFocus: _cache[0] || (_cache[0] = () => isBlur.value = false),
6477
- onInput: handleInput,
6478
- onKeydown: handleKeydown,
6479
- onPaste: handlePaste
6480
- }), {
6481
- suffix: vue.withCtx(() => []),
6482
- _: 1
6483
- /* STABLE */
6484
- }, 16, ["disabled", "max", "min", "model-value", "placeholder", "type", "precision"]),
6485
- vue.unref(errorMessage) ? vue.withDirectives((vue.openBlock(), vue.createBlock(
6486
- vue.unref(DbIcon),
6487
- {
6488
- key: 0,
6489
- class: "error-icon",
6490
- type: "exclamation-fill"
6491
- },
6492
- null,
6493
- 512
6494
- /* NEED_PATCH */
6495
- )), [
6496
- [_directive_bk_tooltips, vue.unref(errorMessage)]
6497
- ]) : vue.createCommentVNode("v-if", true),
6498
- _ctx.isShowBlur && isBlur.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
6499
- vue.renderSlot(_ctx.$slots, "blur")
6500
- ])) : vue.createCommentVNode("v-if", true)
6501
- ],
6502
- 2
6503
- /* CLASS */
6504
- );
6505
- };
6248
+ function getBasePlacement$1(placement) {
6249
+ return placement.split("-")[0];
6250
+ }
6251
+ var max = Math.max;
6252
+ var min = Math.min;
6253
+ var round = Math.round;
6254
+ function getUAString() {
6255
+ var uaData = navigator.userAgentData;
6256
+ if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
6257
+ return uaData.brands.map(function(item) {
6258
+ return item.brand + "/" + item.version;
6259
+ }).join(" ");
6506
6260
  }
6507
- });
6508
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
6509
- __name: "fixed-column",
6510
- props: {
6511
- fixed: { default: "right" }
6512
- },
6513
- setup(__props) {
6514
- const props = __props;
6515
- const { isOverflow: isFixed } = vue.inject(renderTablekey);
6516
- const isFixedRight = vue.computed(() => (isFixed == null ? void 0 : isFixed.value) && props.fixed === "right");
6517
- const isFixedLeft = vue.computed(() => (isFixed == null ? void 0 : isFixed.value) && props.fixed === "left");
6518
- return (_ctx, _cache) => {
6519
- return vue.openBlock(), vue.createElementBlock(
6520
- "td",
6521
- {
6522
- class: vue.normalizeClass({
6523
- "bk-ediatable-right-fixed-column": isFixedRight.value,
6524
- "bk-ediatable-left-fixed-column": isFixedLeft.value
6525
- })
6526
- },
6527
- [
6528
- vue.renderSlot(_ctx.$slots, "default")
6529
- ],
6530
- 2
6531
- /* CLASS */
6532
- );
6533
- };
6261
+ return navigator.userAgent;
6262
+ }
6263
+ function isLayoutViewport() {
6264
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
6265
+ }
6266
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
6267
+ if (includeScale === void 0) {
6268
+ includeScale = false;
6534
6269
  }
6535
- });
6536
- function tryOnScopeDispose(fn) {
6537
- if (vue.getCurrentScope()) {
6538
- vue.onScopeDispose(fn);
6270
+ if (isFixedStrategy === void 0) {
6271
+ isFixedStrategy = false;
6272
+ }
6273
+ var clientRect = element.getBoundingClientRect();
6274
+ var scaleX = 1;
6275
+ var scaleY = 1;
6276
+ if (includeScale && isHTMLElement(element)) {
6277
+ scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
6278
+ scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
6279
+ }
6280
+ var _ref = isElement$1(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
6281
+ var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
6282
+ var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
6283
+ var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
6284
+ var width = clientRect.width / scaleX;
6285
+ var height = clientRect.height / scaleY;
6286
+ return {
6287
+ width,
6288
+ height,
6289
+ top: y,
6290
+ right: x + width,
6291
+ bottom: y + height,
6292
+ left: x,
6293
+ x,
6294
+ y
6295
+ };
6296
+ }
6297
+ function getLayoutRect(element) {
6298
+ var clientRect = getBoundingClientRect(element);
6299
+ var width = element.offsetWidth;
6300
+ var height = element.offsetHeight;
6301
+ if (Math.abs(clientRect.width - width) <= 1) {
6302
+ width = clientRect.width;
6303
+ }
6304
+ if (Math.abs(clientRect.height - height) <= 1) {
6305
+ height = clientRect.height;
6306
+ }
6307
+ return {
6308
+ x: element.offsetLeft,
6309
+ y: element.offsetTop,
6310
+ width,
6311
+ height
6312
+ };
6313
+ }
6314
+ function contains(parent, child) {
6315
+ var rootNode = child.getRootNode && child.getRootNode();
6316
+ if (parent.contains(child)) {
6539
6317
  return true;
6318
+ } else if (rootNode && isShadowRoot(rootNode)) {
6319
+ var next = child;
6320
+ do {
6321
+ if (next && parent.isSameNode(next)) {
6322
+ return true;
6323
+ }
6324
+ next = next.parentNode || next.host;
6325
+ } while (next);
6540
6326
  }
6541
6327
  return false;
6542
6328
  }
6543
- function toValue(r) {
6544
- return typeof r === "function" ? r() : vue.unref(r);
6329
+ function getComputedStyle(element) {
6330
+ return getWindow(element).getComputedStyle(element);
6545
6331
  }
6546
- const isClient = typeof window !== "undefined" && typeof document !== "undefined";
6547
- typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
6548
- function unrefElement(elRef) {
6549
- var _a;
6550
- const plain = toValue(elRef);
6551
- return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
6332
+ function isTableElement(element) {
6333
+ return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
6552
6334
  }
6553
- const defaultWindow = isClient ? window : void 0;
6554
- function useMounted() {
6555
- const isMounted = vue.ref(false);
6556
- const instance = vue.getCurrentInstance();
6557
- if (instance) {
6558
- vue.onMounted(() => {
6559
- isMounted.value = true;
6560
- }, instance);
6561
- }
6562
- return isMounted;
6335
+ function getDocumentElement(element) {
6336
+ return ((isElement$1(element) ? element.ownerDocument : (
6337
+ // $FlowFixMe[prop-missing]
6338
+ element.document
6339
+ )) || window.document).documentElement;
6563
6340
  }
6564
- function useSupported(callback) {
6565
- const isMounted = useMounted();
6566
- return vue.computed(() => {
6567
- isMounted.value;
6568
- return Boolean(callback());
6569
- });
6341
+ function getParentNode(element) {
6342
+ if (getNodeName(element) === "html") {
6343
+ return element;
6344
+ }
6345
+ return (
6346
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
6347
+ // $FlowFixMe[incompatible-return]
6348
+ // $FlowFixMe[prop-missing]
6349
+ element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
6350
+ element.parentNode || // DOM Element detected
6351
+ (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
6352
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
6353
+ getDocumentElement(element)
6354
+ );
6570
6355
  }
6571
- function useResizeObserver(target, callback, options = {}) {
6572
- const { window: window2 = defaultWindow, ...observerOptions } = options;
6573
- let observer;
6574
- const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
6575
- const cleanup = () => {
6576
- if (observer) {
6577
- observer.disconnect();
6578
- observer = void 0;
6356
+ function getTrueOffsetParent(element) {
6357
+ if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
6358
+ getComputedStyle(element).position === "fixed") {
6359
+ return null;
6360
+ }
6361
+ return element.offsetParent;
6362
+ }
6363
+ function getContainingBlock(element) {
6364
+ var isFirefox = /firefox/i.test(getUAString());
6365
+ var isIE = /Trident/i.test(getUAString());
6366
+ if (isIE && isHTMLElement(element)) {
6367
+ var elementCss = getComputedStyle(element);
6368
+ if (elementCss.position === "fixed") {
6369
+ return null;
6579
6370
  }
6580
- };
6581
- const targets = vue.computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);
6582
- const stopWatch = vue.watch(
6583
- targets,
6584
- (els) => {
6585
- cleanup();
6586
- if (isSupported.value && window2) {
6587
- observer = new ResizeObserver(callback);
6588
- for (const _el of els)
6589
- _el && observer.observe(_el, observerOptions);
6590
- }
6591
- },
6592
- { immediate: true, flush: "post" }
6593
- );
6594
- const stop = () => {
6595
- cleanup();
6596
- stopWatch();
6597
- };
6598
- tryOnScopeDispose(stop);
6371
+ }
6372
+ var currentNode = getParentNode(element);
6373
+ if (isShadowRoot(currentNode)) {
6374
+ currentNode = currentNode.host;
6375
+ }
6376
+ while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
6377
+ var css = getComputedStyle(currentNode);
6378
+ if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") {
6379
+ return currentNode;
6380
+ } else {
6381
+ currentNode = currentNode.parentNode;
6382
+ }
6383
+ }
6384
+ return null;
6385
+ }
6386
+ function getOffsetParent(element) {
6387
+ var window2 = getWindow(element);
6388
+ var offsetParent = getTrueOffsetParent(element);
6389
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
6390
+ offsetParent = getTrueOffsetParent(offsetParent);
6391
+ }
6392
+ if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) {
6393
+ return window2;
6394
+ }
6395
+ return offsetParent || getContainingBlock(element) || window2;
6396
+ }
6397
+ function getMainAxisFromPlacement(placement) {
6398
+ return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
6399
+ }
6400
+ function within(min$1, value, max$1) {
6401
+ return max(min$1, min(value, max$1));
6402
+ }
6403
+ function withinMaxClamp(min2, value, max2) {
6404
+ var v = within(min2, value, max2);
6405
+ return v > max2 ? max2 : v;
6406
+ }
6407
+ function getFreshSideObject() {
6599
6408
  return {
6600
- isSupported,
6601
- stop
6409
+ top: 0,
6410
+ right: 0,
6411
+ bottom: 0,
6412
+ left: 0
6602
6413
  };
6603
6414
  }
6604
- const _hoisted_1$4 = ["data-fixed", "data-maxWidth", "data-minWidth", "data-width"];
6605
- const _hoisted_2$2 = { class: "th-cell" };
6606
- const _hoisted_3$1 = {
6607
- key: 0,
6608
- style: { "display": "inline-block", "line-height": "40px", "vertical-align": "top" }
6415
+ function mergePaddingObject(paddingObject) {
6416
+ return Object.assign({}, getFreshSideObject(), paddingObject);
6417
+ }
6418
+ function expandToHashMap(value, keys) {
6419
+ return keys.reduce(function(hashMap, key) {
6420
+ hashMap[key] = value;
6421
+ return hashMap;
6422
+ }, {});
6423
+ }
6424
+ var toPaddingObject = function toPaddingObject2(padding, state) {
6425
+ padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, {
6426
+ placement: state.placement
6427
+ })) : padding;
6428
+ return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
6609
6429
  };
6610
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
6611
- __name: "head-column",
6612
- props: {
6613
- width: { default: void 0 },
6614
- required: { type: Boolean, default: true },
6615
- minWidth: { default: void 0 },
6616
- maxWidth: { default: void 0 },
6617
- fixed: { default: void 0 },
6618
- memo: { default: void 0 }
6619
- },
6620
- setup(__props) {
6621
- const props = __props;
6622
- const { rowWidth, isOverflow: isMinimize } = vue.inject(renderTablekey);
6623
- const parentTable = vue.inject(tableColumnResizekey);
6624
- const slots = vue.useSlots();
6625
- const columnRef = vue.ref();
6626
- const currentWidth = vue.ref(0);
6627
- const columnKey = random();
6628
- let initWidthRate = 0;
6629
- let isDragedSelf = false;
6630
- const finalMinWidth = vue.computed(() => props.minWidth ? props.minWidth : props.width ?? 100);
6631
- const isFixedRight = vue.computed(() => props.fixed === "right");
6632
- const isFixedLeft = vue.computed(() => props.fixed === "left");
6633
- const styles = vue.computed(() => {
6634
- if (props.width && (rowWidth == null ? void 0 : rowWidth.value) && finalMinWidth.value) {
6635
- const newWidth = rowWidth.value * initWidthRate;
6636
- if (newWidth !== props.width) {
6637
- let width = 0;
6638
- if (isMinimize == null ? void 0 : isMinimize.value) {
6639
- if (currentWidth.value !== 0 && (currentWidth.value !== finalMinWidth.value || currentWidth.value !== props.width)) {
6640
- width = currentWidth.value;
6641
- } else {
6642
- width = finalMinWidth.value;
6643
- }
6644
- } else if (newWidth > finalMinWidth.value) {
6645
- width = newWidth;
6646
- } else {
6647
- width = finalMinWidth.value;
6648
- }
6649
- return {
6650
- minWidth: `${width}px`
6651
- };
6652
- }
6653
- }
6654
- return {
6655
- minWidth: props.width ? `${props.width}px` : "120px"
6656
- };
6657
- });
6658
- vue.watch(() => [props.width, rowWidth == null ? void 0 : rowWidth.value, currentWidth.value], ([width, rowWidth2, currentWidth2]) => {
6659
- if (!isDragedSelf) {
6660
- return;
6661
- }
6662
- if (width && rowWidth2 && currentWidth2 && finalMinWidth.value) {
6663
- isDragedSelf = false;
6664
- if (currentWidth2 !== 0 && (currentWidth2 !== finalMinWidth.value || currentWidth2 !== width)) {
6665
- initWidthRate = currentWidth2 / rowWidth2;
6666
- } else {
6667
- initWidthRate = (isMinimize == null ? void 0 : isMinimize.value) ? finalMinWidth.value / rowWidth2 : width / rowWidth2;
6668
- }
6669
- }
6670
- }, {
6671
- immediate: true
6672
- });
6673
- useResizeObserver(columnRef, () => {
6674
- if (!isDragedSelf) {
6675
- return;
6676
- }
6677
- const width = parseFloat(columnRef.value.style.width);
6678
- currentWidth.value = width;
6679
- });
6680
- const handleMouseDown = (event) => {
6681
- isDragedSelf = true;
6682
- parentTable == null ? void 0 : parentTable.columnMousedown(event, {
6683
- columnKey,
6684
- minWidth: finalMinWidth.value
6685
- });
6686
- };
6687
- const handleMouseMove = (event) => {
6688
- parentTable == null ? void 0 : parentTable.columnMouseMove(event);
6689
- };
6690
- return (_ctx, _cache) => {
6691
- const _directive_overflow_tips = vue.resolveDirective("overflow-tips");
6692
- const _directive_bk_tooltips = vue.resolveDirective("bk-tooltips");
6693
- return vue.openBlock(), vue.createElementBlock("th", {
6694
- ref_key: "columnRef",
6695
- ref: columnRef,
6696
- class: vue.normalizeClass(["bk-ediatable-head-column", {
6697
- "is-required": _ctx.required,
6698
- [`column-${vue.unref(columnKey)}`]: true,
6699
- "is-right-fixed": vue.unref(isMinimize) && isFixedRight.value,
6700
- "is-left-fixed": vue.unref(isMinimize) && isFixedLeft.value
6701
- }]),
6702
- "data-fixed": _ctx.fixed,
6703
- "data-maxWidth": _ctx.maxWidth,
6704
- "data-minWidth": finalMinWidth.value,
6705
- "data-width": _ctx.width,
6706
- style: vue.normalizeStyle(styles.value),
6707
- onMousedown: handleMouseDown,
6708
- onMousemove: handleMouseMove
6709
- }, [
6710
- vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, [
6711
- vue.createElementVNode(
6712
- "span",
6713
- {
6714
- class: vue.normalizeClass({ "title-memo": _ctx.memo })
6715
- },
6716
- [
6717
- vue.renderSlot(_ctx.$slots, "default")
6718
- ],
6719
- 2
6720
- /* CLASS */
6721
- )
6722
- ])), [
6723
- [_directive_overflow_tips],
6724
- [_directive_bk_tooltips, {
6725
- content: _ctx.memo,
6726
- disabled: !_ctx.memo
6727
- }]
6728
- ]),
6729
- vue.unref(slots).append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1, [
6730
- vue.renderSlot(_ctx.$slots, "append")
6731
- ])) : vue.createCommentVNode("v-if", true)
6732
- ], 46, _hoisted_1$4);
6733
- };
6734
- }
6735
- });
6736
- const _hoisted_1$3 = { class: "bk-ediatable-operation" };
6737
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
6738
- __name: "operation",
6739
- props: {
6740
- showCopy: { type: Boolean, default: false },
6741
- showAdd: { type: Boolean, default: true },
6742
- showRemove: { type: Boolean, default: true },
6743
- removeable: { type: Boolean, default: true }
6744
- },
6745
- emits: ["copy", "add", "remove"],
6746
- setup(__props, { emit: __emit }) {
6747
- const props = __props;
6748
- const emits = __emit;
6749
- const handleCopy = () => {
6750
- emits("copy");
6751
- };
6752
- const handleAppend = () => {
6753
- emits("add");
6754
- };
6755
- const handleRemove = () => {
6756
- if (props.removeable) {
6757
- return;
6758
- }
6759
- emits("remove");
6760
- };
6761
- return (_ctx, _cache) => {
6762
- return vue.openBlock(), vue.createBlock(_sfc_main$5, null, {
6763
- default: vue.withCtx(() => [
6764
- vue.createElementVNode("div", _hoisted_1$3, [
6765
- _ctx.showCopy ? (vue.openBlock(), vue.createElementBlock("div", {
6766
- key: 0,
6767
- class: "action-btn",
6768
- onClick: handleCopy
6769
- }, [
6770
- vue.createVNode(vue.unref(DbIcon), { type: "copy" })
6771
- ])) : vue.createCommentVNode("v-if", true),
6772
- _ctx.showAdd ? (vue.openBlock(), vue.createElementBlock("div", {
6773
- key: 1,
6774
- class: "action-btn",
6775
- onClick: handleAppend
6776
- }, [
6777
- vue.createVNode(vue.unref(DbIcon), { type: "plus-fill" })
6778
- ])) : vue.createCommentVNode("v-if", true),
6779
- _ctx.showRemove ? (vue.openBlock(), vue.createElementBlock(
6780
- "div",
6781
- {
6782
- key: 2,
6783
- class: vue.normalizeClass(["action-btn", {
6784
- disabled: _ctx.removeable
6785
- }]),
6786
- onClick: handleRemove
6787
- },
6788
- [
6789
- vue.createVNode(vue.unref(DbIcon), { type: "minus-fill" })
6790
- ],
6791
- 2
6792
- /* CLASS */
6793
- )) : vue.createCommentVNode("v-if", true)
6794
- ])
6795
- ]),
6796
- _: 1
6797
- /* STABLE */
6798
- });
6799
- };
6800
- }
6801
- });
6802
- const _hoisted_1$2 = {
6803
- key: 0,
6804
- class: "select-error"
6805
- };
6806
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
6807
- __name: "select",
6808
- props: /* @__PURE__ */ vue.mergeModels({
6809
- list: {},
6810
- placeholder: { default: "请选择" },
6811
- rules: { default: () => [] },
6812
- disabled: { type: Boolean, default: false },
6813
- multiple: { type: Boolean, default: false },
6814
- showSelectAll: { type: Boolean, default: false }
6815
- }, {
6816
- "modelValue": {},
6817
- "modelModifiers": {}
6818
- }),
6819
- emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
6820
- setup(__props, { expose: __expose, emit: __emit }) {
6821
- const { Option } = bkuiVue.Select;
6822
- const props = __props;
6823
- const emits = __emit;
6824
- const modelValue = vue.useModel(__props, "modelValue");
6825
- const rootRef = vue.ref();
6826
- const localValue = vue.ref("");
6827
- const rootHeight = vue.ref(42);
6828
- const { message: errorMessage, validator } = useValidtor(props.rules);
6829
- vue.watch(
6830
- modelValue,
6831
- (value) => {
6832
- if (value === void 0) {
6833
- return;
6834
- }
6835
- localValue.value = value;
6836
- if (typeof value !== "object" && value) {
6837
- validator(value);
6838
- return;
6839
- }
6840
- if (Array.isArray(value) && value.length > 0) {
6841
- validator(value);
6842
- return;
6843
- }
6844
- },
6845
- {
6846
- immediate: true
6847
- }
6848
- );
6849
- const handleSelect = (value) => {
6850
- localValue.value = value;
6851
- validator(localValue.value).then(() => {
6852
- modelValue.value = value;
6853
- emits("change", localValue.value);
6854
- });
6855
- };
6856
- const handleRemove = () => {
6857
- localValue.value = "";
6858
- validator(localValue.value).then(() => {
6859
- modelValue.value = localValue.value;
6860
- emits("change", localValue.value);
6861
- });
6862
- };
6863
- const checkRootHeight = () => {
6864
- rootHeight.value = rootRef.value.parentNode.clientHeight;
6865
- };
6866
- useResizeObserver(rootRef, _.throttle(checkRootHeight, 500));
6867
- __expose({
6868
- getValue() {
6869
- return validator(localValue.value).then(() => localValue.value);
6870
- }
6871
- });
6872
- return (_ctx, _cache) => {
6873
- const _directive_bk_tooltips = vue.resolveDirective("bk-tooltips");
6874
- return vue.openBlock(), vue.createElementBlock(
6875
- "div",
6876
- {
6877
- ref_key: "rootRef",
6878
- ref: rootRef,
6879
- class: vue.normalizeClass(["bk-ediatable-select", {
6880
- "is-error": Boolean(vue.unref(errorMessage)),
6881
- "is-disable": _ctx.disabled
6882
- }]),
6883
- style: vue.normalizeStyle({ height: rootHeight.value + "px" })
6884
- },
6885
- [
6886
- vue.createVNode(vue.unref(bkuiVue.Select), vue.mergeProps(_ctx.$attrs, {
6887
- "model-value": localValue.value,
6888
- "auto-focus": "",
6889
- class: "select-box",
6890
- clearable: false,
6891
- disabled: _ctx.disabled,
6892
- filterable: "",
6893
- "input-search": false,
6894
- multiple: _ctx.multiple,
6895
- placeholder: _ctx.placeholder,
6896
- "show-select-all": _ctx.showSelectAll,
6897
- onChange: handleSelect,
6898
- onClear: handleRemove
6899
- }), {
6900
- default: vue.withCtx(() => [
6901
- (vue.openBlock(true), vue.createElementBlock(
6902
- vue.Fragment,
6903
- null,
6904
- vue.renderList(_ctx.list, (item, index) => {
6905
- return vue.openBlock(), vue.createBlock(vue.unref(Option), {
6906
- key: index,
6907
- label: item.label,
6908
- value: item.value
6909
- }, null, 8, ["label", "value"]);
6910
- }),
6911
- 128
6912
- /* KEYED_FRAGMENT */
6913
- ))
6914
- ]),
6915
- _: 1
6916
- /* STABLE */
6917
- }, 16, ["model-value", "disabled", "multiple", "placeholder", "show-select-all"]),
6918
- vue.unref(errorMessage) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
6919
- vue.withDirectives(vue.createVNode(
6920
- vue.unref(DbIcon),
6921
- { type: "exclamation-fill" },
6922
- null,
6923
- 512
6924
- /* NEED_PATCH */
6925
- ), [
6926
- [_directive_bk_tooltips, vue.unref(errorMessage)]
6927
- ])
6928
- ])) : vue.createCommentVNode("v-if", true)
6929
- ],
6930
- 6
6931
- /* CLASS, STYLE */
6932
- );
6933
- };
6934
- }
6935
- });
6936
- var top = "top";
6937
- var bottom = "bottom";
6938
- var right = "right";
6939
- var left = "left";
6940
- var auto = "auto";
6941
- var basePlacements = [top, bottom, right, left];
6942
- var start = "start";
6943
- var end = "end";
6944
- var clippingParents = "clippingParents";
6945
- var viewport = "viewport";
6946
- var popper = "popper";
6947
- var reference = "reference";
6948
- var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) {
6949
- return acc.concat([placement + "-" + start, placement + "-" + end]);
6950
- }, []);
6951
- var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
6952
- return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
6953
- }, []);
6954
- var beforeRead = "beforeRead";
6955
- var read = "read";
6956
- var afterRead = "afterRead";
6957
- var beforeMain = "beforeMain";
6958
- var main = "main";
6959
- var afterMain = "afterMain";
6960
- var beforeWrite = "beforeWrite";
6961
- var write = "write";
6962
- var afterWrite = "afterWrite";
6963
- var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
6964
- function getNodeName(element) {
6965
- return element ? (element.nodeName || "").toLowerCase() : null;
6966
- }
6967
- function getWindow(node) {
6968
- if (node == null) {
6969
- return window;
6970
- }
6971
- if (node.toString() !== "[object Window]") {
6972
- var ownerDocument = node.ownerDocument;
6973
- return ownerDocument ? ownerDocument.defaultView || window : window;
6974
- }
6975
- return node;
6976
- }
6977
- function isElement$1(node) {
6978
- var OwnElement = getWindow(node).Element;
6979
- return node instanceof OwnElement || node instanceof Element;
6980
- }
6981
- function isHTMLElement(node) {
6982
- var OwnElement = getWindow(node).HTMLElement;
6983
- return node instanceof OwnElement || node instanceof HTMLElement;
6984
- }
6985
- function isShadowRoot(node) {
6986
- if (typeof ShadowRoot === "undefined") {
6987
- return false;
6988
- }
6989
- var OwnElement = getWindow(node).ShadowRoot;
6990
- return node instanceof OwnElement || node instanceof ShadowRoot;
6991
- }
6992
- function applyStyles(_ref) {
6993
- var state = _ref.state;
6994
- Object.keys(state.elements).forEach(function(name) {
6995
- var style = state.styles[name] || {};
6996
- var attributes = state.attributes[name] || {};
6997
- var element = state.elements[name];
6998
- if (!isHTMLElement(element) || !getNodeName(element)) {
6999
- return;
7000
- }
7001
- Object.assign(element.style, style);
7002
- Object.keys(attributes).forEach(function(name2) {
7003
- var value = attributes[name2];
7004
- if (value === false) {
7005
- element.removeAttribute(name2);
7006
- } else {
7007
- element.setAttribute(name2, value === true ? "" : value);
7008
- }
7009
- });
7010
- });
7011
- }
7012
- function effect$2(_ref2) {
7013
- var state = _ref2.state;
7014
- var initialStyles = {
7015
- popper: {
7016
- position: state.options.strategy,
7017
- left: "0",
7018
- top: "0",
7019
- margin: "0"
7020
- },
7021
- arrow: {
7022
- position: "absolute"
7023
- },
7024
- reference: {}
7025
- };
7026
- Object.assign(state.elements.popper.style, initialStyles.popper);
7027
- state.styles = initialStyles;
7028
- if (state.elements.arrow) {
7029
- Object.assign(state.elements.arrow.style, initialStyles.arrow);
7030
- }
7031
- return function() {
7032
- Object.keys(state.elements).forEach(function(name) {
7033
- var element = state.elements[name];
7034
- var attributes = state.attributes[name] || {};
7035
- var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]);
7036
- var style = styleProperties.reduce(function(style2, property) {
7037
- style2[property] = "";
7038
- return style2;
7039
- }, {});
7040
- if (!isHTMLElement(element) || !getNodeName(element)) {
7041
- return;
7042
- }
7043
- Object.assign(element.style, style);
7044
- Object.keys(attributes).forEach(function(attribute) {
7045
- element.removeAttribute(attribute);
7046
- });
7047
- });
7048
- };
7049
- }
7050
- const applyStyles$1 = {
7051
- name: "applyStyles",
7052
- enabled: true,
7053
- phase: "write",
7054
- fn: applyStyles,
7055
- effect: effect$2,
7056
- requires: ["computeStyles"]
7057
- };
7058
- function getBasePlacement$1(placement) {
7059
- return placement.split("-")[0];
7060
- }
7061
- var max = Math.max;
7062
- var min = Math.min;
7063
- var round = Math.round;
7064
- function getUAString() {
7065
- var uaData = navigator.userAgentData;
7066
- if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
7067
- return uaData.brands.map(function(item) {
7068
- return item.brand + "/" + item.version;
7069
- }).join(" ");
7070
- }
7071
- return navigator.userAgent;
7072
- }
7073
- function isLayoutViewport() {
7074
- return !/^((?!chrome|android).)*safari/i.test(getUAString());
7075
- }
7076
- function getBoundingClientRect(element, includeScale, isFixedStrategy) {
7077
- if (includeScale === void 0) {
7078
- includeScale = false;
7079
- }
7080
- if (isFixedStrategy === void 0) {
7081
- isFixedStrategy = false;
7082
- }
7083
- var clientRect = element.getBoundingClientRect();
7084
- var scaleX = 1;
7085
- var scaleY = 1;
7086
- if (includeScale && isHTMLElement(element)) {
7087
- scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
7088
- scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
7089
- }
7090
- var _ref = isElement$1(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
7091
- var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
7092
- var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
7093
- var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
7094
- var width = clientRect.width / scaleX;
7095
- var height = clientRect.height / scaleY;
7096
- return {
7097
- width,
7098
- height,
7099
- top: y,
7100
- right: x + width,
7101
- bottom: y + height,
7102
- left: x,
7103
- x,
7104
- y
7105
- };
7106
- }
7107
- function getLayoutRect(element) {
7108
- var clientRect = getBoundingClientRect(element);
7109
- var width = element.offsetWidth;
7110
- var height = element.offsetHeight;
7111
- if (Math.abs(clientRect.width - width) <= 1) {
7112
- width = clientRect.width;
7113
- }
7114
- if (Math.abs(clientRect.height - height) <= 1) {
7115
- height = clientRect.height;
7116
- }
7117
- return {
7118
- x: element.offsetLeft,
7119
- y: element.offsetTop,
7120
- width,
7121
- height
7122
- };
7123
- }
7124
- function contains(parent, child) {
7125
- var rootNode = child.getRootNode && child.getRootNode();
7126
- if (parent.contains(child)) {
7127
- return true;
7128
- } else if (rootNode && isShadowRoot(rootNode)) {
7129
- var next = child;
7130
- do {
7131
- if (next && parent.isSameNode(next)) {
7132
- return true;
7133
- }
7134
- next = next.parentNode || next.host;
7135
- } while (next);
7136
- }
7137
- return false;
7138
- }
7139
- function getComputedStyle(element) {
7140
- return getWindow(element).getComputedStyle(element);
7141
- }
7142
- function isTableElement(element) {
7143
- return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
7144
- }
7145
- function getDocumentElement(element) {
7146
- return ((isElement$1(element) ? element.ownerDocument : (
7147
- // $FlowFixMe[prop-missing]
7148
- element.document
7149
- )) || window.document).documentElement;
7150
- }
7151
- function getParentNode(element) {
7152
- if (getNodeName(element) === "html") {
7153
- return element;
7154
- }
7155
- return (
7156
- // this is a quicker (but less type safe) way to save quite some bytes from the bundle
7157
- // $FlowFixMe[incompatible-return]
7158
- // $FlowFixMe[prop-missing]
7159
- element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
7160
- element.parentNode || // DOM Element detected
7161
- (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
7162
- // $FlowFixMe[incompatible-call]: HTMLElement is a Node
7163
- getDocumentElement(element)
7164
- );
7165
- }
7166
- function getTrueOffsetParent(element) {
7167
- if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
7168
- getComputedStyle(element).position === "fixed") {
7169
- return null;
7170
- }
7171
- return element.offsetParent;
7172
- }
7173
- function getContainingBlock(element) {
7174
- var isFirefox = /firefox/i.test(getUAString());
7175
- var isIE = /Trident/i.test(getUAString());
7176
- if (isIE && isHTMLElement(element)) {
7177
- var elementCss = getComputedStyle(element);
7178
- if (elementCss.position === "fixed") {
7179
- return null;
7180
- }
7181
- }
7182
- var currentNode = getParentNode(element);
7183
- if (isShadowRoot(currentNode)) {
7184
- currentNode = currentNode.host;
7185
- }
7186
- while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
7187
- var css = getComputedStyle(currentNode);
7188
- if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") {
7189
- return currentNode;
7190
- } else {
7191
- currentNode = currentNode.parentNode;
7192
- }
7193
- }
7194
- return null;
7195
- }
7196
- function getOffsetParent(element) {
7197
- var window2 = getWindow(element);
7198
- var offsetParent = getTrueOffsetParent(element);
7199
- while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
7200
- offsetParent = getTrueOffsetParent(offsetParent);
7201
- }
7202
- if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) {
7203
- return window2;
7204
- }
7205
- return offsetParent || getContainingBlock(element) || window2;
7206
- }
7207
- function getMainAxisFromPlacement(placement) {
7208
- return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
7209
- }
7210
- function within(min$1, value, max$1) {
7211
- return max(min$1, min(value, max$1));
7212
- }
7213
- function withinMaxClamp(min2, value, max2) {
7214
- var v = within(min2, value, max2);
7215
- return v > max2 ? max2 : v;
7216
- }
7217
- function getFreshSideObject() {
7218
- return {
7219
- top: 0,
7220
- right: 0,
7221
- bottom: 0,
7222
- left: 0
7223
- };
7224
- }
7225
- function mergePaddingObject(paddingObject) {
7226
- return Object.assign({}, getFreshSideObject(), paddingObject);
7227
- }
7228
- function expandToHashMap(value, keys) {
7229
- return keys.reduce(function(hashMap, key) {
7230
- hashMap[key] = value;
7231
- return hashMap;
7232
- }, {});
7233
- }
7234
- var toPaddingObject = function toPaddingObject2(padding, state) {
7235
- padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, {
7236
- placement: state.placement
7237
- })) : padding;
7238
- return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
7239
- };
7240
- function arrow(_ref) {
7241
- var _state$modifiersData$;
7242
- var state = _ref.state, name = _ref.name, options = _ref.options;
7243
- var arrowElement = state.elements.arrow;
7244
- var popperOffsets2 = state.modifiersData.popperOffsets;
7245
- var basePlacement = getBasePlacement$1(state.placement);
7246
- var axis = getMainAxisFromPlacement(basePlacement);
7247
- var isVertical = [left, right].indexOf(basePlacement) >= 0;
7248
- var len = isVertical ? "height" : "width";
7249
- if (!arrowElement || !popperOffsets2) {
7250
- return;
6430
+ function arrow(_ref) {
6431
+ var _state$modifiersData$;
6432
+ var state = _ref.state, name = _ref.name, options = _ref.options;
6433
+ var arrowElement = state.elements.arrow;
6434
+ var popperOffsets2 = state.modifiersData.popperOffsets;
6435
+ var basePlacement = getBasePlacement$1(state.placement);
6436
+ var axis = getMainAxisFromPlacement(basePlacement);
6437
+ var isVertical = [left, right].indexOf(basePlacement) >= 0;
6438
+ var len = isVertical ? "height" : "width";
6439
+ if (!arrowElement || !popperOffsets2) {
6440
+ return;
7251
6441
  }
7252
6442
  var paddingObject = toPaddingObject(options.padding, state);
7253
6443
  var arrowRect = getLayoutRect(arrowElement);
@@ -7696,16 +6886,16 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
7696
6886
  if (options === void 0) {
7697
6887
  options = {};
7698
6888
  }
7699
- var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
6889
+ var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements$1 : _options$allowedAutoP;
7700
6890
  var variation = getVariation(placement);
7701
- var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {
6891
+ var placements2 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {
7702
6892
  return getVariation(placement2) === variation;
7703
6893
  }) : basePlacements;
7704
- var allowedPlacements = placements$1.filter(function(placement2) {
6894
+ var allowedPlacements = placements2.filter(function(placement2) {
7705
6895
  return allowedAutoPlacements.indexOf(placement2) >= 0;
7706
6896
  });
7707
6897
  if (allowedPlacements.length === 0) {
7708
- allowedPlacements = placements$1;
6898
+ allowedPlacements = placements2;
7709
6899
  }
7710
6900
  var overflows = allowedPlacements.reduce(function(acc, placement2) {
7711
6901
  acc[placement2] = detectOverflow(state, {
@@ -7804,8 +6994,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
7804
6994
  };
7805
6995
  for (var _i = numberOfChecks; _i > 0; _i--) {
7806
6996
  var _ret = _loop(_i);
7807
- if (_ret === "break")
7808
- break;
6997
+ if (_ret === "break") break;
7809
6998
  }
7810
6999
  }
7811
7000
  if (state.placement !== firstFittingPlacement) {
@@ -7895,7 +7084,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
7895
7084
  function offset(_ref2) {
7896
7085
  var state = _ref2.state, options = _ref2.options, name = _ref2.name;
7897
7086
  var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset;
7898
- var data = placements.reduce(function(acc, placement) {
7087
+ var data = placements$1.reduce(function(acc, placement) {
7899
7088
  acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2);
7900
7089
  return acc;
7901
7090
  }, {});
@@ -8492,7 +7681,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
8492
7681
  theme: "",
8493
7682
  zIndex: 9999
8494
7683
  };
8495
- var defaultProps = Object.assign({
7684
+ var defaultProps$1 = Object.assign({
8496
7685
  appendTo: TIPPY_DEFAULT_APPEND_TO,
8497
7686
  aria: {
8498
7687
  content: "auto",
@@ -8541,11 +7730,11 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
8541
7730
  trigger: "mouseenter focus",
8542
7731
  triggerTarget: null
8543
7732
  }, pluginProps, renderProps);
8544
- var defaultKeys = Object.keys(defaultProps);
7733
+ var defaultKeys = Object.keys(defaultProps$1);
8545
7734
  var setDefaultProps = function setDefaultProps2(partialProps) {
8546
7735
  var keys = Object.keys(partialProps);
8547
7736
  keys.forEach(function(key) {
8548
- defaultProps[key] = partialProps[key];
7737
+ defaultProps$1[key] = partialProps[key];
8549
7738
  });
8550
7739
  };
8551
7740
  function getExtendedPassedProps(passedProps) {
@@ -8554,14 +7743,14 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
8554
7743
  var name = plugin.name, defaultValue = plugin.defaultValue;
8555
7744
  if (name) {
8556
7745
  var _name;
8557
- acc[name] = passedProps[name] !== void 0 ? passedProps[name] : (_name = defaultProps[name]) != null ? _name : defaultValue;
7746
+ acc[name] = passedProps[name] !== void 0 ? passedProps[name] : (_name = defaultProps$1[name]) != null ? _name : defaultValue;
8558
7747
  }
8559
7748
  return acc;
8560
7749
  }, {});
8561
7750
  return Object.assign({}, passedProps, pluginProps2);
8562
7751
  }
8563
7752
  function getDataAttributeProps(reference2, plugins) {
8564
- var propKeys = plugins ? Object.keys(getExtendedPassedProps(Object.assign({}, defaultProps, {
7753
+ var propKeys = plugins ? Object.keys(getExtendedPassedProps(Object.assign({}, defaultProps$1, {
8565
7754
  plugins
8566
7755
  }))) : defaultKeys;
8567
7756
  var props = propKeys.reduce(function(acc, key) {
@@ -8586,7 +7775,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
8586
7775
  var out = Object.assign({}, props, {
8587
7776
  content: invokeWithArgsOrReturn(props.content, [reference2])
8588
7777
  }, props.ignoreAttributes ? {} : getDataAttributeProps(reference2, props.plugins));
8589
- out.aria = Object.assign({}, defaultProps.aria, out.aria);
7778
+ out.aria = Object.assign({}, defaultProps$1.aria, out.aria);
8590
7779
  out.aria = {
8591
7780
  expanded: out.aria.expanded === "auto" ? props.interactive : out.aria.expanded,
8592
7781
  content: out.aria.content === "auto" ? props.interactive ? null : "describedby" : out.aria.content
@@ -8701,7 +7890,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
8701
7890
  var mouseMoveListeners = [];
8702
7891
  var mountedInstances = [];
8703
7892
  function createTippy(reference2, passedProps) {
8704
- var props = evaluateProps(reference2, Object.assign({}, defaultProps, getExtendedPassedProps(removeUndefinedProps(passedProps))));
7893
+ var props = evaluateProps(reference2, Object.assign({}, defaultProps$1, getExtendedPassedProps(removeUndefinedProps(passedProps))));
8705
7894
  var showTimeout;
8706
7895
  var hideTimeout;
8707
7896
  var scheduleHideAnimationFrame;
@@ -8807,7 +7996,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
8807
7996
  if (instance.state.isMounted && !instance.state.isVisible || currentInput.isTouch || lastTriggerEvent && lastTriggerEvent.type === "focus") {
8808
7997
  return 0;
8809
7998
  }
8810
- return getValueAtIndexOrReturn(instance.props.delay, isShow ? 0 : 1, defaultProps.delay);
7999
+ return getValueAtIndexOrReturn(instance.props.delay, isShow ? 0 : 1, defaultProps$1.delay);
8811
8000
  }
8812
8001
  function handleStyles(fromHide) {
8813
8002
  if (fromHide === void 0) {
@@ -9182,269 +8371,1305 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9182
8371
  if (currentInput.isTouch && touchValue === "hold" && touchDelay) {
9183
8372
  delay = touchDelay;
9184
8373
  }
9185
- if (delay) {
9186
- showTimeout = setTimeout(function() {
9187
- instance.show();
9188
- }, delay);
8374
+ if (delay) {
8375
+ showTimeout = setTimeout(function() {
8376
+ instance.show();
8377
+ }, delay);
8378
+ } else {
8379
+ instance.show();
8380
+ }
8381
+ }
8382
+ function scheduleHide(event) {
8383
+ instance.clearDelayTimeouts();
8384
+ invokeHook("onUntrigger", [instance, event]);
8385
+ if (!instance.state.isVisible) {
8386
+ removeDocumentPress();
8387
+ return;
8388
+ }
8389
+ if (instance.props.trigger.indexOf("mouseenter") >= 0 && instance.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(event.type) >= 0 && isVisibleFromClick) {
8390
+ return;
8391
+ }
8392
+ var delay = getDelay(false);
8393
+ if (delay) {
8394
+ hideTimeout = setTimeout(function() {
8395
+ if (instance.state.isVisible) {
8396
+ instance.hide();
8397
+ }
8398
+ }, delay);
8399
+ } else {
8400
+ scheduleHideAnimationFrame = requestAnimationFrame(function() {
8401
+ instance.hide();
8402
+ });
8403
+ }
8404
+ }
8405
+ function enable() {
8406
+ instance.state.isEnabled = true;
8407
+ }
8408
+ function disable() {
8409
+ instance.hide();
8410
+ instance.state.isEnabled = false;
8411
+ }
8412
+ function clearDelayTimeouts() {
8413
+ clearTimeout(showTimeout);
8414
+ clearTimeout(hideTimeout);
8415
+ cancelAnimationFrame(scheduleHideAnimationFrame);
8416
+ }
8417
+ function setProps(partialProps) {
8418
+ if (instance.state.isDestroyed) {
8419
+ return;
8420
+ }
8421
+ invokeHook("onBeforeUpdate", [instance, partialProps]);
8422
+ removeListeners();
8423
+ var prevProps = instance.props;
8424
+ var nextProps = evaluateProps(reference2, Object.assign({}, prevProps, removeUndefinedProps(partialProps), {
8425
+ ignoreAttributes: true
8426
+ }));
8427
+ instance.props = nextProps;
8428
+ addListeners();
8429
+ if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
8430
+ cleanupInteractiveMouseListeners();
8431
+ debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);
8432
+ }
8433
+ if (prevProps.triggerTarget && !nextProps.triggerTarget) {
8434
+ normalizeToArray(prevProps.triggerTarget).forEach(function(node) {
8435
+ node.removeAttribute("aria-expanded");
8436
+ });
8437
+ } else if (nextProps.triggerTarget) {
8438
+ reference2.removeAttribute("aria-expanded");
8439
+ }
8440
+ handleAriaExpandedAttribute();
8441
+ handleStyles();
8442
+ if (onUpdate) {
8443
+ onUpdate(prevProps, nextProps);
8444
+ }
8445
+ if (instance.popperInstance) {
8446
+ createPopperInstance();
8447
+ getNestedPopperTree().forEach(function(nestedPopper) {
8448
+ requestAnimationFrame(nestedPopper._tippy.popperInstance.forceUpdate);
8449
+ });
8450
+ }
8451
+ invokeHook("onAfterUpdate", [instance, partialProps]);
8452
+ }
8453
+ function setContent2(content) {
8454
+ instance.setProps({
8455
+ content
8456
+ });
8457
+ }
8458
+ function show() {
8459
+ var isAlreadyVisible = instance.state.isVisible;
8460
+ var isDestroyed = instance.state.isDestroyed;
8461
+ var isDisabled = !instance.state.isEnabled;
8462
+ var isTouchAndTouchDisabled = currentInput.isTouch && !instance.props.touch;
8463
+ var duration = getValueAtIndexOrReturn(instance.props.duration, 0, defaultProps$1.duration);
8464
+ if (isAlreadyVisible || isDestroyed || isDisabled || isTouchAndTouchDisabled) {
8465
+ return;
8466
+ }
8467
+ if (getCurrentTarget().hasAttribute("disabled")) {
8468
+ return;
8469
+ }
8470
+ invokeHook("onShow", [instance], false);
8471
+ if (instance.props.onShow(instance) === false) {
8472
+ return;
8473
+ }
8474
+ instance.state.isVisible = true;
8475
+ if (getIsDefaultRenderFn()) {
8476
+ popper2.style.visibility = "visible";
8477
+ }
8478
+ handleStyles();
8479
+ addDocumentPress();
8480
+ if (!instance.state.isMounted) {
8481
+ popper2.style.transition = "none";
8482
+ }
8483
+ if (getIsDefaultRenderFn()) {
8484
+ var _getDefaultTemplateCh2 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh2.box, content = _getDefaultTemplateCh2.content;
8485
+ setTransitionDuration([box, content], 0);
8486
+ }
8487
+ onFirstUpdate = function onFirstUpdate2() {
8488
+ var _instance$popperInsta2;
8489
+ if (!instance.state.isVisible || ignoreOnFirstUpdate) {
8490
+ return;
8491
+ }
8492
+ ignoreOnFirstUpdate = true;
8493
+ void popper2.offsetHeight;
8494
+ popper2.style.transition = instance.props.moveTransition;
8495
+ if (getIsDefaultRenderFn() && instance.props.animation) {
8496
+ var _getDefaultTemplateCh3 = getDefaultTemplateChildren(), _box = _getDefaultTemplateCh3.box, _content = _getDefaultTemplateCh3.content;
8497
+ setTransitionDuration([_box, _content], duration);
8498
+ setVisibilityState([_box, _content], "visible");
8499
+ }
8500
+ handleAriaContentAttribute();
8501
+ handleAriaExpandedAttribute();
8502
+ pushIfUnique(mountedInstances, instance);
8503
+ (_instance$popperInsta2 = instance.popperInstance) == null ? void 0 : _instance$popperInsta2.forceUpdate();
8504
+ invokeHook("onMount", [instance]);
8505
+ if (instance.props.animation && getIsDefaultRenderFn()) {
8506
+ onTransitionedIn(duration, function() {
8507
+ instance.state.isShown = true;
8508
+ invokeHook("onShown", [instance]);
8509
+ });
8510
+ }
8511
+ };
8512
+ mount();
8513
+ }
8514
+ function hide2() {
8515
+ var isAlreadyHidden = !instance.state.isVisible;
8516
+ var isDestroyed = instance.state.isDestroyed;
8517
+ var isDisabled = !instance.state.isEnabled;
8518
+ var duration = getValueAtIndexOrReturn(instance.props.duration, 1, defaultProps$1.duration);
8519
+ if (isAlreadyHidden || isDestroyed || isDisabled) {
8520
+ return;
8521
+ }
8522
+ invokeHook("onHide", [instance], false);
8523
+ if (instance.props.onHide(instance) === false) {
8524
+ return;
8525
+ }
8526
+ instance.state.isVisible = false;
8527
+ instance.state.isShown = false;
8528
+ ignoreOnFirstUpdate = false;
8529
+ isVisibleFromClick = false;
8530
+ if (getIsDefaultRenderFn()) {
8531
+ popper2.style.visibility = "hidden";
8532
+ }
8533
+ cleanupInteractiveMouseListeners();
8534
+ removeDocumentPress();
8535
+ handleStyles(true);
8536
+ if (getIsDefaultRenderFn()) {
8537
+ var _getDefaultTemplateCh4 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh4.box, content = _getDefaultTemplateCh4.content;
8538
+ if (instance.props.animation) {
8539
+ setTransitionDuration([box, content], duration);
8540
+ setVisibilityState([box, content], "hidden");
8541
+ }
8542
+ }
8543
+ handleAriaContentAttribute();
8544
+ handleAriaExpandedAttribute();
8545
+ if (instance.props.animation) {
8546
+ if (getIsDefaultRenderFn()) {
8547
+ onTransitionedOut(duration, instance.unmount);
8548
+ }
8549
+ } else {
8550
+ instance.unmount();
8551
+ }
8552
+ }
8553
+ function hideWithInteractivity(event) {
8554
+ getDocument().addEventListener("mousemove", debouncedOnMouseMove);
8555
+ pushIfUnique(mouseMoveListeners, debouncedOnMouseMove);
8556
+ debouncedOnMouseMove(event);
8557
+ }
8558
+ function unmount() {
8559
+ if (instance.state.isVisible) {
8560
+ instance.hide();
8561
+ }
8562
+ if (!instance.state.isMounted) {
8563
+ return;
8564
+ }
8565
+ destroyPopperInstance();
8566
+ getNestedPopperTree().forEach(function(nestedPopper) {
8567
+ nestedPopper._tippy.unmount();
8568
+ });
8569
+ if (popper2.parentNode) {
8570
+ popper2.parentNode.removeChild(popper2);
8571
+ }
8572
+ mountedInstances = mountedInstances.filter(function(i) {
8573
+ return i !== instance;
8574
+ });
8575
+ instance.state.isMounted = false;
8576
+ invokeHook("onHidden", [instance]);
8577
+ }
8578
+ function destroy() {
8579
+ if (instance.state.isDestroyed) {
8580
+ return;
8581
+ }
8582
+ instance.clearDelayTimeouts();
8583
+ instance.unmount();
8584
+ removeListeners();
8585
+ delete reference2._tippy;
8586
+ instance.state.isDestroyed = true;
8587
+ invokeHook("onDestroy", [instance]);
8588
+ }
8589
+ }
8590
+ function tippy(targets, optionalProps) {
8591
+ if (optionalProps === void 0) {
8592
+ optionalProps = {};
8593
+ }
8594
+ var plugins = defaultProps$1.plugins.concat(optionalProps.plugins || []);
8595
+ bindGlobalEventListeners();
8596
+ var passedProps = Object.assign({}, optionalProps, {
8597
+ plugins
8598
+ });
8599
+ var elements = getArrayOfElements(targets);
8600
+ var instances = elements.reduce(function(acc, reference2) {
8601
+ var instance = reference2 && createTippy(reference2, passedProps);
8602
+ if (instance) {
8603
+ acc.push(instance);
8604
+ }
8605
+ return acc;
8606
+ }, []);
8607
+ return isElement(targets) ? instances[0] : instances;
8608
+ }
8609
+ tippy.defaultProps = defaultProps$1;
8610
+ tippy.setDefaultProps = setDefaultProps;
8611
+ tippy.currentInput = currentInput;
8612
+ Object.assign({}, applyStyles$1, {
8613
+ effect: function effect2(_ref) {
8614
+ var state = _ref.state;
8615
+ var initialStyles = {
8616
+ popper: {
8617
+ position: state.options.strategy,
8618
+ left: "0",
8619
+ top: "0",
8620
+ margin: "0"
8621
+ },
8622
+ arrow: {
8623
+ position: "absolute"
8624
+ },
8625
+ reference: {}
8626
+ };
8627
+ Object.assign(state.elements.popper.style, initialStyles.popper);
8628
+ state.styles = initialStyles;
8629
+ if (state.elements.arrow) {
8630
+ Object.assign(state.elements.arrow.style, initialStyles.arrow);
8631
+ }
8632
+ }
8633
+ });
8634
+ tippy.setDefaultProps({
8635
+ render
8636
+ });
8637
+ const dbTheme = "db-tippy";
8638
+ const dbDefaultProps = { theme: dbTheme };
8639
+ function dbTippy(targets, optionalProps) {
8640
+ const props = optionalProps ? { ...optionalProps } : optionalProps;
8641
+ if (props) {
8642
+ const { theme } = props;
8643
+ props.theme = theme ? `${dbTheme} ${props.theme}` : dbTheme;
8644
+ }
8645
+ if (targets instanceof Element) {
8646
+ const target = targets;
8647
+ return tippy(target, props || dbDefaultProps);
8648
+ }
8649
+ return tippy(targets, props || dbDefaultProps);
8650
+ }
8651
+ const placements = [
8652
+ "top",
8653
+ "bottom",
8654
+ "right",
8655
+ "left",
8656
+ "auto",
8657
+ "auto-start",
8658
+ "auto-end",
8659
+ "top-start",
8660
+ "top-end",
8661
+ "bottom-start",
8662
+ "bottom-end",
8663
+ "right-start",
8664
+ "right-end",
8665
+ "left-start",
8666
+ "left-end"
8667
+ ];
8668
+ function checkOverflow(el) {
8669
+ if (!el) return false;
8670
+ const createDom = (el2, css) => {
8671
+ const dom = document.createElement("div");
8672
+ const width = parseFloat(css.width) ? `${Math.ceil(parseFloat(css.width))}px` : css.width;
8673
+ dom.style.cssText = `
8674
+ width: ${width};
8675
+ line-height: ${css.lineHeight};
8676
+ font-size: ${css.fontSize};
8677
+ word-break: ${css.wordBreak};
8678
+ padding: ${css.padding};
8679
+ `;
8680
+ dom.textContent = el2.textContent;
8681
+ return dom;
8682
+ };
8683
+ let isOverflow = false;
8684
+ try {
8685
+ const css = window.getComputedStyle(el, null);
8686
+ const lineClamp = css.webkitLineClamp;
8687
+ if (lineClamp !== "none") {
8688
+ const targetHeight = parseFloat(css.height);
8689
+ const dom = createDom(el, css);
8690
+ document.body.appendChild(dom);
8691
+ const domHeight = window.getComputedStyle(dom, null).height;
8692
+ document.body.removeChild(dom);
8693
+ isOverflow = targetHeight < parseFloat(domHeight);
9189
8694
  } else {
9190
- instance.show();
8695
+ isOverflow = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
9191
8696
  }
8697
+ } catch (e) {
8698
+ console.warn("There is an error when check element overflow state: ", e);
9192
8699
  }
9193
- function scheduleHide(event) {
9194
- instance.clearDelayTimeouts();
9195
- invokeHook("onUntrigger", [instance, event]);
9196
- if (!instance.state.isVisible) {
9197
- removeDocumentPress();
9198
- return;
8700
+ return isOverflow;
8701
+ }
8702
+ function beforeShow(instance) {
8703
+ const { reference: reference2 } = instance;
8704
+ const { props } = reference2._bk_overflow_tips_;
8705
+ const isOverflow = checkOverflow(reference2);
8706
+ if (isOverflow) {
8707
+ let { content } = props;
8708
+ if (!content) {
8709
+ content = props.allowHTML ? reference2.innerHTML : reference2.textContent;
8710
+ }
8711
+ instance.setContent(content);
8712
+ return true;
8713
+ }
8714
+ return false;
8715
+ }
8716
+ function setupOnShow(props, customProps) {
8717
+ props.onShow = (instance) => {
8718
+ if (typeof customProps.onShow === "function") {
8719
+ const result = customProps.onShow(instance);
8720
+ if (!result) return false;
8721
+ }
8722
+ const isShow = beforeShow(instance);
8723
+ if (!isShow) return false;
8724
+ };
8725
+ }
8726
+ function setupTheme(props, customProps) {
8727
+ const theme = ["db-tippy bk-overflow-tips"];
8728
+ if (customProps.theme) {
8729
+ theme.push(customProps.theme);
8730
+ }
8731
+ props.theme = theme.join(" ");
8732
+ }
8733
+ function formatModifiers(modifiers) {
8734
+ const keys = Object.entries(modifiers).map((item) => item[0]);
8735
+ if (keys.length === 0) return {};
8736
+ const props = {};
8737
+ for (const key of keys) {
8738
+ if (placements.includes(key)) {
8739
+ props.placement = key;
9199
8740
  }
9200
- if (instance.props.trigger.indexOf("mouseenter") >= 0 && instance.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(event.type) >= 0 && isVisibleFromClick) {
9201
- return;
8741
+ }
8742
+ return props;
8743
+ }
8744
+ const defaultProps = {
8745
+ arrow: true,
8746
+ interactive: true,
8747
+ delay: 150,
8748
+ allowHTML: false,
8749
+ maxWidth: 600,
8750
+ // boundary: 'window',
8751
+ placement: "top",
8752
+ appendTo: () => document.body
8753
+ };
8754
+ const overflowTips = {
8755
+ mounted(el, binding) {
8756
+ const customProps = typeof binding.value === "object" ? binding.value : formatModifiers(binding.modifiers);
8757
+ const props = Object.assign({ ...defaultProps }, customProps);
8758
+ setupOnShow(props, customProps);
8759
+ setupTheme(props, customProps);
8760
+ el._bk_overflow_tips_ = {
8761
+ props,
8762
+ // 指令配置的props单独存储方便后续做判断
8763
+ instance: dbTippy(el, props)
8764
+ };
8765
+ },
8766
+ updated(el, binding) {
8767
+ const { props, instance } = el._bk_overflow_tips_;
8768
+ const customProps = typeof binding.value === "object" ? binding.value : formatModifiers(binding.modifiers);
8769
+ Object.assign(props, customProps);
8770
+ setupOnShow(props, customProps);
8771
+ setupTheme(props, customProps);
8772
+ instance.setProps(props);
8773
+ },
8774
+ beforeUnmount(el) {
8775
+ el._tippy && el._tippy.destroy();
8776
+ delete el._bk_overflow_tips_;
8777
+ }
8778
+ };
8779
+ const random = () => `${_.random(0, 999999)}_${Date.now()}_${_.random(0, 999999)}`;
8780
+ const encodeMult = (text) => {
8781
+ const temp = document.createElement("textarea");
8782
+ temp.value = text;
8783
+ return temp.value;
8784
+ };
8785
+ function tryOnScopeDispose(fn) {
8786
+ if (vue.getCurrentScope()) {
8787
+ vue.onScopeDispose(fn);
8788
+ return true;
8789
+ }
8790
+ return false;
8791
+ }
8792
+ function toValue(r) {
8793
+ return typeof r === "function" ? r() : vue.unref(r);
8794
+ }
8795
+ const isClient = typeof window !== "undefined" && typeof document !== "undefined";
8796
+ typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
8797
+ function unrefElement(elRef) {
8798
+ var _a;
8799
+ const plain = toValue(elRef);
8800
+ return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
8801
+ }
8802
+ const defaultWindow = isClient ? window : void 0;
8803
+ function useMounted() {
8804
+ const isMounted = vue.ref(false);
8805
+ const instance = vue.getCurrentInstance();
8806
+ if (instance) {
8807
+ vue.onMounted(() => {
8808
+ isMounted.value = true;
8809
+ }, instance);
8810
+ }
8811
+ return isMounted;
8812
+ }
8813
+ function useSupported(callback) {
8814
+ const isMounted = useMounted();
8815
+ return vue.computed(() => {
8816
+ isMounted.value;
8817
+ return Boolean(callback());
8818
+ });
8819
+ }
8820
+ function useResizeObserver(target, callback, options = {}) {
8821
+ const { window: window2 = defaultWindow, ...observerOptions } = options;
8822
+ let observer;
8823
+ const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
8824
+ const cleanup = () => {
8825
+ if (observer) {
8826
+ observer.disconnect();
8827
+ observer = void 0;
9202
8828
  }
9203
- var delay = getDelay(false);
9204
- if (delay) {
9205
- hideTimeout = setTimeout(function() {
9206
- if (instance.state.isVisible) {
9207
- instance.hide();
8829
+ };
8830
+ const targets = vue.computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);
8831
+ const stopWatch = vue.watch(
8832
+ targets,
8833
+ (els) => {
8834
+ cleanup();
8835
+ if (isSupported.value && window2) {
8836
+ observer = new ResizeObserver(callback);
8837
+ for (const _el of els)
8838
+ _el && observer.observe(_el, observerOptions);
8839
+ }
8840
+ },
8841
+ { immediate: true, flush: "post" }
8842
+ );
8843
+ const stop = () => {
8844
+ cleanup();
8845
+ stopWatch();
8846
+ };
8847
+ tryOnScopeDispose(stop);
8848
+ return {
8849
+ isSupported,
8850
+ stop
8851
+ };
8852
+ }
8853
+ const _hoisted_1$6 = ["data-fixed", "data-maxWidth", "data-minWidth", "data-width"];
8854
+ const _hoisted_2$2 = { class: "th-cell" };
8855
+ const _hoisted_3$1 = { style: { "display": "inline-block", "line-height": "40px", "vertical-align": "top" } };
8856
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
8857
+ __name: "head-column",
8858
+ props: {
8859
+ fixed: { default: void 0 },
8860
+ maxWidth: { default: void 0 },
8861
+ minWidth: { default: void 0 },
8862
+ required: { type: Boolean, default: true },
8863
+ width: { default: void 0 },
8864
+ renderAppend: { type: Function, default: void 0 },
8865
+ memo: { default: void 0 }
8866
+ },
8867
+ setup(__props) {
8868
+ const props = __props;
8869
+ const slots = vue.useSlots();
8870
+ const { rowWidth, isOverflow: isMinimize, isScrollToLeft, isScrollToRight } = vue.inject(renderTablekey);
8871
+ const parentTable = vue.inject(tableColumnResizekey);
8872
+ const columnRef = vue.ref();
8873
+ const currentWidth = vue.ref(0);
8874
+ const vBkTooltips = bkuiVue.bkTooltips;
8875
+ const vOverflowTips = overflowTips;
8876
+ const columnKey = random();
8877
+ let initWidthRate = 0;
8878
+ let isDragedSelf = false;
8879
+ const finalMinWidth = vue.computed(() => props.minWidth ? props.minWidth : props.width ?? 100);
8880
+ const isFixedRight = vue.computed(() => props.fixed === "right");
8881
+ const isFixedLeft = vue.computed(() => props.fixed === "left");
8882
+ const styles = vue.computed(() => {
8883
+ if (props.width && (rowWidth == null ? void 0 : rowWidth.value) && finalMinWidth.value) {
8884
+ const newWidth = rowWidth.value * initWidthRate;
8885
+ if (newWidth !== props.width) {
8886
+ let width = 0;
8887
+ if (isMinimize == null ? void 0 : isMinimize.value) {
8888
+ if (currentWidth.value !== 0 && (currentWidth.value !== finalMinWidth.value || currentWidth.value !== props.width)) {
8889
+ width = currentWidth.value;
8890
+ } else {
8891
+ width = finalMinWidth.value;
8892
+ }
8893
+ } else if (newWidth > finalMinWidth.value) {
8894
+ width = newWidth;
8895
+ } else {
8896
+ width = finalMinWidth.value;
8897
+ }
8898
+ return {
8899
+ minWidth: `${width}px`
8900
+ };
9208
8901
  }
9209
- }, delay);
9210
- } else {
9211
- scheduleHideAnimationFrame = requestAnimationFrame(function() {
9212
- instance.hide();
8902
+ }
8903
+ return {
8904
+ minWidth: props.width ? `${props.width}px` : "120px"
8905
+ };
8906
+ });
8907
+ const RenderAppendElement = vue.computed(() => props.renderAppend && props.renderAppend());
8908
+ vue.watch(
8909
+ () => [props.width, rowWidth == null ? void 0 : rowWidth.value, currentWidth.value],
8910
+ ([width, rowWidth2, currentWidth2]) => {
8911
+ if (!isDragedSelf) {
8912
+ return;
8913
+ }
8914
+ if (width && rowWidth2 && currentWidth2 && finalMinWidth.value) {
8915
+ isDragedSelf = false;
8916
+ if (currentWidth2 !== 0 && (currentWidth2 !== finalMinWidth.value || currentWidth2 !== width)) {
8917
+ initWidthRate = currentWidth2 / rowWidth2;
8918
+ } else {
8919
+ initWidthRate = (isMinimize == null ? void 0 : isMinimize.value) ? finalMinWidth.value / rowWidth2 : width / rowWidth2;
8920
+ }
8921
+ }
8922
+ },
8923
+ {
8924
+ immediate: true
8925
+ }
8926
+ );
8927
+ useResizeObserver(columnRef, () => {
8928
+ if (!isDragedSelf) {
8929
+ return;
8930
+ }
8931
+ const width = parseFloat(columnRef.value.style.width);
8932
+ currentWidth.value = width;
8933
+ });
8934
+ const handleMouseDown = (event) => {
8935
+ isDragedSelf = true;
8936
+ parentTable == null ? void 0 : parentTable.columnMousedown(event, {
8937
+ columnKey,
8938
+ minWidth: finalMinWidth.value
9213
8939
  });
9214
- }
9215
- }
9216
- function enable() {
9217
- instance.state.isEnabled = true;
8940
+ };
8941
+ const handleMouseMove = (event) => {
8942
+ parentTable == null ? void 0 : parentTable.columnMouseMove(event);
8943
+ };
8944
+ return (_ctx, _cache) => {
8945
+ return vue.openBlock(), vue.createElementBlock("th", {
8946
+ ref_key: "columnRef",
8947
+ ref: columnRef,
8948
+ class: vue.normalizeClass(["bk-ediatable-head-column", {
8949
+ [`column-${vue.unref(columnKey)}`]: true,
8950
+ "is-right-fixed": vue.unref(isMinimize) && isFixedRight.value && !vue.unref(isScrollToRight),
8951
+ "is-left-fixed": vue.unref(isMinimize) && isFixedLeft.value && !vue.unref(isScrollToLeft)
8952
+ }]),
8953
+ "data-fixed": _ctx.fixed,
8954
+ "data-maxWidth": _ctx.maxWidth,
8955
+ "data-minWidth": finalMinWidth.value,
8956
+ "data-width": _ctx.width,
8957
+ style: vue.normalizeStyle(styles.value),
8958
+ onMousedown: handleMouseDown,
8959
+ onMousemove: handleMouseMove
8960
+ }, [
8961
+ vue.createElementVNode(
8962
+ "div",
8963
+ {
8964
+ class: vue.normalizeClass({ "is-required": _ctx.required })
8965
+ },
8966
+ [
8967
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, [
8968
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock(
8969
+ "span",
8970
+ {
8971
+ class: vue.normalizeClass({ "title-memo": _ctx.memo })
8972
+ },
8973
+ [
8974
+ vue.renderSlot(_ctx.$slots, "default")
8975
+ ],
8976
+ 2
8977
+ /* CLASS */
8978
+ )), [
8979
+ [vue.unref(vBkTooltips), {
8980
+ content: _ctx.memo,
8981
+ disabled: !_ctx.memo
8982
+ }]
8983
+ ])
8984
+ ])), [
8985
+ [vue.unref(vOverflowTips)]
8986
+ ]),
8987
+ vue.createElementVNode("div", _hoisted_3$1, [
8988
+ slots.append && !_ctx.renderAppend ? vue.renderSlot(_ctx.$slots, "append", { key: 0 }) : vue.createCommentVNode("v-if", true),
8989
+ _ctx.renderAppend ? (vue.openBlock(), vue.createBlock(vue.unref(RenderAppendElement), { key: 1 })) : vue.createCommentVNode("v-if", true)
8990
+ ])
8991
+ ],
8992
+ 2
8993
+ /* CLASS */
8994
+ )
8995
+ ], 46, _hoisted_1$6);
8996
+ };
9218
8997
  }
9219
- function disable() {
9220
- instance.hide();
9221
- instance.state.isEnabled = false;
8998
+ });
8999
+ const renderTablekey = Symbol("renderTable");
9000
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
9001
+ __name: "ediatable",
9002
+ props: {
9003
+ theadList: { default: () => [] }
9004
+ },
9005
+ setup(__props) {
9006
+ const slots = vue.useSlots();
9007
+ const checkTableScroll = () => {
9008
+ rowWidth.value = tableRef.value.clientWidth;
9009
+ isOverflow.value = tableOuterRef.value.clientWidth < tableRef.value.clientWidth;
9010
+ initColumnWidth();
9011
+ };
9012
+ const tableOuterRef = vue.ref();
9013
+ const tableRef = vue.ref();
9014
+ const tableColumnResizeRef = vue.ref();
9015
+ const isOverflow = vue.ref(false);
9016
+ const rowWidth = vue.ref(0);
9017
+ const isScrollToLeft = vue.ref(true);
9018
+ const isScrollToRight = vue.ref(false);
9019
+ const { initColumnWidth } = useColumnResize(tableOuterRef, tableColumnResizeRef, _.debounce(checkTableScroll));
9020
+ vue.provide(renderTablekey, {
9021
+ isOverflow,
9022
+ rowWidth,
9023
+ isScrollToLeft,
9024
+ isScrollToRight
9025
+ });
9026
+ const handleScroll = _.throttle(() => {
9027
+ isScrollToLeft.value = tableOuterRef.value.scrollLeft === 0;
9028
+ isScrollToRight.value = tableOuterRef.value.scrollWidth - tableOuterRef.value.scrollLeft < tableOuterRef.value.clientWidth + 1;
9029
+ }, 200);
9030
+ vue.onMounted(() => {
9031
+ window.addEventListener("resize", checkTableScroll);
9032
+ checkTableScroll();
9033
+ setTimeout(() => checkTableScroll());
9034
+ tableOuterRef.value.addEventListener("scroll", handleScroll);
9035
+ });
9036
+ vue.onBeforeUnmount(() => {
9037
+ window.removeEventListener("resize", checkTableScroll);
9038
+ tableOuterRef.value.removeEventListener("scroll", handleScroll);
9039
+ });
9040
+ return (_ctx, _cache) => {
9041
+ return vue.openBlock(), vue.createElementBlock(
9042
+ "div",
9043
+ {
9044
+ id: "ediatableRenderTableKey",
9045
+ ref_key: "tableOuterRef",
9046
+ ref: tableOuterRef,
9047
+ class: vue.normalizeClass(["bk-ediatable", { "scrollbar-exists": isOverflow.value }])
9048
+ },
9049
+ [
9050
+ vue.createElementVNode(
9051
+ "table",
9052
+ {
9053
+ ref_key: "tableRef",
9054
+ ref: tableRef
9055
+ },
9056
+ [
9057
+ vue.createElementVNode("thead", null, [
9058
+ vue.createElementVNode("tr", null, [
9059
+ slots.default && _ctx.theadList.length === 0 ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : (vue.openBlock(true), vue.createElementBlock(
9060
+ vue.Fragment,
9061
+ { key: 1 },
9062
+ vue.renderList(_ctx.theadList, (head, index) => {
9063
+ return vue.openBlock(), vue.createBlock(_sfc_main$8, {
9064
+ key: index,
9065
+ width: head.width,
9066
+ "min-width": head.minWidth,
9067
+ "max-width": head.maxWidth,
9068
+ fixed: head.fixed,
9069
+ required: head.required,
9070
+ "render-append": head.renderAppend,
9071
+ memo: head.memo
9072
+ }, {
9073
+ default: vue.withCtx(() => [
9074
+ vue.createTextVNode(
9075
+ vue.toDisplayString(head.title),
9076
+ 1
9077
+ /* TEXT */
9078
+ )
9079
+ ]),
9080
+ _: 2
9081
+ /* DYNAMIC */
9082
+ }, 1032, ["width", "min-width", "max-width", "fixed", "required", "render-append", "memo"]);
9083
+ }),
9084
+ 128
9085
+ /* KEYED_FRAGMENT */
9086
+ ))
9087
+ ])
9088
+ ]),
9089
+ vue.renderSlot(_ctx.$slots, "data")
9090
+ ],
9091
+ 512
9092
+ /* NEED_PATCH */
9093
+ ),
9094
+ vue.createElementVNode(
9095
+ "div",
9096
+ {
9097
+ ref_key: "tableColumnResizeRef",
9098
+ ref: tableColumnResizeRef,
9099
+ class: "table-column-resize"
9100
+ },
9101
+ null,
9102
+ 512
9103
+ /* NEED_PATCH */
9104
+ )
9105
+ ],
9106
+ 2
9107
+ /* CLASS */
9108
+ );
9109
+ };
9222
9110
  }
9223
- function clearDelayTimeouts() {
9224
- clearTimeout(showTimeout);
9225
- clearTimeout(hideTimeout);
9226
- cancelAnimationFrame(scheduleHideAnimationFrame);
9111
+ });
9112
+ const getRuleMessage = (rule) => {
9113
+ if (typeof rule.message === "function") {
9114
+ return rule.message();
9227
9115
  }
9228
- function setProps(partialProps) {
9229
- if (instance.state.isDestroyed) {
9230
- return;
9231
- }
9232
- invokeHook("onBeforeUpdate", [instance, partialProps]);
9233
- removeListeners();
9234
- var prevProps = instance.props;
9235
- var nextProps = evaluateProps(reference2, Object.assign({}, prevProps, removeUndefinedProps(partialProps), {
9236
- ignoreAttributes: true
9237
- }));
9238
- instance.props = nextProps;
9239
- addListeners();
9240
- if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
9241
- cleanupInteractiveMouseListeners();
9242
- debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);
9243
- }
9244
- if (prevProps.triggerTarget && !nextProps.triggerTarget) {
9245
- normalizeToArray(prevProps.triggerTarget).forEach(function(node) {
9246
- node.removeAttribute("aria-expanded");
9247
- });
9248
- } else if (nextProps.triggerTarget) {
9249
- reference2.removeAttribute("aria-expanded");
9116
+ return rule.message;
9117
+ };
9118
+ function useValidtor(rules) {
9119
+ const state = vue.reactive({
9120
+ loading: false,
9121
+ error: false,
9122
+ message: ""
9123
+ });
9124
+ const validator = (targetValue) => {
9125
+ state.error = false, state.message = "";
9126
+ if (!rules) {
9127
+ return Promise.resolve(true);
9250
9128
  }
9251
- handleAriaExpandedAttribute();
9252
- handleStyles();
9253
- if (onUpdate) {
9254
- onUpdate(prevProps, nextProps);
9129
+ const run = /* @__PURE__ */ (() => {
9130
+ let stepIndex = -1;
9131
+ return async () => {
9132
+ stepIndex = stepIndex + 1;
9133
+ if (stepIndex >= rules.length) {
9134
+ return Promise.resolve(true);
9135
+ }
9136
+ const rule = rules[stepIndex];
9137
+ return Promise.resolve().then(() => {
9138
+ const result = rule.validator(targetValue);
9139
+ if (typeof result !== "boolean" && typeof result.then === "function") {
9140
+ return result.then((data) => {
9141
+ if (data === false) {
9142
+ return Promise.reject(getRuleMessage(rule));
9143
+ }
9144
+ }).then(() => run(), () => {
9145
+ state.error = true;
9146
+ const message = getRuleMessage(rule);
9147
+ state.message = message;
9148
+ return Promise.reject(message);
9149
+ });
9150
+ }
9151
+ if (!result) {
9152
+ state.error = true;
9153
+ const message = getRuleMessage(rule);
9154
+ state.message = message;
9155
+ return Promise.reject(message);
9156
+ }
9157
+ return run();
9158
+ });
9159
+ };
9160
+ })();
9161
+ return run();
9162
+ };
9163
+ return {
9164
+ ...vue.toRefs(state),
9165
+ validator
9166
+ };
9167
+ }
9168
+ const DbIcon = vue.defineComponent({
9169
+ name: "DbIcon",
9170
+ props: {
9171
+ type: {
9172
+ type: String,
9173
+ required: true
9174
+ },
9175
+ svg: {
9176
+ type: Boolean,
9177
+ default: false
9255
9178
  }
9256
- if (instance.popperInstance) {
9257
- createPopperInstance();
9258
- getNestedPopperTree().forEach(function(nestedPopper) {
9259
- requestAnimationFrame(nestedPopper._tippy.popperInstance.forceUpdate);
9260
- });
9179
+ },
9180
+ render() {
9181
+ if (this.svg) {
9182
+ return vue.h(
9183
+ "svg",
9184
+ {
9185
+ class: {
9186
+ "db-svg-icon": true
9187
+ }
9188
+ },
9189
+ [
9190
+ vue.h("use", {
9191
+ "xlink:href": `#db-icon-${this.type}`
9192
+ })
9193
+ ]
9194
+ );
9261
9195
  }
9262
- invokeHook("onAfterUpdate", [instance, partialProps]);
9196
+ const classes = {
9197
+ "ediatable-icon": true,
9198
+ [`icon-${this.type}`]: true
9199
+ };
9200
+ return vue.h("i", {
9201
+ class: classes
9202
+ });
9263
9203
  }
9264
- function setContent2(content) {
9265
- instance.setProps({
9266
- content
9204
+ });
9205
+ const _hoisted_1$5 = {
9206
+ key: 0,
9207
+ class: "input-error"
9208
+ };
9209
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
9210
+ __name: "date-time-picker-column",
9211
+ props: /* @__PURE__ */ vue.mergeModels({
9212
+ placeholder: { default: "" },
9213
+ rules: { default: void 0 },
9214
+ type: { default: void 0 },
9215
+ disabled: { type: Boolean, default: false }
9216
+ }, {
9217
+ "modelValue": {},
9218
+ "modelModifiers": {}
9219
+ }),
9220
+ emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
9221
+ setup(__props, { expose: __expose, emit: __emit }) {
9222
+ const props = __props;
9223
+ const emits = __emit;
9224
+ const modelValue = vue.useModel(__props, "modelValue");
9225
+ const attrs = vue.useAttrs();
9226
+ const slots = vue.useSlots();
9227
+ const { message: errorMessage, validator } = useValidtor(props.rules);
9228
+ const vBkTooltips = bkuiVue.bkTooltips;
9229
+ const handleChange = (value) => {
9230
+ modelValue.value = value;
9231
+ validator(modelValue.value).then(() => {
9232
+ emits("change", modelValue.value);
9233
+ });
9234
+ };
9235
+ const handleOpenChange = (open) => {
9236
+ if (!open) {
9237
+ validator(modelValue.value);
9238
+ }
9239
+ };
9240
+ __expose({
9241
+ getValue() {
9242
+ return validator(modelValue.value).then(() => modelValue.value);
9243
+ }
9267
9244
  });
9245
+ return (_ctx, _cache) => {
9246
+ return vue.openBlock(), vue.createElementBlock(
9247
+ "div",
9248
+ {
9249
+ class: vue.normalizeClass(["bk-ediatable-time-picker", {
9250
+ "is-error": Boolean(vue.unref(errorMessage)),
9251
+ "is-disabled": _ctx.disabled
9252
+ }])
9253
+ },
9254
+ [
9255
+ vue.createVNode(vue.unref(bkuiVue.DatePicker), vue.mergeProps({
9256
+ "append-to-body": "",
9257
+ clearable: false,
9258
+ "model-value": modelValue.value,
9259
+ placeholder: _ctx.placeholder,
9260
+ style: { "width": "100%" },
9261
+ type: _ctx.type
9262
+ }, vue.unref(attrs), {
9263
+ onChange: handleChange,
9264
+ onOpenChange: handleOpenChange
9265
+ }), vue.createSlots({
9266
+ _: 2
9267
+ /* DYNAMIC */
9268
+ }, [
9269
+ vue.unref(slots).footer ? {
9270
+ name: "footer",
9271
+ fn: vue.withCtx(() => [
9272
+ vue.renderSlot(_ctx.$slots, "footer")
9273
+ ]),
9274
+ key: "0"
9275
+ } : void 0
9276
+ ]), 1040, ["model-value", "placeholder", "type"]),
9277
+ vue.unref(errorMessage) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
9278
+ vue.withDirectives(vue.createVNode(
9279
+ vue.unref(DbIcon),
9280
+ { type: "exclamation-fill" },
9281
+ null,
9282
+ 512
9283
+ /* NEED_PATCH */
9284
+ ), [
9285
+ [vue.unref(vBkTooltips), vue.unref(errorMessage)]
9286
+ ])
9287
+ ])) : vue.createCommentVNode("v-if", true)
9288
+ ],
9289
+ 2
9290
+ /* CLASS */
9291
+ );
9292
+ };
9268
9293
  }
9269
- function show() {
9270
- var isAlreadyVisible = instance.state.isVisible;
9271
- var isDestroyed = instance.state.isDestroyed;
9272
- var isDisabled = !instance.state.isEnabled;
9273
- var isTouchAndTouchDisabled = currentInput.isTouch && !instance.props.touch;
9274
- var duration = getValueAtIndexOrReturn(instance.props.duration, 0, defaultProps.duration);
9275
- if (isAlreadyVisible || isDestroyed || isDisabled || isTouchAndTouchDisabled) {
9276
- return;
9277
- }
9278
- if (getCurrentTarget().hasAttribute("disabled")) {
9279
- return;
9280
- }
9281
- invokeHook("onShow", [instance], false);
9282
- if (instance.props.onShow(instance) === false) {
9283
- return;
9284
- }
9285
- instance.state.isVisible = true;
9286
- if (getIsDefaultRenderFn()) {
9287
- popper2.style.visibility = "visible";
9288
- }
9289
- handleStyles();
9290
- addDocumentPress();
9291
- if (!instance.state.isMounted) {
9292
- popper2.style.transition = "none";
9293
- }
9294
- if (getIsDefaultRenderFn()) {
9295
- var _getDefaultTemplateCh2 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh2.box, content = _getDefaultTemplateCh2.content;
9296
- setTransitionDuration([box, content], 0);
9297
- }
9298
- onFirstUpdate = function onFirstUpdate2() {
9299
- var _instance$popperInsta2;
9300
- if (!instance.state.isVisible || ignoreOnFirstUpdate) {
9294
+ });
9295
+ const _hoisted_1$4 = {
9296
+ key: 1,
9297
+ class: "blur-dispaly-main"
9298
+ };
9299
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
9300
+ __name: "input-column",
9301
+ props: /* @__PURE__ */ vue.mergeModels({
9302
+ placeholder: { default: "请输入" },
9303
+ rules: { default: void 0 },
9304
+ disabled: { type: Boolean, default: false },
9305
+ type: { default: "text" },
9306
+ min: { default: Number.MIN_SAFE_INTEGER },
9307
+ max: { default: Number.MAX_SAFE_INTEGER },
9308
+ isShowBlur: { type: Boolean, default: false },
9309
+ precision: { default: 0 }
9310
+ }, {
9311
+ "modelValue": {
9312
+ default: ""
9313
+ },
9314
+ "modelModifiers": {}
9315
+ }),
9316
+ emits: /* @__PURE__ */ vue.mergeModels(["submit"], ["update:modelValue"]),
9317
+ setup(__props, { expose: __expose, emit: __emit }) {
9318
+ const props = __props;
9319
+ const emits = __emit;
9320
+ const modelValue = vue.useModel(__props, "modelValue");
9321
+ const rootRef = vue.ref();
9322
+ const isBlur = vue.ref(true);
9323
+ const isPassword = vue.computed(() => props.type === "password");
9324
+ let oldInputText = "";
9325
+ const vBkTooltips = bkuiVue.bkTooltips;
9326
+ const {
9327
+ message: errorMessage,
9328
+ validator
9329
+ } = useValidtor(props.rules);
9330
+ const handleInput = (value) => {
9331
+ isBlur.value = false;
9332
+ modelValue.value = value;
9333
+ };
9334
+ const handleBlur = (event) => {
9335
+ isBlur.value = true;
9336
+ if (props.disabled) {
9337
+ event.preventDefault();
9301
9338
  return;
9302
9339
  }
9303
- ignoreOnFirstUpdate = true;
9304
- void popper2.offsetHeight;
9305
- popper2.style.transition = instance.props.moveTransition;
9306
- if (getIsDefaultRenderFn() && instance.props.animation) {
9307
- var _getDefaultTemplateCh3 = getDefaultTemplateChildren(), _box = _getDefaultTemplateCh3.box, _content = _getDefaultTemplateCh3.content;
9308
- setTransitionDuration([_box, _content], duration);
9309
- setVisibilityState([_box, _content], "visible");
9340
+ if (modelValue.value) {
9341
+ if (oldInputText === modelValue.value) {
9342
+ return;
9343
+ }
9344
+ oldInputText = modelValue.value;
9345
+ validator(modelValue.value).then(() => {
9346
+ emits("submit", modelValue.value);
9347
+ });
9348
+ return;
9310
9349
  }
9311
- handleAriaContentAttribute();
9312
- handleAriaExpandedAttribute();
9313
- pushIfUnique(mountedInstances, instance);
9314
- (_instance$popperInsta2 = instance.popperInstance) == null ? void 0 : _instance$popperInsta2.forceUpdate();
9315
- invokeHook("onMount", [instance]);
9316
- if (instance.props.animation && getIsDefaultRenderFn()) {
9317
- onTransitionedIn(duration, function() {
9318
- instance.state.isShown = true;
9319
- invokeHook("onShown", [instance]);
9350
+ emits("submit", modelValue.value);
9351
+ };
9352
+ const handleKeydown = (_value, event) => {
9353
+ if (props.disabled) {
9354
+ event.preventDefault();
9355
+ return;
9356
+ }
9357
+ if (event.isComposing) {
9358
+ return;
9359
+ }
9360
+ if (event.which === 13 || event.key === "Enter") {
9361
+ if (oldInputText === modelValue.value) {
9362
+ return;
9363
+ }
9364
+ oldInputText = modelValue.value;
9365
+ event.preventDefault();
9366
+ validator(modelValue.value).then((result) => {
9367
+ if (result) {
9368
+ emits("submit", modelValue.value);
9369
+ }
9320
9370
  });
9321
9371
  }
9322
9372
  };
9323
- mount();
9373
+ const handlePaste = (_value, event) => {
9374
+ event.preventDefault();
9375
+ let paste = (event.clipboardData || window.clipboardData).getData("text");
9376
+ paste = encodeMult(paste);
9377
+ modelValue.value += paste.replace(/^\s+|\s+$/g, "");
9378
+ };
9379
+ __expose({
9380
+ getValue() {
9381
+ return validator(modelValue.value).then(() => modelValue.value);
9382
+ },
9383
+ focus() {
9384
+ var _a;
9385
+ (_a = rootRef.value.querySelector("input")) == null ? void 0 : _a.focus();
9386
+ }
9387
+ });
9388
+ return (_ctx, _cache) => {
9389
+ return vue.openBlock(), vue.createElementBlock(
9390
+ "div",
9391
+ {
9392
+ ref_key: "rootRef",
9393
+ ref: rootRef,
9394
+ class: vue.normalizeClass(["bk-ediatable-input", {
9395
+ "is-error": Boolean(vue.unref(errorMessage)),
9396
+ "is-disabled": _ctx.disabled,
9397
+ "is-password": isPassword.value
9398
+ }])
9399
+ },
9400
+ [
9401
+ vue.createVNode(vue.unref(bkuiVue.Input), vue.mergeProps({
9402
+ class: "input-box",
9403
+ disabled: _ctx.disabled,
9404
+ max: _ctx.max,
9405
+ min: _ctx.min,
9406
+ "model-value": modelValue.value,
9407
+ placeholder: _ctx.placeholder,
9408
+ type: _ctx.type
9409
+ }, _ctx.$attrs, {
9410
+ precision: _ctx.precision,
9411
+ onBlur: handleBlur,
9412
+ onChange: handleInput,
9413
+ onFocus: _cache[0] || (_cache[0] = () => isBlur.value = false),
9414
+ onInput: handleInput,
9415
+ onKeydown: handleKeydown,
9416
+ onPaste: handlePaste
9417
+ }), {
9418
+ suffix: vue.withCtx(() => []),
9419
+ _: 1
9420
+ /* STABLE */
9421
+ }, 16, ["disabled", "max", "min", "model-value", "placeholder", "type", "precision"]),
9422
+ vue.unref(errorMessage) ? vue.withDirectives((vue.openBlock(), vue.createBlock(
9423
+ vue.unref(DbIcon),
9424
+ {
9425
+ key: 0,
9426
+ class: "error-icon",
9427
+ type: "exclamation-fill"
9428
+ },
9429
+ null,
9430
+ 512
9431
+ /* NEED_PATCH */
9432
+ )), [
9433
+ [vue.unref(vBkTooltips), vue.unref(errorMessage)]
9434
+ ]) : vue.createCommentVNode("v-if", true),
9435
+ _ctx.isShowBlur && isBlur.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
9436
+ vue.renderSlot(_ctx.$slots, "blur")
9437
+ ])) : vue.createCommentVNode("v-if", true)
9438
+ ],
9439
+ 2
9440
+ /* CLASS */
9441
+ );
9442
+ };
9443
+ }
9444
+ });
9445
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9446
+ __name: "fixed-column",
9447
+ props: {
9448
+ fixed: { default: "right" }
9449
+ },
9450
+ setup(__props) {
9451
+ const props = __props;
9452
+ const { isOverflow: isFixed, isScrollToLeft, isScrollToRight } = vue.inject(renderTablekey);
9453
+ const isFixedRight = vue.computed(() => (isFixed == null ? void 0 : isFixed.value) && props.fixed === "right" && !isScrollToRight.value);
9454
+ const isFixedLeft = vue.computed(() => (isFixed == null ? void 0 : isFixed.value) && props.fixed === "left" && !isScrollToLeft.value);
9455
+ return (_ctx, _cache) => {
9456
+ return vue.openBlock(), vue.createElementBlock(
9457
+ "td",
9458
+ {
9459
+ class: vue.normalizeClass({
9460
+ "bk-ediatable-right-fixed-column": isFixedRight.value,
9461
+ "bk-ediatable-left-fixed-column": isFixedLeft.value
9462
+ })
9463
+ },
9464
+ [
9465
+ vue.renderSlot(_ctx.$slots, "default")
9466
+ ],
9467
+ 2
9468
+ /* CLASS */
9469
+ );
9470
+ };
9471
+ }
9472
+ });
9473
+ const _hoisted_1$3 = { class: "bk-ediatable-operation" };
9474
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
9475
+ __name: "operation-column",
9476
+ props: {
9477
+ removeable: { type: Boolean, default: true },
9478
+ showCopy: { type: Boolean, default: false },
9479
+ showAdd: { type: Boolean, default: true },
9480
+ showRemove: { type: Boolean, default: true }
9481
+ },
9482
+ emits: ["add", "copy", "remove"],
9483
+ setup(__props, { emit: __emit }) {
9484
+ const props = __props;
9485
+ const emits = __emit;
9486
+ const handleCopy = () => {
9487
+ emits("copy");
9488
+ };
9489
+ const handleAppend = () => {
9490
+ emits("add");
9491
+ };
9492
+ const handleRemove = () => {
9493
+ if (props.removeable) {
9494
+ return;
9495
+ }
9496
+ emits("remove");
9497
+ };
9498
+ return (_ctx, _cache) => {
9499
+ return vue.openBlock(), vue.createBlock(_sfc_main$4, null, {
9500
+ default: vue.withCtx(() => [
9501
+ vue.createElementVNode("div", _hoisted_1$3, [
9502
+ _ctx.showCopy ? (vue.openBlock(), vue.createElementBlock("div", {
9503
+ key: 0,
9504
+ class: "action-btn",
9505
+ onClick: handleCopy
9506
+ }, [
9507
+ vue.createVNode(vue.unref(DbIcon), { type: "copy" })
9508
+ ])) : vue.createCommentVNode("v-if", true),
9509
+ _ctx.showAdd ? (vue.openBlock(), vue.createElementBlock("div", {
9510
+ key: 1,
9511
+ class: "action-btn",
9512
+ onClick: handleAppend
9513
+ }, [
9514
+ vue.createVNode(vue.unref(DbIcon), { type: "plus-fill" })
9515
+ ])) : vue.createCommentVNode("v-if", true),
9516
+ _ctx.showRemove ? (vue.openBlock(), vue.createElementBlock(
9517
+ "div",
9518
+ {
9519
+ key: 2,
9520
+ class: vue.normalizeClass(["action-btn", {
9521
+ disabled: _ctx.removeable
9522
+ }]),
9523
+ onClick: handleRemove
9524
+ },
9525
+ [
9526
+ vue.createVNode(vue.unref(DbIcon), { type: "minus-fill" })
9527
+ ],
9528
+ 2
9529
+ /* CLASS */
9530
+ )) : vue.createCommentVNode("v-if", true)
9531
+ ])
9532
+ ]),
9533
+ _: 1
9534
+ /* STABLE */
9535
+ });
9536
+ };
9324
9537
  }
9325
- function hide2() {
9326
- var isAlreadyHidden = !instance.state.isVisible;
9327
- var isDestroyed = instance.state.isDestroyed;
9328
- var isDisabled = !instance.state.isEnabled;
9329
- var duration = getValueAtIndexOrReturn(instance.props.duration, 1, defaultProps.duration);
9330
- if (isAlreadyHidden || isDestroyed || isDisabled) {
9331
- return;
9332
- }
9333
- invokeHook("onHide", [instance], false);
9334
- if (instance.props.onHide(instance) === false) {
9335
- return;
9336
- }
9337
- instance.state.isVisible = false;
9338
- instance.state.isShown = false;
9339
- ignoreOnFirstUpdate = false;
9340
- isVisibleFromClick = false;
9341
- if (getIsDefaultRenderFn()) {
9342
- popper2.style.visibility = "hidden";
9343
- }
9344
- cleanupInteractiveMouseListeners();
9345
- removeDocumentPress();
9346
- handleStyles(true);
9347
- if (getIsDefaultRenderFn()) {
9348
- var _getDefaultTemplateCh4 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh4.box, content = _getDefaultTemplateCh4.content;
9349
- if (instance.props.animation) {
9350
- setTransitionDuration([box, content], duration);
9351
- setVisibilityState([box, content], "hidden");
9538
+ });
9539
+ const _hoisted_1$2 = {
9540
+ key: 0,
9541
+ class: "select-error"
9542
+ };
9543
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
9544
+ __name: "select-column",
9545
+ props: /* @__PURE__ */ vue.mergeModels({
9546
+ list: {},
9547
+ placeholder: { default: "请选择" },
9548
+ rules: { default: () => [] },
9549
+ disabled: { type: Boolean, default: false },
9550
+ multiple: { type: Boolean, default: false },
9551
+ showSelectAll: { type: Boolean, default: false }
9552
+ }, {
9553
+ "modelValue": {},
9554
+ "modelModifiers": {}
9555
+ }),
9556
+ emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
9557
+ setup(__props, { expose: __expose, emit: __emit }) {
9558
+ const { Option } = bkuiVue.Select;
9559
+ const props = __props;
9560
+ const emits = __emit;
9561
+ const modelValue = vue.useModel(__props, "modelValue");
9562
+ const rootRef = vue.ref();
9563
+ const localValue = vue.ref("");
9564
+ const rootHeight = vue.ref(42);
9565
+ const { message: errorMessage, validator } = useValidtor(props.rules);
9566
+ const vBkTooltips = bkuiVue.bkTooltips;
9567
+ vue.watch(
9568
+ modelValue,
9569
+ (value) => {
9570
+ if (value === void 0) {
9571
+ return;
9572
+ }
9573
+ localValue.value = value;
9574
+ if (typeof value !== "object" && value) {
9575
+ validator(value);
9576
+ return;
9577
+ }
9578
+ if (Array.isArray(value) && value.length > 0) {
9579
+ validator(value);
9580
+ return;
9581
+ }
9582
+ },
9583
+ {
9584
+ immediate: true
9352
9585
  }
9353
- }
9354
- handleAriaContentAttribute();
9355
- handleAriaExpandedAttribute();
9356
- if (instance.props.animation) {
9357
- if (getIsDefaultRenderFn()) {
9358
- onTransitionedOut(duration, instance.unmount);
9586
+ );
9587
+ const handleSelect = (value) => {
9588
+ localValue.value = value;
9589
+ validator(localValue.value).then(() => {
9590
+ modelValue.value = value;
9591
+ emits("change", localValue.value);
9592
+ });
9593
+ };
9594
+ const handleRemove = () => {
9595
+ localValue.value = "";
9596
+ validator(localValue.value).then(() => {
9597
+ modelValue.value = localValue.value;
9598
+ emits("change", localValue.value);
9599
+ });
9600
+ };
9601
+ const checkRootHeight = () => {
9602
+ rootHeight.value = rootRef.value.parentNode.clientHeight;
9603
+ };
9604
+ useResizeObserver(rootRef, _.throttle(checkRootHeight, 500));
9605
+ __expose({
9606
+ getValue() {
9607
+ return validator(localValue.value).then(() => localValue.value);
9359
9608
  }
9360
- } else {
9361
- instance.unmount();
9362
- }
9363
- }
9364
- function hideWithInteractivity(event) {
9365
- getDocument().addEventListener("mousemove", debouncedOnMouseMove);
9366
- pushIfUnique(mouseMoveListeners, debouncedOnMouseMove);
9367
- debouncedOnMouseMove(event);
9368
- }
9369
- function unmount() {
9370
- if (instance.state.isVisible) {
9371
- instance.hide();
9372
- }
9373
- if (!instance.state.isMounted) {
9374
- return;
9375
- }
9376
- destroyPopperInstance();
9377
- getNestedPopperTree().forEach(function(nestedPopper) {
9378
- nestedPopper._tippy.unmount();
9379
- });
9380
- if (popper2.parentNode) {
9381
- popper2.parentNode.removeChild(popper2);
9382
- }
9383
- mountedInstances = mountedInstances.filter(function(i) {
9384
- return i !== instance;
9385
9609
  });
9386
- instance.state.isMounted = false;
9387
- invokeHook("onHidden", [instance]);
9388
- }
9389
- function destroy() {
9390
- if (instance.state.isDestroyed) {
9391
- return;
9392
- }
9393
- instance.clearDelayTimeouts();
9394
- instance.unmount();
9395
- removeListeners();
9396
- delete reference2._tippy;
9397
- instance.state.isDestroyed = true;
9398
- invokeHook("onDestroy", [instance]);
9399
- }
9400
- }
9401
- function tippy(targets, optionalProps) {
9402
- if (optionalProps === void 0) {
9403
- optionalProps = {};
9404
- }
9405
- var plugins = defaultProps.plugins.concat(optionalProps.plugins || []);
9406
- bindGlobalEventListeners();
9407
- var passedProps = Object.assign({}, optionalProps, {
9408
- plugins
9409
- });
9410
- var elements = getArrayOfElements(targets);
9411
- var instances = elements.reduce(function(acc, reference2) {
9412
- var instance = reference2 && createTippy(reference2, passedProps);
9413
- if (instance) {
9414
- acc.push(instance);
9415
- }
9416
- return acc;
9417
- }, []);
9418
- return isElement(targets) ? instances[0] : instances;
9419
- }
9420
- tippy.defaultProps = defaultProps;
9421
- tippy.setDefaultProps = setDefaultProps;
9422
- tippy.currentInput = currentInput;
9423
- Object.assign({}, applyStyles$1, {
9424
- effect: function effect2(_ref) {
9425
- var state = _ref.state;
9426
- var initialStyles = {
9427
- popper: {
9428
- position: state.options.strategy,
9429
- left: "0",
9430
- top: "0",
9431
- margin: "0"
9432
- },
9433
- arrow: {
9434
- position: "absolute"
9435
- },
9436
- reference: {}
9610
+ return (_ctx, _cache) => {
9611
+ return vue.openBlock(), vue.createElementBlock(
9612
+ "div",
9613
+ {
9614
+ ref_key: "rootRef",
9615
+ ref: rootRef,
9616
+ class: vue.normalizeClass(["bk-ediatable-select", {
9617
+ "is-error": Boolean(vue.unref(errorMessage)),
9618
+ "is-disable": _ctx.disabled
9619
+ }]),
9620
+ style: vue.normalizeStyle({ height: rootHeight.value + "px" })
9621
+ },
9622
+ [
9623
+ vue.createVNode(vue.unref(bkuiVue.Select), vue.mergeProps(_ctx.$attrs, {
9624
+ "model-value": localValue.value,
9625
+ "auto-focus": "",
9626
+ class: "select-box",
9627
+ clearable: false,
9628
+ disabled: _ctx.disabled,
9629
+ filterable: "",
9630
+ "input-search": false,
9631
+ multiple: _ctx.multiple,
9632
+ placeholder: _ctx.placeholder,
9633
+ "show-select-all": _ctx.showSelectAll,
9634
+ onChange: handleSelect,
9635
+ onClear: handleRemove
9636
+ }), {
9637
+ default: vue.withCtx(() => [
9638
+ (vue.openBlock(true), vue.createElementBlock(
9639
+ vue.Fragment,
9640
+ null,
9641
+ vue.renderList(_ctx.list, (item, index) => {
9642
+ return vue.openBlock(), vue.createBlock(vue.unref(Option), {
9643
+ key: index,
9644
+ label: item.label,
9645
+ value: item.value
9646
+ }, null, 8, ["label", "value"]);
9647
+ }),
9648
+ 128
9649
+ /* KEYED_FRAGMENT */
9650
+ ))
9651
+ ]),
9652
+ _: 1
9653
+ /* STABLE */
9654
+ }, 16, ["model-value", "disabled", "multiple", "placeholder", "show-select-all"]),
9655
+ vue.unref(errorMessage) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
9656
+ vue.withDirectives(vue.createVNode(
9657
+ vue.unref(DbIcon),
9658
+ { type: "exclamation-fill" },
9659
+ null,
9660
+ 512
9661
+ /* NEED_PATCH */
9662
+ ), [
9663
+ [vue.unref(vBkTooltips), vue.unref(errorMessage)]
9664
+ ])
9665
+ ])) : vue.createCommentVNode("v-if", true)
9666
+ ],
9667
+ 6
9668
+ /* CLASS, STYLE */
9669
+ );
9437
9670
  };
9438
- Object.assign(state.elements.popper.style, initialStyles.popper);
9439
- state.styles = initialStyles;
9440
- if (state.elements.arrow) {
9441
- Object.assign(state.elements.arrow.style, initialStyles.arrow);
9442
- }
9443
9671
  }
9444
9672
  });
9445
- tippy.setDefaultProps({
9446
- render
9447
- });
9448
9673
  const _hoisted_1$1 = {
9449
9674
  key: 0,
9450
9675
  class: "input-error"
@@ -9454,7 +9679,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9454
9679
  style: { "display": "none" }
9455
9680
  };
9456
9681
  const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
9457
- __name: "tag-input",
9682
+ __name: "tag-input-column",
9458
9683
  props: /* @__PURE__ */ vue.mergeModels({
9459
9684
  placeholder: { default: "" },
9460
9685
  single: { type: Boolean, default: false },
@@ -9473,6 +9698,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9473
9698
  const popRef = vue.ref();
9474
9699
  const isFocus = vue.ref(false);
9475
9700
  let tippyIns;
9701
+ const vBkTooltips = bkuiVue.bkTooltips;
9476
9702
  const { message: errorMessage, validator } = useValidtor(props.rules);
9477
9703
  const tagInputPasteFn = (value) => value.split("\n").map((item) => ({ id: item }));
9478
9704
  const handleChange = (value) => {
@@ -9524,7 +9750,6 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9524
9750
  }
9525
9751
  });
9526
9752
  return (_ctx, _cache) => {
9527
- const _directive_bk_tooltips = vue.resolveDirective("bk-tooltips");
9528
9753
  return vue.openBlock(), vue.createElementBlock(
9529
9754
  "div",
9530
9755
  {
@@ -9561,7 +9786,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9561
9786
  512
9562
9787
  /* NEED_PATCH */
9563
9788
  ), [
9564
- [_directive_bk_tooltips, vue.unref(errorMessage)]
9789
+ [vue.unref(vBkTooltips), vue.unref(errorMessage)]
9565
9790
  ])
9566
9791
  ])) : vue.createCommentVNode("v-if", true)
9567
9792
  ],
@@ -9592,17 +9817,17 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9592
9817
  });
9593
9818
  function useIsWidthOverflow(domRef, watchVariable) {
9594
9819
  const isOverflow = vue.ref(false);
9595
- const checkOverflow = () => {
9820
+ const checkOverflow2 = () => {
9596
9821
  if (domRef.value) {
9597
9822
  isOverflow.value = domRef.value.clientWidth < domRef.value.scrollWidth;
9598
9823
  }
9599
9824
  };
9600
- useResizeObserver(domRef, checkOverflow);
9825
+ useResizeObserver(domRef, checkOverflow2);
9601
9826
  vue.watch(
9602
9827
  watchVariable,
9603
9828
  () => {
9604
9829
  setTimeout(() => {
9605
- checkOverflow();
9830
+ checkOverflow2();
9606
9831
  });
9607
9832
  },
9608
9833
  {
@@ -9621,7 +9846,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9621
9846
  class: "input-error"
9622
9847
  };
9623
9848
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
9624
- __name: "text-plain",
9849
+ __name: "text-plain-column",
9625
9850
  props: {
9626
9851
  data: {},
9627
9852
  isLoading: { type: Boolean },
@@ -9632,6 +9857,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9632
9857
  const props = __props;
9633
9858
  const textRef = vue.ref();
9634
9859
  const renderData = vue.computed(() => props.data);
9860
+ const vBkTooltips = bkuiVue.bkTooltips;
9635
9861
  const { isOverflow } = useIsWidthOverflow(textRef, renderData);
9636
9862
  const { message: errorMessage, validator } = useValidtor(props.rules);
9637
9863
  __expose({
@@ -9640,7 +9866,6 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9640
9866
  }
9641
9867
  });
9642
9868
  return (_ctx, _cache) => {
9643
- const _directive_bk_tooltips = vue.resolveDirective("bk-tooltips");
9644
9869
  return vue.openBlock(), vue.createBlock(vue.unref(bkuiVue.Loading), { loading: _ctx.isLoading }, {
9645
9870
  default: vue.withCtx(() => [
9646
9871
  vue.withDirectives((vue.openBlock(), vue.createElementBlock(
@@ -9675,7 +9900,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9675
9900
  512
9676
9901
  /* NEED_PATCH */
9677
9902
  ), [
9678
- [_directive_bk_tooltips, vue.unref(errorMessage)]
9903
+ [vue.unref(vBkTooltips), vue.unref(errorMessage)]
9679
9904
  ])
9680
9905
  ])) : vue.createCommentVNode("v-if", true),
9681
9906
  vue.renderSlot(_ctx.$slots, "default")
@@ -9683,7 +9908,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9683
9908
  2
9684
9909
  /* CLASS */
9685
9910
  )), [
9686
- [_directive_bk_tooltips, {
9911
+ [vue.unref(vBkTooltips), {
9687
9912
  content: _ctx.data || _ctx.placeholder,
9688
9913
  disabled: !vue.unref(isOverflow)
9689
9914
  }]
@@ -9695,15 +9920,15 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
9695
9920
  };
9696
9921
  }
9697
9922
  });
9698
- exports2.DateTimePickerColumn = _sfc_main$7;
9699
- exports2.Ediatable = _sfc_main$8;
9700
- exports2.FixedColumn = _sfc_main$5;
9701
- exports2.HeadColumn = _sfc_main$4;
9702
- exports2.InputColumn = _sfc_main$6;
9923
+ exports2.DateTimePickerColumn = _sfc_main$6;
9924
+ exports2.Ediatable = _sfc_main$7;
9925
+ exports2.FixedColumn = _sfc_main$4;
9926
+ exports2.HeadColumn = _sfc_main$8;
9927
+ exports2.InputColumn = _sfc_main$5;
9703
9928
  exports2.OperationColumn = _sfc_main$3;
9704
9929
  exports2.SelectColumn = _sfc_main$2;
9705
9930
  exports2.TagInputColumn = _sfc_main$1;
9706
9931
  exports2.TextPlainColumn = _sfc_main;
9707
- exports2.default = _sfc_main$8;
9932
+ exports2.default = _sfc_main$7;
9708
9933
  Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
9709
9934
  });