@smartbit4all/ng-client 3.2.16 → 3.2.18
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/esm2020/lib/smart-filter-editor/api/api/filter.service.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/configuration.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/encoder.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBoolOperator.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderApiConfig.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderField.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderGroup.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderModel.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionBuilderUiModel.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionData.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionDataType.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionField.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldEditor.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldList.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionFieldWidgetType.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionList.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperandData.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOperation.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/param.mjs +1 -1
- package/esm2020/lib/smart-filter-editor/api/variables.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/models.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/smartWidgetDefinition.mjs +1 -1
- package/esm2020/lib/smart-form/api/model/smartWidgetHint.mjs +1 -1
- package/esm2020/lib/smart-form/services/smartform.service.mjs +82 -27
- package/esm2020/lib/smart-grid/api/grid-api/api/api.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/api/grid.service.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/api.module.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/configuration.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/encoder.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/index.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridColumnContentType.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridColumnMeta.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridDataAccessConfig.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridModel.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridPage.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridSelectionMode.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridSelectionType.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridServerModel.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridUpdateData.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridView.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/models.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/param.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/variables.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/api/tree.service.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/configuration.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/encoder.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/param.mjs +1 -1
- package/esm2020/lib/smart-tree/tree-api/variables.mjs +1 -1
- package/esm2020/lib/view-context/api/api/view.service.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uploadedFile.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewContextChange.mjs +1 -1
- package/esm2020/lib/view-context/api/model/viewEventHandler.mjs +1 -1
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +2 -1
- package/esm2020/lib/view-context/value-api/api/api.mjs +1 -1
- package/esm2020/lib/view-context/value-api/api/value.service.mjs +1 -1
- package/esm2020/lib/view-context/value-api/api.module.mjs +1 -1
- package/esm2020/lib/view-context/value-api/configuration.mjs +1 -1
- package/esm2020/lib/view-context/value-api/encoder.mjs +1 -1
- package/esm2020/lib/view-context/value-api/index.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/genericValue.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/models.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/value.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetData.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinition.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionData.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionIdentifier.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionKind.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetExpression.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetOperand.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetOperation.mjs +1 -1
- package/esm2020/lib/view-context/value-api/param.mjs +1 -1
- package/esm2020/lib/view-context/value-api/variables.mjs +1 -1
- package/fesm2015/smartbit4all-ng-client.mjs +83 -27
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +82 -26
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-form/services/smartform.service.d.ts +10 -0
- package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.d.ts +1 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.2.18.tgz +0 -0
- package/src/lib/smart-filter-editor/api/README.md +226 -226
- package/src/lib/smart-grid/api/grid-api/README.md +226 -226
- package/src/lib/smart-tree/tree-api/README.md +226 -226
- package/src/lib/view-context/value-api/README.md +226 -226
- package/smartbit4all-ng-client-3.2.16.tgz +0 -0
|
@@ -3670,6 +3670,15 @@ class SmartFormService {
|
|
|
3670
3670
|
constructor() {
|
|
3671
3671
|
this.emptyKey = 'e#m%p@t*y';
|
|
3672
3672
|
this.group = {};
|
|
3673
|
+
this.regexRegexChars = new RegExp(/[\.\-\[\]\/\{\}\(\)\+\^\$\\\|]/g);
|
|
3674
|
+
this.regexAsteriskInTheMiddle = new RegExp(/([^\*])\*([^\*])/g);
|
|
3675
|
+
this.regexAsteriskInTheEnd = new RegExp(/([^\*])\*$/g);
|
|
3676
|
+
this.regexAsteriskInTheBeginning = new RegExp(/^\*([^\*])/g);
|
|
3677
|
+
this.regexAsteriskOnly = new RegExp(/^\*$/g);
|
|
3678
|
+
this.regexDoubleAsteriskWithDot = new RegExp(/\*\*\\\./g);
|
|
3679
|
+
this.regexDoubleAsterisk = new RegExp(/\*\*/g);
|
|
3680
|
+
this.regexQuestionMark = new RegExp(/\?/g);
|
|
3681
|
+
this.regexByPattern = new Map();
|
|
3673
3682
|
}
|
|
3674
3683
|
getSmartFormWidgetByKey(key) {
|
|
3675
3684
|
return this.findSmartFormWidgetByKey(this.smartForm?.widgets, key);
|
|
@@ -4059,10 +4068,41 @@ class SmartFormService {
|
|
|
4059
4068
|
}
|
|
4060
4069
|
applyComponentConstraints(widgets, constraints) {
|
|
4061
4070
|
widgets.forEach((widget) => {
|
|
4062
|
-
let
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4071
|
+
let widgetConstraints = constraints?.filter(
|
|
4072
|
+
//(constraint: SmartFormComponentConstraint) => constraint.dataName === widget.key
|
|
4073
|
+
(constraint) => this.antPathMatcher(constraint.dataName, widget.key));
|
|
4074
|
+
if (widgetConstraints && widgetConstraints.length) {
|
|
4075
|
+
widgetConstraints.forEach((constraint) => {
|
|
4076
|
+
if (constraint.visible === undefined) {
|
|
4077
|
+
if (widget.isVisible === undefined) {
|
|
4078
|
+
widget.isVisible = true;
|
|
4079
|
+
}
|
|
4080
|
+
}
|
|
4081
|
+
else {
|
|
4082
|
+
widget.isVisible = constraint.visible;
|
|
4083
|
+
}
|
|
4084
|
+
if (constraint.mandatory !== undefined && constraint.mandatory) {
|
|
4085
|
+
if (widget.type !== SmartFormWidgetType.INDICATOR &&
|
|
4086
|
+
widget.type !== SmartFormWidgetType.LABEL &&
|
|
4087
|
+
widget.type !== SmartFormWidgetType.CONTAINER &&
|
|
4088
|
+
widget.type !== SmartFormWidgetType.IMAGE &&
|
|
4089
|
+
widget.type !== SmartFormWidgetType.FILE_UPLOADER &&
|
|
4090
|
+
widget.type !== SmartFormWidgetType.DIVIDER &&
|
|
4091
|
+
widget.type !== SmartFormWidgetType.BUTTON &&
|
|
4092
|
+
widget.type !== SmartFormWidgetType.COMPONENT &&
|
|
4093
|
+
widget.type !== SmartFormWidgetType.YOUTUBE_PLAYER) {
|
|
4094
|
+
widget.validators = [
|
|
4095
|
+
...(widget.validators ?? []),
|
|
4096
|
+
{
|
|
4097
|
+
validator: Validators.required,
|
|
4098
|
+
isCustom: false,
|
|
4099
|
+
errorMessage: '',
|
|
4100
|
+
name: 'required',
|
|
4101
|
+
},
|
|
4102
|
+
];
|
|
4103
|
+
this.removeEmptyItemFromValueList(widget);
|
|
4104
|
+
}
|
|
4105
|
+
}
|
|
4066
4106
|
if (widget.type !== SmartFormWidgetType.INDICATOR &&
|
|
4067
4107
|
widget.type !== SmartFormWidgetType.LABEL &&
|
|
4068
4108
|
widget.type !== SmartFormWidgetType.CONTAINER &&
|
|
@@ -4072,29 +4112,16 @@ class SmartFormService {
|
|
|
4072
4112
|
widget.type !== SmartFormWidgetType.BUTTON &&
|
|
4073
4113
|
widget.type !== SmartFormWidgetType.COMPONENT &&
|
|
4074
4114
|
widget.type !== SmartFormWidgetType.YOUTUBE_PLAYER) {
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
];
|
|
4084
|
-
this.removeEmptyItemFromValueList(widget);
|
|
4115
|
+
if (constraint.enabled === undefined) {
|
|
4116
|
+
if (widget.isDisabled === undefined) {
|
|
4117
|
+
widget.isDisabled = false;
|
|
4118
|
+
}
|
|
4119
|
+
}
|
|
4120
|
+
else {
|
|
4121
|
+
widget.isDisabled = !constraint.enabled;
|
|
4122
|
+
}
|
|
4085
4123
|
}
|
|
4086
|
-
}
|
|
4087
|
-
if (widget.type !== SmartFormWidgetType.INDICATOR &&
|
|
4088
|
-
widget.type !== SmartFormWidgetType.LABEL &&
|
|
4089
|
-
widget.type !== SmartFormWidgetType.CONTAINER &&
|
|
4090
|
-
widget.type !== SmartFormWidgetType.IMAGE &&
|
|
4091
|
-
widget.type !== SmartFormWidgetType.FILE_UPLOADER &&
|
|
4092
|
-
widget.type !== SmartFormWidgetType.DIVIDER &&
|
|
4093
|
-
widget.type !== SmartFormWidgetType.BUTTON &&
|
|
4094
|
-
widget.type !== SmartFormWidgetType.COMPONENT &&
|
|
4095
|
-
widget.type !== SmartFormWidgetType.YOUTUBE_PLAYER) {
|
|
4096
|
-
widget.isDisabled = constraint[0].enabled === undefined ? false : !constraint[0].enabled;
|
|
4097
|
-
}
|
|
4124
|
+
});
|
|
4098
4125
|
}
|
|
4099
4126
|
if (widget.type === SmartFormWidgetType.CONTAINER &&
|
|
4100
4127
|
widget.valueList &&
|
|
@@ -4103,6 +4130,34 @@ class SmartFormService {
|
|
|
4103
4130
|
}
|
|
4104
4131
|
});
|
|
4105
4132
|
}
|
|
4133
|
+
antPathMatcher(pattern, path) {
|
|
4134
|
+
if (!pattern || !path) {
|
|
4135
|
+
// empty pattern or path -> not evaluated, true or false?
|
|
4136
|
+
return false;
|
|
4137
|
+
}
|
|
4138
|
+
let regex = this.regexByPattern.get(pattern);
|
|
4139
|
+
if (regex === undefined) {
|
|
4140
|
+
// escape regex characters except for ?, *, **
|
|
4141
|
+
let regexPattern = pattern.replace(this.regexRegexChars, '\\$&');
|
|
4142
|
+
// replace ant-style wildcards with regex equivalents
|
|
4143
|
+
// replace * with a pattern that matches any character except for '.'
|
|
4144
|
+
regexPattern = regexPattern.replace(this.regexAsteriskInTheMiddle, '$1[^.]*$2'); // not* * not*
|
|
4145
|
+
regexPattern = regexPattern.replace(this.regexAsteriskInTheEnd, '$1[^.]*'); // not* * EOL
|
|
4146
|
+
regexPattern = regexPattern.replace(this.regexAsteriskInTheBeginning, '[^.]*$1'); // BOL * not*
|
|
4147
|
+
regexPattern = regexPattern.replace(this.regexAsteriskOnly, '[^.]*'); // BOL * EOL
|
|
4148
|
+
// replace ** with a pattern that matches any character including '.'
|
|
4149
|
+
regexPattern = regexPattern.replace(this.regexDoubleAsteriskWithDot, '.*'); // **.
|
|
4150
|
+
regexPattern = regexPattern.replace(this.regexDoubleAsterisk, '.*'); // **
|
|
4151
|
+
// replace ? with a single character matcher
|
|
4152
|
+
regexPattern = regexPattern.replace(this.regexQuestionMark, '.');
|
|
4153
|
+
console.log(pattern, regexPattern);
|
|
4154
|
+
// create a RegExp object
|
|
4155
|
+
regex = new RegExp('^' + regexPattern + '$');
|
|
4156
|
+
this.regexByPattern.set(pattern, regex);
|
|
4157
|
+
}
|
|
4158
|
+
// test the path against the generated regex
|
|
4159
|
+
return regex.test(path);
|
|
4160
|
+
}
|
|
4106
4161
|
applyConstraints() {
|
|
4107
4162
|
if (this.smartForm.componentModel?.constraints &&
|
|
4108
4163
|
this.smartForm.componentModel?.constraints.length) {
|
|
@@ -7721,6 +7776,7 @@ class UiActionFileUploadDialogComponent {
|
|
|
7721
7776
|
constructor(service, manager) {
|
|
7722
7777
|
this.service = service;
|
|
7723
7778
|
this.manager = manager;
|
|
7779
|
+
this.maxSizeMb = 25;
|
|
7724
7780
|
this.code = this.service.action.code;
|
|
7725
7781
|
this.setUp();
|
|
7726
7782
|
}
|