bkui-vue 0.0.1-beta.393 → 0.0.1-beta.394

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 (155) hide show
  1. package/dist/index.cjs.js +36 -36
  2. package/dist/index.esm.js +33 -3
  3. package/dist/index.umd.js +35 -35
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/index.js +1 -353
  7. package/lib/alert/index.js +1 -251
  8. package/lib/animate-number/index.js +1 -226
  9. package/lib/backtop/index.js +1 -260
  10. package/lib/badge/index.js +1 -274
  11. package/lib/breadcrumb/index.js +1 -329
  12. package/lib/button/index.js +1 -371
  13. package/lib/card/index.js +1 -326
  14. package/lib/cascader/index.js +1 -2168
  15. package/lib/checkbox/index.js +1 -571
  16. package/lib/code-diff/index.js +1 -5520
  17. package/lib/collapse/index.js +1 -698
  18. package/lib/color-picker/index.js +1 -2816
  19. package/lib/components.js +1 -759
  20. package/lib/container/index.js +1 -369
  21. package/lib/date-picker/index.js +1 -5601
  22. package/lib/dialog/index.js +1 -545
  23. package/lib/directives/index.js +2 -1427
  24. package/lib/directives/index.js.LICENSE.txt +14 -0
  25. package/lib/dist.index.js +1 -166
  26. package/lib/divider/index.js +1 -512
  27. package/lib/dropdown/index.js +1 -414
  28. package/lib/exception/index.js +1 -405
  29. package/lib/fixed-navbar/index.js +1 -214
  30. package/lib/form/index.js +1 -986
  31. package/lib/icon/angle-double-down-line.js +1 -426
  32. package/lib/icon/angle-double-left-line.js +1 -426
  33. package/lib/icon/angle-double-left.js +1 -426
  34. package/lib/icon/angle-double-right-line.js +1 -426
  35. package/lib/icon/angle-double-right.js +1 -426
  36. package/lib/icon/angle-double-up-line.js +1 -426
  37. package/lib/icon/angle-down-fill.js +1 -426
  38. package/lib/icon/angle-down-line.js +1 -426
  39. package/lib/icon/angle-down.js +1 -426
  40. package/lib/icon/angle-left.js +1 -426
  41. package/lib/icon/angle-right.js +1 -426
  42. package/lib/icon/angle-up-fill.js +1 -426
  43. package/lib/icon/angle-up.js +1 -426
  44. package/lib/icon/archive-fill.js +1 -426
  45. package/lib/icon/arrows-left.js +1 -426
  46. package/lib/icon/arrows-right.js +1 -426
  47. package/lib/icon/audio-fill.js +1 -426
  48. package/lib/icon/bk.js +1 -426
  49. package/lib/icon/circle.js +1 -426
  50. package/lib/icon/close-line.js +1 -426
  51. package/lib/icon/close.js +1 -426
  52. package/lib/icon/code.js +1 -426
  53. package/lib/icon/cog-shape.js +1 -426
  54. package/lib/icon/collapse-left.js +1 -426
  55. package/lib/icon/copy.js +1 -426
  56. package/lib/icon/data-shape.js +1 -426
  57. package/lib/icon/del.js +1 -426
  58. package/lib/icon/doc-fill.js +1 -426
  59. package/lib/icon/done.js +1 -426
  60. package/lib/icon/down-shape.js +1 -426
  61. package/lib/icon/down-small.js +1 -426
  62. package/lib/icon/edit-line.js +1 -426
  63. package/lib/icon/ellipsis.js +1 -426
  64. package/lib/icon/enlarge-line.js +1 -426
  65. package/lib/icon/error.js +1 -426
  66. package/lib/icon/excel-fill.js +1 -426
  67. package/lib/icon/exclamation-circle-shape.js +1 -426
  68. package/lib/icon/eye.js +1 -426
  69. package/lib/icon/filliscreen-line.js +1 -426
  70. package/lib/icon/folder-open.js +1 -426
  71. package/lib/icon/folder-shape-open.js +1 -426
  72. package/lib/icon/folder-shape.js +1 -426
  73. package/lib/icon/folder.js +1 -426
  74. package/lib/icon/funnel.js +1 -426
  75. package/lib/icon/help-document-fill.js +1 -426
  76. package/lib/icon/help-fill.js +1 -426
  77. package/lib/icon/help.js +1 -426
  78. package/lib/icon/image-fill.js +1 -426
  79. package/lib/icon/img-placehoulder.js +1 -448
  80. package/lib/icon/index.js +1 -2275
  81. package/lib/icon/info-line.js +1 -448
  82. package/lib/icon/info.js +1 -448
  83. package/lib/icon/left-shape.js +1 -448
  84. package/lib/icon/left-turn-line.js +1 -448
  85. package/lib/icon/narrow-line.js +1 -448
  86. package/lib/icon/original.js +1 -448
  87. package/lib/icon/pdf-fill.js +1 -448
  88. package/lib/icon/play-shape.js +1 -448
  89. package/lib/icon/plus.js +1 -448
  90. package/lib/icon/ppt-fill.js +1 -448
  91. package/lib/icon/qq.js +1 -448
  92. package/lib/icon/right-shape.js +1 -448
  93. package/lib/icon/right-turn-line.js +1 -448
  94. package/lib/icon/search.js +1 -448
  95. package/lib/icon/share.js +1 -448
  96. package/lib/icon/spinner.js +1 -448
  97. package/lib/icon/success.js +1 -448
  98. package/lib/icon/switcher-loading.js +1 -448
  99. package/lib/icon/text-file.js +1 -448
  100. package/lib/icon/text-fill.js +1 -448
  101. package/lib/icon/transfer.js +1 -448
  102. package/lib/icon/tree-application-shape.js +1 -448
  103. package/lib/icon/unfull-screen.js +1 -448
  104. package/lib/icon/unvisible.js +1 -448
  105. package/lib/icon/up-shape.js +1 -448
  106. package/lib/icon/upload.js +1 -448
  107. package/lib/icon/video-fill.js +1 -448
  108. package/lib/icon/warn.js +1 -448
  109. package/lib/icon/weixin.js +1 -448
  110. package/lib/image/index.js +1 -873
  111. package/lib/index.js +1 -169
  112. package/lib/info-box/index.js +1 -1784
  113. package/lib/input/index.js +1 -846
  114. package/lib/link/index.js +1 -226
  115. package/lib/loading/index.js +1 -309
  116. package/lib/menu/index.js +1 -796
  117. package/lib/message/index.js +1 -401
  118. package/lib/modal/index.js +1 -395
  119. package/lib/navigation/index.js +1 -431
  120. package/lib/notify/index.js +1 -430
  121. package/lib/overflow-title/index.js +1 -512
  122. package/lib/pagination/index.js +1 -1026
  123. package/lib/plugin-popover/index.js +1 -2581
  124. package/lib/plugins/index.js +1 -130
  125. package/lib/popover/index.js +1 -2587
  126. package/lib/popover2/index.js +1 -172
  127. package/lib/preset.js +1 -129
  128. package/lib/process/index.js +1 -1417
  129. package/lib/progress/index.js +1 -479
  130. package/lib/radio/index.js +1 -649
  131. package/lib/rate/index.js +1 -358
  132. package/lib/resize-layout/index.js +1 -495
  133. package/lib/search-select/index.js +1 -3388
  134. package/lib/search-select/search-select.css +1 -1
  135. package/lib/search-select/search-select.less +1 -1
  136. package/lib/search-select/search-select.variable.css +1 -1
  137. package/lib/select/index.js +1 -2819
  138. package/lib/shared/index.js +1 -2813
  139. package/lib/sideslider/index.js +1 -1362
  140. package/lib/slider/index.js +1 -2060
  141. package/lib/steps/index.js +1 -1504
  142. package/lib/swiper/index.js +1 -374
  143. package/lib/switcher/index.js +1 -308
  144. package/lib/tab/index.js +1 -919
  145. package/lib/table/index.js +1 -6635
  146. package/lib/table-column/index.js +1 -737
  147. package/lib/tag/index.js +1 -278
  148. package/lib/tag-input/index.js +1 -1897
  149. package/lib/time-picker/index.js +1 -142
  150. package/lib/timeline/index.js +1 -315
  151. package/lib/transfer/index.js +1 -658
  152. package/lib/tree/index.js +1 -2917
  153. package/lib/upload/index.js +1 -3735
  154. package/lib/virtual-render/index.js +1 -825
  155. package/package.json +2 -1
@@ -1,846 +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/arrayWithHoles.js
106
- function _arrayWithHoles(arr) {
107
- if (Array.isArray(arr)) return arr;
108
- }
109
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
110
- function _iterableToArrayLimit(arr, i) {
111
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
112
-
113
- if (_i == null) return;
114
- var _arr = [];
115
- var _n = true;
116
- var _d = false;
117
-
118
- var _s, _e;
119
-
120
- try {
121
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
122
- _arr.push(_s.value);
123
-
124
- if (i && _arr.length === i) break;
125
- }
126
- } catch (err) {
127
- _d = true;
128
- _e = err;
129
- } finally {
130
- try {
131
- if (!_n && _i["return"] != null) _i["return"]();
132
- } finally {
133
- if (_d) throw _e;
134
- }
135
- }
136
-
137
- return _arr;
138
- }
139
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
140
- function _arrayLikeToArray(arr, len) {
141
- if (len == null || len > arr.length) len = arr.length;
142
-
143
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
144
- arr2[i] = arr[i];
145
- }
146
-
147
- return arr2;
148
- }
149
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
150
-
151
- function _unsupportedIterableToArray(o, minLen) {
152
- if (!o) return;
153
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
154
- var n = Object.prototype.toString.call(o).slice(8, -1);
155
- if (n === "Object" && o.constructor) n = o.constructor.name;
156
- if (n === "Map" || n === "Set") return Array.from(o);
157
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
158
- }
159
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
160
- function _nonIterableRest() {
161
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
162
- }
163
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
164
-
165
-
166
-
167
-
168
- function _slicedToArray(arr, i) {
169
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
170
- }
171
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
172
- function _defineProperty(obj, key, value) {
173
- if (key in obj) {
174
- Object.defineProperty(obj, key, {
175
- value: value,
176
- enumerable: true,
177
- configurable: true,
178
- writable: true
179
- });
180
- } else {
181
- obj[key] = value;
182
- }
183
-
184
- return obj;
185
- }
186
- // EXTERNAL MODULE: external "vue"
187
- var external_vue_ = __webpack_require__(748);
188
- ;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.js
189
- /******************************************************************************
190
- Copyright (c) Microsoft Corporation.
191
-
192
- Permission to use, copy, modify, and/or distribute this software for any
193
- purpose with or without fee is hereby granted.
194
-
195
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
196
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
197
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
198
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
199
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
200
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
201
- PERFORMANCE OF THIS SOFTWARE.
202
- ***************************************************************************** */
203
- /* global Reflect, Promise */
204
-
205
- var extendStatics = function(d, b) {
206
- extendStatics = Object.setPrototypeOf ||
207
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
208
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
209
- return extendStatics(d, b);
210
- };
211
-
212
- function __extends(d, b) {
213
- if (typeof b !== "function" && b !== null)
214
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
215
- extendStatics(d, b);
216
- function __() { this.constructor = d; }
217
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
218
- }
219
-
220
- var __assign = function() {
221
- __assign = Object.assign || function __assign(t) {
222
- for (var s, i = 1, n = arguments.length; i < n; i++) {
223
- s = arguments[i];
224
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
225
- }
226
- return t;
227
- }
228
- return __assign.apply(this, arguments);
229
- }
230
-
231
- function __rest(s, e) {
232
- var t = {};
233
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
234
- t[p] = s[p];
235
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
236
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
237
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
238
- t[p[i]] = s[p[i]];
239
- }
240
- return t;
241
- }
242
-
243
- function __decorate(decorators, target, key, desc) {
244
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
245
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
246
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
247
- return c > 3 && r && Object.defineProperty(target, key, r), r;
248
- }
249
-
250
- function __param(paramIndex, decorator) {
251
- return function (target, key) { decorator(target, key, paramIndex); }
252
- }
253
-
254
- function __metadata(metadataKey, metadataValue) {
255
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
256
- }
257
-
258
- function __awaiter(thisArg, _arguments, P, generator) {
259
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
260
- return new (P || (P = Promise))(function (resolve, reject) {
261
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
262
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
263
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
264
- step((generator = generator.apply(thisArg, _arguments || [])).next());
265
- });
266
- }
267
-
268
- function __generator(thisArg, body) {
269
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
270
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
271
- function verb(n) { return function (v) { return step([n, v]); }; }
272
- function step(op) {
273
- if (f) throw new TypeError("Generator is already executing.");
274
- while (_) try {
275
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
276
- if (y = 0, t) op = [op[0] & 2, t.value];
277
- switch (op[0]) {
278
- case 0: case 1: t = op; break;
279
- case 4: _.label++; return { value: op[1], done: false };
280
- case 5: _.label++; y = op[1]; op = [0]; continue;
281
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
282
- default:
283
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
284
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
285
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
286
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
287
- if (t[2]) _.ops.pop();
288
- _.trys.pop(); continue;
289
- }
290
- op = body.call(thisArg, _);
291
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
292
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
293
- }
294
- }
295
-
296
- var __createBinding = Object.create ? (function(o, m, k, k2) {
297
- if (k2 === undefined) k2 = k;
298
- var desc = Object.getOwnPropertyDescriptor(m, k);
299
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
300
- desc = { enumerable: true, get: function() { return m[k]; } };
301
- }
302
- Object.defineProperty(o, k2, desc);
303
- }) : (function(o, m, k, k2) {
304
- if (k2 === undefined) k2 = k;
305
- o[k2] = m[k];
306
- });
307
-
308
- function __exportStar(m, o) {
309
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
310
- }
311
-
312
- function __values(o) {
313
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
314
- if (m) return m.call(o);
315
- if (o && typeof o.length === "number") return {
316
- next: function () {
317
- if (o && i >= o.length) o = void 0;
318
- return { value: o && o[i++], done: !o };
319
- }
320
- };
321
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
322
- }
323
-
324
- function __read(o, n) {
325
- var m = typeof Symbol === "function" && o[Symbol.iterator];
326
- if (!m) return o;
327
- var i = m.call(o), r, ar = [], e;
328
- try {
329
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
330
- }
331
- catch (error) { e = { error: error }; }
332
- finally {
333
- try {
334
- if (r && !r.done && (m = i["return"])) m.call(i);
335
- }
336
- finally { if (e) throw e.error; }
337
- }
338
- return ar;
339
- }
340
-
341
- /** @deprecated */
342
- function __spread() {
343
- for (var ar = [], i = 0; i < arguments.length; i++)
344
- ar = ar.concat(__read(arguments[i]));
345
- return ar;
346
- }
347
-
348
- /** @deprecated */
349
- function __spreadArrays() {
350
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
351
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
352
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
353
- r[k] = a[j];
354
- return r;
355
- }
356
-
357
- function __spreadArray(to, from, pack) {
358
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
359
- if (ar || !(i in from)) {
360
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
361
- ar[i] = from[i];
362
- }
363
- }
364
- return to.concat(ar || Array.prototype.slice.call(from));
365
- }
366
-
367
- function __await(v) {
368
- return this instanceof __await ? (this.v = v, this) : new __await(v);
369
- }
370
-
371
- function __asyncGenerator(thisArg, _arguments, generator) {
372
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
373
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
374
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
375
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
376
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
377
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
378
- function fulfill(value) { resume("next", value); }
379
- function reject(value) { resume("throw", value); }
380
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
381
- }
382
-
383
- function __asyncDelegator(o) {
384
- var i, p;
385
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
386
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
387
- }
388
-
389
- function __asyncValues(o) {
390
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
391
- var m = o[Symbol.asyncIterator], i;
392
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
393
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
394
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
395
- }
396
-
397
- function __makeTemplateObject(cooked, raw) {
398
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
399
- return cooked;
400
- };
401
-
402
- var __setModuleDefault = Object.create ? (function(o, v) {
403
- Object.defineProperty(o, "default", { enumerable: true, value: v });
404
- }) : function(o, v) {
405
- o["default"] = v;
406
- };
407
-
408
- function __importStar(mod) {
409
- if (mod && mod.__esModule) return mod;
410
- var result = {};
411
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
412
- __setModuleDefault(result, mod);
413
- return result;
414
- }
415
-
416
- function __importDefault(mod) {
417
- return (mod && mod.__esModule) ? mod : { default: mod };
418
- }
419
-
420
- function __classPrivateFieldGet(receiver, state, kind, f) {
421
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
422
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
423
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
424
- }
425
-
426
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
427
- if (kind === "m") throw new TypeError("Private method is not writable");
428
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
429
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
430
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
431
- }
432
-
433
- function __classPrivateFieldIn(state, receiver) {
434
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
435
- return typeof state === "function" ? receiver === state : state.has(receiver);
436
- }
437
-
438
- // EXTERNAL MODULE: external "../icon"
439
- var external_icon_ = __webpack_require__(6870);
440
- ;// CONCATENATED MODULE: ../../packages/input/src/input.tsx
441
-
442
-
443
-
444
- var _inputEmitEventsType;
445
-
446
-
447
-
448
- /*
449
- * Tencent is pleased to support the open source community by making
450
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
451
- *
452
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
453
- *
454
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
455
- *
456
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
457
- *
458
- * ---------------------------------------------------
459
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
460
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
461
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
462
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
463
- *
464
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
465
- * the Software.
466
- *
467
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
468
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
469
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
470
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
471
- * IN THE SOFTWARE.
472
- */
473
-
474
-
475
-
476
-
477
- var inputType = {
478
- type: external_shared_.PropTypes.string.def('text'),
479
- clearable: external_shared_.PropTypes.bool,
480
- disabled: external_shared_.PropTypes.bool,
481
- readonly: external_shared_.PropTypes.bool,
482
- placeholder: external_shared_.PropTypes.string.def('Enter'),
483
- prefixIcon: external_shared_.PropTypes.string,
484
- suffixIcon: external_shared_.PropTypes.string,
485
- suffix: external_shared_.PropTypes.string,
486
- prefix: external_shared_.PropTypes.string,
487
- step: external_shared_.PropTypes.integer,
488
- max: external_shared_.PropTypes.integer,
489
- min: external_shared_.PropTypes.integer,
490
- maxlength: external_shared_.PropTypes.integer,
491
- behavior: (0,external_shared_.InputBehaviorType)(),
492
- showWordLimit: external_shared_.PropTypes.bool,
493
- showControl: external_shared_.PropTypes.bool.def(true),
494
- showClearOnlyHover: external_shared_.PropTypes.bool.def(true),
495
- precision: external_shared_.PropTypes.number.def(0).validate(function (val) {
496
- return val >= 0 && val < 20;
497
- }),
498
- modelValue: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number]),
499
- size: external_shared_.PropTypes.size(),
500
- rows: external_shared_.PropTypes.number,
501
- selectReadonly: external_shared_.PropTypes.bool.def(false),
502
- withValidate: external_shared_.PropTypes.bool.def(true)
503
- };
504
- var EVENTS;
505
-
506
- (function (EVENTS) {
507
- EVENTS["UPDATE"] = "update:modelValue";
508
- EVENTS["FOCUS"] = "focus";
509
- EVENTS["BLUR"] = "blur";
510
- EVENTS["CHANGE"] = "change";
511
- EVENTS["CLEAR"] = "clear";
512
- EVENTS["INPUT"] = "input";
513
- EVENTS["KEYPRESS"] = "keypress";
514
- EVENTS["KEYDOWN"] = "keydown";
515
- EVENTS["KEYUP"] = "keyup";
516
- EVENTS["ENTER"] = "enter";
517
- EVENTS["PASTE"] = "paste";
518
- EVENTS["COMPOSITIONSTART"] = "compositionstart";
519
- EVENTS["COMPOSITIONUPDATE"] = "compositionupdate";
520
- EVENTS["COMPOSITIONEND"] = "compositionend";
521
- })(EVENTS || (EVENTS = {}));
522
-
523
- function EventFunction(_value, _evt) {
524
- return true;
525
- }
526
-
527
- function CompositionEventFunction(evt) {
528
- return evt;
529
- }
530
-
531
- var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_inputEmitEventsType, EVENTS.UPDATE, EventFunction), _defineProperty(_inputEmitEventsType, EVENTS.FOCUS, function (evt) {
532
- return evt;
533
- }), _defineProperty(_inputEmitEventsType, EVENTS.BLUR, function (evt) {
534
- return evt;
535
- }), _defineProperty(_inputEmitEventsType, EVENTS.CHANGE, EventFunction), _defineProperty(_inputEmitEventsType, EVENTS.CLEAR, function () {
536
- return true;
537
- }), _defineProperty(_inputEmitEventsType, EVENTS.INPUT, EventFunction), _defineProperty(_inputEmitEventsType, EVENTS.KEYPRESS, EventFunction), _defineProperty(_inputEmitEventsType, EVENTS.KEYDOWN, EventFunction), _defineProperty(_inputEmitEventsType, EVENTS.KEYUP, EventFunction), _defineProperty(_inputEmitEventsType, EVENTS.ENTER, EventFunction), _defineProperty(_inputEmitEventsType, EVENTS.PASTE, EventFunction), _defineProperty(_inputEmitEventsType, EVENTS.COMPOSITIONSTART, CompositionEventFunction), _defineProperty(_inputEmitEventsType, EVENTS.COMPOSITIONUPDATE, CompositionEventFunction), _defineProperty(_inputEmitEventsType, EVENTS.COMPOSITIONEND, CompositionEventFunction), _inputEmitEventsType);
538
- /* harmony default export */ const input = ((0,external_vue_.defineComponent)({
539
- name: 'Input',
540
- inheritAttrs: false,
541
- props: inputType,
542
- emits: inputEmitEventsType,
543
- setup: function setup(props, ctx) {
544
- var formItem = (0,external_shared_.useFormItem)();
545
- var isFocused = (0,external_vue_.ref)(false);
546
- var isCNInput = (0,external_vue_.ref)(false);
547
- var isTextArea = (0,external_vue_.computed)(function () {
548
- return props.type === 'textarea';
549
- });
550
- var inputClsPrefix = (0,external_vue_.computed)(function () {
551
- return isTextArea.value ? (0,external_shared_.resolveClassName)('textarea') : (0,external_shared_.resolveClassName)('input');
552
- });
553
-
554
- var _a = ctx.attrs,
555
- cls = _a["class"],
556
- style = _a.style,
557
- inputAttrs = __rest(_a, ["class", "style"]);
558
-
559
- var inputRef = (0,external_vue_.ref)();
560
- var inputCls = (0,external_vue_.computed)(function () {
561
- var _classes;
562
-
563
- return (0,external_shared_.classes)((_classes = {}, _defineProperty(_classes, "".concat(inputClsPrefix.value, "--").concat(props.size), !!props.size), _defineProperty(_classes, 'is-focused', isFocused.value), _defineProperty(_classes, 'is-readonly', props.readonly && !props.selectReadonly), _defineProperty(_classes, 'is-disabled', props.disabled), _defineProperty(_classes, 'is-simplicity', props.behavior === 'simplicity'), _defineProperty(_classes, "".concat(cls), !!cls), _classes), inputClsPrefix.value);
564
- });
565
- var suffixIconMap = {
566
- search: function search() {
567
- return (0,external_vue_.createVNode)(external_icon_.Search, null, null);
568
- },
569
- password: function password() {
570
- return (0,external_vue_.createVNode)(external_icon_.Eye, {
571
- "onClick": handleVisibleChange
572
- }, null);
573
- }
574
- };
575
- var suffixCls = getCls('suffix-icon');
576
- var suffixIcon = (0,external_vue_.computed)(function () {
577
- var icon = suffixIconMap[props.type];
578
-
579
- if (pwdVisible.value) {
580
- return (0,external_vue_.createVNode)(external_icon_.Unvisible, {
581
- "onClick": handleVisibleChange,
582
- "class": suffixCls
583
- }, null);
584
- }
585
-
586
- return icon ? (0,external_vue_.createVNode)(icon, {
587
- "class": suffixCls
588
- }, null) : null;
589
- });
590
- var isNumberInput = (0,external_vue_.computed)(function () {
591
- return props.type === 'number';
592
- });
593
- var ceilMaxLength = (0,external_vue_.computed)(function () {
594
- return Math.floor(props.maxlength);
595
- });
596
- var pwdVisible = (0,external_vue_.ref)(false);
597
- var clearCls = (0,external_vue_.computed)(function () {
598
- return (0,external_shared_.classes)(_defineProperty({
599
- 'show-clear-only-hover': props.showClearOnlyHover
600
- }, "".concat(inputClsPrefix.value, "--clear-icon"), true), suffixCls);
601
- });
602
- var incControlCls = (0,external_vue_.computed)(function () {
603
- return (0,external_shared_.classes)({
604
- 'is-disabled': props.disabled || props.modelValue >= props.max
605
- });
606
- });
607
- var decControlCls = (0,external_vue_.computed)(function () {
608
- return (0,external_shared_.classes)({
609
- 'is-disabled': props.disabled || props.modelValue <= props.min
610
- });
611
- });
612
- (0,external_vue_.watch)(function () {
613
- return props.modelValue;
614
- }, function () {
615
- var _a;
616
-
617
- if (props.withValidate) {
618
- (_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'change');
619
- }
620
- });
621
- ctx.expose({
622
- focus: function focus() {
623
- inputRef.value.focus();
624
- },
625
- clear: clear
626
- });
627
-
628
- function clear() {
629
- if (props.disabled) return;
630
- var resetVal = isNumberInput.value ? props.min : '';
631
- ctx.emit(EVENTS.UPDATE, resetVal);
632
- ctx.emit(EVENTS.CHANGE, resetVal);
633
- ctx.emit(EVENTS.CLEAR);
634
- }
635
-
636
- function handleFocus(e) {
637
- isFocused.value = true;
638
- ctx.emit(EVENTS.FOCUS, e);
639
- }
640
-
641
- function handleBlur(e) {
642
- var _a;
643
-
644
- isFocused.value = false;
645
- ctx.emit(EVENTS.BLUR, e);
646
-
647
- if (isNumberInput.value && Number.isInteger(parseInt(e.target.value, 10)) && (e.target.value > props.max || e.target.value < props.min)) {
648
- var val = e.target.value > props.max ? props.max : props.min;
649
- ctx.emit(EVENTS.UPDATE, val);
650
- ctx.emit(EVENTS.CHANGE, val);
651
- }
652
-
653
- if (props.withValidate) {
654
- (_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'blur');
655
- }
656
- } // 事件句柄生成器
657
-
658
-
659
- function eventHandler(eventName) {
660
- return function (e) {
661
- e.stopPropagation();
662
-
663
- if (eventName === EVENTS.KEYDOWN && (e.code === 'Enter' || e.key === 'Enter' || e.keyCode === 13)) {
664
- ctx.emit(EVENTS.ENTER, e.target.value, e);
665
- }
666
-
667
- if (isCNInput.value && [EVENTS.INPUT, EVENTS.CHANGE].some(function (e) {
668
- return eventName === e;
669
- })) return;
670
-
671
- if (eventName === EVENTS.INPUT) {
672
- ctx.emit(EVENTS.UPDATE, isNumberInput.value && e.target.value ? +e.target.value : e.target.value);
673
- }
674
-
675
- ctx.emit(eventName, e.target.value, e);
676
- };
677
- }
678
-
679
- var _map = [EVENTS.KEYUP, EVENTS.KEYDOWN, EVENTS.KEYPRESS, EVENTS.PASTE, EVENTS.CHANGE, EVENTS.INPUT].map(eventHandler),
680
- _map2 = _slicedToArray(_map, 6),
681
- handleKeyup = _map2[0],
682
- handleKeydown = _map2[1],
683
- handleKeyPress = _map2[2],
684
- handlePaste = _map2[3],
685
- handleChange = _map2[4],
686
- handleInput = _map2[5]; // 输入法启用时
687
-
688
-
689
- function handleCompositionStart() {
690
- isCNInput.value = true;
691
- } // 输入法输入结束时
692
-
693
-
694
- function handleCompositionEnd(e) {
695
- isCNInput.value = false;
696
- handleInput(e);
697
- }
698
-
699
- function handleNumber(step) {
700
- var INC = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
701
-
702
- var _a;
703
-
704
- var numStep = parseInt(String(step), 10);
705
- var precision = Number.isInteger(props.precision) ? props.precision : 0;
706
- var val = parseFloat(((_a = props.modelValue) !== null && _a !== void 0 ? _a : 0).toString());
707
- var factor = Number.isInteger(numStep) ? numStep : 1;
708
- var newVal = val + (INC ? factor : -1 * factor);
709
-
710
- if (Number.isInteger(props.max)) {
711
- newVal = Math.min(newVal, props.max);
712
- }
713
-
714
- if (Number.isInteger(props.min)) {
715
- newVal = Math.max(newVal, props.min);
716
- }
717
-
718
- return +newVal.toFixed(precision);
719
- }
720
-
721
- function handleInc() {
722
- if (props.disabled) return;
723
- var newVal = handleNumber(props.step);
724
- ctx.emit(EVENTS.UPDATE, newVal);
725
- ctx.emit(EVENTS.CHANGE, newVal);
726
- }
727
-
728
- function handleDec() {
729
- if (props.disabled) return;
730
- var newVal = handleNumber(props.step, false);
731
- ctx.emit(EVENTS.UPDATE, newVal);
732
- ctx.emit(EVENTS.CHANGE, newVal);
733
- }
734
-
735
- function getCls(name) {
736
- return "".concat(inputClsPrefix.value, "--").concat(name);
737
- }
738
-
739
- function handleVisibleChange() {
740
- pwdVisible.value = !pwdVisible.value;
741
- }
742
-
743
- var bindProps = (0,external_vue_.computed)(function () {
744
- var val = typeof props.modelValue === 'undefined' || props.modelValue === null ? {} : {
745
- value: props.modelValue
746
- };
747
- return Object.assign(Object.assign({}, val), {
748
- maxlength: props.maxlength,
749
- placeholder: props.placeholder,
750
- readonly: props.readonly,
751
- disabled: props.disabled
752
- });
753
- });
754
- var eventListener = {
755
- onInput: handleInput,
756
- onFocus: handleFocus,
757
- onBlur: handleBlur,
758
- onPaste: handlePaste,
759
- onChange: handleChange,
760
- onKeypress: handleKeyPress,
761
- onKeydown: handleKeydown,
762
- onKeyup: handleKeyup,
763
- onCompositionstart: handleCompositionStart,
764
- onCompositionend: handleCompositionEnd
765
- };
766
- return function () {
767
- var _a, _b, _c, _d, _e, _f, _g;
768
-
769
- return (0,external_vue_.createVNode)("div", {
770
- "class": inputCls.value,
771
- "style": style
772
- }, [(_c = (_b = (_a = ctx.slots) === null || _a === void 0 ? void 0 : _a.prefix) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : props.prefix && (0,external_vue_.createVNode)("div", {
773
- "class": getCls('prefix-area')
774
- }, [(0,external_vue_.createVNode)("span", {
775
- "class": getCls('prefix-area--text')
776
- }, [props.prefix])]), isTextArea.value ? (0,external_vue_.createVNode)("textarea", (0,external_vue_.mergeProps)({
777
- "ref": inputRef,
778
- "spellcheck": false
779
- }, inputAttrs, eventListener, bindProps.value, {
780
- "rows": props.rows
781
- }), null) : (0,external_vue_.createVNode)("input", (0,external_vue_.mergeProps)({
782
- "spellcheck": false
783
- }, inputAttrs, {
784
- "ref": inputRef,
785
- "class": "".concat(inputClsPrefix.value, "--text"),
786
- "type": pwdVisible.value && props.type === 'password' ? 'text' : props.type,
787
- "step": props.step,
788
- "max": props.max,
789
- "min": props.min
790
- }, eventListener, bindProps.value), null), !isTextArea.value && props.clearable && !!props.modelValue && (0,external_vue_.createVNode)("span", {
791
- "class": clearCls.value,
792
- "onClick": clear
793
- }, [(0,external_vue_.createVNode)(external_icon_.Close, null, null)]), suffixIcon.value, typeof props.maxlength === 'number' && (props.showWordLimit || isTextArea.value) && (0,external_vue_.createVNode)("p", {
794
- "class": getCls('max-length')
795
- }, [((_d = props.modelValue) !== null && _d !== void 0 ? _d : '').toString().length, (0,external_vue_.createTextVNode)("/"), (0,external_vue_.createVNode)("span", null, [ceilMaxLength.value])]), isNumberInput.value && props.showControl && (0,external_vue_.createVNode)("div", {
796
- "class": getCls('number-control')
797
- }, [(0,external_vue_.createVNode)(external_icon_.DownSmall, {
798
- "class": incControlCls.value,
799
- "onClick": handleInc
800
- }, null), (0,external_vue_.createVNode)(external_icon_.DownSmall, {
801
- "class": decControlCls.value,
802
- "onClick": handleDec
803
- }, null)]), (_g = (_f = (_e = ctx.slots) === null || _e === void 0 ? void 0 : _e.suffix) === null || _f === void 0 ? void 0 : _f.call(_e)) !== null && _g !== void 0 ? _g : props.suffix && (0,external_vue_.createVNode)("div", {
804
- "class": getCls('suffix-area')
805
- }, [(0,external_vue_.createVNode)("span", {
806
- "class": getCls('suffix-area--text')
807
- }, [props.suffix])])]);
808
- };
809
- }
810
- }));
811
- ;// CONCATENATED MODULE: ../../packages/input/src/index.ts
812
- /*
813
- * Tencent is pleased to support the open source community by making
814
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
815
- *
816
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
817
- *
818
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
819
- *
820
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
821
- *
822
- * ---------------------------------------------------
823
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
824
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
825
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
826
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
827
- *
828
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
829
- * the Software.
830
- *
831
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
832
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
833
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
834
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
835
- * IN THE SOFTWARE.
836
- */
837
-
838
-
839
- var BkInput = (0,external_shared_.withInstall)(input);
840
- /* harmony default export */ const src = (BkInput);
841
- })();
842
-
843
- /******/ return __webpack_exports__;
844
- /******/ })()
845
- ;
846
- });
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}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,a),r.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{a.r(l),a.d(l,{default:()=>v});var e=a(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=a(748);Object.create,Object.create;var n,i,u=a(6870),s={type:e.PropTypes.string.def("text"),clearable:e.PropTypes.bool,disabled:e.PropTypes.bool,readonly:e.PropTypes.bool,placeholder:e.PropTypes.string.def("Enter"),prefixIcon:e.PropTypes.string,suffixIcon:e.PropTypes.string,suffix:e.PropTypes.string,prefix:e.PropTypes.string,step:e.PropTypes.integer,max:e.PropTypes.integer,min:e.PropTypes.integer,maxlength:e.PropTypes.integer,behavior:(0,e.InputBehaviorType)(),showWordLimit:e.PropTypes.bool,showControl:e.PropTypes.bool.def(!0),showClearOnlyHover:e.PropTypes.bool.def(!0),precision:e.PropTypes.number.def(0).validate((function(e){return e>=0&&e<20})),modelValue:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]),size:e.PropTypes.size(),rows:e.PropTypes.number,selectReadonly:e.PropTypes.bool.def(!1),withValidate:e.PropTypes.bool.def(!0)};function c(e,t){return!0}function p(e){return e}!function(e){e.UPDATE="update:modelValue",e.FOCUS="focus",e.BLUR="blur",e.CHANGE="change",e.CLEAR="clear",e.INPUT="input",e.KEYPRESS="keypress",e.KEYDOWN="keydown",e.KEYUP="keyup",e.ENTER="enter",e.PASTE="paste",e.COMPOSITIONSTART="compositionstart",e.COMPOSITIONUPDATE="compositionupdate",e.COMPOSITIONEND="compositionend"}(i||(i={}));var d=(r(n={},i.UPDATE,c),r(n,i.FOCUS,(function(e){return e})),r(n,i.BLUR,(function(e){return e})),r(n,i.CHANGE,c),r(n,i.CLEAR,(function(){return!0})),r(n,i.INPUT,c),r(n,i.KEYPRESS,c),r(n,i.KEYDOWN,c),r(n,i.KEYUP,c),r(n,i.ENTER,c),r(n,i.PASTE,c),r(n,i.COMPOSITIONSTART,p),r(n,i.COMPOSITIONUPDATE,p),r(n,i.COMPOSITIONEND,p),n);const f=(0,o.defineComponent)({name:"Input",inheritAttrs:!1,props:s,emits:d,setup:function(n,a){var l=(0,e.useFormItem)(),s=(0,o.ref)(!1),c=(0,o.ref)(!1),p=(0,o.computed)((function(){return"textarea"===n.type})),d=(0,o.computed)((function(){return p.value?(0,e.resolveClassName)("textarea"):(0,e.resolveClassName)("input")})),f=a.attrs,v=f.class,m=f.style,y=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}(f,["class","style"]),b=(0,o.ref)(),P=(0,o.computed)((function(){var t;return(0,e.classes)((r(t={},"".concat(d.value,"--").concat(n.size),!!n.size),r(t,"is-focused",s.value),r(t,"is-readonly",n.readonly&&!n.selectReadonly),r(t,"is-disabled",n.disabled),r(t,"is-simplicity","simplicity"===n.behavior),r(t,"".concat(v),!!v),t),d.value)})),T={search:function(){return(0,o.createVNode)(u.Search,null,null)},password:function(){return(0,o.createVNode)(u.Eye,{onClick:L},null)}},g=G("suffix-icon"),x=(0,o.computed)((function(){var e=T[n.type];return E.value?(0,o.createVNode)(u.Unvisible,{onClick:L,class:g},null):e?(0,o.createVNode)(e,{class:g},null):null})),h=(0,o.computed)((function(){return"number"===n.type})),N=(0,o.computed)((function(){return Math.floor(n.maxlength)})),E=(0,o.ref)(!1),O=(0,o.computed)((function(){return(0,e.classes)(r({"show-clear-only-hover":n.showClearOnlyHover},"".concat(d.value,"--clear-icon"),!0),g)})),C=(0,o.computed)((function(){return(0,e.classes)({"is-disabled":n.disabled||n.modelValue>=n.max})})),S=(0,o.computed)((function(){return(0,e.classes)({"is-disabled":n.disabled||n.modelValue<=n.min})}));function I(){if(!n.disabled){var e=h.value?n.min:"";a.emit(i.UPDATE,e),a.emit(i.CHANGE,e),a.emit(i.CLEAR)}}(0,o.watch)((function(){return n.modelValue}),(function(){var e;n.withValidate&&(null===(e=null==l?void 0:l.validate)||void 0===e||e.call(l,"change"))})),a.expose({focus:function(){b.value.focus()},clear:I});var V,A,w=(V=[i.KEYUP,i.KEYDOWN,i.KEYPRESS,i.PASTE,i.CHANGE,i.INPUT].map((function(e){return function(t){t.stopPropagation(),e!==i.KEYDOWN||"Enter"!==t.code&&"Enter"!==t.key&&13!==t.keyCode||a.emit(i.ENTER,t.target.value,t),c.value&&[i.INPUT,i.CHANGE].some((function(t){return e===t}))||(e===i.INPUT&&a.emit(i.UPDATE,h.value&&t.target.value?+t.target.value:t.target.value),a.emit(e,t.target.value,t))}})),A=6,function(e){if(Array.isArray(e))return e}(V)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,a=[],l=!0,i=!1;try{for(r=r.call(e);!(l=(o=r.next()).done)&&(a.push(o.value),!t||a.length!==t);l=!0);}catch(e){i=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(i)throw n}}return a}}(V,A)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,r):void 0}}(V,A)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),U=w[0],j=w[1],D=w[2],R=w[3],K=w[4],k=w[5];function M(e){var t,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=parseInt(String(e),10),a=Number.isInteger(n.precision)?n.precision:0,l=parseFloat((null!==(t=n.modelValue)&&void 0!==t?t:0).toString()),i=Number.isInteger(o)?o:1,u=l+(r?i:-1*i);return Number.isInteger(n.max)&&(u=Math.min(u,n.max)),Number.isInteger(n.min)&&(u=Math.max(u,n.min)),+u.toFixed(a)}function H(){if(!n.disabled){var e=M(n.step);a.emit(i.UPDATE,e),a.emit(i.CHANGE,e)}}function Y(){if(!n.disabled){var e=M(n.step,!1);a.emit(i.UPDATE,e),a.emit(i.CHANGE,e)}}function G(e){return"".concat(d.value,"--").concat(e)}function L(){E.value=!E.value}var F=(0,o.computed)((function(){var e=void 0===n.modelValue||null===n.modelValue?{}:{value:n.modelValue};return Object.assign(Object.assign({},e),{maxlength:n.maxlength,placeholder:n.placeholder,readonly:n.readonly,disabled:n.disabled})})),q={onInput:k,onFocus:function(e){s.value=!0,a.emit(i.FOCUS,e)},onBlur:function(e){var t;if(s.value=!1,a.emit(i.BLUR,e),h.value&&Number.isInteger(parseInt(e.target.value,10))&&(e.target.value>n.max||e.target.value<n.min)){var r=e.target.value>n.max?n.max:n.min;a.emit(i.UPDATE,r),a.emit(i.CHANGE,r)}n.withValidate&&(null===(t=null==l?void 0:l.validate)||void 0===t||t.call(l,"blur"))},onPaste:R,onChange:K,onKeypress:D,onKeydown:j,onKeyup:U,onCompositionstart:function(){c.value=!0},onCompositionend:function(e){c.value=!1,k(e)}};return function(){var e,t,r,l,i,s,c;return(0,o.createVNode)("div",{class:P.value,style:m},[null!==(r=null===(t=null===(e=a.slots)||void 0===e?void 0:e.prefix)||void 0===t?void 0:t.call(e))&&void 0!==r?r:n.prefix&&(0,o.createVNode)("div",{class:G("prefix-area")},[(0,o.createVNode)("span",{class:G("prefix-area--text")},[n.prefix])]),p.value?(0,o.createVNode)("textarea",(0,o.mergeProps)({ref:b,spellcheck:!1},y,q,F.value,{rows:n.rows}),null):(0,o.createVNode)("input",(0,o.mergeProps)({spellcheck:!1},y,{ref:b,class:"".concat(d.value,"--text"),type:E.value&&"password"===n.type?"text":n.type,step:n.step,max:n.max,min:n.min},q,F.value),null),!p.value&&n.clearable&&!!n.modelValue&&(0,o.createVNode)("span",{class:O.value,onClick:I},[(0,o.createVNode)(u.Close,null,null)]),x.value,"number"==typeof n.maxlength&&(n.showWordLimit||p.value)&&(0,o.createVNode)("p",{class:G("max-length")},[(null!==(l=n.modelValue)&&void 0!==l?l:"").toString().length,(0,o.createTextVNode)("/"),(0,o.createVNode)("span",null,[N.value])]),h.value&&n.showControl&&(0,o.createVNode)("div",{class:G("number-control")},[(0,o.createVNode)(u.DownSmall,{class:C.value,onClick:H},null),(0,o.createVNode)(u.DownSmall,{class:S.value,onClick:Y},null)]),null!==(c=null===(s=null===(i=a.slots)||void 0===i?void 0:i.suffix)||void 0===s?void 0:s.call(i))&&void 0!==c?c:n.suffix&&(0,o.createVNode)("div",{class:G("suffix-area")},[(0,o.createVNode)("span",{class:G("suffix-area--text")},[n.suffix])])])}}}),v=(0,e.withInstall)(f)})(),l})()));