ngx-clipboard
Advanced tools
Comparing version 14.0.1 to 15.0.0-beta01
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('ngx-window-token'), require('rxjs')) : | ||
typeof define === 'function' && define.amd ? define('ngx-clipboard', ['exports', '@angular/common', '@angular/core', 'ngx-window-token', 'rxjs'], factory) : | ||
(global = global || self, factory(global['ngx-clipboard'] = {}, global.ng.common, global.ng.core, global.i2, global.rxjs)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ngx-clipboard'] = {}, global.ng.common, global.ng.core, global.i2, global.rxjs)); | ||
}(this, (function (exports, i1, i0, i2, rxjs) { 'use strict'; | ||
@@ -11,3 +11,4 @@ | ||
var ClipboardService = /** @class */ (function () { | ||
function ClipboardService(document, window) { | ||
function ClipboardService(ngZone, document, window) { | ||
this.ngZone = ngZone; | ||
this.document = document; | ||
@@ -159,3 +160,8 @@ this.window = window; | ||
ClipboardService.prototype.pushCopyResponse = function (response) { | ||
this.copySubject.next(response); | ||
var _this = this; | ||
if (this.copySubject.observers.length > 0) { | ||
this.ngZone.run(function () { | ||
_this.copySubject.next(response); | ||
}); | ||
} | ||
}; | ||
@@ -170,3 +176,3 @@ /** | ||
}()); | ||
ClipboardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ClipboardService_Factory() { return new ClipboardService(i0.ɵɵinject(i1.DOCUMENT), i0.ɵɵinject(i2.WINDOW, 8)); }, token: ClipboardService, providedIn: "root" }); | ||
ClipboardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ClipboardService_Factory() { return new ClipboardService(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.DOCUMENT), i0.ɵɵinject(i2.WINDOW, 8)); }, token: ClipboardService, providedIn: "root" }); | ||
ClipboardService.decorators = [ | ||
@@ -176,2 +182,3 @@ { type: i0.Injectable, args: [{ providedIn: 'root' },] } | ||
ClipboardService.ctorParameters = function () { return [ | ||
{ type: i0.NgZone }, | ||
{ type: undefined, decorators: [{ type: i0.Inject, args: [i1.DOCUMENT,] }] }, | ||
@@ -182,23 +189,37 @@ { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.WINDOW,] }] } | ||
var ClipboardDirective = /** @class */ (function () { | ||
function ClipboardDirective(clipboardSrv) { | ||
function ClipboardDirective(ngZone, host, renderer, clipboardSrv) { | ||
var _this = this; | ||
this.ngZone = ngZone; | ||
this.host = host; | ||
this.renderer = renderer; | ||
this.clipboardSrv = clipboardSrv; | ||
this.cbOnSuccess = new i0.EventEmitter(); | ||
this.cbOnError = new i0.EventEmitter(); | ||
this.onClick = function (event) { | ||
if (!_this.clipboardSrv.isSupported) { | ||
_this.handleResult(false, undefined, event); | ||
} | ||
else if (_this.targetElm && _this.clipboardSrv.isTargetValid(_this.targetElm)) { | ||
_this.handleResult(_this.clipboardSrv.copyFromInputElement(_this.targetElm), _this.targetElm.value, event); | ||
} | ||
else if (_this.cbContent) { | ||
_this.handleResult(_this.clipboardSrv.copyFromContent(_this.cbContent, _this.container), _this.cbContent, event); | ||
} | ||
}; | ||
} | ||
// tslint:disable-next-line:no-empty | ||
ClipboardDirective.prototype.ngOnInit = function () { }; | ||
ClipboardDirective.prototype.ngOnInit = function () { | ||
var _this = this; | ||
this.ngZone.runOutsideAngular(function () { | ||
// By default each host listener schedules change detection and also wrapped | ||
// into additional function that calls `markForCheck()`. We're listening the `click` | ||
// event in the context of the root zone to avoid running unnecessary change detections, | ||
// since this directive doesn't do anything template-related (e.g. updates template variables). | ||
_this.clickListener = _this.renderer.listen(_this.host.nativeElement, 'click', _this.onClick); | ||
}); | ||
}; | ||
ClipboardDirective.prototype.ngOnDestroy = function () { | ||
this.clickListener(); | ||
this.clipboardSrv.destroy(this.container); | ||
}; | ||
ClipboardDirective.prototype.onClick = function (event) { | ||
if (!this.clipboardSrv.isSupported) { | ||
this.handleResult(false, undefined, event); | ||
} | ||
else if (this.targetElm && this.clipboardSrv.isTargetValid(this.targetElm)) { | ||
this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm), this.targetElm.value, event); | ||
} | ||
else if (this.cbContent) { | ||
this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent, this.container), this.cbContent, event); | ||
} | ||
}; | ||
/** | ||
@@ -209,2 +230,3 @@ * Fires an event based on the copy operation result. | ||
ClipboardDirective.prototype.handleResult = function (succeeded, copiedContent, event) { | ||
var _this = this; | ||
var response = { | ||
@@ -215,10 +237,18 @@ isSuccess: succeeded, | ||
if (succeeded) { | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.cbOnSuccess.emit(response); | ||
if (this.cbOnSuccess.observers.length > 0) { | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.ngZone.run(function () { | ||
_this.cbOnSuccess.emit(response); | ||
}); | ||
} | ||
} | ||
else { | ||
this.cbOnError.emit(response); | ||
if (this.cbOnError.observers.length > 0) { | ||
this.ngZone.run(function () { | ||
_this.cbOnError.emit(response); | ||
}); | ||
} | ||
} | ||
@@ -230,7 +260,8 @@ this.clipboardSrv.pushCopyResponse(response); | ||
ClipboardDirective.decorators = [ | ||
{ type: i0.Directive, args: [{ | ||
selector: '[ngxClipboard]' | ||
},] } | ||
{ type: i0.Directive, args: [{ selector: '[ngxClipboard]' },] } | ||
]; | ||
ClipboardDirective.ctorParameters = function () { return [ | ||
{ type: i0.NgZone }, | ||
{ type: i0.ElementRef }, | ||
{ type: i0.Renderer2 }, | ||
{ type: ClipboardService } | ||
@@ -244,4 +275,3 @@ ]; }; | ||
cbOnSuccess: [{ type: i0.Output }], | ||
cbOnError: [{ type: i0.Output }], | ||
onClick: [{ type: i0.HostListener, args: ['click', ['$event.target'],] }] | ||
cbOnError: [{ type: i0.Output }] | ||
}; | ||
@@ -248,0 +278,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("ngx-window-token"),require("rxjs")):"function"==typeof define&&define.amd?define("ngx-clipboard",["exports","@angular/common","@angular/core","ngx-window-token","rxjs"],e):e((t=t||self)["ngx-clipboard"]={},t.ng.common,t.ng.core,t.i2,t.rxjs)}(this,(function(t,e,o,r,n){"use strict";var i=function(){function t(t,e){this.document=t,this.window=e,this.copySubject=new n.Subject,this.copyResponse$=this.copySubject.asObservable(),this.config={}}return t.prototype.configure=function(t){this.config=t},t.prototype.copy=function(t){if(!this.isSupported||!t)return this.pushCopyResponse({isSuccess:!1,content:t});var e=this.copyFromContent(t);return e?this.pushCopyResponse({content:t,isSuccess:e}):this.pushCopyResponse({isSuccess:!1,content:t})},Object.defineProperty(t.prototype,"isSupported",{get:function(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window},enumerable:!1,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,e){void 0===e&&(e=!0);try{this.selectTarget(t);var o=this.copyText();return this.clearSelection(e?t:void 0,this.window),o&&this.isCopySuccessInIE11()}catch(t){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.document.body),this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch(t){throw new Error("Container should be a Dom element")}}this.tempTextArea.value=t;var o=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),o},t.prototype.destroy=function(t){void 0===t&&(t=this.document.body),this.tempTextArea&&(t.removeChild(this.tempTextArea),this.tempTextArea=void 0)},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){var o;t&&t.focus(),null===(o=e.getSelection())||void 0===o||o.removeAllRanges()},t.prototype.createTempTextArea=function(t,e){var o,r="rtl"===t.documentElement.getAttribute("dir");(o=t.createElement("textarea")).style.fontSize="12pt",o.style.border="0",o.style.padding="0",o.style.margin="0",o.style.position="absolute",o.style[r?"right":"left"]="-9999px";var n=e.pageYOffset||t.documentElement.scrollTop;return o.style.top=n+"px",o.setAttribute("readonly",""),o},t.prototype.pushCopyResponse=function(t){this.copySubject.next(t)},t.prototype.pushCopyReponse=function(t){this.pushCopyResponse(t)},t}();i.ɵprov=o.ɵɵdefineInjectable({factory:function(){return new i(o.ɵɵinject(e.DOCUMENT),o.ɵɵinject(r.WINDOW,8))},token:i,providedIn:"root"}),i.decorators=[{type:o.Injectable,args:[{providedIn:"root"}]}],i.ctorParameters=function(){return[{type:void 0,decorators:[{type:o.Inject,args:[e.DOCUMENT]}]},{type:void 0,decorators:[{type:o.Optional},{type:o.Inject,args:[r.WINDOW]}]}]};var 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,void 0,t)},t.prototype.handleResult=function(t,e,o){var r={isSuccess:t,event:o};t?(r=Object.assign(r,{content:e,successMessage:this.cbSuccessMsg}),this.cbOnSuccess.emit(r)):this.cbOnError.emit(r),this.clipboardSrv.pushCopyResponse(r)},t}();s.decorators=[{type:o.Directive,args:[{selector:"[ngxClipboard]"}]}],s.ctorParameters=function(){return[{type:i}]},s.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"]]}]};var p=function(){function t(t,e,o){this._clipboardService=t,this._viewContainerRef=e,this._templateRef=o}return t.prototype.ngOnInit=function(){this._clipboardService.isSupported&&this._viewContainerRef.createEmbeddedView(this._templateRef)},t}();p.decorators=[{type:o.Directive,args:[{selector:"[ngxClipboardIfSupported]"}]}],p.ctorParameters=function(){return[{type:i},{type:o.ViewContainerRef},{type:o.TemplateRef}]};var c=function(){};c.decorators=[{type:o.NgModule,args:[{imports:[e.CommonModule],declarations:[s,p],exports:[s,p]}]}],t.ClipboardDirective=s,t.ClipboardIfSupportedDirective=p,t.ClipboardModule=c,t.ClipboardService=i,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("ngx-window-token"),require("rxjs")):"function"==typeof define&&define.amd?define("ngx-clipboard",["exports","@angular/common","@angular/core","ngx-window-token","rxjs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["ngx-clipboard"]={},e.ng.common,e.ng.core,e.i2,e.rxjs)}(this,(function(e,t,n,o,r){"use strict";var i=function(){function e(e,t,n){this.ngZone=e,this.document=t,this.window=n,this.copySubject=new r.Subject,this.copyResponse$=this.copySubject.asObservable(),this.config={}}return e.prototype.configure=function(e){this.config=e},e.prototype.copy=function(e){if(!this.isSupported||!e)return this.pushCopyResponse({isSuccess:!1,content:e});var t=this.copyFromContent(e);return t?this.pushCopyResponse({content:e,isSuccess:t}):this.pushCopyResponse({isSuccess:!1,content:e})},Object.defineProperty(e.prototype,"isSupported",{get:function(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window},enumerable:!1,configurable:!0}),e.prototype.isTargetValid=function(e){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){if(e.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")},e.prototype.copyFromInputElement=function(e,t){void 0===t&&(t=!0);try{this.selectTarget(e);var n=this.copyText();return this.clearSelection(t?e:void 0,this.window),n&&this.isCopySuccessInIE11()}catch(e){return!1}},e.prototype.isCopySuccessInIE11=function(){var e=this.window.clipboardData;return!(e&&e.getData&&!e.getData("Text"))},e.prototype.copyFromContent=function(e,t){if(void 0===t&&(t=this.document.body),this.tempTextArea&&!t.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{t.appendChild(this.tempTextArea)}catch(e){throw new Error("Container should be a Dom element")}}this.tempTextArea.value=e;var n=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),n},e.prototype.destroy=function(e){void 0===e&&(e=this.document.body),this.tempTextArea&&(e.removeChild(this.tempTextArea),this.tempTextArea=void 0)},e.prototype.selectTarget=function(e){return e.select(),e.setSelectionRange(0,e.value.length),e.value.length},e.prototype.copyText=function(){return this.document.execCommand("copy")},e.prototype.clearSelection=function(e,t){var n;e&&e.focus(),null===(n=t.getSelection())||void 0===n||n.removeAllRanges()},e.prototype.createTempTextArea=function(e,t){var n,o="rtl"===e.documentElement.getAttribute("dir");(n=e.createElement("textarea")).style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[o?"right":"left"]="-9999px";var r=t.pageYOffset||e.documentElement.scrollTop;return n.style.top=r+"px",n.setAttribute("readonly",""),n},e.prototype.pushCopyResponse=function(e){var t=this;this.copySubject.observers.length>0&&this.ngZone.run((function(){t.copySubject.next(e)}))},e.prototype.pushCopyReponse=function(e){this.pushCopyResponse(e)},e}();i.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new i(n.ɵɵinject(n.NgZone),n.ɵɵinject(t.DOCUMENT),n.ɵɵinject(o.WINDOW,8))},token:i,providedIn:"root"}),i.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],i.ctorParameters=function(){return[{type:n.NgZone},{type:void 0,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[o.WINDOW]}]}]};var s=function(){function e(e,t,o,r){var i=this;this.ngZone=e,this.host=t,this.renderer=o,this.clipboardSrv=r,this.cbOnSuccess=new n.EventEmitter,this.cbOnError=new n.EventEmitter,this.onClick=function(e){i.clipboardSrv.isSupported?i.targetElm&&i.clipboardSrv.isTargetValid(i.targetElm)?i.handleResult(i.clipboardSrv.copyFromInputElement(i.targetElm),i.targetElm.value,e):i.cbContent&&i.handleResult(i.clipboardSrv.copyFromContent(i.cbContent,i.container),i.cbContent,e):i.handleResult(!1,void 0,e)}}return e.prototype.ngOnInit=function(){var e=this;this.ngZone.runOutsideAngular((function(){e.clickListener=e.renderer.listen(e.host.nativeElement,"click",e.onClick)}))},e.prototype.ngOnDestroy=function(){this.clickListener(),this.clipboardSrv.destroy(this.container)},e.prototype.handleResult=function(e,t,n){var o=this,r={isSuccess:e,event:n};e?this.cbOnSuccess.observers.length>0&&(r=Object.assign(r,{content:t,successMessage:this.cbSuccessMsg}),this.ngZone.run((function(){o.cbOnSuccess.emit(r)}))):this.cbOnError.observers.length>0&&this.ngZone.run((function(){o.cbOnError.emit(r)})),this.clipboardSrv.pushCopyResponse(r)},e}();s.decorators=[{type:n.Directive,args:[{selector:"[ngxClipboard]"}]}],s.ctorParameters=function(){return[{type:n.NgZone},{type:n.ElementRef},{type:n.Renderer2},{type:i}]},s.propDecorators={targetElm:[{type:n.Input,args:["ngxClipboard"]}],container:[{type:n.Input}],cbContent:[{type:n.Input}],cbSuccessMsg:[{type:n.Input}],cbOnSuccess:[{type:n.Output}],cbOnError:[{type:n.Output}]};var c=function(){function e(e,t,n){this._clipboardService=e,this._viewContainerRef=t,this._templateRef=n}return e.prototype.ngOnInit=function(){this._clipboardService.isSupported&&this._viewContainerRef.createEmbeddedView(this._templateRef)},e}();c.decorators=[{type:n.Directive,args:[{selector:"[ngxClipboardIfSupported]"}]}],c.ctorParameters=function(){return[{type:i},{type:n.ViewContainerRef},{type:n.TemplateRef}]};var p=function(){};p.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule],declarations:[s,c],exports:[s,c]}]}],e.ClipboardDirective=s,e.ClipboardIfSupportedDirective=c,e.ClipboardModule=p,e.ClipboardService=i,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ngx-clipboard.umd.min.js.map |
@@ -0,1 +1,2 @@ | ||
export {}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LWNsaXBib2FyZC9zcmMvbGliL2ludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBJQ2xpcGJvYXJkUmVzcG9uc2Uge1xyXG4gICAgaXNTdWNjZXNzOiBib29sZWFuO1xyXG4gICAgY29udGVudD86IHN0cmluZztcclxuICAgIGV2ZW50PzogRXZlbnQ7XHJcbiAgICBzdWNjZXNzTWVzc2FnZT86IHN0cmluZztcclxufVxyXG5cclxuZXhwb3J0IGludGVyZmFjZSBDbGlwYm9hcmRQYXJhbXMge1xyXG4gICAgY2xlYW5VcEFmdGVyQ29weT86IGJvb2xlYW47XHJcbn1cclxuIl19 |
@@ -1,25 +0,37 @@ | ||
import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/core'; | ||
import { Directive, ElementRef, EventEmitter, Input, NgZone, Output, Renderer2 } from '@angular/core'; | ||
import { ClipboardService } from './ngx-clipboard.service'; | ||
export class ClipboardDirective { | ||
constructor(clipboardSrv) { | ||
constructor(ngZone, host, renderer, clipboardSrv) { | ||
this.ngZone = ngZone; | ||
this.host = host; | ||
this.renderer = renderer; | ||
this.clipboardSrv = clipboardSrv; | ||
this.cbOnSuccess = new EventEmitter(); | ||
this.cbOnError = new EventEmitter(); | ||
this.onClick = (event) => { | ||
if (!this.clipboardSrv.isSupported) { | ||
this.handleResult(false, undefined, event); | ||
} | ||
else if (this.targetElm && this.clipboardSrv.isTargetValid(this.targetElm)) { | ||
this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm), this.targetElm.value, event); | ||
} | ||
else if (this.cbContent) { | ||
this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent, this.container), this.cbContent, event); | ||
} | ||
}; | ||
} | ||
// tslint:disable-next-line:no-empty | ||
ngOnInit() { } | ||
ngOnInit() { | ||
this.ngZone.runOutsideAngular(() => { | ||
// By default each host listener schedules change detection and also wrapped | ||
// into additional function that calls `markForCheck()`. We're listening the `click` | ||
// event in the context of the root zone to avoid running unnecessary change detections, | ||
// since this directive doesn't do anything template-related (e.g. updates template variables). | ||
this.clickListener = this.renderer.listen(this.host.nativeElement, 'click', this.onClick); | ||
}); | ||
} | ||
ngOnDestroy() { | ||
this.clickListener(); | ||
this.clipboardSrv.destroy(this.container); | ||
} | ||
onClick(event) { | ||
if (!this.clipboardSrv.isSupported) { | ||
this.handleResult(false, undefined, event); | ||
} | ||
else if (this.targetElm && this.clipboardSrv.isTargetValid(this.targetElm)) { | ||
this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm), this.targetElm.value, event); | ||
} | ||
else if (this.cbContent) { | ||
this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent, this.container), this.cbContent, event); | ||
} | ||
} | ||
/** | ||
@@ -35,10 +47,18 @@ * Fires an event based on the copy operation result. | ||
if (succeeded) { | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.cbOnSuccess.emit(response); | ||
if (this.cbOnSuccess.observers.length > 0) { | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.ngZone.run(() => { | ||
this.cbOnSuccess.emit(response); | ||
}); | ||
} | ||
} | ||
else { | ||
this.cbOnError.emit(response); | ||
if (this.cbOnError.observers.length > 0) { | ||
this.ngZone.run(() => { | ||
this.cbOnError.emit(response); | ||
}); | ||
} | ||
} | ||
@@ -49,7 +69,8 @@ this.clipboardSrv.pushCopyResponse(response); | ||
ClipboardDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[ngxClipboard]' | ||
},] } | ||
{ type: Directive, args: [{ selector: '[ngxClipboard]' },] } | ||
]; | ||
ClipboardDirective.ctorParameters = () => [ | ||
{ type: NgZone }, | ||
{ type: ElementRef }, | ||
{ type: Renderer2 }, | ||
{ type: ClipboardService } | ||
@@ -63,5 +84,4 @@ ]; | ||
cbOnSuccess: [{ type: Output }], | ||
cbOnError: [{ type: Output }], | ||
onClick: [{ type: HostListener, args: ['click', ['$event.target'],] }] | ||
cbOnError: [{ type: Output }] | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtY2xpcGJvYXJkL3NyYy9saWIvbmd4LWNsaXBib2FyZC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBcUIsTUFBTSx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oaXMudGFyZ2V0RWxtLnZhbHVlLCBldmVudCk7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5jYkNvbnRlbnQpIHtcbiAgICAgICAgICAgIHRoaXMuaGFuZGxlUmVzdWx0KHRoaXMuY2xpcGJvYXJkU3J2LmNvcHlGcm9tQ29udGVudCh0aGlzLmNiQ29udGVudCwgdGhpcy5jb250YWluZXIpLCB0aGlzLmNiQ29udGVudCwgZXZlbnQpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIEZpcmVzIGFuIGV2ZW50IGJhc2VkIG9uIHRoZSBjb3B5IG9wZXJhdGlvbiByZXN1bHQuXG4gICAgICogQHBhcmFtIHN1Y2NlZWRlZFxuICAgICAqL1xuICAgIHByaXZhdGUgaGFuZGxlUmVzdWx0KHN1Y2NlZWRlZDogYm9vbGVhbiwgY29waWVkQ29udGVudDogc3RyaW5nIHwgdW5kZWZpbmVkLCBldmVudDogTW91c2VFdmVudCk6IHZvaWQge1xuICAgICAgICBsZXQgcmVzcG9uc2U6IElDbGlwYm9hcmRSZXNwb25zZSA9IHtcbiAgICAgICAgICAgIGlzU3VjY2Vzczogc3VjY2VlZGVkLFxuICAgICAgICAgICAgZXZlbnRcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAoc3VjY2VlZGVkKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5jYk9uU3VjY2Vzcy5vYnNlcnZlcnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHJlc3BvbnNlID0gT2JqZWN0LmFzc2lnbihyZXNwb25zZSwge1xuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBjb3BpZWRDb250ZW50LFxuICAgICAgICAgICAgICAgICAgICBzdWNjZXNzTWVzc2FnZTogdGhpcy5jYlN1Y2Nlc3NNc2dcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLm5nWm9uZS5ydW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNiT25TdWNjZXNzLmVtaXQocmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHRoaXMuY2JPbkVycm9yLm9ic2VydmVycy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5uZ1pvbmUucnVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jYk9uRXJyb3IuZW1pdChyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmNsaXBib2FyZFNydi5wdXNoQ29weVJlc3BvbnNlKHJlc3BvbnNlKTtcbiAgICB9XG59XG4iXX0= |
import { DOCUMENT } from '@angular/common'; | ||
import { Inject, Injectable, Optional } from '@angular/core'; | ||
import { Inject, Injectable, NgZone, Optional } from '@angular/core'; | ||
import { WINDOW } from 'ngx-window-token'; | ||
@@ -12,3 +12,4 @@ import { Subject } from 'rxjs'; | ||
export class ClipboardService { | ||
constructor(document, window) { | ||
constructor(ngZone, document, window) { | ||
this.ngZone = ngZone; | ||
this.document = document; | ||
@@ -153,3 +154,7 @@ this.window = window; | ||
pushCopyResponse(response) { | ||
this.copySubject.next(response); | ||
if (this.copySubject.observers.length > 0) { | ||
this.ngZone.run(() => { | ||
this.copySubject.next(response); | ||
}); | ||
} | ||
} | ||
@@ -163,3 +168,3 @@ /** | ||
} | ||
ClipboardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ClipboardService_Factory() { return new ClipboardService(i0.ɵɵinject(i1.DOCUMENT), i0.ɵɵinject(i2.WINDOW, 8)); }, token: ClipboardService, providedIn: "root" }); | ||
ClipboardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ClipboardService_Factory() { return new ClipboardService(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.DOCUMENT), i0.ɵɵinject(i2.WINDOW, 8)); }, token: ClipboardService, providedIn: "root" }); | ||
ClipboardService.decorators = [ | ||
@@ -169,5 +174,6 @@ { type: Injectable, args: [{ providedIn: 'root' },] } | ||
ClipboardService.ctorParameters = () => [ | ||
{ type: NgZone }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [WINDOW,] }] } | ||
]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNsaXBib2FyZC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LWNsaXBib2FyZC9zcmMvbGliL25neC1jbGlwYm9hcmQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDM0MsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzdELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUMxQyxPQUFPLEVBQWMsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDOzs7O0FBSTNDOztHQUVHO0FBRUgsTUFBTSxPQUFPLGdCQUFnQjtJQU16QixZQUFxQyxRQUFhLEVBQXNDLE1BQVc7UUFBOUQsYUFBUSxHQUFSLFFBQVEsQ0FBSztRQUFzQyxXQUFNLEdBQU4sTUFBTSxDQUFLO1FBTDNGLGdCQUFXLEdBQUcsSUFBSSxPQUFPLEVBQXNCLENBQUM7UUFDakQsa0JBQWEsR0FBbUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxZQUFZLEVBQUUsQ0FBQztRQUUvRSxXQUFNLEdBQW9CLEVBQUUsQ0FBQztJQUVpRSxD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BjaGVjayBpZiB0aGUgdGVtcCB0ZXh0YXJlYSBzdGlsbCBiZWxvbmdzIHRvIHRoZSBjdXJyZW50IGNvbnRhaW5lci5cclxuICAgICAgICAvLyBJbiBjYXNlIHdlIGhhdmUgbXVsdGlwbGUgcGxhY2VzIHVzaW5nIG5neC1jbGlwYm9hcmQsIG9uZSBpcyBpbiBhIG1vZGFsIHVzaW5nIGNvbnRhaW5lciBidXQgdGhlIG90aGVyIG9uZSBpcyBub3QuXHJcbiAgICAgICAgaWYgKHRoaXMudGVtcFRleHRBcmVhICYmICFjb250YWluZXIuY29udGFpbnModGhpcy50ZW1wVGV4dEFyZWEpKSB7XHJcbiAgICAgICAgICAgIHRoaXMuZGVzdHJveSh0aGlzLnRlbXBUZXh0QXJlYS5wYXJlbnRFbGVtZW50IHx8IHVuZGVmaW5lZCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoIXRoaXMudGVtcFRleHRBcmVhKSB7XHJcbiAgICAgICAgICAgIHRoaXMudGVtcFRleHRBcmVhID0gdGhpcy5jcmVhdGVUZW1wVGV4dEFyZWEodGhpcy5kb2N1bWVudCwgdGhpcy53aW5kb3cpO1xyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgY29udGFpbmVyLmFwcGVuZENoaWxkKHRoaXMudGVtcFRleHRBcmVhKTtcclxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ29udGFpbmVyIHNob3VsZCBiZSBhIERvbSBlbGVtZW50Jyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy50ZW1wVGV4dEFyZWEudmFsdWUgPSBjb250ZW50O1xyXG5cclxuICAgICAgICBjb25zdCB0b1JldHVybiA9IHRoaXMuY29weUZyb21JbnB1dEVsZW1lbnQodGhpcy50ZW1wVGV4dEFyZWEsIGZhbHNlKTtcclxuICAgICA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byB0aGUgcmVzcG9uc2UuXG4gICAgICovXG4gICAgcHVibGljIHB1c2hDb3B5UmVzcG9uc2UocmVzcG9uc2U6IElDbGlwYm9hcmRSZXNwb25zZSk6IHZvaWQge1xuICAgICAgICBpZiAodGhpcy5jb3B5U3ViamVjdC5vYnNlcnZlcnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgdGhpcy5uZ1pvbmUucnVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvcHlTdWJqZWN0Lm5leHQocmVzcG9uc2UpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAZGVwcmVjYXRlZCB1c2UgcHVzaENvcHlSZXNwb25zZSBpbnN0ZWFkLlxuICAgICAqL1xuICAgIHB1YmxpYyBwdXNoQ29weVJlcG9uc2UocmVzcG9uc2U6IElDbGlwYm9hcmRSZXNwb25zZSk6IHZvaWQge1xuICAgICAgICB0aGlzLnB1c2hDb3B5UmVzcG9uc2UocmVzcG9uc2UpO1xuICAgIH1cbn1cbiJdfQ== |
import { DOCUMENT, CommonModule } from '@angular/common'; | ||
import { ɵɵdefineInjectable, ɵɵinject, Injectable, Inject, Optional, EventEmitter, Directive, Input, Output, HostListener, ViewContainerRef, TemplateRef, NgModule } from '@angular/core'; | ||
import { ɵɵdefineInjectable, ɵɵinject, NgZone, Injectable, Inject, Optional, EventEmitter, Directive, ElementRef, Renderer2, Input, Output, ViewContainerRef, TemplateRef, NgModule } from '@angular/core'; | ||
import { WINDOW } from 'ngx-window-token'; | ||
@@ -10,3 +10,4 @@ import { Subject } from 'rxjs'; | ||
class ClipboardService { | ||
constructor(document, window) { | ||
constructor(ngZone, document, window) { | ||
this.ngZone = ngZone; | ||
this.document = document; | ||
@@ -151,3 +152,7 @@ this.window = window; | ||
pushCopyResponse(response) { | ||
this.copySubject.next(response); | ||
if (this.copySubject.observers.length > 0) { | ||
this.ngZone.run(() => { | ||
this.copySubject.next(response); | ||
}); | ||
} | ||
} | ||
@@ -161,3 +166,3 @@ /** | ||
} | ||
ClipboardService.ɵprov = ɵɵdefineInjectable({ factory: function ClipboardService_Factory() { return new ClipboardService(ɵɵinject(DOCUMENT), ɵɵinject(WINDOW, 8)); }, token: ClipboardService, providedIn: "root" }); | ||
ClipboardService.ɵprov = ɵɵdefineInjectable({ factory: function ClipboardService_Factory() { return new ClipboardService(ɵɵinject(NgZone), ɵɵinject(DOCUMENT), ɵɵinject(WINDOW, 8)); }, token: ClipboardService, providedIn: "root" }); | ||
ClipboardService.decorators = [ | ||
@@ -167,2 +172,3 @@ { type: Injectable, args: [{ providedIn: 'root' },] } | ||
ClipboardService.ctorParameters = () => [ | ||
{ type: NgZone }, | ||
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }, | ||
@@ -173,23 +179,35 @@ { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [WINDOW,] }] } | ||
class ClipboardDirective { | ||
constructor(clipboardSrv) { | ||
constructor(ngZone, host, renderer, clipboardSrv) { | ||
this.ngZone = ngZone; | ||
this.host = host; | ||
this.renderer = renderer; | ||
this.clipboardSrv = clipboardSrv; | ||
this.cbOnSuccess = new EventEmitter(); | ||
this.cbOnError = new EventEmitter(); | ||
this.onClick = (event) => { | ||
if (!this.clipboardSrv.isSupported) { | ||
this.handleResult(false, undefined, event); | ||
} | ||
else if (this.targetElm && this.clipboardSrv.isTargetValid(this.targetElm)) { | ||
this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm), this.targetElm.value, event); | ||
} | ||
else if (this.cbContent) { | ||
this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent, this.container), this.cbContent, event); | ||
} | ||
}; | ||
} | ||
// tslint:disable-next-line:no-empty | ||
ngOnInit() { } | ||
ngOnInit() { | ||
this.ngZone.runOutsideAngular(() => { | ||
// By default each host listener schedules change detection and also wrapped | ||
// into additional function that calls `markForCheck()`. We're listening the `click` | ||
// event in the context of the root zone to avoid running unnecessary change detections, | ||
// since this directive doesn't do anything template-related (e.g. updates template variables). | ||
this.clickListener = this.renderer.listen(this.host.nativeElement, 'click', this.onClick); | ||
}); | ||
} | ||
ngOnDestroy() { | ||
this.clickListener(); | ||
this.clipboardSrv.destroy(this.container); | ||
} | ||
onClick(event) { | ||
if (!this.clipboardSrv.isSupported) { | ||
this.handleResult(false, undefined, event); | ||
} | ||
else if (this.targetElm && this.clipboardSrv.isTargetValid(this.targetElm)) { | ||
this.handleResult(this.clipboardSrv.copyFromInputElement(this.targetElm), this.targetElm.value, event); | ||
} | ||
else if (this.cbContent) { | ||
this.handleResult(this.clipboardSrv.copyFromContent(this.cbContent, this.container), this.cbContent, event); | ||
} | ||
} | ||
/** | ||
@@ -205,10 +223,18 @@ * Fires an event based on the copy operation result. | ||
if (succeeded) { | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.cbOnSuccess.emit(response); | ||
if (this.cbOnSuccess.observers.length > 0) { | ||
response = Object.assign(response, { | ||
content: copiedContent, | ||
successMessage: this.cbSuccessMsg | ||
}); | ||
this.ngZone.run(() => { | ||
this.cbOnSuccess.emit(response); | ||
}); | ||
} | ||
} | ||
else { | ||
this.cbOnError.emit(response); | ||
if (this.cbOnError.observers.length > 0) { | ||
this.ngZone.run(() => { | ||
this.cbOnError.emit(response); | ||
}); | ||
} | ||
} | ||
@@ -219,7 +245,8 @@ this.clipboardSrv.pushCopyResponse(response); | ||
ClipboardDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[ngxClipboard]' | ||
},] } | ||
{ type: Directive, args: [{ selector: '[ngxClipboard]' },] } | ||
]; | ||
ClipboardDirective.ctorParameters = () => [ | ||
{ type: NgZone }, | ||
{ type: ElementRef }, | ||
{ type: Renderer2 }, | ||
{ type: ClipboardService } | ||
@@ -233,4 +260,3 @@ ]; | ||
cbOnSuccess: [{ type: Output }], | ||
cbOnError: [{ type: Output }], | ||
onClick: [{ type: HostListener, args: ['click', ['$event.target'],] }] | ||
cbOnError: [{ type: Output }] | ||
}; | ||
@@ -237,0 +263,0 @@ |
@@ -1,5 +0,8 @@ | ||
import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; | ||
import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, Renderer2 } from '@angular/core'; | ||
import { IClipboardResponse } from './interface'; | ||
import { ClipboardService } from './ngx-clipboard.service'; | ||
export declare class ClipboardDirective implements OnInit, OnDestroy { | ||
private ngZone; | ||
private host; | ||
private renderer; | ||
private clipboardSrv; | ||
@@ -12,6 +15,7 @@ targetElm: HTMLInputElement | HTMLTextAreaElement | undefined | ''; | ||
cbOnError: EventEmitter<any>; | ||
constructor(clipboardSrv: ClipboardService); | ||
private clickListener; | ||
constructor(ngZone: NgZone, host: ElementRef<HTMLElement>, renderer: Renderer2, clipboardSrv: ClipboardService); | ||
ngOnInit(): void; | ||
ngOnDestroy(): void; | ||
onClick(event: Event): void; | ||
private onClick; | ||
/** | ||
@@ -18,0 +22,0 @@ * Fires an event based on the copy operation result. |
@@ -0,1 +1,2 @@ | ||
import { NgZone } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
@@ -7,2 +8,3 @@ import { ClipboardParams, IClipboardResponse } from './interface'; | ||
export declare class ClipboardService { | ||
private ngZone; | ||
document: any; | ||
@@ -14,3 +16,3 @@ private window; | ||
private config; | ||
constructor(document: any, window: any); | ||
constructor(ngZone: NgZone, document: any, window: any); | ||
configure(config: ClipboardParams): void; | ||
@@ -17,0 +19,0 @@ copy(content: string): 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":10,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":17},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":17,"character":24}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":17,"character":57}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":69},"arguments":[{"__symbolic":"reference","module":"ngx-window-token","name":"WINDOW","line":17,"character":76}]}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"any"}]}],"configure":[{"__symbolic":"method"}],"copy":[{"__symbolic":"method"}],"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"}],"pushCopyResponse":[{"__symbolic":"method"}],"pushCopyReponse":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"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":10,"character":35},{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"ngOnInit":[{"__symbolic":"method"}]}},"IClipboardResponse":{"__symbolic":"interface"},"ClipboardParams":{"__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","ClipboardParams":"./lib/interface"},"importAs":"ngx-clipboard"} | ||
{"__symbolic":"module","version":4,"metadata":{"ClipboardService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":19,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":20,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":20,"character":21},"arguments":[{"__symbolic":"reference","module":"ngx-window-token","name":"WINDOW","line":20,"character":28}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":18,"character":24},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"any"}]}],"configure":[{"__symbolic":"method"}],"copy":[{"__symbolic":"method"}],"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"}],"pushCopyResponse":[{"__symbolic":"method"}],"pushCopyReponse":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ClipboardDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":15,"character":1},"arguments":[{"selector":"[ngxClipboard]"}]}],"members":{"targetElm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5},"arguments":["ngxClipboard"]}]}],"container":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":5}}]}],"cbContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":5}}]}],"cbSuccessMsg":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":5}}]}],"cbOnSuccess":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":30,"character":5}}]}],"cbOnError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":33,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":39,"character":24},{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":40,"character":33,"context":{"typeName":"HTMLElement"},"module":"./lib/ngx-clipboard.directive"}]},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":41,"character":26},{"__symbolic":"reference","name":"ClipboardService"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"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":10,"character":35},{"__symbolic":"reference","name":"TemplateRef","module":"@angular/core","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"ngOnInit":[{"__symbolic":"method"}]}},"IClipboardResponse":{"__symbolic":"interface"},"ClipboardParams":{"__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","ClipboardParams":"./lib/interface"},"importAs":"ngx-clipboard"} |
{ | ||
"name": "ngx-clipboard", | ||
"description": "angular 2 clipboard", | ||
"version": "14.0.1", | ||
"version": "15.0.0-beta01", | ||
"author": { | ||
@@ -40,2 +40,2 @@ "name": "Sam Lin", | ||
"sideEffects": false | ||
} | ||
} |
@@ -25,2 +25,4 @@ [![Financial Contributors on Open Collective](https://opencollective.com/ngx-clipboard/all/badge.svg?label=financial+contributors)](https://opencollective.com/ngx-clipboard) [![travis build](https://img.shields.io/travis/maxisam/ngx-clipboard.svg?style=flat-square)](https://travis-ci.org/maxisam/ngx-clipboard) | ||
- If you need to use it on 9.x, please use version 13.x.x. | ||
- If you need to use it on 10.x, please use version 14.x.x. | ||
- If you need to use it on 11.x, please use version 15.x.x. (Thanks https://github.com/arturovt for updating & tuning) | ||
@@ -27,0 +29,0 @@ The code are pretty much the same, in v8.0.0 it uses InjectionToken which requires angular4 and above. |
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
146798
1049
234
2