Skip to content

Commit

Permalink
2.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
obetomuniz committed Jan 28, 2022
1 parent 2f70c7a commit 9698b11
Show file tree
Hide file tree
Showing 6 changed files with 11,386 additions and 44 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clipboard",
"version": "2.0.8",
"version": "2.0.9",
"description": "Modern copy to clipboard. No Flash. Just 3kb",
"license": "MIT",
"main": "dist/clipboard.js",
Expand Down
45 changes: 28 additions & 17 deletions dist/clipboard.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* clipboard.js v2.0.8
* clipboard.js v2.0.9
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
Expand All @@ -17,7 +17,7 @@
return /******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ 747:
/***/ 686:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
Expand Down Expand Up @@ -49,12 +49,12 @@ function command(type) {
return false;
}
}
;// CONCATENATED MODULE: ./src/clipboard-action-cut.js
;// CONCATENATED MODULE: ./src/actions/cut.js


/**
* Cut action wrapper.
* @param {HTMLElement} target
* @param {String|HTMLElement} target
* @return {String}
*/

Expand All @@ -64,7 +64,7 @@ var ClipboardActionCut = function ClipboardActionCut(target) {
return selectedText;
};

/* harmony default export */ var clipboard_action_cut = (ClipboardActionCut);
/* harmony default export */ var actions_cut = (ClipboardActionCut);
;// CONCATENATED MODULE: ./src/common/create-fake-element.js
/**
* Creates a fake textarea element with a value.
Expand All @@ -90,7 +90,7 @@ function createFakeElement(value) {
fakeElement.value = value;
return fakeElement;
}
;// CONCATENATED MODULE: ./src/clipboard-action-copy.js
;// CONCATENATED MODULE: ./src/actions/copy.js



Expand Down Expand Up @@ -121,8 +121,8 @@ var ClipboardActionCopy = function ClipboardActionCopy(target) {
return selectedText;
};

/* harmony default export */ var clipboard_action_copy = (ClipboardActionCopy);
;// CONCATENATED MODULE: ./src/clipboard-action-default.js
/* harmony default export */ var actions_copy = (ClipboardActionCopy);
;// CONCATENATED MODULE: ./src/actions/default.js
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); }


Expand Down Expand Up @@ -163,20 +163,20 @@ var ClipboardActionDefault = function ClipboardActionDefault() {


if (text) {
return clipboard_action_copy(text, {
return actions_copy(text, {
container: container
});
} // Defines which selection strategy based on `target` property.


if (target) {
return action === 'cut' ? clipboard_action_cut(target) : clipboard_action_copy(target, {
return action === 'cut' ? actions_cut(target) : actions_copy(target, {
container: container
});
}
};

/* harmony default export */ var clipboard_action_default = (ClipboardActionDefault);
/* harmony default export */ var actions_default = (ClipboardActionDefault);
;// CONCATENATED MODULE: ./src/clipboard.js
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); }

Expand Down Expand Up @@ -241,8 +241,6 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
_classCallCheck(this, Clipboard);

_this = _super.call(this);
_this.ClipboardActionCut = clipboard_action_cut.bind(_assertThisInitialized(_this));
_this.ClipboardActionCopy = clipboard_action_copy.bind(_assertThisInitialized(_this));

_this.resolveOptions(options);

Expand Down Expand Up @@ -289,7 +287,7 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
key: "onClick",
value: function onClick(e) {
var trigger = e.delegateTarget || e.currentTarget;
var selectedText = clipboard_action_default({
var selectedText = actions_default({
action: this.action(trigger),
container: this.container,
target: this.target(trigger),
Expand Down Expand Up @@ -334,6 +332,13 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
return document.querySelector(selector);
}
}
/**
* Allow fire programmatically a copy action
* @param {String|HTMLElement} target
* @param {Object} options
* @returns Text copied.
*/

}, {
key: "defaultText",

Expand All @@ -359,12 +364,18 @@ var Clipboard = /*#__PURE__*/function (_Emitter) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
container: document.body
};
return clipboard_action_copy(target, options);
return actions_copy(target, options);
}
/**
* Allow fire programmatically a cut action
* @param {String|HTMLElement} target
* @returns Text cutted.
*/

}, {
key: "cut",
value: function cut(target) {
return clipboard_action_cut(target);
return actions_cut(target);
}
/**
* Returns the support of the given action, or all actions if no action is
Expand Down Expand Up @@ -858,7 +869,7 @@ module.exports.TinyEmitter = E;
/******/ // module exports must be returned from runtime so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports
/******/ return __webpack_require__(747);
/******/ return __webpack_require__(686);
/******/ })()
.default;
});
2 changes: 1 addition & 1 deletion dist/clipboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9698b11

Please sign in to comment.