bkui-vue 0.0.2-beta.37 → 0.0.2-beta.38

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.
Files changed (174) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/style.variable.css +1 -1
  3. package/lib/affix/index.js +1 -391
  4. package/lib/alert/index.js +1 -287
  5. package/lib/animate-number/index.js +1 -219
  6. package/lib/backtop/index.js +1 -264
  7. package/lib/badge/index.js +1 -304
  8. package/lib/breadcrumb/index.js +1 -379
  9. package/lib/button/index.js +1 -403
  10. package/lib/card/index.js +1 -369
  11. package/lib/cascader/index.js +2 -2095
  12. package/lib/cascader/index.js.LICENSE.txt +1 -0
  13. package/lib/checkbox/index.js +1 -602
  14. package/lib/code-diff/index.js +1 -5548
  15. package/lib/collapse/index.js +1 -605
  16. package/lib/collapse-transition/index.js +1 -237
  17. package/lib/color-picker/index.js +1 -2735
  18. package/lib/components.js +1 -770
  19. package/lib/config-provider/index.js +1 -377
  20. package/lib/container/index.js +1 -408
  21. package/lib/date-picker/index.js +1 -5576
  22. package/lib/dialog/index.js +2 -1324
  23. package/lib/dialog/index.js.LICENSE.txt +1 -0
  24. package/lib/directives/index.js +2 -1386
  25. package/lib/directives/index.js.LICENSE.txt +14 -0
  26. package/lib/dist.index.js +1 -179
  27. package/lib/divider/index.js +1 -237
  28. package/lib/dropdown/index.js +1 -455
  29. package/lib/exception/index.js +1 -435
  30. package/lib/fixed-navbar/index.js +1 -222
  31. package/lib/form/index.js +1 -1004
  32. package/lib/hooks.js +1 -133
  33. package/lib/icon/angle-double-down-line.js +1 -541
  34. package/lib/icon/angle-double-left-line.js +1 -541
  35. package/lib/icon/angle-double-left.js +1 -541
  36. package/lib/icon/angle-double-right-line.js +1 -541
  37. package/lib/icon/angle-double-right.js +1 -541
  38. package/lib/icon/angle-double-up-line.js +1 -541
  39. package/lib/icon/angle-down-fill.js +1 -541
  40. package/lib/icon/angle-down-line.js +1 -541
  41. package/lib/icon/angle-down.js +1 -541
  42. package/lib/icon/angle-left.js +1 -541
  43. package/lib/icon/angle-right.js +1 -541
  44. package/lib/icon/angle-up-fill.js +1 -541
  45. package/lib/icon/angle-up.js +1 -541
  46. package/lib/icon/archive-fill.js +1 -541
  47. package/lib/icon/arrows-left.js +1 -541
  48. package/lib/icon/arrows-right.js +1 -541
  49. package/lib/icon/assistant.js +1 -541
  50. package/lib/icon/audio-fill.js +1 -541
  51. package/lib/icon/bk.js +1 -541
  52. package/lib/icon/circle.js +1 -541
  53. package/lib/icon/close-line.js +1 -541
  54. package/lib/icon/close.js +1 -541
  55. package/lib/icon/code.js +1 -541
  56. package/lib/icon/cog-shape.js +1 -541
  57. package/lib/icon/collapse-left.js +1 -541
  58. package/lib/icon/copy-shape.js +1 -541
  59. package/lib/icon/copy.js +1 -541
  60. package/lib/icon/data-shape.js +1 -541
  61. package/lib/icon/del.js +1 -541
  62. package/lib/icon/doc-fill.js +1 -541
  63. package/lib/icon/done.js +1 -541
  64. package/lib/icon/down-shape.js +1 -541
  65. package/lib/icon/down-small.js +1 -541
  66. package/lib/icon/edit-line.js +1 -541
  67. package/lib/icon/ellipsis.js +1 -541
  68. package/lib/icon/enlarge-line.js +1 -541
  69. package/lib/icon/error.js +1 -541
  70. package/lib/icon/excel-fill.js +1 -541
  71. package/lib/icon/exclamation-circle-shape.js +1 -541
  72. package/lib/icon/eye.js +1 -541
  73. package/lib/icon/filliscreen-line.js +1 -541
  74. package/lib/icon/fix-line.js +1 -541
  75. package/lib/icon/fix-shape.js +1 -541
  76. package/lib/icon/folder-open.js +1 -541
  77. package/lib/icon/folder-shape-open.js +1 -541
  78. package/lib/icon/folder-shape.js +1 -541
  79. package/lib/icon/folder.js +1 -541
  80. package/lib/icon/funnel.js +1 -541
  81. package/lib/icon/help-document-fill.js +1 -541
  82. package/lib/icon/help-fill.js +1 -541
  83. package/lib/icon/help.js +1 -541
  84. package/lib/icon/image-fill.js +1 -563
  85. package/lib/icon/img-error.js +1 -563
  86. package/lib/icon/img-placehoulder.js +1 -563
  87. package/lib/icon/index.js +1 -2353
  88. package/lib/icon/info-line.js +1 -563
  89. package/lib/icon/info.js +1 -563
  90. package/lib/icon/left-shape.js +1 -563
  91. package/lib/icon/left-turn-line.js +1 -563
  92. package/lib/icon/narrow-line.js +1 -563
  93. package/lib/icon/original.js +1 -563
  94. package/lib/icon/pdf-fill.js +1 -563
  95. package/lib/icon/play-shape.js +1 -563
  96. package/lib/icon/plus.js +1 -563
  97. package/lib/icon/ppt-fill.js +1 -563
  98. package/lib/icon/qq.js +1 -563
  99. package/lib/icon/right-shape.js +1 -563
  100. package/lib/icon/right-turn-line.js +1 -563
  101. package/lib/icon/search.js +1 -563
  102. package/lib/icon/share.js +1 -563
  103. package/lib/icon/spinner.js +1 -563
  104. package/lib/icon/success.js +1 -563
  105. package/lib/icon/switcher-loading.js +1 -563
  106. package/lib/icon/text-file.js +1 -563
  107. package/lib/icon/text-fill.js +1 -563
  108. package/lib/icon/transfer.js +1 -563
  109. package/lib/icon/tree-application-shape.js +1 -563
  110. package/lib/icon/unfull-screen.js +1 -563
  111. package/lib/icon/unvisible.js +1 -563
  112. package/lib/icon/up-shape.js +1 -563
  113. package/lib/icon/upload.js +1 -563
  114. package/lib/icon/video-fill.js +1 -563
  115. package/lib/icon/warn.js +1 -563
  116. package/lib/icon/weixin-pro.js +1 -563
  117. package/lib/icon/weixin.js +1 -563
  118. package/lib/image/index.js +1 -681
  119. package/lib/index.js +1 -195
  120. package/lib/info-box/index.js +2 -1514
  121. package/lib/info-box/index.js.LICENSE.txt +1 -0
  122. package/lib/input/index.js +1 -1038
  123. package/lib/link/index.js +1 -232
  124. package/lib/loading/index.js +1 -443
  125. package/lib/locale/index.js +1 -489
  126. package/lib/menu/index.js +1 -793
  127. package/lib/message/index.js +2 -1842
  128. package/lib/message/index.js.LICENSE.txt +6 -0
  129. package/lib/modal/index.js +1 -407
  130. package/lib/navigation/index.js +1 -439
  131. package/lib/notify/index.js +1 -470
  132. package/lib/overflow-title/index.js +1 -547
  133. package/lib/pagination/index.js +1 -974
  134. package/lib/plugin-popover/index.js +1 -4121
  135. package/lib/plugins/index.js +1 -130
  136. package/lib/pop-confirm/index.js +1 -367
  137. package/lib/popover/index.js +1 -4127
  138. package/lib/popover2/index.js +1 -171
  139. package/lib/preset.js +1 -164
  140. package/lib/process/index.js +2 -1146
  141. package/lib/process/index.js.LICENSE.txt +1 -0
  142. package/lib/progress/index.js +1 -495
  143. package/lib/radio/index.js +1 -693
  144. package/lib/rate/index.js +1 -406
  145. package/lib/resize-layout/index.js +1 -499
  146. package/lib/search-select/index.js +2 -3024
  147. package/lib/search-select/index.js.LICENSE.txt +1 -0
  148. package/lib/select/index.js +2 -2599
  149. package/lib/select/index.js.LICENSE.txt +1 -0
  150. package/lib/select/select.css +9 -0
  151. package/lib/select/select.less +11 -0
  152. package/lib/select/select.variable.css +9 -0
  153. package/lib/shared/index.js +1 -2832
  154. package/lib/sideslider/index.js +2 -1056
  155. package/lib/sideslider/index.js.LICENSE.txt +1 -0
  156. package/lib/slider/index.js +2 -1683
  157. package/lib/slider/index.js.LICENSE.txt +1 -0
  158. package/lib/steps/index.js +2 -1215
  159. package/lib/steps/index.js.LICENSE.txt +1 -0
  160. package/lib/swiper/index.js +1 -404
  161. package/lib/switcher/index.js +1 -335
  162. package/lib/tab/index.js +1 -935
  163. package/lib/table/index.js +1 -6588
  164. package/lib/table-column/index.js +1 -768
  165. package/lib/tag/index.js +1 -309
  166. package/lib/tag-input/index.js +1 -1758
  167. package/lib/time-picker/index.js +1 -142
  168. package/lib/timeline/index.js +1 -310
  169. package/lib/transfer/index.js +1 -767
  170. package/lib/tree/index.js +1 -2664
  171. package/lib/upload/index.js +2 -3257
  172. package/lib/upload/index.js.LICENSE.txt +1 -0
  173. package/lib/virtual-render/index.js +1 -806
  174. package/package.json +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
- });
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../popover"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../popover","vue-types"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("../popover"),require("vue-types")):t(e["../shared"],e.vue,e["../popover"],e["vue-types"]);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,((e,t,o,n)=>(()=>{"use strict";var r={35:(e,t,o)=>{var n=o(9601),r=o.n(n),i=o(2609);o.n(i)()(r()).push([e.id,".text-ov {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.position-relative {\n position: relative;\n}\n.position-absolute {\n position: absolute;\n}\n",""])},2609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,n,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var l=0;l<this.length;l++){var u=this[l][0];null!=u&&(a[u]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&a[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},9601:e=>{e.exports=function(e){return e[1]}},5537:e=>{e.exports=o},4212:t=>{t.exports=e},748:e=>{e.exports=t},210:e=>{e.exports=n}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={id:e,exports:{}};return r[e](o,o.exports,a),o.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{a.r(l),a.d(l,{OverflowTitle:()=>d,default:()=>f,getActualWidthByCanvas:()=>s,getActualWidthByDom:()=>c,overflowTitle:()=>p});var e,t=a(4212),o=a(748),n=a(5537),r=a.n(n),i=a(210);!function(e){e.AUTO="auto",e.AUTO_START="auto-start",e.AUTO_END="auto-end",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_START="top-start",e.TOP_END="top-end",e.BOTTOM_START="bottom-start",e.BOTTOM_END="bottom-end",e.RIGHT_START="right-start",e.RIGHT_END="right-end",e.LEFT_START="left-start",e.LEFT_END="left-end"}(e||(e={}));const u={content:t.PropTypes.string,type:t.PropTypes.oneOf(["tips","title"]).def("title"),calType:t.PropTypes.oneOf(["dom","canvas"]).def("dom"),boundary:t.PropTypes.oneOfType([t.PropTypes.string.def("parent"),t.PropTypes.instanceOf(HTMLElement)]).def(document.body),placement:(0,i.string)().def(e.BOTTOM).def(e.TOP_START),resizeable:t.PropTypes.bool},s=function(e,t){var o=t.fontSize,n=void 0===o?14:o,r=t.fontFamily,i=void 0===r?"Microsoft YaHei":r,a=document.createElement("canvas").getContext("2d");a.font="".concat(n,"px ").concat(i);var l=a.measureText(e),u=Math.abs(l.actualBoundingBoxLeft)+Math.abs(l.actualBoundingBoxRight);return Math.max(l.width,u)},c=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document.body;if(!o)return 0;var n=t||{},r=n.fontSize,i=n.fontFamily,a=document.createElement("div");a.style.cssText="position: absolute;left: -999em;top:-999em;z-index: -1;text-overflow: initial;\n ".concat(r?"font-size:".concat(r," ;"):"","\n ").concat(i?"font-family:".concat(i," "):"","\n "),a.innerText=e,o.append(a);var l=a.clientWidth;return o.removeChild(a),l};a(35);const d=(0,o.defineComponent)({name:"OverflowTitle",props:u,setup:function(e,n){var r=n.slots,i=(0,o.ref)(null),a=(0,o.ref)(null),l=(0,o.ref)(!1),u=(0,o.shallowRef)(),d=(0,o.computed)((function(){var t;return e.content?e.content:null===(t=null==r?void 0:r.default)||void 0===t?void 0:t.call(r)}));return(0,o.onMounted)((function(){var n=i.value.clientWidth,r=(0,t.debounce)(500,(function(){var t,o,r;l.value=!1,u.value={};var p=0;if("dom"===e.calType)p=c(null===(t=a.value)||void 0===t?void 0:t.textContent,null,i.value);else{var f=getComputedStyle(i.value),v=f.fontSize,T=f.fontFamily;p=s(d.value,{fontSize:v,fontFamily:T})}p>n&&(l.value=!0,"title"===e.type&&(u.value={title:null!==(r=null===(o=null==a?void 0:a.value)||void 0===o?void 0:o.innerText)&&void 0!==r?r:e.content}))}));if(r(),e.resizeable){var p=new ResizeObserver(r);p.observe(i.value),(0,o.onBeforeUnmount)((function(){i.value&&(null==p||p.unobserve(i.value)),null==p||p.disconnect()}))}})),{boxRef:i,textRef:a,isShowTips:l,contentText:d,textProps:u}},render:function(){var e=this;return(0,o.createVNode)("div",{ref:"boxRef",class:"position-relative"},[(0,o.createVNode)(r(),{disabled:"title"===this.type||!this.isShowTips,placement:this.placement,boundary:this.boundary||document.body},{default:function(){return(0,o.createVNode)("div",(0,o.mergeProps)({ref:"textRef",class:"text-ov"},e.textProps),[e.contentText])},content:function(){return e.contentText}})])}}),p={mounted:function(e,t){var o=t.value,n=void 0===o?{}:o,r=e.parentElement.clientWidth;if(r){var i=n.content,a=n.calType,l=void 0===a?"dom":a,u=i||e.innerText,d=0;if("dom"===l)d=c(e.textContent,null,e.parentElement);else{var p=getComputedStyle(e),f=p.fontSize,v=p.fontFamily;d=s(u,{fontSize:f,fontFamily:v})}d>r&&e.setAttribute("title",u)}}},f=(0,t.withInstall)(d)})(),l})()));