@posiwise/utils 0.0.24 → 0.0.25

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/package.json CHANGED
@@ -1,24 +1,17 @@
1
1
  {
2
2
  "name": "@posiwise/utils",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "peerDependencies": {
5
- "@angular/common": "15.2.5",
6
- "@angular/core": "15.2.5",
7
- "@angular/forms": "15.2.5",
8
- "quill": "^1.3.7",
9
- "reflect-metadata": "0.1.13",
10
- "quill-image-resize": "3.0.9",
11
- "@angular/router": "15.2.5"
5
+ "@angular/common": "17.0.7",
6
+ "@angular/core": "17.0.7",
7
+ "@angular/forms": "17.0.7",
8
+ "quill": "^1.3.7"
12
9
  },
13
10
  "dependencies": {
14
- "tslib": "^2.3.0"
11
+ "tslib": "^2.6.2"
15
12
  },
16
13
  "sideEffects": false,
17
- "module": "fesm2015/posiwise-utils.mjs",
18
- "es2020": "fesm2020/posiwise-utils.mjs",
19
- "esm2020": "esm2020/posiwise-utils.mjs",
20
- "fesm2020": "fesm2020/posiwise-utils.mjs",
21
- "fesm2015": "fesm2015/posiwise-utils.mjs",
14
+ "module": "fesm2022/posiwise-utils.mjs",
22
15
  "typings": "index.d.ts",
23
16
  "exports": {
24
17
  "./package.json": {
@@ -26,11 +19,9 @@
26
19
  },
27
20
  ".": {
28
21
  "types": "./index.d.ts",
29
- "esm2020": "./esm2020/posiwise-utils.mjs",
30
- "es2020": "./fesm2020/posiwise-utils.mjs",
31
- "es2015": "./fesm2015/posiwise-utils.mjs",
32
- "node": "./fesm2015/posiwise-utils.mjs",
33
- "default": "./fesm2020/posiwise-utils.mjs"
22
+ "esm2022": "./esm2022/posiwise-utils.mjs",
23
+ "esm": "./esm2022/posiwise-utils.mjs",
24
+ "default": "./fesm2022/posiwise-utils.mjs"
34
25
  }
35
26
  }
36
- }
27
+ }
@@ -1,59 +0,0 @@
1
- import Quill from 'quill';
2
- import ImageResize from 'quill-image-resize';
3
- import 'reflect-metadata';
4
-
5
- class QuillHelper {
6
- static init() {
7
- Quill.register('modules/imageResize', ImageResize);
8
- }
9
- }
10
-
11
- function checkFormValidation(form) {
12
- if (!form.valid) {
13
- form.markAllAsTouched();
14
- return false;
15
- }
16
- return true;
17
- }
18
- function ValidateForm(formName) {
19
- return function (_target, _methodName, descriptor) {
20
- const originalMethod = descriptor.value;
21
- descriptor.value = function (...args) {
22
- const formGroup = this[formName];
23
- if (checkFormValidation(formGroup)) {
24
- originalMethod.apply(this, args);
25
- }
26
- };
27
- return descriptor;
28
- };
29
- }
30
- function MatchPassword(abstractControl) {
31
- const password = abstractControl.get('password').value;
32
- const confirmPassword = abstractControl.get('confirmPassword').value;
33
- if (password !== confirmPassword) {
34
- abstractControl.get('confirmPassword').setErrors({ MatchPassword: true });
35
- }
36
- else {
37
- return null;
38
- }
39
- }
40
-
41
- function appendQueryParam(router, activatedRoute, queryParams) {
42
- router.navigate([], {
43
- relativeTo: activatedRoute,
44
- queryParams
45
- });
46
- }
47
- function clearQueryParams(router, activatedRoute) {
48
- router.navigate([], {
49
- relativeTo: activatedRoute,
50
- queryParams: {}
51
- });
52
- }
53
-
54
- /**
55
- * Generated bundle index. Do not edit.
56
- */
57
-
58
- export { MatchPassword, QuillHelper, ValidateForm, appendQueryParam, clearQueryParams };
59
- //# sourceMappingURL=posiwise-utils.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"posiwise-utils.mjs","sources":["../../../../libs/utils/src/lib/quill-helper.ts","../../../../libs/utils/src/lib/decorators.ts","../../../../libs/utils/src/lib/routing.helper.ts","../../../../libs/utils/src/posiwise-utils.ts"],"sourcesContent":["import Quill from 'quill';\nimport ImageResize from 'quill-image-resize';\n\nexport class QuillHelper {\n static init() {\n Quill.register('modules/imageResize', ImageResize);\n }\n}\n","import { AbstractControl, UntypedFormGroup } from '@angular/forms';\n\nimport 'reflect-metadata';\n\nfunction checkFormValidation(form: UntypedFormGroup): boolean {\n if (!form.valid) {\n form.markAllAsTouched();\n return false;\n }\n return true;\n}\n\nexport function ValidateForm(formName: string): MethodDecorator {\n return function (_target: any, _methodName: string | symbol, descriptor: PropertyDescriptor) {\n const originalMethod = descriptor.value;\n\n descriptor.value = function (this: any, ...args: any[]) {\n const formGroup: UntypedFormGroup = this[formName];\n\n if (checkFormValidation(formGroup)) {\n originalMethod.apply(this, args);\n }\n };\n\n return descriptor;\n };\n}\n\nexport function MatchPassword(abstractControl: AbstractControl) {\n const password = abstractControl.get('password').value;\n const confirmPassword = abstractControl.get('confirmPassword').value;\n if (password !== confirmPassword) {\n abstractControl.get('confirmPassword').setErrors({ MatchPassword: true });\n } else {\n return null;\n }\n}\n","import { ActivatedRoute, Router } from '@angular/router';\n\nexport function appendQueryParam(router: Router, activatedRoute: ActivatedRoute, queryParams) {\n router.navigate([], {\n relativeTo: activatedRoute,\n queryParams\n });\n}\n\nexport function clearQueryParams(router: Router, activatedRoute: ActivatedRoute) {\n router.navigate([], {\n relativeTo: activatedRoute,\n queryParams: {}\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,WAAW,CAAA;AACpB,IAAA,OAAO,IAAI,GAAA;AACP,QAAA,KAAK,CAAC,QAAQ,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC;KACtD;AACJ;;ACHD,SAAS,mBAAmB,CAAC,IAAsB,EAAA;AAC/C,IAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;QACb,IAAI,CAAC,gBAAgB,EAAE,CAAC;AACxB,QAAA,OAAO,KAAK,CAAC;AAChB,KAAA;AACD,IAAA,OAAO,IAAI,CAAC;AAChB,CAAC;AAEK,SAAU,YAAY,CAAC,QAAgB,EAAA;AACzC,IAAA,OAAO,UAAU,OAAY,EAAE,WAA4B,EAAE,UAA8B,EAAA;AACvF,QAAA,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;AAExC,QAAA,UAAU,CAAC,KAAK,GAAG,UAAqB,GAAG,IAAW,EAAA;AAClD,YAAA,MAAM,SAAS,GAAqB,IAAI,CAAC,QAAQ,CAAC,CAAC;AAEnD,YAAA,IAAI,mBAAmB,CAAC,SAAS,CAAC,EAAE;AAChC,gBAAA,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACpC,aAAA;AACL,SAAC,CAAC;AAEF,QAAA,OAAO,UAAU,CAAC;AACtB,KAAC,CAAC;AACN,CAAC;AAEK,SAAU,aAAa,CAAC,eAAgC,EAAA;IAC1D,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;IACvD,MAAM,eAAe,GAAG,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,KAAK,CAAC;IACrE,IAAI,QAAQ,KAAK,eAAe,EAAE;AAC9B,QAAA,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7E,KAAA;AAAM,SAAA;AACH,QAAA,OAAO,IAAI,CAAC;AACf,KAAA;AACL;;SClCgB,gBAAgB,CAAC,MAAc,EAAE,cAA8B,EAAE,WAAW,EAAA;AACxF,IAAA,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE;AAChB,QAAA,UAAU,EAAE,cAAc;QAC1B,WAAW;AACd,KAAA,CAAC,CAAC;AACP,CAAC;AAEe,SAAA,gBAAgB,CAAC,MAAc,EAAE,cAA8B,EAAA;AAC3E,IAAA,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE;AAChB,QAAA,UAAU,EAAE,cAAc;AAC1B,QAAA,WAAW,EAAE,EAAE;AAClB,KAAA,CAAC,CAAC;AACP;;ACdA;;AAEG;;;;"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes