bkui-vue 0.0.2-beta.77 → 0.0.2-beta.78.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/index.cjs.js +140 -166
  2. package/dist/index.esm.js +15044 -17764
  3. package/dist/index.umd.js +140 -166
  4. package/lib/affix/index.js +321 -1
  5. package/lib/alert/index.js +214 -1
  6. package/lib/animate-number/index.js +155 -1
  7. package/lib/backtop/index.js +188 -1
  8. package/lib/badge/index.js +235 -1
  9. package/lib/breadcrumb/index.js +309 -1
  10. package/lib/button/index.js +321 -1
  11. package/lib/card/index.js +285 -1
  12. package/lib/cascader/index.js +2036 -2
  13. package/lib/checkbox/index.js +542 -1
  14. package/lib/code-diff/index.js +5501 -1
  15. package/lib/collapse/index.js +570 -1
  16. package/lib/collapse-transition/index.js +178 -1
  17. package/lib/color-picker/index.js +2665 -1
  18. package/lib/components.js +530 -1
  19. package/lib/config-provider/index.js +365 -1
  20. package/lib/container/index.js +391 -1
  21. package/lib/date-picker/index.js +5527 -1
  22. package/lib/dialog/index.js +975 -2
  23. package/lib/directives/index.js +1375 -2
  24. package/lib/dist.index.js +87 -1
  25. package/lib/divider/index.js +169 -1
  26. package/lib/dropdown/index.js +369 -1
  27. package/lib/exception/index.js +385 -1
  28. package/lib/fixed-navbar/index.js +154 -1
  29. package/lib/form/index.js +924 -1
  30. package/lib/hooks.js +73 -1
  31. package/lib/icon/angle-double-down-line.js +191 -1
  32. package/lib/icon/angle-double-left-line.js +191 -1
  33. package/lib/icon/angle-double-left.js +191 -1
  34. package/lib/icon/angle-double-right-line.js +191 -1
  35. package/lib/icon/angle-double-right.js +191 -1
  36. package/lib/icon/angle-double-up-line.js +191 -1
  37. package/lib/icon/angle-down-fill.js +191 -1
  38. package/lib/icon/angle-down-line.js +191 -1
  39. package/lib/icon/angle-down.js +191 -1
  40. package/lib/icon/angle-left.js +191 -1
  41. package/lib/icon/angle-right.js +191 -1
  42. package/lib/icon/angle-up-fill.js +191 -1
  43. package/lib/icon/angle-up.js +191 -1
  44. package/lib/icon/archive-fill.js +191 -1
  45. package/lib/icon/arrows-left.js +191 -1
  46. package/lib/icon/arrows-right.js +191 -1
  47. package/lib/icon/assistant.js +191 -1
  48. package/lib/icon/audio-fill.js +191 -1
  49. package/lib/icon/bk.js +191 -1
  50. package/lib/icon/circle.js +191 -1
  51. package/lib/icon/close-line.js +191 -1
  52. package/lib/icon/close.js +191 -1
  53. package/lib/icon/code.js +191 -1
  54. package/lib/icon/cog-shape.js +191 -1
  55. package/lib/icon/collapse-left.js +191 -1
  56. package/lib/icon/copy-shape.js +191 -1
  57. package/lib/icon/copy.js +191 -1
  58. package/lib/icon/data-shape.js +191 -1
  59. package/lib/icon/del.js +191 -1
  60. package/lib/icon/doc-fill.js +191 -1
  61. package/lib/icon/done.js +191 -1
  62. package/lib/icon/down-shape.js +191 -1
  63. package/lib/icon/down-small.js +191 -1
  64. package/lib/icon/edit-line.js +191 -1
  65. package/lib/icon/ellipsis.js +191 -1
  66. package/lib/icon/enlarge-line.js +191 -1
  67. package/lib/icon/error.js +191 -1
  68. package/lib/icon/excel-fill.js +191 -1
  69. package/lib/icon/exclamation-circle-shape.js +191 -1
  70. package/lib/icon/eye.js +191 -1
  71. package/lib/icon/filliscreen-line.js +191 -1
  72. package/lib/icon/fix-line.js +191 -1
  73. package/lib/icon/fix-shape.js +191 -1
  74. package/lib/icon/folder-open.js +191 -1
  75. package/lib/icon/folder-shape-open.js +191 -1
  76. package/lib/icon/folder-shape.js +191 -1
  77. package/lib/icon/folder.js +191 -1
  78. package/lib/icon/funnel.js +191 -1
  79. package/lib/icon/help-document-fill.js +191 -1
  80. package/lib/icon/help-fill.js +191 -1
  81. package/lib/icon/help.js +191 -1
  82. package/lib/icon/image-fill.js +276 -1
  83. package/lib/icon/img-error.js +276 -1
  84. package/lib/icon/img-placehoulder.js +276 -1
  85. package/lib/icon/index.js +2399 -1
  86. package/lib/icon/info-line.js +276 -1
  87. package/lib/icon/info.js +276 -1
  88. package/lib/icon/left-shape.js +276 -1
  89. package/lib/icon/left-turn-line.js +276 -1
  90. package/lib/icon/narrow-line.js +276 -1
  91. package/lib/icon/original.js +276 -1
  92. package/lib/icon/pdf-fill.js +276 -1
  93. package/lib/icon/play-shape.js +276 -1
  94. package/lib/icon/plus.js +276 -1
  95. package/lib/icon/ppt-fill.js +276 -1
  96. package/lib/icon/qq.js +276 -1
  97. package/lib/icon/right-shape.js +276 -1
  98. package/lib/icon/right-turn-line.js +276 -1
  99. package/lib/icon/search.js +276 -1
  100. package/lib/icon/share.js +276 -1
  101. package/lib/icon/spinner.js +276 -1
  102. package/lib/icon/success.js +276 -1
  103. package/lib/icon/switcher-loading.js +276 -1
  104. package/lib/icon/text-file.js +276 -1
  105. package/lib/icon/text-fill.js +276 -1
  106. package/lib/icon/transfer.js +276 -1
  107. package/lib/icon/tree-application-shape.js +276 -1
  108. package/lib/icon/unfull-screen.js +276 -1
  109. package/lib/icon/unvisible.js +276 -1
  110. package/lib/icon/up-shape.js +276 -1
  111. package/lib/icon/upload.js +276 -1
  112. package/lib/icon/video-fill.js +276 -1
  113. package/lib/icon/warn.js +276 -1
  114. package/lib/icon/weixin-pro.js +276 -1
  115. package/lib/icon/weixin.js +276 -1
  116. package/lib/image/index.js +641 -1
  117. package/lib/index.js +97 -1
  118. package/lib/info-box/index.js +1165 -2
  119. package/lib/input/index.js +1218 -2
  120. package/lib/link/index.js +160 -1
  121. package/lib/loading/index.js +381 -1
  122. package/lib/locale/index.js +465 -1
  123. package/lib/menu/index.js +724 -1
  124. package/lib/message/index.js +1795 -2
  125. package/lib/modal/index.js +396 -1
  126. package/lib/navigation/index.js +367 -1
  127. package/lib/notify/index.js +397 -1
  128. package/lib/overflow-title/index.js +486 -1
  129. package/lib/pagination/index.js +880 -1
  130. package/lib/plugin-popover/index.js +3905 -1
  131. package/lib/plugins/index.js +63 -1
  132. package/lib/pop-confirm/index.js +273 -1
  133. package/lib/popover/index.js +3913 -1
  134. package/lib/popover2/index.js +107 -1
  135. package/lib/preset.js +93 -1
  136. package/lib/process/index.js +759 -2
  137. package/lib/progress/index.js +431 -1
  138. package/lib/radio/index.js +627 -1
  139. package/lib/rate/index.js +338 -1
  140. package/lib/resize-layout/index.js +429 -1
  141. package/lib/search-select/index.js +2729 -2
  142. package/lib/select/index.js +2240 -2
  143. package/lib/shared/index.js +2689 -1
  144. package/lib/sideslider/index.js +714 -2
  145. package/lib/slider/index.js +1291 -2
  146. package/lib/steps/index.js +825 -2
  147. package/lib/swiper/index.js +336 -1
  148. package/lib/switcher/index.js +277 -1
  149. package/lib/tab/index.js +914 -1
  150. package/lib/table/index.js +6406 -1
  151. package/lib/table-column/index.js +731 -1
  152. package/lib/tag/index.js +233 -1
  153. package/lib/tag-input/index.js +1660 -1
  154. package/lib/tag-input/tag-input.d.ts +4 -2
  155. package/lib/time-picker/index.js +71 -1
  156. package/lib/timeline/index.js +241 -1
  157. package/lib/transfer/index.js +673 -1
  158. package/lib/tree/index.js +2445 -1
  159. package/lib/upload/index.js +2874 -2
  160. package/lib/virtual-render/index.js +792 -1
  161. package/package.json +4 -3
  162. package/lib/cascader/index.js.LICENSE.txt +0 -1
  163. package/lib/dialog/index.js.LICENSE.txt +0 -1
  164. package/lib/directives/index.js.LICENSE.txt +0 -14
  165. package/lib/info-box/index.js.LICENSE.txt +0 -1
  166. package/lib/input/index.js.LICENSE.txt +0 -1
  167. package/lib/message/index.js.LICENSE.txt +0 -6
  168. package/lib/process/index.js.LICENSE.txt +0 -1
  169. package/lib/search-select/index.js.LICENSE.txt +0 -1
  170. package/lib/select/index.js.LICENSE.txt +0 -1
  171. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  172. package/lib/slider/index.js.LICENSE.txt +0 -1
  173. package/lib/steps/index.js.LICENSE.txt +0 -1
  174. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,486 @@
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};
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 };