@cccteam/ccc-lib 0.0.15 → 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 (221) hide show
  1. package/README.md +38 -13
  2. package/fesm2022/cccteam-ccc-lib-src-auth-authentication-guard.mjs +36 -0
  3. package/fesm2022/cccteam-ccc-lib-src-auth-authentication-guard.mjs.map +1 -0
  4. package/fesm2022/cccteam-ccc-lib-src-auth-authorization-guard.mjs +25 -0
  5. package/fesm2022/cccteam-ccc-lib-src-auth-authorization-guard.mjs.map +1 -0
  6. package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs +83 -0
  7. package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs.map +1 -0
  8. package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs +44 -0
  9. package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs.map +1 -0
  10. package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs +82 -0
  11. package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs.map +1 -0
  12. package/fesm2022/cccteam-ccc-lib-src-ccc-camel-case-to-title.mjs +33 -0
  13. package/fesm2022/cccteam-ccc-lib-src-ccc-camel-case-to-title.mjs.map +1 -0
  14. package/fesm2022/cccteam-ccc-lib-src-ccc-grid.mjs +256 -0
  15. package/fesm2022/cccteam-ccc-lib-src-ccc-grid.mjs.map +1 -0
  16. package/fesm2022/cccteam-ccc-lib-src-ccc-resource.mjs +3129 -0
  17. package/fesm2022/cccteam-ccc-lib-src-ccc-resource.mjs.map +1 -0
  18. package/fesm2022/cccteam-ccc-lib-src-forms.mjs +79 -0
  19. package/fesm2022/cccteam-ccc-lib-src-forms.mjs.map +1 -0
  20. package/fesm2022/cccteam-ccc-lib-src-internal-types.mjs +6 -0
  21. package/fesm2022/cccteam-ccc-lib-src-internal-types.mjs.map +1 -0
  22. package/fesm2022/cccteam-ccc-lib-src-types.mjs +431 -0
  23. package/fesm2022/cccteam-ccc-lib-src-types.mjs.map +1 -0
  24. package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs +48 -0
  25. package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs.map +1 -0
  26. package/fesm2022/cccteam-ccc-lib-src-ui-core-service.mjs +41 -0
  27. package/fesm2022/cccteam-ccc-lib-src-ui-core-service.mjs.map +1 -0
  28. package/fesm2022/cccteam-ccc-lib-src-ui-idle-service.mjs +157 -0
  29. package/fesm2022/cccteam-ccc-lib-src-ui-idle-service.mjs.map +1 -0
  30. package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs +50 -0
  31. package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs.map +1 -0
  32. package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs +63 -0
  33. package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs.map +1 -0
  34. package/fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs +60 -0
  35. package/fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs.map +1 -0
  36. package/fesm2022/cccteam-ccc-lib-src-util-request-options.mjs +19 -0
  37. package/fesm2022/cccteam-ccc-lib-src-util-request-options.mjs.map +1 -0
  38. package/fesm2022/cccteam-ccc-lib.mjs +4444 -0
  39. package/fesm2022/cccteam-ccc-lib.mjs.map +1 -0
  40. package/package.json +88 -5
  41. package/types/cccteam-ccc-lib-src-auth-authentication-guard.d.ts +6 -0
  42. package/types/cccteam-ccc-lib-src-auth-authorization-guard.d.ts +6 -0
  43. package/types/cccteam-ccc-lib-src-auth-forms.d.ts +28 -0
  44. package/types/cccteam-ccc-lib-src-auth-has-permission.d.ts +15 -0
  45. package/types/cccteam-ccc-lib-src-auth-service.d.ts +38 -0
  46. package/types/cccteam-ccc-lib-src-ccc-camel-case-to-title.d.ts +10 -0
  47. package/types/cccteam-ccc-lib-src-ccc-grid.d.ts +35 -0
  48. package/types/cccteam-ccc-lib-src-ccc-resource.d.ts +674 -0
  49. package/types/cccteam-ccc-lib-src-forms.d.ts +27 -0
  50. package/types/cccteam-ccc-lib-src-types.d.ts +934 -0
  51. package/types/cccteam-ccc-lib-src-ui-alert.d.ts +16 -0
  52. package/types/cccteam-ccc-lib-src-ui-core-service.d.ts +20 -0
  53. package/types/cccteam-ccc-lib-src-ui-idle-service.d.ts +49 -0
  54. package/types/cccteam-ccc-lib-src-ui-interceptor.d.ts +16 -0
  55. package/types/cccteam-ccc-lib-src-ui-notification-service.d.ts +33 -0
  56. package/types/cccteam-ccc-lib-src-ui-sidenav.d.ts +33 -0
  57. package/types/cccteam-ccc-lib-src-util-request-options.d.ts +12 -0
  58. package/types/cccteam-ccc-lib.d.ts +1877 -0
  59. package/eslint.config.js +0 -32
  60. package/ng-package.json +0 -11
  61. package/src/auth-authentication-guard/authentication.guard.ts +0 -40
  62. package/src/auth-authentication-guard/index.ts +0 -1
  63. package/src/auth-authentication-guard/ng-package.json +0 -6
  64. package/src/auth-authorization-guard/authorization.guard.ts +0 -17
  65. package/src/auth-authorization-guard/index.ts +0 -1
  66. package/src/auth-authorization-guard/ng-package.json +0 -6
  67. package/src/auth-forms/ccc-field/ccc-field.component.html +0 -1
  68. package/src/auth-forms/ccc-field/ccc-field.component.scss +0 -0
  69. package/src/auth-forms/ccc-field/ccc-field.component.spec.ts +0 -22
  70. package/src/auth-forms/ccc-field/ccc-field.component.ts +0 -74
  71. package/src/auth-forms/form-helpers.ts +0 -39
  72. package/src/auth-forms/index.ts +0 -3
  73. package/src/auth-forms/ng-package.json +0 -6
  74. package/src/auth-has-permission/has-permission.directive.ts +0 -34
  75. package/src/auth-has-permission/index.ts +0 -1
  76. package/src/auth-has-permission/ng-package.json +0 -6
  77. package/src/auth-service/auth.service.ts +0 -92
  78. package/src/auth-service/index.ts +0 -1
  79. package/src/auth-service/ng-package.json +0 -6
  80. package/src/ccc-camel-case-to-title/camel-case-to-title.pipe.ts +0 -23
  81. package/src/ccc-camel-case-to-title/index.ts +0 -1
  82. package/src/ccc-camel-case-to-title/ng-package.json +0 -6
  83. package/src/ccc-grid/ccc-grid.component.ts +0 -155
  84. package/src/ccc-grid/index.ts +0 -3
  85. package/src/ccc-grid/ng-package.json +0 -6
  86. package/src/ccc-grid/table-button/table-button.component.html +0 -16
  87. package/src/ccc-grid/table-button/table-button.component.scss +0 -5
  88. package/src/ccc-grid/table-button/table-button.component.spec.ts +0 -22
  89. package/src/ccc-grid/table-button/table-button.component.ts +0 -49
  90. package/src/ccc-resource/can-deactivate.guard.ts +0 -41
  91. package/src/ccc-resource/compound-resource/compound-resource.component.html +0 -57
  92. package/src/ccc-resource/compound-resource/compound-resource.component.scss +0 -86
  93. package/src/ccc-resource/compound-resource/compound-resource.component.spec.ts +0 -22
  94. package/src/ccc-resource/compound-resource/compound-resource.component.ts +0 -158
  95. package/src/ccc-resource/concat-fns.ts +0 -162
  96. package/src/ccc-resource/empty-readonly-field/empty-readonly-field.component.html +0 -12
  97. package/src/ccc-resource/empty-readonly-field/empty-readonly-field.component.scss +0 -0
  98. package/src/ccc-resource/empty-readonly-field/empty-readonly-field.component.spec.ts +0 -23
  99. package/src/ccc-resource/empty-readonly-field/empty-readonly-field.component.ts +0 -17
  100. package/src/ccc-resource/form-state.service.ts +0 -24
  101. package/src/ccc-resource/format-fns.ts +0 -49
  102. package/src/ccc-resource/gui-constants.ts +0 -88
  103. package/src/ccc-resource/index.ts +0 -23
  104. package/src/ccc-resource/leave-page-confirmation-modal/leave-page-confirmation-modal.component.html +0 -8
  105. package/src/ccc-resource/leave-page-confirmation-modal/leave-page-confirmation-modal.component.scss +0 -0
  106. package/src/ccc-resource/leave-page-confirmation-modal/leave-page-confirmation-modal.component.spec.ts +0 -22
  107. package/src/ccc-resource/leave-page-confirmation-modal/leave-page-confirmation-modal.component.ts +0 -12
  108. package/src/ccc-resource/ng-package.json +0 -6
  109. package/src/ccc-resource/operation-types.ts +0 -19
  110. package/src/ccc-resource/padding-element/padding-element.component.html +0 -1
  111. package/src/ccc-resource/padding-element/padding-element.component.scss +0 -3
  112. package/src/ccc-resource/padding-element/padding-element.component.spec.ts +0 -22
  113. package/src/ccc-resource/padding-element/padding-element.component.ts +0 -20
  114. package/src/ccc-resource/resource-array-view/resource-array-view.component.html +0 -81
  115. package/src/ccc-resource/resource-array-view/resource-array-view.component.scss +0 -21
  116. package/src/ccc-resource/resource-array-view/resource-array-view.component.spec.ts +0 -22
  117. package/src/ccc-resource/resource-array-view/resource-array-view.component.ts +0 -143
  118. package/src/ccc-resource/resource-base/resource-base.component.spec.ts +0 -22
  119. package/src/ccc-resource/resource-base/resource-base.component.ts +0 -11
  120. package/src/ccc-resource/resource-cache.service.ts +0 -232
  121. package/src/ccc-resource/resource-create/resource-create.component.html +0 -31
  122. package/src/ccc-resource/resource-create/resource-create.component.scss +0 -130
  123. package/src/ccc-resource/resource-create/resource-create.component.spec.ts +0 -22
  124. package/src/ccc-resource/resource-create/resource-create.component.ts +0 -303
  125. package/src/ccc-resource/resource-field/base-field.directive.ts +0 -102
  126. package/src/ccc-resource/resource-field/fields/boolean-field/boolean-field.component.html +0 -16
  127. package/src/ccc-resource/resource-field/fields/boolean-field/boolean-field.component.scss +0 -0
  128. package/src/ccc-resource/resource-field/fields/boolean-field/boolean-field.component.spec.ts +0 -22
  129. package/src/ccc-resource/resource-field/fields/boolean-field/boolean-field.component.ts +0 -15
  130. package/src/ccc-resource/resource-field/fields/computed-field/computed-field.component.html +0 -13
  131. package/src/ccc-resource/resource-field/fields/computed-field/computed-field.component.scss +0 -0
  132. package/src/ccc-resource/resource-field/fields/computed-field/computed-field.component.spec.ts +0 -23
  133. package/src/ccc-resource/resource-field/fields/computed-field/computed-field.component.ts +0 -50
  134. package/src/ccc-resource/resource-field/fields/date-field/date-field.component.html +0 -22
  135. package/src/ccc-resource/resource-field/fields/date-field/date-field.component.scss +0 -0
  136. package/src/ccc-resource/resource-field/fields/date-field/date-field.component.spec.ts +0 -22
  137. package/src/ccc-resource/resource-field/fields/date-field/date-field.component.ts +0 -14
  138. package/src/ccc-resource/resource-field/fields/enumerated-field/enumerated-field.component.html +0 -71
  139. package/src/ccc-resource/resource-field/fields/enumerated-field/enumerated-field.component.scss +0 -9
  140. package/src/ccc-resource/resource-field/fields/enumerated-field/enumerated-field.component.spec.ts +0 -22
  141. package/src/ccc-resource/resource-field/fields/enumerated-field/enumerated-field.component.ts +0 -207
  142. package/src/ccc-resource/resource-field/fields/nullboolean-field/nullboolean-field.component.html +0 -38
  143. package/src/ccc-resource/resource-field/fields/nullboolean-field/nullboolean-field.component.scss +0 -3
  144. package/src/ccc-resource/resource-field/fields/nullboolean-field/nullboolean-field.component.spec.ts +0 -22
  145. package/src/ccc-resource/resource-field/fields/nullboolean-field/nullboolean-field.component.ts +0 -87
  146. package/src/ccc-resource/resource-field/fields/number-field/number-field.component.html +0 -23
  147. package/src/ccc-resource/resource-field/fields/number-field/number-field.component.scss +0 -6
  148. package/src/ccc-resource/resource-field/fields/number-field/number-field.component.spec.ts +0 -22
  149. package/src/ccc-resource/resource-field/fields/number-field/number-field.component.ts +0 -14
  150. package/src/ccc-resource/resource-field/fields/text-field/text-field.component.html +0 -29
  151. package/src/ccc-resource/resource-field/fields/text-field/text-field.component.scss +0 -6
  152. package/src/ccc-resource/resource-field/fields/text-field/text-field.component.spec.ts +0 -22
  153. package/src/ccc-resource/resource-field/fields/text-field/text-field.component.ts +0 -23
  154. package/src/ccc-resource/resource-field/resource-field.component.html +0 -112
  155. package/src/ccc-resource/resource-field/resource-field.component.scss +0 -7
  156. package/src/ccc-resource/resource-field/resource-field.component.spec.ts +0 -22
  157. package/src/ccc-resource/resource-field/resource-field.component.ts +0 -214
  158. package/src/ccc-resource/resource-layout/resource-layout.component.html +0 -73
  159. package/src/ccc-resource/resource-layout/resource-layout.component.scss +0 -26
  160. package/src/ccc-resource/resource-layout/resource-layout.component.spec.ts +0 -22
  161. package/src/ccc-resource/resource-layout/resource-layout.component.ts +0 -176
  162. package/src/ccc-resource/resource-list/ resource-list.component.spec.ts +0 -22
  163. package/src/ccc-resource/resource-list/resource-list.component.html +0 -27
  164. package/src/ccc-resource/resource-list/resource-list.component.scss +0 -67
  165. package/src/ccc-resource/resource-list/resource-list.component.ts +0 -376
  166. package/src/ccc-resource/resource-list-create/resource-list-create.component.html +0 -71
  167. package/src/ccc-resource/resource-list-create/resource-list-create.component.scss +0 -9
  168. package/src/ccc-resource/resource-list-create/resource-list-create.component.spec.ts +0 -22
  169. package/src/ccc-resource/resource-list-create/resource-list-create.component.ts +0 -103
  170. package/src/ccc-resource/resource-resolver/resource-resolver.component.html +0 -1
  171. package/src/ccc-resource/resource-resolver/resource-resolver.component.scss +0 -0
  172. package/src/ccc-resource/resource-resolver/resource-resolver.component.spec.ts +0 -22
  173. package/src/ccc-resource/resource-resolver/resource-resolver.component.ts +0 -69
  174. package/src/ccc-resource/resource-store.service.ts +0 -93
  175. package/src/ccc-resource/resource-view/resource-view.component.html +0 -133
  176. package/src/ccc-resource/resource-view/resource-view.component.scss +0 -150
  177. package/src/ccc-resource/resource-view/resource-view.component.spec.ts +0 -22
  178. package/src/ccc-resource/resource-view/resource-view.component.ts +0 -354
  179. package/src/ccc-resource/resources-helpers.ts +0 -262
  180. package/src/ccc-resource/utils/validator-utils.ts +0 -6
  181. package/src/index.ts +0 -44
  182. package/src/internal-types/ng-package.json +0 -6
  183. package/src/types/auth.actions.ts +0 -46
  184. package/src/types/configs.ts +0 -952
  185. package/src/types/constants.ts +0 -1
  186. package/src/types/core.actions.ts +0 -33
  187. package/src/types/index.ts +0 -9
  188. package/src/types/ng-package.json +0 -6
  189. package/src/types/notification-message.ts +0 -20
  190. package/src/types/permissions.ts +0 -17
  191. package/src/types/session-info.ts +0 -10
  192. package/src/types/tokens.ts +0 -20
  193. package/src/ui-alert/alert.component.html +0 -13
  194. package/src/ui-alert/alert.component.scss +0 -48
  195. package/src/ui-alert/alert.component.spec.ts +0 -22
  196. package/src/ui-alert/alert.component.ts +0 -35
  197. package/src/ui-alert/index.ts +0 -1
  198. package/src/ui-alert/ng-package.json +0 -6
  199. package/src/ui-core-service/index.ts +0 -1
  200. package/src/ui-core-service/ng-package.json +0 -6
  201. package/src/ui-core-service/ui-core.service.ts +0 -34
  202. package/src/ui-interceptor/api.interceptor.spec.ts +0 -16
  203. package/src/ui-interceptor/api.interceptor.ts +0 -45
  204. package/src/ui-interceptor/index.ts +0 -1
  205. package/src/ui-interceptor/ng-package.json +0 -6
  206. package/src/ui-notification-service/index.ts +0 -1
  207. package/src/ui-notification-service/ng-package.json +0 -6
  208. package/src/ui-notification-service/notification.service.ts +0 -59
  209. package/src/ui-sidenav/index.ts +0 -1
  210. package/src/ui-sidenav/ng-package.json +0 -6
  211. package/src/ui-sidenav/sidenav.component.html +0 -60
  212. package/src/ui-sidenav/sidenav.component.scss +0 -99
  213. package/src/ui-sidenav/sidenav.component.spec.ts +0 -22
  214. package/src/ui-sidenav/sidenav.component.ts +0 -64
  215. package/src/util-request-options/index.ts +0 -1
  216. package/src/util-request-options/ng-package.json +0 -6
  217. package/src/util-request-options/request-options.ts +0 -17
  218. package/tsconfig.lib.json +0 -13
  219. package/tsconfig.lib.prod.json +0 -11
  220. package/tsconfig.spec.json +0 -15
  221. /package/{src/internal-types/index.ts → types/cccteam-ccc-lib-src-internal-types.d.ts} +0 -0
@@ -0,0 +1,79 @@
1
+ import { FormGroup, FormArray } from '@angular/forms';
2
+ import { isEqual } from 'lodash-es';
3
+
4
+ /**
5
+ * Compares two objects and returns a sparse object containing only the differing key-value pairs
6
+ * @param data - object to compare
7
+ * @param compareData - object to compare against
8
+ * @returns Partial<T>
9
+ * @example sparseData<UserCreate>(this.user, initUser)
10
+ */
11
+ function sparseData(data, compareData) {
12
+ const sparseData = {};
13
+ for (const key in data) {
14
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
15
+ if (!isEqual(data[key], compareData[key])) {
16
+ sparseData[key] = data[key];
17
+ }
18
+ }
19
+ }
20
+ return sparseData;
21
+ }
22
+ /**
23
+ * Iterates through a form group's controls and returns a sparse object with only the changed values.
24
+ * @param form - The form group to iterate through
25
+ * @param compareData - The object to compare the form's values to
26
+ * @returns - A sparse object with only the changed values
27
+ * @example sparseFormData<UserCreate>(this.userForm, initUser)
28
+ */
29
+ function sparseFormData(form, compareData) {
30
+ const sparseFormData = {};
31
+ for (const key in form.controls) {
32
+ if (Object.prototype.hasOwnProperty.call(form.controls, key)) {
33
+ const control = form.controls[key];
34
+ const controlValue = control.value;
35
+ const compareValue = compareData[key];
36
+ if (controlValue !== compareValue) {
37
+ sparseFormData[key] = controlValue;
38
+ }
39
+ }
40
+ }
41
+ return sparseFormData;
42
+ }
43
+ /**
44
+ * Recursively cleans a FormGroup or FormArray, removing controls with empty string values.
45
+ * Similar to sparseFormData, but doesn't compare to an initial state
46
+ * @param control - The FormGroup or FormArray to clean.
47
+ * @returns A cleaned object with non-empty values.
48
+ */
49
+ function cleanStringForm(control) {
50
+ if (control instanceof FormGroup) {
51
+ const cleanedGroup = {};
52
+ for (const key of Object.keys(control.controls)) {
53
+ const childControl = control.get(key);
54
+ if (childControl) {
55
+ const cleanedValue = cleanStringForm(childControl);
56
+ if (cleanedValue !== undefined && cleanedValue !== null && cleanedValue !== '') {
57
+ cleanedGroup[key] = cleanedValue;
58
+ }
59
+ }
60
+ }
61
+ return cleanedGroup;
62
+ }
63
+ else if (control instanceof FormArray) {
64
+ const cleanedArray = control.controls
65
+ .map((childControl) => cleanStringForm(childControl))
66
+ .filter((item) => item !== undefined && item !== null && item !== '');
67
+ return cleanedArray;
68
+ }
69
+ else {
70
+ return control.value !== '' ? control.value : undefined;
71
+ }
72
+ }
73
+
74
+ /**
75
+ * Generated bundle index. Do not edit.
76
+ */
77
+
78
+ export { cleanStringForm, sparseData, sparseFormData };
79
+ //# sourceMappingURL=cccteam-ccc-lib-src-forms.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cccteam-ccc-lib-src-forms.mjs","sources":["../../../projects/ccc-lib/src/forms/index.ts","../../../projects/ccc-lib/src/forms/cccteam-ccc-lib-src-forms.ts"],"sourcesContent":["import { AbstractControl, FormArray, FormGroup } from '@angular/forms';\nimport { isEqual } from 'lodash-es';\n\n/**\n * Compares two objects and returns a sparse object containing only the differing key-value pairs\n * @param data - object to compare\n * @param compareData - object to compare against\n * @returns Partial<T>\n * @example sparseData<UserCreate>(this.user, initUser)\n */\nexport function sparseData<T extends Record<string, unknown>>(data: T, compareData: T): Partial<T> {\n const sparseData: Partial<T> = {};\n\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n if (!isEqual(data[key], compareData[key])) {\n sparseData[key] = data[key];\n }\n }\n }\n\n return sparseData;\n}\n\n/**\n * Iterates through a form group's controls and returns a sparse object with only the changed values.\n * @param form - The form group to iterate through\n * @param compareData - The object to compare the form's values to\n * @returns - A sparse object with only the changed values\n * @example sparseFormData<UserCreate>(this.userForm, initUser)\n */\nexport function sparseFormData<T>(form: FormGroup, compareData: T): T {\n const sparseFormData: T = {} as T;\n for (const key in form.controls) {\n if (Object.prototype.hasOwnProperty.call(form.controls, key)) {\n const control = form.controls[key];\n const controlValue = control.value;\n const compareValue = compareData[key as keyof T];\n if (controlValue !== compareValue) {\n sparseFormData[key as keyof T] = controlValue as T[keyof T];\n }\n }\n }\n return sparseFormData;\n}\n\n/**\n * Recursively cleans a FormGroup or FormArray, removing controls with empty string values.\n * Similar to sparseFormData, but doesn't compare to an initial state\n * @param control - The FormGroup or FormArray to clean.\n * @returns A cleaned object with non-empty values.\n */\nexport function cleanStringForm<T>(control: AbstractControl): T | undefined {\n if (control instanceof FormGroup) {\n const cleanedGroup: Record<string, unknown> = {};\n for (const key of Object.keys(control.controls)) {\n const childControl = control.get(key);\n if (childControl) {\n const cleanedValue = cleanStringForm(childControl);\n if (cleanedValue !== undefined && cleanedValue !== null && cleanedValue !== '') {\n cleanedGroup[key] = cleanedValue;\n }\n }\n }\n return cleanedGroup as T;\n } else if (control instanceof FormArray) {\n const cleanedArray = control.controls\n .map((childControl) => cleanStringForm(childControl))\n .filter((item) => item !== undefined && item !== null && item !== '');\n return cleanedArray as unknown as T;\n } else {\n return control.value !== '' ? control.value : undefined;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGA;;;;;;AAMG;AACG,SAAU,UAAU,CAAoC,IAAO,EAAE,WAAc,EAAA;IACnF,MAAM,UAAU,GAAe,EAAE;AAEjC,IAAA,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;AACtB,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;AACnD,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE;gBACzC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;YAC7B;QACF;IACF;AAEA,IAAA,OAAO,UAAU;AACnB;AAEA;;;;;;AAMG;AACG,SAAU,cAAc,CAAI,IAAe,EAAE,WAAc,EAAA;IAC/D,MAAM,cAAc,GAAM,EAAO;AACjC,IAAA,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE;AAC/B,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;YAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;AAClC,YAAA,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK;AAClC,YAAA,MAAM,YAAY,GAAG,WAAW,CAAC,GAAc,CAAC;AAChD,YAAA,IAAI,YAAY,KAAK,YAAY,EAAE;AACjC,gBAAA,cAAc,CAAC,GAAc,CAAC,GAAG,YAA0B;YAC7D;QACF;IACF;AACA,IAAA,OAAO,cAAc;AACvB;AAEA;;;;;AAKG;AACG,SAAU,eAAe,CAAI,OAAwB,EAAA;AACzD,IAAA,IAAI,OAAO,YAAY,SAAS,EAAE;QAChC,MAAM,YAAY,GAA4B,EAAE;AAChD,QAAA,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC/C,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;YACrC,IAAI,YAAY,EAAE;AAChB,gBAAA,MAAM,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC;AAClD,gBAAA,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,EAAE,EAAE;AAC9E,oBAAA,YAAY,CAAC,GAAG,CAAC,GAAG,YAAY;gBAClC;YACF;QACF;AACA,QAAA,OAAO,YAAiB;IAC1B;AAAO,SAAA,IAAI,OAAO,YAAY,SAAS,EAAE;AACvC,QAAA,MAAM,YAAY,GAAG,OAAO,CAAC;aAC1B,GAAG,CAAC,CAAC,YAAY,KAAK,eAAe,CAAC,YAAY,CAAC;AACnD,aAAA,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC;AACvE,QAAA,OAAO,YAA4B;IACrC;SAAO;AACL,QAAA,OAAO,OAAO,CAAC,KAAK,KAAK,EAAE,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS;IACzD;AACF;;ACzEA;;AAEG;;;;"}
@@ -0,0 +1,6 @@
1
+ export * from '@cccteam/ccc-lib/src/types';
2
+
3
+ /**
4
+ * Generated bundle index. Do not edit.
5
+ */
6
+ //# sourceMappingURL=cccteam-ccc-lib-src-internal-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cccteam-ccc-lib-src-internal-types.mjs","sources":["../../../projects/ccc-lib/src/internal-types/cccteam-ccc-lib-src-internal-types.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;AAEG"}
@@ -0,0 +1,431 @@
1
+ import { InjectionToken } from '@angular/core';
2
+
3
+ // Shared types and constants used across the ccc-resource module
4
+ // This file exists to break circular dependencies between types and ccc-resource
5
+ const defaultEmptyFieldValue = '-';
6
+
7
+ function actionButtonConfig(config) {
8
+ return {
9
+ ...actionButtonConfigDefaults,
10
+ ...config,
11
+ };
12
+ }
13
+ const actionButtonConfigDefaults = {
14
+ label: '',
15
+ icon: '',
16
+ actionType: 'function',
17
+ color: '',
18
+ disabledLabel: '',
19
+ };
20
+ function singleColumnConfig(config) {
21
+ return {
22
+ ...singleColumnConfigDefaults,
23
+ ...config,
24
+ };
25
+ }
26
+ const singleColumnConfigDefaults = {
27
+ id: '',
28
+ header: '',
29
+ resizable: true,
30
+ actionType: 'function',
31
+ hidden: false,
32
+ filterable: true,
33
+ hideHeader: false,
34
+ };
35
+ function multiColumnConfig(config) {
36
+ return {
37
+ ...multiColumnConfigDefaults,
38
+ ...config,
39
+ };
40
+ }
41
+ const multiColumnConfigDefaults = {
42
+ ...singleColumnConfigDefaults,
43
+ additionalIds: [],
44
+ concatFn: 'hyphen-concat',
45
+ };
46
+ function additionalResourceConfig(config) {
47
+ return {
48
+ ...additionalResourceConfigDefaults,
49
+ ...config,
50
+ };
51
+ }
52
+ const additionalResourceConfigDefaults = {
53
+ id: '',
54
+ resource: '',
55
+ field: '',
56
+ hidden: false,
57
+ };
58
+ function fieldSort(config) {
59
+ return {
60
+ ...fieldSortDefaults,
61
+ ...config,
62
+ };
63
+ }
64
+ const fieldSortDefaults = {
65
+ field: '',
66
+ direction: 'asc',
67
+ };
68
+ function enumeratedConfig(config) {
69
+ return {
70
+ ...enumeratedConfigDefaults,
71
+ ...config,
72
+ };
73
+ }
74
+ const enumeratedConfigDefaults = {
75
+ overrideResource: '',
76
+ filter: () => '',
77
+ disableCacheForFilterPii: false,
78
+ filterType: 'parentResource',
79
+ sorts: [],
80
+ listDisplay: [],
81
+ viewDisplay: [],
82
+ viewConcatFn: 'hyphen-concat',
83
+ listConcatFn: 'hyphen-concat',
84
+ viewDetails: false,
85
+ searchable: false,
86
+ };
87
+ function nullBooleanConfig(config) {
88
+ return {
89
+ ...nullBooleanConfigDefaults,
90
+ ...config,
91
+ };
92
+ }
93
+ const defaultBooleanDisplay = Object.freeze({
94
+ null: {
95
+ label: defaultEmptyFieldValue,
96
+ value: null,
97
+ },
98
+ true: {
99
+ label: 'Yes',
100
+ value: true,
101
+ },
102
+ false: {
103
+ label: 'No',
104
+ value: false,
105
+ },
106
+ });
107
+ const nullBooleanConfigDefaults = {
108
+ displayValues: defaultBooleanDisplay,
109
+ };
110
+ function foreignKeyDefault(config) {
111
+ return {
112
+ ...foreignKeyDefaultDefaults,
113
+ ...config,
114
+ };
115
+ }
116
+ const foreignKeyDefaultDefaults = {
117
+ type: 'foreignKey',
118
+ parentId: '',
119
+ };
120
+ function staticDefault(config) {
121
+ return {
122
+ ...staticDefaultDefaults,
123
+ ...config,
124
+ };
125
+ }
126
+ const staticDefaultDefaults = {
127
+ type: 'static',
128
+ value: '',
129
+ };
130
+ function computedDisplayField(config) {
131
+ return {
132
+ ...computedDisplayFieldElementDefaults,
133
+ ...config,
134
+ };
135
+ }
136
+ const computedDisplayFieldElementDefaults = {
137
+ type: 'computedDisplayField',
138
+ label: '',
139
+ class: '',
140
+ cols: 6,
141
+ calculatedValue: () => '',
142
+ shouldRender: true,
143
+ };
144
+ function padding(config) {
145
+ return {
146
+ ...paddingElementDefaults,
147
+ ...config,
148
+ };
149
+ }
150
+ const paddingElementDefaults = {
151
+ type: 'padding',
152
+ cols: 12,
153
+ shouldRender: true,
154
+ };
155
+ function section(config) {
156
+ return {
157
+ ...sectionElementDefaults,
158
+ ...config,
159
+ };
160
+ }
161
+ const sectionElementDefaults = {
162
+ type: 'section',
163
+ label: '',
164
+ class: '',
165
+ cols: 12,
166
+ shouldRender: true,
167
+ nullAllChildrenIfConditionallyHidden: false,
168
+ children: [],
169
+ };
170
+ function field(config) {
171
+ return {
172
+ ...fieldElementDefaults,
173
+ ...config,
174
+ };
175
+ }
176
+ const fieldElementDefaults = {
177
+ type: 'field',
178
+ name: '',
179
+ label: '',
180
+ cols: 6,
181
+ class: '',
182
+ enumeratedConfig: { ...enumeratedConfigDefaults },
183
+ default: null,
184
+ validators: [],
185
+ nullBooleanConfig: { ...nullBooleanConfigDefaults },
186
+ readOnly: false,
187
+ prefixes: [],
188
+ suffixes: [],
189
+ shouldRender: true,
190
+ nullIfConditionallyHidden: false,
191
+ };
192
+ function rpcConfig(config) {
193
+ return {
194
+ ...rpcConfigDefaults,
195
+ ...config,
196
+ };
197
+ }
198
+ const rpcConfigDefaults = {
199
+ label: '',
200
+ afterMethodRedirect: '',
201
+ conditions: [],
202
+ methodBodyTemplate: {},
203
+ successMessage: '',
204
+ elements: [],
205
+ placement: 'end',
206
+ method: '',
207
+ customComponent: {},
208
+ refreshResources: [],
209
+ defaultModalWidth: '',
210
+ shouldRender: () => true,
211
+ };
212
+ const rootConfigDefaults = {
213
+ routeData: {},
214
+ nav: {
215
+ navItem: {},
216
+ },
217
+ parentConfig: {},
218
+ relatedConfigs: [],
219
+ rpcConfigs: [],
220
+ };
221
+ function rootConfig(config) {
222
+ return {
223
+ ...rootConfigDefaults,
224
+ ...config,
225
+ };
226
+ }
227
+ function componentConfig(config) {
228
+ return {
229
+ ...componentConfigDefaults,
230
+ ...config,
231
+ };
232
+ }
233
+ const componentConfigDefaults = {
234
+ type: 'Component',
235
+ primaryResource: '',
236
+ component: 'SwitchResolver',
237
+ params: {
238
+ cases: [],
239
+ },
240
+ relatedConfig: [],
241
+ shouldRenderActions: {
242
+ create: () => true,
243
+ edit: () => true,
244
+ delete: () => true,
245
+ },
246
+ };
247
+ function switchParams(config) {
248
+ return {
249
+ ...switchParamsDefaults,
250
+ ...config,
251
+ };
252
+ }
253
+ const switchParamsDefaults = {
254
+ cases: [],
255
+ };
256
+ function listViewConfig(config) {
257
+ return {
258
+ ...listViewConfigDefaults,
259
+ ...config,
260
+ };
261
+ }
262
+ const listViewConfigDefaults = {
263
+ title: '',
264
+ primaryResource: '',
265
+ type: 'ListView',
266
+ createTitle: '',
267
+ createButtonLabel: 'Create',
268
+ loadCreatedResource: false,
269
+ showViewButton: true,
270
+ collapsible: false,
271
+ listColumns: [],
272
+ elements: [],
273
+ parentClass: '',
274
+ fieldClass: '',
275
+ createConfig: {},
276
+ createNavigation: [],
277
+ relatedConfigs: [],
278
+ parentRelation: {
279
+ parentKey: '',
280
+ childKey: '',
281
+ },
282
+ overrideResource: '',
283
+ searchable: false,
284
+ enableRowExpansion: false,
285
+ rowExpansionConfig: {},
286
+ requireSearchToDisplayResults: false,
287
+ showBackButton: true,
288
+ filter: () => '',
289
+ disableCacheForFilterPii: false,
290
+ sorts: [],
291
+ viewResource: '',
292
+ actionType: 'function',
293
+ rpcConfigs: [],
294
+ shouldRenderActions: {
295
+ create: () => true,
296
+ edit: () => true,
297
+ delete: () => true,
298
+ },
299
+ };
300
+ function viewConfig(config) {
301
+ return {
302
+ ...viewConfigDefaults,
303
+ ...config,
304
+ };
305
+ }
306
+ const viewConfigDefaults = {
307
+ title: '',
308
+ primaryResource: '',
309
+ type: 'View',
310
+ createTitle: '',
311
+ createButtonLabel: 'Create',
312
+ parentClass: '',
313
+ fieldClass: '',
314
+ elements: [],
315
+ collapsible: true,
316
+ connectorResource: '',
317
+ relatedConfigs: [],
318
+ createConfig: {},
319
+ shouldRenderActions: {
320
+ create: () => true,
321
+ edit: () => true,
322
+ delete: () => true,
323
+ },
324
+ createNavigation: [],
325
+ parentRelation: {
326
+ parentKey: '',
327
+ childKey: '',
328
+ },
329
+ showBackButton: true,
330
+ rpcConfigs: [],
331
+ };
332
+ function arrayConfig(config) {
333
+ return {
334
+ ...arrayConfigDefaults,
335
+ ...config,
336
+ };
337
+ }
338
+ const arrayConfigDefaults = {
339
+ type: 'Array',
340
+ iteratedConfig: {},
341
+ viewType: 'OneToMany',
342
+ collapsible: true,
343
+ createConfig: {},
344
+ connectorResource: '',
345
+ connectorField: '',
346
+ primaryResource: '',
347
+ listFilter: () => '',
348
+ disableCacheForFilterPii: false,
349
+ sorts: [],
350
+ title: '',
351
+ createButtonLabel: 'Create',
352
+ limit: Infinity,
353
+ shouldRenderActions: {
354
+ create: () => true,
355
+ edit: () => true,
356
+ delete: () => true,
357
+ },
358
+ };
359
+
360
+ var AlertLevel;
361
+ (function (AlertLevel) {
362
+ AlertLevel["ERROR"] = "warn";
363
+ AlertLevel["INFO"] = "accent";
364
+ AlertLevel["SUCCESS"] = "success";
365
+ })(AlertLevel || (AlertLevel = {}));
366
+
367
+ const ReadPermission = 'Read';
368
+ const UpdatePermission = 'Update';
369
+
370
+ // Meta interfaces for resources and methods
371
+ // This file exists to break circular dependencies between types and ccc-resource
372
+
373
+ /**
374
+ * The base URL for API requests (e.g., 'https://api.example.com/').
375
+ */
376
+ const BASE_URL = new InjectionToken('BASE_URL');
377
+ /**
378
+ * The path to the frontend login page (e.g., '/login').
379
+ */
380
+ const FRONTEND_LOGIN_PATH = new InjectionToken('FRONTEND_LOGIN_PATH');
381
+ /**
382
+ * The path to the session endpoint (e.g., 'user/session').
383
+ */
384
+ const SESSION_PATH = new InjectionToken('SESSION_PATH');
385
+ /**
386
+ * The base URL for API requests (e.g., '/api').
387
+ */
388
+ const API_URL = new InjectionToken('API_URL');
389
+ const PERMISSION_REQUIRED = new InjectionToken('PERMISSION_REQUIRED');
390
+ const AVAILABLE_PERMISSIONS = new InjectionToken('AVAILABLE_PERMISSIONS');
391
+ const AVAILABLE_DOMAINS = new InjectionToken('AVAILABLE_DOMAINS');
392
+ const RESOURCE_META = new InjectionToken('RESOURCE_META');
393
+ const METHOD_META = new InjectionToken('METHOD_META');
394
+ const IDLE_SESSION_DURATION = new InjectionToken('IDLE_SESSION_DURATION');
395
+ const IDLE_WARNING_DURATION = new InjectionToken('IDLE_WARNING_DURATION');
396
+ const IDLE_KEEPALIVE_DURATION = new InjectionToken('IDLE_KEEPALIVE_DURATION');
397
+
398
+ const validatorsPresent = (control, validators, previousValidatorCount) => {
399
+ if (validators.length === previousValidatorCount) {
400
+ return true;
401
+ }
402
+ let hasAllValidators = true;
403
+ for (const validator of validators) {
404
+ if (!control.hasValidator(validator)) {
405
+ hasAllValidators = false;
406
+ break;
407
+ }
408
+ }
409
+ return hasAllValidators;
410
+ };
411
+ const requiredIf = (predicate, validator) => {
412
+ return (formControl) => {
413
+ if (!formControl.parent) {
414
+ return null;
415
+ }
416
+ if (predicate()) {
417
+ return validator(formControl);
418
+ }
419
+ return null;
420
+ };
421
+ };
422
+ function createResourceValidator(validator) {
423
+ return validator;
424
+ }
425
+
426
+ /**
427
+ * Generated bundle index. Do not edit.
428
+ */
429
+
430
+ export { API_URL, AVAILABLE_DOMAINS, AVAILABLE_PERMISSIONS, AlertLevel, BASE_URL, FRONTEND_LOGIN_PATH, IDLE_KEEPALIVE_DURATION, IDLE_SESSION_DURATION, IDLE_WARNING_DURATION, METHOD_META, PERMISSION_REQUIRED, RESOURCE_META, ReadPermission, SESSION_PATH, UpdatePermission, actionButtonConfig, actionButtonConfigDefaults, additionalResourceConfig, additionalResourceConfigDefaults, arrayConfig, arrayConfigDefaults, componentConfig, componentConfigDefaults, computedDisplayField, computedDisplayFieldElementDefaults, createResourceValidator, defaultEmptyFieldValue, enumeratedConfig, enumeratedConfigDefaults, field, fieldElementDefaults, fieldSort, fieldSortDefaults, foreignKeyDefault, foreignKeyDefaultDefaults, listViewConfig, listViewConfigDefaults, multiColumnConfig, multiColumnConfigDefaults, nullBooleanConfig, nullBooleanConfigDefaults, padding, paddingElementDefaults, requiredIf, rootConfig, rootConfigDefaults, rpcConfig, rpcConfigDefaults, section, sectionElementDefaults, singleColumnConfig, singleColumnConfigDefaults, staticDefault, staticDefaultDefaults, switchParams, switchParamsDefaults, validatorsPresent, viewConfig, viewConfigDefaults };
431
+ //# sourceMappingURL=cccteam-ccc-lib-src-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cccteam-ccc-lib-src-types.mjs","sources":["../../../projects/ccc-lib/src/types/resource-types.ts","../../../projects/ccc-lib/src/types/configs.ts","../../../projects/ccc-lib/src/types/notification-message.ts","../../../projects/ccc-lib/src/types/permissions.ts","../../../projects/ccc-lib/src/types/resource-meta.ts","../../../projects/ccc-lib/src/types/tokens.ts","../../../projects/ccc-lib/src/types/validators.ts","../../../projects/ccc-lib/src/types/cccteam-ccc-lib-src-types.ts"],"sourcesContent":["// Shared types and constants used across the ccc-resource module\n// This file exists to break circular dependencies between types and ccc-resource\n\nexport const defaultEmptyFieldValue = '-';\n\nexport type NullBoolean = null | true | false;\n\nexport type ConcatFn = 'space-concat' | 'hyphen-concat' | 'space-hyphen-concat' | 'hyphen-space-concat';\n","import { TooltipPosition } from '@angular/material/tooltip';\nimport { FieldName, Method, Resource } from './permissions';\nimport { ConcatFn, defaultEmptyFieldValue, NullBoolean } from './resource-types';\nimport { ResourceValidatorFn } from './validators';\n\nexport interface FieldPointer {\n field: FieldName;\n}\n\nexport interface MenuItem {\n label: string;\n route?: string[];\n children?: MenuItem[];\n}\n\nexport interface RouteResourceData {\n config: RootConfig;\n}\n\nexport type DataType = string | number | number[] | string[] | boolean | undefined | Date;\nexport type RecordData = Record<string, DataType | null>;\n\nexport type RPCDataType = string | number | string[] | number[] | boolean | Date;\nexport type RPCRecordData = Record<string, RPCDataType>;\nexport type RpcMethod = Record<string, DataType>;\n\nexport type ParentResourceConfig = ListViewConfig | ViewConfig | ArrayConfig;\nexport type ChildResourceConfig = ListViewConfig | ViewConfig | ComponentConfig | ArrayConfig;\n\nexport type ActionType = 'function' | 'link';\n\nexport type ListConcatFn =\n | 'space-concat'\n | 'hyphen-concat'\n | 'space-hyphen-concat'\n | 'hyphen-space-concat'\n | 'no-space-concat';\nexport type ConfigType = ChildResourceConfig;\nexport type FormatType = 'simpleSlashDateFormat';\nexport type RPCPlacement = 'inline' | 'end';\n\nexport type ColumnConfig = SingleColumnConfig | MultiColumnConfig;\n\nexport interface ActionButtonConfig {\n label: string;\n icon: string;\n action?: (resource: { id: string }) => void;\n viewRoute?: string;\n actionType?: ActionType;\n color?: string;\n disabledLabel?: string;\n}\nexport interface ActionButtonConfigOptions {\n label: string;\n icon: string;\n action?: (resource: { id: string }) => void;\n viewRoute?: string;\n actionType?: ActionType;\n color?: string;\n disabledLabel?: string;\n}\n\nexport function actionButtonConfig(config: ActionButtonConfigOptions): ActionButtonConfig {\n return {\n ...actionButtonConfigDefaults,\n ...config,\n } satisfies ActionButtonConfig;\n}\n\nexport const actionButtonConfigDefaults = {\n label: '',\n icon: '',\n actionType: 'function' as ActionType,\n color: '',\n disabledLabel: '',\n} satisfies ActionButtonConfig;\n\nexport interface SingleColumnConfig {\n id: FieldName;\n header?: string;\n width?: number;\n resizable?: boolean;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n valueGetter?: (data: any) => string;\n valueFormatter?: (data: any) => string;\n tooltipPosition?: TooltipPosition;\n viewRoute?: Resource;\n buttonConfig?: ActionButtonConfig;\n actionType?: ActionType;\n formatType?: FormatType | string;\n hidden?: boolean;\n emptyDataValue?: DataType;\n filterable?: boolean;\n hideHeader?: boolean;\n}\nexport interface SingleColumnConfigOptions {\n id: FieldName;\n header?: string;\n width?: number;\n resizable?: boolean;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n valueGetter?: (data: any) => string;\n valueFormatter?: (data: any) => string;\n tooltipPosition?: TooltipPosition;\n viewRoute?: Resource;\n buttonConfig?: ActionButtonConfig;\n actionType?: ActionType;\n formatType?: FormatType | string;\n hidden?: boolean;\n emptyDataValue?: DataType;\n filterable?: boolean;\n hideHeader?: boolean;\n}\n\nexport function singleColumnConfig(config: SingleColumnConfigOptions): SingleColumnConfig {\n return {\n ...singleColumnConfigDefaults,\n ...config,\n } satisfies SingleColumnConfig;\n}\n\nexport const singleColumnConfigDefaults = {\n id: '' as FieldName,\n header: '',\n resizable: true,\n actionType: 'function' as ActionType,\n hidden: false,\n filterable: true,\n hideHeader: false,\n} satisfies SingleColumnConfig;\n\nexport interface MultiColumnConfig extends SingleColumnConfig {\n // todo: additionalIds name is not clear. the id provided is fetched from a different resource, such as a typeId\n additionalIds: AdditionalResourceConfig[];\n concatFn: ListConcatFn;\n}\nexport interface MultiColumnConfigOptions extends SingleColumnConfigOptions {\n additionalIds: AdditionalResourceConfig[];\n concatFn: ListConcatFn;\n}\n\nexport function multiColumnConfig(config: MultiColumnConfigOptions): MultiColumnConfig {\n return {\n ...multiColumnConfigDefaults,\n ...config,\n } satisfies MultiColumnConfig;\n}\n\nexport const multiColumnConfigDefaults = {\n ...singleColumnConfigDefaults,\n additionalIds: [] as AdditionalResourceConfig[],\n concatFn: 'hyphen-concat' as ListConcatFn,\n} satisfies MultiColumnConfig;\n\nexport interface AdditionalResourceConfig {\n resource?: Resource;\n id: FieldName;\n field?: FieldName;\n hidden?: boolean;\n}\nexport interface AdditionalResourceConfigOptions {\n id: FieldName;\n resource?: Resource;\n field?: FieldName;\n hidden?: boolean;\n}\n\nexport function additionalResourceConfig(config: AdditionalResourceConfigOptions): AdditionalResourceConfig {\n return {\n ...additionalResourceConfigDefaults,\n ...config,\n } satisfies AdditionalResourceConfig;\n}\n\nexport const additionalResourceConfigDefaults = {\n id: '' as FieldName,\n resource: '' as Resource,\n field: '' as FieldName,\n hidden: false,\n} satisfies AdditionalResourceConfig;\n\nexport interface FieldSort {\n field: FieldName;\n direction: 'asc' | 'desc';\n}\nexport interface FieldSortOptions {\n field: FieldName;\n direction?: 'asc' | 'desc';\n}\n\nexport function fieldSort(config: FieldSortOptions): FieldSort {\n return {\n ...fieldSortDefaults,\n ...config,\n } satisfies FieldSort;\n}\n\nexport const fieldSortDefaults = {\n field: '' as FieldName,\n direction: 'asc' as 'asc' | 'desc',\n} satisfies FieldSort;\n\nexport interface EnumeratedConfigOptions {\n // primaryResource comes from the metadata\n overrideResource?: Resource;\n /* A function to filter the list of enumerated options.\n * The `parentResource` argument contains the data of the resource that this enumerated field is part of.\n * It will be an object with the current form values, which can be empty during resource creation.\n */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n filter?: (resource: any) => string;\n /**\n * Set disableCacheForFilterPii to `true` to promote the GET to a POST when PII is used in the filter\n * POST requests cannot be cached\n */\n disableCacheForFilterPii?: boolean;\n /**\n * Specifies which resource data to pass to the filter function:\n * - 'rootResource': Pass in the root resource data\n * - 'parentResource': Pass in the parent resource data\n * @default 'parentResource'\n */\n filterType?: FilterType;\n sorts?: FieldSort[];\n listDisplay?: FieldName[];\n viewDisplay: FieldName[];\n viewConcatFn?: ConcatFn;\n listConcatFn?: ConcatFn;\n viewDetails?: boolean;\n searchable?: boolean;\n}\n\ntype FilterType = 'parentResource' | 'rootResource';\nexport interface EnumeratedConfig {\n overrideResource: Resource;\n filter: (resource: any) => string;\n disableCacheForFilterPii: boolean;\n filterType: FilterType;\n sorts: FieldSort[];\n listDisplay: FieldName[];\n viewDisplay: FieldName[];\n viewConcatFn: ConcatFn;\n listConcatFn: ConcatFn;\n viewDetails: boolean;\n searchable: boolean;\n}\nexport function enumeratedConfig(config: EnumeratedConfigOptions): EnumeratedConfig {\n return {\n ...enumeratedConfigDefaults,\n ...config,\n } satisfies EnumeratedConfig;\n}\nexport const enumeratedConfigDefaults = {\n overrideResource: '' as Resource,\n filter: (): string => '',\n disableCacheForFilterPii: false,\n filterType: 'parentResource' as FilterType,\n sorts: [] as FieldSort[],\n listDisplay: [] as FieldName[],\n viewDisplay: [] as FieldName[],\n viewConcatFn: 'hyphen-concat' as ConcatFn,\n listConcatFn: 'hyphen-concat' as ConcatFn,\n viewDetails: false,\n searchable: false,\n};\n\nexport type FieldDefault = ForeignKeyDefault | StaticDefault | null;\n\nexport interface NullBooleanConfigOptions {\n displayValues?: Record<'null' | 'true' | 'false', { label: string; value: NullBoolean }>;\n}\nexport interface NullBooleanConfig {\n /** This property maps the three possible values for this\n * nullboolean field with the display values users will see\n * on the screen for each\n */\n displayValues: Record<'null' | 'true' | 'false', { label: string; value: NullBoolean }>;\n\n /** TODO: In FUTURE PHASES once field change history is implemented\n * When this field is first displayed on screen, set the\n * value to null based on the value present in it.\n * Useful if the database doesn't have support nulling but you want\n * users to make a conscious selection, but the database\n * will either contain a true or false. Will need to check the\n * 'last edited' on the field to ensure that we don't repeatedly spam\n * users with this though\n */\n // nullOnEdit: {\n // nullIfTrue: boolean;\n // nullIfFalse: boolean;\n // };\n}\nexport function nullBooleanConfig(config: NullBooleanConfigOptions): NullBooleanConfig {\n return {\n ...nullBooleanConfigDefaults,\n ...config,\n } satisfies NullBooleanConfig;\n}\nconst defaultBooleanDisplay = Object.freeze({\n null: {\n label: defaultEmptyFieldValue,\n value: null,\n },\n true: {\n label: 'Yes',\n value: true,\n },\n false: {\n label: 'No',\n value: false,\n },\n});\n\nexport const nullBooleanConfigDefaults = {\n displayValues: defaultBooleanDisplay,\n};\n\nexport interface ForeignKeyDefaultOptions {\n parentId: FieldName;\n}\nexport interface ForeignKeyDefault {\n type: 'foreignKey';\n parentId: FieldName;\n}\nexport function foreignKeyDefault(config: ForeignKeyDefaultOptions): ForeignKeyDefault {\n return {\n ...foreignKeyDefaultDefaults,\n ...config,\n } satisfies ForeignKeyDefault;\n}\nexport const foreignKeyDefaultDefaults = {\n type: 'foreignKey',\n parentId: '' as FieldName,\n} satisfies ForeignKeyDefault;\n\nexport interface StaticDefault {\n type: 'static';\n value: string | boolean;\n}\nexport interface staticDefaultOptions {\n value: string | boolean;\n}\nexport function staticDefault(config: staticDefaultOptions): StaticDefault {\n return {\n ...staticDefaultDefaults,\n ...config,\n } satisfies StaticDefault;\n}\nexport const staticDefaultDefaults = {\n type: 'static',\n value: '',\n} satisfies StaticDefault;\n\nexport type Affix = string | remoteData | parentData;\n\ninterface remoteData {\n resource: Resource;\n id: FieldName;\n field: FieldName;\n}\n\ninterface parentData {\n field: FieldName;\n}\n\nexport type ConfigElement = FieldElement | SectionElement | ComputedDisplayFieldElement | PaddingElement;\n\nexport type ColSize = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface ComputedDisplayFieldElementOptions {\n label?: string;\n class?: string;\n cols?: ColSize;\n calculatedValue?: (data: any) => string;\n shouldRender?: ((data: any) => boolean) | boolean;\n}\nexport interface ComputedDisplayFieldElement {\n type: 'computedDisplayField';\n label: string;\n class: string;\n cols: ColSize;\n calculatedValue: (data: any) => string;\n shouldRender: ((data: any) => boolean) | boolean;\n}\nexport function computedDisplayField(config: ComputedDisplayFieldElementOptions): ComputedDisplayFieldElement {\n return {\n ...computedDisplayFieldElementDefaults,\n ...config,\n } satisfies ComputedDisplayFieldElement;\n}\nexport const computedDisplayFieldElementDefaults = {\n type: 'computedDisplayField',\n label: '',\n class: '',\n cols: 6,\n calculatedValue: (): string => '',\n shouldRender: true,\n} satisfies ComputedDisplayFieldElement;\n\nexport interface PaddingElementOptions {\n cols?: ColSize;\n shouldRender?: ((data: any) => boolean) | boolean;\n}\nexport interface PaddingElement {\n type: 'padding';\n cols: ColSize;\n /** Determines whether the padding is shown\n */\n shouldRender: ((data: any) => boolean) | boolean;\n}\nexport function padding(config?: PaddingElementOptions): PaddingElement {\n return {\n ...paddingElementDefaults,\n ...config,\n } satisfies PaddingElement;\n}\nexport const paddingElementDefaults = {\n type: 'padding',\n cols: 12,\n shouldRender: true,\n} satisfies PaddingElement;\n\nexport interface SectionElementOptions {\n label?: string;\n class?: string;\n cols?: ColSize;\n shouldRender?: ((data: any) => boolean) | boolean;\n nullAllChildrenIfConditionallyHidden?: boolean;\n children?: ConfigElement[];\n}\nexport interface SectionElement {\n type: 'section';\n label: string;\n class: string;\n cols: ColSize;\n /**\n * shouldRender is used to determine if the section should be\n * displayed to users.\n * When assigning shouldRender a function, the first argument\n * is the current state of the resource being displayed\n * Hides the layout AND all of its children\n */\n shouldRender: ((data: any) => boolean) | boolean;\n /** If shouldRender is NOT a function, this property does nothing\n * If shouldRender is a function, this property\n * sets children's values to null if shouldRender hides it (returns false)\n * within the resource-layout.component\n */\n nullAllChildrenIfConditionallyHidden: boolean;\n children: ConfigElement[];\n}\nexport function section(config: SectionElementOptions): SectionElement {\n return {\n ...sectionElementDefaults,\n ...config,\n } satisfies SectionElement;\n}\nexport const sectionElementDefaults = {\n type: 'section',\n label: '',\n class: '',\n cols: 12,\n shouldRender: true,\n nullAllChildrenIfConditionallyHidden: false,\n children: [],\n} satisfies SectionElement;\n\nexport interface FieldElementOptions {\n name: FieldName;\n label?: string;\n cols?: ColSize;\n class?: string;\n enumeratedConfig?: EnumeratedConfig;\n default?: FieldDefault;\n nullBooleanConfig?: NullBooleanConfig;\n validators?: ((data: any) => ResourceValidatorFn[]) | ResourceValidatorFn[];\n readOnly?: boolean;\n prefixes?: Affix[];\n suffixes?: Affix[];\n shouldRender?: ((data: any) => boolean) | boolean;\n nullIfConditionallyHidden?: boolean;\n}\nexport interface FieldElement {\n type: 'field';\n name: string;\n label: string;\n cols: ColSize;\n class: string;\n enumeratedConfig: EnumeratedConfig;\n default: FieldDefault;\n nullBooleanConfig: NullBooleanConfig;\n /**\n * A list of validators that must pass to allow a field to be submitted.\n * Utilize existing validators in the resourceValidators object, and\n * add any new or custom validators to it\n */\n validators: ((data: any) => ResourceValidatorFn[]) | ResourceValidatorFn[];\n readOnly: boolean;\n prefixes: Affix[];\n suffixes: Affix[];\n /**\n * shouldRender is used to determine if the element should be\n * displayed to users.\n * When assigning shouldRender a function, the first argument\n * is the current state of the resource being displayed\n */\n shouldRender: ((data: any) => boolean) | boolean;\n /** If shouldRender is NOT a function, this property does nothing\n * If shouldRender is a function, this property\n * determines whether the form control associated\n * with this config element should have its value\n * set to null if shouldRender hides it (returns false)\n */\n nullIfConditionallyHidden: boolean;\n}\n\nexport function field(config: FieldElementOptions): FieldElement {\n return {\n ...fieldElementDefaults,\n ...config,\n } satisfies FieldElement;\n}\nexport const fieldElementDefaults = {\n type: 'field',\n name: '',\n label: '',\n cols: 6,\n class: '',\n enumeratedConfig: { ...enumeratedConfigDefaults },\n default: null,\n validators: [],\n nullBooleanConfig: { ...nullBooleanConfigDefaults },\n readOnly: false,\n prefixes: [],\n suffixes: [],\n shouldRender: true,\n nullIfConditionallyHidden: false,\n} satisfies FieldElement;\n\n/**\n * RouteData is used to define the route for a config\n * route: the route for the config\n * hasViewRoute: when true, a route will be created for route/:uuid\n */\nexport interface RootRouteData {\n route?: string;\n hasViewRoute?: boolean;\n}\n\nexport interface RPCConfigOptions {\n label: string;\n afterMethodRedirect?: string;\n conditions: {\n field: FieldName;\n matchValues: string[];\n }[];\n methodBodyTemplate?: any;\n successMessage?: string;\n elements?: ConfigElement[];\n placement?: RPCPlacement;\n method: Method;\n customComponent?: ComponentConfig;\n refreshResources?: Resource[];\n defaultModalWidth?: string;\n shouldRender?: () => boolean;\n}\nexport interface RPCConfig {\n label: string;\n afterMethodRedirect: string | string[];\n conditions: {\n field: FieldName;\n matchValues: string[];\n }[];\n methodBodyTemplate: any;\n method: Method;\n successMessage: string;\n elements: ConfigElement[];\n placement: RPCPlacement;\n customComponent: ComponentConfig;\n refreshResources: Resource[];\n defaultModalWidth: string;\n shouldRender: () => boolean;\n}\nexport function rpcConfig(config: RPCConfigOptions): RPCConfig {\n return {\n ...rpcConfigDefaults,\n ...config,\n } satisfies RPCConfig;\n}\nexport const rpcConfigDefaults = {\n label: '',\n afterMethodRedirect: '',\n conditions: [] as {\n field: FieldName;\n matchValues: string[];\n }[],\n methodBodyTemplate: {} as any,\n successMessage: '',\n elements: [] as ConfigElement[],\n placement: 'end' as RPCPlacement,\n method: '' as Method,\n customComponent: {} as ComponentConfig,\n refreshResources: [] as Resource[],\n defaultModalWidth: '',\n shouldRender: (): boolean => true,\n} satisfies RPCConfig;\n\nexport interface RPCBaseFormData {\n elements: FieldElement[];\n label: string;\n method: Method;\n}\n\n// Config is the base type that all configurations should start with\nexport interface RootConfigOptions {\n routeData?: RootRouteData;\n nav?: {\n navItem: MenuItem;\n group?: string;\n };\n parentConfig: ParentResourceConfig;\n relatedConfigs?: ChildResourceConfig[];\n rpcConfigs?: RPCConfig[];\n}\nexport interface RootConfig {\n routeData: RootRouteData;\n nav: {\n navItem: MenuItem;\n group?: string;\n };\n parentConfig: ParentResourceConfig;\n relatedConfigs: ChildResourceConfig[];\n rpcConfigs?: RPCConfig[];\n}\nexport const rootConfigDefaults = {\n routeData: {} as RootRouteData,\n nav: {\n navItem: {} as MenuItem,\n },\n parentConfig: {} as ParentResourceConfig,\n relatedConfigs: [] as ChildResourceConfig[],\n rpcConfigs: [] as RPCConfig[],\n} satisfies RootConfig;\n\nexport function rootConfig(config: RootConfigOptions): RootConfig {\n return {\n ...rootConfigDefaults,\n ...config,\n } satisfies RootConfig;\n}\n\n// Base type config is the base type for all resource configurations\nexport interface BaseConfigOptions {\n title?: string;\n createTitle?: string;\n createButtonLabel?: string;\n primaryResource: Resource;\n parentClass?: string;\n fieldClass?: string;\n elements: ConfigElement[];\n createConfig?: ConfigType;\n parentRelation?: {\n parentKey: FieldName;\n childKey: FieldName;\n };\n showBackButton?: boolean;\n createNavigation?: string[];\n}\nexport interface BaseConfig {\n title: string;\n createTitle: string;\n createButtonLabel: string;\n primaryResource: Resource;\n parentClass: string;\n fieldClass: string;\n elements: ConfigElement[];\n createConfig: ConfigType;\n parentRelation: {\n parentKey: FieldName;\n childKey: FieldName;\n };\n showBackButton: boolean;\n createNavigation: string[];\n}\n\n// Available components for a component config\nexport type AvailableComponents = 'SwitchResolver';\n\n// Available param types for a component config\nexport type ConfigParam = SwitchConfigParam;\n\n// Custom component config renders a custom component and supplies params to it\nexport interface ComponentConfigOptions {\n // todo: it's weird that we have a primary resource here. Would be nice to remove but this adds a null check to all other configs\n primaryResource: Resource;\n component: AvailableComponents;\n params?: ConfigParam;\n relatedConfig?: ParentResourceConfig[];\n shouldRenderActions?: Record<'edit' | 'delete' | 'create', (data: any) => boolean>;\n}\nexport interface ComponentConfig {\n type: 'Component';\n primaryResource: Resource;\n component: AvailableComponents;\n params: ConfigParam;\n relatedConfig: ParentResourceConfig[];\n shouldRenderActions: Record<'edit' | 'delete' | 'create', (data: any) => boolean>;\n}\nexport function componentConfig(config: ComponentConfigOptions): ComponentConfig {\n return {\n ...componentConfigDefaults,\n ...config,\n } satisfies ComponentConfig;\n}\nexport const componentConfigDefaults = {\n type: 'Component',\n primaryResource: '' as Resource,\n component: 'SwitchResolver' as AvailableComponents,\n params: {\n cases: [],\n } satisfies ConfigParam,\n relatedConfig: [] as ParentResourceConfig[],\n shouldRenderActions: {\n create: (): boolean => true,\n edit: (): boolean => true,\n delete: (): boolean => true,\n },\n} satisfies ComponentConfig;\n\n// A switch is a component type that allows for conditional rendering of child components based on the value of a parent field\n// When parentData[c.parentField] equals c.caseId render the caseConfig with parentData[c.childId] as the uuid\nexport interface switchCase {\n caseId: string;\n parentField: string;\n childId: string;\n config: ChildResourceConfig;\n}\nexport interface SwitchConfigParamOptions {\n cases: switchCase[];\n}\nexport interface SwitchConfigParam {\n cases: switchCase[];\n}\nexport function switchParams(config: SwitchConfigParamOptions): SwitchConfigParam {\n return {\n ...switchParamsDefaults,\n ...config,\n } satisfies SwitchConfigParam;\n}\nexport const switchParamsDefaults = {\n cases: [] as switchCase[],\n} satisfies SwitchConfigParam;\n\nexport interface ListViewConfigOptions extends BaseConfigOptions {\n showViewButton?: boolean;\n loadCreatedResource?: boolean;\n collapsible?: boolean;\n overrideResource?: Resource;\n searchable?: boolean;\n enableRowExpansion?: boolean;\n rowExpansionConfig?: ChildResourceConfig;\n requireSearchToDisplayResults?: boolean;\n listColumns: ColumnConfig[];\n relatedConfigs?: ChildResourceConfig[];\n viewResource?: Resource | string;\n actionType?: ActionType;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n filter?: (parentResource: any) => string;\n disableCacheForFilterPii?: boolean;\n rpcConfigs?: RPCConfig[];\n sorts?: FieldSort[];\n shouldRenderActions?: Record<'edit' | 'delete' | 'create', (data: any) => boolean>;\n}\nexport interface ListViewConfig extends BaseConfig {\n type: 'ListView';\n showViewButton: boolean;\n loadCreatedResource: boolean;\n collapsible: boolean;\n overrideResource: Resource;\n searchable: boolean;\n enableRowExpansion: boolean;\n rowExpansionConfig: ChildResourceConfig;\n requireSearchToDisplayResults: boolean;\n listColumns: ColumnConfig[];\n relatedConfigs: ChildResourceConfig[];\n viewResource: Resource | string;\n actionType: ActionType;\n /* eslint-disable @typescript-eslint/no-explicit-any */\n filter: (parentResource: any) => string;\n disableCacheForFilterPii: boolean;\n rpcConfigs?: RPCConfig[];\n sorts: FieldSort[];\n shouldRenderActions: Record<'edit' | 'delete' | 'create', (data: any) => boolean>;\n}\n\nexport function listViewConfig(config: ListViewConfigOptions): ListViewConfig {\n return {\n ...listViewConfigDefaults,\n ...config,\n } satisfies ListViewConfig;\n}\nexport const listViewConfigDefaults = {\n title: '',\n primaryResource: '' as Resource,\n type: 'ListView',\n createTitle: '',\n createButtonLabel: 'Create',\n loadCreatedResource: false,\n showViewButton: true,\n collapsible: false,\n listColumns: [],\n elements: [],\n parentClass: '',\n fieldClass: '',\n createConfig: {} as ListViewConfig,\n createNavigation: [],\n relatedConfigs: [],\n parentRelation: {\n parentKey: '' as FieldName,\n childKey: '' as FieldName,\n },\n overrideResource: '' as Resource,\n searchable: false,\n enableRowExpansion: false,\n rowExpansionConfig: {} as ChildResourceConfig,\n requireSearchToDisplayResults: false,\n showBackButton: true,\n filter: (): string => '',\n disableCacheForFilterPii: false,\n sorts: [] as FieldSort[],\n viewResource: '' as Resource,\n actionType: 'function' as ActionType,\n rpcConfigs: [],\n shouldRenderActions: {\n create: (): boolean => true,\n edit: (): boolean => true,\n delete: (): boolean => true,\n },\n} satisfies ListViewConfig;\n\nexport type ViewType = 'OneToOne' | 'OneToMany';\n\nexport interface ViewConfigOptions extends BaseConfigOptions {\n collapsible?: boolean;\n connectorResource?: Resource;\n relatedConfigs?: ChildResourceConfig[];\n rpcConfigs?: RPCConfig[];\n shouldRenderActions?: Record<'edit' | 'delete' | 'create', (data: any) => boolean>;\n}\nexport interface ViewConfig extends BaseConfig {\n type: 'View';\n collapsible: boolean;\n // todo: remove this comment once full documentation has been added. Populate this value when a database view resource is used to connect the ViewConfig's parent resource to its primary resource\n connectorResource: Resource;\n rpcConfigs?: RPCConfig[];\n relatedConfigs: ChildResourceConfig[];\n /** A set of functions that allows for\n * conditional display of non-RPC\n * actions based on the pristine state of the resource\n * (if such a state is applicable. Creation for example won't\n * have such data)\n * This is separate from ABAC control which takes\n * precedence and is based on a user's attributes\n */\n shouldRenderActions: Record<'edit' | 'delete' | 'create', (data: any) => boolean>;\n}\n\nexport function viewConfig(config: ViewConfigOptions): ViewConfig {\n return {\n ...viewConfigDefaults,\n ...config,\n } satisfies ViewConfig;\n}\nexport const viewConfigDefaults = {\n title: '',\n primaryResource: '' as Resource,\n type: 'View',\n createTitle: '',\n createButtonLabel: 'Create',\n parentClass: '',\n fieldClass: '',\n elements: [],\n collapsible: true,\n connectorResource: '' as Resource,\n relatedConfigs: [],\n createConfig: {} as ViewConfig,\n shouldRenderActions: {\n create: (): boolean => true,\n edit: (): boolean => true,\n delete: (): boolean => true,\n },\n createNavigation: [],\n parentRelation: {\n parentKey: '' as FieldName,\n childKey: '' as FieldName,\n },\n showBackButton: true,\n rpcConfigs: [],\n} satisfies ViewConfig;\n\nexport interface arrayConfigOptions {\n iteratedConfig: ChildResourceConfig;\n viewType?: ViewType;\n collapsible?: boolean;\n createConfig?: ConfigType;\n connectorResource?: Resource;\n connectorField?: FieldName;\n primaryResource: Resource;\n listFilter: (parentResource: any) => string;\n disableCacheForFilterPii?: boolean;\n sorts?: FieldSort[];\n title?: string;\n createButtonLabel?: string;\n limit?: number;\n shouldRenderActions?: Record<'edit' | 'delete' | 'create', (data: any) => boolean>;\n}\nexport interface ArrayConfig {\n type: 'Array';\n iteratedConfig: ChildResourceConfig;\n viewType: ViewType;\n collapsible: boolean;\n createConfig: ConfigType;\n connectorResource: Resource;\n connectorField: FieldName;\n primaryResource: Resource;\n listFilter: (parentResource: any) => string;\n disableCacheForFilterPii: boolean;\n sorts: FieldSort[];\n title: string;\n createButtonLabel: string;\n shouldRenderActions: Record<'edit' | 'delete' | 'create', (data: any) => boolean>;\n limit: number;\n}\nexport function arrayConfig(config: arrayConfigOptions): ArrayConfig {\n return {\n ...arrayConfigDefaults,\n ...config,\n } satisfies ArrayConfig;\n}\nexport const arrayConfigDefaults = {\n type: 'Array',\n iteratedConfig: {} as ChildResourceConfig,\n viewType: 'OneToMany' as ViewType,\n collapsible: true,\n createConfig: {} as ViewConfig,\n connectorResource: '' as Resource,\n connectorField: '' as FieldName,\n primaryResource: '' as Resource,\n listFilter: (): string => '',\n disableCacheForFilterPii: false,\n sorts: [] as FieldSort[],\n title: '',\n createButtonLabel: 'Create',\n limit: Infinity,\n shouldRenderActions: {\n create: (): boolean => true,\n edit: (): boolean => true,\n delete: (): boolean => true,\n },\n} satisfies ArrayConfig;\n","export enum AlertLevel {\n ERROR = 'warn',\n INFO = 'accent',\n SUCCESS = 'success',\n}\n\nexport interface CreateNotificationMessage {\n duration?: number;\n message: string;\n link: string;\n level: AlertLevel;\n}\n\nexport interface NotificationMessage {\n id: number;\n duration?: number;\n message: string;\n link: string;\n level: AlertLevel;\n}\n","type Brand<K, T> = K & { __brand: T };\n\nexport type Permission = Brand<string, 'Permission'>;\nexport type Resource = Brand<string, 'Resource'>;\nexport type Domain = Brand<string, 'Domain'>;\nexport type FieldName = Brand<string, 'FieldName'>;\nexport type Method = Brand<string, 'Method'>;\nexport type DomainPermissions = Record<Domain, Record<Resource, Record<Permission, Permissions>>>;\n\nexport interface PermissionScope {\n resource: Resource;\n permission: Permission;\n domain: Domain;\n}\n\nexport const ReadPermission = 'Read' as Permission;\nexport const UpdatePermission = 'Update' as Permission;\n","// Meta interfaces for resources and methods\n// This file exists to break circular dependencies between types and ccc-resource\n\nimport { Resource } from './permissions';\n\nexport type ValidDisplayTypes =\n | 'boolean'\n | 'nullboolean'\n | 'number'\n | 'string'\n | 'date'\n | 'enumerated'\n | 'link'\n | 'uuid'\n | 'civildate';\n\nexport type ValidRPCTypes = ValidDisplayTypes | `${ValidDisplayTypes}[]`;\n\nexport interface RPCFieldMeta {\n fieldName: string;\n displayType: ValidRPCTypes;\n enumeratedResource?: Resource;\n}\n\nexport interface MethodMeta {\n route: string;\n fields: RPCFieldMeta[];\n}\n\nexport interface FieldMeta {\n fieldName: string;\n /** Indicates whether the field is required and only applies during resource creation.\n * Use the validators config parameter in all other contexts\n */\n required: boolean;\n primaryKey?: { ordinalPosition: number };\n displayType: ValidDisplayTypes;\n enumeratedResource?: Resource;\n isIndex: boolean;\n}\n\nexport interface ResourceMeta {\n route: string;\n consolidatedRoute?: string;\n listDisabled?: boolean;\n readDisabled?: boolean;\n createDisabled?: boolean;\n updateDisabled?: boolean;\n deleteDisabled?: boolean;\n substringSearchParameter?: string;\n fields: FieldMeta[];\n}\n\nexport type Meta = MethodMeta | ResourceMeta;\n","import { InjectionToken } from '@angular/core';\nimport { Domain, Permission, Resource } from './permissions';\nimport { MethodMeta, ResourceMeta } from './resource-meta';\n\n/**\n * The base URL for API requests (e.g., 'https://api.example.com/').\n */\nexport const BASE_URL = new InjectionToken<string>('BASE_URL');\n\n/**\n * The path to the frontend login page (e.g., '/login').\n */\nexport const FRONTEND_LOGIN_PATH = new InjectionToken<string>('FRONTEND_LOGIN_PATH');\n\n/**\n * The path to the session endpoint (e.g., 'user/session').\n */\nexport const SESSION_PATH = new InjectionToken<string>('SESSION_PATH');\n\n/**\n * The base URL for API requests (e.g., '/api').\n */\nexport const API_URL = new InjectionToken<string>('API_URL');\n\nexport const PERMISSION_REQUIRED = new InjectionToken<(resource: Resource, permission: Permission) => boolean>(\n 'PERMISSION_REQUIRED',\n);\n\nexport const AVAILABLE_PERMISSIONS = new InjectionToken<{\n Create: Permission;\n Delete: Permission;\n List: Permission;\n Read: Permission;\n Update: Permission;\n}>('AVAILABLE_PERMISSIONS');\nexport const AVAILABLE_DOMAINS = new InjectionToken<Record<string, Domain>[]>('AVAILABLE_DOMAINS');\n\nexport const RESOURCE_META = new InjectionToken<(resource: Resource) => ResourceMeta>('RESOURCE_META');\nexport const METHOD_META = new InjectionToken<(method: string) => MethodMeta>('METHOD_META');\n\nexport const IDLE_SESSION_DURATION = new InjectionToken<number>('IDLE_SESSION_DURATION');\nexport const IDLE_WARNING_DURATION = new InjectionToken<number>('IDLE_WARNING_DURATION');\nexport const IDLE_KEEPALIVE_DURATION = new InjectionToken<number>('IDLE_KEEPALIVE_DURATION');\n","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\nexport const validatorsPresent = (\n control: AbstractControl<unknown, unknown>,\n validators: ValidatorFn[],\n previousValidatorCount: number,\n): boolean => {\n if (validators.length === previousValidatorCount) {\n return true;\n }\n\n let hasAllValidators = true;\n for (const validator of validators) {\n if (!control.hasValidator(validator)) {\n hasAllValidators = false;\n break;\n }\n }\n return hasAllValidators;\n};\n\nexport const requiredIf = (predicate: () => boolean, validator: ValidatorFn) => {\n return (formControl: AbstractControl): ValidationErrors | null => {\n if (!formControl.parent) {\n return null;\n }\n if (predicate()) {\n return validator(formControl);\n }\n return null;\n };\n};\n\ndeclare const __singletonValidatorBrand: unique symbol;\nexport type ResourceValidatorFn = ValidatorFn & {\n readonly [__singletonValidatorBrand]: true;\n};\nexport function createResourceValidator(validator: ValidatorFn): ResourceValidatorFn {\n return validator as ResourceValidatorFn;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AACA;AAEO,MAAM,sBAAsB,GAAG;;AC2DhC,SAAU,kBAAkB,CAAC,MAAiC,EAAA;IAClE,OAAO;AACL,QAAA,GAAG,0BAA0B;AAC7B,QAAA,GAAG,MAAM;KACmB;AAChC;AAEO,MAAM,0BAA0B,GAAG;AACxC,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,UAAU,EAAE,UAAwB;AACpC,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,aAAa,EAAE,EAAE;;AAwCb,SAAU,kBAAkB,CAAC,MAAiC,EAAA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