@enigmatry/entry-components 17.0.0-preview.4 → 17.0.0-preview.5.1

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 (136) hide show
  1. package/README.md +32 -32
  2. package/assets/nswag-templates/Client.RequestBody.liquid +95 -95
  3. package/assets/nswag-templates/Client.RequestUrl.liquid +67 -67
  4. package/assets/nswag-templates/ConvertToClass.liquid +64 -64
  5. package/assets/nswag-templates/original/Client.RequestBody.liquid +89 -89
  6. package/assets/nswag-templates/original/Client.RequestUrl.liquid +59 -59
  7. package/assets/nswag-templates/original/ConvertToClass.liquid +65 -65
  8. package/assets/nswag-templates/original/File.FormatDate.liquid +4 -4
  9. package/assets/nswag-templates/original/File.ParseDateOnly.liquid +4 -4
  10. package/button/README.md +45 -45
  11. package/date-time-picker/README.md +69 -69
  12. package/dialog/README.md +73 -73
  13. package/esm2022/button/entry-button.directive.mjs +1 -1
  14. package/esm2022/button/entry-button.module.mjs +1 -1
  15. package/esm2022/button/public-api.mjs +1 -1
  16. package/esm2022/common/common.module.mjs +1 -1
  17. package/esm2022/common/date-time/entry-date-time-adapter.mjs +1 -1
  18. package/esm2022/common/date-time/entry-date-time-formats.mjs +1 -1
  19. package/esm2022/common/date-time/entry-time-adapter.mjs +1 -1
  20. package/esm2022/common/date-time/native-time-adapter.mjs +1 -1
  21. package/esm2022/common/directives/auto-disable-button.directive.mjs +1 -1
  22. package/esm2022/common/directives/ng-control-accessor.directive.mjs +1 -1
  23. package/esm2022/common/directives/noop-control-value-accessor.mjs +1 -1
  24. package/esm2022/common/interceptors/accept-language.interceptor.mjs +1 -1
  25. package/esm2022/common/public-api.mjs +1 -1
  26. package/esm2022/date-time-picker/date-time-picker.component.mjs +3 -3
  27. package/esm2022/date-time-picker/date-time-picker.module.mjs +1 -1
  28. package/esm2022/date-time-picker/public-api.mjs +1 -1
  29. package/esm2022/date-time-picker/time-picker.component.mjs +3 -3
  30. package/esm2022/dialog/dialogs/alert/entry-alert-dialog-data.interface.mjs +1 -1
  31. package/esm2022/dialog/dialogs/alert/entry-alert-dialog.component.mjs +3 -3
  32. package/esm2022/dialog/dialogs/confirm/entry-confirm-dialog-data.interface.mjs +1 -1
  33. package/esm2022/dialog/dialogs/confirm/entry-confirm-dialog.component.mjs +3 -3
  34. package/esm2022/dialog/dialogs/entry-dialog.component.mjs +3 -3
  35. package/esm2022/dialog/dialogs/error/entry-error-dialog-data.interface.mjs +1 -1
  36. package/esm2022/dialog/dialogs/error/entry-error-dialog.component.mjs +3 -3
  37. package/esm2022/dialog/entry-dialog-buttons-alignment.type.mjs +1 -1
  38. package/esm2022/dialog/entry-dialog-config.model.mjs +1 -1
  39. package/esm2022/dialog/entry-dialog.module.mjs +1 -1
  40. package/esm2022/dialog/entry-dialog.service.mjs +1 -1
  41. package/esm2022/dialog/public-api.mjs +1 -1
  42. package/esm2022/file-input/entry-file-input.component.mjs +1 -1
  43. package/esm2022/file-input/entry-file-input.module.mjs +1 -1
  44. package/esm2022/file-input/public-api.mjs +1 -1
  45. package/esm2022/permissions/permission-type.mjs +1 -1
  46. package/esm2022/permissions/permission.directive.mjs +1 -1
  47. package/esm2022/permissions/permission.module.mjs +1 -1
  48. package/esm2022/permissions/permission.pipe.mjs +1 -1
  49. package/esm2022/permissions/public-api.mjs +1 -1
  50. package/esm2022/public-api.mjs +1 -1
  51. package/esm2022/search-filter/autocomplete/autocomplete-search-filter.component.mjs +3 -3
  52. package/esm2022/search-filter/autocomplete/autocomplete-search-filter.model.mjs +1 -1
  53. package/esm2022/search-filter/control-type.mjs +1 -1
  54. package/esm2022/search-filter/date/date-search-filter.component.mjs +3 -3
  55. package/esm2022/search-filter/date/date-search-filter.model.mjs +1 -1
  56. package/esm2022/search-filter/date-time/date-time-search-filter.component.mjs +3 -3
  57. package/esm2022/search-filter/date-time/date-time-search-filter.model.mjs +1 -1
  58. package/esm2022/search-filter/public-api.mjs +1 -1
  59. package/esm2022/search-filter/search-filter-base.model.mjs +1 -1
  60. package/esm2022/search-filter/search-filter-config.model.mjs +1 -1
  61. package/esm2022/search-filter/search-filter-params.type.mjs +1 -1
  62. package/esm2022/search-filter/select/select-search-filter.component.mjs +3 -3
  63. package/esm2022/search-filter/select/select-search-filter.model.mjs +1 -1
  64. package/esm2022/search-filter/select-option.model.mjs +1 -1
  65. package/esm2022/search-filter/text/text-search-filter.component.mjs +3 -3
  66. package/esm2022/search-filter/text/text-search-filter.model.mjs +1 -1
  67. package/esm2022/spinner/entry-spinner/spinner.component.mjs +1 -1
  68. package/esm2022/spinner/public-api.mjs +1 -1
  69. package/esm2022/spinner/spinner.module.mjs +1 -1
  70. package/esm2022/table/components/entry-cell/entry-cell.component.mjs +1 -1
  71. package/esm2022/table/components/entry-cell-context-menu/entry-cell-context-menu.component.mjs +3 -3
  72. package/esm2022/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.mjs +3 -3
  73. package/esm2022/table/components/entry-table/entry-table.component.mjs +3 -3
  74. package/esm2022/table/entry-table.module.mjs +1 -1
  75. package/esm2022/table/interfaces/entry-table-config.mjs +1 -1
  76. package/esm2022/table/interfaces/paged-query.mjs +1 -1
  77. package/esm2022/table/interfaces/pagination.mjs +1 -1
  78. package/esm2022/table/public-api.mjs +1 -1
  79. package/esm2022/validation/entry-display-control-validation.directive.mjs +1 -1
  80. package/esm2022/validation/entry-form-errors.component.mjs +13 -13
  81. package/esm2022/validation/entry-validation-config.model.mjs +1 -1
  82. package/esm2022/validation/entry-validation.mjs +1 -1
  83. package/esm2022/validation/entry-validation.module.mjs +1 -1
  84. package/esm2022/validation/public-api.mjs +1 -1
  85. package/esm2022/validation/validation-problem-details.interface.mjs +1 -1
  86. package/fesm2022/enigmatry-entry-components-button.mjs.map +1 -1
  87. package/fesm2022/enigmatry-entry-components-common.mjs.map +1 -1
  88. package/fesm2022/enigmatry-entry-components-date-time-picker.mjs +4 -4
  89. package/fesm2022/enigmatry-entry-components-date-time-picker.mjs.map +1 -1
  90. package/fesm2022/enigmatry-entry-components-dialog.mjs +8 -8
  91. package/fesm2022/enigmatry-entry-components-dialog.mjs.map +1 -1
  92. package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -1
  93. package/fesm2022/enigmatry-entry-components-permissions.mjs.map +1 -1
  94. package/fesm2022/enigmatry-entry-components-search-filter.mjs +10 -10
  95. package/fesm2022/enigmatry-entry-components-search-filter.mjs.map +1 -1
  96. package/fesm2022/enigmatry-entry-components-spinner.mjs.map +1 -1
  97. package/fesm2022/enigmatry-entry-components-table.mjs +6 -6
  98. package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -1
  99. package/fesm2022/enigmatry-entry-components-validation.mjs +12 -12
  100. package/fesm2022/enigmatry-entry-components-validation.mjs.map +1 -1
  101. package/fesm2022/enigmatry-entry-components.mjs.map +1 -1
  102. package/file-input/README.md +70 -70
  103. package/package.json +2 -2
  104. package/permissions/README.md +67 -67
  105. package/search-filter/README.md +132 -132
  106. package/styles/_generator.scss +25 -25
  107. package/styles/modules/_default-theme.scss +91 -91
  108. package/styles/modules/components/buttons/_generator.scss +10 -10
  109. package/styles/modules/components/buttons/_radio.scss +18 -18
  110. package/styles/modules/components/checkboxes/_generator.scss +31 -31
  111. package/styles/modules/components/dialogs/_generator.scss +13 -13
  112. package/styles/modules/components/forms/_generator.scss +14 -14
  113. package/styles/modules/components/inputs/_generator.scss +14 -14
  114. package/styles/modules/components/search-filter/_generator.scss +14 -14
  115. package/styles/modules/components/tables/_cells.scss +25 -25
  116. package/styles/modules/components/tables/_generator.scss +6 -6
  117. package/styles/modules/components/tables/_header.scss +10 -10
  118. package/styles/modules/components/tables/_no-result.scss +9 -9
  119. package/styles/modules/components/tables/_rows.scss +39 -39
  120. package/styles/modules/components/tables/_sorting.scss +10 -10
  121. package/styles/modules/components/tables/_table-body.scss +12 -12
  122. package/styles/modules/components/toggle/_generator.scss +47 -47
  123. package/styles/modules/typography/_fonts.scss +64 -64
  124. package/styles/modules/vendors/angular-material/_generator.scss +46 -46
  125. package/styles/modules/vendors/angular-material/_palette-generator.scss +32 -32
  126. package/styles/modules/vendors/angular-material/_typography-generator.scss +107 -107
  127. package/styles/partials/core/components/_index.scss +4 -4
  128. package/styles/partials/core/components/date-time-picker/_general.scss +64 -64
  129. package/styles/partials/core/components/dialogs/_general.scss +23 -23
  130. package/styles/partials/core/components/forms/_general.scss +21 -21
  131. package/styles/partials/core/components/search-filter/_general.scss +8 -8
  132. package/styles/partials/core/components/tables/_general.scss +17 -17
  133. package/styles/partials/generator-test.scss +41 -41
  134. package/styles/partials/theming.scss +1 -1
  135. package/table/README.md +76 -76
  136. package/validation/README.md +108 -108
@@ -1,108 +1,108 @@
1
- # Entry Validation
2
-
3
- Enables configuring forms (Reactive or [Formly](https://formly.dev/)) so that server or client side validation errors are displayed correctly. To accomplish this, it offers the following features:
4
-
5
- * `setServerSideValidationErrors(error, form)` - a method that maps received server side validation errors to the form and its fields.
6
- * `entryDisplayControlValidation` - a directive that displays field level validation errors.
7
- * `<entry-form-errors>` - a component that displays form level validation errors.
8
- * `ENTRY_VALIDATION_CONFIG` - configuration provider used to configure default client side validation messages on module level.
9
-
10
- ## Integration
11
-
12
- ```npm
13
- npm i @enigmatry/entry-components
14
- ```
15
-
16
- Import component package:
17
-
18
- ```ts
19
- import { EntryValidationModule } from '@enigmatry/entry-components/validation';
20
- ```
21
-
22
- Styles import:
23
-
24
- ```css
25
- @use '@enigmatry/entry-components/styles/generate' as entry;
26
-
27
- @include entry.generate(APP_THEME, APP_TYPOGRAPHY);
28
- ```
29
-
30
- Where `APP_THEME` represents application theming configuration, while `APP_TYPOGRAPHY` represents application fonts configuration.
31
-
32
- ## Basic usage
33
-
34
- Add `entryDisplayControlValidation` & `<entry-form-errors>` elements to the form to support validation error messages:
35
-
36
- ```html
37
- <form [formGroup]="form" (ngSubmit)="submitForm()">
38
- <mat-form-field class="example-form-field">
39
- <mat-label>First name</mat-label>
40
- <input matInput type="text" formControlName="firstName">
41
- <mat-error entryDisplayControlValidation [control]="form.controls.firstName"></mat-error>
42
- </mat-form-field>
43
-
44
- <entry-form-errors [form]="form"></entry-form-errors>
45
-
46
- <button mat-flat-button color="accent" type="submit">Submit</button>
47
- </form>
48
- ```
49
-
50
- On submit handle _BadRequest (400)_ response using `setServerSideValidationErrors(error, form)` method:
51
-
52
- ```ts
53
- import { IValidationProblemDetails, setServerSideValidationErrors } from '@enigmatry/entry-components/validation';
54
-
55
- // ...
56
- submitForm() {
57
- this._apiService.post()
58
- .subscribe({
59
- error: (error: IValidationProblemDetails) => setServerSideValidationErrors(error, this.form)
60
- });
61
- }
62
- ```
63
-
64
- ## Configuration
65
-
66
- Optionally, when using Reactive form, client side validation messages can be configured on module level:
67
-
68
- ```ts
69
- // ...
70
- import { AbstractControl } from '@angular/forms';
71
- import { EntryValidationModule, provideEntryValidationConfig } from '@enigmatry/entry-components/validation';
72
-
73
- @NgModule({
74
- imports: [
75
- // ...
76
- EntryValidationModule
77
- ]
78
- providers: [
79
- provideEntryValidationConfig({
80
- validationMessages: [
81
- { name: 'required', message: 'This field is mandatory!' },
82
- { name: 'minlength', message: (control: AbstractControl) => `Minimal length is ${control.errors.minlength.requiredLength}!` }
83
- ]
84
- })
85
- ]
86
- })
87
- export class AppModule { }
88
- ```
89
-
90
- ## Microsoft WEB.API & NSwag configuration
91
-
92
- To configure REST API (_Microsoft WEB.API_) to return _Bad Request_ responses in uniform format, decorate all end-points that trigger validation with `ProducesResponseType` attribute that maps [ValidationProblemDetails](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.validationproblemdetails?view=aspnetcore-7.0) to _Bad Request_ responses:
93
-
94
- ```csharp
95
- using Microsoft.AspNetCore.Mvc;
96
-
97
- // ...
98
-
99
- [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
100
- public async Task<ActionResult<Response>> Post([FromBody] Command command)
101
- {
102
- // ...
103
- }
104
- ```
105
-
106
- When set like this, generated ([NSwag](https://github.com/RicoSuter/NSwag)) client side models for _Bad Request_ responses can be used as input parameter of `setServerSideValidationErrors(error, form)` method.
107
-
108
- This is because `IValidationProblemDetails` interface is based on [ValidationProblemDetails](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.validationproblemdetails?view=aspnetcore-7.0) class.
1
+ # Entry Validation
2
+
3
+ Enables configuring forms (Reactive or [Formly](https://formly.dev/)) so that server or client side validation errors are displayed correctly. To accomplish this, it offers the following features:
4
+
5
+ * `setServerSideValidationErrors(error, form)` - a method that maps received server side validation errors to the form and its fields.
6
+ * `entryDisplayControlValidation` - a directive that displays field level validation errors.
7
+ * `<entry-form-errors>` - a component that displays form level validation errors.
8
+ * `ENTRY_VALIDATION_CONFIG` - configuration provider used to configure default client side validation messages on module level.
9
+
10
+ ## Integration
11
+
12
+ ```npm
13
+ npm i @enigmatry/entry-components
14
+ ```
15
+
16
+ Import component package:
17
+
18
+ ```ts
19
+ import { EntryValidationModule } from '@enigmatry/entry-components/validation';
20
+ ```
21
+
22
+ Styles import:
23
+
24
+ ```css
25
+ @use '@enigmatry/entry-components/styles/generate' as entry;
26
+
27
+ @include entry.generate(APP_THEME, APP_TYPOGRAPHY);
28
+ ```
29
+
30
+ Where `APP_THEME` represents application theming configuration, while `APP_TYPOGRAPHY` represents application fonts configuration.
31
+
32
+ ## Basic usage
33
+
34
+ Add `entryDisplayControlValidation` & `<entry-form-errors>` elements to the form to support validation error messages:
35
+
36
+ ```html
37
+ <form [formGroup]="form" (ngSubmit)="submitForm()">
38
+ <mat-form-field class="example-form-field">
39
+ <mat-label>First name</mat-label>
40
+ <input matInput type="text" formControlName="firstName">
41
+ <mat-error entryDisplayControlValidation [control]="form.controls.firstName"></mat-error>
42
+ </mat-form-field>
43
+
44
+ <entry-form-errors [form]="form"></entry-form-errors>
45
+
46
+ <button mat-flat-button color="accent" type="submit">Submit</button>
47
+ </form>
48
+ ```
49
+
50
+ On submit handle _BadRequest (400)_ response using `setServerSideValidationErrors(error, form)` method:
51
+
52
+ ```ts
53
+ import { IValidationProblemDetails, setServerSideValidationErrors } from '@enigmatry/entry-components/validation';
54
+
55
+ // ...
56
+ submitForm() {
57
+ this._apiService.post()
58
+ .subscribe({
59
+ error: (error: IValidationProblemDetails) => setServerSideValidationErrors(error, this.form)
60
+ });
61
+ }
62
+ ```
63
+
64
+ ## Configuration
65
+
66
+ Optionally, when using Reactive form, client side validation messages can be configured on module level:
67
+
68
+ ```ts
69
+ // ...
70
+ import { AbstractControl } from '@angular/forms';
71
+ import { EntryValidationModule, provideEntryValidationConfig } from '@enigmatry/entry-components/validation';
72
+
73
+ @NgModule({
74
+ imports: [
75
+ // ...
76
+ EntryValidationModule
77
+ ]
78
+ providers: [
79
+ provideEntryValidationConfig({
80
+ validationMessages: [
81
+ { name: 'required', message: 'This field is mandatory!' },
82
+ { name: 'minlength', message: (control: AbstractControl) => `Minimal length is ${control.errors.minlength.requiredLength}!` }
83
+ ]
84
+ })
85
+ ]
86
+ })
87
+ export class AppModule { }
88
+ ```
89
+
90
+ ## Microsoft WEB.API & NSwag configuration
91
+
92
+ To configure REST API (_Microsoft WEB.API_) to return _Bad Request_ responses in uniform format, decorate all end-points that trigger validation with `ProducesResponseType` attribute that maps [ValidationProblemDetails](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.validationproblemdetails?view=aspnetcore-7.0) to _Bad Request_ responses:
93
+
94
+ ```csharp
95
+ using Microsoft.AspNetCore.Mvc;
96
+
97
+ // ...
98
+
99
+ [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
100
+ public async Task<ActionResult<Response>> Post([FromBody] Command command)
101
+ {
102
+ // ...
103
+ }
104
+ ```
105
+
106
+ When set like this, generated ([NSwag](https://github.com/RicoSuter/NSwag)) client side models for _Bad Request_ responses can be used as input parameter of `setServerSideValidationErrors(error, form)` method.
107
+
108
+ This is because `IValidationProblemDetails` interface is based on [ValidationProblemDetails](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.validationproblemdetails?view=aspnetcore-7.0) class.