bkui-vue 0.0.2-beta.35 → 0.0.2-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +25 -25
- package/dist/index.esm.js +30 -14
- package/dist/index.umd.js +44 -44
- package/lib/affix/index.js +391 -1
- package/lib/alert/index.js +287 -1
- package/lib/animate-number/index.js +219 -1
- package/lib/backtop/index.js +264 -1
- package/lib/badge/index.js +304 -1
- package/lib/breadcrumb/index.js +379 -1
- package/lib/button/index.js +403 -1
- package/lib/card/index.js +369 -1
- package/lib/cascader/index.js +2095 -2
- package/lib/checkbox/index.js +602 -1
- package/lib/code-diff/index.js +5548 -1
- package/lib/collapse/index.js +605 -1
- package/lib/collapse-transition/index.js +237 -1
- package/lib/color-picker/index.js +2735 -1
- package/lib/components.js +770 -1
- package/lib/config-provider/index.js +377 -1
- package/lib/container/index.js +408 -1
- package/lib/date-picker/index.js +5576 -1
- package/lib/dialog/index.js +1324 -2
- package/lib/directives/index.js +1386 -2
- package/lib/dist.index.js +179 -1
- package/lib/divider/index.js +237 -1
- package/lib/dropdown/index.js +455 -1
- package/lib/exception/index.js +435 -1
- package/lib/fixed-navbar/index.js +222 -1
- package/lib/form/index.js +1004 -1
- package/lib/hooks.js +133 -1
- package/lib/icon/angle-double-down-line.js +541 -1
- package/lib/icon/angle-double-left-line.js +541 -1
- package/lib/icon/angle-double-left.js +541 -1
- package/lib/icon/angle-double-right-line.js +541 -1
- package/lib/icon/angle-double-right.js +541 -1
- package/lib/icon/angle-double-up-line.js +541 -1
- package/lib/icon/angle-down-fill.js +541 -1
- package/lib/icon/angle-down-line.js +541 -1
- package/lib/icon/angle-down.js +541 -1
- package/lib/icon/angle-left.js +541 -1
- package/lib/icon/angle-right.js +541 -1
- package/lib/icon/angle-up-fill.js +541 -1
- package/lib/icon/angle-up.js +541 -1
- package/lib/icon/archive-fill.js +541 -1
- package/lib/icon/arrows-left.js +541 -1
- package/lib/icon/arrows-right.js +541 -1
- package/lib/icon/assistant.js +541 -1
- package/lib/icon/audio-fill.js +541 -1
- package/lib/icon/bk.js +541 -1
- package/lib/icon/circle.js +541 -1
- package/lib/icon/close-line.js +541 -1
- package/lib/icon/close.js +541 -1
- package/lib/icon/code.js +541 -1
- package/lib/icon/cog-shape.js +541 -1
- package/lib/icon/collapse-left.js +541 -1
- package/lib/icon/copy-shape.js +541 -1
- package/lib/icon/copy.js +541 -1
- package/lib/icon/data-shape.js +541 -1
- package/lib/icon/del.js +541 -1
- package/lib/icon/doc-fill.js +541 -1
- package/lib/icon/done.js +541 -1
- package/lib/icon/down-shape.js +541 -1
- package/lib/icon/down-small.js +541 -1
- package/lib/icon/edit-line.js +541 -1
- package/lib/icon/ellipsis.js +541 -1
- package/lib/icon/enlarge-line.js +541 -1
- package/lib/icon/error.js +541 -1
- package/lib/icon/excel-fill.js +541 -1
- package/lib/icon/exclamation-circle-shape.js +541 -1
- package/lib/icon/eye.js +541 -1
- package/lib/icon/filliscreen-line.js +541 -1
- package/lib/icon/fix-line.js +541 -1
- package/lib/icon/fix-shape.js +541 -1
- package/lib/icon/folder-open.js +541 -1
- package/lib/icon/folder-shape-open.js +541 -1
- package/lib/icon/folder-shape.js +541 -1
- package/lib/icon/folder.js +541 -1
- package/lib/icon/funnel.js +541 -1
- package/lib/icon/help-document-fill.js +541 -1
- package/lib/icon/help-fill.js +541 -1
- package/lib/icon/help.js +541 -1
- package/lib/icon/image-fill.js +563 -1
- package/lib/icon/img-error.js +563 -1
- package/lib/icon/img-placehoulder.js +563 -1
- package/lib/icon/index.js +2353 -1
- package/lib/icon/info-line.js +563 -1
- package/lib/icon/info.js +563 -1
- package/lib/icon/left-shape.js +563 -1
- package/lib/icon/left-turn-line.js +563 -1
- package/lib/icon/narrow-line.js +563 -1
- package/lib/icon/original.js +563 -1
- package/lib/icon/pdf-fill.js +563 -1
- package/lib/icon/play-shape.js +563 -1
- package/lib/icon/plus.js +563 -1
- package/lib/icon/ppt-fill.js +563 -1
- package/lib/icon/qq.js +563 -1
- package/lib/icon/right-shape.js +563 -1
- package/lib/icon/right-turn-line.js +563 -1
- package/lib/icon/search.js +563 -1
- package/lib/icon/share.js +563 -1
- package/lib/icon/spinner.js +563 -1
- package/lib/icon/success.js +563 -1
- package/lib/icon/switcher-loading.js +563 -1
- package/lib/icon/text-file.js +563 -1
- package/lib/icon/text-fill.js +563 -1
- package/lib/icon/transfer.js +563 -1
- package/lib/icon/tree-application-shape.js +563 -1
- package/lib/icon/unfull-screen.js +563 -1
- package/lib/icon/unvisible.js +563 -1
- package/lib/icon/up-shape.js +563 -1
- package/lib/icon/upload.js +563 -1
- package/lib/icon/video-fill.js +563 -1
- package/lib/icon/warn.js +563 -1
- package/lib/icon/weixin-pro.js +563 -1
- package/lib/icon/weixin.js +563 -1
- package/lib/image/index.js +681 -1
- package/lib/index.js +195 -1
- package/lib/info-box/index.js +1514 -2
- package/lib/input/index.js +1038 -1
- package/lib/link/index.js +232 -1
- package/lib/loading/index.js +443 -1
- package/lib/locale/index.js +489 -1
- package/lib/menu/index.js +793 -1
- package/lib/message/index.js +1842 -2
- package/lib/message/messageConstructor.d.ts +1 -1
- package/lib/modal/index.js +407 -1
- package/lib/navigation/index.js +439 -1
- package/lib/notify/index.js +470 -1
- package/lib/overflow-title/index.js +547 -1
- package/lib/pagination/index.js +974 -1
- package/lib/plugin-popover/index.js +4121 -1
- package/lib/plugins/index.js +130 -1
- package/lib/pop-confirm/index.js +367 -1
- package/lib/popover/content.d.ts +8 -0
- package/lib/popover/index.d.ts +12 -0
- package/lib/popover/index.js +4127 -1
- package/lib/popover/popover.d.ts +7 -0
- package/lib/popover/props.d.ts +3 -0
- package/lib/popover2/index.js +171 -1
- package/lib/preset.js +164 -1
- package/lib/process/index.js +1146 -2
- package/lib/progress/index.js +495 -1
- package/lib/radio/index.js +693 -1
- package/lib/rate/index.js +406 -1
- package/lib/resize-layout/index.js +499 -1
- package/lib/search-select/index.js +3024 -2
- package/lib/select/index.d.ts +25 -3
- package/lib/select/index.js +2599 -2
- package/lib/select/select.d.ts +11 -1
- package/lib/shared/index.js +2832 -1
- package/lib/sideslider/index.js +1056 -2
- package/lib/slider/index.js +1683 -2
- package/lib/steps/index.js +1215 -2
- package/lib/swiper/index.js +404 -1
- package/lib/switcher/index.js +335 -1
- package/lib/tab/index.js +935 -1
- package/lib/table/index.js +6588 -1
- package/lib/table-column/index.js +768 -1
- package/lib/tag/index.js +309 -1
- package/lib/tag-input/index.d.ts +9 -0
- package/lib/tag-input/index.js +1758 -1
- package/lib/tag-input/tag-input.d.ts +20 -0
- package/lib/tag-input/tag-props.d.ts +3 -0
- package/lib/time-picker/index.js +142 -1
- package/lib/timeline/index.js +310 -1
- package/lib/transfer/index.js +767 -1
- package/lib/tree/index.js +2664 -1
- package/lib/upload/index.js +3257 -2
- package/lib/virtual-render/index.js +806 -1
- package/package.json +1 -1
- package/lib/cascader/index.js.LICENSE.txt +0 -1
- package/lib/dialog/index.js.LICENSE.txt +0 -1
- package/lib/directives/index.js.LICENSE.txt +0 -14
- package/lib/info-box/index.js.LICENSE.txt +0 -1
- package/lib/message/index.js.LICENSE.txt +0 -6
- package/lib/process/index.js.LICENSE.txt +0 -1
- package/lib/search-select/index.js.LICENSE.txt +0 -1
- package/lib/select/index.js.LICENSE.txt +0 -1
- package/lib/sideslider/index.js.LICENSE.txt +0 -1
- package/lib/slider/index.js.LICENSE.txt +0 -1
- package/lib/steps/index.js.LICENSE.txt +0 -1
- package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,547 @@
|
|
1
|
-
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("../shared"), require("vue"), require("../popover"), require("vue-types"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["../shared", "vue", "../popover", "vue-types"], factory);
|
6
|
+
else {
|
7
|
+
var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../popover"), require("vue-types")) : factory(root["../shared"], root["vue"], root["../popover"], root["vue-types"]);
|
8
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
9
|
+
}
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__5537__, __WEBPACK_EXTERNAL_MODULE__210__) => {
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
14
|
+
|
15
|
+
/***/ 35:
|
16
|
+
/***/ ((module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
17
|
+
|
18
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9601);
|
19
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
20
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2609);
|
21
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
22
|
+
// Imports
|
23
|
+
|
24
|
+
|
25
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
26
|
+
// Module
|
27
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.text-ov {
|
28
|
+
overflow: hidden;
|
29
|
+
text-overflow: ellipsis;
|
30
|
+
white-space: nowrap;
|
31
|
+
}
|
32
|
+
.position-relative {
|
33
|
+
position: relative;
|
34
|
+
}
|
35
|
+
.position-absolute {
|
36
|
+
position: absolute;
|
37
|
+
}
|
38
|
+
`, ""]);
|
39
|
+
// Exports
|
40
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (___CSS_LOADER_EXPORT___)));
|
41
|
+
|
42
|
+
|
43
|
+
/***/ }),
|
44
|
+
|
45
|
+
/***/ 2609:
|
46
|
+
/***/ ((module) => {
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
/*
|
51
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
52
|
+
Author Tobias Koppers @sokra
|
53
|
+
*/
|
54
|
+
module.exports = function (cssWithMappingToString) {
|
55
|
+
var list = [];
|
56
|
+
|
57
|
+
// return the list of modules as css string
|
58
|
+
list.toString = function toString() {
|
59
|
+
return this.map(function (item) {
|
60
|
+
var content = "";
|
61
|
+
var needLayer = typeof item[5] !== "undefined";
|
62
|
+
if (item[4]) {
|
63
|
+
content += "@supports (".concat(item[4], ") {");
|
64
|
+
}
|
65
|
+
if (item[2]) {
|
66
|
+
content += "@media ".concat(item[2], " {");
|
67
|
+
}
|
68
|
+
if (needLayer) {
|
69
|
+
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
|
70
|
+
}
|
71
|
+
content += cssWithMappingToString(item);
|
72
|
+
if (needLayer) {
|
73
|
+
content += "}";
|
74
|
+
}
|
75
|
+
if (item[2]) {
|
76
|
+
content += "}";
|
77
|
+
}
|
78
|
+
if (item[4]) {
|
79
|
+
content += "}";
|
80
|
+
}
|
81
|
+
return content;
|
82
|
+
}).join("");
|
83
|
+
};
|
84
|
+
|
85
|
+
// import a list of modules into the list
|
86
|
+
list.i = function i(modules, media, dedupe, supports, layer) {
|
87
|
+
if (typeof modules === "string") {
|
88
|
+
modules = [[null, modules, undefined]];
|
89
|
+
}
|
90
|
+
var alreadyImportedModules = {};
|
91
|
+
if (dedupe) {
|
92
|
+
for (var k = 0; k < this.length; k++) {
|
93
|
+
var id = this[k][0];
|
94
|
+
if (id != null) {
|
95
|
+
alreadyImportedModules[id] = true;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
for (var _k = 0; _k < modules.length; _k++) {
|
100
|
+
var item = [].concat(modules[_k]);
|
101
|
+
if (dedupe && alreadyImportedModules[item[0]]) {
|
102
|
+
continue;
|
103
|
+
}
|
104
|
+
if (typeof layer !== "undefined") {
|
105
|
+
if (typeof item[5] === "undefined") {
|
106
|
+
item[5] = layer;
|
107
|
+
} else {
|
108
|
+
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
|
109
|
+
item[5] = layer;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
if (media) {
|
113
|
+
if (!item[2]) {
|
114
|
+
item[2] = media;
|
115
|
+
} else {
|
116
|
+
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
|
117
|
+
item[2] = media;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
if (supports) {
|
121
|
+
if (!item[4]) {
|
122
|
+
item[4] = "".concat(supports);
|
123
|
+
} else {
|
124
|
+
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
|
125
|
+
item[4] = supports;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
list.push(item);
|
129
|
+
}
|
130
|
+
};
|
131
|
+
return list;
|
132
|
+
};
|
133
|
+
|
134
|
+
/***/ }),
|
135
|
+
|
136
|
+
/***/ 9601:
|
137
|
+
/***/ ((module) => {
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
module.exports = function (i) {
|
142
|
+
return i[1];
|
143
|
+
};
|
144
|
+
|
145
|
+
/***/ }),
|
146
|
+
|
147
|
+
/***/ 5537:
|
148
|
+
/***/ ((module) => {
|
149
|
+
|
150
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__5537__;
|
151
|
+
|
152
|
+
/***/ }),
|
153
|
+
|
154
|
+
/***/ 4212:
|
155
|
+
/***/ ((module) => {
|
156
|
+
|
157
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
|
158
|
+
|
159
|
+
/***/ }),
|
160
|
+
|
161
|
+
/***/ 748:
|
162
|
+
/***/ ((module) => {
|
163
|
+
|
164
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
|
165
|
+
|
166
|
+
/***/ }),
|
167
|
+
|
168
|
+
/***/ 210:
|
169
|
+
/***/ ((module) => {
|
170
|
+
|
171
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__210__;
|
172
|
+
|
173
|
+
/***/ })
|
174
|
+
|
175
|
+
/******/ });
|
176
|
+
/************************************************************************/
|
177
|
+
/******/ // The module cache
|
178
|
+
/******/ var __webpack_module_cache__ = {};
|
179
|
+
/******/
|
180
|
+
/******/ // The require function
|
181
|
+
/******/ function __webpack_require__(moduleId) {
|
182
|
+
/******/ // Check if module is in cache
|
183
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
184
|
+
/******/ if (cachedModule !== undefined) {
|
185
|
+
/******/ return cachedModule.exports;
|
186
|
+
/******/ }
|
187
|
+
/******/ // Create a new module (and put it into the cache)
|
188
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
189
|
+
/******/ id: moduleId,
|
190
|
+
/******/ // no module.loaded needed
|
191
|
+
/******/ exports: {}
|
192
|
+
/******/ };
|
193
|
+
/******/
|
194
|
+
/******/ // Execute the module function
|
195
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
196
|
+
/******/
|
197
|
+
/******/ // Return the exports of the module
|
198
|
+
/******/ return module.exports;
|
199
|
+
/******/ }
|
200
|
+
/******/
|
201
|
+
/************************************************************************/
|
202
|
+
/******/ /* webpack/runtime/compat get default export */
|
203
|
+
/******/ (() => {
|
204
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
205
|
+
/******/ __webpack_require__.n = (module) => {
|
206
|
+
/******/ var getter = module && module.__esModule ?
|
207
|
+
/******/ () => (module['default']) :
|
208
|
+
/******/ () => (module);
|
209
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
210
|
+
/******/ return getter;
|
211
|
+
/******/ };
|
212
|
+
/******/ })();
|
213
|
+
/******/
|
214
|
+
/******/ /* webpack/runtime/define property getters */
|
215
|
+
/******/ (() => {
|
216
|
+
/******/ // define getter functions for harmony exports
|
217
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
218
|
+
/******/ for(var key in definition) {
|
219
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
220
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
221
|
+
/******/ }
|
222
|
+
/******/ }
|
223
|
+
/******/ };
|
224
|
+
/******/ })();
|
225
|
+
/******/
|
226
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
227
|
+
/******/ (() => {
|
228
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
229
|
+
/******/ })();
|
230
|
+
/******/
|
231
|
+
/******/ /* webpack/runtime/make namespace object */
|
232
|
+
/******/ (() => {
|
233
|
+
/******/ // define __esModule on exports
|
234
|
+
/******/ __webpack_require__.r = (exports) => {
|
235
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
236
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
237
|
+
/******/ }
|
238
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
239
|
+
/******/ };
|
240
|
+
/******/ })();
|
241
|
+
/******/
|
242
|
+
/************************************************************************/
|
243
|
+
var __webpack_exports__ = {};
|
244
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
245
|
+
(() => {
|
246
|
+
// ESM COMPAT FLAG
|
247
|
+
__webpack_require__.r(__webpack_exports__);
|
248
|
+
|
249
|
+
// EXPORTS
|
250
|
+
__webpack_require__.d(__webpack_exports__, {
|
251
|
+
OverflowTitle: () => (/* reexport */ overflow_title),
|
252
|
+
"default": () => (/* binding */ src),
|
253
|
+
getActualWidthByCanvas: () => (/* reexport */ utils_getActualWidthByCanvas),
|
254
|
+
getActualWidthByDom: () => (/* reexport */ utils_getActualWidthByDom),
|
255
|
+
overflowTitle: () => (/* reexport */ directive_overflow_title)
|
256
|
+
});
|
257
|
+
|
258
|
+
// EXTERNAL MODULE: external "../shared"
|
259
|
+
var external_shared_ = __webpack_require__(4212);
|
260
|
+
// EXTERNAL MODULE: external "vue"
|
261
|
+
var external_vue_ = __webpack_require__(748);
|
262
|
+
// EXTERNAL MODULE: external "../popover"
|
263
|
+
var external_popover_ = __webpack_require__(5537);
|
264
|
+
var external_popover_default = /*#__PURE__*/__webpack_require__.n(external_popover_);
|
265
|
+
// EXTERNAL MODULE: external "vue-types"
|
266
|
+
var external_vue_types_ = __webpack_require__(210);
|
267
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/props.ts
|
268
|
+
/*
|
269
|
+
* Tencent is pleased to support the open source community by making
|
270
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
271
|
+
*
|
272
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
273
|
+
*
|
274
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
275
|
+
*
|
276
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
277
|
+
*
|
278
|
+
* ---------------------------------------------------
|
279
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
280
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
281
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
282
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
283
|
+
*
|
284
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
285
|
+
* the Software.
|
286
|
+
*
|
287
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
288
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
289
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
290
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
291
|
+
* IN THE SOFTWARE.
|
292
|
+
*/
|
293
|
+
|
294
|
+
|
295
|
+
var PlacementEnum;
|
296
|
+
(function (PlacementEnum) {
|
297
|
+
PlacementEnum["AUTO"] = "auto";
|
298
|
+
PlacementEnum["AUTO_START"] = "auto-start";
|
299
|
+
PlacementEnum["AUTO_END"] = "auto-end";
|
300
|
+
PlacementEnum["TOP"] = "top";
|
301
|
+
PlacementEnum["RIGHT"] = "right";
|
302
|
+
PlacementEnum["BOTTOM"] = "bottom";
|
303
|
+
PlacementEnum["LEFT"] = "left";
|
304
|
+
PlacementEnum["TOP_START"] = "top-start";
|
305
|
+
PlacementEnum["TOP_END"] = "top-end";
|
306
|
+
PlacementEnum["BOTTOM_START"] = "bottom-start";
|
307
|
+
PlacementEnum["BOTTOM_END"] = "bottom-end";
|
308
|
+
PlacementEnum["RIGHT_START"] = "right-start";
|
309
|
+
PlacementEnum["RIGHT_END"] = "right-end";
|
310
|
+
PlacementEnum["LEFT_START"] = "left-start";
|
311
|
+
PlacementEnum["LEFT_END"] = "left-end";
|
312
|
+
})(PlacementEnum || (PlacementEnum = {}));
|
313
|
+
function placementType() {
|
314
|
+
return (0,external_vue_types_.string)().def(PlacementEnum.BOTTOM);
|
315
|
+
}
|
316
|
+
/* harmony default export */ const props = ({
|
317
|
+
content: external_shared_.PropTypes.string,
|
318
|
+
type: external_shared_.PropTypes.oneOf(['tips', 'title']).def('title'),
|
319
|
+
calType: external_shared_.PropTypes.oneOf(['dom', 'canvas']).def('dom'),
|
320
|
+
boundary: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string.def('parent'), external_shared_.PropTypes.instanceOf(HTMLElement)]).def(document.body),
|
321
|
+
placement: placementType().def(PlacementEnum.TOP_START),
|
322
|
+
resizeable: external_shared_.PropTypes.bool
|
323
|
+
});
|
324
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByCanvas.ts
|
325
|
+
function getActualWidthByCanvas(text, options) {
|
326
|
+
var _options$fontSize = options.fontSize,
|
327
|
+
fontSize = _options$fontSize === void 0 ? 14 : _options$fontSize,
|
328
|
+
_options$fontFamily = options.fontFamily,
|
329
|
+
fontFamily = _options$fontFamily === void 0 ? 'Microsoft YaHei' : _options$fontFamily;
|
330
|
+
var canvas = document.createElement('canvas');
|
331
|
+
var ctx = canvas.getContext('2d');
|
332
|
+
ctx.font = "".concat(fontSize, "px ").concat(fontFamily);
|
333
|
+
var metrics = ctx.measureText(text);
|
334
|
+
var actual = Math.abs(metrics.actualBoundingBoxLeft) + Math.abs(metrics.actualBoundingBoxRight);
|
335
|
+
return Math.max(metrics.width, actual);
|
336
|
+
}
|
337
|
+
/* harmony default export */ const utils_getActualWidthByCanvas = (getActualWidthByCanvas);
|
338
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByDom.ts
|
339
|
+
function getActualWidthByDom(text, options) {
|
340
|
+
var dom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document.body;
|
341
|
+
if (!dom) {
|
342
|
+
return 0;
|
343
|
+
}
|
344
|
+
var _ref = options || {},
|
345
|
+
fontSize = _ref.fontSize,
|
346
|
+
fontFamily = _ref.fontFamily;
|
347
|
+
var tempDom = document.createElement('div');
|
348
|
+
tempDom.style.cssText = "position: absolute;left: -999em;top:-999em;z-index: -1;text-overflow: initial;\n ".concat(fontSize ? "font-size:".concat(fontSize, " ;") : '', "\n ").concat(fontFamily ? "font-family:".concat(fontFamily, " ") : '', "\n ");
|
349
|
+
tempDom.innerText = text;
|
350
|
+
dom.append(tempDom);
|
351
|
+
var clientWidth = tempDom.clientWidth;
|
352
|
+
dom.removeChild(tempDom);
|
353
|
+
return clientWidth;
|
354
|
+
}
|
355
|
+
/* harmony default export */ const utils_getActualWidthByDom = (getActualWidthByDom);
|
356
|
+
// EXTERNAL MODULE: ../../packages/overflow-title/src/overflow.less
|
357
|
+
var overflow = __webpack_require__(35);
|
358
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/components/overflow-title.tsx
|
359
|
+
|
360
|
+
/*
|
361
|
+
* Tencent is pleased to support the open source community by making
|
362
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
363
|
+
*
|
364
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
365
|
+
*
|
366
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
367
|
+
*
|
368
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
369
|
+
*
|
370
|
+
* ---------------------------------------------------
|
371
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
372
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
373
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
374
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
375
|
+
*
|
376
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
377
|
+
* the Software.
|
378
|
+
*
|
379
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
380
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
381
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
382
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
383
|
+
* IN THE SOFTWARE.
|
384
|
+
*/
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
/* harmony default export */ const overflow_title = ((0,external_vue_.defineComponent)({
|
393
|
+
name: 'OverflowTitle',
|
394
|
+
props: props,
|
395
|
+
setup: function setup(props, _ref) {
|
396
|
+
var slots = _ref.slots;
|
397
|
+
var boxRef = (0,external_vue_.ref)(null);
|
398
|
+
var textRef = (0,external_vue_.ref)(null);
|
399
|
+
var isShowTips = (0,external_vue_.ref)(false);
|
400
|
+
var textProps = (0,external_vue_.shallowRef)();
|
401
|
+
var contentText = (0,external_vue_.computed)(function () {
|
402
|
+
var _a;
|
403
|
+
if (props.content) {
|
404
|
+
return props.content;
|
405
|
+
}
|
406
|
+
return (_a = slots === null || slots === void 0 ? void 0 : slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots);
|
407
|
+
});
|
408
|
+
(0,external_vue_.onMounted)(function () {
|
409
|
+
var clientWidth = boxRef.value.clientWidth;
|
410
|
+
var resizeHandler = (0,external_shared_.debounce)(500, function () {
|
411
|
+
var _a, _b, _c;
|
412
|
+
isShowTips.value = false;
|
413
|
+
textProps.value = {};
|
414
|
+
var textWidth = 0;
|
415
|
+
if (props.calType === 'dom') {
|
416
|
+
textWidth = utils_getActualWidthByDom((_a = textRef.value) === null || _a === void 0 ? void 0 : _a.textContent, null, boxRef.value);
|
417
|
+
} else {
|
418
|
+
var _getComputedStyle = getComputedStyle(boxRef.value),
|
419
|
+
fontSize = _getComputedStyle.fontSize,
|
420
|
+
fontFamily = _getComputedStyle.fontFamily;
|
421
|
+
textWidth = utils_getActualWidthByCanvas(contentText.value, {
|
422
|
+
fontSize: fontSize,
|
423
|
+
fontFamily: fontFamily
|
424
|
+
});
|
425
|
+
}
|
426
|
+
if (textWidth > clientWidth) {
|
427
|
+
isShowTips.value = true;
|
428
|
+
if (props.type === 'title') {
|
429
|
+
textProps.value = {
|
430
|
+
title: (_c = (_b = textRef === null || textRef === void 0 ? void 0 : textRef.value) === null || _b === void 0 ? void 0 : _b.innerText) !== null && _c !== void 0 ? _c : props.content
|
431
|
+
};
|
432
|
+
}
|
433
|
+
}
|
434
|
+
});
|
435
|
+
resizeHandler();
|
436
|
+
if (props.resizeable) {
|
437
|
+
var observer = new ResizeObserver(resizeHandler);
|
438
|
+
observer.observe(boxRef.value);
|
439
|
+
(0,external_vue_.onBeforeUnmount)(function () {
|
440
|
+
boxRef.value && (observer === null || observer === void 0 ? void 0 : observer.unobserve(boxRef.value));
|
441
|
+
observer === null || observer === void 0 ? void 0 : observer.disconnect();
|
442
|
+
});
|
443
|
+
}
|
444
|
+
});
|
445
|
+
return {
|
446
|
+
boxRef: boxRef,
|
447
|
+
textRef: textRef,
|
448
|
+
isShowTips: isShowTips,
|
449
|
+
contentText: contentText,
|
450
|
+
textProps: textProps
|
451
|
+
};
|
452
|
+
},
|
453
|
+
render: function render() {
|
454
|
+
var _this = this;
|
455
|
+
return (0,external_vue_.createVNode)("div", {
|
456
|
+
"ref": "boxRef",
|
457
|
+
"class": "position-relative"
|
458
|
+
}, [(0,external_vue_.createVNode)((external_popover_default()), {
|
459
|
+
"disabled": this.type === 'title' || !this.isShowTips,
|
460
|
+
"placement": this.placement,
|
461
|
+
"boundary": this.boundary || document.body
|
462
|
+
}, {
|
463
|
+
"default": function _default() {
|
464
|
+
return (0,external_vue_.createVNode)("div", (0,external_vue_.mergeProps)({
|
465
|
+
"ref": "textRef",
|
466
|
+
"class": "text-ov"
|
467
|
+
}, _this.textProps), [_this.contentText]);
|
468
|
+
},
|
469
|
+
content: function content() {
|
470
|
+
return _this.contentText;
|
471
|
+
}
|
472
|
+
})]);
|
473
|
+
}
|
474
|
+
}));
|
475
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/directive/overflow-title.ts
|
476
|
+
|
477
|
+
|
478
|
+
var overflowTitle = {
|
479
|
+
mounted: function mounted(el, _ref) {
|
480
|
+
var _ref$value = _ref.value,
|
481
|
+
value = _ref$value === void 0 ? {} : _ref$value;
|
482
|
+
var clientWidth = el.parentElement.clientWidth;
|
483
|
+
if (!clientWidth) {
|
484
|
+
return;
|
485
|
+
}
|
486
|
+
var content = value.content,
|
487
|
+
_value$calType = value.calType,
|
488
|
+
calType = _value$calType === void 0 ? 'dom' : _value$calType;
|
489
|
+
var text = content || el.innerText;
|
490
|
+
var textWidth = 0;
|
491
|
+
if (calType === 'dom') {
|
492
|
+
textWidth = utils_getActualWidthByDom(el.textContent, null, el.parentElement);
|
493
|
+
} else {
|
494
|
+
var _getComputedStyle = getComputedStyle(el),
|
495
|
+
fontSize = _getComputedStyle.fontSize,
|
496
|
+
fontFamily = _getComputedStyle.fontFamily;
|
497
|
+
textWidth = utils_getActualWidthByCanvas(text, {
|
498
|
+
fontSize: fontSize,
|
499
|
+
fontFamily: fontFamily
|
500
|
+
});
|
501
|
+
}
|
502
|
+
if (textWidth > clientWidth) {
|
503
|
+
el.setAttribute('title', text);
|
504
|
+
}
|
505
|
+
}
|
506
|
+
};
|
507
|
+
/* harmony default export */ const directive_overflow_title = (overflowTitle);
|
508
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/index.ts
|
509
|
+
/*
|
510
|
+
* Tencent is pleased to support the open source community by making
|
511
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
512
|
+
*
|
513
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
514
|
+
*
|
515
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
516
|
+
*
|
517
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
518
|
+
*
|
519
|
+
* ---------------------------------------------------
|
520
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
521
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
522
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
523
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
524
|
+
*
|
525
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
526
|
+
* the Software.
|
527
|
+
*
|
528
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
529
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
530
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
531
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
532
|
+
* IN THE SOFTWARE.
|
533
|
+
*/
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
var BkOverflowTitle = (0,external_shared_.withInstall)(overflow_title);
|
540
|
+
|
541
|
+
/* harmony default export */ const src = (BkOverflowTitle);
|
542
|
+
})();
|
543
|
+
|
544
|
+
/******/ return __webpack_exports__;
|
545
|
+
/******/ })()
|
546
|
+
;
|
547
|
+
});
|