@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,256 @@
1
+ import * as i2$1 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { input, signal, computed, Component, output } from '@angular/core';
5
+ import * as i1 from '@angular/material/button';
6
+ import { MatButtonModule, MatIconButton } from '@angular/material/button';
7
+ import * as i2 from '@angular/material/icon';
8
+ import { MatIconModule } from '@angular/material/icon';
9
+ import * as i3 from '@angular/material/tooltip';
10
+ import { MatTooltipModule } from '@angular/material/tooltip';
11
+ import * as i4 from '@angular/router';
12
+ import { RouterModule } from '@angular/router';
13
+ import { CamelCaseToTitlePipe } from '@cccteam/ccc-lib/src/ccc-camel-case-to-title';
14
+ import * as i1$1 from '@progress/kendo-angular-grid';
15
+ import { GridModule } from '@progress/kendo-angular-grid';
16
+
17
+ class TableButtonComponent {
18
+ config = input.required({ ...(ngDevMode ? { debugName: "config" } : {}) });
19
+ rowData = input.required({ ...(ngDevMode ? { debugName: "rowData" } : {}) });
20
+ tooltipPosition = input('above', { ...(ngDevMode ? { debugName: "tooltipPosition" } : {}) });
21
+ color = input('', { ...(ngDevMode ? { debugName: "color" } : {}) });
22
+ disabled = signal(false, { ...(ngDevMode ? { debugName: "disabled" } : {}) });
23
+ viewRoute = input('', { ...(ngDevMode ? { debugName: "viewRoute" } : {}) });
24
+ id = input('', { ...(ngDevMode ? { debugName: "id" } : {}) });
25
+ link = computed(() => {
26
+ const viewRoute = this.viewRoute();
27
+ const id = this.id();
28
+ if (!viewRoute || !id) {
29
+ return '';
30
+ }
31
+ if (!viewRoute.startsWith('/')) {
32
+ return `${viewRoute}/${id}`;
33
+ }
34
+ return `${viewRoute}/${id}`;
35
+ }, { ...(ngDevMode ? { debugName: "link" } : {}) });
36
+ callAction() {
37
+ const rowData = this.rowData();
38
+ const action = this.config().action;
39
+ if (rowData && action !== undefined) {
40
+ const id = 'id';
41
+ const idVal = rowData[id];
42
+ action({ id: idVal });
43
+ }
44
+ }
45
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: TableButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
46
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: TableButtonComponent, isStandalone: true, selector: "ccc-table-button", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, rowData: { classPropertyName: "rowData", publicName: "rowData", isSignal: true, isRequired: true, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, viewRoute: { classPropertyName: "viewRoute", publicName: "viewRoute", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span\n [matTooltip]=\"disabled() ? config().disabledLabel : config().label\"\n [matTooltipPosition]=\"tooltipPosition()\"\n class=\"parent\">\n @if (config().actionType === 'link') {\n <a [routerLink]=\"viewRoute()\">\n <button mat-icon-button [disabled]=\"disabled()\" [color]=\"config().color\">\n <mat-icon>{{ config().icon }}</mat-icon>\n </button>\n </a>\n } @else if (config().actionType === 'function') {\n <button mat-icon-button (click)=\"callAction()\" [disabled]=\"disabled()\" [color]=\"color()\">\n <mat-icon>{{ config().icon }}</mat-icon>\n </button>\n }\n</span>\n", styles: [".parent{width:100%;height:100%;display:flex}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
47
+ }
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: TableButtonComponent, decorators: [{
49
+ type: Component,
50
+ args: [{ selector: 'ccc-table-button', standalone: true, imports: [MatButtonModule, MatIconModule, MatTooltipModule, RouterModule], template: "<span\n [matTooltip]=\"disabled() ? config().disabledLabel : config().label\"\n [matTooltipPosition]=\"tooltipPosition()\"\n class=\"parent\">\n @if (config().actionType === 'link') {\n <a [routerLink]=\"viewRoute()\">\n <button mat-icon-button [disabled]=\"disabled()\" [color]=\"config().color\">\n <mat-icon>{{ config().icon }}</mat-icon>\n </button>\n </a>\n } @else if (config().actionType === 'function') {\n <button mat-icon-button (click)=\"callAction()\" [disabled]=\"disabled()\" [color]=\"color()\">\n <mat-icon>{{ config().icon }}</mat-icon>\n </button>\n }\n</span>\n", styles: [".parent{width:100%;height:100%;display:flex}\n"] }]
51
+ }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], rowData: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowData", required: true }] }], tooltipPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPosition", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], viewRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewRoute", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
52
+
53
+ class AppGridComponent {
54
+ /* eslint-disable @typescript-eslint/no-explicit-any */
55
+ rowData = input([], { ...(ngDevMode ? { debugName: "rowData" } : {}) });
56
+ columnDefs = input([], { ...(ngDevMode ? { debugName: "columnDefs" } : {}) });
57
+ enableRowExpansion = input(false, { ...(ngDevMode ? { debugName: "enableRowExpansion" } : {}) });
58
+ detailTemplate = input(undefined, { ...(ngDevMode ? { debugName: "detailTemplate" } : {}) });
59
+ selectionType = input('none', { ...(ngDevMode ? { debugName: "selectionType" } : {}) });
60
+ selectedRows = output();
61
+ selectedKeys = [];
62
+ onSelectedKeysChange(keys) {
63
+ this.selectedKeys = keys;
64
+ const selectedRows = this.rowData().filter((row) => keys.includes(row.id));
65
+ this.selectedRows.emit(selectedRows);
66
+ }
67
+ selectionMode = computed(() => {
68
+ if (this.selectionType() === 'none') {
69
+ return false;
70
+ }
71
+ else if (this.selectionType() === 'single') {
72
+ return {
73
+ mode: 'single',
74
+ checkboxOnly: true,
75
+ };
76
+ }
77
+ else {
78
+ return {
79
+ mode: 'multiple',
80
+ checkboxOnly: true,
81
+ };
82
+ }
83
+ }, { ...(ngDevMode ? { debugName: "selectionMode" } : {}) });
84
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: AppGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
85
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: AppGridComponent, isStandalone: true, selector: "ccc-grid", inputs: { rowData: { classPropertyName: "rowData", publicName: "rowData", isSignal: true, isRequired: false, transformFunction: null }, columnDefs: { classPropertyName: "columnDefs", publicName: "columnDefs", isSignal: true, isRequired: false, transformFunction: null }, enableRowExpansion: { classPropertyName: "enableRowExpansion", publicName: "enableRowExpansion", isSignal: true, isRequired: false, transformFunction: null }, detailTemplate: { classPropertyName: "detailTemplate", publicName: "detailTemplate", isSignal: true, isRequired: false, transformFunction: null }, selectionType: { classPropertyName: "selectionType", publicName: "selectionType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedRows: "selectedRows" }, ngImport: i0, template: `
86
+ <kendo-grid
87
+ [data]="rowData()"
88
+ filterable="menu"
89
+ [sortable]="true"
90
+ scrollable="none"
91
+ [selectable]="selectionMode()"
92
+ [selectedKeys]="selectedKeys"
93
+ kendoGridSelectBy="id"
94
+ (selectedKeysChange)="onSelectedKeysChange($event)">
95
+ @if (selectionMode() !== false) {
96
+ <kendo-grid-checkbox-column
97
+ [width]="40"
98
+ [showSelectAll]="selectionType() === 'multiple'"></kendo-grid-checkbox-column>
99
+ }
100
+ @for (col of columnDefs(); track col.id + col.header) {
101
+ @if (col.buttonConfig) {
102
+ <kendo-grid-column
103
+ [field]="col.id"
104
+ [filterable]="false"
105
+ [sortable]="false"
106
+ [width]="66"
107
+ [resizable]="col.resizable ?? true">
108
+ <ng-template kendoGridHeaderTemplate> </ng-template>
109
+ <ng-template kendoGridCellTemplate let-dataItem>
110
+ @if (col.buttonConfig.actionType === 'link' && col.buttonConfig.viewRoute) {
111
+ <a
112
+ mat-icon-button
113
+ [routerLink]="['/', col.buttonConfig.viewRoute, dataItem['id']]"
114
+ [matTooltip]="col.buttonConfig.label || ''"
115
+ [matTooltipPosition]="col.tooltipPosition || 'above'">
116
+ <mat-icon>{{ col.buttonConfig.icon || 'arrow_forward' }}</mat-icon>
117
+ </a>
118
+ } @else {
119
+ <ccc-table-button
120
+ [config]="col.buttonConfig"
121
+ [rowData]="dataItem"
122
+ [tooltipPosition]="col.tooltipPosition || 'above'"
123
+ [viewRoute]="col.buttonConfig.viewRoute || ''"
124
+ [id]="dataItem['id']">
125
+ </ccc-table-button>
126
+ }
127
+ </ng-template>
128
+ </kendo-grid-column>
129
+ } @else {
130
+ @if (col.width) {
131
+ <kendo-grid-column [field]="col.id" [width]="col.width" [resizable]="col.resizable ?? true">
132
+ <ng-template kendoGridHeaderTemplate>
133
+ @if (!col.hideHeader) {
134
+ <span class="col-header">{{ col.header || col.id | camelCaseToTitle }}</span>
135
+ }
136
+ </ng-template>
137
+ <ng-template kendoGridCellTemplate let-dataItem>{{ dataItem[col.id] }} </ng-template>
138
+ </kendo-grid-column>
139
+ } @else {
140
+ <kendo-grid-column [field]="col.id" [resizable]="col.resizable ?? true">
141
+ <ng-template kendoGridHeaderTemplate>
142
+ @if (!col.hideHeader) {
143
+ <span class="col-header">{{ col.header || col.id | camelCaseToTitle }}</span>
144
+ }
145
+ </ng-template>
146
+ <ng-template kendoGridCellTemplate let-dataItem>{{ dataItem[col.id] }} </ng-template>
147
+ </kendo-grid-column>
148
+ }
149
+ }
150
+ }
151
+ @if (enableRowExpansion() && detailTemplate()) {
152
+ <ng-template kendoGridDetailTemplate let-dataItem>
153
+ <ng-container *ngTemplateOutlet="detailTemplate()!; context: { $implicit: dataItem }"></ng-container>
154
+ </ng-template>
155
+ }
156
+ <ng-template kendoGridNoRecordsTemplate>
157
+ <div style="text-align: center; padding: 20px;">No records found</div>
158
+ </ng-template>
159
+ </kendo-grid>
160
+ `, isInline: true, styles: [":host{display:block;height:100%}kendo-grid{height:100%}.col-header{font-weight:700}app-table-button{position:relative;z-index:10}a[mat-button]{position:relative;z-index:11}::ng-deep .k-grid .k-grid-aria-root{overflow-x:auto;overflow-y:hidden}::ng-deep .k-grid .k-detail-cell{padding:16px}\n"], dependencies: [{ kind: "ngmodule", type: GridModule }, { kind: "component", type: i1$1.GridComponent, selector: "kendo-grid", inputs: ["data", "pageSize", "height", "rowHeight", "adaptiveMode", "detailRowHeight", "skip", "scrollable", "selectable", "sort", "size", "trackBy", "filter", "group", "virtualColumns", "filterable", "sortable", "pageable", "groupable", "gridResizable", "rowReorderable", "navigable", "autoSize", "rowClass", "rowSticky", "rowSelected", "isRowSelectable", "cellSelected", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "showInactiveTools", "isDetailExpanded", "isGroupExpanded", "dataLayoutMode"], outputs: ["filterChange", "pageChange", "groupChange", "sortChange", "selectionChange", "rowReorder", "dataStateChange", "gridStateChange", "groupExpand", "groupCollapse", "detailExpand", "detailCollapse", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "columnStickyChange", "scrollBottom", "contentScroll"], exportAs: ["kendoGrid"] }, { kind: "directive", type: i1$1.SelectionDirective, selector: "[kendoGridSelectBy]" }, { kind: "component", type: i1$1.ColumnComponent, selector: "kendo-grid-column", inputs: ["field", "format", "sortable", "groupable", "editor", "filter", "filterVariant", "filterable", "editable"] }, { kind: "directive", type: i1$1.DetailTemplateDirective, selector: "[kendoGridDetailTemplate]", inputs: ["kendoGridDetailTemplateShowIf"] }, { kind: "component", type: i1$1.CheckboxColumnComponent, selector: "kendo-grid-checkbox-column", inputs: ["showSelectAll", "showDisabledCheckbox"] }, { kind: "directive", type: i1$1.CellTemplateDirective, selector: "[kendoGridCellTemplate]" }, { kind: "directive", type: i1$1.NoRecordsTemplateDirective, selector: "[kendoGridNoRecordsTemplate]" }, { kind: "directive", type: i1$1.HeaderTemplateDirective, selector: "[kendoGridHeaderTemplate]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TableButtonComponent, selector: "ccc-table-button", inputs: ["config", "rowData", "tooltipPosition", "color", "viewRoute", "id"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: CamelCaseToTitlePipe, name: "camelCaseToTitle" }] });
161
+ }
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: AppGridComponent, decorators: [{
163
+ type: Component,
164
+ args: [{ selector: 'ccc-grid', standalone: true, imports: [
165
+ GridModule,
166
+ CommonModule,
167
+ TableButtonComponent,
168
+ CamelCaseToTitlePipe,
169
+ RouterModule,
170
+ MatIconButton,
171
+ MatIconModule,
172
+ MatTooltipModule,
173
+ ], template: `
174
+ <kendo-grid
175
+ [data]="rowData()"
176
+ filterable="menu"
177
+ [sortable]="true"
178
+ scrollable="none"
179
+ [selectable]="selectionMode()"
180
+ [selectedKeys]="selectedKeys"
181
+ kendoGridSelectBy="id"
182
+ (selectedKeysChange)="onSelectedKeysChange($event)">
183
+ @if (selectionMode() !== false) {
184
+ <kendo-grid-checkbox-column
185
+ [width]="40"
186
+ [showSelectAll]="selectionType() === 'multiple'"></kendo-grid-checkbox-column>
187
+ }
188
+ @for (col of columnDefs(); track col.id + col.header) {
189
+ @if (col.buttonConfig) {
190
+ <kendo-grid-column
191
+ [field]="col.id"
192
+ [filterable]="false"
193
+ [sortable]="false"
194
+ [width]="66"
195
+ [resizable]="col.resizable ?? true">
196
+ <ng-template kendoGridHeaderTemplate> </ng-template>
197
+ <ng-template kendoGridCellTemplate let-dataItem>
198
+ @if (col.buttonConfig.actionType === 'link' && col.buttonConfig.viewRoute) {
199
+ <a
200
+ mat-icon-button
201
+ [routerLink]="['/', col.buttonConfig.viewRoute, dataItem['id']]"
202
+ [matTooltip]="col.buttonConfig.label || ''"
203
+ [matTooltipPosition]="col.tooltipPosition || 'above'">
204
+ <mat-icon>{{ col.buttonConfig.icon || 'arrow_forward' }}</mat-icon>
205
+ </a>
206
+ } @else {
207
+ <ccc-table-button
208
+ [config]="col.buttonConfig"
209
+ [rowData]="dataItem"
210
+ [tooltipPosition]="col.tooltipPosition || 'above'"
211
+ [viewRoute]="col.buttonConfig.viewRoute || ''"
212
+ [id]="dataItem['id']">
213
+ </ccc-table-button>
214
+ }
215
+ </ng-template>
216
+ </kendo-grid-column>
217
+ } @else {
218
+ @if (col.width) {
219
+ <kendo-grid-column [field]="col.id" [width]="col.width" [resizable]="col.resizable ?? true">
220
+ <ng-template kendoGridHeaderTemplate>
221
+ @if (!col.hideHeader) {
222
+ <span class="col-header">{{ col.header || col.id | camelCaseToTitle }}</span>
223
+ }
224
+ </ng-template>
225
+ <ng-template kendoGridCellTemplate let-dataItem>{{ dataItem[col.id] }} </ng-template>
226
+ </kendo-grid-column>
227
+ } @else {
228
+ <kendo-grid-column [field]="col.id" [resizable]="col.resizable ?? true">
229
+ <ng-template kendoGridHeaderTemplate>
230
+ @if (!col.hideHeader) {
231
+ <span class="col-header">{{ col.header || col.id | camelCaseToTitle }}</span>
232
+ }
233
+ </ng-template>
234
+ <ng-template kendoGridCellTemplate let-dataItem>{{ dataItem[col.id] }} </ng-template>
235
+ </kendo-grid-column>
236
+ }
237
+ }
238
+ }
239
+ @if (enableRowExpansion() && detailTemplate()) {
240
+ <ng-template kendoGridDetailTemplate let-dataItem>
241
+ <ng-container *ngTemplateOutlet="detailTemplate()!; context: { $implicit: dataItem }"></ng-container>
242
+ </ng-template>
243
+ }
244
+ <ng-template kendoGridNoRecordsTemplate>
245
+ <div style="text-align: center; padding: 20px;">No records found</div>
246
+ </ng-template>
247
+ </kendo-grid>
248
+ `, styles: [":host{display:block;height:100%}kendo-grid{height:100%}.col-header{font-weight:700}app-table-button{position:relative;z-index:10}a[mat-button]{position:relative;z-index:11}::ng-deep .k-grid .k-grid-aria-root{overflow-x:auto;overflow-y:hidden}::ng-deep .k-grid .k-detail-cell{padding:16px}\n"] }]
249
+ }], propDecorators: { rowData: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowData", required: false }] }], columnDefs: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnDefs", required: false }] }], enableRowExpansion: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableRowExpansion", required: false }] }], detailTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "detailTemplate", required: false }] }], selectionType: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionType", required: false }] }], selectedRows: [{ type: i0.Output, args: ["selectedRows"] }] } });
250
+
251
+ /**
252
+ * Generated bundle index. Do not edit.
253
+ */
254
+
255
+ export { AppGridComponent, TableButtonComponent };
256
+ //# sourceMappingURL=cccteam-ccc-lib-src-ccc-grid.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cccteam-ccc-lib-src-ccc-grid.mjs","sources":["../../../projects/ccc-lib/src/ccc-grid/table-button/table-button.component.ts","../../../projects/ccc-lib/src/ccc-grid/table-button/table-button.component.html","../../../projects/ccc-lib/src/ccc-grid/ccc-grid.component.ts","../../../projects/ccc-lib/src/ccc-grid/cccteam-ccc-lib-src-ccc-grid.ts"],"sourcesContent":["import { Component, computed, input, signal } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule, TooltipPosition } from '@angular/material/tooltip';\nimport { RouterModule } from '@angular/router';\nimport { ActionButtonConfig } from '@cccteam/ccc-lib/src/types';\n\n@Component({\n selector: 'ccc-table-button',\n standalone: true,\n imports: [MatButtonModule, MatIconModule, MatTooltipModule, RouterModule],\n templateUrl: './table-button.component.html',\n styleUrl: './table-button.component.scss',\n})\nexport class TableButtonComponent<T> {\n config = input.required<ActionButtonConfig>();\n\n rowData = input.required<T>();\n tooltipPosition = input<TooltipPosition>('above' as TooltipPosition);\n color = input<string>('');\n disabled = signal<boolean>(false);\n viewRoute = input<string>('');\n id = input<string>('');\n\n link = computed(() => {\n const viewRoute = this.viewRoute();\n const id = this.id();\n\n if (!viewRoute || !id) {\n return '';\n }\n\n if (!viewRoute.startsWith('/')) {\n return `${viewRoute}/${id}`;\n }\n\n return `${viewRoute}/${id}`;\n });\n\n callAction(): void {\n const rowData = this.rowData();\n const action = this.config().action;\n if (rowData && action !== undefined) {\n const id = 'id' as keyof T;\n const idVal = rowData[id] as string;\n action({ id: idVal });\n }\n }\n}\n","<span\n [matTooltip]=\"disabled() ? config().disabledLabel : config().label\"\n [matTooltipPosition]=\"tooltipPosition()\"\n class=\"parent\">\n @if (config().actionType === 'link') {\n <a [routerLink]=\"viewRoute()\">\n <button mat-icon-button [disabled]=\"disabled()\" [color]=\"config().color\">\n <mat-icon>{{ config().icon }}</mat-icon>\n </button>\n </a>\n } @else if (config().actionType === 'function') {\n <button mat-icon-button (click)=\"callAction()\" [disabled]=\"disabled()\" [color]=\"color()\">\n <mat-icon>{{ config().icon }}</mat-icon>\n </button>\n }\n</span>\n","import { CommonModule } from '@angular/common';\nimport { Component, computed, input, output, TemplateRef } from '@angular/core';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { RouterModule } from '@angular/router';\nimport { CamelCaseToTitlePipe } from '@cccteam/ccc-lib/src/ccc-camel-case-to-title';\nimport { ColumnConfig, RecordData } from '@cccteam/ccc-lib/src/types';\nimport { GridModule, SelectableMode, SelectableSettings } from '@progress/kendo-angular-grid';\nimport { TableButtonComponent } from './table-button/table-button.component';\n\n@Component({\n selector: 'ccc-grid',\n standalone: true,\n imports: [\n GridModule,\n CommonModule,\n TableButtonComponent,\n CamelCaseToTitlePipe,\n RouterModule,\n MatIconButton,\n MatIconModule,\n MatTooltipModule,\n ],\n template: `\n <kendo-grid\n [data]=\"rowData()\"\n filterable=\"menu\"\n [sortable]=\"true\"\n scrollable=\"none\"\n [selectable]=\"selectionMode()\"\n [selectedKeys]=\"selectedKeys\"\n kendoGridSelectBy=\"id\"\n (selectedKeysChange)=\"onSelectedKeysChange($event)\">\n @if (selectionMode() !== false) {\n <kendo-grid-checkbox-column\n [width]=\"40\"\n [showSelectAll]=\"selectionType() === 'multiple'\"></kendo-grid-checkbox-column>\n }\n @for (col of columnDefs(); track col.id + col.header) {\n @if (col.buttonConfig) {\n <kendo-grid-column\n [field]=\"col.id\"\n [filterable]=\"false\"\n [sortable]=\"false\"\n [width]=\"66\"\n [resizable]=\"col.resizable ?? true\">\n <ng-template kendoGridHeaderTemplate> </ng-template>\n <ng-template kendoGridCellTemplate let-dataItem>\n @if (col.buttonConfig.actionType === 'link' && col.buttonConfig.viewRoute) {\n <a\n mat-icon-button\n [routerLink]=\"['/', col.buttonConfig.viewRoute, dataItem['id']]\"\n [matTooltip]=\"col.buttonConfig.label || ''\"\n [matTooltipPosition]=\"col.tooltipPosition || 'above'\">\n <mat-icon>{{ col.buttonConfig.icon || 'arrow_forward' }}</mat-icon>\n </a>\n } @else {\n <ccc-table-button\n [config]=\"col.buttonConfig\"\n [rowData]=\"dataItem\"\n [tooltipPosition]=\"col.tooltipPosition || 'above'\"\n [viewRoute]=\"col.buttonConfig.viewRoute || ''\"\n [id]=\"dataItem['id']\">\n </ccc-table-button>\n }\n </ng-template>\n </kendo-grid-column>\n } @else {\n @if (col.width) {\n <kendo-grid-column [field]=\"col.id\" [width]=\"col.width\" [resizable]=\"col.resizable ?? true\">\n <ng-template kendoGridHeaderTemplate>\n @if (!col.hideHeader) {\n <span class=\"col-header\">{{ col.header || col.id | camelCaseToTitle }}</span>\n }\n </ng-template>\n <ng-template kendoGridCellTemplate let-dataItem>{{ dataItem[col.id] }} </ng-template>\n </kendo-grid-column>\n } @else {\n <kendo-grid-column [field]=\"col.id\" [resizable]=\"col.resizable ?? true\">\n <ng-template kendoGridHeaderTemplate>\n @if (!col.hideHeader) {\n <span class=\"col-header\">{{ col.header || col.id | camelCaseToTitle }}</span>\n }\n </ng-template>\n <ng-template kendoGridCellTemplate let-dataItem>{{ dataItem[col.id] }} </ng-template>\n </kendo-grid-column>\n }\n }\n }\n @if (enableRowExpansion() && detailTemplate()) {\n <ng-template kendoGridDetailTemplate let-dataItem>\n <ng-container *ngTemplateOutlet=\"detailTemplate()!; context: { $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n <ng-template kendoGridNoRecordsTemplate>\n <div style=\"text-align: center; padding: 20px;\">No records found</div>\n </ng-template>\n </kendo-grid>\n `,\n styles: [\n `\n :host {\n display: block;\n height: 100%;\n }\n kendo-grid {\n height: 100%;\n }\n .col-header {\n font-weight: bold;\n }\n app-table-button {\n position: relative;\n z-index: 10;\n }\n a[mat-button] {\n position: relative;\n z-index: 11;\n }\n ::ng-deep .k-grid .k-grid-aria-root {\n overflow-x: auto; /* Allow horizontal scrolling */\n overflow-y: hidden; /* Keep vertical behavior as needed */\n }\n ::ng-deep .k-grid .k-detail-cell {\n padding: 16px;\n }\n `,\n ],\n})\nexport class AppGridComponent {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n rowData = input<any[]>([]);\n columnDefs = input<ColumnConfig[]>([]);\n enableRowExpansion = input<boolean>(false);\n detailTemplate = input<TemplateRef<unknown>>();\n selectionType = input<'multiple' | 'single' | 'none'>('none');\n selectedRows = output<RecordData[]>();\n\n public selectedKeys: number[] = [];\n\n onSelectedKeysChange(keys: number[]): void {\n this.selectedKeys = keys;\n const selectedRows = this.rowData().filter((row: any) => keys.includes(row.id));\n this.selectedRows.emit(selectedRows);\n }\n\n selectionMode = computed(() => {\n if (this.selectionType() === 'none') {\n return false;\n } else if (this.selectionType() === 'single') {\n return {\n mode: 'single' as SelectableMode,\n checkboxOnly: true,\n } as SelectableSettings;\n } else {\n return {\n mode: 'multiple' as SelectableMode,\n checkboxOnly: true,\n } as SelectableSettings;\n }\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3","i4"],"mappings":";;;;;;;;;;;;;;;;MAca,oBAAoB,CAAA;AAC/B,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,mDAAsB;AAE7C,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,oDAAK;AAC7B,IAAA,eAAe,GAAG,KAAK,CAAkB,OAA0B,6DAAC;AACpE,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,mDAAC;AACzB,IAAA,QAAQ,GAAG,MAAM,CAAU,KAAK,sDAAC;AACjC,IAAA,SAAS,GAAG,KAAK,CAAS,EAAE,uDAAC;AAC7B,IAAA,EAAE,GAAG,KAAK,CAAS,EAAE,gDAAC;AAEtB,IAAA,IAAI,GAAG,QAAQ,CAAC,MAAK;AACnB,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC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