@starley/ion-directives 1.2.42 → 1.2.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/dist/block-input/block-copy-past.directive.d.ts +4 -6
- package/dist/block-input/block-copy-past.directive.js +11 -12
- package/dist/block-input/block-copy-past.directive.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ Adicione dentro do input a chamada passando após o simbolo de '=' a formataçã
|
|
|
41
41
|
|
|
42
42
|
* Agora e possivel criar mascaras customizadas para serem alteradas
|
|
43
43
|
|
|
44
|
-
Ex: [appMask]="isCpf ? '***.***.***-**' : '**.***.***/****-**'"
|
|
44
|
+
Ex: [appMask]="isCpf ? '***.***.***-**' : '**.***.***/****-**'"
|
|
45
45
|
|
|
46
46
|
my-component.html
|
|
47
47
|
|
|
@@ -163,6 +163,22 @@ my-component.html
|
|
|
163
163
|
</ion-content>
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
+
### Para usar 'appBlockCopyPaste'
|
|
167
|
+
|
|
168
|
+
Agora ele ira bloquear o copia e colar do input!
|
|
169
|
+
|
|
170
|
+
```html
|
|
171
|
+
<ion-content>
|
|
172
|
+
...
|
|
173
|
+
<ion-content>
|
|
174
|
+
...
|
|
175
|
+
<ion-input appBlockCopyPaste> </ion-input>
|
|
176
|
+
...
|
|
177
|
+
</ion-content>
|
|
178
|
+
...
|
|
179
|
+
</ion-content>
|
|
180
|
+
```
|
|
181
|
+
|
|
166
182
|
## License
|
|
167
183
|
|
|
168
184
|
[](https://choosealicense.com/licenses/mit/)
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
2
|
export declare class BlockCopyPasteDirective {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
onCopy(e: ClipboardEvent): void;
|
|
3
|
+
constructor();
|
|
4
|
+
blockPaste(e: KeyboardEvent): void;
|
|
5
|
+
blockCopy(e: KeyboardEvent): void;
|
|
6
|
+
blockCut(e: KeyboardEvent): void;
|
|
9
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<BlockCopyPasteDirective, never>;
|
|
10
8
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BlockCopyPasteDirective, "[appBlockCopyPaste]", never, {}, {}, never, never, false, never>;
|
|
11
9
|
}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { Directive, HostListener } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
var BlockCopyPasteDirective = /** @class */ (function () {
|
|
4
|
-
function BlockCopyPasteDirective(
|
|
5
|
-
this.el = el;
|
|
4
|
+
function BlockCopyPasteDirective() {
|
|
6
5
|
}
|
|
7
|
-
BlockCopyPasteDirective.prototype.
|
|
6
|
+
BlockCopyPasteDirective.prototype.blockPaste = function (e) {
|
|
8
7
|
e.preventDefault();
|
|
9
8
|
};
|
|
10
|
-
BlockCopyPasteDirective.prototype.
|
|
9
|
+
BlockCopyPasteDirective.prototype.blockCopy = function (e) {
|
|
11
10
|
e.preventDefault();
|
|
12
11
|
};
|
|
13
|
-
BlockCopyPasteDirective.prototype.
|
|
12
|
+
BlockCopyPasteDirective.prototype.blockCut = function (e) {
|
|
14
13
|
e.preventDefault();
|
|
15
14
|
};
|
|
16
|
-
BlockCopyPasteDirective.ɵfac = function BlockCopyPasteDirective_Factory(t) { return new (t || BlockCopyPasteDirective)(
|
|
15
|
+
BlockCopyPasteDirective.ɵfac = function BlockCopyPasteDirective_Factory(t) { return new (t || BlockCopyPasteDirective)(); };
|
|
17
16
|
BlockCopyPasteDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: BlockCopyPasteDirective, selectors: [["", "appBlockCopyPaste", ""]], hostBindings: function BlockCopyPasteDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
18
|
-
i0.ɵɵlistener("paste", function BlockCopyPasteDirective_paste_HostBindingHandler($event) { return ctx.
|
|
17
|
+
i0.ɵɵlistener("paste", function BlockCopyPasteDirective_paste_HostBindingHandler($event) { return ctx.blockPaste($event); })("copy", function BlockCopyPasteDirective_copy_HostBindingHandler($event) { return ctx.blockCopy($event); })("cut", function BlockCopyPasteDirective_cut_HostBindingHandler($event) { return ctx.blockCut($event); });
|
|
19
18
|
} } });
|
|
20
19
|
return BlockCopyPasteDirective;
|
|
21
20
|
}());
|
|
@@ -25,14 +24,14 @@ export { BlockCopyPasteDirective };
|
|
|
25
24
|
args: [{
|
|
26
25
|
selector: '[appBlockCopyPaste]'
|
|
27
26
|
}]
|
|
28
|
-
}], function () { return [
|
|
27
|
+
}], function () { return []; }, { blockPaste: [{
|
|
29
28
|
type: HostListener,
|
|
30
29
|
args: ['paste', ['$event']]
|
|
31
|
-
}],
|
|
32
|
-
type: HostListener,
|
|
33
|
-
args: ['cut', ['$event']]
|
|
34
|
-
}], onCopy: [{
|
|
30
|
+
}], blockCopy: [{
|
|
35
31
|
type: HostListener,
|
|
36
32
|
args: ['copy', ['$event']]
|
|
33
|
+
}], blockCut: [{
|
|
34
|
+
type: HostListener,
|
|
35
|
+
args: ['cut', ['$event']]
|
|
37
36
|
}] }); })();
|
|
38
37
|
//# sourceMappingURL=block-copy-past.directive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-copy-past.directive.js","sourceRoot":"","sources":["../../src/block-input/block-copy-past.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"block-copy-past.directive.js","sourceRoot":"","sources":["../../src/block-input/block-copy-past.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;AAExD;IAIE;IAAgB,CAAC;IAEkB,4CAAU,GAA7C,UAA8C,CAAgB;QAC5D,CAAC,CAAC,cAAc,EAAE,CAAC;IACrB,CAAC;IAEiC,2CAAS,GAA3C,UAA4C,CAAgB;QAC1D,CAAC,CAAC,cAAc,EAAE,CAAC;IACrB,CAAC;IAEgC,0CAAQ,GAAzC,UAA0C,CAAgB;QACxD,CAAC,CAAC,cAAc,EAAE,CAAC;IACrB,CAAC;kGAbU,uBAAuB;8EAAvB,uBAAuB;8GAAvB,sBAAkB,uFAAlB,qBAAiB,qFAAjB,oBAAgB;;kCAL7B;CAmBC,AAjBD,IAiBC;SAdY,uBAAuB;uFAAvB,uBAAuB;cAHnC,SAAS;eAAC;gBACT,QAAQ,EAAE,qBAAqB;aAChC;sCAIoC,UAAU;kBAA5C,YAAY;mBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;YAIC,SAAS;kBAA1C,YAAY;mBAAC,MAAM,EAAE,CAAC,QAAQ,CAAC;YAIC,QAAQ;kBAAxC,YAAY;mBAAC,KAAK,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import { Directive, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[appBlockCopyPaste]'\n})\nexport class BlockCopyPasteDirective {\n constructor() { }\n\n @HostListener('paste', ['$event']) blockPaste(e: KeyboardEvent) {\n e.preventDefault();\n }\n\n @HostListener('copy', ['$event']) blockCopy(e: KeyboardEvent) {\n e.preventDefault();\n }\n\n @HostListener('cut', ['$event']) blockCut(e: KeyboardEvent) {\n e.preventDefault();\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './directive.module';\nexport * from './input-mask/input-mask.directive';\nexport * from './input-remove/input-remove.directive';\nexport * from './press-hold/press-hold.directive';\nexport { ConnectorSqlitePwaProvider } from './provider/connector-sqlite-pwa.provider';\nexport { DateUtilProvider } from './provider/date-util-provider';\nexport { IonUtilsProvider } from './provider/ion-utils-provider';\nexport { IonValidateFilds } from './provider/ion-validate-filds';\nexport * from './tap/tap.directive';\n
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,oBAAoB,CAAC;AACnC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './block-input/block-copy-past.directive';\nexport * from './directive.module';\nexport * from './input-mask/input-mask.directive';\nexport * from './input-remove/input-remove.directive';\nexport * from './press-hold/press-hold.directive';\nexport { ConnectorSqlitePwaProvider } from './provider/connector-sqlite-pwa.provider';\nexport { DateUtilProvider } from './provider/date-util-provider';\nexport { IonUtilsProvider } from './provider/ion-utils-provider';\nexport { IonValidateFilds } from './provider/ion-validate-filds';\nexport * from './tap/tap.directive';\n"]}
|