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
@@ -1,1291 +1,2 @@
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
- import * as __WEBPACK_EXTERNAL_MODULE__input_752b0149__ from "../input";
5
- import * as __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__ from "../popover";
6
- /******/ var __webpack_modules__ = ({
7
-
8
- /***/ 7609:
9
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10
-
11
- var _typeof = (__webpack_require__(7425)["default"]);
12
- function _regeneratorRuntime() {
13
- "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
14
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
15
- return exports;
16
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
17
- var exports = {},
18
- Op = Object.prototype,
19
- hasOwn = Op.hasOwnProperty,
20
- defineProperty = Object.defineProperty || function (obj, key, desc) {
21
- obj[key] = desc.value;
22
- },
23
- $Symbol = "function" == typeof Symbol ? Symbol : {},
24
- iteratorSymbol = $Symbol.iterator || "@@iterator",
25
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
26
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
27
- function define(obj, key, value) {
28
- return Object.defineProperty(obj, key, {
29
- value: value,
30
- enumerable: !0,
31
- configurable: !0,
32
- writable: !0
33
- }), obj[key];
34
- }
35
- try {
36
- define({}, "");
37
- } catch (err) {
38
- define = function define(obj, key, value) {
39
- return obj[key] = value;
40
- };
41
- }
42
- function wrap(innerFn, outerFn, self, tryLocsList) {
43
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
44
- generator = Object.create(protoGenerator.prototype),
45
- context = new Context(tryLocsList || []);
46
- return defineProperty(generator, "_invoke", {
47
- value: makeInvokeMethod(innerFn, self, context)
48
- }), generator;
49
- }
50
- function tryCatch(fn, obj, arg) {
51
- try {
52
- return {
53
- type: "normal",
54
- arg: fn.call(obj, arg)
55
- };
56
- } catch (err) {
57
- return {
58
- type: "throw",
59
- arg: err
60
- };
61
- }
62
- }
63
- exports.wrap = wrap;
64
- var ContinueSentinel = {};
65
- function Generator() {}
66
- function GeneratorFunction() {}
67
- function GeneratorFunctionPrototype() {}
68
- var IteratorPrototype = {};
69
- define(IteratorPrototype, iteratorSymbol, function () {
70
- return this;
71
- });
72
- var getProto = Object.getPrototypeOf,
73
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
74
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
75
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
76
- function defineIteratorMethods(prototype) {
77
- ["next", "throw", "return"].forEach(function (method) {
78
- define(prototype, method, function (arg) {
79
- return this._invoke(method, arg);
80
- });
81
- });
82
- }
83
- function AsyncIterator(generator, PromiseImpl) {
84
- function invoke(method, arg, resolve, reject) {
85
- var record = tryCatch(generator[method], generator, arg);
86
- if ("throw" !== record.type) {
87
- var result = record.arg,
88
- value = result.value;
89
- return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
90
- invoke("next", value, resolve, reject);
91
- }, function (err) {
92
- invoke("throw", err, resolve, reject);
93
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
94
- result.value = unwrapped, resolve(result);
95
- }, function (error) {
96
- return invoke("throw", error, resolve, reject);
97
- });
98
- }
99
- reject(record.arg);
100
- }
101
- var previousPromise;
102
- defineProperty(this, "_invoke", {
103
- value: function value(method, arg) {
104
- function callInvokeWithMethodAndArg() {
105
- return new PromiseImpl(function (resolve, reject) {
106
- invoke(method, arg, resolve, reject);
107
- });
108
- }
109
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
110
- }
111
- });
112
- }
113
- function makeInvokeMethod(innerFn, self, context) {
114
- var state = "suspendedStart";
115
- return function (method, arg) {
116
- if ("executing" === state) throw new Error("Generator is already running");
117
- if ("completed" === state) {
118
- if ("throw" === method) throw arg;
119
- return doneResult();
120
- }
121
- for (context.method = method, context.arg = arg;;) {
122
- var delegate = context.delegate;
123
- if (delegate) {
124
- var delegateResult = maybeInvokeDelegate(delegate, context);
125
- if (delegateResult) {
126
- if (delegateResult === ContinueSentinel) continue;
127
- return delegateResult;
128
- }
129
- }
130
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
131
- if ("suspendedStart" === state) throw state = "completed", context.arg;
132
- context.dispatchException(context.arg);
133
- } else "return" === context.method && context.abrupt("return", context.arg);
134
- state = "executing";
135
- var record = tryCatch(innerFn, self, context);
136
- if ("normal" === record.type) {
137
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
138
- return {
139
- value: record.arg,
140
- done: context.done
141
- };
142
- }
143
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
144
- }
145
- };
146
- }
147
- function maybeInvokeDelegate(delegate, context) {
148
- var methodName = context.method,
149
- method = delegate.iterator[methodName];
150
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
151
- var record = tryCatch(method, delegate.iterator, context.arg);
152
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
153
- var info = record.arg;
154
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
155
- }
156
- function pushTryEntry(locs) {
157
- var entry = {
158
- tryLoc: locs[0]
159
- };
160
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
161
- }
162
- function resetTryEntry(entry) {
163
- var record = entry.completion || {};
164
- record.type = "normal", delete record.arg, entry.completion = record;
165
- }
166
- function Context(tryLocsList) {
167
- this.tryEntries = [{
168
- tryLoc: "root"
169
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
170
- }
171
- function values(iterable) {
172
- if (iterable) {
173
- var iteratorMethod = iterable[iteratorSymbol];
174
- if (iteratorMethod) return iteratorMethod.call(iterable);
175
- if ("function" == typeof iterable.next) return iterable;
176
- if (!isNaN(iterable.length)) {
177
- var i = -1,
178
- next = function next() {
179
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
180
- return next.value = undefined, next.done = !0, next;
181
- };
182
- return next.next = next;
183
- }
184
- }
185
- return {
186
- next: doneResult
187
- };
188
- }
189
- function doneResult() {
190
- return {
191
- value: undefined,
192
- done: !0
193
- };
194
- }
195
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
196
- value: GeneratorFunctionPrototype,
197
- configurable: !0
198
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
199
- value: GeneratorFunction,
200
- configurable: !0
201
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
202
- var ctor = "function" == typeof genFun && genFun.constructor;
203
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
204
- }, exports.mark = function (genFun) {
205
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
206
- }, exports.awrap = function (arg) {
207
- return {
208
- __await: arg
209
- };
210
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
211
- return this;
212
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
213
- void 0 === PromiseImpl && (PromiseImpl = Promise);
214
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
215
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
216
- return result.done ? result.value : iter.next();
217
- });
218
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
219
- return this;
220
- }), define(Gp, "toString", function () {
221
- return "[object Generator]";
222
- }), exports.keys = function (val) {
223
- var object = Object(val),
224
- keys = [];
225
- for (var key in object) keys.push(key);
226
- return keys.reverse(), function next() {
227
- for (; keys.length;) {
228
- var key = keys.pop();
229
- if (key in object) return next.value = key, next.done = !1, next;
230
- }
231
- return next.done = !0, next;
232
- };
233
- }, exports.values = values, Context.prototype = {
234
- constructor: Context,
235
- reset: function reset(skipTempReset) {
236
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
237
- },
238
- stop: function stop() {
239
- this.done = !0;
240
- var rootRecord = this.tryEntries[0].completion;
241
- if ("throw" === rootRecord.type) throw rootRecord.arg;
242
- return this.rval;
243
- },
244
- dispatchException: function dispatchException(exception) {
245
- if (this.done) throw exception;
246
- var context = this;
247
- function handle(loc, caught) {
248
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
249
- }
250
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
251
- var entry = this.tryEntries[i],
252
- record = entry.completion;
253
- if ("root" === entry.tryLoc) return handle("end");
254
- if (entry.tryLoc <= this.prev) {
255
- var hasCatch = hasOwn.call(entry, "catchLoc"),
256
- hasFinally = hasOwn.call(entry, "finallyLoc");
257
- if (hasCatch && hasFinally) {
258
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
259
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
260
- } else if (hasCatch) {
261
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
262
- } else {
263
- if (!hasFinally) throw new Error("try statement without catch or finally");
264
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
265
- }
266
- }
267
- }
268
- },
269
- abrupt: function abrupt(type, arg) {
270
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
271
- var entry = this.tryEntries[i];
272
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
273
- var finallyEntry = entry;
274
- break;
275
- }
276
- }
277
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
278
- var record = finallyEntry ? finallyEntry.completion : {};
279
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
280
- },
281
- complete: function complete(record, afterLoc) {
282
- if ("throw" === record.type) throw record.arg;
283
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
284
- },
285
- finish: function finish(finallyLoc) {
286
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
287
- var entry = this.tryEntries[i];
288
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
289
- }
290
- },
291
- "catch": function _catch(tryLoc) {
292
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
293
- var entry = this.tryEntries[i];
294
- if (entry.tryLoc === tryLoc) {
295
- var record = entry.completion;
296
- if ("throw" === record.type) {
297
- var thrown = record.arg;
298
- resetTryEntry(entry);
299
- }
300
- return thrown;
301
- }
302
- }
303
- throw new Error("illegal catch attempt");
304
- },
305
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
306
- return this.delegate = {
307
- iterator: values(iterable),
308
- resultName: resultName,
309
- nextLoc: nextLoc
310
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
311
- }
312
- }, exports;
313
- }
314
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
315
-
316
- /***/ }),
317
-
318
- /***/ 7425:
319
- /***/ ((module) => {
320
-
321
- function _typeof(obj) {
322
- "@babel/helpers - typeof";
323
-
324
- return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
325
- return typeof obj;
326
- } : function (obj) {
327
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
328
- }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
329
- }
330
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
331
-
332
- /***/ }),
333
-
334
- /***/ 2841:
335
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
336
-
337
- // TODO(Babel 8): Remove this file.
338
-
339
- var runtime = __webpack_require__(7609)();
340
- module.exports = runtime;
341
-
342
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
343
- try {
344
- regeneratorRuntime = runtime;
345
- } catch (accidentalStrictMode) {
346
- if (typeof globalThis === "object") {
347
- globalThis.regeneratorRuntime = runtime;
348
- } else {
349
- Function("r", "regeneratorRuntime = r")(runtime);
350
- }
351
- }
352
-
353
-
354
- /***/ })
355
-
356
- /******/ });
357
- /************************************************************************/
358
- /******/ // The module cache
359
- /******/ var __webpack_module_cache__ = {};
360
- /******/
361
- /******/ // The require function
362
- /******/ function __webpack_require__(moduleId) {
363
- /******/ // Check if module is in cache
364
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
365
- /******/ if (cachedModule !== undefined) {
366
- /******/ return cachedModule.exports;
367
- /******/ }
368
- /******/ // Create a new module (and put it into the cache)
369
- /******/ var module = __webpack_module_cache__[moduleId] = {
370
- /******/ // no module.id needed
371
- /******/ // no module.loaded needed
372
- /******/ exports: {}
373
- /******/ };
374
- /******/
375
- /******/ // Execute the module function
376
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
377
- /******/
378
- /******/ // Return the exports of the module
379
- /******/ return module.exports;
380
- /******/ }
381
- /******/
382
- /************************************************************************/
383
- /******/ /* webpack/runtime/compat get default export */
384
- /******/ (() => {
385
- /******/ // getDefaultExport function for compatibility with non-harmony modules
386
- /******/ __webpack_require__.n = (module) => {
387
- /******/ var getter = module && module.__esModule ?
388
- /******/ () => (module['default']) :
389
- /******/ () => (module);
390
- /******/ __webpack_require__.d(getter, { a: getter });
391
- /******/ return getter;
392
- /******/ };
393
- /******/ })();
394
- /******/
395
- /******/ /* webpack/runtime/define property getters */
396
- /******/ (() => {
397
- /******/ // define getter functions for harmony exports
398
- /******/ __webpack_require__.d = (exports, definition) => {
399
- /******/ for(var key in definition) {
400
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
401
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
402
- /******/ }
403
- /******/ }
404
- /******/ };
405
- /******/ })();
406
- /******/
407
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
408
- /******/ (() => {
409
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
410
- /******/ })();
411
- /******/
412
- /************************************************************************/
413
- var __webpack_exports__ = {};
414
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
415
- (() => {
416
-
417
- // EXPORTS
418
- __webpack_require__.d(__webpack_exports__, {
419
- Z: () => (/* binding */ src)
420
- });
421
-
422
- ;// CONCATENATED MODULE: external "../shared"
423
- var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
424
- var y = x => () => x
425
- const external_shared_namespaceObject = x({ ["PlacementEnum"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PlacementEnum, ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
426
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
427
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
428
- try {
429
- var info = gen[key](arg);
430
- var value = info.value;
431
- } catch (error) {
432
- reject(error);
433
- return;
434
- }
435
- if (info.done) {
436
- resolve(value);
437
- } else {
438
- Promise.resolve(value).then(_next, _throw);
439
- }
440
- }
441
- function _asyncToGenerator(fn) {
442
- return function () {
443
- var self = this,
444
- args = arguments;
445
- return new Promise(function (resolve, reject) {
446
- var gen = fn.apply(self, args);
447
- function _next(value) {
448
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
449
- }
450
- function _throw(err) {
451
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
452
- }
453
- _next(undefined);
454
- });
455
- };
456
- }
457
- ;// CONCATENATED MODULE: external "vue"
458
- var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
459
- var external_vue_y = x => () => x
460
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
461
- // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
462
- var regenerator = __webpack_require__(2841);
463
- var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
464
- ;// CONCATENATED MODULE: external "../config-provider"
465
- var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
466
- var external_config_provider_y = x => () => x
467
- const external_config_provider_namespaceObject = external_config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
468
- ;// CONCATENATED MODULE: external "../input"
469
- var external_input_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
470
- var external_input_y = x => () => x
471
- const external_input_namespaceObject = external_input_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__input_752b0149__["default"] });
472
- ;// CONCATENATED MODULE: external "../popover"
473
- var external_popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
474
- var external_popover_y = x => () => x
475
- const external_popover_namespaceObject = external_popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__["default"] });
476
- ;// CONCATENATED MODULE: ../../packages/slider/src/slider-button.tsx
477
-
478
- /**
479
- * Tencent is pleased to support the open source community by making
480
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
481
- *
482
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
483
- *
484
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
485
- *
486
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
487
- *
488
- * ---------------------------------------------------
489
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
490
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
491
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
492
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
493
- *
494
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
495
- * the Software.
496
- *
497
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
498
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
499
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
500
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
501
- * IN THE SOFTWARE.
502
- */
503
-
504
-
505
-
506
-
507
-
508
- /* harmony default export */ const slider_button = ((0,external_vue_namespaceObject.defineComponent)({
509
- name: 'SliderButton',
510
- props: {
511
- modelValue: {
512
- type: Number,
513
- "default": 0
514
- },
515
- params: {
516
- type: Object,
517
- "default": function _default() {
518
- return {};
519
- }
520
- }
521
- },
522
- emits: ['emitChange', 'resetSize', 'update:modelValue'],
523
- setup: function setup(props, _ref) {
524
- var emit = _ref.emit;
525
- var dragging = (0,external_vue_namespaceObject.ref)(false);
526
- var isClick = (0,external_vue_namespaceObject.ref)(false);
527
- var startY = (0,external_vue_namespaceObject.ref)(0);
528
- var startX = (0,external_vue_namespaceObject.ref)(0);
529
- var startPosition = (0,external_vue_namespaceObject.ref)(0);
530
- var newPosition = (0,external_vue_namespaceObject.ref)(null);
531
- var oldValue = (0,external_vue_namespaceObject.ref)(props.modelValue);
532
- var currentY = (0,external_vue_namespaceObject.ref)(0);
533
- var currentX = (0,external_vue_namespaceObject.ref)(0);
534
- var isMove = (0,external_vue_namespaceObject.ref)(false);
535
- var button = (0,external_vue_namespaceObject.ref)(null);
536
- var tip = (0,external_vue_namespaceObject.computed)(function () {
537
- var _props$params$customC, _props$params;
538
- var tip = '';
539
- if ((_props$params$customC = props.params.customContent) !== null && _props$params$customC !== void 0 && _props$params$customC[props.modelValue]) {
540
- var customContent = props.params.customContent[props.modelValue];
541
- tip = customContent.tip || customContent.label || '';
542
- }
543
- var placement = props.params.vertical ? external_shared_namespaceObject.PlacementEnum.RIGHT : external_shared_namespaceObject.PlacementEnum.TOP;
544
- if ((_props$params = props.params) !== null && _props$params !== void 0 && _props$params.showTip) {
545
- return {
546
- content: props.params.formatterTipLabel("".concat(tip || (props === null || props === void 0 ? void 0 : props.modelValue) || '0')),
547
- placement: placement
548
- };
549
- }
550
- return {
551
- content: '',
552
- placement: placement
553
- };
554
- });
555
- var currentPosition = (0,external_vue_namespaceObject.computed)(function () {
556
- return "".concat((props.modelValue - props.params.minValue) / (props.params.maxValue - props.params.minValue) * 100, "%");
557
- });
558
- var wrapperStyle = (0,external_vue_namespaceObject.computed)(function () {
559
- return props.params.vertical ? {
560
- bottom: currentPosition.value
561
- } : {
562
- left: currentPosition.value
563
- };
564
- });
565
- var buttonLabel = (0,external_vue_namespaceObject.computed)(function () {
566
- return props.params.formatterButtonLabel(props.modelValue);
567
- });
568
- var onButtonDown = function onButtonDown(event) {
569
- if (props.params.disable) return;
570
- event.preventDefault();
571
- onDragStart(event);
572
- on(window, 'mousemove', onDragging);
573
- on(window, 'touchmove', onDragging);
574
- on(window, 'mouseup', onDragEnd);
575
- on(window, 'touchend', onDragEnd);
576
- };
577
- var onDragStart = function onDragStart(event) {
578
- dragging.value = true;
579
- isClick.value = true;
580
- if (props.params.vertical) {
581
- startY.value = event.clientY;
582
- } else {
583
- startX.value = event.clientX;
584
- }
585
- startPosition.value = parseFloat(currentPosition.value);
586
- newPosition.value = startPosition.value;
587
- };
588
- var onDragging = function onDragging(event) {
589
- if (dragging.value) {
590
- isClick.value = false;
591
- emit('resetSize');
592
- var diff = 0;
593
- if (props.params.vertical) {
594
- currentY.value = event.clientY;
595
- diff = (startY.value - currentY.value) / props.params.sliderSize * 100;
596
- } else {
597
- currentX.value = event.clientX;
598
- diff = (currentX.value - startX.value) / props.params.sliderSize * 100;
599
- }
600
- newPosition.value = startPosition.value + diff;
601
- setPosition(newPosition.value);
602
- }
603
- };
604
- var onDragEnd = function onDragEnd() {
605
- isMove.value = false;
606
- if (dragging.value) {
607
- setTimeout(function () {
608
- dragging.value = false;
609
- if (!isClick.value) {
610
- setPosition(newPosition.value);
611
- emit('emitChange');
612
- }
613
- }, 0);
614
- off(window, 'mousemove', onDragging);
615
- off(window, 'touchmove', onDragging);
616
- off(window, 'mouseup', onDragEnd);
617
- off(window, 'touchend', onDragEnd);
618
- }
619
- };
620
- var setPosition = function setPosition(position) {
621
- if (position === null || isNaN(position)) return;
622
- if (position < 0) {
623
- newPosition.value = 0;
624
- } else if (position > 100) {
625
- newPosition.value = 100;
626
- }
627
- var lengthPerStep = 100 / ((props.params.maxValue - props.params.minValue) / props.params.step);
628
- var steps = Math.round(position / lengthPerStep);
629
- var value = steps * lengthPerStep * (props.params.maxValue - props.params.minValue) * 0.01 + props.params.minValue;
630
- value = parseFloat(value.toFixed(props.params.precision));
631
- emit('update:modelValue', value);
632
- if (!dragging.value && props.modelValue !== oldValue.value) {
633
- oldValue.value = props.modelValue;
634
- }
635
- };
636
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
637
- resolveClassName = _usePrefix.resolveClassName;
638
- var renderDom = function renderDom() {
639
- return (0,external_vue_namespaceObject.createVNode)("div", {
640
- "class": ["".concat(resolveClassName('slider-button')), props.params.vertical ? 'vertical' : 'horizontal', {
641
- grabbing: dragging.value
642
- }],
643
- "ref": button,
644
- "tabindex": "0",
645
- "style": wrapperStyle.value,
646
- "onClick": function onClick(event) {
647
- return event.stopPropagation();
648
- },
649
- "onMousedown": onButtonDown
650
- }, [Boolean(tip.value.content) ? (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(external_popover_namespaceObject["default"], {
651
- "content": tip.value.content,
652
- "theme": 'dark',
653
- "placement": tip.value.placement,
654
- "boundary": document.body
655
- }, {
656
- "default": function _default() {
657
- return [(0,external_vue_namespaceObject.createVNode)("div", {
658
- "class": ['slider-button', {
659
- 'slider-button-disable': props.params.disable
660
- }]
661
- }, null)];
662
- }
663
- })]) : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("div", {
664
- "class": ['slider-button', {
665
- 'slider-button-disable': props.params.disable
666
- }]
667
- }, null)]), props.params.showButtonLabel && !props.params.showIntervalLabel ? (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("div", {
668
- "class": ['slider-button-label', props.params.vertical ? 'vertical' : 'horizontal']
669
- }, [buttonLabel.value])]) : null]);
670
- };
671
- return {
672
- renderDom: renderDom,
673
- setPosition: setPosition,
674
- tip: tip
675
- };
676
- },
677
- render: function render() {
678
- return this.renderDom();
679
- }
680
- }));
681
- ;// CONCATENATED MODULE: ../../packages/slider/src/slider.tsx
682
-
683
-
684
-
685
- /**
686
- * Tencent is pleased to support the open source community by making
687
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
688
- *
689
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
690
- *
691
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
692
- *
693
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
694
- *
695
- * ---------------------------------------------------
696
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
697
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
698
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
699
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
700
- *
701
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
702
- * the Software.
703
- *
704
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
705
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
706
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
707
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
708
- * IN THE SOFTWARE.
709
- */
710
-
711
-
712
-
713
-
714
-
715
- var on = function on(element, event, handler) {
716
- if (element && event && handler) {
717
- element.addEventListener(event, handler, false);
718
- }
719
- };
720
- var off = function off(element, event, handler) {
721
- if (element && event && handler) {
722
- element.removeEventListener(event, handler, false);
723
- }
724
- };
725
- /* harmony default export */ const slider = ((0,external_vue_namespaceObject.defineComponent)({
726
- name: 'Slider',
727
- props: {
728
- modelValue: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.arrayOf(external_shared_namespaceObject.PropTypes.number), external_shared_namespaceObject.PropTypes.number]),
729
- extCls: {
730
- type: String,
731
- "default": ''
732
- },
733
- vertical: {
734
- type: Boolean,
735
- "default": false
736
- },
737
- height: {
738
- type: String,
739
- "default": '200px'
740
- },
741
- disable: {
742
- type: Boolean,
743
- "default": false
744
- },
745
- showTip: {
746
- type: Boolean,
747
- "default": false
748
- },
749
- maxValue: {
750
- type: [Number],
751
- "default": 100
752
- },
753
- minValue: {
754
- type: [Number],
755
- "default": 0
756
- },
757
- step: {
758
- type: [Number],
759
- "default": 1
760
- },
761
- range: {
762
- type: Boolean,
763
- "default": false
764
- },
765
- showInterval: {
766
- type: Boolean,
767
- "default": false
768
- },
769
- showIntervalLabel: {
770
- type: Boolean,
771
- "default": false
772
- },
773
- showButtonLabel: {
774
- type: Boolean,
775
- "default": false
776
- },
777
- showBetweenLabel: {
778
- type: Boolean,
779
- "default": false
780
- },
781
- showInput: {
782
- type: Boolean,
783
- "default": false
784
- },
785
- customContent: {
786
- type: Object,
787
- "default": null
788
- },
789
- formatterLabel: {
790
- type: Function,
791
- "default": function _default(value) {
792
- return value;
793
- }
794
- },
795
- formatterButtonLabel: {
796
- type: Function,
797
- "default": function _default(value) {
798
- return value;
799
- }
800
- },
801
- formatterTipLabel: {
802
- type: Function,
803
- "default": function _default(value) {
804
- return value;
805
- }
806
- } // 自定义tip格式
807
- },
808
-
809
- emits: ['update:modelValue', 'change'],
810
- setup: function setup(props, _ref) {
811
- var slots = _ref.slots,
812
- emit = _ref.emit;
813
- /* 滑动选择器长度 */
814
- var sliderSize = (0,external_vue_namespaceObject.ref)(1);
815
- /* 第一个滑块与第二个滑块的值 */
816
- var firstValue = (0,external_vue_namespaceObject.ref)(null);
817
- var secondValue = (0,external_vue_namespaceObject.ref)(null);
818
- var oldValue = (0,external_vue_namespaceObject.ref)(null);
819
- /* 第一个输入框与第二个输入框的值 */
820
- var firstInput = (0,external_vue_namespaceObject.ref)(0);
821
- var secondInput = (0,external_vue_namespaceObject.ref)(0);
822
- /* 以下为refDom */
823
- var slider = (0,external_vue_namespaceObject.ref)(null);
824
- var firstbutton = (0,external_vue_namespaceObject.ref)(null);
825
- var secondbutton = (0,external_vue_namespaceObject.ref)(null);
826
- var curButtonRef = (0,external_vue_namespaceObject.ref)(null);
827
- // 小数点后最大位数
828
- var precision = (0,external_vue_namespaceObject.computed)(function () {
829
- var precisions = [props.minValue, props.maxValue, props.step].map(function (item) {
830
- var decimal = "".concat(item).split('.')[1];
831
- return decimal ? decimal.length : 0;
832
- });
833
- return Math.max.apply(null, precisions);
834
- });
835
- /* 当前滑块的最小值与最大值 */
836
- var rangeMinValue = (0,external_vue_namespaceObject.computed)(function () {
837
- return Math.min(firstValue.value, secondValue.value);
838
- });
839
- var rangeMaxValue = (0,external_vue_namespaceObject.computed)(function () {
840
- return Math.max(firstValue.value, secondValue.value);
841
- });
842
- var barSize = (0,external_vue_namespaceObject.computed)(function () {
843
- return props.range ? "".concat(100 * (rangeMaxValue.value - rangeMinValue.value) / (props.maxValue - props.minValue), "%") : "".concat(100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue), "%");
844
- });
845
- var barStart = (0,external_vue_namespaceObject.computed)(function () {
846
- return props.range ? "".concat(100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue), "%") : '0%';
847
- });
848
- /* 当前滑动区域的位置与长度 */
849
- var barStyle = (0,external_vue_namespaceObject.computed)(function () {
850
- return props.vertical ? {
851
- height: barSize.value,
852
- bottom: barStart.value
853
- } : {
854
- width: barSize.value,
855
- left: barStart.value
856
- };
857
- });
858
- /* 断点 */
859
- var intervals = (0,external_vue_namespaceObject.computed)(function () {
860
- if (!props.showInterval || props.minValue > props.maxValue) return [];
861
- if (props.step === 0) {
862
- console.warn('WARNNING:step should not be 0');
863
- return [];
864
- }
865
- var stopCount = (props.maxValue - props.minValue) / props.step;
866
- var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
867
- var result = [];
868
- for (var i = 1; i < stopCount; i++) {
869
- result.push(i * stepWidth);
870
- }
871
- if (props.range) {
872
- // eslint-disable-next-line max-len
873
- return result.filter(function (step) {
874
- return step < 100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue) || step > 100 * (rangeMaxValue.value - props.minValue) / (props.maxValue - props.minValue);
875
- });
876
- }
877
- // eslint-disable-next-line max-len
878
- return result.filter(function (step) {
879
- return step > 100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue);
880
- });
881
- });
882
- /* 可滑动区域的样式 */
883
- var runwayStyle = (0,external_vue_namespaceObject.computed)(function () {
884
- return props.vertical ? {
885
- height: props.height,
886
- width: '4px'
887
- } : {};
888
- });
889
- /* 断点下方的文案 */
890
- var intervalLabels = (0,external_vue_namespaceObject.computed)(function () {
891
- if (!props.showIntervalLabel) return [];
892
- if (props.step === 0) {
893
- console.warn('WARNNING:step should not be 0');
894
- return [];
895
- }
896
- var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
897
- var result = [];
898
- for (var i = props.minValue, j = 0; i <= props.maxValue; i += props.step, j++) {
899
- var item = {
900
- stepWidth: j * stepWidth,
901
- stepLabel: props.formatterLabel(i)
902
- };
903
- result.push(item);
904
- }
905
- return result;
906
- });
907
- /* 是否显示第二个输入框 */
908
- var showSecondInput = (0,external_vue_namespaceObject.computed)(function () {
909
- return Array.isArray(props.modelValue);
910
- });
911
- /* 自定义断点 */
912
- var customList = (0,external_vue_namespaceObject.computed)(function () {
913
- if (!props.customContent) {
914
- return [];
915
- }
916
- return Object.keys(props.customContent).sort(function (a, b) {
917
- return Number(a) - Number(b);
918
- }).filter(function (value) {
919
- return Number(value) >= props.minValue && Number(value) <= props.maxValue;
920
- }).map(function (item) {
921
- var tip = props.customContent[item].tip;
922
- var label = props.customContent[item].label;
923
- return {
924
- tip: tip || label || '',
925
- label: label || '',
926
- percent: (Number(item) - props.minValue) / (props.maxValue - props.minValue) * 100
927
- };
928
- });
929
- });
930
- /* 传入到滑块的参数 */
931
- var buttonParms = (0,external_vue_namespaceObject.computed)(function () {
932
- return {
933
- vertical: props.vertical,
934
- showTip: props.showTip,
935
- disable: props.disable,
936
- maxValue: props.maxValue,
937
- minValue: props.minValue,
938
- step: props.step,
939
- precision: precision.value,
940
- showButtonLabel: props.showButtonLabel,
941
- formatterButtonLabel: props.formatterButtonLabel,
942
- showIntervalLabel: props.showIntervalLabel,
943
- customContent: props.customContent,
944
- sliderSize: sliderSize.value,
945
- formatterTipLabel: props.formatterTipLabel
946
- };
947
- });
948
- // 监听
949
- (0,external_vue_namespaceObject.watch)(function () {
950
- return props.modelValue;
951
- }, function () {
952
- setValues();
953
- });
954
- (0,external_vue_namespaceObject.watch)(function () {
955
- return firstValue.value;
956
- }, function (val) {
957
- if (props.range) {
958
- emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
959
- } else {
960
- emit('update:modelValue', val);
961
- }
962
- firstInput.value = val;
963
- });
964
- (0,external_vue_namespaceObject.watch)(function () {
965
- return secondValue.value;
966
- }, function (val) {
967
- emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
968
- secondInput.value = val;
969
- });
970
- /* 初始化 */
971
- (0,external_vue_namespaceObject.onMounted)(function () {
972
- if (props.range) {
973
- if (Array.isArray(props.modelValue)) {
974
- firstValue.value = Math.max(props.minValue, Number(props.modelValue[0]));
975
- secondValue.value = Math.min(props.maxValue, Number(props.modelValue[1]));
976
- } else {
977
- firstValue.value = props.minValue;
978
- secondValue.value = props.maxValue;
979
- }
980
- oldValue.value = [firstValue.value, secondValue.value];
981
- } else {
982
- if (typeof props.modelValue !== 'number' || isNaN(props.modelValue)) {
983
- firstValue.value = props.minValue;
984
- } else {
985
- firstValue.value = Math.min(props.maxValue, Math.max(props.minValue, props.modelValue));
986
- }
987
- oldValue.value = firstValue.value;
988
- }
989
- resetSize();
990
- on(window, 'resize', resetSize());
991
- });
992
- var resetSize = function resetSize() {
993
- if (slider.value) {
994
- sliderSize.value = slider.value["client".concat(props.vertical ? 'Height' : 'Width')];
995
- }
996
- };
997
- /* 点击容器时设置滑块位置 */
998
- var setButtonPos = function setButtonPos(event) {
999
- event.stopPropagation();
1000
- if (props.disable) return;
1001
- resetSize();
1002
- if (props.vertical) {
1003
- var _slider$value;
1004
- var offsetBottom = (_slider$value = slider.value) === null || _slider$value === void 0 ? void 0 : _slider$value.getBoundingClientRect().bottom;
1005
- setPosition((offsetBottom - event.clientY) / sliderSize.value * 100);
1006
- } else {
1007
- var _slider$value2;
1008
- var offsetLeft = (_slider$value2 = slider.value) === null || _slider$value2 === void 0 ? void 0 : _slider$value2.getBoundingClientRect().left;
1009
- setPosition((event.clientX - offsetLeft) / sliderSize.value * 100);
1010
- }
1011
- emitChange();
1012
- };
1013
- /* 是否更改了值 */
1014
- var valueChanged = function valueChanged() {
1015
- if (props.range) {
1016
- return ![rangeMinValue.value, rangeMaxValue.value].every(function (item, index) {
1017
- return item === oldValue.value[index];
1018
- });
1019
- }
1020
- return props.modelValue !== oldValue.value;
1021
- };
1022
- /* emit */
1023
- var setValues = function setValues() {
1024
- if (props.minValue > props.maxValue) {
1025
- console.error('min should not be greater than max.');
1026
- return;
1027
- }
1028
- var val = props.modelValue;
1029
- if (props.range && Array.isArray(val)) {
1030
- if (val[1] < props.minValue) {
1031
- emit('update:modelValue', [props.minValue, props.minValue]);
1032
- } else if (val[0] > props.maxValue) {
1033
- emit('update:modelValue', [props.maxValue, props.maxValue]);
1034
- } else if (val[0] < props.minValue) {
1035
- emit('update:modelValue', [props.minValue, val[1]]);
1036
- } else if (val[1] > props.maxValue) {
1037
- emit('update:modelValue', [val[0], props.maxValue]);
1038
- } else {
1039
- firstValue.value = Number(val[0]);
1040
- secondValue.value = Number(val[1]);
1041
- if (valueChanged()) {
1042
- oldValue.value = val.slice();
1043
- }
1044
- }
1045
- } else if (!props.range && typeof val === 'number' && !isNaN(val)) {
1046
- if (val < props.minValue) {
1047
- emit('update:modelValue', props.minValue);
1048
- } else if (val > props.maxValue) {
1049
- emit('update:modelValue', props.maxValue);
1050
- } else {
1051
- firstValue.value = val;
1052
- if (valueChanged()) {
1053
- oldValue.value = val;
1054
- }
1055
- }
1056
- }
1057
- };
1058
- /* 派出事件 */
1059
- var emitChange = /*#__PURE__*/function () {
1060
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee() {
1061
- return regenerator_default().wrap(function _callee$(_context) {
1062
- while (1) switch (_context.prev = _context.next) {
1063
- case 0:
1064
- _context.next = 2;
1065
- return (0,external_vue_namespaceObject.nextTick)();
1066
- case 2:
1067
- emit('change', props.range ? [rangeMinValue.value, rangeMaxValue.value] : props.modelValue);
1068
- case 3:
1069
- case "end":
1070
- return _context.stop();
1071
- }
1072
- }, _callee);
1073
- }));
1074
- return function emitChange() {
1075
- return _ref2.apply(this, arguments);
1076
- };
1077
- }();
1078
- /* 断点样式 */
1079
- var getIntervalStyle = function getIntervalStyle(position) {
1080
- return props.vertical ? {
1081
- bottom: "".concat(position, "%")
1082
- } : {
1083
- left: "".concat(position, "%")
1084
- };
1085
- };
1086
- /* 设置滑块位置 */
1087
- var setPosition = function setPosition(percent) {
1088
- if (!props.range) {
1089
- firstbutton.value.setPosition(percent);
1090
- return;
1091
- }
1092
- var targetValue = props.minValue + percent * (props.maxValue - props.minValue) / 100;
1093
- // 绝对值
1094
- if (Math.abs(rangeMinValue.value - targetValue) < Math.abs(rangeMaxValue.value - targetValue)) {
1095
- curButtonRef.value = firstValue.value < secondValue.value ? firstbutton.value : secondbutton.value;
1096
- } else {
1097
- curButtonRef.value = firstValue.value > secondValue.value ? firstbutton.value : secondbutton.value;
1098
- }
1099
- curButtonRef.value.setPosition(percent);
1100
- };
1101
- var firstInputChange = function firstInputChange(v) {
1102
- if (v === '') {
1103
- return;
1104
- }
1105
- var val = parseFloat(v);
1106
- if (val < props.minValue) {
1107
- firstInput.value = props.minValue;
1108
- firstValue.value = props.minValue;
1109
- } else if (val > props.maxValue) {
1110
- firstInput.value = props.maxValue;
1111
- firstValue.value = props.maxValue;
1112
- } else {
1113
- firstValue.value = val;
1114
- }
1115
- };
1116
- var secondInputChange = function secondInputChange(v) {
1117
- if (v === '') {
1118
- return;
1119
- }
1120
- var val = parseFloat(v.toString());
1121
- if (val < props.minValue) {
1122
- secondInput.value = props.minValue;
1123
- secondValue.value = props.minValue;
1124
- } else if (val > props.maxValue) {
1125
- secondInput.value = props.maxValue;
1126
- secondValue.value = props.maxValue;
1127
- } else {
1128
- secondValue.value = val;
1129
- }
1130
- };
1131
- var betweenLabelStyle = function betweenLabelStyle(postion) {
1132
- var value = 0;
1133
- if (postion === 'start') {
1134
- value = props.vertical ? props.maxValue : props.minValue;
1135
- } else {
1136
- value = props.vertical ? props.minValue : props.maxValue;
1137
- }
1138
- if (props.showButtonLabel && [firstValue.value, secondValue.value].includes(value)) {
1139
- return '0';
1140
- }
1141
- return '1';
1142
- };
1143
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
1144
- resolveClassName = _usePrefix.resolveClassName;
1145
- var renderDom = function renderDom() {
1146
- var _slots$start, _slots$end;
1147
- return (0,external_vue_namespaceObject.createVNode)("div", {
1148
- "class": ["".concat(resolveClassName('slider')), props.extCls]
1149
- }, [(_slots$start = slots.start) === null || _slots$start === void 0 ? void 0 : _slots$start.call(slots), (0,external_vue_namespaceObject.createVNode)("div", {
1150
- "class": "".concat(resolveClassName('slider-runway')),
1151
- "ref": slider,
1152
- "style": runwayStyle.value,
1153
- "onClick": setButtonPos
1154
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
1155
- "class": ["".concat(resolveClassName('slider-bar')), props.vertical ? 'vertical' : 'horizontal', {
1156
- disable: props.disable
1157
- }],
1158
- "style": barStyle.value
1159
- }, null), props.showInterval ? intervals.value.map(function (interval, index) {
1160
- return (0,external_vue_namespaceObject.createVNode)("div", {
1161
- "key": index,
1162
- "class": ["".concat(resolveClassName('slider-interval')), {
1163
- vertical: props.vertical
1164
- }],
1165
- "style": getIntervalStyle(interval)
1166
- }, null);
1167
- }) : undefined, props.customContent ? customList.value.map(function (custom, index) {
1168
- return (0,external_vue_namespaceObject.createVNode)("div", {
1169
- "key": index,
1170
- "class": ["".concat(resolveClassName('slider-interval')), {
1171
- vertical: props.vertical
1172
- }],
1173
- "style": getIntervalStyle(custom.percent)
1174
- }, null);
1175
- }) : undefined, props.showBetweenLabel || props.showIntervalLabel || props.customContent ? (0,external_vue_namespaceObject.createVNode)("div", {
1176
- "class": ["".concat(resolveClassName('slider-labels')), props.vertical ? 'vertical' : 'horizontal']
1177
- }, [function () {
1178
- if (props.showBetweenLabel) {
1179
- return [(0,external_vue_namespaceObject.createVNode)("div", {
1180
- "class": "label-start",
1181
- "style": [{
1182
- opacity: betweenLabelStyle('start')
1183
- }]
1184
- }, [props.formatterLabel(props.minValue)]), (0,external_vue_namespaceObject.createVNode)("div", {
1185
- "class": "label-end",
1186
- "style": [{
1187
- opacity: betweenLabelStyle('end')
1188
- }]
1189
- }, [props.formatterLabel(props.maxValue)])];
1190
- }
1191
- if (props.showIntervalLabel) {
1192
- return intervalLabels.value.map(function (intervalLabel, index) {
1193
- return (0,external_vue_namespaceObject.createVNode)("div", {
1194
- "class": ["".concat(resolveClassName('slider-label')), props.vertical ? 'vertical' : 'horizontal'],
1195
- "key": index,
1196
- "style": getIntervalStyle(intervalLabel.stepWidth)
1197
- }, [intervalLabel.stepLabel]);
1198
- });
1199
- }
1200
- if (props.customContent) {
1201
- return customList.value.map(function (item, index) {
1202
- return (0,external_vue_namespaceObject.createVNode)("div", {
1203
- "class": ["".concat(resolveClassName('slider-label')), props.vertical ? 'vertical' : 'horizontal'],
1204
- "key": index,
1205
- "style": getIntervalStyle(item.percent)
1206
- }, [item.label]);
1207
- });
1208
- }
1209
- return undefined;
1210
- }()]) : undefined, (0,external_vue_namespaceObject.createVNode)(slider_button, {
1211
- "modelValue": firstValue.value,
1212
- "onUpdate:modelValue": function onUpdateModelValue($event) {
1213
- return firstValue.value = $event;
1214
- },
1215
- "ref": firstbutton,
1216
- "params": buttonParms.value,
1217
- "onEmitChange": emitChange,
1218
- "onResetSize": resetSize
1219
- }, null), props.range ? (0,external_vue_namespaceObject.createVNode)(slider_button, {
1220
- "modelValue": secondValue.value,
1221
- "onUpdate:modelValue": function onUpdateModelValue($event) {
1222
- return secondValue.value = $event;
1223
- },
1224
- "ref": secondbutton,
1225
- "params": buttonParms.value,
1226
- "onEmitChange": emitChange,
1227
- "onResetSize": resetSize
1228
- }, null) : undefined]), props.showInput && !props.vertical ? (0,external_vue_namespaceObject.createVNode)("div", {
1229
- "class": "".concat(resolveClassName('slider-input'))
1230
- }, [(0,external_vue_namespaceObject.createVNode)("div", {
1231
- "class": "input-item"
1232
- }, [(0,external_vue_namespaceObject.createVNode)(external_input_namespaceObject["default"], {
1233
- "type": "number",
1234
- "modelValue": firstInput.value,
1235
- "max": props.maxValue,
1236
- "min": props.minValue,
1237
- "onChange": firstInputChange
1238
- }, null)]), showSecondInput.value && secondValue.value ? [(0,external_vue_namespaceObject.createVNode)("div", {
1239
- "class": "input-center"
1240
- }, [(0,external_vue_namespaceObject.createTextVNode)("\uFF5E")]), (0,external_vue_namespaceObject.createVNode)("div", {
1241
- "class": "input-item"
1242
- }, [(0,external_vue_namespaceObject.createVNode)(external_input_namespaceObject["default"], {
1243
- "type": "number",
1244
- "modelValue": secondInput.value,
1245
- "max": props.maxValue,
1246
- "min": props.minValue,
1247
- "onChange": secondInputChange
1248
- }, null)])] : undefined]) : undefined, (_slots$end = slots.end) === null || _slots$end === void 0 ? void 0 : _slots$end.call(slots)]);
1249
- };
1250
- return {
1251
- renderDom: renderDom
1252
- };
1253
- },
1254
- render: function render() {
1255
- return this.renderDom();
1256
- }
1257
- }));
1258
- ;// CONCATENATED MODULE: ../../packages/slider/src/index.ts
1259
- /**
1260
- * Tencent is pleased to support the open source community by making
1261
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1262
- *
1263
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1264
- *
1265
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1266
- *
1267
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1268
- *
1269
- * ---------------------------------------------------
1270
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1271
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1272
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1273
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1274
- *
1275
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1276
- * the Software.
1277
- *
1278
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1279
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1280
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1281
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1282
- * IN THE SOFTWARE.
1283
- */
1284
-
1285
-
1286
- var Slider = (0,external_shared_namespaceObject.withInstall)(slider);
1287
- /* harmony default export */ const src = (Slider);
1288
- })();
1289
-
1290
- var __webpack_exports__default = __webpack_exports__.Z;
1291
- export { __webpack_exports__default as default };
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+ import*as e from"../shared";import*as t from"vue";import*as a from"../config-provider";import*as r from"../input";import*as n from"../popover";var o={7609:(e,t,a)=>{var r=a(7425).default;function n(){e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,l=Object.defineProperty||function(e,t,a){e[t]=a.value},u="function"==typeof Symbol?Symbol:{},i=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function m(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{m({},"")}catch(e){m=function(e,t,a){return e[t]=a}}function v(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),u=new P(r||[]);return l(o,"_invoke",{value:L(e,a,u)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=v;var f={};function p(){}function h(){}function V(){}var y={};m(y,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(S([])));x&&x!==a&&o.call(x,i)&&(y=x);var g=V.prototype=p.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){m(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function a(n,l,u,i){var c=d(e[n],e,l);if("throw"!==c.type){var s=c.arg,m=s.value;return m&&"object"==r(m)&&o.call(m,"__await")?t.resolve(m.__await).then((function(e){a("next",e,u,i)}),(function(e){a("throw",e,u,i)})):t.resolve(m).then((function(e){s.value=e,u(s)}),(function(e){return a("throw",e,u,i)}))}i(c.arg)}var n;l(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}})}function L(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var l=a.delegate;if(l){var u=E(l,a);if(u){if(u===f)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function E(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:B}}function B(){return{value:void 0,done:!0}}return h.prototype=V,l(g,"constructor",{value:V,configurable:!0}),l(V,"constructor",{value:h,configurable:!0}),h.displayName=m(V,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,V):(e.__proto__=V,m(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(N.prototype),m(N.prototype,c,(function(){return this})),t.AsyncIterator=N,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var l=new N(v(e,a,r,n),o);return t.isGeneratorFunction(a)?l:l.next().then((function(e){return e.done?e.value:l.next()}))},w(g),m(g,s,"Generator"),m(g,i,(function(){return this})),m(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=S,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return l.type="throw",l.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],l=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var u=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(u&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(u){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var l=n?n.completion:{};return l.type=e,l.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),C(a),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;C(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:S(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(a){return e.exports=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},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},l={};function u(e){var t=l[e];if(void 0!==t)return t.exports;var a=l[e]={exports:{}};return o[e](a,a.exports,u),a.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};(()=>{u.d(i,{Z:()=>x});const o=(l={PlacementEnum:()=>e.PlacementEnum,PropTypes:()=>e.PropTypes,withInstall:()=>e.withInstall},c={},u.d(c,l),c);var l,c;const s=(e=>{var t={};return u.d(t,e),t})({Fragment:()=>t.Fragment,computed:()=>t.computed,createTextVNode:()=>t.createTextVNode,createVNode:()=>t.createVNode,defineComponent:()=>t.defineComponent,nextTick:()=>t.nextTick,onMounted:()=>t.onMounted,ref:()=>t.ref,watch:()=>t.watch});var m=u(2841),v=u.n(m);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const d=(e=>{var t={};return u.d(t,e),t})({usePrefix:()=>a.usePrefix}),f=(e=>{var t={};return u.d(t,e),t})({default:()=>r.default}),p=(e=>{var t={};return u.d(t,e),t})({default:()=>n.default}),h=(0,s.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(e,t){var a=t.emit,r=(0,s.ref)(!1),n=(0,s.ref)(!1),l=(0,s.ref)(0),u=(0,s.ref)(0),i=(0,s.ref)(0),c=(0,s.ref)(null),m=(0,s.ref)(e.modelValue),v=(0,s.ref)(0),f=(0,s.ref)(0),h=(0,s.ref)(!1),b=(0,s.ref)(null),x=(0,s.computed)((function(){var t,a,r="";if(null===(t=e.params.customContent)||void 0===t?void 0:t[e.modelValue]){var n=e.params.customContent[e.modelValue];r=n.tip||n.label||""}var l=e.params.vertical?o.PlacementEnum.RIGHT:o.PlacementEnum.TOP;return(null===(a=e.params)||void 0===a?void 0:a.showTip)?{content:e.params.formatterTipLabel("".concat(r||(null==e?void 0:e.modelValue)||"0")),placement:l}:{content:"",placement:l}})),g=(0,s.computed)((function(){return"".concat((e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100,"%")})),w=(0,s.computed)((function(){return e.params.vertical?{bottom:g.value}:{left:g.value}})),N=(0,s.computed)((function(){return e.params.formatterButtonLabel(e.modelValue)})),L=function(t){e.params.disable||(t.preventDefault(),E(t),V(window,"mousemove",T),V(window,"touchmove",T),V(window,"mouseup",C),V(window,"touchend",C))},E=function(t){r.value=!0,n.value=!0,e.params.vertical?l.value=t.clientY:u.value=t.clientX,i.value=parseFloat(g.value),c.value=i.value},T=function(t){if(r.value){n.value=!1,a("resetSize");var o=0;e.params.vertical?(v.value=t.clientY,o=(l.value-v.value)/e.params.sliderSize*100):(f.value=t.clientX,o=(f.value-u.value)/e.params.sliderSize*100),c.value=i.value+o,P(c.value)}},C=function e(){h.value=!1,r.value&&(setTimeout((function(){r.value=!1,n.value||(P(c.value),a("emitChange"))}),0),y(window,"mousemove",T),y(window,"touchmove",T),y(window,"mouseup",e),y(window,"touchend",e))},P=function(t){if(null!==t&&!isNaN(t)){t<0?c.value=0:t>100&&(c.value=100);var n=100/((e.params.maxValue-e.params.minValue)/e.params.step),o=Math.round(t/n)*n*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;o=parseFloat(o.toFixed(e.params.precision)),a("update:modelValue",o),r.value||e.modelValue===m.value||(m.value=e.modelValue)}},S=(0,d.usePrefix)().resolveClassName;return{renderDom:function(){return(0,s.createVNode)("div",{class:["".concat(S("slider-button")),e.params.vertical?"vertical":"horizontal",{grabbing:r.value}],ref:b,tabindex:"0",style:w.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(x.value.content)?(0,s.createVNode)(s.Fragment,null,[(0,s.createVNode)(p.default,{content:x.value.content,theme:"dark",placement:x.value.placement,boundary:document.body},{default:function(){return[(0,s.createVNode)("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}})]):(0,s.createVNode)(s.Fragment,null,[(0,s.createVNode)("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]),e.params.showButtonLabel&&!e.params.showIntervalLabel?(0,s.createVNode)(s.Fragment,null,[(0,s.createVNode)("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[N.value])]):null])},setPosition:P,tip:x}},render:function(){return this.renderDom()}});var V=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},y=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const b=(0,s.defineComponent)({name:"Slider",props:{modelValue:o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.number),o.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,t){var a=this,r=t.slots,n=t.emit,o=(0,s.ref)(1),l=(0,s.ref)(null),u=(0,s.ref)(null),i=(0,s.ref)(null),c=(0,s.ref)(0),m=(0,s.ref)(0),p=(0,s.ref)(null),y=(0,s.ref)(null),b=(0,s.ref)(null),x=(0,s.ref)(null),g=(0,s.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),w=(0,s.computed)((function(){return Math.min(l.value,u.value)})),N=(0,s.computed)((function(){return Math.max(l.value,u.value)})),L=(0,s.computed)((function(){return e.range?"".concat(100*(N.value-w.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(l.value-e.minValue)/(e.maxValue-e.minValue),"%")})),E=(0,s.computed)((function(){return e.range?"".concat(100*(w.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),T=(0,s.computed)((function(){return e.vertical?{height:L.value,bottom:E.value}:{width:L.value,left:E.value}})),C=(0,s.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(N.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(l.value-e.minValue)/(e.maxValue-e.minValue)}))})),P=(0,s.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),S=(0,s.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),B=(0,s.computed)((function(){return Array.isArray(e.modelValue)})),O=(0,s.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),_=(0,s.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:g.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:o.value,formatterTipLabel:e.formatterTipLabel}}));(0,s.watch)((function(){return e.modelValue}),(function(){F()})),(0,s.watch)((function(){return l.value}),(function(t){e.range?n("update:modelValue",[w.value,N.value]):n("update:modelValue",t),c.value=t})),(0,s.watch)((function(){return u.value}),(function(e){n("update:modelValue",[w.value,N.value]),m.value=e})),(0,s.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(l.value=Math.max(e.minValue,Number(e.modelValue[0])),u.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(l.value=e.minValue,u.value=e.maxValue),i.value=[l.value,u.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?l.value=e.minValue:l.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),i.value=l.value),j(),V(window,"resize",j())}));var j=function(){p.value&&(o.value=p.value["client".concat(e.vertical?"Height":"Width")])},I=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(j(),e.vertical){var n=null===(a=p.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;G((n-t.clientY)/o.value*100)}else{var l=null===(r=p.value)||void 0===r?void 0:r.getBoundingClientRect().left;G((t.clientX-l)/o.value*100)}M()}},k=function(){return e.range?![w.value,N.value].every((function(e,t){return e===i.value[t]})):e.modelValue!==i.value},F=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?n("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?n("update:modelValue",[t[0],e.maxValue]):(l.value=Number(t[0]),u.value=Number(t[1]),k()&&(i.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?n("update:modelValue",e.minValue):t>e.maxValue?n("update:modelValue",e.maxValue):(l.value=t,k()&&(i.value=t)))}},M=function(){return t=a,r=void 0,o=void 0,l=v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.nextTick)();case 2:n("change",e.range?[w.value,N.value]:e.modelValue);case 3:case"end":return t.stop()}}),t)})),new(o||(o=Promise))((function(e,a){function n(e){try{i(l.next(e))}catch(e){a(e)}}function u(e){try{i(l.throw(e))}catch(e){a(e)}}function i(t){var a;t.done?e(t.value):(a=t.value,a instanceof o?a:new o((function(e){e(a)}))).then(n,u)}i((l=l.apply(t,r||[])).next())}));var t,r,o,l},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},G=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(w.value-a)<Math.abs(N.value-a)?x.value=l.value<u.value?y.value:b.value:x.value=l.value>u.value?y.value:b.value,x.value.setPosition(t)}else y.value.setPosition(t)},A=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(c.value=e.minValue,l.value=e.minValue):a>e.maxValue?(c.value=e.maxValue,l.value=e.maxValue):l.value=a}},R=function(t){if(""!==t){var a=parseFloat(t.toString());a<e.minValue?(m.value=e.minValue,u.value=e.minValue):a>e.maxValue?(m.value=e.maxValue,u.value=e.maxValue):u.value=a}},D=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[l.value,u.value].includes(a)?"0":"1"},W=(0,d.usePrefix)().resolveClassName;return{renderDom:function(){var t,a;return(0,s.createVNode)("div",{class:["".concat(W("slider")),e.extCls]},[null===(t=r.start)||void 0===t?void 0:t.call(r),(0,s.createVNode)("div",{class:"".concat(W("slider-runway")),ref:p,style:P.value,onClick:I},[(0,s.createVNode)("div",{class:["".concat(W("slider-bar")),e.vertical?"vertical":"horizontal",{disable:e.disable}],style:T.value},null),e.showInterval?C.value.map((function(t,a){return(0,s.createVNode)("div",{key:a,class:["".concat(W("slider-interval")),{vertical:e.vertical}],style:z(t)},null)})):void 0,e.customContent?O.value.map((function(t,a){return(0,s.createVNode)("div",{key:a,class:["".concat(W("slider-interval")),{vertical:e.vertical}],style:z(t.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,s.createVNode)("div",{class:["".concat(W("slider-labels")),e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,s.createVNode)("div",{class:"label-start",style:[{opacity:D("start")}]},[e.formatterLabel(e.minValue)]),(0,s.createVNode)("div",{class:"label-end",style:[{opacity:D("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?S.value.map((function(t,a){return(0,s.createVNode)("div",{class:["".concat(W("slider-label")),e.vertical?"vertical":"horizontal"],key:a,style:z(t.stepWidth)},[t.stepLabel])})):e.customContent?O.value.map((function(t,a){return(0,s.createVNode)("div",{class:["".concat(W("slider-label")),e.vertical?"vertical":"horizontal"],key:a,style:z(t.percent)},[t.label])})):void 0]):void 0,(0,s.createVNode)(h,{modelValue:l.value,"onUpdate:modelValue":function(e){return l.value=e},ref:y,params:_.value,onEmitChange:M,onResetSize:j},null),e.range?(0,s.createVNode)(h,{modelValue:u.value,"onUpdate:modelValue":function(e){return u.value=e},ref:b,params:_.value,onEmitChange:M,onResetSize:j},null):void 0]),e.showInput&&!e.vertical?(0,s.createVNode)("div",{class:"".concat(W("slider-input"))},[(0,s.createVNode)("div",{class:"input-item"},[(0,s.createVNode)(f.default,{type:"number",modelValue:c.value,max:e.maxValue,min:e.minValue,onChange:A},null)]),B.value&&u.value?[(0,s.createVNode)("div",{class:"input-center"},[(0,s.createTextVNode)("~")]),(0,s.createVNode)("div",{class:"input-item"},[(0,s.createVNode)(f.default,{type:"number",modelValue:m.value,max:e.maxValue,min:e.minValue,onChange:R},null)])]:void 0]):void 0,null===(a=r.end)||void 0===a?void 0:a.call(r)])}}},render:function(){return this.renderDom()}}),x=(0,o.withInstall)(b)})();var c=i.Z;export{c as default};