@messaia/cdk 18.0.0 → 18.1.0-rc02

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 (163) hide show
  1. package/esm2022/lib/base/base.module.mjs +11 -15
  2. package/esm2022/lib/base/components/base.component.mjs +3 -3
  3. package/esm2022/lib/base/components/dynamic-table-config-dialog/dynamic-table-config-dialog.comnponent.mjs +121 -0
  4. package/esm2022/lib/base/components/generic-form-base.component.mjs +3 -3
  5. package/esm2022/lib/base/components/generic-form.component.mjs +3 -3
  6. package/esm2022/lib/base/components/generic-list.component.mjs +40 -32
  7. package/esm2022/lib/base/components/generic-reactive-form.component.mjs +3 -3
  8. package/esm2022/lib/base/interceptors/base.interceptor.mjs +3 -3
  9. package/esm2022/lib/base/interceptors/caching-interceptor.mjs +3 -3
  10. package/esm2022/lib/base/interceptors/loading.interceptor.mjs +3 -3
  11. package/esm2022/lib/base/interfaces/igeneric-list-component.mjs +1 -1
  12. package/esm2022/lib/base/services/file.service.mjs +3 -3
  13. package/esm2022/lib/base/services/loading-screen.service.mjs +3 -3
  14. package/esm2022/lib/base/services/print.service.mjs +3 -3
  15. package/esm2022/lib/chips/chips.module.mjs +4 -4
  16. package/esm2022/lib/chips/components/chips.component.mjs +4 -4
  17. package/esm2022/lib/chips/directives/autocomplete-option.directive.mjs +3 -3
  18. package/esm2022/lib/chips/directives/chip.directive.mjs +3 -3
  19. package/esm2022/lib/common/common.module.mjs +4 -4
  20. package/esm2022/lib/common/directives/delayed-hover.directive.mjs +3 -3
  21. package/esm2022/lib/common/directives/disable-control.directive.mjs +3 -3
  22. package/esm2022/lib/common/functions/utils.mjs +6 -6
  23. package/esm2022/lib/common/helpers/app-storage.mjs +3 -3
  24. package/esm2022/lib/common/helpers/dynamic-builder.mjs +3 -3
  25. package/esm2022/lib/common/helpers/dynamic-component-compiler.mjs +3 -3
  26. package/esm2022/lib/common/models/app-setting.mjs +3 -3
  27. package/esm2022/lib/common/pipes/bind.mjs +3 -3
  28. package/esm2022/lib/common/pipes/data-source.pipe.mjs +3 -3
  29. package/esm2022/lib/common/pipes/enum.pipe.mjs +3 -3
  30. package/esm2022/lib/common/pipes/file-size.pipe.mjs +3 -3
  31. package/esm2022/lib/common/pipes/filter.pipe.mjs +3 -3
  32. package/esm2022/lib/common/pipes/first-letter.mjs +3 -3
  33. package/esm2022/lib/common/pipes/form-array.pipe.mjs +3 -3
  34. package/esm2022/lib/common/pipes/form-control.pipe.mjs +3 -3
  35. package/esm2022/lib/common/pipes/form-group.pipe.mjs +3 -3
  36. package/esm2022/lib/common/pipes/func.pipe.mjs +3 -3
  37. package/esm2022/lib/common/pipes/join.pipe.mjs +3 -3
  38. package/esm2022/lib/common/pipes/keys.mjs +3 -3
  39. package/esm2022/lib/common/pipes/map.pipe.mjs +3 -3
  40. package/esm2022/lib/common/pipes/month-name.pipe.mjs +3 -3
  41. package/esm2022/lib/common/pipes/nested-property.mjs +3 -3
  42. package/esm2022/lib/common/pipes/only-number.mjs +3 -3
  43. package/esm2022/lib/common/pipes/order.pipe.mjs +3 -3
  44. package/esm2022/lib/common/pipes/placeholder.pipe.mjs +3 -3
  45. package/esm2022/lib/common/pipes/property-join.pipe.mjs +3 -3
  46. package/esm2022/lib/common/pipes/safe-html.pipe.mjs +3 -3
  47. package/esm2022/lib/common/pipes/split.pipe.mjs +3 -3
  48. package/esm2022/lib/common/pipes/time.pipe.mjs +3 -3
  49. package/esm2022/lib/common/pipes/titlecase.pipe.mjs +3 -3
  50. package/esm2022/lib/common/pipes/truncate.pipe.mjs +3 -3
  51. package/esm2022/lib/common/pipes/values.mjs +3 -3
  52. package/esm2022/lib/common/services/base.service.mjs +3 -3
  53. package/esm2022/lib/common/services/enum.service.mjs +3 -3
  54. package/esm2022/lib/common/services/event-queue.service.mjs +3 -3
  55. package/esm2022/lib/dialogs/alert-dialog/alert-dialog.component.mjs +3 -3
  56. package/esm2022/lib/dialogs/confirm-dialog/confirm-dialog.component.mjs +3 -3
  57. package/esm2022/lib/dialogs/dialog.component.mjs +12 -12
  58. package/esm2022/lib/dialogs/dialogs.module.mjs +4 -4
  59. package/esm2022/lib/dialogs/prompt-dialog/prompt-dialog.component.mjs +3 -3
  60. package/esm2022/lib/dialogs/services/dialog.service.mjs +3 -3
  61. package/esm2022/lib/file/file-input.component.mjs +3 -3
  62. package/esm2022/lib/file/file.module.mjs +4 -4
  63. package/esm2022/lib/form-validators/core/default-container.mjs +3 -1
  64. package/esm2022/lib/form-validators/decorators/prop.decorator.mjs +3 -1
  65. package/esm2022/lib/form-validators/directives/base-directive.mjs +3 -3
  66. package/esm2022/lib/form-validators/directives/control-host.directive.mjs +3 -3
  67. package/esm2022/lib/form-validators/directives/html-control-template.directive.mjs +3 -3
  68. package/esm2022/lib/form-validators/directives/rx-form.directive.mjs +3 -3
  69. package/esm2022/lib/form-validators/directives/template-validations/async-validation.directive.mjs +3 -3
  70. package/esm2022/lib/form-validators/directives/template-validations/base-validator.directive.mjs +3 -3
  71. package/esm2022/lib/form-validators/directives/template-validations/control-expression-process.mjs +3 -3
  72. package/esm2022/lib/form-validators/directives/template-validations/file-control.directive.mjs +3 -3
  73. package/esm2022/lib/form-validators/directives/template-validations/image-file-control.directive.mjs +3 -3
  74. package/esm2022/lib/form-validators/directives/template-validations/rxformcontrol.directive.mjs +3 -3
  75. package/esm2022/lib/form-validators/domain/element-processor/decimal.provider.mjs +3 -3
  76. package/esm2022/lib/form-validators/models/config/prop-config.mjs +1 -1
  77. package/esm2022/lib/form-validators/models/property-info.mjs +1 -1
  78. package/esm2022/lib/form-validators/services/reactive-form.module.mjs +8 -8
  79. package/esm2022/lib/form-validators/services/rx-form-builder.mjs +13 -6
  80. package/esm2022/lib/form-validators/services/typed-form-builder.mjs +3 -3
  81. package/esm2022/lib/forms/components/datepicker/datepicker-header.component.mjs +3 -3
  82. package/esm2022/lib/forms/components/generic-form/generic-form.component.mjs +15 -15
  83. package/esm2022/lib/forms/directives/mat-form-field-editor.directive.mjs +3 -3
  84. package/esm2022/lib/forms/directives/mat-form-field-readonly.directive.mjs +3 -3
  85. package/esm2022/lib/forms/directives/vd-generic-form-custom-field.directive.mjs +3 -3
  86. package/esm2022/lib/forms/forms.module.mjs +4 -4
  87. package/esm2022/lib/forms/helpers/abstract-mat-form-field.mjs +3 -3
  88. package/esm2022/lib/forms/helpers/abstract-select-form-field.component.mjs +3 -3
  89. package/esm2022/lib/forms/helpers/value-accessor-base.mjs +3 -3
  90. package/esm2022/lib/forms/pipes/field-func.pipe.mjs +3 -3
  91. package/esm2022/lib/forms/pipes/group-filter.pipe.mjs +3 -3
  92. package/esm2022/lib/forms/validators/empty-string-reset.directive.mjs +3 -3
  93. package/esm2022/lib/forms/validators/equal-validator.directive.mjs +3 -3
  94. package/esm2022/lib/forms/validators/native-element-injector.directive.mjs +3 -3
  95. package/esm2022/lib/forms/validators/unique-validator-directive.mjs +3 -3
  96. package/esm2022/lib/http/http.module.mjs +4 -4
  97. package/esm2022/lib/layout/dynamic-menu/dynamic-menu.component.mjs +3 -3
  98. package/esm2022/lib/layout/layout-card-over/layout-card-over.component.mjs +3 -3
  99. package/esm2022/lib/layout/layout-compact/layout-compact.component.mjs +3 -3
  100. package/esm2022/lib/layout/layout-footer/layout-footer.component.mjs +3 -3
  101. package/esm2022/lib/layout/layout-manage-list/layout-manage-list.component.mjs +3 -3
  102. package/esm2022/lib/layout/layout-manage-list/layout-manage-list.directives.mjs +9 -9
  103. package/esm2022/lib/layout/layout-nav/layout-nav.component.mjs +3 -3
  104. package/esm2022/lib/layout/layout-nav-list/layout-nav-list.component.mjs +3 -3
  105. package/esm2022/lib/layout/layout-nav-list/layout-nav-list.directives.mjs +9 -9
  106. package/esm2022/lib/layout/layout-toggle.class.mjs +3 -3
  107. package/esm2022/lib/layout/layout.component.mjs +3 -3
  108. package/esm2022/lib/layout/layout.directives.mjs +9 -9
  109. package/esm2022/lib/layout/layout.module.mjs +4 -4
  110. package/esm2022/lib/layout/list-toolbar/list-toolbar.component.mjs +3 -3
  111. package/esm2022/lib/layout/navigation-drawer/navigation-drawer.component.mjs +9 -9
  112. package/esm2022/lib/list/components/list.component.mjs +3 -3
  113. package/esm2022/lib/list/directives/vd-list-option.directive.mjs +3 -3
  114. package/esm2022/lib/list/list.module.mjs +4 -4
  115. package/esm2022/lib/media/directives/media-toggle.directive.mjs +3 -3
  116. package/esm2022/lib/media/media.module.mjs +4 -4
  117. package/esm2022/lib/media/services/media.service.mjs +3 -3
  118. package/esm2022/lib/menu/components/menu.component.mjs +3 -3
  119. package/esm2022/lib/menu/menu.module.mjs +4 -4
  120. package/esm2022/lib/menu/resolvers/menu-form-includes.resolve.mjs +3 -3
  121. package/esm2022/lib/menu/resolvers/menu-item-form-includes.resolve.mjs +3 -3
  122. package/esm2022/lib/menu/resolvers/menu-list-projection.resolve.mjs +3 -3
  123. package/esm2022/lib/menu/resolvers/menu-settings.resolve.mjs +3 -3
  124. package/esm2022/lib/menu/services/menu-items.service.mjs +3 -3
  125. package/esm2022/lib/menu/services/menu.resolve.mjs +6 -6
  126. package/esm2022/lib/menu/services/menu.service.mjs +3 -3
  127. package/esm2022/lib/search/search.module.mjs +4 -4
  128. package/esm2022/lib/select/components/select.component.mjs +3 -3
  129. package/esm2022/lib/select/directives/vd-select-option.directive.mjs +3 -3
  130. package/esm2022/lib/select/directives/vd-select-trigger.directive.mjs +3 -3
  131. package/esm2022/lib/select/select.module.mjs +4 -4
  132. package/esm2022/lib/table/components/dynamic-table/dynamic-table.component.mjs +132 -18
  133. package/esm2022/lib/table/components/filter-clear.component.mjs +3 -3
  134. package/esm2022/lib/table/components/filter-date.component.mjs +3 -3
  135. package/esm2022/lib/table/components/filter-input.component.mjs +3 -3
  136. package/esm2022/lib/table/components/filter-select/filter-select.component.mjs +6 -6
  137. package/esm2022/lib/table/directives/data-source-filter.directive.mjs +3 -3
  138. package/esm2022/lib/table/directives/vd-table-field.directive.mjs +3 -3
  139. package/esm2022/lib/table/functions/decorators.mjs +2 -2
  140. package/esm2022/lib/table/models/table-column-config.mjs +12 -14
  141. package/esm2022/lib/table/models/table-config.mjs +41 -0
  142. package/esm2022/lib/table/models/table-query-config.mjs +26 -0
  143. package/esm2022/lib/table/paginator-intl.mjs +3 -3
  144. package/esm2022/lib/table/table.module.mjs +7 -5
  145. package/esm2022/lib/table/table.static-data-source.mjs +1 -2
  146. package/fesm2022/messaia-cdk.mjs +5007 -4856
  147. package/fesm2022/messaia-cdk.mjs.map +1 -1
  148. package/lib/base/base.module.d.ts +5 -6
  149. package/lib/base/components/{dynamic-table-config-dialog.comnponent.d.ts → dynamic-table-config-dialog/dynamic-table-config-dialog.comnponent.d.ts} +12 -6
  150. package/lib/base/components/generic-list.component.d.ts +13 -12
  151. package/lib/base/interfaces/igeneric-list-component.d.ts +8 -4
  152. package/lib/common/functions/utils.d.ts +1 -1
  153. package/lib/common/styles/utilities/_general.scss +49 -2
  154. package/lib/common/theming/_m2-all-theme.scss +0 -2
  155. package/lib/form-validators/models/config/prop-config.d.ts +2 -0
  156. package/lib/form-validators/models/property-info.d.ts +8 -0
  157. package/lib/layout/_m2-layout-theme.scss +1 -1
  158. package/lib/table/components/dynamic-table/dynamic-table.component.d.ts +14 -5
  159. package/lib/table/models/table-config.d.ts +29 -0
  160. package/lib/table/models/table-query-config.d.ts +26 -0
  161. package/lib/table/table.module.d.ts +2 -0
  162. package/package.json +3 -3
  163. package/esm2022/lib/base/components/dynamic-table-config-dialog.comnponent.mjs +0 -155
@@ -1,5 +1,5 @@
1
1
  import { BaseComponent } from './components/base.component';
2
- import { VdDynamicTableConfigDialogComponent } from './components/dynamic-table-config-dialog.comnponent';
2
+ import { VdDynamicTableConfigDialogComponent } from './components/dynamic-table-config-dialog/dynamic-table-config-dialog.comnponent';
3
3
  import { GenericFormBaseComponent } from './components/generic-form-base.component';
4
4
  import { GenericFormComponent } from './components/generic-form.component';
5
5
  import { GenericListComponent } from './components/generic-list.component';
@@ -22,14 +22,13 @@ import { PrintService } from './services/print.service';
22
22
  import * as i0 from "@angular/core";
23
23
  import * as i1 from "@angular/material/button";
24
24
  import * as i2 from "@angular/cdk/drag-drop";
25
- import * as i3 from "./components/dynamic-table-config-dialog.comnponent";
25
+ import * as i3 from "./components/dynamic-table-config-dialog/dynamic-table-config-dialog.comnponent";
26
26
  import * as i4 from "@angular/common";
27
27
  import * as i5 from "@angular/forms";
28
28
  import * as i6 from "@angular/material/dialog";
29
29
  import * as i7 from "../table/table.module";
30
- import * as i8 from "@angular/material/input";
31
- import * as i9 from "@angular/material/checkbox";
32
- import * as i10 from "@angular/material/form-field";
30
+ import * as i8 from "@angular/material/checkbox";
31
+ import * as i9 from "@angular/material/form-field";
33
32
  export { AuthHelper, AuthUser, BaseComponent, BaseInterceptor, CachingInterceptor, Common, FileService, GenericFormBaseComponent, GenericFormComponent, GenericListComponent, GenericReactiveFormComponent, GlobalRoles, IBaseComponent, IGenericFormBaseComponent, IGenericListComponent, IGenericReactiveFormBaseComponent, LoadingScreenInterceptor, LoadingScreenService, MessageType, PrintService, VdDynamicTableConfigDialogComponent };
34
33
  export declare class MaterialModule {
35
34
  static ɵfac: i0.ɵɵFactoryDeclaration<MaterialModule, never>;
@@ -38,6 +37,6 @@ export declare class MaterialModule {
38
37
  }
39
38
  export declare class VdBaseModule {
40
39
  static ɵfac: i0.ɵɵFactoryDeclaration<VdBaseModule, never>;
41
- static ɵmod: i0.ɵɵNgModuleDeclaration<VdBaseModule, [typeof i3.VdDynamicTableConfigDialogComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.MatDialogModule, typeof i7.VdTableModule, typeof MaterialModule, typeof i8.MatInputModule, typeof i9.MatCheckboxModule, typeof i10.MatFormFieldModule], [typeof i3.VdDynamicTableConfigDialogComponent]>;
40
+ static ɵmod: i0.ɵɵNgModuleDeclaration<VdBaseModule, [typeof i3.VdDynamicTableConfigDialogComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.MatDialogModule, typeof i7.VdTableModule, typeof MaterialModule, typeof i8.MatCheckboxModule, typeof i9.MatFormFieldModule], [typeof i3.VdDynamicTableConfigDialogComponent]>;
42
41
  static ɵinj: i0.ɵɵInjectorDeclaration<VdBaseModule>;
43
42
  }
@@ -1,10 +1,12 @@
1
1
  import { ChangeDetectorRef } from '@angular/core';
2
- import { FormBuilder, FormGroup } from '@angular/forms';
2
+ import { FormGroup } from '@angular/forms';
3
3
  import { MatDialogRef } from '@angular/material/dialog';
4
4
  import { ActivatedRoute } from '@angular/router';
5
- import { TableColumnConfig } from '../../table/models/table-column-config';
6
- import { IGenericListComponent } from '../interfaces/igeneric-list-component';
7
- import { BaseComponent } from './base.component';
5
+ import { RxFormBuilder } from '../../../form-validators/services/rx-form-builder';
6
+ import { TableColumnConfig } from '../../../table/models/table-column-config';
7
+ import { TableConfig } from '../../../table/models/table-config';
8
+ import { IGenericListComponent } from '../../interfaces/igeneric-list-component';
9
+ import { BaseComponent } from '../base.component';
8
10
  import * as i0 from "@angular/core";
9
11
  export declare class VdDynamicTableConfigDialogComponent extends BaseComponent {
10
12
  protected route: ActivatedRoute;
@@ -17,10 +19,14 @@ export declare class VdDynamicTableConfigDialogComponent extends BaseComponent {
17
19
  * This is of type TableColumnConfig, which holds the configuration details for each column.
18
20
  */
19
21
  columns?: TableColumnConfig[];
22
+ /**
23
+ * A reference to the TableConfig class for use in the template.
24
+ */
25
+ tableConfigClassType: typeof TableConfig;
20
26
  /**
21
27
  * A reference to the TableColumnConfig class for use in the template.
22
28
  */
23
- classType: typeof TableColumnConfig;
29
+ tableColumnConfigClassType: typeof TableColumnConfig;
24
30
  /**
25
31
  * Form group to manage the table configuration form controls.
26
32
  */
@@ -34,7 +40,7 @@ export declare class VdDynamicTableConfigDialogComponent extends BaseComponent {
34
40
  * @param genericList - The generic list component that contains the table data and configurations.
35
41
  * @param formBuilder - Service to build reactive forms.
36
42
  */
37
- constructor(route: ActivatedRoute, changeDetectorRef: ChangeDetectorRef, dialogRef: MatDialogRef<VdDynamicTableConfigDialogComponent>, genericList: IGenericListComponent<any>, formBuilder: FormBuilder);
43
+ constructor(route: ActivatedRoute, changeDetectorRef: ChangeDetectorRef, dialogRef: MatDialogRef<VdDynamicTableConfigDialogComponent>, genericList: IGenericListComponent<any>, formBuilder: RxFormBuilder);
38
44
  /**
39
45
  * Saves the current column configuration and closes the dialog.
40
46
  */
@@ -8,7 +8,7 @@ import { IEntity } from '../../common/models/entity';
8
8
  import { GenericService } from '../../http/services/generic.service';
9
9
  import { VdDynamicTableComponent } from '../../table/components/dynamic-table/dynamic-table.component';
10
10
  import { TableColumn } from '../../table/models/table-column';
11
- import { TableColumnConfig } from '../../table/models/table-column-config';
11
+ import { TableConfig } from '../../table/models/table-config';
12
12
  import { TableDataSource } from '../../table/table.data-source';
13
13
  import { IGenericListComponent } from '../interfaces/igeneric-list-component';
14
14
  import { BaseComponent } from './base.component';
@@ -73,6 +73,10 @@ export declare abstract class GenericListComponent<TEntity extends IEntity | any
73
73
  * A reference to MdSort attribute
74
74
  */
75
75
  dynamicTable?: VdDynamicTableComponent;
76
+ /**
77
+ * listConfig: {configs: any, query: any}
78
+ */
79
+ tableConfig: TableConfig;
76
80
  /**
77
81
  * The type of the dialog for creation
78
82
  */
@@ -110,6 +114,10 @@ export declare abstract class GenericListComponent<TEntity extends IEntity | any
110
114
  * to the viewport during scrolling.
111
115
  */
112
116
  sticky: boolean;
117
+ /**
118
+ * Defines the overall width of the table.
119
+ */
120
+ tableWidth?: number;
113
121
  /**
114
122
  * rowNgClass: Function
115
123
  */
@@ -150,13 +158,6 @@ export declare abstract class GenericListComponent<TEntity extends IEntity | any
150
158
  * The key for configs
151
159
  */
152
160
  protected configsKey: string;
153
- /**
154
- * listConfig: {configs: any, query: any}
155
- */
156
- protected listConfig: {
157
- configs: TableColumnConfig[];
158
- query: any;
159
- };
160
161
  /**
161
162
  * Constructor
162
163
  * @param service
@@ -258,13 +259,13 @@ export declare abstract class GenericListComponent<TEntity extends IEntity | any
258
259
  openConfigDialog(): void;
259
260
  /**
260
261
  * Saves the table config
261
- * @param configs
262
+ * @param tableConfig
262
263
  */
263
- saveConfigs(configs: TableColumnConfig[]): void;
264
+ saveConfigs(tableConfig: TableConfig): void;
264
265
  /**
265
- * Gets and applies the table configs
266
+ * Gets and applies the table column configs
266
267
  */
267
- loadConfigs(): void;
268
+ loadColumnConfigs(): void;
268
269
  /**
269
270
  * Includes some navigations
270
271
  * @param inc
@@ -2,7 +2,7 @@ import { MatPaginator } from "@angular/material/paginator";
2
2
  import { MatSort } from "@angular/material/sort";
3
3
  import { IEntity } from "../../common/models/entity";
4
4
  import { VdDynamicTableComponent } from "../../table/components/dynamic-table/dynamic-table.component";
5
- import { TableColumnConfig } from "../../table/models/table-column-config";
5
+ import { TableConfig } from "../../table/models/table-config";
6
6
  import { TableDataSource } from "../../table/table.data-source";
7
7
  import { IBaseComponent } from "./ibase-component";
8
8
  export interface IGenericListComponent<TEntity extends IEntity | any> extends IBaseComponent {
@@ -10,6 +10,10 @@ export interface IGenericListComponent<TEntity extends IEntity | any> extends IB
10
10
  * A reference to VdDynamicTableComponent
11
11
  */
12
12
  dynamicTable?: VdDynamicTableComponent;
13
+ /**
14
+ * listConfig: {configs: any, query: any}
15
+ */
16
+ tableConfig: TableConfig;
13
17
  /**
14
18
  * Get params
15
19
  */
@@ -98,13 +102,13 @@ export interface IGenericListComponent<TEntity extends IEntity | any> extends IB
98
102
  openConfigDialog(): void;
99
103
  /**
100
104
  * Saves the table config
101
- * @param configs
105
+ * @param config
102
106
  */
103
- saveConfigs(configs?: TableColumnConfig[]): void;
107
+ saveConfigs(config?: TableConfig): void;
104
108
  /**
105
109
  * Gets and applies the table configs
106
110
  */
107
- loadConfigs(): void;
111
+ loadColumnConfigs(): void;
108
112
  /**
109
113
  * Updates the table columns
110
114
  */
@@ -31,7 +31,7 @@ export declare class Utils {
31
31
  * @param property
32
32
  * @returns
33
33
  */
34
- static getPropertyValue<TType>(object: any, property: string): TType | null;
34
+ static getPropertyValue<TType>(object: any, property: string, delimiter?: string): TType | null;
35
35
  /**
36
36
  * Sorts an array of object by the specified property
37
37
  * @param array
@@ -66,6 +66,14 @@
66
66
  display: flex !important;
67
67
  }
68
68
 
69
+ .grabbing {
70
+ cursor: grab;
71
+
72
+ &:active {
73
+ cursor: grabbing;
74
+ }
75
+ }
76
+
69
77
  [hidden],
70
78
  .hidden {
71
79
  display: none !important;
@@ -78,6 +86,10 @@
78
86
  &.table-fixed {
79
87
  table-layout: fixed;
80
88
  }
89
+
90
+ &.table-sticky {
91
+ width: auto;
92
+ }
81
93
  }
82
94
 
83
95
  .na:empty:after {
@@ -535,6 +547,32 @@ mat-card {
535
547
  }
536
548
  }
537
549
 
550
+ .dialog-resizable {
551
+ resize: both;
552
+ overflow: auto;
553
+ }
554
+
555
+ .mat-mdc-dialog-surface {
556
+ overflow: hidden !important;
557
+ }
558
+
559
+ .mat-mdc-dialog-container {
560
+ vd-dynamic-table {
561
+ max-height: calc(100% - 81px - 60px - 4px);
562
+
563
+ .mat-table-container {
564
+ height: 100%;
565
+ }
566
+
567
+ .table-footer {
568
+ position: absolute;
569
+ bottom: 0px;
570
+ width: 100%;
571
+ background-color: var(--mat-tree-container-background-color);
572
+ }
573
+ }
574
+ }
575
+
538
576
  /* #endregion */
539
577
 
540
578
  /* #region MatSidenav */
@@ -642,6 +680,7 @@ mat-paginator {
642
680
  overflow: hidden;
643
681
  padding-left: 8px;
644
682
  padding-right: 8px;
683
+ line-height: 1.0rem;
645
684
 
646
685
  &:first-of-type {
647
686
  padding-left: 16px;
@@ -655,6 +694,12 @@ mat-paginator {
655
694
 
656
695
  .mat-sort-header-content {
657
696
  text-align: left;
697
+ overflow: hidden;
698
+
699
+ span {
700
+ overflow: hidden;
701
+ text-overflow: ellipsis;
702
+ }
658
703
  }
659
704
  }
660
705
 
@@ -662,6 +707,7 @@ mat-paginator {
662
707
  .cdk-column-filter-select {
663
708
  width: 46px;
664
709
  max-width: 46px;
710
+ min-width: 46px !important;
665
711
  padding-left: 4px !important;
666
712
  padding-right: 6px;
667
713
  overflow: initial;
@@ -669,8 +715,9 @@ mat-paginator {
669
715
 
670
716
  .cdk-column-filter-action,
671
717
  .cdk-column-action {
672
- width: 46px;
673
- max-width: 46px;
718
+ width: 48px;
719
+ max-width: 48px;
720
+ min-width: 48px !important;
674
721
  margin-right: 8px;
675
722
  padding-right: 0;
676
723
 
@@ -1,6 +1,4 @@
1
1
  @use '@angular/material' as mat;
2
- @use '@material/theme/theme-color' as mdc-theme-color;
3
- @use '@material/theme/color-palette' as mdc-color-palette;
4
2
  @use "sass:math";
5
3
  @use 'sass:color';
6
4
  @use 'sass:map';
@@ -1,6 +1,8 @@
1
1
  export interface PropConfig {
2
2
  name?: string;
3
3
  defaultValue?: any;
4
+ valuePath?: string;
5
+ value?: (x: any) => any;
4
6
  ignore?: (x: any) => boolean;
5
7
  isPrimaryKey?: boolean;
6
8
  }
@@ -22,6 +22,14 @@ export interface PropertyInfo {
22
22
  * Default value of the property
23
23
  */
24
24
  defaultValue?: any;
25
+ /**
26
+ * Path to the value within a nested object or structure
27
+ */
28
+ valuePath?: any;
29
+ /**
30
+ * Function to retrieve or transform the value from the entity object
31
+ */
32
+ value?: (x: any) => any;
25
33
  /**
26
34
  * Ignore function for the property
27
35
  */
@@ -304,7 +304,7 @@
304
304
  &.mat-form-field-disabled,
305
305
  &.mat-form-field-readonly {
306
306
  .mdc-text-field--outlined {
307
- background-color: if($is-dark, #232526, mdc-color-palette.$grey-50);
307
+ background-color: if($is-dark, #232526, #fafafa);
308
308
 
309
309
  .mdc-text-field__input {
310
310
  color: if($is-dark, #b1b1b1de, #7a7a7ade);
@@ -1,5 +1,5 @@
1
- import { AfterViewChecked, ChangeDetectorRef, EventEmitter, OnInit, QueryList, TemplateRef } from '@angular/core';
2
- import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
1
+ import { AfterViewChecked, ChangeDetectorRef, ElementRef, EventEmitter, OnInit, QueryList, TemplateRef } from '@angular/core';
2
+ import { FormArray, FormGroup } from '@angular/forms';
3
3
  import { MatMenuTrigger } from '@angular/material/menu';
4
4
  import { MatPaginator } from '@angular/material/paginator';
5
5
  import { MatSort, SortDirection } from '@angular/material/sort';
@@ -13,7 +13,6 @@ import { TableColumn } from '../../models/table-column';
13
13
  import { TableDataSource } from '../../table.data-source';
14
14
  import * as i0 from "@angular/core";
15
15
  export declare class VdDynamicTableComponent implements OnInit, AfterViewChecked {
16
- private formBuilder;
17
16
  private dynamicBuilder;
18
17
  private changeDetector;
19
18
  /**
@@ -90,6 +89,10 @@ export declare class VdDynamicTableComponent implements OnInit, AfterViewChecked
90
89
  * to the viewport during scrolling.
91
90
  */
92
91
  sticky: boolean;
92
+ /**
93
+ * Defines the overall width of the table.
94
+ */
95
+ tableWidth?: number;
93
96
  /**
94
97
  * Determines whether the filter operator is used in table filtering.
95
98
  * If true, filtering logic will apply operators such as equals, contains, etc.
@@ -233,6 +236,11 @@ export declare class VdDynamicTableComponent implements OnInit, AfterViewChecked
233
236
  * Default options include [5, 10, 15, 20, 30, 50, 100, 200].
234
237
  */
235
238
  pageSizeOptions: Array<number>;
239
+ scrollContainer?: ElementRef;
240
+ private startDragging;
241
+ private isDragging;
242
+ private startX;
243
+ private scrollLeft;
236
244
  /**
237
245
  * Constructor for the component, injecting services needed for form building,
238
246
  * dynamic content handling, and change detection.
@@ -241,7 +249,7 @@ export declare class VdDynamicTableComponent implements OnInit, AfterViewChecked
241
249
  * @param dynamicBuilder Service for dynamically constructing table components.
242
250
  * @param changeDetector Service for detecting and triggering UI changes.
243
251
  */
244
- constructor(formBuilder: FormBuilder, dynamicBuilder: DynamicBuilder, changeDetector: ChangeDetectorRef);
252
+ constructor(dynamicBuilder: DynamicBuilder, changeDetector: ChangeDetectorRef);
245
253
  /**
246
254
  * A callback method that is invoked immediately after the
247
255
  * default change detector has checked the directive's
@@ -342,6 +350,7 @@ export declare class VdDynamicTableComponent implements OnInit, AfterViewChecked
342
350
  * @param optionalParams
343
351
  */
344
352
  log(message: any, ...optionalParams: any[]): void;
353
+ private stopDragging;
345
354
  /**
346
355
  * A callback method that is invoked immediately after the
347
356
  * default change detector has completed one change-check cycle
@@ -349,5 +358,5 @@ export declare class VdDynamicTableComponent implements OnInit, AfterViewChecked
349
358
  */
350
359
  ngAfterViewChecked(): void;
351
360
  static ɵfac: i0.ɵɵFactoryDeclaration<VdDynamicTableComponent, never>;
352
- static ɵcmp: i0.ɵɵComponentDeclaration<VdDynamicTableComponent, "vd-dynamic-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "data": { "alias": "data"; "required": false; }; "formArray": { "alias": "formArray"; "required": false; }; "debugValue": { "alias": "debugValue"; "required": false; }; "classType": { "alias": "classType"; "required": false; }; "context": { "alias": "context"; "required": false; }; "dataSourceFilter": { "alias": "dataSourceFilter"; "required": false; }; "static": { "alias": "static"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "sticky": { "alias": "sticky"; "required": false; }; "useFilterOperator": { "alias": "useFilterOperator"; "required": false; }; "paginable": { "alias": "paginable"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "sortActive": { "alias": "sortActive"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "stickyFilter": { "alias": "stickyFilter"; "required": false; }; "rowNgClass": { "alias": "rowNgClass"; "required": false; }; "detailsTemplate": { "alias": "detailsTemplate"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "selectAllFilter": { "alias": "selectAllFilter"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "rowMenuItems": { "alias": "rowMenuItems"; "required": false; }; "rowAction": { "alias": "rowAction"; "required": false; }; "excludedColumns": { "alias": "excludedColumns"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; }, { "rowClick": "rowClick"; }, ["templateRef"], ["[table-footer]"], false, never>;
361
+ static ɵcmp: i0.ɵɵComponentDeclaration<VdDynamicTableComponent, "vd-dynamic-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "data": { "alias": "data"; "required": false; }; "formArray": { "alias": "formArray"; "required": false; }; "debugValue": { "alias": "debugValue"; "required": false; }; "classType": { "alias": "classType"; "required": false; }; "context": { "alias": "context"; "required": false; }; "dataSourceFilter": { "alias": "dataSourceFilter"; "required": false; }; "static": { "alias": "static"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "sticky": { "alias": "sticky"; "required": false; }; "tableWidth": { "alias": "tableWidth"; "required": false; }; "useFilterOperator": { "alias": "useFilterOperator"; "required": false; }; "paginable": { "alias": "paginable"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "sortActive": { "alias": "sortActive"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "stickyFilter": { "alias": "stickyFilter"; "required": false; }; "rowNgClass": { "alias": "rowNgClass"; "required": false; }; "detailsTemplate": { "alias": "detailsTemplate"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "selectAllFilter": { "alias": "selectAllFilter"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "rowMenuItems": { "alias": "rowMenuItems"; "required": false; }; "rowAction": { "alias": "rowAction"; "required": false; }; "excludedColumns": { "alias": "excludedColumns"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; }, { "rowClick": "rowClick"; }, ["templateRef"], ["[table-footer]"], false, never>;
353
362
  }
@@ -0,0 +1,29 @@
1
+ import { TableColumnConfig } from "./table-column-config";
2
+ import { TableQueryConfig } from "./table-query-config";
3
+ /**
4
+ * The TableConfig class provides configuration options for table columns.
5
+ */
6
+ export declare class TableConfig {
7
+ /**
8
+ * An optional array of table column configurations.
9
+ * Each configuration specifies how a column should behave in the table (e.g., sortable, filterable, etc.).
10
+ */
11
+ columns?: TableColumnConfig[];
12
+ /**
13
+ * Configuration for table queries, including field filters, sorting, and pagination.
14
+ */
15
+ query?: TableQueryConfig;
16
+ /**
17
+ * Specifies if the table should have sticky headers or columns.
18
+ */
19
+ sticky?: boolean;
20
+ /**
21
+ * Defines the overall width of the table.
22
+ */
23
+ tableWidth?: number;
24
+ /**
25
+ * Constructor
26
+ * @param init
27
+ */
28
+ constructor(init?: Partial<TableConfig>);
29
+ }
@@ -0,0 +1,26 @@
1
+ import { SortDirection } from "@angular/material/sort";
2
+ /**
3
+ * Represents the configuration for table queries, such as filters, sorting, and pagination.
4
+ */
5
+ export declare class TableQueryConfig {
6
+ /**
7
+ * Filters applied to table columns.
8
+ */
9
+ fieldFilters: any;
10
+ /**
11
+ * The active field for sorting.
12
+ */
13
+ sortBy?: string;
14
+ /**
15
+ * The direction of sorting ('asc' or 'desc').
16
+ */
17
+ sortDirection: SortDirection;
18
+ /**
19
+ * The number of items per page.
20
+ */
21
+ pageSize?: number;
22
+ /**
23
+ * The current page index.
24
+ */
25
+ pageIndex?: number;
26
+ }
@@ -46,7 +46,9 @@ export { FacetValue } from './models/facet-value';
46
46
  export { Pagination } from './models/pagination';
47
47
  export { TableColumn } from './models/table-column';
48
48
  export { TableColumnConfig } from './models/table-column-config';
49
+ export { TableConfig } from './models/table-config';
49
50
  export { TableDefinition } from './models/table-definition';
51
+ export { TableQueryConfig } from './models/table-query-config';
50
52
  export { TableDataSource } from './table.data-source';
51
53
  export { TableStaticDataSource } from './table.static-data-source';
52
54
  export { DataSourceFilterDirective, FilterClearComponent, FilterDateComponent, FilterInputComponent, FilterSelectComponent, VdDynamicTableComponent, VdFilterOptionDirective, VdTableFieldDirective };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@messaia/cdk",
3
- "version": "18.0.0",
3
+ "version": "18.1.0-rc02",
4
4
  "peerDependencies": {
5
- "@angular/common": "^18.0.6",
6
- "@angular/core": "^18.0.6"
5
+ "@angular/common": "^18.2.7",
6
+ "@angular/core": "^18.2.7"
7
7
  },
8
8
  "publishConfig": {
9
9
  "registry": "https://registry.npmjs.org"