bkui-vue 0.0.1-beta.468 → 0.0.1-beta.469

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 (168) hide show
  1. package/lib/affix/index.js +1 -335
  2. package/lib/alert/index.js +1 -276
  3. package/lib/animate-number/index.js +1 -219
  4. package/lib/backtop/index.js +1 -252
  5. package/lib/badge/index.js +1 -293
  6. package/lib/breadcrumb/index.js +1 -311
  7. package/lib/button/index.js +1 -388
  8. package/lib/card/index.js +1 -356
  9. package/lib/cascader/index.js +2 -2075
  10. package/lib/cascader/index.js.LICENSE.txt +1 -0
  11. package/lib/checkbox/index.js +1 -536
  12. package/lib/code-diff/index.js +1 -5535
  13. package/lib/collapse/index.js +1 -589
  14. package/lib/collapse-transition/index.js +1 -234
  15. package/lib/color-picker/index.js +1 -2701
  16. package/lib/components.js +1 -781
  17. package/lib/config-provider/index.js +1 -377
  18. package/lib/container/index.js +1 -390
  19. package/lib/date-picker/index.js +1 -5537
  20. package/lib/dialog/index.js +2 -1322
  21. package/lib/dialog/index.js.LICENSE.txt +1 -0
  22. package/lib/directives/index.js +2 -1357
  23. package/lib/directives/index.js.LICENSE.txt +14 -0
  24. package/lib/dist.index.js +1 -179
  25. package/lib/divider/index.js +1 -226
  26. package/lib/dropdown/index.js +1 -392
  27. package/lib/exception/index.js +1 -423
  28. package/lib/fixed-navbar/index.js +1 -210
  29. package/lib/form/index.js +1 -995
  30. package/lib/hooks.js +1 -133
  31. package/lib/icon/angle-double-down-line.js +1 -541
  32. package/lib/icon/angle-double-left-line.js +1 -541
  33. package/lib/icon/angle-double-left.js +1 -541
  34. package/lib/icon/angle-double-right-line.js +1 -541
  35. package/lib/icon/angle-double-right.js +1 -541
  36. package/lib/icon/angle-double-up-line.js +1 -541
  37. package/lib/icon/angle-down-fill.js +1 -541
  38. package/lib/icon/angle-down-line.js +1 -541
  39. package/lib/icon/angle-down.js +1 -541
  40. package/lib/icon/angle-left.js +1 -541
  41. package/lib/icon/angle-right.js +1 -541
  42. package/lib/icon/angle-up-fill.js +1 -541
  43. package/lib/icon/angle-up.js +1 -541
  44. package/lib/icon/archive-fill.js +1 -541
  45. package/lib/icon/arrows-left.js +1 -541
  46. package/lib/icon/arrows-right.js +1 -541
  47. package/lib/icon/audio-fill.js +1 -541
  48. package/lib/icon/bk.js +1 -541
  49. package/lib/icon/circle.js +1 -541
  50. package/lib/icon/close-line.js +1 -541
  51. package/lib/icon/close.js +1 -541
  52. package/lib/icon/code.js +1 -541
  53. package/lib/icon/cog-shape.js +1 -541
  54. package/lib/icon/collapse-left.js +1 -541
  55. package/lib/icon/copy-shape.js +1 -541
  56. package/lib/icon/copy.js +1 -541
  57. package/lib/icon/data-shape.js +1 -541
  58. package/lib/icon/del.js +1 -541
  59. package/lib/icon/doc-fill.js +1 -541
  60. package/lib/icon/done.js +1 -541
  61. package/lib/icon/down-shape.js +1 -541
  62. package/lib/icon/down-small.js +1 -541
  63. package/lib/icon/edit-line.js +1 -541
  64. package/lib/icon/ellipsis.js +1 -541
  65. package/lib/icon/enlarge-line.js +1 -541
  66. package/lib/icon/error.js +1 -541
  67. package/lib/icon/excel-fill.js +1 -541
  68. package/lib/icon/exclamation-circle-shape.js +1 -541
  69. package/lib/icon/eye.js +1 -541
  70. package/lib/icon/filliscreen-line.js +1 -541
  71. package/lib/icon/fix-line.js +1 -541
  72. package/lib/icon/fix-shape.js +1 -541
  73. package/lib/icon/folder-open.js +1 -541
  74. package/lib/icon/folder-shape-open.js +1 -541
  75. package/lib/icon/folder-shape.js +1 -541
  76. package/lib/icon/folder.js +1 -541
  77. package/lib/icon/funnel.js +1 -541
  78. package/lib/icon/help-document-fill.js +1 -541
  79. package/lib/icon/help-fill.js +1 -541
  80. package/lib/icon/help.js +1 -541
  81. package/lib/icon/image-fill.js +1 -563
  82. package/lib/icon/img-error.js +1 -563
  83. package/lib/icon/img-placehoulder.js +1 -563
  84. package/lib/icon/index.js +1 -2337
  85. package/lib/icon/info-line.js +1 -563
  86. package/lib/icon/info.js +1 -563
  87. package/lib/icon/left-shape.js +1 -563
  88. package/lib/icon/left-turn-line.js +1 -563
  89. package/lib/icon/narrow-line.js +1 -563
  90. package/lib/icon/original.js +1 -563
  91. package/lib/icon/pdf-fill.js +1 -563
  92. package/lib/icon/play-shape.js +1 -563
  93. package/lib/icon/plus.js +1 -563
  94. package/lib/icon/ppt-fill.js +1 -563
  95. package/lib/icon/qq.js +1 -563
  96. package/lib/icon/right-shape.js +1 -563
  97. package/lib/icon/right-turn-line.js +1 -563
  98. package/lib/icon/search.js +1 -563
  99. package/lib/icon/share.js +1 -563
  100. package/lib/icon/spinner.js +1 -563
  101. package/lib/icon/success.js +1 -563
  102. package/lib/icon/switcher-loading.js +1 -563
  103. package/lib/icon/text-file.js +1 -563
  104. package/lib/icon/text-fill.js +1 -563
  105. package/lib/icon/transfer.js +1 -563
  106. package/lib/icon/tree-application-shape.js +1 -563
  107. package/lib/icon/unfull-screen.js +1 -563
  108. package/lib/icon/unvisible.js +1 -563
  109. package/lib/icon/up-shape.js +1 -563
  110. package/lib/icon/upload.js +1 -563
  111. package/lib/icon/video-fill.js +1 -563
  112. package/lib/icon/warn.js +1 -563
  113. package/lib/icon/weixin-pro.js +1 -563
  114. package/lib/icon/weixin.js +1 -563
  115. package/lib/image/index.js +1 -944
  116. package/lib/index.js +1 -195
  117. package/lib/info-box/index.js +2 -1508
  118. package/lib/info-box/index.js.LICENSE.txt +1 -0
  119. package/lib/input/index.js +1 -963
  120. package/lib/link/index.js +1 -219
  121. package/lib/loading/index.js +1 -434
  122. package/lib/locale/index.js +1 -489
  123. package/lib/menu/index.js +1 -776
  124. package/lib/message/index.js +2 -1744
  125. package/lib/message/index.js.LICENSE.txt +6 -0
  126. package/lib/modal/index.js +1 -397
  127. package/lib/navigation/index.js +1 -423
  128. package/lib/notify/index.js +1 -437
  129. package/lib/overflow-title/index.js +1 -547
  130. package/lib/pagination/index.js +1 -987
  131. package/lib/plugin-popover/index.js +1 -4022
  132. package/lib/plugins/index.js +1 -130
  133. package/lib/pop-confirm/index.js +1 -365
  134. package/lib/popover/index.js +1 -4028
  135. package/lib/popover2/index.js +1 -171
  136. package/lib/preset.js +1 -164
  137. package/lib/process/index.js +2 -1143
  138. package/lib/process/index.js.LICENSE.txt +1 -0
  139. package/lib/progress/index.js +1 -476
  140. package/lib/radio/index.js +1 -611
  141. package/lib/rate/index.js +1 -348
  142. package/lib/resize-layout/index.js +1 -482
  143. package/lib/search-select/index.js +2 -2999
  144. package/lib/search-select/index.js.LICENSE.txt +1 -0
  145. package/lib/select/index.js +2 -2531
  146. package/lib/select/index.js.LICENSE.txt +1 -0
  147. package/lib/shared/index.js +1 -2713
  148. package/lib/sideslider/index.js +2 -1043
  149. package/lib/sideslider/index.js.LICENSE.txt +1 -0
  150. package/lib/slider/index.js +2 -1667
  151. package/lib/slider/index.js.LICENSE.txt +1 -0
  152. package/lib/steps/index.js +2 -1212
  153. package/lib/steps/index.js.LICENSE.txt +1 -0
  154. package/lib/swiper/index.js +1 -350
  155. package/lib/switcher/index.js +1 -323
  156. package/lib/tab/index.js +1 -918
  157. package/lib/table/index.js +1 -6388
  158. package/lib/table-column/index.js +1 -801
  159. package/lib/tag/index.js +1 -300
  160. package/lib/tag-input/index.js +1 -1757
  161. package/lib/time-picker/index.js +1 -142
  162. package/lib/timeline/index.js +1 -297
  163. package/lib/transfer/index.js +1 -764
  164. package/lib/tree/index.js +1 -2608
  165. package/lib/upload/index.js +2 -3257
  166. package/lib/upload/index.js.LICENSE.txt +1 -0
  167. package/lib/virtual-render/index.js +1 -790
  168. package/package.json +1 -1
@@ -1,335 +1 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("../shared"), require("vue"), require("lodash"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["../shared", "vue", "lodash"], factory);
6
- else {
7
- var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("lodash")) : factory(root["../shared"], root["vue"], root["lodash"]);
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__467__) => {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ var __webpack_modules__ = ({
14
-
15
- /***/ 4212:
16
- /***/ ((module) => {
17
-
18
- module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
19
-
20
- /***/ }),
21
-
22
- /***/ 467:
23
- /***/ ((module) => {
24
-
25
- module.exports = __WEBPACK_EXTERNAL_MODULE__467__;
26
-
27
- /***/ }),
28
-
29
- /***/ 748:
30
- /***/ ((module) => {
31
-
32
- module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
33
-
34
- /***/ })
35
-
36
- /******/ });
37
- /************************************************************************/
38
- /******/ // The module cache
39
- /******/ var __webpack_module_cache__ = {};
40
- /******/
41
- /******/ // The require function
42
- /******/ function __webpack_require__(moduleId) {
43
- /******/ // Check if module is in cache
44
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
45
- /******/ if (cachedModule !== undefined) {
46
- /******/ return cachedModule.exports;
47
- /******/ }
48
- /******/ // Create a new module (and put it into the cache)
49
- /******/ var module = __webpack_module_cache__[moduleId] = {
50
- /******/ // no module.id needed
51
- /******/ // no module.loaded needed
52
- /******/ exports: {}
53
- /******/ };
54
- /******/
55
- /******/ // Execute the module function
56
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
57
- /******/
58
- /******/ // Return the exports of the module
59
- /******/ return module.exports;
60
- /******/ }
61
- /******/
62
- /************************************************************************/
63
- /******/ /* webpack/runtime/define property getters */
64
- /******/ (() => {
65
- /******/ // define getter functions for harmony exports
66
- /******/ __webpack_require__.d = (exports, definition) => {
67
- /******/ for(var key in definition) {
68
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
69
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
70
- /******/ }
71
- /******/ }
72
- /******/ };
73
- /******/ })();
74
- /******/
75
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
76
- /******/ (() => {
77
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
78
- /******/ })();
79
- /******/
80
- /******/ /* webpack/runtime/make namespace object */
81
- /******/ (() => {
82
- /******/ // define __esModule on exports
83
- /******/ __webpack_require__.r = (exports) => {
84
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
85
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
86
- /******/ }
87
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
88
- /******/ };
89
- /******/ })();
90
- /******/
91
- /************************************************************************/
92
- var __webpack_exports__ = {};
93
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
94
- (() => {
95
- // ESM COMPAT FLAG
96
- __webpack_require__.r(__webpack_exports__);
97
-
98
- // EXPORTS
99
- __webpack_require__.d(__webpack_exports__, {
100
- "default": () => (/* binding */ src)
101
- });
102
-
103
- // EXTERNAL MODULE: external "../shared"
104
- var external_shared_ = __webpack_require__(4212);
105
- // EXTERNAL MODULE: external "vue"
106
- var external_vue_ = __webpack_require__(748);
107
- // EXTERNAL MODULE: external "lodash"
108
- var external_lodash_ = __webpack_require__(467);
109
- ;// CONCATENATED MODULE: ../../packages/affix/src/affix.tsx
110
-
111
- /*
112
- * Tencent is pleased to support the open source community by making
113
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
114
- *
115
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
116
- *
117
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
118
- *
119
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
120
- *
121
- * ---------------------------------------------------
122
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
123
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
124
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
125
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
126
- *
127
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
128
- * the Software.
129
- *
130
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
131
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
132
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
133
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
134
- * IN THE SOFTWARE.
135
- */
136
-
137
-
138
-
139
- var on = function () {
140
- if (document.addEventListener) {
141
- return function (element, event, handler) {
142
- if (element && event && handler) {
143
- element.addEventListener(event, handler, true);
144
- }
145
- };
146
- }
147
- return function (element, event, handler) {
148
- if (element && event && handler) {
149
- element.attachEvent("on".concat(event), handler);
150
- }
151
- };
152
- }();
153
- // 兼容浏览器,移除事件监听器
154
- var off = function () {
155
- if (document.removeEventListener) {
156
- return function (element, event, handler) {
157
- if (element && event) {
158
- element.removeEventListener(event, handler, true);
159
- }
160
- };
161
- }
162
- return function (element, event, handler) {
163
- if (element && event) {
164
- element.detachEvent("on".concat(event), handler);
165
- }
166
- };
167
- }();
168
- /* harmony default export */ const affix = ((0,external_vue_.defineComponent)({
169
- name: 'Affix',
170
- props: {
171
- offsetTop: external_shared_.PropTypes.number.def(0),
172
- offsetBottom: external_shared_.PropTypes.number,
173
- target: external_shared_.PropTypes.string.def(''),
174
- zIndex: external_shared_.PropTypes.number.def(1000)
175
- },
176
- emits: ['change'],
177
- setup: function setup(props, _ref) {
178
- var emit = _ref.emit,
179
- slots = _ref.slots;
180
- var point = (0,external_vue_.ref)(null);
181
- var root = (0,external_vue_.ref)(null);
182
- var targetEl = (0,external_vue_.ref)();
183
- var styles = (0,external_vue_.ref)({});
184
- var _getCurrentInstance = (0,external_vue_.getCurrentInstance)(),
185
- proxy = _getCurrentInstance.proxy;
186
- var affixWidth = (0,external_vue_.ref)(0);
187
- var offsetStyles = (0,external_vue_.computed)(function () {
188
- return Object.assign(Object.assign({}, styles.value), {
189
- 'z-index': props.zIndex
190
- });
191
- });
192
- (0,external_vue_.onMounted)(function () {
193
- affixWidth.value = proxy.$el.offsetWidth;
194
- targetEl.value = props.target ? document.querySelector(props.target) : window;
195
- on(targetEl.value, 'scroll', listenScroll);
196
- on(targetEl.value, 'resize', listenScroll);
197
- (0,external_vue_.nextTick)(function () {
198
- handleScroll();
199
- });
200
- });
201
- var affix = (0,external_vue_.ref)(false);
202
- var pointClass = (0,external_vue_.computed)(function () {
203
- return (0,external_shared_.classes)({
204
- 'bk-affix': affix.value
205
- });
206
- });
207
- var offsetType = (0,external_vue_.computed)(function () {
208
- return props.offsetBottom >= 0 ? 'bottom' : 'top';
209
- });
210
- var setTargetLoop = function setTargetLoop() {
211
- if (offsetType.value === 'top') {
212
- styles.value = {
213
- top: "".concat(targetEl.value.getBoundingClientRect().top + props.offsetTop, "px")
214
- };
215
- } else {
216
- styles.value = {
217
- bottom: "".concat(window.innerHeight - targetEl.value.getBoundingClientRect().bottom + props.offsetBottom, "px")
218
- };
219
- }
220
- };
221
- var listenScroll = (0,external_lodash_.throttle)(function () {
222
- handleScroll();
223
- }, 100);
224
- // 获取元素到浏览器边缘的距离
225
- var getOffset = function getOffset(element) {
226
- var rect = element.value.getBoundingClientRect();
227
- var rect2 = targetEl.value === window ? {
228
- top: 0,
229
- left: 0
230
- } : targetEl.value.getBoundingClientRect();
231
- var clientTop = targetEl.value.clientTop || 0;
232
- var clientLeft = targetEl.value.clientLeft || 0;
233
- return {
234
- top: rect.top - rect2.top - clientTop,
235
- left: rect.left - rect2.left - clientLeft
236
- };
237
- };
238
- var handleScroll = function handleScroll() {
239
- var rect = targetEl.value === window ? {
240
- top: 0,
241
- left: 0,
242
- bottom: window.innerHeight
243
- } : targetEl.value.getBoundingClientRect();
244
- var elOffset = getOffset(root);
245
- var windowHeight = targetEl.value === window ? targetEl.value.innerHeight : targetEl.value.clientHeight;
246
- var elHeight = point.value.offsetHeight;
247
- // Fixed Top
248
- if (elOffset.top < props.offsetTop && offsetType.value === 'top' && !affix.value) {
249
- affix.value = true;
250
- styles.value = {
251
- position: 'fixed',
252
- top: "".concat(rect.top + props.offsetTop, "px"),
253
- left: "".concat(rect.left + elOffset.left, "px"),
254
- width: "".concat(affixWidth.value, "px")
255
- };
256
- if (targetEl.value !== window) {
257
- on(window, 'scroll', setTargetLoop);
258
- }
259
- emit('change', true);
260
- } else if (elOffset.top > props.offsetTop && offsetType.value === 'top' && affix.value) {
261
- affix.value = false;
262
- styles.value = null;
263
- emit('change', false);
264
- }
265
- // Fixed Bottom
266
- if (elOffset.top + props.offsetBottom + elHeight > windowHeight && offsetType.value === 'bottom' && !affix.value) {
267
- affix.value = true;
268
- styles.value = {
269
- bottom: "".concat(window.innerHeight - rect.bottom + props.offsetBottom, "px"),
270
- left: "".concat(rect.left + elOffset.left, "px"),
271
- width: "".concat(affixWidth.value, "px")
272
- };
273
- if (targetEl.value !== window) {
274
- on(window, 'scroll', setTargetLoop);
275
- }
276
- emit('change', true);
277
- } else if (elOffset.top + props.offsetBottom + elHeight < windowHeight && offsetType.value === 'bottom' && affix.value) {
278
- affix.value = false;
279
- styles.value = null;
280
- emit('change', false);
281
- }
282
- };
283
- (0,external_vue_.onBeforeUnmount)(function () {
284
- off(targetEl.value, 'scroll', listenScroll);
285
- off(targetEl.value, 'resize', listenScroll);
286
- off(window, 'scroll', setTargetLoop);
287
- });
288
- return function () {
289
- var _a;
290
- return (0,external_vue_.createVNode)("div", {
291
- "ref": root
292
- }, [(0,external_vue_.createVNode)("div", {
293
- "ref": point,
294
- "class": pointClass.value,
295
- "style": offsetStyles.value
296
- }, [(_a = slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots)])]);
297
- };
298
- }
299
- }));
300
- ;// CONCATENATED MODULE: ../../packages/affix/src/index.ts
301
- /*
302
- * Tencent is pleased to support the open source community by making
303
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
304
- *
305
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
306
- *
307
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
308
- *
309
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
310
- *
311
- * ---------------------------------------------------
312
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
313
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
314
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
315
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
316
- *
317
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
318
- * the Software.
319
- *
320
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
321
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
322
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
323
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
324
- * IN THE SOFTWARE.
325
- */
326
-
327
-
328
- var BkAffix = (0,external_shared_.withInstall)(affix);
329
- /* harmony default export */ const src = (BkAffix);
330
- })();
331
-
332
- /******/ return __webpack_exports__;
333
- /******/ })()
334
- ;
335
- });
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("lodash"));else if("function"==typeof define&&define.amd)define(["../shared","vue","lodash"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("lodash")):t(e["../shared"],e.vue,e.lodash);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,((e,t,o)=>(()=>{"use strict";var n={4212:t=>{t.exports=e},467:e=>{e.exports=o},748:e=>{e.exports=t}},r={};function u(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,u),o.exports}u.d=(e,t)=>{for(var o in t)u.o(t,o)&&!u.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{u.r(l),u.d(l,{default:()=>i});var e=u(4212),t=u(748),o=u(467),n=document.addEventListener?function(e,t,o){e&&t&&o&&e.addEventListener(t,o,!0)}:function(e,t,o){e&&t&&o&&e.attachEvent("on".concat(t),o)},r=document.removeEventListener?function(e,t,o){e&&t&&e.removeEventListener(t,o,!0)}:function(e,t,o){e&&t&&e.detachEvent("on".concat(t),o)};const a=(0,t.defineComponent)({name:"Affix",props:{offsetTop:e.PropTypes.number.def(0),offsetBottom:e.PropTypes.number,target:e.PropTypes.string.def(""),zIndex:e.PropTypes.number.def(1e3)},emits:["change"],setup:function(u,l){var a=l.emit,i=l.slots,f=(0,t.ref)(null),c=(0,t.ref)(null),v=(0,t.ref)(),s=(0,t.ref)({}),d=(0,t.getCurrentInstance)().proxy,p=(0,t.ref)(0),m=(0,t.computed)((function(){return Object.assign(Object.assign({},s.value),{"z-index":u.zIndex})}));(0,t.onMounted)((function(){p.value=d.$el.offsetWidth,v.value=u.target?document.querySelector(u.target):window,n(v.value,"scroll",b),n(v.value,"resize",b),(0,t.nextTick)((function(){y()}))}));var g=(0,t.ref)(!1),w=(0,t.computed)((function(){return(0,e.classes)({"bk-affix":g.value})})),x=(0,t.computed)((function(){return u.offsetBottom>=0?"bottom":"top"})),h=function(){"top"===x.value?s.value={top:"".concat(v.value.getBoundingClientRect().top+u.offsetTop,"px")}:s.value={bottom:"".concat(window.innerHeight-v.value.getBoundingClientRect().bottom+u.offsetBottom,"px")}},b=(0,o.throttle)((function(){y()}),100),y=function(){var e=v.value===window?{top:0,left:0,bottom:window.innerHeight}:v.value.getBoundingClientRect(),t=function(e){var t=e.value.getBoundingClientRect(),o=v.value===window?{top:0,left:0}:v.value.getBoundingClientRect(),n=v.value.clientTop||0,r=v.value.clientLeft||0;return{top:t.top-o.top-n,left:t.left-o.left-r}}(c),o=v.value===window?v.value.innerHeight:v.value.clientHeight,r=f.value.offsetHeight;t.top<u.offsetTop&&"top"===x.value&&!g.value?(g.value=!0,s.value={position:"fixed",top:"".concat(e.top+u.offsetTop,"px"),left:"".concat(e.left+t.left,"px"),width:"".concat(p.value,"px")},v.value!==window&&n(window,"scroll",h),a("change",!0)):t.top>u.offsetTop&&"top"===x.value&&g.value&&(g.value=!1,s.value=null,a("change",!1)),t.top+u.offsetBottom+r>o&&"bottom"===x.value&&!g.value?(g.value=!0,s.value={bottom:"".concat(window.innerHeight-e.bottom+u.offsetBottom,"px"),left:"".concat(e.left+t.left,"px"),width:"".concat(p.value,"px")},v.value!==window&&n(window,"scroll",h),a("change",!0)):t.top+u.offsetBottom+r<o&&"bottom"===x.value&&g.value&&(g.value=!1,s.value=null,a("change",!1))};return(0,t.onBeforeUnmount)((function(){r(v.value,"scroll",b),r(v.value,"resize",b),r(window,"scroll",h)})),function(){var e;return(0,t.createVNode)("div",{ref:c},[(0,t.createVNode)("div",{ref:f,class:w.value,style:m.value},[null===(e=i.default)||void 0===e?void 0:e.call(i)])])}}}),i=(0,e.withInstall)(a)})(),l})()));
@@ -1,276 +1 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory(require("../shared"), require("vue"), require("../icon"));
4
- else if(typeof define === 'function' && define.amd)
5
- define(["../shared", "vue", "../icon"], factory);
6
- else {
7
- var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../icon")) : factory(root["../shared"], root["vue"], root["../icon"]);
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__6870__) => {
11
- return /******/ (() => { // webpackBootstrap
12
- /******/ "use strict";
13
- /******/ var __webpack_modules__ = ({
14
-
15
- /***/ 6870:
16
- /***/ ((module) => {
17
-
18
- module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
19
-
20
- /***/ }),
21
-
22
- /***/ 4212:
23
- /***/ ((module) => {
24
-
25
- module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
26
-
27
- /***/ }),
28
-
29
- /***/ 748:
30
- /***/ ((module) => {
31
-
32
- module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
33
-
34
- /***/ })
35
-
36
- /******/ });
37
- /************************************************************************/
38
- /******/ // The module cache
39
- /******/ var __webpack_module_cache__ = {};
40
- /******/
41
- /******/ // The require function
42
- /******/ function __webpack_require__(moduleId) {
43
- /******/ // Check if module is in cache
44
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
45
- /******/ if (cachedModule !== undefined) {
46
- /******/ return cachedModule.exports;
47
- /******/ }
48
- /******/ // Create a new module (and put it into the cache)
49
- /******/ var module = __webpack_module_cache__[moduleId] = {
50
- /******/ // no module.id needed
51
- /******/ // no module.loaded needed
52
- /******/ exports: {}
53
- /******/ };
54
- /******/
55
- /******/ // Execute the module function
56
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
57
- /******/
58
- /******/ // Return the exports of the module
59
- /******/ return module.exports;
60
- /******/ }
61
- /******/
62
- /************************************************************************/
63
- /******/ /* webpack/runtime/define property getters */
64
- /******/ (() => {
65
- /******/ // define getter functions for harmony exports
66
- /******/ __webpack_require__.d = (exports, definition) => {
67
- /******/ for(var key in definition) {
68
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
69
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
70
- /******/ }
71
- /******/ }
72
- /******/ };
73
- /******/ })();
74
- /******/
75
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
76
- /******/ (() => {
77
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
78
- /******/ })();
79
- /******/
80
- /******/ /* webpack/runtime/make namespace object */
81
- /******/ (() => {
82
- /******/ // define __esModule on exports
83
- /******/ __webpack_require__.r = (exports) => {
84
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
85
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
86
- /******/ }
87
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
88
- /******/ };
89
- /******/ })();
90
- /******/
91
- /************************************************************************/
92
- var __webpack_exports__ = {};
93
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
94
- (() => {
95
- // ESM COMPAT FLAG
96
- __webpack_require__.r(__webpack_exports__);
97
-
98
- // EXPORTS
99
- __webpack_require__.d(__webpack_exports__, {
100
- "default": () => (/* binding */ src)
101
- });
102
-
103
- // EXTERNAL MODULE: external "../shared"
104
- var external_shared_ = __webpack_require__(4212);
105
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
106
- function _typeof(obj) {
107
- "@babel/helpers - typeof";
108
-
109
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
110
- return typeof obj;
111
- } : function (obj) {
112
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
113
- }, _typeof(obj);
114
- }
115
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
116
-
117
- function _toPrimitive(input, hint) {
118
- if (_typeof(input) !== "object" || input === null) return input;
119
- var prim = input[Symbol.toPrimitive];
120
- if (prim !== undefined) {
121
- var res = prim.call(input, hint || "default");
122
- if (_typeof(res) !== "object") return res;
123
- throw new TypeError("@@toPrimitive must return a primitive value.");
124
- }
125
- return (hint === "string" ? String : Number)(input);
126
- }
127
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
128
-
129
-
130
- function _toPropertyKey(arg) {
131
- var key = _toPrimitive(arg, "string");
132
- return _typeof(key) === "symbol" ? key : String(key);
133
- }
134
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
135
-
136
- function _defineProperty(obj, key, value) {
137
- key = _toPropertyKey(key);
138
- if (key in obj) {
139
- Object.defineProperty(obj, key, {
140
- value: value,
141
- enumerable: true,
142
- configurable: true,
143
- writable: true
144
- });
145
- } else {
146
- obj[key] = value;
147
- }
148
- return obj;
149
- }
150
- // EXTERNAL MODULE: external "vue"
151
- var external_vue_ = __webpack_require__(748);
152
- // EXTERNAL MODULE: external "../icon"
153
- var external_icon_ = __webpack_require__(6870);
154
- ;// CONCATENATED MODULE: ../../packages/alert/src/alert.tsx
155
-
156
-
157
- /*
158
- * Tencent is pleased to support the open source community by making
159
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
160
- *
161
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
162
- *
163
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
164
- *
165
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
166
- *
167
- * ---------------------------------------------------
168
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
169
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
170
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
171
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
172
- *
173
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
174
- * the Software.
175
- *
176
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
177
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
178
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
179
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
180
- * IN THE SOFTWARE.
181
- */
182
-
183
-
184
-
185
- /* harmony default export */ const src_alert = ((0,external_vue_.defineComponent)({
186
- name: 'Alert',
187
- props: {
188
- theme: (0,external_shared_.TagThemeType)().def(external_shared_.TagThemeEnum.INFO),
189
- size: external_shared_.PropTypes.string,
190
- title: external_shared_.PropTypes.string,
191
- closable: external_shared_.PropTypes.bool.def(false),
192
- closeText: external_shared_.PropTypes.string,
193
- showIcon: external_shared_.PropTypes.bool.def(true)
194
- },
195
- emits: ['close'],
196
- setup: function setup(_props, context) {
197
- var state = (0,external_vue_.reactive)({
198
- visible: true
199
- });
200
- var handleClose = function handleClose() {
201
- state.visible = false;
202
- context.emit('close');
203
- };
204
- return {
205
- state: state,
206
- handleClose: handleClose
207
- };
208
- },
209
- render: function render() {
210
- var _a, _b;
211
- if (!this.state.visible) {
212
- return null;
213
- }
214
- var renderCloseText = Boolean(this.closeText);
215
- var closeButtonClasses = (0,external_shared_.classes)({
216
- 'bk-alert-close': true,
217
- 'close-text': renderCloseText,
218
- 'bk-alert-close-icon': !renderCloseText
219
- });
220
- var typeClass = (0,external_shared_.classes)(_defineProperty({
221
- 'bk-alert': true
222
- }, "bk-alert-".concat(this.theme), true));
223
- return (0,external_vue_.createVNode)("div", {
224
- "class": typeClass
225
- }, [(0,external_vue_.createVNode)("div", {
226
- "class": "bk-alert-wraper"
227
- }, [this.showIcon && (0,external_vue_.createVNode)(external_icon_.InfoLine, {
228
- "class": "bk-alert-icon-info"
229
- }, null), (0,external_vue_.createVNode)("div", {
230
- "class": "bk-alert-content"
231
- }, [(0,external_vue_.createVNode)("div", {
232
- "class": "bk-alert-title"
233
- }, [this.$slots.title ? this.$slots.title() : this.title]), (0,external_vue_.createVNode)("div", {
234
- "class": "bk-alert-description"
235
- }, [(_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)])]), this.closable && (0,external_vue_.createVNode)("span", {
236
- "class": closeButtonClasses,
237
- "onClick": this.handleClose
238
- }, [this.closeText ? this.closeText : (0,external_vue_.createVNode)(external_icon_.CloseLine, null, null)])])]);
239
- }
240
- }));
241
- ;// CONCATENATED MODULE: ../../packages/alert/src/index.ts
242
- /*
243
- * Tencent is pleased to support the open source community by making
244
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
245
- *
246
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
247
- *
248
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
249
- *
250
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
251
- *
252
- * ---------------------------------------------------
253
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
254
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
255
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
256
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
257
- *
258
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
259
- * the Software.
260
- *
261
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
262
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
263
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
264
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
265
- * IN THE SOFTWARE.
266
- */
267
-
268
-
269
- var BkAlert = (0,external_shared_.withInstall)(src_alert);
270
- /* harmony default export */ const src = (BkAlert);
271
- })();
272
-
273
- /******/ return __webpack_exports__;
274
- /******/ })()
275
- ;
276
- });
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../icon"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../icon")):t(e["../shared"],e.vue,e["../icon"]);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,((e,t,r)=>(()=>{"use strict";var o={6870:e=>{e.exports=r},4212:t=>{t.exports=e},748:e=>{e.exports=t}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,s),r.exports}s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{s.r(l),s.d(l,{default:()=>n});var e=s(4212);function t(e){return t="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},t(e)}var r=s(748),o=s(6870);const i=(0,r.defineComponent)({name:"Alert",props:{theme:(0,e.TagThemeType)().def(e.TagThemeEnum.INFO),size:e.PropTypes.string,title:e.PropTypes.string,closable:e.PropTypes.bool.def(!1),closeText:e.PropTypes.string,showIcon:e.PropTypes.bool.def(!0)},emits:["close"],setup:function(e,t){var o=(0,r.reactive)({visible:!0});return{state:o,handleClose:function(){o.visible=!1,t.emit("close")}}},render:function(){var i,s;if(!this.state.visible)return null;var l,n,a=Boolean(this.closeText),c=(0,e.classes)({"bk-alert-close":!0,"close-text":a,"bk-alert-close-icon":!a}),u=(0,e.classes)((l={"bk-alert":!0},!0,(n=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,"string");if("object"!==t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(r)?r:String(r)}(n="bk-alert-".concat(this.theme)))in l?Object.defineProperty(l,n,{value:true,enumerable:!0,configurable:!0,writable:!0}):l[n]=true,l));return(0,r.createVNode)("div",{class:u},[(0,r.createVNode)("div",{class:"bk-alert-wraper"},[this.showIcon&&(0,r.createVNode)(o.InfoLine,{class:"bk-alert-icon-info"},null),(0,r.createVNode)("div",{class:"bk-alert-content"},[(0,r.createVNode)("div",{class:"bk-alert-title"},[this.$slots.title?this.$slots.title():this.title]),(0,r.createVNode)("div",{class:"bk-alert-description"},[null===(s=(i=this.$slots).default)||void 0===s?void 0:s.call(i)])]),this.closable&&(0,r.createVNode)("span",{class:c,onClick:this.handleClose},[this.closeText?this.closeText:(0,r.createVNode)(o.CloseLine,null,null)])])])}}),n=(0,e.withInstall)(i)})(),l})()));