@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.
Files changed (58) hide show
  1. package/README.md +38 -13
  2. package/fesm2022/cccteam-ccc-lib-src-auth-authentication-guard.mjs.map +1 -1
  3. package/fesm2022/cccteam-ccc-lib-src-auth-authorization-guard.mjs.map +1 -1
  4. package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs +15 -49
  5. package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs.map +1 -1
  6. package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs +4 -4
  7. package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs.map +1 -1
  8. package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs +16 -22
  9. package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs.map +1 -1
  10. package/fesm2022/cccteam-ccc-lib-src-ccc-camel-case-to-title.mjs +33 -0
  11. package/fesm2022/cccteam-ccc-lib-src-ccc-camel-case-to-title.mjs.map +1 -0
  12. package/fesm2022/cccteam-ccc-lib-src-ccc-grid.mjs +256 -0
  13. package/fesm2022/cccteam-ccc-lib-src-ccc-grid.mjs.map +1 -0
  14. package/fesm2022/cccteam-ccc-lib-src-ccc-resource.mjs +3129 -0
  15. package/fesm2022/cccteam-ccc-lib-src-ccc-resource.mjs.map +1 -0
  16. package/fesm2022/cccteam-ccc-lib-src-forms.mjs +79 -0
  17. package/fesm2022/cccteam-ccc-lib-src-forms.mjs.map +1 -0
  18. package/fesm2022/cccteam-ccc-lib-src-internal-types.mjs +6 -0
  19. package/fesm2022/cccteam-ccc-lib-src-internal-types.mjs.map +1 -0
  20. package/fesm2022/cccteam-ccc-lib-src-types.mjs +406 -112
  21. package/fesm2022/cccteam-ccc-lib-src-types.mjs.map +1 -1
  22. package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs +3 -3
  23. package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs.map +1 -1
  24. package/fesm2022/cccteam-ccc-lib-src-ui-core-service.mjs +7 -7
  25. package/fesm2022/cccteam-ccc-lib-src-ui-core-service.mjs.map +1 -1
  26. package/fesm2022/cccteam-ccc-lib-src-ui-idle-service.mjs +157 -0
  27. package/fesm2022/cccteam-ccc-lib-src-ui-idle-service.mjs.map +1 -0
  28. package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs +4 -4
  29. package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs.map +1 -1
  30. package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs +5 -5
  31. package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs.map +1 -1
  32. package/fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs +4 -4
  33. package/fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs.map +1 -1
  34. package/fesm2022/cccteam-ccc-lib-src-util-request-options.mjs.map +1 -1
  35. package/fesm2022/cccteam-ccc-lib.mjs +4434 -12
  36. package/fesm2022/cccteam-ccc-lib.mjs.map +1 -1
  37. package/package.json +44 -18
  38. package/{src/auth-forms/index.d.ts → types/cccteam-ccc-lib-src-auth-forms.d.ts} +1 -18
  39. package/{src/auth-service/index.d.ts → types/cccteam-ccc-lib-src-auth-service.d.ts} +3 -1
  40. package/types/cccteam-ccc-lib-src-ccc-camel-case-to-title.d.ts +10 -0
  41. package/types/cccteam-ccc-lib-src-ccc-grid.d.ts +35 -0
  42. package/types/cccteam-ccc-lib-src-ccc-resource.d.ts +674 -0
  43. package/types/cccteam-ccc-lib-src-forms.d.ts +27 -0
  44. package/types/cccteam-ccc-lib-src-internal-types.d.ts +1 -0
  45. package/types/cccteam-ccc-lib-src-types.d.ts +934 -0
  46. package/types/cccteam-ccc-lib-src-ui-idle-service.d.ts +49 -0
  47. package/types/cccteam-ccc-lib.d.ts +1877 -0
  48. package/index.d.ts +0 -12
  49. package/src/types/index.d.ts +0 -133
  50. /package/{src/auth-authentication-guard/index.d.ts → types/cccteam-ccc-lib-src-auth-authentication-guard.d.ts} +0 -0
  51. /package/{src/auth-authorization-guard/index.d.ts → types/cccteam-ccc-lib-src-auth-authorization-guard.d.ts} +0 -0
  52. /package/{src/auth-has-permission/index.d.ts → types/cccteam-ccc-lib-src-auth-has-permission.d.ts} +0 -0
  53. /package/{src/ui-alert/index.d.ts → types/cccteam-ccc-lib-src-ui-alert.d.ts} +0 -0
  54. /package/{src/ui-core-service/index.d.ts → types/cccteam-ccc-lib-src-ui-core-service.d.ts} +0 -0
  55. /package/{src/ui-interceptor/index.d.ts → types/cccteam-ccc-lib-src-ui-interceptor.d.ts} +0 -0
  56. /package/{src/ui-notification-service/index.d.ts → types/cccteam-ccc-lib-src-ui-notification-service.d.ts} +0 -0
  57. /package/{src/ui-sidenav/index.d.ts → types/cccteam-ccc-lib-src-ui-sidenav.d.ts} +0 -0
  58. /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';