@jeecg/online 3.4.3 → 3.4.4-beta2

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 (75) hide show
  1. package/AuthButtonConfig.js +2 -1
  2. package/AuthButtonTree.js +2 -1
  3. package/AuthDataConfig.js +2 -1
  4. package/AuthDataTree.js +2 -1
  5. package/AuthFieldConfig.js +3 -2
  6. package/AuthFieldTree.js +2 -1
  7. package/AuthManagerDrawer.js +2 -1
  8. package/AuthSetterModal.js +2 -1
  9. package/CgformCopyList.js +5 -1
  10. package/CgformModal.js +19 -2
  11. package/CgreportModal.js +1 -0
  12. package/CheckDictTable.js +2 -2
  13. package/CodeFileListModal.js +2 -1
  14. package/CodeFileViewModal.js +2 -1
  15. package/CodeGeneratorModal.js +2 -1
  16. package/CustomButtonList.js +2 -1
  17. package/DBAttributeTable.js +2 -2
  18. package/DbToOnlineModal.js +2 -1
  19. package/DetailForm.js +4 -2
  20. package/EnhanceJavaModal.js +2 -1
  21. package/EnhanceJsHistory.js +1 -1
  22. package/EnhanceJsModal.js +2 -1
  23. package/EnhanceSqlModal.js +2 -1
  24. package/ExtendConfigModal.js +3 -3
  25. package/FieldExtendJsonModal.js +270 -0
  26. package/FileSelectModal.js +2 -1
  27. package/ForeignKeyTable.js +2 -2
  28. package/FormSchemaFactory.js +150 -10
  29. package/IndexTable.js +2 -2
  30. package/JModalTip.js +2 -2
  31. package/JOnlineSearchSelect.js +115 -0
  32. package/LICENSE +7 -0
  33. package/LeftDepart.js +2 -2
  34. package/LeftRole.js +2 -1
  35. package/LeftUser.js +2 -1
  36. package/LinkTableConfigModal.js +2 -1
  37. package/LinkTableFieldConfigModal.js +2 -1
  38. package/LinkTableListPiece.js +2 -2
  39. package/ModalFormDemo.js +2 -1
  40. package/OnlineAutoList.js +7 -4
  41. package/OnlineAutoModal.js +4 -2
  42. package/OnlineAutoTreeList.js +7 -4
  43. package/OnlineCustomModal.js +5 -3
  44. package/OnlineDetailModal.js +5 -3
  45. package/OnlineForm.js +49 -39
  46. package/OnlineFormDetail.js +4 -2
  47. package/OnlineQueryForm.js +12 -6
  48. package/OnlineSearchFormItem.js +8 -5
  49. package/OnlineSelectCascade.js +228 -0
  50. package/OnlineSubFormDetail.js +4 -2
  51. package/PageAttributeTable.js +70 -28
  52. package/ProcessOnlineForm.js +4 -2
  53. package/QueryTable.js +2 -2
  54. package/README.md +6 -1
  55. package/{OnlineSuperQuery.js → SuperQuery.js} +216 -128
  56. package/{OnlineSuperQueryValComponent.js → SuperQueryValComponent.js} +2 -2
  57. package/{OnlineSuperQueryValComponent.vue_vue_type_script_lang.js → SuperQueryValComponent.vue_vue_type_script_lang.js} +8 -2
  58. package/_arrayPush.js +1 -1
  59. package/_baseClone.js +1 -1
  60. package/_flatRest.js +1 -1
  61. package/cgform.data.js +8 -8
  62. package/clipboard.js +565 -0
  63. package/index.js +37 -340
  64. package/index2.js +8 -4
  65. package/index3.js +33 -571
  66. package/isArray.js +1 -1
  67. package/main.index.js +3 -3
  68. package/omit.js +1 -1
  69. package/package.json +1 -1
  70. package/pick.js +1 -1
  71. package/style.css +1 -1
  72. package/toString.js +1 -1
  73. package/useAutoForm.js +22 -5
  74. package/useCgformList.js +97 -5
  75. package/OnlCgReportList.js +0 -34
package/_baseClone.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { g as getNative, c as isObject, h as baseAssignValue, d as assignValue, i as isLength, j as isFunction, b as isArguments, a as isIndex, L as ListCache, k as Map, M as MapCache, f as arrayPush, t as toSource } from "./_arrayPush.js";
2
- import { r as root, a as isObjectLike, b as baseGetTag, f as freeGlobal, i as isArray, S as Symbol$1 } from "./isArray.js";
2
+ import { r as root, i as isObjectLike, b as baseGetTag, f as freeGlobal, a as isArray, S as Symbol$1 } from "./isArray.js";
3
3
  var WeakMap = getNative(root, "WeakMap");
4
4
  var WeakMap$1 = WeakMap;
5
5
  var objectCreate = Object.create;
package/_flatRest.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as isArray, S as Symbol$1 } from "./isArray.js";
1
+ import { a as isArray, S as Symbol$1 } from "./isArray.js";
2
2
  import { i as isSymbol, t as toString } from "./toString.js";
3
3
  import { e as defineProperty, M as MapCache, b as isArguments, f as arrayPush } from "./_arrayPush.js";
4
4
  function identity(value) {
package/cgform.data.js CHANGED
@@ -104,7 +104,7 @@ function useInitialData() {
104
104
  isShowList: "0",
105
105
  isReadOnly: "1",
106
106
  fieldShowType: "text",
107
- fieldLength: "120",
107
+ fieldLength: "200",
108
108
  queryMode: "single",
109
109
  dbIsSync: "1"
110
110
  },
@@ -120,7 +120,7 @@ function useInitialData() {
120
120
  isShowForm: "0",
121
121
  isShowList: "0",
122
122
  fieldShowType: "text",
123
- fieldLength: "120",
123
+ fieldLength: "200",
124
124
  queryMode: "single",
125
125
  dbIsSync: "1"
126
126
  },
@@ -136,7 +136,7 @@ function useInitialData() {
136
136
  isShowForm: "0",
137
137
  isShowList: "0",
138
138
  fieldShowType: "datetime",
139
- fieldLength: "120",
139
+ fieldLength: "200",
140
140
  queryMode: "single",
141
141
  dbIsSync: "1"
142
142
  },
@@ -152,7 +152,7 @@ function useInitialData() {
152
152
  isShowForm: "0",
153
153
  isShowList: "0",
154
154
  fieldShowType: "text",
155
- fieldLength: "120",
155
+ fieldLength: "200",
156
156
  queryMode: "single",
157
157
  dbIsSync: "1"
158
158
  },
@@ -168,7 +168,7 @@ function useInitialData() {
168
168
  isShowForm: "0",
169
169
  isShowList: "0",
170
170
  fieldShowType: "datetime",
171
- fieldLength: "120",
171
+ fieldLength: "200",
172
172
  queryMode: "single",
173
173
  dbIsSync: "1"
174
174
  },
@@ -184,7 +184,7 @@ function useInitialData() {
184
184
  isShowForm: "0",
185
185
  isShowList: "0",
186
186
  fieldShowType: "text",
187
- fieldLength: "120",
187
+ fieldLength: "200",
188
188
  queryMode: "single",
189
189
  dbIsSync: "1"
190
190
  }
@@ -210,7 +210,7 @@ function useTreeNeedFields() {
210
210
  isShowForm: "1",
211
211
  isShowList: "0",
212
212
  fieldShowType: "text",
213
- fieldLength: "120",
213
+ fieldLength: "200",
214
214
  queryMode: "single",
215
215
  dbIsSync: "1"
216
216
  },
@@ -226,7 +226,7 @@ function useTreeNeedFields() {
226
226
  isShowForm: "0",
227
227
  isShowList: "0",
228
228
  fieldShowType: "list",
229
- fieldLength: "120",
229
+ fieldLength: "200",
230
230
  queryMode: "single",
231
231
  dictField: "yn",
232
232
  dbIsSync: "1"
package/clipboard.js ADDED
@@ -0,0 +1,565 @@
1
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./_commonjsHelpers.js";
2
+ var clipboard = { exports: {} };
3
+ /*!
4
+ * clipboard.js v2.0.11
5
+ * https://clipboardjs.com/
6
+ *
7
+ * Licensed MIT © Zeno Rocha
8
+ */
9
+ (function(module, exports) {
10
+ (function webpackUniversalModuleDefinition(root, factory) {
11
+ module.exports = factory();
12
+ })(commonjsGlobal, function() {
13
+ return function() {
14
+ var __webpack_modules__ = {
15
+ 686: function(__unused_webpack_module, __webpack_exports__, __webpack_require__2) {
16
+ __webpack_require__2.d(__webpack_exports__, {
17
+ "default": function() {
18
+ return clipboard2;
19
+ }
20
+ });
21
+ var tiny_emitter = __webpack_require__2(279);
22
+ var tiny_emitter_default = /* @__PURE__ */ __webpack_require__2.n(tiny_emitter);
23
+ var listen = __webpack_require__2(370);
24
+ var listen_default = /* @__PURE__ */ __webpack_require__2.n(listen);
25
+ var src_select = __webpack_require__2(817);
26
+ var select_default = /* @__PURE__ */ __webpack_require__2.n(src_select);
27
+ function command(type) {
28
+ try {
29
+ return document.execCommand(type);
30
+ } catch (err) {
31
+ return false;
32
+ }
33
+ }
34
+ var ClipboardActionCut = function ClipboardActionCut2(target) {
35
+ var selectedText = select_default()(target);
36
+ command("cut");
37
+ return selectedText;
38
+ };
39
+ var actions_cut = ClipboardActionCut;
40
+ function createFakeElement(value) {
41
+ var isRTL = document.documentElement.getAttribute("dir") === "rtl";
42
+ var fakeElement = document.createElement("textarea");
43
+ fakeElement.style.fontSize = "12pt";
44
+ fakeElement.style.border = "0";
45
+ fakeElement.style.padding = "0";
46
+ fakeElement.style.margin = "0";
47
+ fakeElement.style.position = "absolute";
48
+ fakeElement.style[isRTL ? "right" : "left"] = "-9999px";
49
+ var yPosition = window.pageYOffset || document.documentElement.scrollTop;
50
+ fakeElement.style.top = "".concat(yPosition, "px");
51
+ fakeElement.setAttribute("readonly", "");
52
+ fakeElement.value = value;
53
+ return fakeElement;
54
+ }
55
+ var fakeCopyAction = function fakeCopyAction2(value, options) {
56
+ var fakeElement = createFakeElement(value);
57
+ options.container.appendChild(fakeElement);
58
+ var selectedText = select_default()(fakeElement);
59
+ command("copy");
60
+ fakeElement.remove();
61
+ return selectedText;
62
+ };
63
+ var ClipboardActionCopy = function ClipboardActionCopy2(target) {
64
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
65
+ container: document.body
66
+ };
67
+ var selectedText = "";
68
+ if (typeof target === "string") {
69
+ selectedText = fakeCopyAction(target, options);
70
+ } else if (target instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(target === null || target === void 0 ? void 0 : target.type)) {
71
+ selectedText = fakeCopyAction(target.value, options);
72
+ } else {
73
+ selectedText = select_default()(target);
74
+ command("copy");
75
+ }
76
+ return selectedText;
77
+ };
78
+ var actions_copy = ClipboardActionCopy;
79
+ function _typeof(obj) {
80
+ "@babel/helpers - typeof";
81
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
82
+ _typeof = function _typeof2(obj2) {
83
+ return typeof obj2;
84
+ };
85
+ } else {
86
+ _typeof = function _typeof2(obj2) {
87
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
88
+ };
89
+ }
90
+ return _typeof(obj);
91
+ }
92
+ var ClipboardActionDefault = function ClipboardActionDefault2() {
93
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
94
+ var _options$action = options.action, action = _options$action === void 0 ? "copy" : _options$action, container = options.container, target = options.target, text = options.text;
95
+ if (action !== "copy" && action !== "cut") {
96
+ throw new Error('Invalid "action" value, use either "copy" or "cut"');
97
+ }
98
+ if (target !== void 0) {
99
+ if (target && _typeof(target) === "object" && target.nodeType === 1) {
100
+ if (action === "copy" && target.hasAttribute("disabled")) {
101
+ throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
102
+ }
103
+ if (action === "cut" && (target.hasAttribute("readonly") || target.hasAttribute("disabled"))) {
104
+ throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);
105
+ }
106
+ } else {
107
+ throw new Error('Invalid "target" value, use a valid Element');
108
+ }
109
+ }
110
+ if (text) {
111
+ return actions_copy(text, {
112
+ container
113
+ });
114
+ }
115
+ if (target) {
116
+ return action === "cut" ? actions_cut(target) : actions_copy(target, {
117
+ container
118
+ });
119
+ }
120
+ };
121
+ var actions_default = ClipboardActionDefault;
122
+ function clipboard_typeof(obj) {
123
+ "@babel/helpers - typeof";
124
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
125
+ clipboard_typeof = function _typeof2(obj2) {
126
+ return typeof obj2;
127
+ };
128
+ } else {
129
+ clipboard_typeof = function _typeof2(obj2) {
130
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
131
+ };
132
+ }
133
+ return clipboard_typeof(obj);
134
+ }
135
+ function _classCallCheck(instance, Constructor) {
136
+ if (!(instance instanceof Constructor)) {
137
+ throw new TypeError("Cannot call a class as a function");
138
+ }
139
+ }
140
+ function _defineProperties(target, props) {
141
+ for (var i = 0; i < props.length; i++) {
142
+ var descriptor = props[i];
143
+ descriptor.enumerable = descriptor.enumerable || false;
144
+ descriptor.configurable = true;
145
+ if ("value" in descriptor)
146
+ descriptor.writable = true;
147
+ Object.defineProperty(target, descriptor.key, descriptor);
148
+ }
149
+ }
150
+ function _createClass(Constructor, protoProps, staticProps) {
151
+ if (protoProps)
152
+ _defineProperties(Constructor.prototype, protoProps);
153
+ if (staticProps)
154
+ _defineProperties(Constructor, staticProps);
155
+ return Constructor;
156
+ }
157
+ function _inherits(subClass, superClass) {
158
+ if (typeof superClass !== "function" && superClass !== null) {
159
+ throw new TypeError("Super expression must either be null or a function");
160
+ }
161
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
162
+ if (superClass)
163
+ _setPrototypeOf(subClass, superClass);
164
+ }
165
+ function _setPrototypeOf(o, p) {
166
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
167
+ o2.__proto__ = p2;
168
+ return o2;
169
+ };
170
+ return _setPrototypeOf(o, p);
171
+ }
172
+ function _createSuper(Derived) {
173
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
174
+ return function _createSuperInternal() {
175
+ var Super = _getPrototypeOf(Derived), result;
176
+ if (hasNativeReflectConstruct) {
177
+ var NewTarget = _getPrototypeOf(this).constructor;
178
+ result = Reflect.construct(Super, arguments, NewTarget);
179
+ } else {
180
+ result = Super.apply(this, arguments);
181
+ }
182
+ return _possibleConstructorReturn(this, result);
183
+ };
184
+ }
185
+ function _possibleConstructorReturn(self, call) {
186
+ if (call && (clipboard_typeof(call) === "object" || typeof call === "function")) {
187
+ return call;
188
+ }
189
+ return _assertThisInitialized(self);
190
+ }
191
+ function _assertThisInitialized(self) {
192
+ if (self === void 0) {
193
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
194
+ }
195
+ return self;
196
+ }
197
+ function _isNativeReflectConstruct() {
198
+ if (typeof Reflect === "undefined" || !Reflect.construct)
199
+ return false;
200
+ if (Reflect.construct.sham)
201
+ return false;
202
+ if (typeof Proxy === "function")
203
+ return true;
204
+ try {
205
+ Date.prototype.toString.call(Reflect.construct(Date, [], function() {
206
+ }));
207
+ return true;
208
+ } catch (e) {
209
+ return false;
210
+ }
211
+ }
212
+ function _getPrototypeOf(o) {
213
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
214
+ return o2.__proto__ || Object.getPrototypeOf(o2);
215
+ };
216
+ return _getPrototypeOf(o);
217
+ }
218
+ function getAttributeValue(suffix, element) {
219
+ var attribute = "data-clipboard-".concat(suffix);
220
+ if (!element.hasAttribute(attribute)) {
221
+ return;
222
+ }
223
+ return element.getAttribute(attribute);
224
+ }
225
+ var Clipboard2 = /* @__PURE__ */ function(_Emitter) {
226
+ _inherits(Clipboard3, _Emitter);
227
+ var _super = _createSuper(Clipboard3);
228
+ function Clipboard3(trigger, options) {
229
+ var _this;
230
+ _classCallCheck(this, Clipboard3);
231
+ _this = _super.call(this);
232
+ _this.resolveOptions(options);
233
+ _this.listenClick(trigger);
234
+ return _this;
235
+ }
236
+ _createClass(Clipboard3, [{
237
+ key: "resolveOptions",
238
+ value: function resolveOptions() {
239
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
240
+ this.action = typeof options.action === "function" ? options.action : this.defaultAction;
241
+ this.target = typeof options.target === "function" ? options.target : this.defaultTarget;
242
+ this.text = typeof options.text === "function" ? options.text : this.defaultText;
243
+ this.container = clipboard_typeof(options.container) === "object" ? options.container : document.body;
244
+ }
245
+ }, {
246
+ key: "listenClick",
247
+ value: function listenClick(trigger) {
248
+ var _this2 = this;
249
+ this.listener = listen_default()(trigger, "click", function(e) {
250
+ return _this2.onClick(e);
251
+ });
252
+ }
253
+ }, {
254
+ key: "onClick",
255
+ value: function onClick(e) {
256
+ var trigger = e.delegateTarget || e.currentTarget;
257
+ var action = this.action(trigger) || "copy";
258
+ var text = actions_default({
259
+ action,
260
+ container: this.container,
261
+ target: this.target(trigger),
262
+ text: this.text(trigger)
263
+ });
264
+ this.emit(text ? "success" : "error", {
265
+ action,
266
+ text,
267
+ trigger,
268
+ clearSelection: function clearSelection() {
269
+ if (trigger) {
270
+ trigger.focus();
271
+ }
272
+ window.getSelection().removeAllRanges();
273
+ }
274
+ });
275
+ }
276
+ }, {
277
+ key: "defaultAction",
278
+ value: function defaultAction(trigger) {
279
+ return getAttributeValue("action", trigger);
280
+ }
281
+ }, {
282
+ key: "defaultTarget",
283
+ value: function defaultTarget(trigger) {
284
+ var selector = getAttributeValue("target", trigger);
285
+ if (selector) {
286
+ return document.querySelector(selector);
287
+ }
288
+ }
289
+ }, {
290
+ key: "defaultText",
291
+ value: function defaultText(trigger) {
292
+ return getAttributeValue("text", trigger);
293
+ }
294
+ }, {
295
+ key: "destroy",
296
+ value: function destroy() {
297
+ this.listener.destroy();
298
+ }
299
+ }], [{
300
+ key: "copy",
301
+ value: function copy(target) {
302
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
303
+ container: document.body
304
+ };
305
+ return actions_copy(target, options);
306
+ }
307
+ }, {
308
+ key: "cut",
309
+ value: function cut(target) {
310
+ return actions_cut(target);
311
+ }
312
+ }, {
313
+ key: "isSupported",
314
+ value: function isSupported() {
315
+ var action = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["copy", "cut"];
316
+ var actions = typeof action === "string" ? [action] : action;
317
+ var support = !!document.queryCommandSupported;
318
+ actions.forEach(function(action2) {
319
+ support = support && !!document.queryCommandSupported(action2);
320
+ });
321
+ return support;
322
+ }
323
+ }]);
324
+ return Clipboard3;
325
+ }(tiny_emitter_default());
326
+ var clipboard2 = Clipboard2;
327
+ },
328
+ 828: function(module2) {
329
+ var DOCUMENT_NODE_TYPE = 9;
330
+ if (typeof Element !== "undefined" && !Element.prototype.matches) {
331
+ var proto = Element.prototype;
332
+ proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;
333
+ }
334
+ function closest(element, selector) {
335
+ while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
336
+ if (typeof element.matches === "function" && element.matches(selector)) {
337
+ return element;
338
+ }
339
+ element = element.parentNode;
340
+ }
341
+ }
342
+ module2.exports = closest;
343
+ },
344
+ 438: function(module2, __unused_webpack_exports, __webpack_require__2) {
345
+ var closest = __webpack_require__2(828);
346
+ function _delegate(element, selector, type, callback, useCapture) {
347
+ var listenerFn = listener.apply(this, arguments);
348
+ element.addEventListener(type, listenerFn, useCapture);
349
+ return {
350
+ destroy: function() {
351
+ element.removeEventListener(type, listenerFn, useCapture);
352
+ }
353
+ };
354
+ }
355
+ function delegate(elements, selector, type, callback, useCapture) {
356
+ if (typeof elements.addEventListener === "function") {
357
+ return _delegate.apply(null, arguments);
358
+ }
359
+ if (typeof type === "function") {
360
+ return _delegate.bind(null, document).apply(null, arguments);
361
+ }
362
+ if (typeof elements === "string") {
363
+ elements = document.querySelectorAll(elements);
364
+ }
365
+ return Array.prototype.map.call(elements, function(element) {
366
+ return _delegate(element, selector, type, callback, useCapture);
367
+ });
368
+ }
369
+ function listener(element, selector, type, callback) {
370
+ return function(e) {
371
+ e.delegateTarget = closest(e.target, selector);
372
+ if (e.delegateTarget) {
373
+ callback.call(element, e);
374
+ }
375
+ };
376
+ }
377
+ module2.exports = delegate;
378
+ },
379
+ 879: function(__unused_webpack_module, exports2) {
380
+ exports2.node = function(value) {
381
+ return value !== void 0 && value instanceof HTMLElement && value.nodeType === 1;
382
+ };
383
+ exports2.nodeList = function(value) {
384
+ var type = Object.prototype.toString.call(value);
385
+ return value !== void 0 && (type === "[object NodeList]" || type === "[object HTMLCollection]") && "length" in value && (value.length === 0 || exports2.node(value[0]));
386
+ };
387
+ exports2.string = function(value) {
388
+ return typeof value === "string" || value instanceof String;
389
+ };
390
+ exports2.fn = function(value) {
391
+ var type = Object.prototype.toString.call(value);
392
+ return type === "[object Function]";
393
+ };
394
+ },
395
+ 370: function(module2, __unused_webpack_exports, __webpack_require__2) {
396
+ var is = __webpack_require__2(879);
397
+ var delegate = __webpack_require__2(438);
398
+ function listen(target, type, callback) {
399
+ if (!target && !type && !callback) {
400
+ throw new Error("Missing required arguments");
401
+ }
402
+ if (!is.string(type)) {
403
+ throw new TypeError("Second argument must be a String");
404
+ }
405
+ if (!is.fn(callback)) {
406
+ throw new TypeError("Third argument must be a Function");
407
+ }
408
+ if (is.node(target)) {
409
+ return listenNode(target, type, callback);
410
+ } else if (is.nodeList(target)) {
411
+ return listenNodeList(target, type, callback);
412
+ } else if (is.string(target)) {
413
+ return listenSelector(target, type, callback);
414
+ } else {
415
+ throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
416
+ }
417
+ }
418
+ function listenNode(node, type, callback) {
419
+ node.addEventListener(type, callback);
420
+ return {
421
+ destroy: function() {
422
+ node.removeEventListener(type, callback);
423
+ }
424
+ };
425
+ }
426
+ function listenNodeList(nodeList, type, callback) {
427
+ Array.prototype.forEach.call(nodeList, function(node) {
428
+ node.addEventListener(type, callback);
429
+ });
430
+ return {
431
+ destroy: function() {
432
+ Array.prototype.forEach.call(nodeList, function(node) {
433
+ node.removeEventListener(type, callback);
434
+ });
435
+ }
436
+ };
437
+ }
438
+ function listenSelector(selector, type, callback) {
439
+ return delegate(document.body, selector, type, callback);
440
+ }
441
+ module2.exports = listen;
442
+ },
443
+ 817: function(module2) {
444
+ function select(element) {
445
+ var selectedText;
446
+ if (element.nodeName === "SELECT") {
447
+ element.focus();
448
+ selectedText = element.value;
449
+ } else if (element.nodeName === "INPUT" || element.nodeName === "TEXTAREA") {
450
+ var isReadOnly = element.hasAttribute("readonly");
451
+ if (!isReadOnly) {
452
+ element.setAttribute("readonly", "");
453
+ }
454
+ element.select();
455
+ element.setSelectionRange(0, element.value.length);
456
+ if (!isReadOnly) {
457
+ element.removeAttribute("readonly");
458
+ }
459
+ selectedText = element.value;
460
+ } else {
461
+ if (element.hasAttribute("contenteditable")) {
462
+ element.focus();
463
+ }
464
+ var selection = window.getSelection();
465
+ var range = document.createRange();
466
+ range.selectNodeContents(element);
467
+ selection.removeAllRanges();
468
+ selection.addRange(range);
469
+ selectedText = selection.toString();
470
+ }
471
+ return selectedText;
472
+ }
473
+ module2.exports = select;
474
+ },
475
+ 279: function(module2) {
476
+ function E() {
477
+ }
478
+ E.prototype = {
479
+ on: function(name, callback, ctx) {
480
+ var e = this.e || (this.e = {});
481
+ (e[name] || (e[name] = [])).push({
482
+ fn: callback,
483
+ ctx
484
+ });
485
+ return this;
486
+ },
487
+ once: function(name, callback, ctx) {
488
+ var self = this;
489
+ function listener() {
490
+ self.off(name, listener);
491
+ callback.apply(ctx, arguments);
492
+ }
493
+ listener._ = callback;
494
+ return this.on(name, listener, ctx);
495
+ },
496
+ emit: function(name) {
497
+ var data = [].slice.call(arguments, 1);
498
+ var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
499
+ var i = 0;
500
+ var len = evtArr.length;
501
+ for (i; i < len; i++) {
502
+ evtArr[i].fn.apply(evtArr[i].ctx, data);
503
+ }
504
+ return this;
505
+ },
506
+ off: function(name, callback) {
507
+ var e = this.e || (this.e = {});
508
+ var evts = e[name];
509
+ var liveEvents = [];
510
+ if (evts && callback) {
511
+ for (var i = 0, len = evts.length; i < len; i++) {
512
+ if (evts[i].fn !== callback && evts[i].fn._ !== callback)
513
+ liveEvents.push(evts[i]);
514
+ }
515
+ }
516
+ liveEvents.length ? e[name] = liveEvents : delete e[name];
517
+ return this;
518
+ }
519
+ };
520
+ module2.exports = E;
521
+ module2.exports.TinyEmitter = E;
522
+ }
523
+ };
524
+ var __webpack_module_cache__ = {};
525
+ function __webpack_require__(moduleId) {
526
+ if (__webpack_module_cache__[moduleId]) {
527
+ return __webpack_module_cache__[moduleId].exports;
528
+ }
529
+ var module2 = __webpack_module_cache__[moduleId] = {
530
+ exports: {}
531
+ };
532
+ __webpack_modules__[moduleId](module2, module2.exports, __webpack_require__);
533
+ return module2.exports;
534
+ }
535
+ !function() {
536
+ __webpack_require__.n = function(module2) {
537
+ var getter = module2 && module2.__esModule ? function() {
538
+ return module2["default"];
539
+ } : function() {
540
+ return module2;
541
+ };
542
+ __webpack_require__.d(getter, { a: getter });
543
+ return getter;
544
+ };
545
+ }();
546
+ !function() {
547
+ __webpack_require__.d = function(exports2, definition) {
548
+ for (var key in definition) {
549
+ if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports2, key)) {
550
+ Object.defineProperty(exports2, key, { enumerable: true, get: definition[key] });
551
+ }
552
+ }
553
+ };
554
+ }();
555
+ !function() {
556
+ __webpack_require__.o = function(obj, prop) {
557
+ return Object.prototype.hasOwnProperty.call(obj, prop);
558
+ };
559
+ }();
560
+ return __webpack_require__(686);
561
+ }().default;
562
+ });
563
+ })(clipboard);
564
+ var Clipboard = /* @__PURE__ */ getDefaultExportFromCjs(clipboard.exports);
565
+ export { Clipboard as C };