bkui-vue 0.0.2-beta.74 → 0.0.2-beta.77

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