@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.
- package/esm2022/lib/smart-client/smart-component-api-client.mjs +1 -1
- package/esm2022/lib/smart-client/smart.component.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionBoolOperator.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionBuilderField.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionBuilderGroup.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionBuilderModel.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionData.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionDataType.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionField.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionFieldList.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionList.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionOperandData.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionOperation.mjs +1 -1
- package/esm2022/lib/smart-filter/api/filter/model/filterExpressionOrderBy.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/api/filter.service.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/configuration.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/encoder.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBoolOperator.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderApiConfig.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderField.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderGroup.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderModel.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionBuilderUiModel.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionData.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionDataType.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionField.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionFieldEditor.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionFieldList.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionFieldWidgetType.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionList.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionOperandData.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/filterExpressionOperation.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/model/smartFilterType.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/param.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/api/variables.mjs +1 -1
- package/esm2022/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.mjs +3 -3
- package/esm2022/lib/smart-form/api/api/api.mjs +1 -1
- package/esm2022/lib/smart-form/api/api/default.service.mjs +1 -1
- package/esm2022/lib/smart-form/api/api.module.mjs +1 -1
- package/esm2022/lib/smart-form/api/configuration.mjs +1 -1
- package/esm2022/lib/smart-form/api/encoder.mjs +1 -1
- package/esm2022/lib/smart-form/api/index.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/models.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/propertyMapping.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/selectionDefinition.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/smartFormInputMode.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/smartFormWidgetDirection.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/smartFormWidgetType.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/smartLayoutDefinition.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/smartMatrixModel.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/smartWidgetDefinition.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/smartWidgetHint.mjs +1 -1
- package/esm2022/lib/smart-form/api/model/valueChangeMode.mjs +1 -1
- package/esm2022/lib/smart-form/api/param.mjs +1 -1
- package/esm2022/lib/smart-form/api/variables.mjs +1 -1
- package/esm2022/lib/smart-form/services/smartform.service.mjs +11 -6
- package/esm2022/lib/smart-form/smartform.form-model.mjs +1 -1
- package/esm2022/lib/smart-form/smartform.model.mjs +1 -1
- package/esm2022/lib/smart-form/widgets/smartformwidget/smartformwidget.component.mjs +3 -3
- package/esm2022/lib/smart-grid/api/grid-api/api/api.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/api/grid.service.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/api.module.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/configuration.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/encoder.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/index.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridColumnContentType.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridColumnMeta.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridDataAccessConfig.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridModel.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridPage.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridRow.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridSelectionChange.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridSelectionMode.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridSelectionType.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridServerModel.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridUpdateData.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridView.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/gridViewDescriptor.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/model/models.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/param.mjs +1 -1
- package/esm2022/lib/smart-grid/api/grid-api/variables.mjs +1 -1
- package/esm2022/lib/smart-map/abstract-map.mjs +1 -1
- package/esm2022/lib/smart-map/api/api/geoMap.service.mjs +1 -1
- package/esm2022/lib/smart-map/api/model/geoMapDataSourceDescriptor.mjs +1 -1
- package/esm2022/lib/smart-map/api/model/geoMapDataSourceType.mjs +1 -1
- package/esm2022/lib/smart-map/impl/google-map.mjs +1 -1
- package/esm2022/lib/smart-map/impl/leaflet-map.mjs +1 -1
- package/esm2022/lib/smart-map/projects.mjs +1 -1
- package/esm2022/lib/smart-map/smart-map.component.mjs +1 -1
- package/esm2022/lib/smart-map/smart-map.module.mjs +1 -1
- package/esm2022/lib/smart-map/smart-map.types.mjs +1 -1
- package/esm2022/lib/smart-validation/named-validator.service.mjs +115 -0
- package/esm2022/lib/smart-validation/projects.mjs +4 -0
- package/esm2022/lib/smart-validation/smart-validation.module.mjs +24 -0
- package/esm2022/lib/smart-validation/smart-validation.types.mjs +4 -0
- package/esm2022/lib/view-context/api/model/componentConstraint.mjs +1 -1
- package/esm2022/lib/view-context/api/model/models.mjs +2 -1
- package/esm2022/lib/view-context/api/model/namedValidator.mjs +19 -0
- package/esm2022/projects.mjs +2 -1
- package/fesm2022/smartbit4all-ng-client.mjs +167 -10
- package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-form/services/smartform.service.d.ts +4 -1
- package/lib/smart-form/smartform.form-model.d.ts +2 -2
- package/lib/smart-form/smartform.model.d.ts +11 -5
- package/lib/smart-validation/named-validator.service.d.ts +17 -0
- package/lib/smart-validation/projects.d.ts +3 -0
- package/lib/smart-validation/smart-validation.module.d.ts +8 -0
- package/lib/smart-validation/smart-validation.types.d.ts +12 -0
- package/lib/view-context/api/model/componentConstraint.d.ts +6 -0
- package/lib/view-context/api/model/models.d.ts +1 -0
- package/lib/view-context/api/model/namedValidator.d.ts +26 -0
- package/package.json +1 -1
- package/projects.d.ts +1 -0
- package/smartbit4all-ng-client-4.2.0.tgz +0 -0
- 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,
|
|
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
|
|
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
|
|
124
|
+
minWidth?: SmartFormWidgetWidth | number;
|
|
125
125
|
isDisabled?: boolean;
|
|
126
126
|
isReadonly?: boolean;
|
|
127
127
|
validators?: SmartValidator[];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ValidatorFn } from
|
|
2
|
-
import { SmartFormWidget } from
|
|
3
|
-
import { SmartFormWidgetDirection } from
|
|
4
|
-
import { SmartTranslateService } from
|
|
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:
|
|
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,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
package/projects.d.ts
CHANGED
|
Binary file
|
|
Binary file
|