bkui-vue 0.0.1-beta.387 → 0.0.1-beta.389

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