bkui-vue 0.0.2-beta.82 → 0.0.2-beta.84

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 (180) hide show
  1. package/dist/index.cjs.js +135 -161
  2. package/dist/index.esm.js +16449 -19088
  3. package/dist/index.umd.js +135 -161
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/index.js +321 -1
  7. package/lib/alert/index.js +214 -1
  8. package/lib/animate-number/index.js +155 -1
  9. package/lib/backtop/index.js +188 -1
  10. package/lib/badge/index.js +235 -1
  11. package/lib/breadcrumb/index.js +309 -1
  12. package/lib/button/index.js +321 -1
  13. package/lib/card/index.js +285 -1
  14. package/lib/cascader/index.js +2036 -2
  15. package/lib/checkbox/index.js +542 -1
  16. package/lib/code-diff/index.js +5501 -1
  17. package/lib/collapse/index.js +570 -1
  18. package/lib/collapse-transition/index.js +177 -1
  19. package/lib/color-picker/index.js +2665 -1
  20. package/lib/components.js +530 -1
  21. package/lib/config-provider/index.js +365 -1
  22. package/lib/container/index.js +391 -1
  23. package/lib/date-picker/index.js +5555 -1
  24. package/lib/dialog/index.js +975 -2
  25. package/lib/directives/index.js +1375 -2
  26. package/lib/dist.index.js +87 -1
  27. package/lib/divider/index.js +169 -1
  28. package/lib/dropdown/index.js +369 -1
  29. package/lib/exception/index.js +385 -1
  30. package/lib/fixed-navbar/index.js +154 -1
  31. package/lib/form/index.js +952 -1
  32. package/lib/hooks.js +73 -1
  33. package/lib/icon/angle-double-down-line.js +191 -1
  34. package/lib/icon/angle-double-left-line.js +191 -1
  35. package/lib/icon/angle-double-left.js +191 -1
  36. package/lib/icon/angle-double-right-line.js +191 -1
  37. package/lib/icon/angle-double-right.js +191 -1
  38. package/lib/icon/angle-double-up-line.js +191 -1
  39. package/lib/icon/angle-down-fill.js +191 -1
  40. package/lib/icon/angle-down-line.js +191 -1
  41. package/lib/icon/angle-down.js +191 -1
  42. package/lib/icon/angle-left.js +191 -1
  43. package/lib/icon/angle-right.js +191 -1
  44. package/lib/icon/angle-up-fill.js +191 -1
  45. package/lib/icon/angle-up.js +191 -1
  46. package/lib/icon/archive-fill.js +191 -1
  47. package/lib/icon/arrows-left.js +191 -1
  48. package/lib/icon/arrows-right.js +191 -1
  49. package/lib/icon/assistant.js +191 -1
  50. package/lib/icon/audio-fill.js +191 -1
  51. package/lib/icon/bk.js +191 -1
  52. package/lib/icon/circle.js +191 -1
  53. package/lib/icon/close-line.js +191 -1
  54. package/lib/icon/close.js +191 -1
  55. package/lib/icon/code.js +191 -1
  56. package/lib/icon/cog-shape.js +191 -1
  57. package/lib/icon/collapse-left.js +191 -1
  58. package/lib/icon/copy-shape.js +191 -1
  59. package/lib/icon/copy.js +191 -1
  60. package/lib/icon/data-shape.js +191 -1
  61. package/lib/icon/del.js +191 -1
  62. package/lib/icon/doc-fill.js +191 -1
  63. package/lib/icon/done.js +191 -1
  64. package/lib/icon/down-shape.js +191 -1
  65. package/lib/icon/down-small.js +191 -1
  66. package/lib/icon/edit-line.js +191 -1
  67. package/lib/icon/ellipsis.js +191 -1
  68. package/lib/icon/enlarge-line.js +191 -1
  69. package/lib/icon/error.js +191 -1
  70. package/lib/icon/excel-fill.js +191 -1
  71. package/lib/icon/exclamation-circle-shape.js +191 -1
  72. package/lib/icon/eye.js +191 -1
  73. package/lib/icon/filliscreen-line.js +191 -1
  74. package/lib/icon/fix-line.js +191 -1
  75. package/lib/icon/fix-shape.js +191 -1
  76. package/lib/icon/folder-open.js +191 -1
  77. package/lib/icon/folder-shape-open.js +191 -1
  78. package/lib/icon/folder-shape.js +191 -1
  79. package/lib/icon/folder.js +191 -1
  80. package/lib/icon/funnel.js +191 -1
  81. package/lib/icon/help-document-fill.js +191 -1
  82. package/lib/icon/help-fill.js +191 -1
  83. package/lib/icon/help.js +191 -1
  84. package/lib/icon/image-fill.js +276 -1
  85. package/lib/icon/img-error.js +276 -1
  86. package/lib/icon/img-placehoulder.js +276 -1
  87. package/lib/icon/index.js +2399 -1
  88. package/lib/icon/info-line.js +276 -1
  89. package/lib/icon/info.js +276 -1
  90. package/lib/icon/left-shape.js +276 -1
  91. package/lib/icon/left-turn-line.js +276 -1
  92. package/lib/icon/narrow-line.js +276 -1
  93. package/lib/icon/original.js +276 -1
  94. package/lib/icon/pdf-fill.js +276 -1
  95. package/lib/icon/play-shape.js +276 -1
  96. package/lib/icon/plus.js +276 -1
  97. package/lib/icon/ppt-fill.js +276 -1
  98. package/lib/icon/qq.js +276 -1
  99. package/lib/icon/right-shape.js +276 -1
  100. package/lib/icon/right-turn-line.js +276 -1
  101. package/lib/icon/search.js +276 -1
  102. package/lib/icon/share.js +276 -1
  103. package/lib/icon/spinner.js +276 -1
  104. package/lib/icon/success.js +276 -1
  105. package/lib/icon/switcher-loading.js +276 -1
  106. package/lib/icon/text-file.js +276 -1
  107. package/lib/icon/text-fill.js +276 -1
  108. package/lib/icon/transfer.js +276 -1
  109. package/lib/icon/tree-application-shape.js +276 -1
  110. package/lib/icon/unfull-screen.js +276 -1
  111. package/lib/icon/unvisible.js +276 -1
  112. package/lib/icon/up-shape.js +276 -1
  113. package/lib/icon/upload.js +276 -1
  114. package/lib/icon/video-fill.js +276 -1
  115. package/lib/icon/warn.js +276 -1
  116. package/lib/icon/weixin-pro.js +276 -1
  117. package/lib/icon/weixin.js +276 -1
  118. package/lib/image/index.js +641 -1
  119. package/lib/index.js +97 -1
  120. package/lib/info-box/index.js +1165 -2
  121. package/lib/input/index.js +1218 -2
  122. package/lib/link/index.js +160 -1
  123. package/lib/loading/index.js +381 -1
  124. package/lib/locale/index.js +465 -1
  125. package/lib/menu/index.js +724 -1
  126. package/lib/message/index.js +1795 -2
  127. package/lib/modal/index.js +396 -1
  128. package/lib/navigation/index.js +367 -1
  129. package/lib/notify/index.js +397 -1
  130. package/lib/overflow-title/index.js +461 -1
  131. package/lib/pagination/index.js +880 -1
  132. package/lib/plugin-popover/index.js +4089 -1
  133. package/lib/plugins/index.js +63 -1
  134. package/lib/pop-confirm/index.js +273 -1
  135. package/lib/popover/index.js +4097 -1
  136. package/lib/popover2/index.js +107 -1
  137. package/lib/preset.js +93 -1
  138. package/lib/process/index.js +759 -2
  139. package/lib/progress/index.js +431 -1
  140. package/lib/radio/index.js +627 -1
  141. package/lib/rate/index.js +338 -1
  142. package/lib/resize-layout/index.js +429 -1
  143. package/lib/search-select/index.js +2729 -2
  144. package/lib/search-select/search-select.css +1 -3
  145. package/lib/search-select/search-select.less +1 -3
  146. package/lib/search-select/search-select.variable.css +1 -3
  147. package/lib/select/index.js +2251 -2
  148. package/lib/shared/index.js +2873 -1
  149. package/lib/sideslider/index.js +714 -2
  150. package/lib/slider/index.js +1291 -2
  151. package/lib/steps/index.js +825 -2
  152. package/lib/swiper/index.js +336 -1
  153. package/lib/switcher/index.js +277 -1
  154. package/lib/tab/index.js +914 -1
  155. package/lib/table/index.js +6421 -1
  156. package/lib/table/plugins/use-column-resize.d.ts +1 -1
  157. package/lib/table-column/index.js +763 -1
  158. package/lib/tag/index.js +233 -1
  159. package/lib/tag-input/index.js +1660 -1
  160. package/lib/tag-input/tag-input.d.ts +2 -14
  161. package/lib/time-picker/index.js +71 -1
  162. package/lib/timeline/index.js +241 -1
  163. package/lib/transfer/index.js +673 -1
  164. package/lib/tree/index.js +2686 -1
  165. package/lib/upload/index.js +2874 -2
  166. package/lib/virtual-render/index.js +865 -1
  167. package/package.json +13 -2
  168. package/lib/cascader/index.js.LICENSE.txt +0 -1
  169. package/lib/dialog/index.js.LICENSE.txt +0 -1
  170. package/lib/directives/index.js.LICENSE.txt +0 -14
  171. package/lib/info-box/index.js.LICENSE.txt +0 -1
  172. package/lib/input/index.js.LICENSE.txt +0 -1
  173. package/lib/message/index.js.LICENSE.txt +0 -6
  174. package/lib/process/index.js.LICENSE.txt +0 -1
  175. package/lib/search-select/index.js.LICENSE.txt +0 -1
  176. package/lib/select/index.js.LICENSE.txt +0 -1
  177. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  178. package/lib/slider/index.js.LICENSE.txt +0 -1
  179. package/lib/steps/index.js.LICENSE.txt +0 -1
  180. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,461 @@
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
+
228
+ var PlacementEnum;
229
+ (function (PlacementEnum) {
230
+ PlacementEnum["AUTO"] = "auto";
231
+ PlacementEnum["AUTO_START"] = "auto-start";
232
+ PlacementEnum["AUTO_END"] = "auto-end";
233
+ PlacementEnum["TOP"] = "top";
234
+ PlacementEnum["RIGHT"] = "right";
235
+ PlacementEnum["BOTTOM"] = "bottom";
236
+ PlacementEnum["LEFT"] = "left";
237
+ PlacementEnum["TOP_START"] = "top-start";
238
+ PlacementEnum["TOP_END"] = "top-end";
239
+ PlacementEnum["BOTTOM_START"] = "bottom-start";
240
+ PlacementEnum["BOTTOM_END"] = "bottom-end";
241
+ PlacementEnum["RIGHT_START"] = "right-start";
242
+ PlacementEnum["RIGHT_END"] = "right-end";
243
+ PlacementEnum["LEFT_START"] = "left-start";
244
+ PlacementEnum["LEFT_END"] = "left-end";
245
+ })(PlacementEnum || (PlacementEnum = {}));
246
+ function placementType() {
247
+ return (0,external_vue_types_namespaceObject.string)().def(PlacementEnum.BOTTOM);
248
+ }
249
+ /* harmony default export */ const props = ({
250
+ content: external_shared_namespaceObject.PropTypes.string,
251
+ type: external_shared_namespaceObject.PropTypes.oneOf(['tips', 'title']).def('title'),
252
+ calType: external_shared_namespaceObject.PropTypes.oneOf(['dom', 'canvas']).def('dom'),
253
+ boundary: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string.def('parent'), external_shared_namespaceObject.PropTypes.instanceOf(HTMLElement)]).def(document.body),
254
+ placement: placementType().def(PlacementEnum.TOP_START),
255
+ resizeable: external_shared_namespaceObject.PropTypes.bool,
256
+ popoverOptions: Object // popover属性
257
+ });
258
+ ;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByCanvas.ts
259
+ function getActualWidthByCanvas(text, options) {
260
+ var _options$fontSize = options.fontSize,
261
+ fontSize = _options$fontSize === void 0 ? 14 : _options$fontSize,
262
+ _options$fontFamily = options.fontFamily,
263
+ fontFamily = _options$fontFamily === void 0 ? 'Microsoft YaHei' : _options$fontFamily;
264
+ var canvas = document.createElement('canvas');
265
+ var ctx = canvas.getContext('2d');
266
+ ctx.font = "".concat(fontSize, "px ").concat(fontFamily);
267
+ var metrics = ctx.measureText(text);
268
+ var actual = Math.abs(metrics.actualBoundingBoxLeft) + Math.abs(metrics.actualBoundingBoxRight);
269
+ return Math.max(metrics.width, actual);
270
+ }
271
+ /* harmony default export */ const utils_getActualWidthByCanvas = (getActualWidthByCanvas);
272
+ ;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByDom.ts
273
+ function getActualWidthByDom(text, options) {
274
+ var dom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document.body;
275
+ if (!dom) {
276
+ return 0;
277
+ }
278
+ var _ref = options || {},
279
+ fontSize = _ref.fontSize,
280
+ fontFamily = _ref.fontFamily;
281
+ var tempDom = document.createElement('div');
282
+ 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 ");
283
+ tempDom.innerText = text;
284
+ dom.append(tempDom);
285
+ var clientWidth = tempDom.clientWidth;
286
+ dom.removeChild(tempDom);
287
+ return clientWidth;
288
+ }
289
+ /* harmony default export */ const utils_getActualWidthByDom = (getActualWidthByDom);
290
+ // EXTERNAL MODULE: ../../packages/overflow-title/src/overflow.less
291
+ var overflow = __webpack_require__(35);
292
+ ;// CONCATENATED MODULE: ../../packages/overflow-title/src/components/overflow-title.tsx
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+ /* harmony default export */ const overflow_title = ((0,external_vue_namespaceObject.defineComponent)({
302
+ name: 'OverflowTitle',
303
+ props: props,
304
+ setup: function setup(props, _ref) {
305
+ var slots = _ref.slots;
306
+ var boxRef = (0,external_vue_namespaceObject.ref)(null);
307
+ var textRef = (0,external_vue_namespaceObject.ref)(null);
308
+ var isShowTips = (0,external_vue_namespaceObject.ref)(false);
309
+ var textProps = (0,external_vue_namespaceObject.shallowRef)();
310
+ var contentText = (0,external_vue_namespaceObject.computed)(function () {
311
+ var _slots$default;
312
+ if (props.content) {
313
+ return props.content;
314
+ }
315
+ return slots === null || slots === void 0 || (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
316
+ });
317
+ (0,external_vue_namespaceObject.onMounted)(function () {
318
+ var clientWidth = boxRef.value.clientWidth;
319
+ var resizeHandler = (0,external_shared_namespaceObject.debounce)(500, function () {
320
+ isShowTips.value = false;
321
+ textProps.value = {};
322
+ var textWidth = 0;
323
+ if (props.calType === 'dom') {
324
+ var _textRef$value;
325
+ textWidth = utils_getActualWidthByDom((_textRef$value = textRef.value) === null || _textRef$value === void 0 ? void 0 : _textRef$value.textContent, null, boxRef.value);
326
+ } else {
327
+ var _getComputedStyle = getComputedStyle(boxRef.value),
328
+ fontSize = _getComputedStyle.fontSize,
329
+ fontFamily = _getComputedStyle.fontFamily;
330
+ textWidth = utils_getActualWidthByCanvas(contentText.value, {
331
+ fontSize: fontSize,
332
+ fontFamily: fontFamily
333
+ });
334
+ }
335
+ if (textWidth > clientWidth) {
336
+ isShowTips.value = true;
337
+ if (props.type === 'title') {
338
+ var _textRef$value$innerT, _textRef$value2;
339
+ textProps.value = {
340
+ 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
341
+ };
342
+ }
343
+ }
344
+ });
345
+ resizeHandler();
346
+ if (props.resizeable) {
347
+ var observer = new ResizeObserver(resizeHandler);
348
+ observer.observe(boxRef.value);
349
+ (0,external_vue_namespaceObject.onBeforeUnmount)(function () {
350
+ boxRef.value && (observer === null || observer === void 0 ? void 0 : observer.unobserve(boxRef.value));
351
+ observer === null || observer === void 0 ? void 0 : observer.disconnect();
352
+ });
353
+ }
354
+ });
355
+ return {
356
+ boxRef: boxRef,
357
+ textRef: textRef,
358
+ isShowTips: isShowTips,
359
+ contentText: contentText,
360
+ textProps: textProps
361
+ };
362
+ },
363
+ render: function render() {
364
+ var _this = this;
365
+ return (0,external_vue_namespaceObject.createVNode)("div", {
366
+ "ref": "boxRef",
367
+ "class": "position-relative"
368
+ }, [(0,external_vue_namespaceObject.createVNode)(external_popover_namespaceObject["default"], (0,external_vue_namespaceObject.mergeProps)({
369
+ "placement": this.placement,
370
+ "boundary": this.boundary || document.body,
371
+ "popoverDelay": [200, 0]
372
+ }, props.popoverOptions, {
373
+ "disabled": this.type === 'title' || !this.isShowTips
374
+ }), {
375
+ "default": function _default() {
376
+ return (0,external_vue_namespaceObject.createVNode)("div", (0,external_vue_namespaceObject.mergeProps)({
377
+ "ref": "textRef",
378
+ "class": "text-ov"
379
+ }, _this.textProps), [_this.contentText]);
380
+ },
381
+ content: function content() {
382
+ return _this.contentText;
383
+ }
384
+ })]);
385
+ }
386
+ }));
387
+ ;// CONCATENATED MODULE: ../../packages/overflow-title/src/directive/overflow-title.ts
388
+
389
+
390
+ var overflowTitle = {
391
+ mounted: function mounted(el, _ref) {
392
+ var _ref$value = _ref.value,
393
+ value = _ref$value === void 0 ? {} : _ref$value;
394
+ var clientWidth = el.parentElement.clientWidth;
395
+ if (!clientWidth) {
396
+ return;
397
+ }
398
+ var content = value.content,
399
+ _value$calType = value.calType,
400
+ calType = _value$calType === void 0 ? 'dom' : _value$calType;
401
+ var text = content || el.innerText;
402
+ var textWidth = 0;
403
+ if (calType === 'dom') {
404
+ textWidth = utils_getActualWidthByDom(el.textContent, null, el.parentElement);
405
+ } else {
406
+ var _getComputedStyle = getComputedStyle(el),
407
+ fontSize = _getComputedStyle.fontSize,
408
+ fontFamily = _getComputedStyle.fontFamily;
409
+ textWidth = utils_getActualWidthByCanvas(text, {
410
+ fontSize: fontSize,
411
+ fontFamily: fontFamily
412
+ });
413
+ }
414
+ if (textWidth > clientWidth) {
415
+ el.setAttribute('title', text);
416
+ }
417
+ }
418
+ };
419
+ /* harmony default export */ const directive_overflow_title = (overflowTitle);
420
+ ;// CONCATENATED MODULE: ../../packages/overflow-title/src/index.ts
421
+ /*
422
+ * Tencent is pleased to support the open source community by making
423
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
424
+ *
425
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
426
+ *
427
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
428
+ *
429
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
430
+ *
431
+ * ---------------------------------------------------
432
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
433
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
434
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
435
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
436
+ *
437
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
438
+ * the Software.
439
+ *
440
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
441
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
442
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
443
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
444
+ * IN THE SOFTWARE.
445
+ */
446
+
447
+
448
+
449
+
450
+
451
+ var BkOverflowTitle = (0,external_shared_namespaceObject.withInstall)(overflow_title);
452
+
453
+ /* harmony default export */ const src = (BkOverflowTitle);
454
+ })();
455
+
456
+ var __webpack_exports__OverflowTitle = __webpack_exports__.p1;
457
+ var __webpack_exports__default = __webpack_exports__.ZP;
458
+ var __webpack_exports__getActualWidthByCanvas = __webpack_exports__.si;
459
+ var __webpack_exports__getActualWidthByDom = __webpack_exports__.ZF;
460
+ var __webpack_exports__overflowTitle = __webpack_exports__.$s;
461
+ 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 };