@smartbit4all/ng-client 1.0.8 → 1.0.11
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/view-context/api/model/componentModel.mjs +1 -12
- package/esm2020/lib/view-context/api/model/models.mjs +2 -1
- package/esm2020/lib/view-context/api/model/uiActionRequest.mjs +1 -1
- package/esm2020/lib/view-context/api/model/valueSet.mjs +2 -0
- package/esm2020/lib/view-context/api/model/view.mjs +1 -1
- package/esm2020/lib/view-context/property-definition-data.mjs +2 -0
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.mjs +21 -18
- package/esm2020/lib/view-context/smart-ui-action/ui-action.descriptor.service.mjs +26 -30
- package/esm2020/lib/view-context/value-api/api/api.mjs +4 -0
- package/esm2020/lib/view-context/value-api/api/value.service.mjs +138 -0
- package/esm2020/lib/view-context/value-api/api.module.mjs +8 -8
- package/esm2020/lib/view-context/value-api/configuration.mjs +2 -2
- package/esm2020/lib/view-context/value-api/encoder.mjs +19 -0
- package/esm2020/lib/view-context/value-api/index.mjs +7 -6
- package/esm2020/lib/view-context/value-api/model/models.mjs +9 -2
- package/esm2020/lib/view-context/value-api/model/value.mjs +13 -0
- package/esm2020/lib/view-context/value-api/model/valueSetData.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinition.mjs +2 -0
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionData.mjs +2 -0
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionKind.mjs +23 -0
- package/esm2020/lib/view-context/value-api/model/valueSetExpression.mjs +2 -0
- package/esm2020/lib/view-context/value-api/model/valueSetOperand.mjs +2 -0
- package/esm2020/lib/view-context/value-api/model/valueSetOperation.mjs +18 -0
- package/fesm2015/smartbit4all-ng-client.mjs +39 -39
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +38 -51
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/view-context/api/model/componentModel.d.ts +7 -3
- package/lib/view-context/api/model/models.d.ts +1 -0
- package/lib/view-context/api/model/uiActionRequest.d.ts +1 -0
- package/lib/view-context/api/model/valueSet.d.ts +20 -0
- package/lib/view-context/api/model/view.d.ts +4 -0
- package/lib/view-context/property-definition-data.d.ts +5 -0
- package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.d.ts +7 -6
- package/lib/view-context/smart-ui-action/ui-action.descriptor.service.d.ts +4 -4
- package/lib/view-context/value-api/api/api.d.ts +3 -0
- package/lib/view-context/value-api/api/value.service.d.ts +35 -0
- package/lib/view-context/value-api/api.module.d.ts +3 -3
- package/lib/view-context/value-api/encoder.d.ts +11 -0
- package/lib/view-context/value-api/index.d.ts +6 -5
- package/lib/view-context/value-api/model/models.d.ts +8 -1
- package/lib/view-context/value-api/model/value.d.ts +29 -0
- package/lib/view-context/value-api/model/valueSetData.d.ts +4 -2
- package/lib/view-context/value-api/model/valueSetDefinition.d.ts +16 -0
- package/lib/view-context/value-api/model/valueSetDefinitionData.d.ts +55 -0
- package/lib/view-context/value-api/model/valueSetDefinitionKind.d.ts +23 -0
- package/lib/view-context/value-api/model/valueSetExpression.d.ts +20 -0
- package/lib/view-context/value-api/model/valueSetOperand.d.ts +25 -0
- package/lib/view-context/value-api/model/valueSetOperation.d.ts +18 -0
- package/package.json +1 -1
- package/smartbit4all-ng-client-1.0.11.tgz +0 -0
- package/smartbit4all-ng-client-1.0.8.tgz +0 -0
|
@@ -1592,18 +1592,6 @@ const CloseResult = {
|
|
|
1592
1592
|
* Do not edit the class manually.
|
|
1593
1593
|
*/
|
|
1594
1594
|
|
|
1595
|
-
/**
|
|
1596
|
-
* View API
|
|
1597
|
-
* View API
|
|
1598
|
-
*
|
|
1599
|
-
* The version of the OpenAPI document: 1.0.0
|
|
1600
|
-
* Contact: info@it4all.hu
|
|
1601
|
-
*
|
|
1602
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1603
|
-
* https://openapi-generator.tech
|
|
1604
|
-
* Do not edit the class manually.
|
|
1605
|
-
*/
|
|
1606
|
-
|
|
1607
1595
|
/**
|
|
1608
1596
|
* View API
|
|
1609
1597
|
* View API
|
|
@@ -2925,27 +2913,27 @@ class UiActionDescriptorService {
|
|
|
2925
2913
|
this.viewContext = viewContext;
|
|
2926
2914
|
this._destroy$ = new Subject();
|
|
2927
2915
|
this.languageChanged = new Subject();
|
|
2928
|
-
this.keysToTranslate = [
|
|
2916
|
+
this.keysToTranslate = ['title', 'text', 'placeholder', 'caption', 'feedbackText'];
|
|
2929
2917
|
this.basicActionDescriptors = new Map([
|
|
2930
2918
|
[
|
|
2931
|
-
|
|
2919
|
+
'UNKOWN',
|
|
2932
2920
|
{
|
|
2933
|
-
title:
|
|
2921
|
+
title: '',
|
|
2934
2922
|
type: UiActionButtonType.Normal,
|
|
2935
|
-
color:
|
|
2936
|
-
icon:
|
|
2923
|
+
color: 'accent',
|
|
2924
|
+
icon: 'Question',
|
|
2937
2925
|
iconColor: `text-primary`,
|
|
2938
2926
|
iconPosition: UiActionButtonIconPos.Post,
|
|
2939
2927
|
dialog: {
|
|
2940
|
-
title:
|
|
2941
|
-
placeholder:
|
|
2928
|
+
title: '',
|
|
2929
|
+
placeholder: 'placeholder',
|
|
2942
2930
|
actionButton: {
|
|
2943
|
-
caption:
|
|
2944
|
-
color:
|
|
2931
|
+
caption: '',
|
|
2932
|
+
color: 'accent',
|
|
2945
2933
|
},
|
|
2946
2934
|
cancelButton: {
|
|
2947
|
-
caption:
|
|
2948
|
-
color:
|
|
2935
|
+
caption: 'Mégse',
|
|
2936
|
+
color: '',
|
|
2949
2937
|
},
|
|
2950
2938
|
},
|
|
2951
2939
|
},
|
|
@@ -2955,9 +2943,7 @@ class UiActionDescriptorService {
|
|
|
2955
2943
|
this.subscribeToTranslateService();
|
|
2956
2944
|
}
|
|
2957
2945
|
else {
|
|
2958
|
-
this.viewContext.translateServiceChanged
|
|
2959
|
-
.pipe(takeUntil(this._destroy$))
|
|
2960
|
-
.subscribe(() => {
|
|
2946
|
+
this.viewContext.translateServiceChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
2961
2947
|
this.subscribeToTranslateService();
|
|
2962
2948
|
});
|
|
2963
2949
|
}
|
|
@@ -2967,9 +2953,7 @@ class UiActionDescriptorService {
|
|
|
2967
2953
|
this._destroy$.complete();
|
|
2968
2954
|
}
|
|
2969
2955
|
subscribeToTranslateService() {
|
|
2970
|
-
this.viewContext
|
|
2971
|
-
.translateService.onLangChange.pipe(takeUntil(this._destroy$))
|
|
2972
|
-
.subscribe(() => {
|
|
2956
|
+
this.viewContext.translateService.onLangChange.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
2973
2957
|
this.languageChanged.next();
|
|
2974
2958
|
});
|
|
2975
2959
|
}
|
|
@@ -2978,11 +2962,11 @@ class UiActionDescriptorService {
|
|
|
2978
2962
|
let actionDescriptorFromDescriptors = this.viewContext.getActionDescriptors()?.get(code);
|
|
2979
2963
|
let actionDescriptor = JSON.parse(JSON.stringify(actionDescriptorFromDescriptors));
|
|
2980
2964
|
if (!actionDescriptor) {
|
|
2981
|
-
actionDescriptor = this.basicActionDescriptors.get(
|
|
2965
|
+
actionDescriptor = this.basicActionDescriptors.get('UNKOWN');
|
|
2982
2966
|
actionDescriptor.title = code;
|
|
2983
2967
|
}
|
|
2984
2968
|
if (!actionDescriptor.dialog) {
|
|
2985
|
-
actionDescriptor = this.setUpUnkownDialogDescriptor(code, actionDescriptor,
|
|
2969
|
+
actionDescriptor = this.setUpUnkownDialogDescriptor(code, actionDescriptor, 'dialog');
|
|
2986
2970
|
}
|
|
2987
2971
|
if (!actionDescriptor.feedbackType && uiAction.submit) {
|
|
2988
2972
|
actionDescriptor.feedbackType = UiActionFeedbackType.Snackbar;
|
|
@@ -2997,22 +2981,22 @@ class UiActionDescriptorService {
|
|
|
2997
2981
|
return uiActionDescriptor;
|
|
2998
2982
|
}
|
|
2999
2983
|
async deepTranslate(model) {
|
|
3000
|
-
Object.keys(model).map(async (key) => {
|
|
2984
|
+
await Promise.all(Object.keys(model).map(async (key) => {
|
|
3001
2985
|
if (model[key] !== undefined &&
|
|
3002
|
-
typeof model[key] ===
|
|
2986
|
+
typeof model[key] === 'string' &&
|
|
3003
2987
|
model[key].length &&
|
|
3004
2988
|
this.keysToTranslate.includes(key)) {
|
|
3005
2989
|
model[key] = await this.viewContext.translateService.get(model[key]).toPromise();
|
|
3006
2990
|
}
|
|
3007
|
-
else if (model[key] !== undefined && typeof model[key] ===
|
|
2991
|
+
else if (model[key] !== undefined && typeof model[key] === 'object') {
|
|
3008
2992
|
model[key] = await this.deepTranslate(model[key]);
|
|
3009
2993
|
}
|
|
3010
2994
|
return model;
|
|
3011
|
-
});
|
|
2995
|
+
}));
|
|
3012
2996
|
return model;
|
|
3013
2997
|
}
|
|
3014
2998
|
setUpUnkownDialogDescriptor(code, uiActionDescriptor, dialogType) {
|
|
3015
|
-
let unkownDescriptor = this.basicActionDescriptors.get(
|
|
2999
|
+
let unkownDescriptor = this.basicActionDescriptors.get('UNKOWN');
|
|
3016
3000
|
uiActionDescriptor[dialogType] = unkownDescriptor.dialog;
|
|
3017
3001
|
uiActionDescriptor[dialogType].title = code;
|
|
3018
3002
|
uiActionDescriptor[dialogType].actionButton.caption = code;
|
|
@@ -3020,11 +3004,11 @@ class UiActionDescriptorService {
|
|
|
3020
3004
|
}
|
|
3021
3005
|
}
|
|
3022
3006
|
UiActionDescriptorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionDescriptorService, deps: [{ token: SmartViewContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3023
|
-
UiActionDescriptorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionDescriptorService, providedIn:
|
|
3007
|
+
UiActionDescriptorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionDescriptorService, providedIn: 'root' });
|
|
3024
3008
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionDescriptorService, decorators: [{
|
|
3025
3009
|
type: Injectable,
|
|
3026
3010
|
args: [{
|
|
3027
|
-
providedIn:
|
|
3011
|
+
providedIn: 'root',
|
|
3028
3012
|
}]
|
|
3029
3013
|
}], ctorParameters: function () { return [{ type: SmartViewContextService }]; } });
|
|
3030
3014
|
|
|
@@ -3157,13 +3141,16 @@ class UiActionInputDialogComponent {
|
|
|
3157
3141
|
this.dialogType = this.service.inputTypeName;
|
|
3158
3142
|
}
|
|
3159
3143
|
else {
|
|
3160
|
-
this.dialogType = this.descriptor.inputDialog ?
|
|
3144
|
+
this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
|
|
3161
3145
|
}
|
|
3162
3146
|
this.constructForm();
|
|
3163
3147
|
}
|
|
3164
3148
|
getTitle() {
|
|
3165
3149
|
return this.descriptor[this.dialogType].title;
|
|
3166
3150
|
}
|
|
3151
|
+
getText() {
|
|
3152
|
+
return this.descriptor[this.dialogType].text ?? '';
|
|
3153
|
+
}
|
|
3167
3154
|
getActionButtonLabel() {
|
|
3168
3155
|
return this.descriptor[this.dialogType].actionButton.caption;
|
|
3169
3156
|
}
|
|
@@ -3179,17 +3166,17 @@ class UiActionInputDialogComponent {
|
|
|
3179
3166
|
constructForm() {
|
|
3180
3167
|
let model = {};
|
|
3181
3168
|
let inputName;
|
|
3182
|
-
if (this.service.inputTypeName ===
|
|
3183
|
-
inputName =
|
|
3169
|
+
if (this.service.inputTypeName === 'inputDialog') {
|
|
3170
|
+
inputName = 'input';
|
|
3184
3171
|
}
|
|
3185
3172
|
else {
|
|
3186
|
-
inputName =
|
|
3173
|
+
inputName = 'input2';
|
|
3187
3174
|
}
|
|
3188
3175
|
if (this.service.nodeName) {
|
|
3189
3176
|
model[inputName] = this.service.nodeName;
|
|
3190
3177
|
}
|
|
3191
3178
|
else {
|
|
3192
|
-
model[inputName] =
|
|
3179
|
+
model[inputName] = '';
|
|
3193
3180
|
}
|
|
3194
3181
|
let type;
|
|
3195
3182
|
let inputType = `${inputName}Type`;
|
|
@@ -3205,17 +3192,17 @@ class UiActionInputDialogComponent {
|
|
|
3205
3192
|
widgets: [
|
|
3206
3193
|
{
|
|
3207
3194
|
key: inputName,
|
|
3208
|
-
label:
|
|
3195
|
+
label: '',
|
|
3209
3196
|
type,
|
|
3210
|
-
value:
|
|
3197
|
+
value: '',
|
|
3211
3198
|
validators: [
|
|
3212
3199
|
{
|
|
3213
3200
|
validator: Validators.required,
|
|
3214
3201
|
name: SmartValidatorName.required,
|
|
3215
|
-
errorMessage:
|
|
3202
|
+
errorMessage: 'Ez a mező kötelező',
|
|
3216
3203
|
},
|
|
3217
3204
|
],
|
|
3218
|
-
placeholder: this.descriptor[this.dialogType].placeholder ??
|
|
3205
|
+
placeholder: this.descriptor[this.dialogType].placeholder ?? '',
|
|
3219
3206
|
showLabel: true,
|
|
3220
3207
|
},
|
|
3221
3208
|
],
|
|
@@ -3224,7 +3211,7 @@ class UiActionInputDialogComponent {
|
|
|
3224
3211
|
save() {
|
|
3225
3212
|
let form = this.folderFormChild.submitForm();
|
|
3226
3213
|
if (form.invalidFields) {
|
|
3227
|
-
throw new Error(
|
|
3214
|
+
throw new Error('The form is invalid!');
|
|
3228
3215
|
}
|
|
3229
3216
|
this.service.onSave(form.model);
|
|
3230
3217
|
}
|
|
@@ -3233,13 +3220,13 @@ class UiActionInputDialogComponent {
|
|
|
3233
3220
|
}
|
|
3234
3221
|
}
|
|
3235
3222
|
UiActionInputDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogComponent, deps: [{ token: UiActionInputDialogService }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3236
|
-
UiActionInputDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionInputDialogComponent, selector: "smart-ui-action-input-dialog", viewQueries: [{ propertyName: "folderFormChild", first: true, predicate: ["form"], descendants: true }], ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\n\t<div class=\"headerContainer\">\n\t\t<h3 class=\"color-accent-700\">\n\t\t\t{{ getTitle() }}\n\t\t</h3>\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n\t\t</button>\n\t</div>\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\n\t<div class=\"folderNameDialogButtonsContainer\">\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n\t\t\t{{ getCancelButtonLabel() }}\n\t\t</button>\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\n\t\t\t{{ getActionButtonLabel() }}\n\t\t</button>\n\t</div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$1.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5$1.SmartformComponent, selector: "smartform", inputs: ["smartForm"] }] });
|
|
3223
|
+
UiActionInputDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UiActionInputDialogComponent, selector: "smart-ui-action-input-dialog", viewQueries: [{ propertyName: "folderFormChild", first: true, predicate: ["form"], descendants: true }], ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\n\t<div class=\"headerContainer\">\n\t\t<h3 class=\"color-accent-700\">\n\t\t\t{{ getTitle() }}\n\t\t</h3>\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n\t\t</button>\n\t</div>\n\t<p>\n\t\t{{ getText() }}\n\t</p>\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\n\t<div class=\"folderNameDialogButtonsContainer\">\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n\t\t\t{{ getCancelButtonLabel() }}\n\t\t</button>\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\n\t\t\t{{ getActionButtonLabel() }}\n\t\t</button>\n\t</div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4$1.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5$1.SmartformComponent, selector: "smartform", inputs: ["smartForm"] }] });
|
|
3237
3224
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogComponent, decorators: [{
|
|
3238
3225
|
type: Component,
|
|
3239
|
-
args: [{ selector:
|
|
3226
|
+
args: [{ selector: 'smart-ui-action-input-dialog', template: "<div class=\"folderNameDialogContainer\">\n\t<div class=\"headerContainer\">\n\t\t<h3 class=\"color-accent-700\">\n\t\t\t{{ getTitle() }}\n\t\t</h3>\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\n\t\t</button>\n\t</div>\n\t<p>\n\t\t{{ getText() }}\n\t</p>\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\n\t<div class=\"folderNameDialogButtonsContainer\">\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\n\t\t\t{{ getCancelButtonLabel() }}\n\t\t</button>\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\n\t\t\t{{ getActionButtonLabel() }}\n\t\t</button>\n\t</div>\n</div>\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
|
|
3240
3227
|
}], ctorParameters: function () { return [{ type: UiActionInputDialogService }, { type: UiActionDescriptorService }]; }, propDecorators: { folderFormChild: [{
|
|
3241
3228
|
type: ViewChild,
|
|
3242
|
-
args: [
|
|
3229
|
+
args: ['form']
|
|
3243
3230
|
}] } });
|
|
3244
3231
|
|
|
3245
3232
|
class UiActionInputDialogService extends SmartdialogService {
|