@cccteam/ccc-lib 0.0.14 → 0.0.16
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 +38 -13
- package/fesm2022/cccteam-ccc-lib-src-auth-authentication-guard.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-auth-authorization-guard.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs +15 -49
- package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs +4 -4
- package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs +16 -22
- package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ccc-camel-case-to-title.mjs +33 -0
- package/fesm2022/cccteam-ccc-lib-src-ccc-camel-case-to-title.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-ccc-grid.mjs +256 -0
- package/fesm2022/cccteam-ccc-lib-src-ccc-grid.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-ccc-resource.mjs +3129 -0
- package/fesm2022/cccteam-ccc-lib-src-ccc-resource.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-forms.mjs +79 -0
- package/fesm2022/cccteam-ccc-lib-src-forms.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-internal-types.mjs +6 -0
- package/fesm2022/cccteam-ccc-lib-src-internal-types.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-types.mjs +406 -112
- package/fesm2022/cccteam-ccc-lib-src-types.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs +3 -3
- package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-core-service.mjs +7 -7
- package/fesm2022/cccteam-ccc-lib-src-ui-core-service.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-idle-service.mjs +157 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-idle-service.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs +4 -4
- package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs +5 -5
- package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs +4 -4
- package/fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-util-request-options.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib.mjs +4434 -12
- package/fesm2022/cccteam-ccc-lib.mjs.map +1 -1
- package/package.json +44 -18
- package/{src/auth-forms/index.d.ts → types/cccteam-ccc-lib-src-auth-forms.d.ts} +1 -18
- package/{src/auth-service/index.d.ts → types/cccteam-ccc-lib-src-auth-service.d.ts} +3 -1
- package/types/cccteam-ccc-lib-src-ccc-camel-case-to-title.d.ts +10 -0
- package/types/cccteam-ccc-lib-src-ccc-grid.d.ts +35 -0
- package/types/cccteam-ccc-lib-src-ccc-resource.d.ts +674 -0
- package/types/cccteam-ccc-lib-src-forms.d.ts +27 -0
- package/types/cccteam-ccc-lib-src-internal-types.d.ts +1 -0
- package/types/cccteam-ccc-lib-src-types.d.ts +934 -0
- package/types/cccteam-ccc-lib-src-ui-idle-service.d.ts +49 -0
- package/types/cccteam-ccc-lib.d.ts +1877 -0
- package/index.d.ts +0 -12
- package/src/types/index.d.ts +0 -133
- /package/{src/auth-authentication-guard/index.d.ts → types/cccteam-ccc-lib-src-auth-authentication-guard.d.ts} +0 -0
- /package/{src/auth-authorization-guard/index.d.ts → types/cccteam-ccc-lib-src-auth-authorization-guard.d.ts} +0 -0
- /package/{src/auth-has-permission/index.d.ts → types/cccteam-ccc-lib-src-auth-has-permission.d.ts} +0 -0
- /package/{src/ui-alert/index.d.ts → types/cccteam-ccc-lib-src-ui-alert.d.ts} +0 -0
- /package/{src/ui-core-service/index.d.ts → types/cccteam-ccc-lib-src-ui-core-service.d.ts} +0 -0
- /package/{src/ui-interceptor/index.d.ts → types/cccteam-ccc-lib-src-ui-interceptor.d.ts} +0 -0
- /package/{src/ui-notification-service/index.d.ts → types/cccteam-ccc-lib-src-ui-notification-service.d.ts} +0 -0
- /package/{src/ui-sidenav/index.d.ts → types/cccteam-ccc-lib-src-ui-sidenav.d.ts} +0 -0
- /package/{src/util-request-options/index.d.ts → types/cccteam-ccc-lib-src-util-request-options.d.ts} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FormGroup, AbstractControl } from '@angular/forms';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Compares two objects and returns a sparse object containing only the differing key-value pairs
|
|
5
|
+
* @param data - object to compare
|
|
6
|
+
* @param compareData - object to compare against
|
|
7
|
+
* @returns Partial<T>
|
|
8
|
+
* @example sparseData<UserCreate>(this.user, initUser)
|
|
9
|
+
*/
|
|
10
|
+
declare function sparseData<T extends Record<string, unknown>>(data: T, compareData: T): Partial<T>;
|
|
11
|
+
/**
|
|
12
|
+
* Iterates through a form group's controls and returns a sparse object with only the changed values.
|
|
13
|
+
* @param form - The form group to iterate through
|
|
14
|
+
* @param compareData - The object to compare the form's values to
|
|
15
|
+
* @returns - A sparse object with only the changed values
|
|
16
|
+
* @example sparseFormData<UserCreate>(this.userForm, initUser)
|
|
17
|
+
*/
|
|
18
|
+
declare function sparseFormData<T>(form: FormGroup, compareData: T): T;
|
|
19
|
+
/**
|
|
20
|
+
* Recursively cleans a FormGroup or FormArray, removing controls with empty string values.
|
|
21
|
+
* Similar to sparseFormData, but doesn't compare to an initial state
|
|
22
|
+
* @param control - The FormGroup or FormArray to clean.
|
|
23
|
+
* @returns A cleaned object with non-empty values.
|
|
24
|
+
*/
|
|
25
|
+
declare function cleanStringForm<T>(control: AbstractControl): T | undefined;
|
|
26
|
+
|
|
27
|
+
export { cleanStringForm, sparseData, sparseFormData };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@cccteam/ccc-lib/src/types';
|