@starley/ion-directives 1.2.7 → 1.2.9

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.
@@ -3,7 +3,7 @@ import { PressHoldDirective } from './press-hold/press-hold.directive';
3
3
  import { TapDirective } from './tap/tap.directive';
4
4
  import { IonInputMaskDirective } from './input-mask/input-mask.directive';
5
5
  import { CommonModule } from '@angular/common';
6
- import { IonInputMaskService } from './input-mask/input-mask.service';
6
+ import { JsonToArray } from './jsontToArray';
7
7
  import * as i0 from "@angular/core";
8
8
  /**
9
9
  * Gerencia precionamento de enventos
@@ -15,15 +15,12 @@ var DirectivesModule = /** @class */ (function () {
15
15
  DirectivesModule.forRoot = function () {
16
16
  return {
17
17
  ngModule: DirectivesModule,
18
- providers: []
18
+ providers: [JsonToArray]
19
19
  };
20
20
  };
21
21
  DirectivesModule.ɵfac = function DirectivesModule_Factory(t) { return new (t || DirectivesModule)(); };
22
22
  DirectivesModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: DirectivesModule });
23
- DirectivesModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
24
- IonInputMaskService,
25
- IonInputMaskDirective
26
- ], imports: [CommonModule] });
23
+ DirectivesModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule] });
27
24
  return DirectivesModule;
28
25
  }());
29
26
  export { DirectivesModule };
@@ -43,10 +40,6 @@ export { DirectivesModule };
43
40
  TapDirective,
44
41
  IonInputMaskDirective
45
42
  ],
46
- providers: [
47
- IonInputMaskService,
48
- IonInputMaskDirective
49
- ],
50
43
  schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA]
51
44
  }]
52
45
  }], null, null); })();
@@ -1 +1 @@
1
- {"version":3,"file":"directive.module.js","sourceRoot":"","sources":["../src/directive.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAuB,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;;AAEtE;;;GAGG;AAEH;IAAA;KA4BC;IANU,wBAAO,GAAd;QACI,OAAO;YACH,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE,EAAE;SAChB,CAAC;IACN,CAAC;oFANQ,gBAAgB;sEAAhB,gBAAgB;2EAPd;YACP,mBAAmB;YACnB,qBAAqB;SACxB,YAVG,YAAY;2BAnBpB;CAwCC,AA5BD,IA4BC;SAPY,gBAAgB;uFAAhB,gBAAgB;cArB5B,QAAQ;eAAC;gBACN,YAAY,EAAE;oBACV,kBAAkB;oBAClB,YAAY;oBACZ,qBAAqB;iBACxB;gBACD,OAAO,EAAE;oBACL,YAAY;iBACf;gBACD,OAAO,EAAE;oBACL,kBAAkB;oBAClB,YAAY;oBACZ,qBAAqB;iBACxB;gBACD,SAAS,EAAE;oBACP,mBAAmB;oBACnB,qBAAqB;iBACxB;gBACD,OAAO,EAAE,CAAC,sBAAsB,EAAE,gBAAgB,CAAC;aAEtD;;wFACY,gBAAgB,mBAnBrB,kBAAkB;QAClB,YAAY;QACZ,qBAAqB,aAGrB,YAAY,aAGZ,kBAAkB;QAClB,YAAY;QACZ,qBAAqB","sourcesContent":["import { CUSTOM_ELEMENTS_SCHEMA, ModuleWithProviders, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';\nimport { PressHoldDirective } from './press-hold/press-hold.directive';\nimport { TapDirective } from './tap/tap.directive';\nimport { IonInputMaskDirective } from './input-mask/input-mask.directive';\nimport { CommonModule } from '@angular/common';\nimport { IonInputMaskService } from './input-mask/input-mask.service';\n\n/**\n * Gerencia precionamento de enventos\n * @author Starley Cazorla\n */\n\n@NgModule({\n declarations: [\n PressHoldDirective,\n TapDirective,\n IonInputMaskDirective\n ],\n imports: [\n CommonModule\n ],\n exports: [\n PressHoldDirective,\n TapDirective,\n IonInputMaskDirective\n ],\n providers: [\n IonInputMaskService,\n IonInputMaskDirective\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA]\n\n})\nexport class DirectivesModule {\n static forRoot(): ModuleWithProviders<DirectivesModule> {\n return {\n ngModule: DirectivesModule,\n providers: []\n };\n }\n}\n"]}
1
+ {"version":3,"file":"directive.module.js","sourceRoot":"","sources":["../src/directive.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAuB,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;;AAE7C;;;GAGG;AAEH;IAAA;KAwBC;IANU,wBAAO,GAAd;QACI,OAAO;YACH,QAAQ,EAAE,gBAAgB;YAC1B,SAAS,EAAE,CAAC,WAAW,CAAC;SAC3B,CAAC;IACN,CAAC;oFANQ,gBAAgB;sEAAhB,gBAAgB;0EAVrB,YAAY;2BAnBpB;CAoCC,AAxBD,IAwBC;SAPY,gBAAgB;uFAAhB,gBAAgB;cAjB5B,QAAQ;eAAC;gBACN,YAAY,EAAE;oBACV,kBAAkB;oBAClB,YAAY;oBACZ,qBAAqB;iBACxB;gBACD,OAAO,EAAE;oBACL,YAAY;iBACf;gBACD,OAAO,EAAE;oBACL,kBAAkB;oBAClB,YAAY;oBACZ,qBAAqB;iBACxB;gBACD,OAAO,EAAE,CAAC,sBAAsB,EAAE,gBAAgB,CAAC;aAEtD;;wFACY,gBAAgB,mBAfrB,kBAAkB;QAClB,YAAY;QACZ,qBAAqB,aAGrB,YAAY,aAGZ,kBAAkB;QAClB,YAAY;QACZ,qBAAqB","sourcesContent":["import { CUSTOM_ELEMENTS_SCHEMA, ModuleWithProviders, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';\nimport { PressHoldDirective } from './press-hold/press-hold.directive';\nimport { TapDirective } from './tap/tap.directive';\nimport { IonInputMaskDirective } from './input-mask/input-mask.directive';\nimport { CommonModule } from '@angular/common';\nimport { JsonToArray } from './jsontToArray';\n\n/**\n * Gerencia precionamento de enventos\n * @author Starley Cazorla\n */\n\n@NgModule({\n declarations: [\n PressHoldDirective,\n TapDirective,\n IonInputMaskDirective\n ],\n imports: [\n CommonModule\n ],\n exports: [\n PressHoldDirective,\n TapDirective,\n IonInputMaskDirective\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA]\n\n})\nexport class DirectivesModule {\n static forRoot(): ModuleWithProviders<DirectivesModule> {\n return {\n ngModule: DirectivesModule,\n providers: [JsonToArray]\n };\n }\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './input-mask/input-mask.directive';
2
2
  export * from './press-hold/press-hold.directive';
3
- export * from './input-mask/input-mask.service';
4
3
  export * from './tap/tap.directive';
5
4
  export * from './directive.module';
5
+ export * from './jsontToArray';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from './input-mask/input-mask.directive';
2
2
  export * from './press-hold/press-hold.directive';
3
- export * from './input-mask/input-mask.service';
4
3
  export * from './tap/tap.directive';
5
4
  export * from './directive.module';
5
+ export * from './jsontToArray';
6
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './input-mask/input-mask.directive'\nexport * from './press-hold/press-hold.directive';\nexport * from './input-mask/input-mask.service';\nexport * from './tap/tap.directive'\nexport * from './directive.module';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAA;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAA","sourcesContent":["export * from './input-mask/input-mask.directive'\nexport * from './press-hold/press-hold.directive';\nexport * from './tap/tap.directive'\nexport * from './directive.module';\nexport * from './jsontToArray'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"input-mask.directive.js","sourceRoot":"","sources":["../../src/input-mask/input-mask.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;;;AAEzC;;;;GAIG;AAEH;IAWI;;;;OAIG;IACH,+BAAmB,KAAc,EACP,OAAsB;QAA5C,wBAAA,EAAA,cAA4C;QAD7B,UAAK,GAAL,KAAK,CAAS;QAE7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,yCAAS,GAAT,UAAU,KAAU;QAChB,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,EAC1B,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3B,IAAI,OAAO,KAAK,IAAI,EAAE;YAClB,IAAI,KAAK,CAAC,aAAa,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,KAAK,CAAC,IAAI,KAA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CAFf,CAAC,OAAO,CAAC;gCAdxB;CA0EC,AAjED,IAiEC;SA1DY,qBAAqB;uFAArB,qBAAqB;cAPjC,SAAS;eAAC;gBACP,QAAQ,EAAE,WAAW;gBACrB,IAAI,EAAE;oBACF,WAAW,EAAE,mBAAmB;iBACnC;gBACD,SAAS,EAAE,CAAC,OAAO,CAAC;aACvB;;sBAWQ,SAAS;uBAAC,SAAS","sourcesContent":["import { Attribute, Directive } from '@angular/core';\nimport { NgModel } from \"@angular/forms\";\n\n/**\n * Responsavel pelo mascaramento de inputs\n * @author Thiago Przyczynski\n * przyczynski@gmail.com\n */\n\n@Directive({\n selector: '[appMask]',\n host: {\n '(keydown)': 'onKeyDown($event)'\n },\n providers: [NgModel]\n})\nexport class IonInputMaskDirective {\n\n pattern: string;\n\n /**\n * Construtor\n * @param {NgModel} model\n * @param {string} pattern\n */\n constructor(public model: NgModel,\n @Attribute('appMask') pattern: string = null) {\n this.pattern = pattern;\n }\n\n /**\n * Listener para mudança de valor do input\n * @param event\n */\n onKeyDown(event: any) {\n let value = event.target.value,\n pattern = this.pattern;\n if (pattern !== null) {\n if (event.keyIdentifier === 'U+0008' || event.keyCode === 8 || event.key === 'Backspace') {\n if (value.length) { //prevent fatal exception when backspacing empty value in progressive web app\n //remove all trailing formatting then delete character\n while (pattern[value.length] && pattern[value.length] !== '*') {\n value = value.substring(0, value.length - 1);\n }\n //remove all leading formatting to restore placeholder\n if (pattern.substring(0, value.length).indexOf('*') < 0) {\n value = value.substring(0, value.length - 1);\n }\n }\n\n // Caso o padrao esteja definido como null ira retornar o valor digitado!\n } else {\n let maskIndex = value.length;\n let formatted = '';\n formatted += value;\n if (maskIndex < pattern.length) {\n //apply trailing formatting\n while (pattern[maskIndex] !== '*') {\n formatted += pattern[maskIndex];\n maskIndex++;\n }\n }\n value = formatted;\n }\n }\n event.target.value = value;\n if (this.model) {\n this.model.update.emit(value);\n }\n return true;\n }\n\n \n\n}"]}
1
+ {"version":3,"file":"input-mask.directive.js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GAAG,KAAK,CAAC,MAAM,CAAC;gBAC7B,IAAI,SAAS,GAAG,EAAE,CAAC;gBACnB,SAAS,IAAI,KAAK,CAAC;gBACnB,IAAI,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE;oBAC5B,2BAA2B;oBAC3B,OAAO,OAAO,CAAC,SAAS,CAAC,KAAK,GAAG,EAAE;wBAC/B,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;wBAChC,SAAS,EAAE,CAAC;qBACf;iBACJ;gBACD,KAAK,GAAG,SAAS,CAAC;aACrB;SACJ;QACD,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QAC3B,IAAI,IAAI,CAAC,KAAK,EAAE;YACZ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACjC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;8FAtDQ,qBAAqB,yDAUf,SAAS;4EAVf,qBAAqB;gHAArB,qBAAiB;8CAFf,CAAC,OAAO,CAAC;gCAdxB;CAwEC,AA/DD,IA+DC;SAxDY,qBAAqB;uFAArB,qBAAqB;cAPjC,SAAS;eAAC;gBACP,QAAQ,EAAE,WAAW;gBACrB,IAAI,EAAE;oBACF,WAAW,EAAE,mBAAmB;iBACnC;gBACD,SAAS,EAAE,CAAC,OAAO,CAAC;aACvB;;sBAWQ,SAAS;uBAAC,SAAS","sourcesContent":["import { Attribute, Directive } from '@angular/core';\nimport { NgModel } from \"@angular/forms\";\n\n/**\n * Responsavel pelo mascaramento de inputs\n * @author Thiago Przyczynski\n * przyczynski@gmail.com\n */\n\n@Directive({\n selector: '[appMask]',\n host: {\n '(keydown)': 'onKeyDown($event)'\n },\n providers: [NgModel]\n})\nexport class IonInputMaskDirective {\n\n pattern: string;\n\n /**\n * Construtor\n * @param {NgModel} model\n * @param {string} pattern\n */\n constructor(public model: NgModel,\n @Attribute('appMask') pattern: string = null) {\n this.pattern = pattern;\n }\n\n /**\n * Listener para mudança de valor do input\n * @param event\n */\n onKeyDown(event: any) {\n let value = event.target.value,\n pattern = this.pattern;\n if (pattern !== null) {\n if (event.keyIdentifier === 'U+0008' || event.keyCode === 8 || event.key === 'Backspace') {\n if (value.length) { //prevent fatal exception when backspacing empty value in progressive web app\n //remove all trailing formatting then delete character\n while (pattern[value.length] && pattern[value.length] !== '*') {\n value = value.substring(0, value.length - 1);\n }\n //remove all leading formatting to restore placeholder\n if (pattern.substring(0, value.length).indexOf('*') < 0) {\n value = value.substring(0, value.length - 1);\n }\n }\n\n // Caso o padrao esteja definido como null ira retornar o valor digitado!\n } else {\n let maskIndex = value.length;\n let formatted = '';\n formatted += value;\n if (maskIndex < pattern.length) {\n //apply trailing formatting\n while (pattern[maskIndex] !== '*') {\n formatted += pattern[maskIndex];\n maskIndex++;\n }\n }\n value = formatted;\n }\n }\n event.target.value = value;\n if (this.model) {\n this.model.update.emit(value);\n }\n return true;\n }\n\n}"]}
@@ -0,0 +1,15 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Classe responsavel por manipulação de Json para Array
4
+ * @author Starley Cazorla
5
+ */
6
+ export declare class JsonToArray {
7
+ /**
8
+ * Converte JSON em Array
9
+ * @param data
10
+ * @returns
11
+ */
12
+ convertJsonToArray(data: any): Promise<[]>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<JsonToArray, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<JsonToArray>;
15
+ }
@@ -0,0 +1,28 @@
1
+ import { Injectable } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Classe responsavel por manipulação de Json para Array
5
+ * @author Starley Cazorla
6
+ */
7
+ var JsonToArray = /** @class */ (function () {
8
+ function JsonToArray() {
9
+ }
10
+ /**
11
+ * Converte JSON em Array
12
+ * @param data
13
+ * @returns
14
+ */
15
+ JsonToArray.prototype.convertJsonToArray = function (data) {
16
+ var jsonData = data.map(function (val) { return JSON.stringify(val); });
17
+ return jsonData.filter(function (value, ind) { return jsonData.indexOf(value) == ind; }).map(function (val) { return JSON.parse(val); });
18
+ };
19
+ JsonToArray.ɵfac = function JsonToArray_Factory(t) { return new (t || JsonToArray)(); };
20
+ JsonToArray.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: JsonToArray, factory: JsonToArray.ɵfac, providedIn: 'root' });
21
+ return JsonToArray;
22
+ }());
23
+ export { JsonToArray };
24
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(JsonToArray, [{
25
+ type: Injectable,
26
+ args: [{ providedIn: 'root' }]
27
+ }], null, null); })();
28
+ //# sourceMappingURL=jsontToArray.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsontToArray.js","sourceRoot":"","sources":["../src/jsontToArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;AAE3C;;;GAGG;AAEH;IAAA;KAaC;IAVG;;;;OAIG;IACH,wCAAkB,GAAlB,UAAmB,IAAS;QACxB,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAC,GAAQ,IAAO,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;QACtE,OAAO,QAAQ,CAAC,MAAM,CAAC,UAAC,KAAU,EAAE,GAAQ,IAAK,OAAA,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,EAA9B,CAA8B,CAAC,CAAC,GAAG,CAAC,UAAC,GAAW,IAAO,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;IACtI,CAAC;0EAVQ,WAAW;qEAAX,WAAW,WAAX,WAAW,mBADE,MAAM;sBAPhC;CAoBC,AAbD,IAaC;SAZY,WAAW;uFAAX,WAAW;cADvB,UAAU;eAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["import { Injectable } from \"@angular/core\";\n\n/**\n * Classe responsavel por manipulação de Json para Array\n * @author Starley Cazorla\n */\n\n@Injectable({ providedIn: 'root' })\nexport class JsonToArray {\n\n /**\n * Converte JSON em Array\n * @param data \n * @returns \n */\n convertJsonToArray(data: any): Promise<[]> {\n let jsonData = data.map((val: any) => { return JSON.stringify(val) });\n return jsonData.filter((value: any, ind: any) => jsonData.indexOf(value) == ind).map((val: string) => { return JSON.parse(val) });\n }\n\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starley/ion-directives",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "Directivas internas para ionic",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
@@ -1,15 +0,0 @@
1
- import { IonInputMaskDirective } from "./input-mask.directive";
2
- import * as i0 from "@angular/core";
3
- export declare class IonInputMaskService {
4
- private inputMaskDirective;
5
- constructor(inputMaskDirective: IonInputMaskDirective);
6
- /**
7
- * Aplica mascara via metodo
8
- * @author Starley Cazorla
9
- * @param value - Valor a ser mascarado
10
- * @param mask - Mascara desejada; Ex: "(**) ****-****"
11
- */
12
- applyMask(value: any, mask: string): boolean;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<IonInputMaskService, never>;
14
- static ɵprov: i0.ɵɵInjectableDeclaration<IonInputMaskService>;
15
- }
@@ -1,26 +0,0 @@
1
- import { Injectable } from "@angular/core";
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "./input-mask.directive";
4
- var IonInputMaskService = /** @class */ (function () {
5
- function IonInputMaskService(inputMaskDirective) {
6
- this.inputMaskDirective = inputMaskDirective;
7
- }
8
- /**
9
- * Aplica mascara via metodo
10
- * @author Starley Cazorla
11
- * @param value - Valor a ser mascarado
12
- * @param mask - Mascara desejada; Ex: "(**) ****-****"
13
- */
14
- IonInputMaskService.prototype.applyMask = function (value, mask) {
15
- this.inputMaskDirective.pattern = mask;
16
- return this.inputMaskDirective.onKeyDown(value);
17
- };
18
- IonInputMaskService.ɵfac = function IonInputMaskService_Factory(t) { return new (t || IonInputMaskService)(i0.ɵɵinject(i1.IonInputMaskDirective)); };
19
- IonInputMaskService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: IonInputMaskService, factory: IonInputMaskService.ɵfac });
20
- return IonInputMaskService;
21
- }());
22
- export { IonInputMaskService };
23
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IonInputMaskService, [{
24
- type: Injectable
25
- }], function () { return [{ type: i1.IonInputMaskDirective }]; }, null); })();
26
- //# sourceMappingURL=input-mask.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-mask.service.js","sourceRoot":"","sources":["../../src/input-mask/input-mask.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;;AAG3C;IAGI,6BAAoB,kBAAyC;QAAzC,uBAAkB,GAAlB,kBAAkB,CAAuB;IAAI,CAAC;IAElE;;;;;MAKE;IACK,uCAAS,GAAhB,UAAiB,KAAU,EAAE,IAAY;QACrC,IAAI,CAAC,kBAAkB,CAAC,OAAO,GAAG,IAAI,CAAC;QACvC,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;0FAbQ,mBAAmB;6EAAnB,mBAAmB,WAAnB,mBAAmB;8BAJhC;CAoBC,AAjBD,IAiBC;SAhBY,mBAAmB;uFAAnB,mBAAmB;cAD/B,UAAU","sourcesContent":["import { Injectable } from \"@angular/core\";\nimport { IonInputMaskDirective } from \"./input-mask.directive\";\n\n@Injectable()\nexport class IonInputMaskService {\n\n constructor(private inputMaskDirective: IonInputMaskDirective) { }\n\n /**\n * Aplica mascara via metodo\n * @author Starley Cazorla\n * @param value - Valor a ser mascarado \n * @param mask - Mascara desejada; Ex: \"(**) ****-****\"\n */\n public applyMask(value: any, mask: string) {\n this.inputMaskDirective.pattern = mask;\n return this.inputMaskDirective.onKeyDown(value);\n }\n\n\n}"]}