1
1
/*!
2
- * clipboard.js v2.0.8
2
+ * clipboard.js v2.0.9
3
3
* https://clipboardjs.com/
4
4
*
5
5
* Licensed MIT © Zeno Rocha
17
17
return /******/ ( function ( ) { // webpackBootstrap
18
18
/******/ var __webpack_modules__ = ( {
19
19
20
- /***/ 747 :
20
+ /***/ 686 :
21
21
/***/ ( function ( __unused_webpack_module , __webpack_exports__ , __webpack_require__ ) {
22
22
23
23
"use strict" ;
@@ -49,12 +49,12 @@ function command(type) {
49
49
return false ;
50
50
}
51
51
}
52
- ; // CONCATENATED MODULE: ./src/clipboard-action- cut.js
52
+ ; // CONCATENATED MODULE: ./src/actions/ cut.js
53
53
54
54
55
55
/**
56
56
* Cut action wrapper.
57
- * @param {HTMLElement } target
57
+ * @param {String| HTMLElement } target
58
58
* @return {String }
59
59
*/
60
60
@@ -64,7 +64,7 @@ var ClipboardActionCut = function ClipboardActionCut(target) {
64
64
return selectedText ;
65
65
} ;
66
66
67
- /* harmony default export */ var clipboard_action_cut = ( ClipboardActionCut ) ;
67
+ /* harmony default export */ var actions_cut = ( ClipboardActionCut ) ;
68
68
; // CONCATENATED MODULE: ./src/common/create-fake-element.js
69
69
/**
70
70
* Creates a fake textarea element with a value.
@@ -90,7 +90,7 @@ function createFakeElement(value) {
90
90
fakeElement . value = value ;
91
91
return fakeElement ;
92
92
}
93
- ; // CONCATENATED MODULE: ./src/clipboard-action- copy.js
93
+ ; // CONCATENATED MODULE: ./src/actions/ copy.js
94
94
95
95
96
96
@@ -121,8 +121,8 @@ var ClipboardActionCopy = function ClipboardActionCopy(target) {
121
121
return selectedText ;
122
122
} ;
123
123
124
- /* harmony default export */ var clipboard_action_copy = ( ClipboardActionCopy ) ;
125
- ; // CONCATENATED MODULE: ./src/clipboard-action- default.js
124
+ /* harmony default export */ var actions_copy = ( ClipboardActionCopy ) ;
125
+ ; // CONCATENATED MODULE: ./src/actions/ default.js
126
126
function _typeof ( obj ) { "@babel/helpers - typeof" ; if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
127
127
128
128
@@ -163,20 +163,20 @@ var ClipboardActionDefault = function ClipboardActionDefault() {
163
163
164
164
165
165
if ( text ) {
166
- return clipboard_action_copy ( text , {
166
+ return actions_copy ( text , {
167
167
container : container
168
168
} ) ;
169
169
} // Defines which selection strategy based on `target` property.
170
170
171
171
172
172
if ( target ) {
173
- return action === 'cut' ? clipboard_action_cut ( target ) : clipboard_action_copy ( target , {
173
+ return action === 'cut' ? actions_cut ( target ) : actions_copy ( target , {
174
174
container : container
175
175
} ) ;
176
176
}
177
177
} ;
178
178
179
- /* harmony default export */ var clipboard_action_default = ( ClipboardActionDefault ) ;
179
+ /* harmony default export */ var actions_default = ( ClipboardActionDefault ) ;
180
180
; // CONCATENATED MODULE: ./src/clipboard.js
181
181
function clipboard_typeof ( obj ) { "@babel/helpers - typeof" ; if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { clipboard_typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { clipboard_typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return clipboard_typeof ( obj ) ; }
182
182
@@ -241,8 +241,6 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
241
241
_classCallCheck ( this , Clipboard ) ;
242
242
243
243
_this = _super . call ( this ) ;
244
- _this . ClipboardActionCut = clipboard_action_cut . bind ( _assertThisInitialized ( _this ) ) ;
245
- _this . ClipboardActionCopy = clipboard_action_copy . bind ( _assertThisInitialized ( _this ) ) ;
246
244
247
245
_this . resolveOptions ( options ) ;
248
246
@@ -289,7 +287,7 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
289
287
key : "onClick" ,
290
288
value : function onClick ( e ) {
291
289
var trigger = e . delegateTarget || e . currentTarget ;
292
- var selectedText = clipboard_action_default ( {
290
+ var selectedText = actions_default ( {
293
291
action : this . action ( trigger ) ,
294
292
container : this . container ,
295
293
target : this . target ( trigger ) ,
@@ -334,6 +332,13 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
334
332
return document . querySelector ( selector ) ;
335
333
}
336
334
}
335
+ /**
336
+ * Allow fire programmatically a copy action
337
+ * @param {String|HTMLElement } target
338
+ * @param {Object } options
339
+ * @returns Text copied.
340
+ */
341
+
337
342
} , {
338
343
key : "defaultText" ,
339
344
@@ -359,12 +364,18 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
359
364
var options = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : {
360
365
container : document . body
361
366
} ;
362
- return clipboard_action_copy ( target , options ) ;
367
+ return actions_copy ( target , options ) ;
363
368
}
369
+ /**
370
+ * Allow fire programmatically a cut action
371
+ * @param {String|HTMLElement } target
372
+ * @returns Text cutted.
373
+ */
374
+
364
375
} , {
365
376
key : "cut" ,
366
377
value : function cut ( target ) {
367
- return clipboard_action_cut ( target ) ;
378
+ return actions_cut ( target ) ;
368
379
}
369
380
/**
370
381
* Returns the support of the given action, or all actions if no action is
@@ -858,7 +869,7 @@ module.exports.TinyEmitter = E;
858
869
/******/ // module exports must be returned from runtime so entry inlining is disabled
859
870
/******/ // startup
860
871
/******/ // Load entry module and return exports
861
- /******/ return __webpack_require__ ( 747 ) ;
872
+ /******/ return __webpack_require__ ( 686 ) ;
862
873
/******/ } ) ( )
863
874
. default ;
864
875
} ) ;
0 commit comments