bkui-vue 0.0.2-beta.78 → 0.0.2-beta.79

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 (211) hide show
  1. package/dist/index.cjs.js +64 -64
  2. package/dist/index.esm.js +12188 -12269
  3. package/dist/index.umd.js +65 -65
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/index.js +1 -321
  7. package/lib/alert/index.js +1 -214
  8. package/lib/animate-number/index.js +1 -155
  9. package/lib/backtop/index.js +1 -188
  10. package/lib/badge/index.js +1 -235
  11. package/lib/breadcrumb/index.js +1 -309
  12. package/lib/button/index.js +1 -321
  13. package/lib/card/index.js +1 -285
  14. package/lib/cascader/index.js +2 -2036
  15. package/lib/cascader/index.js.LICENSE.txt +1 -0
  16. package/lib/checkbox/index.js +1 -542
  17. package/lib/code-diff/index.js +1 -5501
  18. package/lib/collapse/index.js +1 -570
  19. package/lib/collapse-transition/index.js +1 -178
  20. package/lib/color-picker/index.js +1 -2665
  21. package/lib/components.js +1 -530
  22. package/lib/config-provider/index.js +1 -365
  23. package/lib/container/index.js +1 -391
  24. package/lib/date-picker/index.js +1 -5527
  25. package/lib/dialog/dialog.css +2 -0
  26. package/lib/dialog/dialog.variable.css +2 -0
  27. package/lib/dialog/index.js +2 -975
  28. package/lib/dialog/index.js.LICENSE.txt +1 -0
  29. package/lib/directives/index.js +2 -1375
  30. package/lib/directives/index.js.LICENSE.txt +14 -0
  31. package/lib/dist.index.js +1 -87
  32. package/lib/divider/index.js +1 -169
  33. package/lib/dropdown/index.js +1 -369
  34. package/lib/exception/index.js +1 -385
  35. package/lib/fixed-navbar/index.js +1 -154
  36. package/lib/form/index.js +1 -924
  37. package/lib/hooks.js +1 -73
  38. package/lib/icon/angle-double-down-line.js +1 -191
  39. package/lib/icon/angle-double-left-line.js +1 -191
  40. package/lib/icon/angle-double-left.js +1 -191
  41. package/lib/icon/angle-double-right-line.js +1 -191
  42. package/lib/icon/angle-double-right.js +1 -191
  43. package/lib/icon/angle-double-up-line.js +1 -191
  44. package/lib/icon/angle-down-fill.js +1 -191
  45. package/lib/icon/angle-down-line.js +1 -191
  46. package/lib/icon/angle-down.js +1 -191
  47. package/lib/icon/angle-left.js +1 -191
  48. package/lib/icon/angle-right.js +1 -191
  49. package/lib/icon/angle-up-fill.js +1 -191
  50. package/lib/icon/angle-up.js +1 -191
  51. package/lib/icon/archive-fill.js +1 -191
  52. package/lib/icon/arrows-left.js +1 -191
  53. package/lib/icon/arrows-right.js +1 -191
  54. package/lib/icon/assistant.js +1 -191
  55. package/lib/icon/audio-fill.js +1 -191
  56. package/lib/icon/bk.js +1 -191
  57. package/lib/icon/circle.js +1 -191
  58. package/lib/icon/close-line.js +1 -191
  59. package/lib/icon/close.js +1 -191
  60. package/lib/icon/code.js +1 -191
  61. package/lib/icon/cog-shape.js +1 -191
  62. package/lib/icon/collapse-left.js +1 -191
  63. package/lib/icon/copy-shape.js +1 -191
  64. package/lib/icon/copy.js +1 -191
  65. package/lib/icon/data-shape.js +1 -191
  66. package/lib/icon/del.js +1 -191
  67. package/lib/icon/doc-fill.js +1 -191
  68. package/lib/icon/done.js +1 -191
  69. package/lib/icon/down-shape.js +1 -191
  70. package/lib/icon/down-small.js +1 -191
  71. package/lib/icon/edit-line.js +1 -191
  72. package/lib/icon/ellipsis.js +1 -191
  73. package/lib/icon/enlarge-line.js +1 -191
  74. package/lib/icon/error.js +1 -191
  75. package/lib/icon/excel-fill.js +1 -191
  76. package/lib/icon/exclamation-circle-shape.js +1 -191
  77. package/lib/icon/eye.js +1 -191
  78. package/lib/icon/filliscreen-line.js +1 -191
  79. package/lib/icon/fix-line.js +1 -191
  80. package/lib/icon/fix-shape.js +1 -191
  81. package/lib/icon/folder-open.js +1 -191
  82. package/lib/icon/folder-shape-open.js +1 -191
  83. package/lib/icon/folder-shape.js +1 -191
  84. package/lib/icon/folder.js +1 -191
  85. package/lib/icon/funnel.js +1 -191
  86. package/lib/icon/help-document-fill.js +1 -191
  87. package/lib/icon/help-fill.js +1 -191
  88. package/lib/icon/help.js +1 -191
  89. package/lib/icon/image-fill.js +1 -276
  90. package/lib/icon/img-error.js +1 -276
  91. package/lib/icon/img-placehoulder.js +1 -276
  92. package/lib/icon/index.js +1 -2399
  93. package/lib/icon/info-line.js +1 -276
  94. package/lib/icon/info.js +1 -276
  95. package/lib/icon/left-shape.js +1 -276
  96. package/lib/icon/left-turn-line.js +1 -276
  97. package/lib/icon/narrow-line.js +1 -276
  98. package/lib/icon/original.js +1 -276
  99. package/lib/icon/pdf-fill.js +1 -276
  100. package/lib/icon/play-shape.js +1 -276
  101. package/lib/icon/plus.js +1 -276
  102. package/lib/icon/ppt-fill.js +1 -276
  103. package/lib/icon/qq.js +1 -276
  104. package/lib/icon/right-shape.js +1 -276
  105. package/lib/icon/right-turn-line.js +1 -276
  106. package/lib/icon/search.js +1 -276
  107. package/lib/icon/share.js +1 -276
  108. package/lib/icon/spinner.js +1 -276
  109. package/lib/icon/success.js +1 -276
  110. package/lib/icon/switcher-loading.js +1 -276
  111. package/lib/icon/text-file.js +1 -276
  112. package/lib/icon/text-fill.js +1 -276
  113. package/lib/icon/transfer.js +1 -276
  114. package/lib/icon/tree-application-shape.js +1 -276
  115. package/lib/icon/unfull-screen.js +1 -276
  116. package/lib/icon/unvisible.js +1 -276
  117. package/lib/icon/up-shape.js +1 -276
  118. package/lib/icon/upload.js +1 -276
  119. package/lib/icon/video-fill.js +1 -276
  120. package/lib/icon/warn.js +1 -276
  121. package/lib/icon/weixin-pro.js +1 -276
  122. package/lib/icon/weixin.js +1 -276
  123. package/lib/image/index.js +1 -641
  124. package/lib/index.js +1 -97
  125. package/lib/info-box/index.js +2 -1165
  126. package/lib/info-box/index.js.LICENSE.txt +1 -0
  127. package/lib/info-box/info-box.css +2 -0
  128. package/lib/info-box/info-box.less +2 -1
  129. package/lib/info-box/info-box.variable.css +2 -0
  130. package/lib/input/index.js +2 -1218
  131. package/lib/input/index.js.LICENSE.txt +1 -0
  132. package/lib/link/index.js +1 -160
  133. package/lib/loading/index.js +1 -381
  134. package/lib/locale/index.js +1 -465
  135. package/lib/menu/index.js +1 -724
  136. package/lib/message/index.js +2 -1795
  137. package/lib/message/index.js.LICENSE.txt +6 -0
  138. package/lib/modal/index.js +1 -396
  139. package/lib/modal/modal.css +2 -0
  140. package/lib/modal/modal.variable.css +2 -0
  141. package/lib/navigation/index.js +1 -367
  142. package/lib/notify/index.js +1 -397
  143. package/lib/overflow-title/index.js +1 -486
  144. package/lib/pagination/index.js +1 -880
  145. package/lib/plugin-popover/index.js +1 -3905
  146. package/lib/plugins/index.js +1 -63
  147. package/lib/pop-confirm/index.js +1 -273
  148. package/lib/popover/index.js +1 -3913
  149. package/lib/popover2/index.js +1 -107
  150. package/lib/preset.js +1 -93
  151. package/lib/process/index.js +2 -759
  152. package/lib/process/index.js.LICENSE.txt +1 -0
  153. package/lib/progress/index.js +1 -431
  154. package/lib/radio/index.js +1 -627
  155. package/lib/rate/index.js +1 -338
  156. package/lib/resize-layout/index.js +1 -429
  157. package/lib/search-select/index.js +2 -2729
  158. package/lib/search-select/index.js.LICENSE.txt +1 -0
  159. package/lib/select/index.js +2 -2240
  160. package/lib/select/index.js.LICENSE.txt +1 -0
  161. package/lib/shared/index.js +1 -2689
  162. package/lib/sideslider/index.js +2 -714
  163. package/lib/sideslider/index.js.LICENSE.txt +1 -0
  164. package/lib/slider/index.js +2 -1291
  165. package/lib/slider/index.js.LICENSE.txt +1 -0
  166. package/lib/steps/index.js +2 -825
  167. package/lib/steps/index.js.LICENSE.txt +1 -0
  168. package/lib/swiper/index.js +1 -336
  169. package/lib/switcher/index.js +1 -277
  170. package/lib/tab/index.js +1 -914
  171. package/lib/table/components/table-column.d.ts +2 -0
  172. package/lib/table/const.d.ts +24 -2
  173. package/lib/table/index.d.ts +38 -0
  174. package/lib/table/index.js +1 -6406
  175. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  176. package/lib/table/plugins/use-fixed-column.d.ts +9 -9
  177. package/lib/table/plugins/use-pagination.d.ts +7 -4
  178. package/lib/table/props.d.ts +22 -1
  179. package/lib/table/render.d.ts +7 -17
  180. package/lib/table/table.css +4 -1
  181. package/lib/table/table.d.ts +44 -23
  182. package/lib/table/table.less +4 -1
  183. package/lib/table/table.variable.css +4 -1
  184. package/lib/table/use-attributes.d.ts +55 -0
  185. package/lib/table/use-column.d.ts +177 -53
  186. package/lib/table/use-common.d.ts +1602 -76
  187. package/lib/table/use-render.d.ts +11 -0
  188. package/lib/table/utils.d.ts +22 -16
  189. package/lib/table-column/index.d.ts +6 -0
  190. package/lib/table-column/index.js +1 -731
  191. package/lib/tag/index.js +1 -233
  192. package/lib/tag-input/index.js +1 -1660
  193. package/lib/time-picker/index.js +1 -71
  194. package/lib/timeline/index.js +1 -241
  195. package/lib/transfer/index.js +1 -673
  196. package/lib/tree/index.d.ts +12 -0
  197. package/lib/tree/index.js +1 -2445
  198. package/lib/tree/props.d.ts +8 -1
  199. package/lib/tree/tree.d.ts +7 -0
  200. package/lib/tree/use-node-action.d.ts +2 -1
  201. package/lib/tree/use-node-attribute.d.ts +2 -0
  202. package/lib/tree/use-search.d.ts +2 -2
  203. package/lib/tree/util.d.ts +2 -2
  204. package/lib/upload/index.js +2 -2874
  205. package/lib/upload/index.js.LICENSE.txt +1 -0
  206. package/lib/virtual-render/index.d.ts +12 -0
  207. package/lib/virtual-render/index.js +1 -792
  208. package/lib/virtual-render/props.d.ts +4 -0
  209. package/lib/virtual-render/v-virtual-render.d.ts +19 -1
  210. package/lib/virtual-render/virtual-render.d.ts +7 -0
  211. package/package.json +1 -2
@@ -1,486 +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 _slots$default;
337
- if (props.content) {
338
- return props.content;
339
- }
340
- return slots === null || slots === void 0 || (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.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
- isShowTips.value = false;
346
- textProps.value = {};
347
- var textWidth = 0;
348
- if (props.calType === 'dom') {
349
- var _textRef$value;
350
- textWidth = utils_getActualWidthByDom((_textRef$value = textRef.value) === null || _textRef$value === void 0 ? void 0 : _textRef$value.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
- var _textRef$value$innerT, _textRef$value2;
364
- textProps.value = {
365
- title: (_textRef$value$innerT = textRef === null || textRef === void 0 || (_textRef$value2 = textRef.value) === null || _textRef$value2 === void 0 ? void 0 : _textRef$value2.innerText) !== null && _textRef$value$innerT !== void 0 ? _textRef$value$innerT : props.content
366
- };
367
- }
368
- }
369
- });
370
- resizeHandler();
371
- if (props.resizeable) {
372
- var observer = new ResizeObserver(resizeHandler);
373
- observer.observe(boxRef.value);
374
- (0,external_vue_namespaceObject.onBeforeUnmount)(function () {
375
- boxRef.value && (observer === null || observer === void 0 ? void 0 : observer.unobserve(boxRef.value));
376
- observer === null || observer === void 0 ? void 0 : observer.disconnect();
377
- });
378
- }
379
- });
380
- return {
381
- boxRef: boxRef,
382
- textRef: textRef,
383
- isShowTips: isShowTips,
384
- contentText: contentText,
385
- textProps: textProps
386
- };
387
- },
388
- render: function render() {
389
- var _this = this;
390
- return (0,external_vue_namespaceObject.createVNode)("div", {
391
- "ref": "boxRef",
392
- "class": "position-relative"
393
- }, [(0,external_vue_namespaceObject.createVNode)(external_popover_namespaceObject["default"], (0,external_vue_namespaceObject.mergeProps)({
394
- "placement": this.placement,
395
- "boundary": this.boundary || document.body,
396
- "popoverDelay": [200, 0]
397
- }, props.popoverOptions, {
398
- "disabled": this.type === 'title' || !this.isShowTips
399
- }), {
400
- "default": function _default() {
401
- return (0,external_vue_namespaceObject.createVNode)("div", (0,external_vue_namespaceObject.mergeProps)({
402
- "ref": "textRef",
403
- "class": "text-ov"
404
- }, _this.textProps), [_this.contentText]);
405
- },
406
- content: function content() {
407
- return _this.contentText;
408
- }
409
- })]);
410
- }
411
- }));
412
- ;// CONCATENATED MODULE: ../../packages/overflow-title/src/directive/overflow-title.ts
413
-
414
-
415
- var overflowTitle = {
416
- mounted: function mounted(el, _ref) {
417
- var _ref$value = _ref.value,
418
- value = _ref$value === void 0 ? {} : _ref$value;
419
- var clientWidth = el.parentElement.clientWidth;
420
- if (!clientWidth) {
421
- return;
422
- }
423
- var content = value.content,
424
- _value$calType = value.calType,
425
- calType = _value$calType === void 0 ? 'dom' : _value$calType;
426
- var text = content || el.innerText;
427
- var textWidth = 0;
428
- if (calType === 'dom') {
429
- textWidth = utils_getActualWidthByDom(el.textContent, null, el.parentElement);
430
- } else {
431
- var _getComputedStyle = getComputedStyle(el),
432
- fontSize = _getComputedStyle.fontSize,
433
- fontFamily = _getComputedStyle.fontFamily;
434
- textWidth = utils_getActualWidthByCanvas(text, {
435
- fontSize: fontSize,
436
- fontFamily: fontFamily
437
- });
438
- }
439
- if (textWidth > clientWidth) {
440
- el.setAttribute('title', text);
441
- }
442
- }
443
- };
444
- /* harmony default export */ const directive_overflow_title = (overflowTitle);
445
- ;// CONCATENATED MODULE: ../../packages/overflow-title/src/index.ts
446
- /*
447
- * Tencent is pleased to support the open source community by making
448
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
449
- *
450
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
451
- *
452
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
453
- *
454
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
455
- *
456
- * ---------------------------------------------------
457
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
458
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
459
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
460
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
461
- *
462
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
463
- * the Software.
464
- *
465
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
466
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
467
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
468
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
469
- * IN THE SOFTWARE.
470
- */
471
-
472
-
473
-
474
-
475
-
476
- var BkOverflowTitle = (0,external_shared_namespaceObject.withInstall)(overflow_title);
477
-
478
- /* harmony default export */ const src = (BkOverflowTitle);
479
- })();
480
-
481
- var __webpack_exports__OverflowTitle = __webpack_exports__.p1;
482
- var __webpack_exports__default = __webpack_exports__.ZP;
483
- var __webpack_exports__getActualWidthByCanvas = __webpack_exports__.si;
484
- var __webpack_exports__getActualWidthByDom = __webpack_exports__.ZF;
485
- var __webpack_exports__overflowTitle = __webpack_exports__.$s;
486
- 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};