bkui-vue 0.0.2-beta.36 → 0.0.2-beta.37

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