@openmrs/ngx-formentry 3.0.1-pre.152 → 3.0.1-pre.156

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 (26) hide show
  1. package/bundles/openmrs-ngx-formentry.umd.js +126 -21
  2. package/bundles/openmrs-ngx-formentry.umd.js.map +1 -1
  3. package/components/number-input/number-input.component.d.ts +9 -1
  4. package/components/number-input/number-input.module.d.ts +4 -3
  5. package/components/number-input/number.directive.d.ts +9 -0
  6. package/esm2015/components/number-input/number-input.component.js +16 -3
  7. package/esm2015/components/number-input/number-input.module.js +4 -3
  8. package/esm2015/components/number-input/number.directive.js +22 -0
  9. package/esm2015/form-entry/form-factory/question.factory.js +15 -1
  10. package/esm2015/form-entry/form-factory/validation.factory.js +13 -6
  11. package/esm2015/form-entry/form-renderer/form-renderer.component.js +2 -2
  12. package/esm2015/form-entry/question-models/max-length-validation.model.js +9 -0
  13. package/esm2015/form-entry/question-models/max-validation.model.js +2 -2
  14. package/esm2015/form-entry/question-models/min-length-validation.model.js +9 -0
  15. package/esm2015/form-entry/question-models/min-validation.model.js +2 -2
  16. package/esm2015/form-entry/validators/max-length.validator.js +17 -0
  17. package/esm2015/form-entry/validators/min-length.validator.js +17 -0
  18. package/fesm2015/openmrs-ngx-formentry.js +112 -12
  19. package/fesm2015/openmrs-ngx-formentry.js.map +1 -1
  20. package/form-entry/form-factory/validation.factory.d.ts +6 -3
  21. package/form-entry/question-models/max-length-validation.model.d.ts +5 -0
  22. package/form-entry/question-models/min-length-validation.model.d.ts +5 -0
  23. package/form-entry/validators/max-length.validator.d.ts +6 -0
  24. package/form-entry/validators/min-length.validator.d.ts +6 -0
  25. package/package.json +1 -1
  26. package/styles/ngx-formentry.css +2 -5
@@ -1,4 +1,3 @@
1
- import { Validators } from '@angular/forms';
2
1
  import { ConditionalRequiredValidator } from '../validators/conditional-required.validator';
3
2
  import { ConditionalAnsweredValidator } from '../validators/conditional-answered.validator';
4
3
  import { JsExpressionValidator } from '../validators/js-expression.validator';
@@ -14,8 +13,12 @@ export declare class ValidationFactory {
14
13
  get futureDateRestrictionValidator(): any;
15
14
  get maxDateValidator(): any;
16
15
  get minDateValidator(): any;
17
- get minLengthValidator(): any;
18
- get maxLengthValidator(): typeof Validators.maxLength;
16
+ minLengthValidator(minLength: number): (control: import("../../abstract-controls-extension/afe-form-control").AfeFormControl) => {
17
+ [key: string]: any;
18
+ };
19
+ maxLengthValidator(maxLength: number): (control: import("../../abstract-controls-extension/afe-form-control").AfeFormControl) => {
20
+ [key: string]: any;
21
+ };
19
22
  getMinValueValidator(min: number): any;
20
23
  getMaxValueValidator(max: number): any;
21
24
  get jsExpressionValidator(): JsExpressionValidator;
@@ -0,0 +1,5 @@
1
+ import { ValidationModel } from './validation.model';
2
+ export declare class MaxLengthValidationModel extends ValidationModel {
3
+ maxlength: number;
4
+ constructor(validations: any);
5
+ }
@@ -0,0 +1,5 @@
1
+ import { ValidationModel } from './validation.model';
2
+ export declare class MinLengthValidationModel extends ValidationModel {
3
+ minlength: number;
4
+ constructor(validations: any);
5
+ }
@@ -0,0 +1,6 @@
1
+ import { AfeFormControl } from '../../abstract-controls-extension/afe-form-control';
2
+ export declare class MaxLengthValidator {
3
+ validate(maxLength: number): (control: AfeFormControl) => {
4
+ [key: string]: any;
5
+ };
6
+ }
@@ -0,0 +1,6 @@
1
+ import { AfeFormControl } from '../../abstract-controls-extension/afe-form-control';
2
+ export declare class MinLengthValidator {
3
+ validate(minLength: number): (control: AfeFormControl) => {
4
+ [key: string]: any;
5
+ };
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/ngx-formentry",
3
- "version": "3.0.1-pre.152",
3
+ "version": "3.0.1-pre.156",
4
4
  "dependencies": {
5
5
  "tslib": "^2.2.0"
6
6
  },
@@ -78,7 +78,6 @@
78
78
 
79
79
  .ng-select .ng-select-container .ng-value-container {
80
80
  align-items: stretch;
81
- padding: 0.4375em 0;
82
81
  border-top: 0.84375em solid transparent;
83
82
  }
84
83
 
@@ -97,14 +96,12 @@
97
96
  }
98
97
 
99
98
  .ng-select.ng-select-single .ng-select-container .ng-arrow-wrapper {
100
- align-self: flex-end;
99
+ align-self: center;
101
100
  right: 4px;
102
- top: -5px;
103
101
  }
104
102
 
105
103
  .ng-select.ng-select-single .ng-select-container .ng-clear-wrapper {
106
- align-self: flex-end;
107
- bottom: 7px;
104
+ align-self: center;
108
105
  }
109
106
 
110
107
  .ng-select.ng-select-multiple.ng-select-disabled