@smartbit4all/ng-client 4.1.39 → 4.2.0

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 (116) hide show
  1. package/esm2022/lib/smart-client/smart-component-api-client.mjs +1 -1
  2. package/esm2022/lib/smart-client/smart.component.mjs +1 -1
  3. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionBoolOperator.mjs +1 -1
  4. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionBuilderField.mjs +1 -1
  5. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionBuilderGroup.mjs +1 -1
  6. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionBuilderModel.mjs +1 -1
  7. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionData.mjs +1 -1
  8. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionDataType.mjs +1 -1
  9. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionField.mjs +1 -1
  10. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionFieldList.mjs +1 -1
  11. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.mjs +1 -1
  12. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionList.mjs +1 -1
  13. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionOperandData.mjs +1 -1
  14. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionOperation.mjs +1 -1
  15. package/esm2022/lib/smart-filter/api/filter/model/filterExpressionOrderBy.mjs +1 -1
  16. package/esm2022/lib/smart-filter-editor/api/api/filter.service.mjs +1 -1
  17. package/esm2022/lib/smart-filter-editor/api/configuration.mjs +1 -1
  18. package/esm2022/lib/smart-filter-editor/api/encoder.mjs +1 -1
  19. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBoolOperator.mjs +1 -1
  20. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderApiConfig.mjs +1 -1
  21. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderField.mjs +1 -1
  22. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderGroup.mjs +1 -1
  23. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderModel.mjs +1 -1
  24. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderUiModel.mjs +1 -1
  25. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionData.mjs +1 -1
  26. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionDataType.mjs +1 -1
  27. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionField.mjs +1 -1
  28. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionFieldEditor.mjs +1 -1
  29. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionFieldList.mjs +1 -1
  30. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionFieldWidgetType.mjs +1 -1
  31. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionList.mjs +1 -1
  32. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionOperandData.mjs +1 -1
  33. package/esm2022/lib/smart-filter-editor/api/model/filterExpressionOperation.mjs +1 -1
  34. package/esm2022/lib/smart-filter-editor/api/model/smartFilterType.mjs +1 -1
  35. package/esm2022/lib/smart-filter-editor/api/param.mjs +1 -1
  36. package/esm2022/lib/smart-filter-editor/api/variables.mjs +1 -1
  37. package/esm2022/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.mjs +3 -3
  38. package/esm2022/lib/smart-form/api/api/api.mjs +1 -1
  39. package/esm2022/lib/smart-form/api/api/default.service.mjs +1 -1
  40. package/esm2022/lib/smart-form/api/api.module.mjs +1 -1
  41. package/esm2022/lib/smart-form/api/configuration.mjs +1 -1
  42. package/esm2022/lib/smart-form/api/encoder.mjs +1 -1
  43. package/esm2022/lib/smart-form/api/index.mjs +1 -1
  44. package/esm2022/lib/smart-form/api/model/models.mjs +1 -1
  45. package/esm2022/lib/smart-form/api/model/propertyMapping.mjs +1 -1
  46. package/esm2022/lib/smart-form/api/model/selectionDefinition.mjs +1 -1
  47. package/esm2022/lib/smart-form/api/model/smartFormInputMode.mjs +1 -1
  48. package/esm2022/lib/smart-form/api/model/smartFormWidgetDirection.mjs +1 -1
  49. package/esm2022/lib/smart-form/api/model/smartFormWidgetType.mjs +1 -1
  50. package/esm2022/lib/smart-form/api/model/smartLayoutDefinition.mjs +1 -1
  51. package/esm2022/lib/smart-form/api/model/smartMatrixModel.mjs +1 -1
  52. package/esm2022/lib/smart-form/api/model/smartWidgetDefinition.mjs +1 -1
  53. package/esm2022/lib/smart-form/api/model/smartWidgetHint.mjs +1 -1
  54. package/esm2022/lib/smart-form/api/model/valueChangeMode.mjs +1 -1
  55. package/esm2022/lib/smart-form/api/param.mjs +1 -1
  56. package/esm2022/lib/smart-form/api/variables.mjs +1 -1
  57. package/esm2022/lib/smart-form/services/smartform.service.mjs +11 -6
  58. package/esm2022/lib/smart-form/smartform.form-model.mjs +1 -1
  59. package/esm2022/lib/smart-form/smartform.model.mjs +1 -1
  60. package/esm2022/lib/smart-form/widgets/smartformwidget/smartformwidget.component.mjs +3 -3
  61. package/esm2022/lib/smart-grid/api/grid-api/api/api.mjs +1 -1
  62. package/esm2022/lib/smart-grid/api/grid-api/api/grid.service.mjs +1 -1
  63. package/esm2022/lib/smart-grid/api/grid-api/api.module.mjs +1 -1
  64. package/esm2022/lib/smart-grid/api/grid-api/configuration.mjs +1 -1
  65. package/esm2022/lib/smart-grid/api/grid-api/encoder.mjs +1 -1
  66. package/esm2022/lib/smart-grid/api/grid-api/index.mjs +1 -1
  67. package/esm2022/lib/smart-grid/api/grid-api/model/gridColumnContentType.mjs +1 -1
  68. package/esm2022/lib/smart-grid/api/grid-api/model/gridColumnMeta.mjs +1 -1
  69. package/esm2022/lib/smart-grid/api/grid-api/model/gridDataAccessConfig.mjs +1 -1
  70. package/esm2022/lib/smart-grid/api/grid-api/model/gridModel.mjs +1 -1
  71. package/esm2022/lib/smart-grid/api/grid-api/model/gridPage.mjs +1 -1
  72. package/esm2022/lib/smart-grid/api/grid-api/model/gridRow.mjs +1 -1
  73. package/esm2022/lib/smart-grid/api/grid-api/model/gridSelectionChange.mjs +1 -1
  74. package/esm2022/lib/smart-grid/api/grid-api/model/gridSelectionMode.mjs +1 -1
  75. package/esm2022/lib/smart-grid/api/grid-api/model/gridSelectionType.mjs +1 -1
  76. package/esm2022/lib/smart-grid/api/grid-api/model/gridServerModel.mjs +1 -1
  77. package/esm2022/lib/smart-grid/api/grid-api/model/gridUpdateData.mjs +1 -1
  78. package/esm2022/lib/smart-grid/api/grid-api/model/gridView.mjs +1 -1
  79. package/esm2022/lib/smart-grid/api/grid-api/model/gridViewDescriptor.mjs +1 -1
  80. package/esm2022/lib/smart-grid/api/grid-api/model/models.mjs +1 -1
  81. package/esm2022/lib/smart-grid/api/grid-api/param.mjs +1 -1
  82. package/esm2022/lib/smart-grid/api/grid-api/variables.mjs +1 -1
  83. package/esm2022/lib/smart-map/abstract-map.mjs +1 -1
  84. package/esm2022/lib/smart-map/api/api/geoMap.service.mjs +1 -1
  85. package/esm2022/lib/smart-map/api/model/geoMapDataSourceDescriptor.mjs +1 -1
  86. package/esm2022/lib/smart-map/api/model/geoMapDataSourceType.mjs +1 -1
  87. package/esm2022/lib/smart-map/impl/google-map.mjs +1 -1
  88. package/esm2022/lib/smart-map/impl/leaflet-map.mjs +1 -1
  89. package/esm2022/lib/smart-map/projects.mjs +1 -1
  90. package/esm2022/lib/smart-map/smart-map.component.mjs +1 -1
  91. package/esm2022/lib/smart-map/smart-map.module.mjs +1 -1
  92. package/esm2022/lib/smart-map/smart-map.types.mjs +1 -1
  93. package/esm2022/lib/smart-validation/named-validator.service.mjs +115 -0
  94. package/esm2022/lib/smart-validation/projects.mjs +4 -0
  95. package/esm2022/lib/smart-validation/smart-validation.module.mjs +24 -0
  96. package/esm2022/lib/smart-validation/smart-validation.types.mjs +4 -0
  97. package/esm2022/lib/view-context/api/model/componentConstraint.mjs +1 -1
  98. package/esm2022/lib/view-context/api/model/models.mjs +2 -1
  99. package/esm2022/lib/view-context/api/model/namedValidator.mjs +19 -0
  100. package/esm2022/projects.mjs +2 -1
  101. package/fesm2022/smartbit4all-ng-client.mjs +167 -10
  102. package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
  103. package/lib/smart-form/services/smartform.service.d.ts +4 -1
  104. package/lib/smart-form/smartform.form-model.d.ts +2 -2
  105. package/lib/smart-form/smartform.model.d.ts +11 -5
  106. package/lib/smart-validation/named-validator.service.d.ts +17 -0
  107. package/lib/smart-validation/projects.d.ts +3 -0
  108. package/lib/smart-validation/smart-validation.module.d.ts +8 -0
  109. package/lib/smart-validation/smart-validation.types.d.ts +12 -0
  110. package/lib/view-context/api/model/componentConstraint.d.ts +6 -0
  111. package/lib/view-context/api/model/models.d.ts +1 -0
  112. package/lib/view-context/api/model/namedValidator.d.ts +26 -0
  113. package/package.json +1 -1
  114. package/projects.d.ts +1 -0
  115. package/smartbit4all-ng-client-4.2.0.tgz +0 -0
  116. package/smartbit4all-ng-client-4.1.39.tgz +0 -0
@@ -2,13 +2,16 @@ import { UntypedFormGroup } from '@angular/forms';
2
2
  import { SmartFormWidget, SmartItem, SmartItems } from '../smartform.form-model';
3
3
  import { SmartForm, SmartValidator } from '../smartform.model';
4
4
  import { ComponentLibrary } from '../../view-context/utility/componentLibrary';
5
+ import { NamedValidatorService } from '../../smart-validation/named-validator.service';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class SmartFormService {
8
+ private validatorProvider?;
7
9
  private readonly emptyKey;
8
10
  componentLibrary: typeof ComponentLibrary;
9
11
  group: any;
10
12
  formGroup?: UntypedFormGroup;
11
13
  smartForm?: SmartForm;
14
+ constructor(validatorProvider?: NamedValidatorService | undefined);
12
15
  getSmartFormWidgetByKey(key: string): SmartFormWidget<any> | undefined;
13
16
  private collectKeysFromSmartForm;
14
17
  private findSmartFormWidgetByKey;
@@ -43,6 +46,6 @@ export declare class SmartFormService {
43
46
  private getTranslationOfKey;
44
47
  translateWidgets(widgets: SmartFormWidget<any>[]): Promise<void>;
45
48
  translateWidgetItems(widgets: SmartItems<any>[]): Promise<void>;
46
- static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormService, never>;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormService, [{ optional: true; }]>;
47
50
  static ɵprov: i0.ɵɵInjectableDeclaration<SmartFormService>;
48
51
  }
@@ -91,7 +91,7 @@ export interface SmartTextFieldChips<T> {
91
91
  value?: T;
92
92
  placeholder?: string;
93
93
  originalPlaceholder?: string;
94
- minWidth?: SmartFormWidgetWidth | number | number;
94
+ minWidth?: SmartFormWidgetWidth | number;
95
95
  isDisabled?: boolean;
96
96
  isReadonly?: boolean;
97
97
  validators?: SmartValidator[];
@@ -121,7 +121,7 @@ export interface SmartTextFieldLookup<T> {
121
121
  value?: T;
122
122
  placeholder?: string;
123
123
  originalPlaceholder?: string;
124
- minWidth?: SmartFormWidgetWidth | number | number;
124
+ minWidth?: SmartFormWidgetWidth | number;
125
125
  isDisabled?: boolean;
126
126
  isReadonly?: boolean;
127
127
  validators?: SmartValidator[];
@@ -1,11 +1,12 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- import { SmartFormWidget } from './smartform.form-model';
3
- import { SmartFormWidgetDirection } from './api';
4
- import { SmartTranslateService } from '../view-context/smart-view-context.model';
1
+ import { ValidatorFn } from "@angular/forms";
2
+ import { SmartFormWidget } from "./smartform.form-model";
3
+ import { SmartFormWidgetDirection } from "./api";
4
+ import { SmartTranslateService } from "../view-context/smart-view-context.model";
5
+ import { NamedValidator } from "../view-context/api";
5
6
  export interface SophisticatedValueChange {
6
7
  key: string;
7
8
  value: any;
8
- kind: 'basic' | 'selection';
9
+ kind: "basic" | "selection";
9
10
  }
10
11
  export interface SmartFormComponentConstraint {
11
12
  /**
@@ -15,6 +16,11 @@ export interface SmartFormComponentConstraint {
15
16
  visible?: boolean;
16
17
  mandatory?: boolean;
17
18
  enabled?: boolean;
19
+ max?: number;
20
+ maxLength?: number;
21
+ min?: number;
22
+ minLength?: number;
23
+ namedValidators?: Array<NamedValidator>;
18
24
  }
19
25
  export declare enum SmartFormWidgetWidth {
20
26
  SMALL = 150,
@@ -0,0 +1,17 @@
1
+ import { SmartFormWidget } from '../smart-form/smartform.form-model';
2
+ import { SmartFormComponentConstraint, SmartValidator } from '../smart-form/smartform.model';
3
+ import { ValidatorFactory } from './smart-validation.types';
4
+ import * as i0 from "@angular/core";
5
+ export type ValidatedWidget<T> = SmartFormWidget<T> & {
6
+ validators: Array<SmartValidator>;
7
+ };
8
+ export declare class NamedValidatorService {
9
+ private readonly factories;
10
+ constructor(factories: Array<ValidatorFactory>);
11
+ applyConstraint(w: ValidatedWidget<any>, c: SmartFormComponentConstraint): void;
12
+ private applyBuiltInValidators;
13
+ private applyNamedValidators;
14
+ private applyNamedValidator;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<NamedValidatorService, [{ optional: true; }]>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<NamedValidatorService>;
17
+ }
@@ -0,0 +1,3 @@
1
+ export * from './smart-validation.types';
2
+ export * from './smart-validation.module';
3
+ export * from './named-validator.service';
@@ -0,0 +1,8 @@
1
+ import { ModuleWithProviders, Provider } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SmartValidationModule {
4
+ static forRoot(providers: Array<Provider>): ModuleWithProviders<SmartValidationModule>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartValidationModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SmartValidationModule, never, never, never>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<SmartValidationModule>;
8
+ }
@@ -0,0 +1,12 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ import { InjectionToken } from '@angular/core';
3
+ export interface ValidatorParameters {
4
+ [k: string]: any;
5
+ }
6
+ export declare const EMPTY_PARAMS: ValidatorParameters;
7
+ export interface ValidatorFactory {
8
+ name: string;
9
+ params: Array<String>;
10
+ create(validatorParameters?: ValidatorParameters): ValidatorFn;
11
+ }
12
+ export declare const NAMED_VALIDATOR: InjectionToken<ValidatorFactory>;
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { NamedValidator } from './namedValidator';
12
13
  import { ValueSetData } from '../../value-api';
13
14
  /**
14
15
  * The component constraint is responsible for the constraints belong to a given component (textfield, combobox etc.) on the view. The UI must identify the component by the dataName that is a path of the data name separated by dot like dataSheet.field.
@@ -22,4 +23,9 @@ export interface ComponentConstraint {
22
23
  mandatory?: boolean;
23
24
  enabled?: boolean;
24
25
  valueSet?: ValueSetData;
26
+ min?: number;
27
+ max?: number;
28
+ minLength?: number;
29
+ maxLength?: number;
30
+ namedValidators: Array<NamedValidator>;
25
31
  }
@@ -17,6 +17,7 @@ export * from './messageOptionType';
17
17
  export * from './messageResult';
18
18
  export * from './messageTextType';
19
19
  export * from './messageType';
20
+ export * from './namedValidator';
20
21
  export * from './openPendingData';
21
22
  export * from './serverRequestExecutionStat';
22
23
  export * from './serverRequestTrack';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * View API
3
+ * View API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: info@it4all.hu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export interface NamedValidator {
13
+ name: string;
14
+ params: {
15
+ [key: string]: object;
16
+ };
17
+ /**
18
+ * ADD: REMOVE: ALTER: Do not explicitly add, but alter preexisting matching validator\'s parameters
19
+ */
20
+ operation: NamedValidatorOperationEnum;
21
+ }
22
+ export declare enum NamedValidatorOperationEnum {
23
+ ADD = "ADD",
24
+ REMOVE = "REMOVE",
25
+ ALTER = "ALTER"
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "4.1.39",
3
+ "version": "4.2.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
6
6
  "@angular/common": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
package/projects.d.ts CHANGED
@@ -21,3 +21,4 @@ export * from './lib/view-context/projects';
21
21
  export * from './lib/smart-filter-editor/project';
22
22
  export * from './lib/shared/projects';
23
23
  export * from './lib/smart-map/projects';
24
+ export * from './lib/smart-validation/projects';
Binary file
Binary file