ngx-clipboard
Advanced tools
Comparing version 12.0.1 to 12.1.0-beta0
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ngx-window-token'), require('@angular/common'), require('@angular/core')) : | ||
typeof define === 'function' && define.amd ? define('ngx-clipboard', ['exports', 'ngx-window-token', '@angular/common', '@angular/core'], factory) : | ||
(factory((global['ngx-clipboard'] = {}),global.i2,global.ng.common,global.ng.core)); | ||
}(this, (function (exports,i2,i1,i0) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ngx-window-token'), require('rxjs'), require('@angular/common'), require('@angular/core')) : | ||
typeof define === 'function' && define.amd ? define('ngx-clipboard', ['exports', 'ngx-window-token', 'rxjs', '@angular/common', '@angular/core'], factory) : | ||
(factory((global['ngx-clipboard'] = {}),global.i2,global.rxjs,global.ng.common,global.ng.core)); | ||
}(this, (function (exports,i2,rxjs,i1,i0) { 'use strict'; | ||
@@ -16,2 +16,4 @@ /** | ||
this.window = window; | ||
this.copySubject = new rxjs.Subject(); | ||
this.copyObservable$ = this.copySubject.asObservable(); | ||
} | ||
@@ -111,3 +113,3 @@ Object.defineProperty(ClipboardService.prototype, "isSupported", { | ||
} | ||
// check if the temp textarea is still belong the current container. | ||
// check if the temp textarea still belongs to the current container. | ||
// In case we have multiple places using ngx-clipboard, one is in a modal using container but the other one is not. | ||
@@ -240,2 +242,21 @@ if (this.tempTextArea && !container.contains(this.tempTextArea)) { | ||
}; | ||
/** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
*/ | ||
/** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
* @param {?} response | ||
* @return {?} | ||
*/ | ||
ClipboardService.prototype.pushCopyReponse = /** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
* @param {?} response | ||
* @return {?} | ||
*/ | ||
function (response) { | ||
this.copySubject.next(response); | ||
}; | ||
ClipboardService.decorators = [ | ||
@@ -325,8 +346,18 @@ { type: i0.Injectable, args: [{ providedIn: 'root' },] } | ||
function (succeeded, copiedContent, event) { | ||
/** @type {?} */ | ||
var response = { | ||
isSuccess: succeeded, | ||
event: event | ||
}; | ||
if (succeeded) { | ||
this.cbOnSuccess.emit({ isSuccess: true, content: copiedContent, event: event }); | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.cbOnSuccess.emit(response); | ||
} | ||
else { | ||
this.cbOnError.emit({ isSuccess: false, event: event }); | ||
this.cbOnError.emit(response); | ||
} | ||
this.clipboardSrv.pushCopyReponse(response); | ||
}; | ||
@@ -349,2 +380,3 @@ ClipboardDirective.decorators = [ | ||
cbContent: [{ type: i0.Input }], | ||
cbSuccessMsg: [{ type: i0.Input }], | ||
cbOnSuccess: [{ type: i0.Output }], | ||
@@ -361,2 +393,40 @@ cbOnError: [{ type: i0.Output }], | ||
*/ | ||
var ClipboardIfSupportedDirective = /** @class */ (function () { | ||
function ClipboardIfSupportedDirective(_clipboardService, _viewContainerRef, _templateRef) { | ||
this._clipboardService = _clipboardService; | ||
this._viewContainerRef = _viewContainerRef; | ||
this._templateRef = _templateRef; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
ClipboardIfSupportedDirective.prototype.ngOnInit = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
if (this._clipboardService.isSupported) { | ||
this._viewContainerRef.createEmbeddedView(this._templateRef); | ||
} | ||
}; | ||
ClipboardIfSupportedDirective.decorators = [ | ||
{ type: i0.Directive, args: [{ | ||
// tslint:disable-next-line:directive-selector | ||
selector: '[ngxClipboardIfSupported]', | ||
},] } | ||
]; | ||
/** @nocollapse */ | ||
ClipboardIfSupportedDirective.ctorParameters = function () { | ||
return [ | ||
{ type: ClipboardService }, | ||
{ type: i0.ViewContainerRef }, | ||
{ type: i0.TemplateRef } | ||
]; | ||
}; | ||
return ClipboardIfSupportedDirective; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var ClipboardModule = /** @class */ (function () { | ||
@@ -368,4 +438,4 @@ function ClipboardModule() { | ||
imports: [i1.CommonModule], | ||
declarations: [ClipboardDirective], | ||
exports: [ClipboardDirective] | ||
declarations: [ClipboardDirective, ClipboardIfSupportedDirective], | ||
exports: [ClipboardDirective, ClipboardIfSupportedDirective] | ||
},] } | ||
@@ -389,2 +459,3 @@ ]; | ||
exports.ClipboardModule = ClipboardModule; | ||
exports.ClipboardIfSupportedDirective = ClipboardIfSupportedDirective; | ||
@@ -391,0 +462,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ngx-window-token"),require("@angular/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-clipboard",["exports","ngx-window-token","@angular/common","@angular/core"],e):e(t["ngx-clipboard"]={},t.i2,t.ng.common,t.ng.core)}(this,function(t,e,n,r){"use strict";var o=function(){function t(t,e){this.document=t,this.window=e}return Object.defineProperty(t.prototype,"isSupported",{get:function(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window},enumerable:!0,configurable:!0}),t.prototype.isTargetValid=function(t){if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){if(t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")},t.prototype.copyFromInputElement=function(t){try{this.selectTarget(t);var e=this.copyText();return this.clearSelection(t,this.window),e&&this.isCopySuccessInIE11()}catch(n){return!1}},t.prototype.isCopySuccessInIE11=function(){var t=this.window.clipboardData;return!(t&&t.getData&&!t.getData("Text"))},t.prototype.copyFromContent=function(t,e){if(void 0===e&&(e=this.window.document.body),this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch(n){throw new Error("Container should be a Dom element")}}return this.tempTextArea.value=t,this.copyFromInputElement(this.tempTextArea)},t.prototype.destroy=function(t){void 0===t&&(t=this.window.document.body),this.tempTextArea&&(t.removeChild(this.tempTextArea),this.tempTextArea=undefined)},t.prototype.selectTarget=function(t){return t.select(),t.setSelectionRange(0,t.value.length),t.value.length},t.prototype.copyText=function(){return this.document.execCommand("copy")},t.prototype.clearSelection=function(t,e){t&&t.focus(),e.getSelection().removeAllRanges()},t.prototype.createTempTextArea=function(t,e){var n,r="rtl"===t.documentElement.getAttribute("dir");(n=t.createElement("textarea")).style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[r?"right":"left"]="-9999px";var o=e.pageYOffset||t.documentElement.scrollTop;return n.style.top=o+"px",n.setAttribute("readonly",""),n},t.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:undefined,decorators:[{type:r.Inject,args:[n.DOCUMENT]}]},{type:undefined,decorators:[{type:r.Optional},{type:r.Inject,args:[e.WINDOW]}]}]},t.ngInjectableDef=r.defineInjectable({factory:function(){return new t(r.inject(n.DOCUMENT),r.inject(e.WINDOW,8))},token:t,providedIn:"root"}),t}(),i=function(){function t(t){this.clipboardSrv=t,this.cbOnSuccess=new r.EventEmitter,this.cbOnError=new r.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.ngOnDestroy=function(){this.clipboardSrv.destroy(this.container)},t.prototype.onClick=function(t){this.clipboardSrv.isSupported?this.targetElm&&this.clipboardSrv.isTargetValid(this.targetElm)?this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm),this.targetElm.value,t):this.cbContent&&this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent,this.container),this.cbContent,t):this.handleResult(!1,undefined,t)},t.prototype.handleResult=function(t,e,n){t?this.cbOnSuccess.emit({isSuccess:!0,content:e,event:n}):this.cbOnError.emit({isSuccess:!1,event:n})},t.decorators=[{type:r.Directive,args:[{selector:"[ngxClipboard]"}]}],t.ctorParameters=function(){return[{type:o}]},t.propDecorators={targetElm:[{type:r.Input,args:["ngxClipboard"]}],container:[{type:r.Input}],cbContent:[{type:r.Input}],cbOnSuccess:[{type:r.Output}],cbOnError:[{type:r.Output}],onClick:[{type:r.HostListener,args:["click",["$event.target"]]}]},t}(),c=function(){function t(){}return t.decorators=[{type:r.NgModule,args:[{imports:[n.CommonModule],declarations:[i],exports:[i]}]}],t}();t.ClipboardService=o,t.ClipboardDirective=i,t.ClipboardModule=c,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("ngx-window-token"),require("rxjs"),require("@angular/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-clipboard",["exports","ngx-window-token","rxjs","@angular/common","@angular/core"],e):e(t["ngx-clipboard"]={},t.i2,t.rxjs,t.ng.common,t.ng.core)}(this,function(t,e,r,n,o){"use strict";var i=function(){function t(t,e){this.document=t,this.window=e,this.copySubject=new r.Subject,this.copyObservable$=this.copySubject.asObservable()}return Object.defineProperty(t.prototype,"isSupported",{get:function(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window},enumerable:!0,configurable:!0}),t.prototype.isTargetValid=function(t){if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){if(t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")},t.prototype.copyFromInputElement=function(t){try{this.selectTarget(t);var e=this.copyText();return this.clearSelection(t,this.window),e&&this.isCopySuccessInIE11()}catch(r){return!1}},t.prototype.isCopySuccessInIE11=function(){var t=this.window.clipboardData;return!(t&&t.getData&&!t.getData("Text"))},t.prototype.copyFromContent=function(t,e){if(void 0===e&&(e=this.window.document.body),this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch(r){throw new Error("Container should be a Dom element")}}return this.tempTextArea.value=t,this.copyFromInputElement(this.tempTextArea)},t.prototype.destroy=function(t){void 0===t&&(t=this.window.document.body),this.tempTextArea&&(t.removeChild(this.tempTextArea),this.tempTextArea=undefined)},t.prototype.selectTarget=function(t){return t.select(),t.setSelectionRange(0,t.value.length),t.value.length},t.prototype.copyText=function(){return this.document.execCommand("copy")},t.prototype.clearSelection=function(t,e){t&&t.focus(),e.getSelection().removeAllRanges()},t.prototype.createTempTextArea=function(t,e){var r,n="rtl"===t.documentElement.getAttribute("dir");(r=t.createElement("textarea")).style.fontSize="12pt",r.style.border="0",r.style.padding="0",r.style.margin="0",r.style.position="absolute",r.style[n?"right":"left"]="-9999px";var o=e.pageYOffset||t.documentElement.scrollTop;return r.style.top=o+"px",r.setAttribute("readonly",""),r},t.prototype.pushCopyReponse=function(t){this.copySubject.next(t)},t.decorators=[{type:o.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:undefined,decorators:[{type:o.Inject,args:[n.DOCUMENT]}]},{type:undefined,decorators:[{type:o.Optional},{type:o.Inject,args:[e.WINDOW]}]}]},t.ngInjectableDef=o.defineInjectable({factory:function(){return new t(o.inject(n.DOCUMENT),o.inject(e.WINDOW,8))},token:t,providedIn:"root"}),t}(),s=function(){function t(t){this.clipboardSrv=t,this.cbOnSuccess=new o.EventEmitter,this.cbOnError=new o.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.ngOnDestroy=function(){this.clipboardSrv.destroy(this.container)},t.prototype.onClick=function(t){this.clipboardSrv.isSupported?this.targetElm&&this.clipboardSrv.isTargetValid(this.targetElm)?this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm),this.targetElm.value,t):this.cbContent&&this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent,this.container),this.cbContent,t):this.handleResult(!1,undefined,t)},t.prototype.handleResult=function(t,e,r){var n={isSuccess:t,event:r};t?(n=Object.assign(n,{content:e,successMessage:this.cbSuccessMsg}),this.cbOnSuccess.emit(n)):this.cbOnError.emit(n),this.clipboardSrv.pushCopyReponse(n)},t.decorators=[{type:o.Directive,args:[{selector:"[ngxClipboard]"}]}],t.ctorParameters=function(){return[{type:i}]},t.propDecorators={targetElm:[{type:o.Input,args:["ngxClipboard"]}],container:[{type:o.Input}],cbContent:[{type:o.Input}],cbSuccessMsg:[{type:o.Input}],cbOnSuccess:[{type:o.Output}],cbOnError:[{type:o.Output}],onClick:[{type:o.HostListener,args:["click",["$event.target"]]}]},t}(),c=function(){function t(t,e,r){this._clipboardService=t,this._viewContainerRef=e,this._templateRef=r}return t.prototype.ngOnInit=function(){this._clipboardService.isSupported&&this._viewContainerRef.createEmbeddedView(this._templateRef)},t.decorators=[{type:o.Directive,args:[{selector:"[ngxClipboardIfSupported]"}]}],t.ctorParameters=function(){return[{type:i},{type:o.ViewContainerRef},{type:o.TemplateRef}]},t}(),a=function(){function t(){}return t.decorators=[{type:o.NgModule,args:[{imports:[n.CommonModule],declarations:[s,c],exports:[s,c]}]}],t}();t.ClipboardService=i,t.ClipboardDirective=s,t.ClipboardModule=a,t.ClipboardIfSupportedDirective=c,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-clipboard.umd.min.js.map |
@@ -51,8 +51,18 @@ /** | ||
handleResult(succeeded, copiedContent, event) { | ||
/** @type {?} */ | ||
let response = { | ||
isSuccess: succeeded, | ||
event | ||
}; | ||
if (succeeded) { | ||
this.cbOnSuccess.emit({ isSuccess: true, content: copiedContent, event: event }); | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.cbOnSuccess.emit(response); | ||
} | ||
else { | ||
this.cbOnError.emit({ isSuccess: false, event: event }); | ||
this.cbOnError.emit(response); | ||
} | ||
this.clipboardSrv.pushCopyReponse(response); | ||
} | ||
@@ -74,2 +84,3 @@ } | ||
cbContent: [{ type: Input }], | ||
cbSuccessMsg: [{ type: Input }], | ||
cbOnSuccess: [{ type: Output }], | ||
@@ -87,2 +98,4 @@ cbOnError: [{ type: Output }], | ||
/** @type {?} */ | ||
ClipboardDirective.prototype.cbSuccessMsg; | ||
/** @type {?} */ | ||
ClipboardDirective.prototype.cbOnSuccess; | ||
@@ -97,2 +110,2 @@ /** @type {?} */ | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtY2xpcGJvYXJkLyIsInNvdXJjZXMiOlsibGliL25neC1jbGlwYm9hcmQuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFxQixNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFeEcsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFNM0QsTUFBTSxPQUFPLGtCQUFrQjs7OztJQWUzQixZQUFvQixZQUE4QjtRQUE5QixpQkFBWSxHQUFaLFlBQVksQ0FBa0I7UUFKM0MsZ0JBQVcsR0FBc0IsSUFBSSxZQUFZLEVBQU8sQ0FBQztRQUd6RCxjQUFTLEdBQXNCLElBQUksWUFBWSxFQUFPLENBQUM7SUFDVCxDQUFDOzs7OztJQUcvQyxRQUFRLEtBQUksQ0FBQzs7OztJQUViLFdBQVc7UUFDZCxJQUFJLENBQUMsWUFBWSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUM7SUFDOUMsQ0FBQzs7Ozs7SUFHTSxPQUFPLENBQUMsS0FBWTtRQUN2QixJQUFJLENBQUMsSUFBSSxDQ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TcnYuY29weUZyb21JbnB1dEVsZW1lbnQodGhpcy50YXJnZXRFbG0pLCB0aGlzLnRhcmdldEVsbS52YWx1ZSwgZXZlbnQpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5jYkNvbnRlbnQpIHtcclxuICAgICAgICAgICAgdGhpcy5oYW5kbGVSZXN1bHQodGhpcy5jbGlwYm9hcmRTcnYuY29weUZyb21Db250ZW50KHRoaXMuY2JDb250ZW50LCB0aGlzLmNvbnRhaW5lciksIHRoaXMuY2JDb250ZW50LCBldmVudCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogRmlyZXMgYW4gZXZlbnQgYmFzZWQgb24gdGhlIGNvcHkgb3BlcmF0aW9uIHJlc3VsdC5cclxuICAgICAqIEBwYXJhbSBzdWNjZWVkZWRcclxuICAgICAqL1xyXG4gICAgcHJpdmF0ZSBoYW5kbGVSZXN1bHQoc3VjY2VlZGVkOiBib29sZWFuLCBjb3BpZWRDb250ZW50OiBzdHJpbmcgfCB1bmRlZmluZWQsIGV2ZW50OiBFdmVudCkge1xyXG4gICAgICAgIGlmIChzdWNjZWVkZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5jYk9uU3VjY2Vzcy5lbWl0KHsgaXNTdWNjZXNzOiB0cnVlLCBjb250ZW50OiBjb3BpZWRDb250ZW50LCBldmVudDogZXZlbnQgfSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy5jYk9uRXJyb3IuZW1pdCh7IGlzU3VjY2VzczogZmFsc2UsIGV2ZW50OiBldmVudCB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtY2xpcGJvYXJkLyIsInNvdXJjZXM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uZW1pdChyZXNwb25zZSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy5jYk9uRXJyb3IuZW1pdChyZXNwb25zZSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICB0aGlzLmNsaXBib2FyZFNydi5wdXNoQ29weVJlcG9uc2UocmVzcG9uc2UpO1xyXG4gICAgfVxyXG59XHJcbiJdfQ== |
@@ -8,2 +8,3 @@ /** | ||
import { ClipboardDirective } from './ngx-clipboard.directive'; | ||
import { ClipboardIfSupportedDirective } from './ngx-clipboard-if-supported.directive'; | ||
export class ClipboardModule { | ||
@@ -14,6 +15,6 @@ } | ||
imports: [CommonModule], | ||
declarations: [ClipboardDirective], | ||
exports: [ClipboardDirective] | ||
declarations: [ClipboardDirective, ClipboardIfSupportedDirective], | ||
exports: [ClipboardDirective, ClipboardIfSupportedDirective] | ||
},] } | ||
]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtY2xpcGJvYXJkLyIsInNvdXJjZXMiOlsibGliL25neC1jbGlwYm9hcmQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQU8vRCxNQUFNLE9BQU8sZUFBZTs7O1lBTDNCLFFBQVEsU0FBQztnQkFDTixPQUFPLEVBQUUsQ0FBQyxZQUFZLENBQUM7Z0JBQ3ZCLFlBQVksRUFBRSxDQUFDLGtCQUFrQixDQUFDO2dCQUNsQyxPQUFPLEVBQUUsQ0FBQyxrQkF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3ZCLFlBQVksRUFBRSxDQUFDLGtCQUFrQixFQUFFLDZCQUE2QixDQUFDO2dCQUNqRSxPQUFPLEVBQUUsQ0FBQyxrQkFBa0IsRUFBRSw2QkFBNkIsQ0FBQzthQUMvRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XHJcbmltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcblxyXG5pbXBvcnQgeyBDbGlwYm9hcmREaXJlY3RpdmUgfSBmcm9tICcuL25neC1jbGlwYm9hcmQuZGlyZWN0aXZlJztcclxuaW1wb3J0IHsgQ2xpcGJvYXJkSWZTdXBwb3J0ZWREaXJlY3RpdmUgfSBmcm9tICcuL25neC1jbGlwYm9hcmQtaWYtc3VwcG9ydGVkLmRpcmVjdGl2ZSc7XHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gICAgaW1wb3J0czogW0NvbW1vbk1vZHVsZV0sXHJcbiAgICBkZWNsYXJhdGlvbnM6IFtDbGlwYm9hcmREaXJlY3RpdmUsIENsaXBib2FyZElmU3VwcG9ydGVkRGlyZWN0aXZlXSxcclxuICAgIGV4cG9ydHM6IFtDbGlwYm9hcmREaXJlY3RpdmUsIENsaXBib2FyZElmU3VwcG9ydGVkRGlyZWN0aXZlXVxyXG59KVxyXG5leHBvcnQgY2xhc3MgQ2xpcGJvYXJkTW9kdWxlIHt9XHJcbiJdfQ== |
@@ -8,2 +8,3 @@ /** | ||
import { WINDOW } from 'ngx-window-token'; | ||
import { Subject } from 'rxjs'; | ||
import * as i0 from "@angular/core"; | ||
@@ -21,2 +22,4 @@ import * as i1 from "@angular/common"; | ||
this.window = window; | ||
this.copySubject = new Subject(); | ||
this.copyObservable$ = this.copySubject.asObservable(); | ||
} | ||
@@ -81,3 +84,3 @@ /** | ||
copyFromContent(content, container = this.window.document.body) { | ||
// check if the temp textarea is still belong the current container. | ||
// check if the temp textarea still belongs to the current container. | ||
// In case we have multiple places using ngx-clipboard, one is in a modal using container but the other one is not. | ||
@@ -170,2 +173,11 @@ if (this.tempTextArea && !container.contains(this.tempTextArea)) { | ||
} | ||
/** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
* @param {?} response | ||
* @return {?} | ||
*/ | ||
pushCopyReponse(response) { | ||
this.copySubject.next(response); | ||
} | ||
} | ||
@@ -187,3 +199,10 @@ ClipboardService.decorators = [ | ||
ClipboardService.prototype.tempTextArea; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
ClipboardService.prototype.copySubject; | ||
/** @type {?} */ | ||
ClipboardService.prototype.copyObservable$; | ||
/** @type {?} */ | ||
ClipboardService.prototype.document; | ||
@@ -196,2 +215,2 @@ /** | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWNsaXBib2FyZC8iLCJzb3VyY2VzIjpbImxpYi9uZ3gtY2xpcGJvYXJkLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUNBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDM0MsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGtCQUFrQixDQUFDOzs7OztBQUsxQyxNQUFNLE9BQU8sZ0JBQWdCOzs7OztJQUV6QixZQUFxQyxRQUFhLEVBQXNDLE1BQVc7UUFBOUQsYUFBUSxHQUFSLFFBQVEsQ0FBSztRQUFzQyxXQUFNLEdBQU4sTUFBTSxDQUFLO0lBQUcsQ0FBQzs7OztJQUN2RyxJQUFXLFdBQVc7UUFDbE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FyZ2V0RWxtKTtcclxuICAgICAgICAgICAgY29uc3QgcmUgPSB0aGlzLmNvcHlUZXh0KCk7XHJcbiAgICAgICAgICAgIHRoaXMuY2xlYXJTZWxlY3Rpb24odGFyZ2V0RWxtLCB0aGlzLndpbmRvdyk7XHJcbiAgICAgICAgICAgIHJldHVybiByZSAmJiB0aGlzLmlzQ29weVN1Y2Nlc3NJbklFMTEoKTtcclxuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8vIHRoaXMgaXMgZm9yIElFMTEgcmV0dXJuIHRydWUgZXZlbiBpZiBjb3B5IGZhaWxcclxuICAgIGlzQ29weVN1Y2Nlc3NJbklFMTEoKSB7XHJcbiAgICAgICAgY29uc3QgY2xpcGJvYXJkRGF0YSA9IHRoaXMud2luZG93WydjbGlwYm9hcmREYXRhJ107XHJcbiAgICAgICAgaWYgKGNsaXBib2FyZERhdGEgJiYgY2xpcGJvYXJkRGF0YS5nZXREYXRhKSB7XHJcbiAgICAgICAgICAgIGlmICghY2xpcGJvYXJkRGF0YS5nZXREYXRhKCdUZXh0JykpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIENyZWF0ZXMgYSBmYWtlIHRleHRhcmVhIGVsZW1lbnQsIHNldHMgaXRzIHZhbHVlIGZyb20gYHRleHRgIHByb3BlcnR5LFxyXG4gICAgICogYW5kIG1ha2VzIGEgc2VsZWN0aW9uIG9uIGl0LlxyXG4gICAgICovXHJcbiAgICBwdWJsaWMgY29weUZyb21Db250ZW50KGNvbnRlbnQ6IHN0cmluZywgY29udGFpbmVyOiBIVE1MRWxlbWVudCA9IHRoaXMud2luZG93LmRvY3VtZW50Lm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O1xyXG4gICAgICAgIC8vIE1vdmUgZWxlbWVudCBvdXQgb2Ygc2NyZWVuIGhvcml6b250YWxseVxyXG4gICAgICAgIHRhLnN0eWxlLnBvc2l0aW9uID0gJ2Fic29sdXRlJztcclxuICAgICAgICB0YS5zdHlsZVtpc1JUTCA/ICdyaWdodCcgOiAnbGVmdCddID0gJy05OTk5cHgnO1xyXG4gICAgICAgIC8vIE1vdmUgZWxlbWVudCB0byB0aGUgc2FtZSBwb3NpdGlvbiB2ZXJ0aWNhbGx5XHJcbiAgICAgICAgY29uc3QgeVBvc2l0aW9uID0gd2luZG93LnBhZ2VZT2Zmc2V0IHx8IGRvYy5kb2N1bWVudEVsZW1lbnQuc2Nyb2xsVG9wO1xyXG4gICAgICAgIHRhLnN0eWxlLnRvcCA9IHlQb3NpdGlvbiArICdweCc7XHJcbiAgICAgICAgdGEuc2V0QXR0cmlidXRlKCdyZWFkb25seScsICcnKTtcclxuICAgICAgICByZXR1cm4gdGE7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBQdXNoZXMgY29weSBvcGVyYXRpb24gcmVzcG9uc2UgdG8gY29weVN1YmplY3QsIHRvIHByb3ZpZGUgZ2xvYmFsIGFjY2Vzc1xyXG4gICAgICogdG8gdGhlIHJlc3BvbnNlLlxyXG4gICAgICovXHJcbiAgICBwdWJsaWMgcHVzaENvcHlSZXBvbnNlKHJlc3BvbnNlOiBJQ2xpcGJvYXJkUmVzcG9uc2UpIHtcclxuICAgICAgICB0aGlzLmNvcHlTdWJqZWN0Lm5leHQocmVzcG9uc2UpO1xyXG4gICAgfVxyXG59XHJcbiJdfQ== |
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
export { ClipboardService, ClipboardDirective, ClipboardModule } from './public_api'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1jbGlwYm9hcmQvIiwic291cmNlcyI6WyJuZ3gtY2xpcGJvYXJkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxzRUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= | ||
export { ClipboardService, ClipboardDirective, ClipboardModule, ClipboardIfSupportedDirective } from './public_api'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1jbGlwYm9hcmQvIiwic291cmNlcyI6WyJuZ3gtY2xpcGJvYXJkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxxR0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= |
@@ -11,2 +11,4 @@ /** | ||
export { ClipboardModule } from './lib/ngx-clipboard.module'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1jbGlwYm9hcmQvIiwic291cmNlcyI6WyJwdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxpQ0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxtQ0FBYywrQkFBK0IsQ0FBQztBQUM5QyxnQ0FBYyw0QkFBNEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LWNsaXBib2FyZFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1jbGlwYm9hcmQuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtY2xpcGJvYXJkLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtY2xpcGJvYXJkLm1vZHVsZSc7XG4iXX0= | ||
export { ClipboardIfSupportedDirective } from './lib/ngx-clipboard-if-supported.directive'; | ||
export {} from './lib/interface'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1jbGlwYm9hcmQvIiwic291cmNlcyI6WyJwdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxpQ0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxtQ0FBYywrQkFBK0IsQ0FBQztBQUM5QyxnQ0FBYyw0QkFBNEIsQ0FBQztBQUMzQyw4Q0FBYyw0Q0FBNEMsQ0FBQztBQUMzRCxlQUFjLGlCQUFpQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcclxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIG5neC1jbGlwYm9hcmRcclxuICovXHJcblxyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtY2xpcGJvYXJkLnNlcnZpY2UnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtY2xpcGJvYXJkLmRpcmVjdGl2ZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1jbGlwYm9hcmQubW9kdWxlJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvbmd4LWNsaXBib2FyZC1pZi1zdXBwb3J0ZWQuZGlyZWN0aXZlJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvaW50ZXJmYWNlJztcclxuIl19 |
@@ -73,8 +73,18 @@ /** | ||
function (succeeded, copiedContent, event) { | ||
/** @type {?} */ | ||
var response = { | ||
isSuccess: succeeded, | ||
event: event | ||
}; | ||
if (succeeded) { | ||
this.cbOnSuccess.emit({ isSuccess: true, content: copiedContent, event: event }); | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.cbOnSuccess.emit(response); | ||
} | ||
else { | ||
this.cbOnError.emit({ isSuccess: false, event: event }); | ||
this.cbOnError.emit(response); | ||
} | ||
this.clipboardSrv.pushCopyReponse(response); | ||
}; | ||
@@ -95,2 +105,3 @@ ClipboardDirective.decorators = [ | ||
cbContent: [{ type: Input }], | ||
cbSuccessMsg: [{ type: Input }], | ||
cbOnSuccess: [{ type: Output }], | ||
@@ -111,2 +122,4 @@ cbOnError: [{ type: Output }], | ||
/** @type {?} */ | ||
ClipboardDirective.prototype.cbSuccessMsg; | ||
/** @type {?} */ | ||
ClipboardDirective.prototype.cbOnSuccess; | ||
@@ -121,2 +134,2 @@ /** @type {?} */ | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtY2xpcGJvYXJkLyIsInNvdXJjZXMiOlsibGliL25neC1jbGlwYm9hcmQuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFxQixNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFeEcsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFFM0Q7SUFtQkksNEJBQW9CLFlBQThCO1FBQTlCLGlCQUFZLEdBQVosW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uICAgICAqIEBwYXJhbSBzdWNjZWVkZWRcclxuICAgICAqL1xyXG4gICAgcHJpdmF0ZSBoYW5kbGVSZXN1bHQoc3VjY2VlZGVkOiBib29sZWFuLCBjb3BpZWRDb250ZW50OiBzdHJpbmcgfCB1bmRlZmluZWQsIGV2ZW50OiBFdmVudCkge1xyXG4gICAgICAgIGxldCByZXNwb25zZTogSUNsaXBib2FyZFJlc3BvbnNlID0ge1xyXG4gICAgICAgICAgICBpc1N1Y2Nlc3M6IHN1Y2NlZWRlZCxcclxuICAgICAgICAgICAgZXZlbnRcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBpZiAoc3VjY2VlZGVkKSB7XHJcbiAgICAgICAgICAgIHJlc3BvbnNlID0gT2JqZWN0LmFzc2lnbihyZXNwb25zZSwge1xyXG4gICAgICAgICAgICAgICAgY29udGVudDogY29waWVkQ29udGVudCxcclxuICAgICAgICAgICAgICAgIHN1Y2Nlc3NNZXNzYWdlOiB0aGlzLmNiU3VjY2Vzc01zZ1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgdGhpcy5jYk9uU3VjY2Vzcy5lbWl0KHJlc3BvbnNlKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLmNiT25FcnJvci5lbWl0KHJlc3BvbnNlKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRoaXMuY2xpcGJvYXJkU3J2LnB1c2hDb3B5UmVwb25zZShyZXNwb25zZSk7XHJcbiAgICB9XHJcbn1cclxuIl19 |
@@ -8,2 +8,3 @@ /** | ||
import { ClipboardDirective } from './ngx-clipboard.directive'; | ||
import { ClipboardIfSupportedDirective } from './ngx-clipboard-if-supported.directive'; | ||
var ClipboardModule = /** @class */ (function () { | ||
@@ -15,4 +16,4 @@ function ClipboardModule() { | ||
imports: [CommonModule], | ||
declarations: [ClipboardDirective], | ||
exports: [ClipboardDirective] | ||
declarations: [ClipboardDirective, ClipboardIfSupportedDirective], | ||
exports: [ClipboardDirective, ClipboardIfSupportedDirective] | ||
},] } | ||
@@ -23,2 +24,2 @@ ]; | ||
export { ClipboardModule }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtY2xpcGJvYXJkLyIsInNvdXJjZXMiOlsibGliL25neC1jbGlwYm9hcmQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUUvRDtJQUFBO0lBSzhCLENBQUM7O2dCQUw5QixRQUFRLFNBQUM7b0JBQ04sT0FBTyxFQUFFLENBQUMsWUFBWSxDQUFDO29CQUN2QixZQUFZLEVBQUUsQ0FBQyxrQkFBa0IsQ0FBQztvQkFDbEMsT0FBTyxFQUFFLENBQUMsa0JBQWtCLENBQUM7aUJBQ2hDOztJQUM2QixzQkFBQztDQUFBLEFBTC9CLElBSytCO1NBQWxCLGVBQWUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xyXG5pbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuaW1wb3J0IHsgQ2xpcGJvYXJkRGlyZWN0aXZlIH0gZnJvbSAnLi9uZ3gtY2xpcGJvYXJkLmRpcmVjdGl2ZSc7XHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gICAgaW1wb3J0czogW0NvbW1vbk1vZHVsZV0sXHJcbiAgICBkZWNsYXJhdGlv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GJvYXJkRGlyZWN0aXZlIH0gZnJvbSAnLi9uZ3gtY2xpcGJvYXJkLmRpcmVjdGl2ZSc7XHJcbmltcG9ydCB7IENsaXBib2FyZElmU3VwcG9ydGVkRGlyZWN0aXZlIH0gZnJvbSAnLi9uZ3gtY2xpcGJvYXJkLWlmLXN1cHBvcnRlZC5kaXJlY3RpdmUnO1xyXG5cclxuQE5nTW9kdWxlKHtcclxuICAgIGltcG9ydHM6IFtDb21tb25Nb2R1bGVdLFxyXG4gICAgZGVjbGFyYXRpb25zOiBbQ2xpcGJvYXJkRGlyZWN0aXZlLCBDbGlwYm9hcmRJZlN1cHBvcnRlZERpcmVjdGl2ZV0sXHJcbiAgICBleHBvcnRzOiBbQ2xpcGJvYXJkRGlyZWN0aXZlLCBDbGlwYm9hcmRJZlN1cHBvcnRlZERpcmVjdGl2ZV1cclxufSlcclxuZXhwb3J0IGNsYXNzIENsaXBib2FyZE1vZHVsZSB7fVxyXG4iXX0= |
@@ -8,2 +8,3 @@ /** | ||
import { WINDOW } from 'ngx-window-token'; | ||
import { Subject } from 'rxjs'; | ||
import * as i0 from "@angular/core"; | ||
@@ -17,2 +18,4 @@ import * as i1 from "@angular/common"; | ||
this.window = window; | ||
this.copySubject = new Subject(); | ||
this.copyObservable$ = this.copySubject.asObservable(); | ||
} | ||
@@ -111,3 +114,3 @@ Object.defineProperty(ClipboardService.prototype, "isSupported", { | ||
if (container === void 0) { container = this.window.document.body; } | ||
// check if the temp textarea is still belong the current container. | ||
// check if the temp textarea still belongs to the current container. | ||
// In case we have multiple places using ngx-clipboard, one is in a modal using container but the other one is not. | ||
@@ -238,2 +241,21 @@ if (this.tempTextArea && !container.contains(this.tempTextArea)) { | ||
}; | ||
/** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
*/ | ||
/** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
* @param {?} response | ||
* @return {?} | ||
*/ | ||
ClipboardService.prototype.pushCopyReponse = /** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
* @param {?} response | ||
* @return {?} | ||
*/ | ||
function (response) { | ||
this.copySubject.next(response); | ||
}; | ||
ClipboardService.decorators = [ | ||
@@ -257,3 +279,10 @@ { type: Injectable, args: [{ providedIn: 'root' },] } | ||
ClipboardService.prototype.tempTextArea; | ||
/** | ||
* @type {?} | ||
* @private | ||
*/ | ||
ClipboardService.prototype.copySubject; | ||
/** @type {?} */ | ||
ClipboardService.prototype.copyObservable$; | ||
/** @type {?} */ | ||
ClipboardService.prototype.document; | ||
@@ -266,2 +295,2 @@ /** | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWNsaXBib2FyZC8iLCJzb3VyY2VzIjpbImxpYi9uZ3gtY2xpcGJvYXJkLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUNBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM3RCxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDM0MsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGtCQUFrQixDQUFDOzs7OztBQUkxQztJQUdJLDBCQUFxQyxRQUFhLEVBQXNDLE1BQVc7UUFBOUQsYUFBUSxHQUFSLFFBQVEsQ0FBSztRQUFzQyxXQUFNLEdBQU4sTUFBTSxDQUFLO0lBQUcsQ0FBQztJQUN2RyxzQkFBVyx5Q0FBVzs7OztRQUF0QjtZQUNJLE9BQU8sQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMscUJBQXFCLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMscUJBQXFCLENBQUMsTUFBTSxDQUFD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AgICAgICAgIHJldHVybiByZSAmJiB0aGlzLmlzQ29weVN1Y2Nlc3NJbklFMTEoKTtcclxuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8vIHRoaXMgaXMgZm9yIElFMTEgcmV0dXJuIHRydWUgZXZlbiBpZiBjb3B5IGZhaWxcclxuICAgIGlzQ29weVN1Y2Nlc3NJbklFMTEoKSB7XHJcbiAgICAgICAgY29uc3QgY2xpcGJvYXJkRGF0YSA9IHRoaXMud2luZG93WydjbGlwYm9hcmREYXRhJ107XHJcbiAgICAgICAgaWYgKGNsaXBib2FyZERhdGEgJiYgY2xpcGJvYXJkRGF0YS5nZXREYXRhKSB7XHJcbiAgICAgICAgICAgIGlmICghY2xpcGJvYXJkRGF0YS5nZXREYXRhKCdUZXh0JykpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIENyZWF0ZXMgYSBmYWtlIHRleHRhcmVhIGVsZW1lbnQsIHNldHMgaXRzIHZhbHVlIGZyb20gYHRleHRgIHByb3BlcnR5LFxyXG4gICAgICogYW5kIG1ha2VzIGEgc2VsZWN0aW9uIG9uIGl0LlxyXG4gICAgICovXHJcbiAgICBwdWJsaWMgY29weUZyb21Db250ZW50KGNvbnRlbnQ6IHN0cmluZywgY29udGFpbmVyOiBIVE1MRWxlbWVudCA9IHRoaXMud2luZG93LmRvY3VtZW50LmJvZHkpIHtcclxuICAgICAgICAvLyBjaGVjayBpZiB0aGUgdGVtcCB0ZXh0YXJlYSBpcyBzdGlsbCBiZWxvbmcgdGhlIGN1cnJlbnQgY29udGFpbmVyLlxyXG4gICAgICAgIC8vIEluIGNhc2Ugd2UgaGF2ZSB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odGhpcy50ZW1wVGV4dEFyZWEucGFyZW50RWxlbWVudCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoIXRoaXMudGVtcFRleHRBcmVhKSB7XHJcbiAgICAgICAgICAgIHRoaXMudGVtcFRleHRBcmVhID0gdGhpcy5jcmVhdGVUZW1wVGV4dEFyZWEodGhpcy5kb2N1bWVudCwgdGhpcy53aW5kb3cpO1xyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgY29udGFpbmVyLmFwcGVuZENoaWxkKHRoaXMudGVtcFRleHRBcmVhKTtcclxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ29udGFpbmVyIHNob3VsZCBiZSBhIERvbSBlbGVtZW50Jyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy50ZW1wVGV4dEFyZWEudmFsdWUgPSBjb250ZW50O1xyXG4gICAgICAgIHJldHVybiB0aGlzLmNvcHlGcm9tSW5wdXRFbGVtZW50KHRoaXMudGVtcFRleHRBcmVhKTtcclxuICAgIH1cclxuXHJcbiAgICAvLyByZW1vdmUgdGVtcG9yYXJ5IHRleHRhcmVhIGlmIGFueVxyXG4gICAgcHVibGljIGRlc3Ryb3koY29udGFpbmVyOiBIVE1MRWxlbWVudCA9IHRoaXMud2luZG93LmRvY3VtZW50LmJvZHkpIHtcclxuICAgICAgICBpZiAodGhpcy50ZW1wVGV4dEFyZWEpIHtcclxuICAgICAgICAgICAgY29udGFpbmVyLnJlbW92ZUNoaWxkKHRoaXMudGVtcFRleHRBcmVhKTtcclxuICAgICAgICAgICAgLy8gcmVtb3ZlQ2hpbGQgZG9lc24ndCByZW1vdmUgdGhlIHJlZmVyZW5jZSBmcm9tIG1lbW9yeVxyXG4gICAgICAgICAgICB0aGlzLnRlbXBUZXh0QXJlYSA9IHVuZGVmaW5lZDtcclxuICAgIC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Rpb24gKyAncHgnO1xyXG4gICAgICAgIHRhLnNldEF0dHJpYnV0ZSgncmVhZG9ubHknLCAnJyk7XHJcbiAgICAgICAgcmV0dXJuIHRhO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogUHVzaGVzIGNvcHkgb3BlcmF0aW9uIHJlc3BvbnNlIHRvIGNvcHlTdWJqZWN0LCB0byBwcm92aWRlIGdsb2JhbCBhY2Nlc3NcclxuICAgICAqIHRvIHRoZSByZXNwb25zZS5cclxuICAgICAqL1xyXG4gICAgcHVibGljIHB1c2hDb3B5UmVwb25zZShyZXNwb25zZTogSUNsaXBib2FyZFJlc3BvbnNlKSB7XHJcbiAgICAgICAgdGhpcy5jb3B5U3ViamVjdC5uZXh0KHJlc3BvbnNlKTtcclxuICAgIH1cclxufVxyXG4iXX0= |
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
export { ClipboardService, ClipboardDirective, ClipboardModule } from './public_api'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1jbGlwYm9hcmQvIiwic291cmNlcyI6WyJuZ3gtY2xpcGJvYXJkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxzRUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= | ||
export { ClipboardService, ClipboardDirective, ClipboardModule, ClipboardIfSupportedDirective } from './public_api'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1jbGlwYm9hcmQvIiwic291cmNlcyI6WyJuZ3gtY2xpcGJvYXJkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxxR0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= |
@@ -11,2 +11,4 @@ /** | ||
export { ClipboardModule } from './lib/ngx-clipboard.module'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1jbGlwYm9hcmQvIiwic291cmNlcyI6WyJwdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxpQ0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxtQ0FBYywrQkFBK0IsQ0FBQztBQUM5QyxnQ0FBYyw0QkFBNEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LWNsaXBib2FyZFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1jbGlwYm9hcmQuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtY2xpcGJvYXJkLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtY2xpcGJvYXJkLm1vZHVsZSc7XG4iXX0= | ||
export { ClipboardIfSupportedDirective } from './lib/ngx-clipboard-if-supported.directive'; | ||
export {} from './lib/interface'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1jbGlwYm9hcmQvIiwic291cmNlcyI6WyJwdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxpQ0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxtQ0FBYywrQkFBK0IsQ0FBQztBQUM5QyxnQ0FBYyw0QkFBNEIsQ0FBQztBQUMzQyw4Q0FBYyw0Q0FBNEMsQ0FBQztBQUMzRCxlQUFjLGlCQUFpQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcclxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIG5neC1jbGlwYm9hcmRcclxuICovXHJcblxyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtY2xpcGJvYXJkLnNlcnZpY2UnO1xyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtY2xpcGJvYXJkLmRpcmVjdGl2ZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1jbGlwYm9hcmQubW9kdWxlJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvbmd4LWNsaXBib2FyZC1pZi1zdXBwb3J0ZWQuZGlyZWN0aXZlJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvaW50ZXJmYWNlJztcclxuIl19 |
import { WINDOW } from 'ngx-window-token'; | ||
import { Subject } from 'rxjs'; | ||
import { DOCUMENT, CommonModule } from '@angular/common'; | ||
import { Inject, Injectable, Optional, Directive, EventEmitter, HostListener, Input, Output, NgModule, defineInjectable, inject } from '@angular/core'; | ||
import { Inject, Injectable, Optional, Directive, TemplateRef, ViewContainerRef, EventEmitter, HostListener, Input, Output, NgModule, defineInjectable, inject } from '@angular/core'; | ||
@@ -18,2 +19,4 @@ /** | ||
this.window = window; | ||
this.copySubject = new Subject(); | ||
this.copyObservable$ = this.copySubject.asObservable(); | ||
} | ||
@@ -78,3 +81,3 @@ /** | ||
copyFromContent(content, container = this.window.document.body) { | ||
// check if the temp textarea is still belong the current container. | ||
// check if the temp textarea still belongs to the current container. | ||
// In case we have multiple places using ngx-clipboard, one is in a modal using container but the other one is not. | ||
@@ -167,2 +170,11 @@ if (this.tempTextArea && !container.contains(this.tempTextArea)) { | ||
} | ||
/** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
* @param {?} response | ||
* @return {?} | ||
*/ | ||
pushCopyReponse(response) { | ||
this.copySubject.next(response); | ||
} | ||
} | ||
@@ -227,8 +239,18 @@ ClipboardService.decorators = [ | ||
handleResult(succeeded, copiedContent, event) { | ||
/** @type {?} */ | ||
let response = { | ||
isSuccess: succeeded, | ||
event | ||
}; | ||
if (succeeded) { | ||
this.cbOnSuccess.emit({ isSuccess: true, content: copiedContent, event: event }); | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.cbOnSuccess.emit(response); | ||
} | ||
else { | ||
this.cbOnError.emit({ isSuccess: false, event: event }); | ||
this.cbOnError.emit(response); | ||
} | ||
this.clipboardSrv.pushCopyReponse(response); | ||
} | ||
@@ -250,2 +272,3 @@ } | ||
cbContent: [{ type: Input }], | ||
cbSuccessMsg: [{ type: Input }], | ||
cbOnSuccess: [{ type: Output }], | ||
@@ -260,2 +283,39 @@ cbOnError: [{ type: Output }], | ||
*/ | ||
class ClipboardIfSupportedDirective { | ||
/** | ||
* @param {?} _clipboardService | ||
* @param {?} _viewContainerRef | ||
* @param {?} _templateRef | ||
*/ | ||
constructor(_clipboardService, _viewContainerRef, _templateRef) { | ||
this._clipboardService = _clipboardService; | ||
this._viewContainerRef = _viewContainerRef; | ||
this._templateRef = _templateRef; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
ngOnInit() { | ||
if (this._clipboardService.isSupported) { | ||
this._viewContainerRef.createEmbeddedView(this._templateRef); | ||
} | ||
} | ||
} | ||
ClipboardIfSupportedDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
// tslint:disable-next-line:directive-selector | ||
selector: '[ngxClipboardIfSupported]', | ||
},] } | ||
]; | ||
/** @nocollapse */ | ||
ClipboardIfSupportedDirective.ctorParameters = () => [ | ||
{ type: ClipboardService }, | ||
{ type: ViewContainerRef }, | ||
{ type: TemplateRef } | ||
]; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
class ClipboardModule { | ||
@@ -266,4 +326,4 @@ } | ||
imports: [CommonModule], | ||
declarations: [ClipboardDirective], | ||
exports: [ClipboardDirective] | ||
declarations: [ClipboardDirective, ClipboardIfSupportedDirective], | ||
exports: [ClipboardDirective, ClipboardIfSupportedDirective] | ||
},] } | ||
@@ -282,4 +342,9 @@ ]; | ||
export { ClipboardService, ClipboardDirective, ClipboardModule }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
export { ClipboardService, ClipboardDirective, ClipboardModule, ClipboardIfSupportedDirective }; | ||
//# sourceMappingURL=ngx-clipboard.js.map |
import { WINDOW } from 'ngx-window-token'; | ||
import { Subject } from 'rxjs'; | ||
import { DOCUMENT, CommonModule } from '@angular/common'; | ||
import { Inject, Injectable, Optional, Directive, EventEmitter, HostListener, Input, Output, NgModule, defineInjectable, inject } from '@angular/core'; | ||
import { Inject, Injectable, Optional, Directive, TemplateRef, ViewContainerRef, EventEmitter, HostListener, Input, Output, NgModule, defineInjectable, inject } from '@angular/core'; | ||
@@ -14,2 +15,4 @@ /** | ||
this.window = window; | ||
this.copySubject = new Subject(); | ||
this.copyObservable$ = this.copySubject.asObservable(); | ||
} | ||
@@ -108,3 +111,3 @@ Object.defineProperty(ClipboardService.prototype, "isSupported", { | ||
if (container === void 0) { container = this.window.document.body; } | ||
// check if the temp textarea is still belong the current container. | ||
// check if the temp textarea still belongs to the current container. | ||
// In case we have multiple places using ngx-clipboard, one is in a modal using container but the other one is not. | ||
@@ -235,2 +238,21 @@ if (this.tempTextArea && !container.contains(this.tempTextArea)) { | ||
}; | ||
/** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
*/ | ||
/** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
* @param {?} response | ||
* @return {?} | ||
*/ | ||
ClipboardService.prototype.pushCopyReponse = /** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
* @param {?} response | ||
* @return {?} | ||
*/ | ||
function (response) { | ||
this.copySubject.next(response); | ||
}; | ||
ClipboardService.decorators = [ | ||
@@ -318,8 +340,18 @@ { type: Injectable, args: [{ providedIn: 'root' },] } | ||
function (succeeded, copiedContent, event) { | ||
/** @type {?} */ | ||
var response = { | ||
isSuccess: succeeded, | ||
event: event | ||
}; | ||
if (succeeded) { | ||
this.cbOnSuccess.emit({ isSuccess: true, content: copiedContent, event: event }); | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.cbOnSuccess.emit(response); | ||
} | ||
else { | ||
this.cbOnError.emit({ isSuccess: false, event: event }); | ||
this.cbOnError.emit(response); | ||
} | ||
this.clipboardSrv.pushCopyReponse(response); | ||
}; | ||
@@ -340,2 +372,3 @@ ClipboardDirective.decorators = [ | ||
cbContent: [{ type: Input }], | ||
cbSuccessMsg: [{ type: Input }], | ||
cbOnSuccess: [{ type: Output }], | ||
@@ -352,2 +385,38 @@ cbOnError: [{ type: Output }], | ||
*/ | ||
var ClipboardIfSupportedDirective = /** @class */ (function () { | ||
function ClipboardIfSupportedDirective(_clipboardService, _viewContainerRef, _templateRef) { | ||
this._clipboardService = _clipboardService; | ||
this._viewContainerRef = _viewContainerRef; | ||
this._templateRef = _templateRef; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
ClipboardIfSupportedDirective.prototype.ngOnInit = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
if (this._clipboardService.isSupported) { | ||
this._viewContainerRef.createEmbeddedView(this._templateRef); | ||
} | ||
}; | ||
ClipboardIfSupportedDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
// tslint:disable-next-line:directive-selector | ||
selector: '[ngxClipboardIfSupported]', | ||
},] } | ||
]; | ||
/** @nocollapse */ | ||
ClipboardIfSupportedDirective.ctorParameters = function () { return [ | ||
{ type: ClipboardService }, | ||
{ type: ViewContainerRef }, | ||
{ type: TemplateRef } | ||
]; }; | ||
return ClipboardIfSupportedDirective; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var ClipboardModule = /** @class */ (function () { | ||
@@ -359,4 +428,4 @@ function ClipboardModule() { | ||
imports: [CommonModule], | ||
declarations: [ClipboardDirective], | ||
exports: [ClipboardDirective] | ||
declarations: [ClipboardDirective, ClipboardIfSupportedDirective], | ||
exports: [ClipboardDirective, ClipboardIfSupportedDirective] | ||
},] } | ||
@@ -377,4 +446,9 @@ ]; | ||
export { ClipboardService, ClipboardDirective, ClipboardModule }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
export { ClipboardService, ClipboardDirective, ClipboardModule, ClipboardIfSupportedDirective }; | ||
//# sourceMappingURL=ngx-clipboard.js.map |
import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; | ||
import { ClipboardService } from './ngx-clipboard.service'; | ||
import { IClipboardResponse } from './interface'; | ||
export declare class ClipboardDirective implements OnInit, OnDestroy { | ||
@@ -8,3 +9,4 @@ private clipboardSrv; | ||
cbContent: string; | ||
cbOnSuccess: EventEmitter<any>; | ||
cbSuccessMsg: string; | ||
cbOnSuccess: EventEmitter<IClipboardResponse>; | ||
cbOnError: EventEmitter<any>; | ||
@@ -11,0 +13,0 @@ constructor(clipboardSrv: ClipboardService); |
@@ -0,1 +1,3 @@ | ||
import { Observable } from 'rxjs'; | ||
import { IClipboardResponse } from './interface'; | ||
export declare class ClipboardService { | ||
@@ -5,2 +7,4 @@ document: any; | ||
private tempTextArea; | ||
private copySubject; | ||
copyObservable$: Observable<{}>; | ||
constructor(document: any, window: any); | ||
@@ -24,2 +28,7 @@ readonly isSupported: boolean; | ||
private createTempTextArea; | ||
/** | ||
* Pushes copy operation response to copySubject, to provide global access | ||
* to the response. | ||
*/ | ||
pushCopyReponse(response: IClipboardResponse): void; | ||
} |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"ClipboardService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":10,"character":17},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":10,"character":24}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":10,"character":57}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":10,"character":69},"arguments":[{"__symbolic":"reference","module":"ngx-window-token","name":"WINDOW","line":10,"character":76}]}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"any"}]}],"isTargetValid":[{"__symbolic":"method"}],"copyFromInputElement":[{"__symbolic":"method"}],"isCopySuccessInIE11":[{"__symbolic":"method"}],"copyFromContent":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"selectTarget":[{"__symbolic":"method"}],"copyText":[{"__symbolic":"method"}],"clearSelection":[{"__symbolic":"method"}],"createTempTextArea":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"ClipboardDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[ngxClipboard]"}]}],"members":{"targetElm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":5},"arguments":["ngxClipboard"]}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":5}}]}],"cbContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":5}}]}],"cbOnSuccess":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":18,"character":5}}]}],"cbOnError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":21,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ClipboardService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":32,"character":5},"arguments":["click",["$event.target"]]}]}],"handleResult":[{"__symbolic":"method"}]}},"ClipboardModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":6,"character":14}],"declarations":[{"__symbolic":"reference","name":"ClipboardDirective"}],"exports":[{"__symbolic":"reference","name":"ClipboardDirective"}]}]}],"members":{}}},"origins":{"ClipboardService":"./lib/ngx-clipboard.service","ClipboardDirective":"./lib/ngx-clipboard.directive","ClipboardModule":"./lib/ngx-clipboard.module"},"importAs":"ngx-clipboard"} | ||
{"__symbolic":"module","version":4,"metadata":{"ClipboardService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":17,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":18,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":21},"arguments":[{"__symbolic":"reference","module":"ngx-window-token","name":"WINDOW","line":18,"character":28}]}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"any"}]}],"isTargetValid":[{"__symbolic":"method"}],"copyFromInputElement":[{"__symbolic":"method"}],"isCopySuccessInIE11":[{"__symbolic":"method"}],"copyFromContent":[{"__symbolic":"method"}],"destroy":[{"__symbolic":"method"}],"selectTarget":[{"__symbolic":"method"}],"copyText":[{"__symbolic":"method"}],"clearSelection":[{"__symbolic":"method"}],"createTempTextArea":[{"__symbolic":"method"}],"pushCopyReponse":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"ClipboardDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"[ngxClipboard]"}]}],"members":{"targetElm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":5},"arguments":["ngxClipboard"]}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":5}}]}],"cbContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":5}}]}],"cbSuccessMsg":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"cbOnSuccess":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"cbOnError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":25,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ClipboardService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":36,"character":5},"arguments":["click",["$event.target"]]}]}],"handleResult":[{"__symbolic":"method"}]}},"ClipboardModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":14}],"declarations":[{"__symbolic":"reference","name":"ClipboardDirective"},{"__symbolic":"reference","name":"ClipboardIfSupportedDirective"}],"exports":[{"__symbolic":"reference","name":"ClipboardDirective"},{"__symbolic":"reference","name":"ClipboardIfSupportedDirective"}]}]}],"members":{}},"ClipboardIfSupportedDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":4,"character":1},"arguments":[{"selector":"[ngxClipboardIfSupported]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ClipboardService"},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":11,"character":35},{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"ngOnInit":[{"__symbolic":"method"}]}},"IClipboardResponse":{"__symbolic":"interface"}},"origins":{"ClipboardService":"./lib/ngx-clipboard.service","ClipboardDirective":"./lib/ngx-clipboard.directive","ClipboardModule":"./lib/ngx-clipboard.module","ClipboardIfSupportedDirective":"./lib/ngx-clipboard-if-supported.directive","IClipboardResponse":"./lib/interface"},"importAs":"ngx-clipboard"} |
{ | ||
"name": "ngx-clipboard", | ||
"description": "angular 2 clipboard", | ||
"version": "12.0.1", | ||
"version": "12.1.0-beta0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Sam Lin", |
export * from './lib/ngx-clipboard.service'; | ||
export * from './lib/ngx-clipboard.directive'; | ||
export * from './lib/ngx-clipboard.module'; | ||
export * from './lib/ngx-clipboard-if-supported.directive'; | ||
export * from './lib/interface'; |
@@ -120,2 +120,10 @@ [![travis build](https://img.shields.io/travis/maxisam/ngx-clipboard.svg?style=flat-square)](https://travis-ci.org/maxisam/ngx-clipboard) | ||
### Conditionally render host | ||
You can also use the structural directive *ngxClipboardIfSupported to conditionally render the host element | ||
```html | ||
<button ngxClipboard *ngxClipboardIfSupported [cbContent]="'target string'" (cbOnSuccess)="isCopied = true">Copy</button> | ||
``` | ||
## Example | ||
@@ -122,0 +130,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
202882
32
2272
165
2