@starley/ion-directives 1.3.11 → 1.3.14
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.
|
@@ -17,6 +17,6 @@ export declare class IonInputRemoveDirective {
|
|
|
17
17
|
* @returns pattern - letter - number - special - punctuation
|
|
18
18
|
*/
|
|
19
19
|
getPattern(typePatter: string): RegExp;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IonInputRemoveDirective, [{ host: true; self: true; }]>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IonInputRemoveDirective, [{ optional: true; host: true; self: true; }]>;
|
|
21
21
|
static ɵdir: i0.ɵɵDirectiveDeclaration<IonInputRemoveDirective, "[appRemoveFromInput]", never, { "pattern": { "alias": "appRemoveFromInput"; "required": false; }; }, {}, never, never, false, never>;
|
|
22
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive, Host, Input, Self } from '@angular/core';
|
|
1
|
+
import { Directive, Host, Input, Optional, Self } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@angular/forms";
|
|
4
4
|
var IonInputRemoveDirective = /** @class */ (function () {
|
|
@@ -40,7 +40,7 @@ var IonInputRemoveDirective = /** @class */ (function () {
|
|
|
40
40
|
return /[.,!?'"():;_-]/g;
|
|
41
41
|
return new RegExp(typePatter, 'g');
|
|
42
42
|
};
|
|
43
|
-
IonInputRemoveDirective.ɵfac = function IonInputRemoveDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IonInputRemoveDirective)(i0.ɵɵdirectiveInject(i1.NgModel,
|
|
43
|
+
IonInputRemoveDirective.ɵfac = function IonInputRemoveDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IonInputRemoveDirective)(i0.ɵɵdirectiveInject(i1.NgModel, 11)); };
|
|
44
44
|
IonInputRemoveDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: IonInputRemoveDirective, selectors: [["", "appRemoveFromInput", ""]], hostBindings: function IonInputRemoveDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
45
45
|
i0.ɵɵlistener("ionInput", function IonInputRemoveDirective_ionInput_HostBindingHandler($event) { return ctx.onIonInput($event); });
|
|
46
46
|
} }, inputs: { pattern: [0, "appRemoveFromInput", "pattern"] }, standalone: false });
|
|
@@ -56,6 +56,8 @@ export { IonInputRemoveDirective };
|
|
|
56
56
|
}
|
|
57
57
|
}]
|
|
58
58
|
}], function () { return [{ type: i1.NgModel, decorators: [{
|
|
59
|
+
type: Optional
|
|
60
|
+
}, {
|
|
59
61
|
type: Host
|
|
60
62
|
}, {
|
|
61
63
|
type: Self
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-remove.directive.js","sourceRoot":"","sources":["../../src/input-remove/input-remove.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;;;
|
|
1
|
+
{"version":3,"file":"input-remove.directive.js","sourceRoot":"","sources":["../../src/input-remove/input-remove.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;;;AAGvE;IASI,iCAA+C,KAAc;QAAd,UAAK,GAAL,KAAK,CAAS;IAAI,CAAC;IAElE;;;;OAIG;IACH,4CAAU,GAAV,UAAW,KAAU;QACjB,IAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAExB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAC1E,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;YAEpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE;gBAC/B,SAAS,EAAE,IAAI;gBACf,qBAAqB,EAAE,IAAI;gBAC3B,qBAAqB,EAAE,IAAI;aAC9B,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,4CAAU,GAAV,UAAW,UAAkB;QACzB,IAAI,UAAU,KAAK,QAAQ;YAAE,OAAO,YAAY,CAAC;QACjD,IAAI,UAAU,KAAK,QAAQ;YAAE,OAAO,QAAQ,CAAC;QAC7C,IAAI,UAAU,KAAK,SAAS;YAAE,OAAO,2BAA2B,CAAC;QACjE,IAAI,UAAU,KAAK,aAAa;YAAE,OAAO,iBAAiB,CAAC;QAC3D,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IACvC,CAAC;kIAtCQ,uBAAuB;8EAAvB,uBAAuB;YAAvB,wGAAA,sBAAkB,IAAK;;kCATpC;CAgDC,AA7CD,IA6CC;SAvCY,uBAAuB;uFAAvB,uBAAuB;cANnC,SAAS;eAAC;gBACP,QAAQ,EAAE,sBAAsB;gBAChC,IAAI,EAAE;oBACF,YAAY,EAAE,oBAAoB;iBACrC;aACJ;;sBAIgB,QAAQ;;sBAAI,IAAI;;sBAAI,IAAI;wBAFR,OAAO;kBAAnC,KAAK;mBAAC,oBAAoB","sourcesContent":["import { Directive, Host, Input, Optional, Self } from '@angular/core';\nimport { NgModel } from \"@angular/forms\";\n\n@Directive({\n selector: '[appRemoveFromInput]',\n host: {\n '(ionInput)': 'onIonInput($event)'\n }\n})\nexport class IonInputRemoveDirective {\n @Input('appRemoveFromInput') pattern: string;\n\n constructor(@Optional() @Host() @Self() public model: NgModel) { }\n\n /**\n * Determines whether ion input on\n * @author Starley Cazorla\n * @param event\n */\n onIonInput(event: any) {\n const input = event.target as HTMLInputElement;\n let value = input.value;\n\n if (this.pattern) {\n value = value.normalize('NFD').replace(this.getPattern(this.pattern), '');\n input.value = value;\n\n this.model.control.setValue(value, {\n emitEvent: true,\n emitModelToViewChange: true,\n emitViewToModelChange: true\n });\n }\n }\n\n /**\n * Gets pattern\n * @author Starley Cazorla\n * @param typePatter\n * @returns pattern - letter - number - special - punctuation\n */\n getPattern(typePatter: string): RegExp {\n if (typePatter === 'letter') return /[a-zA-Z]+/g;\n if (typePatter === 'number') return /[0-9]/g;\n if (typePatter === 'special') return /[^a-zA-Z0-9\\s.,!?'\"():;]/g;\n if (typePatter === 'punctuation') return /[.,!?'\"():;_-]/g;\n return new RegExp(typePatter, 'g');\n }\n}\n"]}
|
|
@@ -28,7 +28,7 @@ export declare class IonUtilsProvider {
|
|
|
28
28
|
* @param enumInput
|
|
29
29
|
* @returns
|
|
30
30
|
*/
|
|
31
|
-
returnEnumStringName(enumInput: any):
|
|
31
|
+
returnEnumStringName(enumInput: any): any[];
|
|
32
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<IonUtilsProvider, never>;
|
|
33
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<IonUtilsProvider>;
|
|
34
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starley/ion-directives",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14",
|
|
4
4
|
"description": "Directivas internas para ionic",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"ngc": "ngc",
|
|
12
|
-
"build": "rm -rf dist && rm -rf node_modules && npm install --legacy-peer-deps && npm run ngc",
|
|
12
|
+
"build": "rm -rf dist && rm -rf node_modules package-lock.json && npm install --legacy-peer-deps && npm run ngc",
|
|
13
13
|
"publishPackage": "npm run build && npm publish"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@angular/common": "^19.2.2",
|
|
41
41
|
"@angular/compiler": "^19.2.2",
|
|
42
|
-
"@angular/compiler-cli": "^18.0.
|
|
42
|
+
"@angular/compiler-cli": "^18.0.00",
|
|
43
43
|
"@angular/core": "^19.2.2",
|
|
44
44
|
"@angular/forms": "^19.2.2",
|
|
45
45
|
"@types/node": "^22.13.10",
|
|
46
46
|
"nodemon": "^3.1.9",
|
|
47
47
|
"ts-node": "^10.9.2",
|
|
48
|
-
"typescript": "~5.
|
|
48
|
+
"typescript": "~5.4.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"codelyzer": "^6.0.2",
|