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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/dist/index.cjs.js +64 -64
  2. package/dist/index.esm.js +12188 -12269
  3. package/dist/index.umd.js +65 -65
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/index.js +1 -321
  7. package/lib/alert/index.js +1 -214
  8. package/lib/animate-number/index.js +1 -155
  9. package/lib/backtop/index.js +1 -188
  10. package/lib/badge/index.js +1 -235
  11. package/lib/breadcrumb/index.js +1 -309
  12. package/lib/button/index.js +1 -321
  13. package/lib/card/index.js +1 -285
  14. package/lib/cascader/index.js +2 -2036
  15. package/lib/cascader/index.js.LICENSE.txt +1 -0
  16. package/lib/checkbox/index.js +1 -542
  17. package/lib/code-diff/index.js +1 -5501
  18. package/lib/collapse/index.js +1 -570
  19. package/lib/collapse-transition/index.js +1 -178
  20. package/lib/color-picker/index.js +1 -2665
  21. package/lib/components.js +1 -530
  22. package/lib/config-provider/index.js +1 -365
  23. package/lib/container/index.js +1 -391
  24. package/lib/date-picker/index.js +1 -5527
  25. package/lib/dialog/dialog.css +2 -0
  26. package/lib/dialog/dialog.variable.css +2 -0
  27. package/lib/dialog/index.js +2 -975
  28. package/lib/dialog/index.js.LICENSE.txt +1 -0
  29. package/lib/directives/index.js +2 -1375
  30. package/lib/directives/index.js.LICENSE.txt +14 -0
  31. package/lib/dist.index.js +1 -87
  32. package/lib/divider/index.js +1 -169
  33. package/lib/dropdown/index.js +1 -369
  34. package/lib/exception/index.js +1 -385
  35. package/lib/fixed-navbar/index.js +1 -154
  36. package/lib/form/index.js +1 -924
  37. package/lib/hooks.js +1 -73
  38. package/lib/icon/angle-double-down-line.js +1 -191
  39. package/lib/icon/angle-double-left-line.js +1 -191
  40. package/lib/icon/angle-double-left.js +1 -191
  41. package/lib/icon/angle-double-right-line.js +1 -191
  42. package/lib/icon/angle-double-right.js +1 -191
  43. package/lib/icon/angle-double-up-line.js +1 -191
  44. package/lib/icon/angle-down-fill.js +1 -191
  45. package/lib/icon/angle-down-line.js +1 -191
  46. package/lib/icon/angle-down.js +1 -191
  47. package/lib/icon/angle-left.js +1 -191
  48. package/lib/icon/angle-right.js +1 -191
  49. package/lib/icon/angle-up-fill.js +1 -191
  50. package/lib/icon/angle-up.js +1 -191
  51. package/lib/icon/archive-fill.js +1 -191
  52. package/lib/icon/arrows-left.js +1 -191
  53. package/lib/icon/arrows-right.js +1 -191
  54. package/lib/icon/assistant.js +1 -191
  55. package/lib/icon/audio-fill.js +1 -191
  56. package/lib/icon/bk.js +1 -191
  57. package/lib/icon/circle.js +1 -191
  58. package/lib/icon/close-line.js +1 -191
  59. package/lib/icon/close.js +1 -191
  60. package/lib/icon/code.js +1 -191
  61. package/lib/icon/cog-shape.js +1 -191
  62. package/lib/icon/collapse-left.js +1 -191
  63. package/lib/icon/copy-shape.js +1 -191
  64. package/lib/icon/copy.js +1 -191
  65. package/lib/icon/data-shape.js +1 -191
  66. package/lib/icon/del.js +1 -191
  67. package/lib/icon/doc-fill.js +1 -191
  68. package/lib/icon/done.js +1 -191
  69. package/lib/icon/down-shape.js +1 -191
  70. package/lib/icon/down-small.js +1 -191
  71. package/lib/icon/edit-line.js +1 -191
  72. package/lib/icon/ellipsis.js +1 -191
  73. package/lib/icon/enlarge-line.js +1 -191
  74. package/lib/icon/error.js +1 -191
  75. package/lib/icon/excel-fill.js +1 -191
  76. package/lib/icon/exclamation-circle-shape.js +1 -191
  77. package/lib/icon/eye.js +1 -191
  78. package/lib/icon/filliscreen-line.js +1 -191
  79. package/lib/icon/fix-line.js +1 -191
  80. package/lib/icon/fix-shape.js +1 -191
  81. package/lib/icon/folder-open.js +1 -191
  82. package/lib/icon/folder-shape-open.js +1 -191
  83. package/lib/icon/folder-shape.js +1 -191
  84. package/lib/icon/folder.js +1 -191
  85. package/lib/icon/funnel.js +1 -191
  86. package/lib/icon/help-document-fill.js +1 -191
  87. package/lib/icon/help-fill.js +1 -191
  88. package/lib/icon/help.js +1 -191
  89. package/lib/icon/image-fill.js +1 -276
  90. package/lib/icon/img-error.js +1 -276
  91. package/lib/icon/img-placehoulder.js +1 -276
  92. package/lib/icon/index.js +1 -2399
  93. package/lib/icon/info-line.js +1 -276
  94. package/lib/icon/info.js +1 -276
  95. package/lib/icon/left-shape.js +1 -276
  96. package/lib/icon/left-turn-line.js +1 -276
  97. package/lib/icon/narrow-line.js +1 -276
  98. package/lib/icon/original.js +1 -276
  99. package/lib/icon/pdf-fill.js +1 -276
  100. package/lib/icon/play-shape.js +1 -276
  101. package/lib/icon/plus.js +1 -276
  102. package/lib/icon/ppt-fill.js +1 -276
  103. package/lib/icon/qq.js +1 -276
  104. package/lib/icon/right-shape.js +1 -276
  105. package/lib/icon/right-turn-line.js +1 -276
  106. package/lib/icon/search.js +1 -276
  107. package/lib/icon/share.js +1 -276
  108. package/lib/icon/spinner.js +1 -276
  109. package/lib/icon/success.js +1 -276
  110. package/lib/icon/switcher-loading.js +1 -276
  111. package/lib/icon/text-file.js +1 -276
  112. package/lib/icon/text-fill.js +1 -276
  113. package/lib/icon/transfer.js +1 -276
  114. package/lib/icon/tree-application-shape.js +1 -276
  115. package/lib/icon/unfull-screen.js +1 -276
  116. package/lib/icon/unvisible.js +1 -276
  117. package/lib/icon/up-shape.js +1 -276
  118. package/lib/icon/upload.js +1 -276
  119. package/lib/icon/video-fill.js +1 -276
  120. package/lib/icon/warn.js +1 -276
  121. package/lib/icon/weixin-pro.js +1 -276
  122. package/lib/icon/weixin.js +1 -276
  123. package/lib/image/index.js +1 -641
  124. package/lib/index.js +1 -97
  125. package/lib/info-box/index.js +2 -1165
  126. package/lib/info-box/index.js.LICENSE.txt +1 -0
  127. package/lib/info-box/info-box.css +2 -0
  128. package/lib/info-box/info-box.less +2 -1
  129. package/lib/info-box/info-box.variable.css +2 -0
  130. package/lib/input/index.js +2 -1218
  131. package/lib/input/index.js.LICENSE.txt +1 -0
  132. package/lib/link/index.js +1 -160
  133. package/lib/loading/index.js +1 -381
  134. package/lib/locale/index.js +1 -465
  135. package/lib/menu/index.js +1 -724
  136. package/lib/message/index.js +2 -1795
  137. package/lib/message/index.js.LICENSE.txt +6 -0
  138. package/lib/modal/index.js +1 -396
  139. package/lib/modal/modal.css +2 -0
  140. package/lib/modal/modal.variable.css +2 -0
  141. package/lib/navigation/index.js +1 -367
  142. package/lib/notify/index.js +1 -397
  143. package/lib/overflow-title/index.js +1 -486
  144. package/lib/pagination/index.js +1 -880
  145. package/lib/plugin-popover/index.js +1 -3905
  146. package/lib/plugins/index.js +1 -63
  147. package/lib/pop-confirm/index.js +1 -273
  148. package/lib/popover/index.js +1 -3913
  149. package/lib/popover2/index.js +1 -107
  150. package/lib/preset.js +1 -93
  151. package/lib/process/index.js +2 -759
  152. package/lib/process/index.js.LICENSE.txt +1 -0
  153. package/lib/progress/index.js +1 -431
  154. package/lib/radio/index.js +1 -627
  155. package/lib/rate/index.js +1 -338
  156. package/lib/resize-layout/index.js +1 -429
  157. package/lib/search-select/index.js +2 -2729
  158. package/lib/search-select/index.js.LICENSE.txt +1 -0
  159. package/lib/select/index.js +2 -2240
  160. package/lib/select/index.js.LICENSE.txt +1 -0
  161. package/lib/shared/index.js +1 -2689
  162. package/lib/sideslider/index.js +2 -714
  163. package/lib/sideslider/index.js.LICENSE.txt +1 -0
  164. package/lib/slider/index.js +2 -1291
  165. package/lib/slider/index.js.LICENSE.txt +1 -0
  166. package/lib/steps/index.js +2 -825
  167. package/lib/steps/index.js.LICENSE.txt +1 -0
  168. package/lib/swiper/index.js +1 -336
  169. package/lib/switcher/index.js +1 -277
  170. package/lib/tab/index.js +1 -914
  171. package/lib/table/components/table-column.d.ts +2 -0
  172. package/lib/table/const.d.ts +24 -2
  173. package/lib/table/index.d.ts +38 -0
  174. package/lib/table/index.js +1 -6406
  175. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  176. package/lib/table/plugins/use-fixed-column.d.ts +9 -9
  177. package/lib/table/plugins/use-pagination.d.ts +7 -4
  178. package/lib/table/props.d.ts +22 -1
  179. package/lib/table/render.d.ts +7 -17
  180. package/lib/table/table.css +4 -1
  181. package/lib/table/table.d.ts +44 -23
  182. package/lib/table/table.less +4 -1
  183. package/lib/table/table.variable.css +4 -1
  184. package/lib/table/use-attributes.d.ts +55 -0
  185. package/lib/table/use-column.d.ts +177 -53
  186. package/lib/table/use-common.d.ts +1602 -76
  187. package/lib/table/use-render.d.ts +11 -0
  188. package/lib/table/utils.d.ts +22 -16
  189. package/lib/table-column/index.d.ts +6 -0
  190. package/lib/table-column/index.js +1 -731
  191. package/lib/tag/index.js +1 -233
  192. package/lib/tag-input/index.js +1 -1660
  193. package/lib/time-picker/index.js +1 -71
  194. package/lib/timeline/index.js +1 -241
  195. package/lib/transfer/index.js +1 -673
  196. package/lib/tree/index.d.ts +12 -0
  197. package/lib/tree/index.js +1 -2445
  198. package/lib/tree/props.d.ts +8 -1
  199. package/lib/tree/tree.d.ts +7 -0
  200. package/lib/tree/use-node-action.d.ts +2 -1
  201. package/lib/tree/use-node-attribute.d.ts +2 -0
  202. package/lib/tree/use-search.d.ts +2 -2
  203. package/lib/tree/util.d.ts +2 -2
  204. package/lib/upload/index.js +2 -2874
  205. package/lib/upload/index.js.LICENSE.txt +1 -0
  206. package/lib/virtual-render/index.d.ts +12 -0
  207. package/lib/virtual-render/index.js +1 -792
  208. package/lib/virtual-render/props.d.ts +4 -0
  209. package/lib/virtual-render/v-virtual-render.d.ts +19 -1
  210. package/lib/virtual-render/virtual-render.d.ts +7 -0
  211. package/package.json +1 -2
@@ -0,0 +1 @@
1
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1,431 +1 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
2
- import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
3
- import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
4
- /******/ // The require scope
5
- /******/ var __webpack_require__ = {};
6
- /******/
7
- /************************************************************************/
8
- /******/ /* webpack/runtime/define property getters */
9
- /******/ (() => {
10
- /******/ // define getter functions for harmony exports
11
- /******/ __webpack_require__.d = (exports, definition) => {
12
- /******/ for(var key in definition) {
13
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
14
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
15
- /******/ }
16
- /******/ }
17
- /******/ };
18
- /******/ })();
19
- /******/
20
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
21
- /******/ (() => {
22
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
23
- /******/ })();
24
- /******/
25
- /************************************************************************/
26
- var __webpack_exports__ = {};
27
-
28
- // EXPORTS
29
- __webpack_require__.d(__webpack_exports__, {
30
- Z: () => (/* binding */ src)
31
- });
32
-
33
- ;// CONCATENATED MODULE: external "../shared"
34
- var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
35
- var y = x => () => x
36
- const external_shared_namespaceObject = x({ ["ProgressStrokeLineCapType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.ProgressStrokeLineCapType, ["ProgressType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.ProgressType, ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["ThemeEnum"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.ThemeEnum, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.classes, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
37
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
38
- function _typeof(obj) {
39
- "@babel/helpers - typeof";
40
-
41
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
42
- return typeof obj;
43
- } : function (obj) {
44
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
45
- }, _typeof(obj);
46
- }
47
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
48
-
49
- function _toPrimitive(input, hint) {
50
- if (_typeof(input) !== "object" || input === null) return input;
51
- var prim = input[Symbol.toPrimitive];
52
- if (prim !== undefined) {
53
- var res = prim.call(input, hint || "default");
54
- if (_typeof(res) !== "object") return res;
55
- throw new TypeError("@@toPrimitive must return a primitive value.");
56
- }
57
- return (hint === "string" ? String : Number)(input);
58
- }
59
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
60
-
61
-
62
- function _toPropertyKey(arg) {
63
- var key = _toPrimitive(arg, "string");
64
- return _typeof(key) === "symbol" ? key : String(key);
65
- }
66
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
67
-
68
- function _defineProperty(obj, key, value) {
69
- key = _toPropertyKey(key);
70
- if (key in obj) {
71
- Object.defineProperty(obj, key, {
72
- value: value,
73
- enumerable: true,
74
- configurable: true,
75
- writable: true
76
- });
77
- } else {
78
- obj[key] = value;
79
- }
80
- return obj;
81
- }
82
- ;// CONCATENATED MODULE: external "vue"
83
- var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
84
- var external_vue_y = x => () => x
85
- const external_vue_namespaceObject = external_vue_x({ ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode });
86
- ;// CONCATENATED MODULE: external "../config-provider"
87
- var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
88
- var external_config_provider_y = x => () => x
89
- const external_config_provider_namespaceObject = external_config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
90
- ;// CONCATENATED MODULE: ../../packages/progress/src/circle.tsx
91
-
92
- /*
93
- * Tencent is pleased to support the open source community by making
94
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
95
- *
96
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
97
- *
98
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
99
- *
100
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
101
- *
102
- * ---------------------------------------------------
103
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
104
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
105
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
106
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
107
- *
108
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
109
- * the Software.
110
- *
111
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
112
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
113
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
114
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
115
- * IN THE SOFTWARE.
116
- */
117
-
118
- /** 环形进度和仪表盘 */
119
- var Circle = function Circle(_, _ref) {
120
- var attrs = _ref.attrs,
121
- slots = _ref.slots;
122
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
123
- resolveClassName = _usePrefix.resolveClassName;
124
- var width = attrs.width,
125
- percent = attrs.percent,
126
- strokeWidth = attrs.strokeWidth,
127
- color = attrs.color,
128
- strokeLinecap = attrs.strokeLinecap,
129
- theme = attrs.theme,
130
- type = attrs.type,
131
- bgColor = attrs.bgColor,
132
- titleStyle = attrs.titleStyle;
133
- var circleStrokeWidth = strokeWidth || 6;
134
- var circleSize = width || 126;
135
- var circleStyle = {
136
- width: typeof circleSize === 'number' ? "".concat(circleSize, "px") : circleSize,
137
- height: typeof circleSize === 'number' ? "".concat(circleSize, "px") : circleSize,
138
- fontSize: "".concat(circleSize * 0.15 + 6, "px")
139
- };
140
- var radius = 50 - circleStrokeWidth / 2;
141
- var isDashboard = type === 'dashboard';
142
- /** 总度数 */
143
- var len = Math.PI * 2 * radius;
144
- /** 绘制长度 */
145
- var rate = isDashboard && 0.75 || 1;
146
- /** stroke偏移 */
147
- var strokeDashoffset = "".concat(-1 * len * (1 - rate) / 2, "px");
148
- var transition = 'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease';
149
- /** 底色样式 */
150
- var trailStyle = {
151
- strokeDasharray: "".concat(len * rate, "px, ").concat(len, "px"),
152
- strokeDashoffset: strokeDashoffset
153
- };
154
- /** 路径样式 */
155
- var pathStyle = {
156
- strokeDasharray: "".concat(len * rate * (percent / 100), "px, ").concat(len, "px"),
157
- strokeDashoffset: strokeDashoffset,
158
- transition: transition
159
- };
160
- /** 绘制路径 */
161
- var path = "\n M 50 50\n m 0 ".concat(isDashboard ? '' : '-').concat(radius, "\n a ").concat(radius, " ").concat(radius, " 0 1 1 0 ").concat(isDashboard ? '-' : '').concat(radius * 2, "\n a ").concat(radius, " ").concat(radius, " 0 1 1 0 ").concat(isDashboard ? '' : '-').concat(radius * 2, "\n ");
162
- /** 底色 */
163
- var progressCircleTrail = {
164
- d: path,
165
- stroke: bgColor || '#f5f5f5',
166
- 'stroke-linecap': strokeLinecap,
167
- 'stroke-width': circleStrokeWidth,
168
- 'fill-opacity': '0',
169
- "class": 'process-circle-trail',
170
- style: trailStyle
171
- };
172
- /** 路径 */
173
- var progressCirclePath = {
174
- d: path,
175
- stroke: color || '#13ce66',
176
- 'stroke-linecap': strokeLinecap,
177
- 'stroke-width': percent > 0 && circleStrokeWidth || 0,
178
- 'fill-opacity': '0',
179
- "class": "process-circle-path ".concat(resolveClassName("".concat(theme, "-circle-trail"))),
180
- style: pathStyle
181
- };
182
- return (0,external_vue_namespaceObject.createVNode)("div", {
183
- "class": "progress-outer-circle",
184
- "style": circleStyle
185
- }, [(0,external_vue_namespaceObject.createVNode)("svg", {
186
- "viewBox": "0 0 100 100"
187
- }, [(0,external_vue_namespaceObject.createVNode)("path", progressCircleTrail, null), (0,external_vue_namespaceObject.createVNode)("path", progressCirclePath, null)]), (0,external_vue_namespaceObject.createVNode)("span", {
188
- "class": "progress-circle-text",
189
- "style": titleStyle
190
- }, [slots === null || slots === void 0 ? void 0 : slots["default"]()])]);
191
- };
192
- /* harmony default export */ const circle = (Circle);
193
- ;// CONCATENATED MODULE: ../../packages/progress/src/line.tsx
194
-
195
-
196
- /*
197
- * Tencent is pleased to support the open source community by making
198
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
199
- *
200
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
201
- *
202
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
203
- *
204
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
205
- *
206
- * ---------------------------------------------------
207
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
208
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
209
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
210
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
211
- *
212
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
213
- * the Software.
214
- *
215
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
216
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
217
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
218
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
219
- * IN THE SOFTWARE.
220
- */
221
-
222
- /** 进度条直线*/
223
- var Line = function Line(_, _ref) {
224
- var attrs = _ref.attrs,
225
- slots = _ref.slots;
226
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
227
- resolveClassName = _usePrefix.resolveClassName;
228
- var percent = attrs.percent,
229
- strokeWidth = attrs.strokeWidth,
230
- size = attrs.size,
231
- color = attrs.color,
232
- titleStyle = attrs.titleStyle,
233
- showText = attrs.showText,
234
- textInside = attrs.textInside,
235
- theme = attrs.theme;
236
- var percentStyle = {
237
- height: "".concat(strokeWidth, "px"),
238
- lineHeight: "".concat(strokeWidth, "px")
239
- };
240
- var barStyle = {
241
- width: "".concat(percent, "%"),
242
- background: color,
243
- animationDuration: '3s'
244
- };
245
- /** 根据 textInside 来区分何时展示 默认slot*/
246
- var showDefault = function showDefault() {
247
- var isTextInside = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
248
- if (!(showText || slots["default"])) {
249
- return null;
250
- }
251
- if (isTextInside && textInside || !isTextInside && !textInside) {
252
- return slots === null || slots === void 0 ? void 0 : slots["default"]();
253
- }
254
- return null;
255
- };
256
- return (0,external_vue_namespaceObject.createVNode)("div", {
257
- "class": "progress-outer"
258
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
259
- "class": "".concat(resolveClassName("progress-".concat(size || 'normal')), " progress-bar"),
260
- "style": percentStyle
261
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
262
- "style": barStyle,
263
- "class": _defineProperty({
264
- 'progress-inner': true
265
- }, "".concat(resolveClassName("".concat(theme))), true)
266
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
267
- "class": "inner-text",
268
- "style": titleStyle
269
- }, [showDefault()])])]), showDefault(false)]);
270
- };
271
- /* harmony default export */ const line = (Line);
272
- ;// CONCATENATED MODULE: ../../packages/progress/src/progress.tsx
273
-
274
-
275
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
276
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
277
- /*
278
- * Tencent is pleased to support the open source community by making
279
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
280
- *
281
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
282
- *
283
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
284
- *
285
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
286
- *
287
- * ---------------------------------------------------
288
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
289
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
290
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
291
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
292
- *
293
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
294
- * the Software.
295
- *
296
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
297
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
298
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
299
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
300
- * IN THE SOFTWARE.
301
- */
302
-
303
-
304
-
305
-
306
-
307
- function _isSlot(s) {
308
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
309
- }
310
- var progressType = {
311
- extCls: external_shared_namespaceObject.PropTypes.string,
312
- type: (0,external_shared_namespaceObject.ProgressType)(),
313
- percent: external_shared_namespaceObject.PropTypes.number.def(0),
314
- theme: external_shared_namespaceObject.PropTypes.theme().def(external_shared_namespaceObject.ThemeEnum.PRIMARY),
315
- size: external_shared_namespaceObject.PropTypes.size(),
316
- width: external_shared_namespaceObject.PropTypes.number.def(126),
317
- strokeWidth: external_shared_namespaceObject.PropTypes.number,
318
- strokeLinecap: (0,external_shared_namespaceObject.ProgressStrokeLineCapType)(),
319
- textInside: external_shared_namespaceObject.PropTypes.bool.def(false),
320
- showText: external_shared_namespaceObject.PropTypes.bool.def(true),
321
- color: external_shared_namespaceObject.PropTypes.string,
322
- bgColor: external_shared_namespaceObject.PropTypes.string,
323
- fixed: external_shared_namespaceObject.PropTypes.number.validate(function (value) {
324
- return value >= 0 && value <= 20;
325
- }).def(0),
326
- format: external_shared_namespaceObject.PropTypes.func.def(function (percent) {
327
- return "".concat(percent, "%");
328
- }),
329
- titleStyle: external_shared_namespaceObject.PropTypes.object.def({
330
- fontSize: '16px',
331
- verticalAlign: 'middle'
332
- })
333
- };
334
- /* harmony default export */ const progress = ((0,external_vue_namespaceObject.defineComponent)({
335
- // eslint-disable-next-line vue/no-reserved-component-names
336
- name: 'Progress',
337
- props: progressType,
338
- setup: function setup() {
339
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
340
- resolveClassName = _usePrefix.resolveClassName;
341
- return {
342
- resolveClassName: resolveClassName
343
- };
344
- },
345
- methods: {
346
- /** 验证进度值 */validPercent: function validPercent(percent) {
347
- if (!percent || percent < 0) {
348
- return 0;
349
- }
350
- if (percent > 100) {
351
- return 100;
352
- }
353
- return percent;
354
- },
355
- /** text 区域展示内容*/renderProcessInfo: function renderProcessInfo() {
356
- var _this$validPercent;
357
- var _this$$props = this.$props,
358
- showText = _this$$props.showText,
359
- format = _this$$props.format,
360
- percent = _this$$props.percent,
361
- textInside = _this$$props.textInside,
362
- titleStyle = _this$$props.titleStyle,
363
- fixed = _this$$props.fixed;
364
- var formatPercent = format((_this$validPercent = this.validPercent(percent)) === null || _this$validPercent === void 0 ? void 0 : _this$validPercent.toFixed(fixed));
365
- if ((showText || this.$slots["default"]) && textInside) {
366
- return this.$slots["default"] ? this.$slots["default"]() : (0,external_vue_namespaceObject.createVNode)("span", null, [formatPercent]);
367
- }
368
- if (!showText || textInside) return null;
369
- return (0,external_vue_namespaceObject.createVNode)("span", {
370
- "class": "progress-text",
371
- "style": typeof formatPercent === 'string' ? titleStyle : undefined
372
- }, [this.$slots["default"] ? this.$slots["default"]() : formatPercent]);
373
- }
374
- },
375
- render: function render() {
376
- var progressInfo = this.renderProcessInfo();
377
- var $props = _objectSpread(_objectSpread({}, this.$props), {}, {
378
- percent: this.validPercent(this.percent)
379
- });
380
- var progress = (0,external_vue_namespaceObject.createVNode)(line, $props, _isSlot(progressInfo) ? progressInfo : {
381
- "default": function _default() {
382
- return [progressInfo];
383
- }
384
- });
385
- if (this.type === 'circle' || this.type === 'dashboard') {
386
- progress = (0,external_vue_namespaceObject.createVNode)(circle, $props, _isSlot(progressInfo) ? progressInfo : {
387
- "default": function _default() {
388
- return [progressInfo];
389
- }
390
- });
391
- }
392
- var progressProps = {
393
- "class": (0,external_shared_namespaceObject.classes)({
394
- extCls: !!this.extCls
395
- }, "".concat(this.resolveClassName('progress'), " ").concat(this.resolveClassName("progress-".concat(this.type))))
396
- };
397
- return (0,external_vue_namespaceObject.createVNode)("div", progressProps, [progress]);
398
- }
399
- }));
400
- ;// CONCATENATED MODULE: ../../packages/progress/src/index.ts
401
- /*
402
- * Tencent is pleased to support the open source community by making
403
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
404
- *
405
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
406
- *
407
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
408
- *
409
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
410
- *
411
- * ---------------------------------------------------
412
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
413
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
414
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
415
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
416
- *
417
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
418
- * the Software.
419
- *
420
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
421
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
422
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
423
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
424
- * IN THE SOFTWARE.
425
- */
426
-
427
-
428
- var BkProgress = (0,external_shared_namespaceObject.withInstall)(progress);
429
- /* harmony default export */ const src = (BkProgress);
430
- var __webpack_exports__default = __webpack_exports__.Z;
431
- export { __webpack_exports__default as default };
1
+ import*as e from"../shared";import*as t from"vue";import*as r from"../config-provider";var o={d:(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},s={};o.d(s,{Z:()=>v});const n=(a={ProgressStrokeLineCapType:()=>e.ProgressStrokeLineCapType,ProgressType:()=>e.ProgressType,PropTypes:()=>e.PropTypes,ThemeEnum:()=>e.ThemeEnum,classes:()=>e.classes,withInstall:()=>e.withInstall},c={},o.d(c,a),c);var a,c;const i=(e=>{var t={};return o.d(t,e),t})({createVNode:()=>t.createVNode,defineComponent:()=>t.defineComponent,isVNode:()=>t.isVNode}),l=(e=>{var t={};return o.d(t,e),t})({usePrefix:()=>r.usePrefix}),p=function(e,t){var r=t.attrs,o=t.slots,s=(0,l.usePrefix)().resolveClassName,n=r.width,a=r.percent,c=r.strokeWidth,p=r.color,d=r.strokeLinecap,u=r.theme,f=r.type,y=r.bgColor,h=r.titleStyle,m=c||6,v=n||126,P={width:"number"==typeof v?"".concat(v,"px"):v,height:"number"==typeof v?"".concat(v,"px"):v,fontSize:"".concat(.15*v+6,"px")},b=50-m/2,g="dashboard"===f,x=2*Math.PI*b,T=g?.75:1,N="".concat(-1*x*(1-T)/2,"px"),k={strokeDasharray:"".concat(x*T,"px, ").concat(x,"px"),strokeDashoffset:N},V={strokeDasharray:"".concat(x*T*(a/100),"px, ").concat(x,"px"),strokeDashoffset:N,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease"},S="\n M 50 50\n m 0 ".concat(g?"":"-").concat(b,"\n a ").concat(b," ").concat(b," 0 1 1 0 ").concat(g?"-":"").concat(2*b,"\n a ").concat(b," ").concat(b," 0 1 1 0 ").concat(g?"":"-").concat(2*b,"\n "),w={d:S,stroke:y||"#f5f5f5","stroke-linecap":d,"stroke-width":m,"fill-opacity":"0",class:"process-circle-trail",style:k},C={d:S,stroke:p||"#13ce66","stroke-linecap":d,"stroke-width":a>0&&m||0,"fill-opacity":"0",class:"process-circle-path ".concat(s("".concat(u,"-circle-trail"))),style:V};return(0,i.createVNode)("div",{class:"progress-outer-circle",style:P},[(0,i.createVNode)("svg",{viewBox:"0 0 100 100"},[(0,i.createVNode)("path",w,null),(0,i.createVNode)("path",C,null)]),(0,i.createVNode)("span",{class:"progress-circle-text",style:h},[null==o?void 0:o.default()])])};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function u(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d(t)?t:String(t)}const f=function(e,t){var r,o,s=t.attrs,n=t.slots,a=(0,l.usePrefix)().resolveClassName,c=s.percent,p=s.strokeWidth,d=s.size,f=s.color,y=s.titleStyle,h=s.showText,m=s.textInside,v=s.theme,P={height:"".concat(p,"px"),lineHeight:"".concat(p,"px")},b={width:"".concat(c,"%"),background:f,animationDuration:"3s"},g=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(h||n.default)&&(e&&m||!e&&!m)?null==n?void 0:n.default():null};return(0,i.createVNode)("div",{class:"progress-outer"},[(0,i.createVNode)("div",{class:"".concat(a("progress-".concat(d||"normal"))," progress-bar"),style:P},[(0,i.createVNode)("div",{style:b,class:(r={"progress-inner":!0},o="".concat(a("".concat(v))),!0,(o=u(o))in r?Object.defineProperty(r,o,{value:true,enumerable:!0,configurable:!0,writable:!0}):r[o]=true,r)},[(0,i.createVNode)("div",{class:"inner-text",style:y},[g()])])]),g(!1)])};function y(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,i.isVNode)(e)}var h={extCls:n.PropTypes.string,type:(0,n.ProgressType)(),percent:n.PropTypes.number.def(0),theme:n.PropTypes.theme().def(n.ThemeEnum.PRIMARY),size:n.PropTypes.size(),width:n.PropTypes.number.def(126),strokeWidth:n.PropTypes.number,strokeLinecap:(0,n.ProgressStrokeLineCapType)(),textInside:n.PropTypes.bool.def(!1),showText:n.PropTypes.bool.def(!0),color:n.PropTypes.string,bgColor:n.PropTypes.string,fixed:n.PropTypes.number.validate((function(e){return e>=0&&e<=20})).def(0),format:n.PropTypes.func.def((function(e){return"".concat(e,"%")})),titleStyle:n.PropTypes.object.def({fontSize:"16px",verticalAlign:"middle"})};const m=(0,i.defineComponent)({name:"Progress",props:h,setup:function(){return{resolveClassName:(0,l.usePrefix)().resolveClassName}},methods:{validPercent:function(e){return!e||e<0?0:e>100?100:e},renderProcessInfo:function(){var e,t=this.$props,r=t.showText,o=t.format,s=t.percent,n=t.textInside,a=t.titleStyle,c=t.fixed,l=o(null===(e=this.validPercent(s))||void 0===e?void 0:e.toFixed(c));return(r||this.$slots.default)&&n?this.$slots.default?this.$slots.default():(0,i.createVNode)("span",null,[l]):!r||n?null:(0,i.createVNode)("span",{class:"progress-text",style:"string"==typeof l?a:void 0},[this.$slots.default?this.$slots.default():l])}},render:function(){var e=this.renderProcessInfo(),t=Object.assign(Object.assign({},this.$props),{percent:this.validPercent(this.percent)}),r=(0,i.createVNode)(f,t,y(e)?e:{default:function(){return[e]}});"circle"!==this.type&&"dashboard"!==this.type||(r=(0,i.createVNode)(p,t,y(e)?e:{default:function(){return[e]}}));var o={class:(0,n.classes)({extCls:!!this.extCls},"".concat(this.resolveClassName("progress")," ").concat(this.resolveClassName("progress-".concat(this.type))))};return(0,i.createVNode)("div",o,[r])}}),v=(0,n.withInstall)(m);var P=s.Z;export{P as default};