@smartbit4all/ng-client 3.3.49 → 3.3.51
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/session/api/api/session.service.mjs +1 -1
- package/esm2020/lib/session/api/encoder.mjs +1 -1
- package/esm2020/lib/session/api/model/accountInfo.mjs +1 -1
- package/esm2020/lib/session/api/model/apiError.mjs +1 -1
- package/esm2020/lib/session/api/model/authenticationProviderData.mjs +1 -1
- package/esm2020/lib/session/api/model/getAuthenticationProvidersResponse.mjs +1 -1
- package/esm2020/lib/session/api/model/models.mjs +1 -1
- package/esm2020/lib/session/api/model/refreshSessionRequest.mjs +1 -1
- package/esm2020/lib/session/api/model/session.mjs +1 -1
- package/esm2020/lib/session/api/model/sessionInfoData.mjs +1 -1
- package/esm2020/lib/session/api/model/userActivityLog.mjs +1 -1
- package/esm2020/lib/session/api/param.mjs +1 -1
- package/esm2020/lib/session/api/variables.mjs +1 -1
- package/esm2020/lib/shared/shared.module.mjs +1 -1
- package/esm2020/lib/shared/smart-tooltip.directive.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/api/api.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/api/default.service.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/api.module.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/configuration.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/encoder.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/index.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/componentType.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/componentWidgetType.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/layoutDirection.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/models.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/smartComponentLayoutDefinition.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/model/smartComponentWidgetDefinition.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/param.mjs +1 -1
- package/esm2020/lib/smart-component-layout/api/variables.mjs +1 -1
- package/esm2020/lib/smart-component-layout/smart-component-layout.component.mjs +2 -2
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBoolOperator.mjs +6 -5
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderField.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderGroup.mjs +8 -9
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionBuilderModel.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionData.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionDataType.mjs +9 -8
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionField.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldList.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.mjs +15 -14
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionList.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperandData.mjs +1 -1
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOperation.mjs +21 -20
- package/esm2020/lib/smart-filter/api/filter/model/filterExpressionOrderBy.mjs +7 -8
- package/esm2020/lib/smart-filter/smart-filter/components/smart-filter-simple/components/smart-filter-simple-field/smart-filter-simple-field.component.mjs +11 -10
- package/esm2020/lib/smart-filter-editor/api/model/filterExpressionOrderBy.mjs +19 -0
- package/esm2020/lib/smart-filter-editor/smart-filter-editor-content/smart-filter-editor-content.component.mjs +8 -8
- package/esm2020/lib/smart-form/smartform.form-model.mjs +1 -1
- package/esm2020/lib/smart-form/widgets/smartformwidget/smartformwidget.component.mjs +3 -3
- package/esm2020/lib/smart-grid/api/grid-api/model/gridModel.mjs +1 -1
- package/esm2020/lib/smart-grid/api/grid-api/model/gridRow.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/smart-grid.component.mjs +2 -2
- 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/model/openPendingData.mjs +1 -1
- package/esm2020/lib/view-context/api/model/uiAction.mjs +1 -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/valueSetDefinition.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionIdentifier.mjs +1 -1
- package/esm2020/lib/view-context/value-api/model/valueSetOperand.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 +495 -473
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +1749 -1727
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-filter/api/filter/model/filterExpressionBoolOperator.d.ts +4 -5
- package/lib/smart-filter/api/filter/model/filterExpressionBuilderGroup.d.ts +5 -8
- package/lib/smart-filter/api/filter/model/filterExpressionBuilderModel.d.ts +6 -0
- package/lib/smart-filter/api/filter/model/filterExpressionDataType.d.ts +7 -8
- package/lib/smart-filter/api/filter/model/filterExpressionField.d.ts +3 -0
- package/lib/smart-filter/api/filter/model/filterExpressionFieldWidgetType.d.ts +13 -14
- package/lib/smart-filter/api/filter/model/filterExpressionOperation.d.ts +19 -20
- package/lib/smart-filter/api/filter/model/filterExpressionOrderBy.d.ts +4 -7
- package/lib/smart-filter-editor/api/model/filterExpressionOrderBy.d.ts +28 -0
- package/lib/smart-form/smartform.form-model.d.ts +2 -0
- package/lib/smart-grid/api/grid-api/model/gridUpdateData.d.ts +1 -1
- package/lib/smart-grid/api/grid-api/model/gridView.d.ts +1 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.51.tgz +0 -0
- package/src/lib/session/api/README.md +226 -226
- package/src/lib/smart-component-layout/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.3.49.tgz +0 -0
|
@@ -5310,10 +5310,10 @@ class SmartformwidgetComponent {
|
|
|
5310
5310
|
}
|
|
5311
5311
|
}
|
|
5312
5312
|
SmartformwidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartformwidgetComponent, deps: [{ token: SmartFormService }, { token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5313
|
-
SmartformwidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartformwidgetComponent, selector: "smartformwidget", inputs: { form: "form", widgetInstance: "widgetInstance", onBlur: "onBlur", onValueChange: "onValueChange", labelColor: "labelColor", sophisticatedValueChange: "sophisticatedValueChange" }, viewQueries: [{ propertyName: "chipInputChild", first: true, predicate: ["chipInput"], descendants: true }, { propertyName: "customComponentVcRef", first: true, predicate: ["customComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "dateInputChild", first: true, predicate: ["dateInput"], descendants: true }, { propertyName: "timeInputChild", first: true, predicate: ["timeInput"], descendants: true }], ngImport: i0, template: "<div class=\"container\" [formGroup]=\"form\">\r\n <div\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n class=\"container\"\r\n *ngIf=\"widgetInstance.isVisible === undefined ? true : widgetInstance.isVisible\"\r\n >\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CONTAINER\" [ngClass]=\"getDirection()\">\r\n <smartformwidget\r\n *ngFor=\"let widget of widgetInstance.valueList\"\r\n [form]=\"form\"\r\n [widgetInstance]=\"widget\"\r\n class=\"container-item\"\r\n [ngClass]=\"widget.cssClass ?? ''\"\r\n [onBlur]=\"onBlur\"\r\n [onValueChange]=\"onValueChange\"\r\n [sophisticatedValueChange]=\"sophisticatedValueChange\"\r\n class=\"{{ widget.key }}\"\r\n [labelColor]=\"labelColor\"\r\n ></smartformwidget>\r\n </div>\r\n\r\n <div\r\n (capsLock)=\"capsOn = $event\"\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input textField widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n\r\n <input\r\n *ngIf=\"!widgetInstance.selection\"\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n type=\"{{ widgetInstance.isPassword ? (hidePassword ? 'password' : 'text') : '' }}\"\r\n [mask]=\"widgetInstance.mask ?? ''\"\r\n (keydown.enter)=\"onKeydown()\"\r\n maxlength=\"{{ widgetInstance.maxLength }}\"\r\n />\r\n <input\r\n *ngIf=\"widgetInstance.selection\"\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n type=\"{{ widgetInstance.isPassword ? 'password' : '' }}\"\r\n [matAutocomplete]=\"textFieldAuto\"\r\n (keydown.enter)=\"onKeydown()\"\r\n />\r\n <button\r\n *ngIf=\"widgetInstance.isPassword\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"togglePasswordVisibility($event)\"\r\n >\r\n <mat-icon>{{ hidePassword ? 'visibility_off' : 'visibility' }}</mat-icon>\r\n </button>\r\n <mat-autocomplete #textFieldAuto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.label\">\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <span class=\"mat-error\" *ngIf=\"capsOn && widgetInstance.isPassword\">\r\n {{ widgetInstance.capsLockWarning }}\r\n </span>\r\n\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n\r\n <span matPrefix>\r\n <smart-icon\r\n *ngIf=\"capsOn && widgetInstance.isPassword\"\r\n [icon]=\"widgetInstance.capsLockWarningIcon ?? 'keyboard_capslock'\"\r\n color=\"warn\"\r\n ></smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.icon && widgetInstance.iconPosition === 'PRE'\"\r\n [icon]=\"widgetInstance.icon\"\r\n [color]=\"widgetInstance.iconColor ?? 'primary'\"\r\n ></smart-icon>\r\n {{ widgetInstance.prefix }}\r\n </span>\r\n <span matSuffix>\r\n {{ widgetInstance.suffix }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.icon &&\r\n (!widgetInstance.iconPosition || widgetInstance.iconPosition === 'POST')\r\n \"\r\n [icon]=\"widgetInstance.icon\"\r\n [color]=\"widgetInstance.iconColor ?? 'primary'\"\r\n matSuffix\r\n ></smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <button\r\n *ngIf=\"widgetInstance.textFieldButton\"\r\n matSuffix\r\n mat-button\r\n color=\"{{ widgetInstance.textFieldButton.color }}\"\r\n (click)=\"widgetInstance.textFieldButton.callback(widgetInstance)\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().PRE && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n [color]=\"widgetInstance.textFieldButton.iconColor\"\r\n >\r\n </smart-icon>\r\n {{ widgetInstance.textFieldButton.label }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().POST && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n </button>\r\n <mat-hint\r\n *ngIf=\"widgetInstance.showCharacterLimitSuffix && widgetInstance.maxLength\"\r\n matSuffix\r\n align=\"end\"\r\n >{{ widgetInstance.maxLength - form.controls[widgetInstance.key].value.length }}</mat-hint\r\n >\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD_NUMBER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input textField widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <input\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n type=\"number\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [min]=\"widgetInstance.minValues ?? null\"\r\n [max]=\"widgetInstance.maxValues ?? null\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <span matPrefix>\r\n {{ widgetInstance.prefix }}\r\n </span>\r\n <span matSuffix>\r\n {{ widgetInstance.suffix }}\r\n </span>\r\n <smart-icon *ngIf=\"widgetInstance.icon\" [icon]=\"widgetInstance.icon\" matSuffix>\r\n </smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <button\r\n *ngIf=\"widgetInstance.textFieldButton\"\r\n matSuffix\r\n mat-button\r\n color=\"{{ widgetInstance.textFieldButton.color }}\"\r\n (click)=\"widgetInstance.textFieldButton.callback(widgetInstance)\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().PRE && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n {{ widgetInstance.textFieldButton.label }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().POST && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD_CHIPS\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-chip-list #chipList aria-label=\"{{ widgetInstance.label }}\">\r\n <mat-chip\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n *ngFor=\"let value of widgetInstance.value\"\r\n (removed)=\"remove(value)\"\r\n >\r\n {{ value }}\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <input\r\n #chipInput\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matChipInputFor]=\"chipList\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\r\n [matChipInputAddOnBlur]=\"addOnBlur\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n [matAutocomplete]=\"chipAuto\"\r\n (matChipInputTokenEnd)=\"add($event)\"\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n />\r\n <mat-autocomplete\r\n #chipAuto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event, widgetInstance)\"\r\n >\r\n <mat-option\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n *ngFor=\"let item of widgetInstance.valueList\"\r\n [value]=\"item.value\"\r\n >\r\n {{ item.label }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-chip-list>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_BOX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <textarea\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n maxlength=\"{{ widgetInstance.maxLength }}\"\r\n ></textarea>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint\r\n *ngIf=\"widgetInstance.showCharacterLimitSuffix && widgetInstance.maxLength\"\r\n matSuffix\r\n align=\"end\"\r\n >{{ widgetInstance.maxLength - form.controls[widgetInstance.key].value.length }}</mat-hint\r\n >\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance.hint || widgetInstance.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CHECK_BOX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div\r\n class=\"input checkbox widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <section class=\"checkbox-section\" [ngClass]=\"getDirection()\">\r\n <div\r\n class=\"checkbox-item-container\"\r\n *ngFor=\"let checkbox of widgetInstance.valueList; let i = index\"\r\n >\r\n <img\r\n *ngIf=\"checkbox.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"checkbox-item-image\"\r\n [src]=\"checkbox.imageUrl\"\r\n />\r\n <mat-checkbox\r\n class=\"selecatbleObject\"\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n [ngModel]=\"checkbox.value\"\r\n (change)=\"onValueChange?.next(checkbox)\"\r\n >\r\n {{ checkbox.label }}\r\n </mat-checkbox>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CHECK_BOX_2\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div\r\n class=\"input checkbox widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <section class=\"checkbox-section\" [ngClass]=\"getDirection()\">\r\n <div\r\n class=\"checkbox-item-container\"\r\n *ngFor=\"let checkbox of widgetInstance.valueList; let i = index\"\r\n >\r\n <img\r\n *ngIf=\"checkbox.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"checkbox-item-image\"\r\n [src]=\"checkbox.imageUrl\"\r\n />\r\n <mat-checkbox\r\n class=\"selecatbleObject\"\r\n formControlName=\"{{ widgetInstance.key + '.' + checkbox.key }}\"\r\n [value]=\"checkbox.value\"\r\n (change)=\"onValueChange?.next(checkbox)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n >\r\n {{ checkbox.label }}\r\n </mat-checkbox>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.RADIO_BUTTON\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-radio-group\r\n class=\"input radio-section widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n aria-label=\"{{ widgetInstance.label }}\"\r\n appearance=\"outline\"\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <div [ngClass]=\"getDirection()\">\r\n <div class=\"radio-item-container\" *ngFor=\"let radio of widgetInstance.valueList\">\r\n <img\r\n *ngIf=\"radio.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"radio-item-image\"\r\n [src]=\"radio.imageUrl\"\r\n />\r\n <mat-radio-button\r\n class=\"selecatbleObject\"\r\n value=\"{{ radio.value }}\"\r\n [ngClass]=\"getDirection()\"\r\n (change)=\"onValueChange?.next(radio.value)\"\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n >\r\n {{ radio.label }}\r\n </mat-radio-button>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </div>\r\n </mat-radio-group>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_PICKER\"\r\n class=\"datePicker widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent date\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker (closed)=\"onBlur?.next(widgetInstance)\"></mat-datepicker>\r\n <input\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n [min]=\"widgetInstance.minDate ?? null\"\r\n [max]=\"widgetInstance.maxDate ?? null\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n (dateChange)=\"onValueChange?.next(widgetInstance)\"\r\n [matDatepickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <!-- <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_TIME_PICKER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"$any(picker)\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker\r\n #picker\r\n [showSpinners]=\"true\"\r\n [showSeconds]=\"false\"\r\n [stepHour]=\"1\"\r\n [stepMinute]=\"1\"\r\n [stepSecond]=\"10\"\r\n [touchUi]=\"false\"\r\n [color]=\"'primary'\"\r\n [enableMeridian]=\"false\"\r\n [disableMinute]=\"false\"\r\n [hideTime]=\"false\"\r\n >\r\n </ngx-mat-datetime-picker>\r\n <input\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [ngxMatDatetimePicker]=\"picker\"\r\n [ngxMatDatetimePickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n </div> -->\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_TIME_PICKER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"dateTimePickerContainer\">\r\n <mat-form-field\r\n class=\"input widgetContent date\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker (closed)=\"onBlur?.next(widgetInstance)\"></mat-datepicker>\r\n <input\r\n #dateInput\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onDatePickerBlur($event)\"\r\n (dateChange)=\"onValueChange?.next(widgetInstance)\"\r\n [matDatepickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n <mat-form-field\r\n *ngIf=\"hasCreated\"\r\n class=\"input widgetContent time\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <input\r\n #timeInput\r\n [formControlName]=\"widgetInstance.key + '-time'\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'time'\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n (blur)=\"onTimePickerBlur($event)\"\r\n matInput\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.SELECT\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-select\r\n [formControlName]=\"widgetInstance.key\"\r\n (selectionChange)=\"onValueChange?.next($event.value)\"\r\n (closed)=\"onBlur?.next(widgetInstance)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n [compareWith]=\"\r\n widgetInstance.compareWith == null ? compareItems : widgetInstance.compareWith\r\n \"\r\n >\r\n <div *ngFor=\"let option of widgetInstance.valueList\">\r\n <mat-optgroup\r\n *ngIf=\"option.type === getType().ITEM_GROUP\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <mat-option\r\n *ngFor=\"let innerOption of option.valueList\"\r\n [value]=\"innerOption.value\"\r\n [disabled]=\"innerOption.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"innerOption.icon\"\r\n [icon]=\"innerOption.icon\"\r\n [color]=\"innerOption.iconColor\"\r\n ></smart-icon>\r\n {{ innerOption.label }}\r\n </mat-option>\r\n </mat-optgroup>\r\n <mat-option\r\n *ngIf=\"option.type === getType().ITEM\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"option.icon\"\r\n [icon]=\"option.icon\"\r\n [color]=\"option.iconColor\"\r\n ></smart-icon\r\n >{{ option.label }}</mat-option\r\n >\r\n </div>\r\n </mat-select>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.SELECT_MULTIPLE\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-select\r\n [formControlName]=\"widgetInstance.key\"\r\n multiple\r\n (selectionChange)=\"onValueChange?.next($event.value)\"\r\n (closed)=\"onBlur?.next(widgetInstance)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n [compareWith]=\"\r\n widgetInstance.compareWith == null ? compareItems : widgetInstance.compareWith\r\n \"\r\n >\r\n <div *ngFor=\"let option of widgetInstance.valueList\">\r\n <mat-optgroup\r\n *ngIf=\"option.type === getType().ITEM_GROUP\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <mat-option\r\n *ngFor=\"let innerOption of option.valueList\"\r\n [value]=\"innerOption.value\"\r\n [disabled]=\"innerOption.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"innerOption.icon\"\r\n [icon]=\"innerOption.icon\"\r\n [color]=\"innerOption.iconColor\"\r\n ></smart-icon\r\n >{{ innerOption.label }}</mat-option\r\n >\r\n </mat-optgroup>\r\n <mat-option\r\n *ngIf=\"option.type === getType().ITEM\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"option.icon\"\r\n [icon]=\"option.icon\"\r\n [color]=\"option.iconColor\"\r\n ></smart-icon\r\n >{{ option.label }}</mat-option\r\n >\r\n </div>\r\n </mat-select>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.LABEL\"\r\n class=\"label widgetContainer\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n >\r\n <div class=\"label-title labelContainer\" [ngClass]=\"widgetInstance.cssClass ?? ''\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <p>{{ widgetInstance.widgetDescription }}</p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TIME\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent time\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <input\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'time'\"\r\n [value]=\"getTime()\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TOGGLE\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <mat-slide-toggle\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n value=\"{{ widgetInstance.value }}\"\r\n (change)=\"onValueChange?.next($event)\"\r\n [labelPosition]=\"widgetInstance.toggleLabelPosition ?? 'before'\"\r\n >{{ !widgetInstance.showLabel ? widgetInstance.label : '' }}</mat-slide-toggle\r\n ><span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.INDICATOR\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"smartIndicator widgetContent\">\r\n <div class=\"indicatorItems\">\r\n <div\r\n *ngFor=\"let item of indicatorItems; let i = index\"\r\n class=\"indicatorItem\"\r\n [ngClass]=\"getIndicatorItemClass(i)\"\r\n ></div>\r\n </div>\r\n <p [ngClass]=\"getIndicatorStatusLabelColor()\">\r\n {{ getIndicatorStatusLabel() }}\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.FILE_UPLOADER\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <smartfileuploader\r\n class=\"widgetContent\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [fileFormats]=\"widgetInstance.fileFormats\"\r\n [maxSizeMb]=\"widgetInstance.maxSizeMb\"\r\n [i18n]=\"widgetInstance.i18n\"\r\n ></smartfileuploader>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.IMAGE\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <img\r\n class=\"widgetContent\"\r\n title=\"{{ widgetInstance.key }}\"\r\n [ngClass]=\"widgetInstance.imageCss ?? ''\"\r\n [src]=\"widgetInstance.value\"\r\n />\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.DIVIDER\" class=\"widgetContainer\">\r\n <hr class=\"smartDivider\" />\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.BUTTON\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"widgetContent\">\r\n <button\r\n mat-button\r\n [ngClass]=\"getButtonType(widgetInstance.uiActionDescriptor)\"\r\n [color]=\"widgetInstance.uiActionDescriptor?.color\"\r\n (click)=\"onButtonClicked(widgetInstance)\"\r\n >\r\n <div\r\n *ngIf=\"isOnlyIcon(widgetInstance.uiActionDescriptor); then iconOnly; else text\"\r\n ></div>\r\n <ng-template #iconOnly>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.uiActionDescriptor?.icon\"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n </ng-template>\r\n <ng-template #text>\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.uiActionDescriptor?.icon &&\r\n widgetInstance.uiActionDescriptor?.iconPosition === 'PRE'\r\n \"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n {{ widgetInstance.uiActionDescriptor?.title }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.uiActionDescriptor?.icon &&\r\n widgetInstance.uiActionDescriptor?.iconPosition === 'POST'\r\n \"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"widgetContainer\">\r\n <h4\r\n class=\"labelContainer\"\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.COMPONENT && widgetInstance.showLabel\"\r\n class=\"{{ labelColor }}\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"widgetContent\">\r\n <ng-template #customComponent></ng-template>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.RICH_TEXT\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <quill-editor\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [modules]=\"widgetInstance.quillModules\"\r\n [placeholder]=\"widgetInstance.placeholder\"\r\n [readOnly]=\"widgetInstance.isReadonly\"\r\n ></quill-editor>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint ||\r\n widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.SORTABLE\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <lib-sortable-widget\r\n [formControlName]=\"widgetInstance.key\"\r\n [widgetInstance]=\"widgetInstance\"\r\n ></lib-sortable-widget>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.MATRIX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n\r\n <table class=\"matrixTable widgetContent\">\r\n <tr>\r\n <th></th>\r\n <th class=\"optionLabel\" *ngFor=\"let option of widgetInstance.value.columns\">\r\n {{ option.displayValue }}\r\n </th>\r\n </tr>\r\n <tr *ngFor=\"let question of widgetInstance.value.rows; let i = index\">\r\n <th class=\"questionLabel\">\r\n <label>{{ question.displayValue }}</label>\r\n </th>\r\n\r\n <td class=\"selectTd\" *ngFor=\"let option of widgetInstance.value.columns; let j = index\">\r\n <mat-radio-group\r\n *ngIf=\"!widgetInstance.isMultiple\"\r\n [formControlName]=\"widgetInstance.key + '.' + question.code\"\r\n [name]=\"'q' + i\"\r\n >\r\n <mat-radio-button [value]=\"option.code\"> </mat-radio-button>\r\n </mat-radio-group>\r\n <div *ngIf=\"widgetInstance.isMultiple\">\r\n <mat-checkbox\r\n [formControlName]=\"widgetInstance.key + '.data.' + question.code + '.' + option.code\"\r\n [value]=\"widgetInstance.value['data'][question.code][option.code]\"\r\n [checked]=\"true\"\r\n ></mat-checkbox>\r\n </div>\r\n </td>\r\n <br />\r\n <button *ngIf=\"widgetInstance.button\" mat-icon-button (click)=\"removeMatrixRow(question)\"\r\n ><smart-icon icon=\"close\"></smart-icon\r\n ></button>\r\n </tr>\r\n </table>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.YOUTUBE_PLAYER\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <youtube-player\r\n videoId=\"{{ widgetInstance.videoId }}\"\r\n [width]=\"widgetInstance.width\"\r\n [height]=\"widgetInstance.height\"\r\n [startSeconds]=\"widgetInstance.startSeconds\"\r\n [endSeconds]=\"widgetInstance.endSeconds\"\r\n ></youtube-player>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.MONTH_PICKER\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <lib-smart-month-picker\r\n [widgetInstance]=\"widgetInstance\"\r\n (valueChange)=\"handleYearMonthPicked($event)\"\r\n ></lib-smart-month-picker>\r\n </div>\r\n</div>\r\n", styles: ["@import\"~quill/dist/quill.snow.css\";.checkbox-section,.radio-section{display:flex;flex-direction:column}.input{width:100%}.direction-col{display:flex;flex-direction:column;gap:.5em}.direction-row{display:flex;flex-direction:row;align-items:center;gap:.5em}.selecatbleObject{margin:.5em}.radioLabel{color:var(--primary-color);text-align:left!important}.container{height:100%}.input{height:100%;display:flex;flex-direction:column}.checkbox{flex-direction:column}.mat-form-field-wrapper{padding-bottom:0!important}.input .mat-standard-chip.mat-chip-with-trailing-icon{padding-right:12px}.time-picker{display:flex;flex-direction:row;height:100%;border:solid 2px lightgrey;padding:1em;border-radius:4px}.time-picker:hover{border-color:#000}::ng-deep .mat-h4 .mat-subheading-1 .mat-typography h4{margin:0}.label{margin:28px 0 8px}.smartIndicator{display:flex;flex-direction:column;gap:.25rem;width:-moz-fit-content;width:fit-content}.indicatorItems{display:flex;flex-direction:row;gap:.25rem}.indicatorItem{width:3rem;height:.25rem;background-color:#d3d3d3;border-radius:.5rem}.radio-error{width:-moz-fit-content;width:fit-content;display:flex;flex-direction:row;gap:.5rem}.mat-calendar-previous-button,.mat-calendar-next-button{padding:0;min-width:0;width:40px!important;height:40px!important;flex-shrink:0;line-height:40px;border-radius:50%}.mat-calendar-arrow{height:36px!important;display:flex!important;flex-direction:column!important;justify-content:center}.radio-item-container,.checkbox-item-container{display:flex;flex-direction:column}.widgetContent::ng-deep .ql-container{height:200px;width:460px}.dateTimePickerContainer{display:flex;flex-direction:row;gap:.25rem;max-width:225px}.date{width:125px}.time{width:90px}.date .mat-form-field-infix,.time .mat-form-field-infix{width:inherit!important}::ng-deep .mat-icon.mat-drag-indicator{--drag-indicator: #3b3b3b;color:var(--drag-indicator)}.matrixTable{width:100%;border-spacing:0 1rem}.matrixTable th{padding:.25rem}.matrixTable .optionLabel,.matrixTable td{text-align:center}.example-month-picker .mat-calendar-period-button{pointer-events:none}.example-month-picker .mat-calendar-arrow{display:none}\n"], components: [{ type: SmartformwidgetComponent, selector: "smartformwidget", inputs: ["form", "widgetInstance", "onBlur", "onValueChange", "labelColor", "sophisticatedValueChange"] }, { type: i3$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i3.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i9.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i11.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i2$3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i2$3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { type: i13.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i7.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { type: i14.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }, { type: i16.QuillEditorComponent, selector: "quill-editor" }, { type: SortableWidgetComponent, selector: "lib-sortable-widget", inputs: ["widgetInstance"] }, { type: i18.YouTubePlayer, selector: "youtube-player", inputs: ["videoId", "height", "width", "startSeconds", "endSeconds", "suggestedQuality", "playerVars", "showBeforeIframeApiLoads"], outputs: ["ready", "stateChange", "error", "apiChange", "playbackQualityChange", "playbackRateChange"] }, { type: SmartMonthPickerComponent, selector: "lib-smart-month-picker", inputs: ["widgetInstance"], outputs: ["valueChange"] }], directives: [{ type: i20.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i20.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TrackCapsDirective, selector: "[capsLock]", outputs: ["capsLock"] }, { type: i3$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i3$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3$2.MatLabel, selector: "mat-label" }, { type: i3$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i20.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i24.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { type: i20.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i20.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i20.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i3$2.MatSuffix, selector: "[matSuffix]" }, { type: i3$2.MatPrefix, selector: "[matPrefix]" }, { type: i20.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i20.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i20.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i9.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i9.MatChipRemove, selector: "[matChipRemove]" }, { type: i9.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i11.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i2$3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }], pipes: { "async": i3$1.AsyncPipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
5313
|
+
SmartformwidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartformwidgetComponent, selector: "smartformwidget", inputs: { form: "form", widgetInstance: "widgetInstance", onBlur: "onBlur", onValueChange: "onValueChange", labelColor: "labelColor", sophisticatedValueChange: "sophisticatedValueChange" }, viewQueries: [{ propertyName: "chipInputChild", first: true, predicate: ["chipInput"], descendants: true }, { propertyName: "customComponentVcRef", first: true, predicate: ["customComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "dateInputChild", first: true, predicate: ["dateInput"], descendants: true }, { propertyName: "timeInputChild", first: true, predicate: ["timeInput"], descendants: true }], ngImport: i0, template: "<div class=\"container\" [formGroup]=\"form\">\r\n <div\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n class=\"container\"\r\n *ngIf=\"widgetInstance.isVisible === undefined ? true : widgetInstance.isVisible\"\r\n >\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CONTAINER\" [ngClass]=\"getDirection()\">\r\n <smartformwidget\r\n *ngFor=\"let widget of widgetInstance.valueList\"\r\n [form]=\"form\"\r\n [widgetInstance]=\"widget\"\r\n class=\"container-item\"\r\n [ngClass]=\"widget.cssClass ?? ''\"\r\n [onBlur]=\"onBlur\"\r\n [onValueChange]=\"onValueChange\"\r\n [sophisticatedValueChange]=\"sophisticatedValueChange\"\r\n class=\"{{ widget.key }}\"\r\n [labelColor]=\"labelColor\"\r\n ></smartformwidget>\r\n </div>\r\n\r\n <div\r\n (capsLock)=\"capsOn = $event\"\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input textField widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n\r\n <input\r\n *ngIf=\"!widgetInstance.selection\"\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n type=\"{{ widgetInstance.isPassword ? (hidePassword ? 'password' : 'text') : '' }}\"\r\n [mask]=\"widgetInstance.mask ?? ''\"\r\n (keydown.enter)=\"onKeydown()\"\r\n maxlength=\"{{ widgetInstance.maxLength }}\"\r\n />\r\n <input\r\n *ngIf=\"widgetInstance.selection\"\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n type=\"{{ widgetInstance.isPassword ? 'password' : '' }}\"\r\n [matAutocomplete]=\"textFieldAuto\"\r\n (keydown.enter)=\"onKeydown()\"\r\n />\r\n <button\r\n *ngIf=\"widgetInstance.isPassword\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"togglePasswordVisibility($event)\"\r\n >\r\n <mat-icon>{{ hidePassword ? 'visibility_off' : 'visibility' }}</mat-icon>\r\n </button>\r\n <mat-autocomplete #textFieldAuto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.label\">\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <span class=\"mat-error\" *ngIf=\"capsOn && widgetInstance.isPassword\">\r\n {{ widgetInstance.capsLockWarning }}\r\n </span>\r\n\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n\r\n <span matPrefix>\r\n <smart-icon\r\n *ngIf=\"capsOn && widgetInstance.isPassword\"\r\n [icon]=\"widgetInstance.capsLockWarningIcon ?? 'keyboard_capslock'\"\r\n color=\"warn\"\r\n ></smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.icon && widgetInstance.iconPosition === 'PRE'\"\r\n [icon]=\"widgetInstance.icon\"\r\n [color]=\"widgetInstance.iconColor ?? 'primary'\"\r\n ></smart-icon>\r\n {{ widgetInstance.prefix }}\r\n </span>\r\n <span matSuffix>\r\n {{ widgetInstance.suffix }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.icon &&\r\n (!widgetInstance.iconPosition || widgetInstance.iconPosition === 'POST')\r\n \"\r\n [icon]=\"widgetInstance.icon\"\r\n [color]=\"widgetInstance.iconColor ?? 'primary'\"\r\n matSuffix\r\n ></smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <button\r\n *ngIf=\"widgetInstance.textFieldButton\"\r\n matSuffix\r\n mat-button\r\n color=\"{{ widgetInstance.textFieldButton.color }}\"\r\n (click)=\"widgetInstance.textFieldButton.callback(widgetInstance)\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().PRE && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n [color]=\"widgetInstance.textFieldButton.iconColor\"\r\n >\r\n </smart-icon>\r\n {{ widgetInstance.textFieldButton.label }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().POST && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n </button>\r\n <mat-hint\r\n *ngIf=\"widgetInstance.showCharacterLimitSuffix && widgetInstance.maxLength\"\r\n matSuffix\r\n align=\"end\"\r\n >{{ widgetInstance.maxLength - form.controls[widgetInstance.key].value.length }}</mat-hint\r\n >\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD_NUMBER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input textField widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <input\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n type=\"number\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [min]=\"widgetInstance.minValues ?? null\"\r\n [max]=\"widgetInstance.maxValues ?? null\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <span matPrefix>\r\n {{ widgetInstance.prefix }}\r\n </span>\r\n <span matSuffix>\r\n {{ widgetInstance.suffix }}\r\n </span>\r\n <smart-icon *ngIf=\"widgetInstance.icon\" [icon]=\"widgetInstance.icon\" matSuffix>\r\n </smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <button\r\n *ngIf=\"widgetInstance.textFieldButton\"\r\n matSuffix\r\n mat-button\r\n color=\"{{ widgetInstance.textFieldButton.color }}\"\r\n (click)=\"widgetInstance.textFieldButton.callback(widgetInstance)\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().PRE && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n {{ widgetInstance.textFieldButton.label }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().POST && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD_CHIPS\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-chip-list #chipList aria-label=\"{{ widgetInstance.label }}\">\r\n <mat-chip\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n *ngFor=\"let value of widgetInstance.value\"\r\n (removed)=\"remove(value)\"\r\n >\r\n {{ value }}\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <input\r\n #chipInput\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matChipInputFor]=\"chipList\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\r\n [matChipInputAddOnBlur]=\"addOnBlur\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n [matAutocomplete]=\"chipAuto\"\r\n (matChipInputTokenEnd)=\"add($event)\"\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n />\r\n <mat-autocomplete\r\n #chipAuto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event, widgetInstance)\"\r\n >\r\n <mat-option\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n *ngFor=\"let item of widgetInstance.valueList\"\r\n [value]=\"item.value\"\r\n >\r\n {{ item.label }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-chip-list>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_BOX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <textarea\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n maxlength=\"{{ widgetInstance.maxLength }}\"\r\n ></textarea>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint\r\n *ngIf=\"widgetInstance.showCharacterLimitSuffix && widgetInstance.maxLength\"\r\n matSuffix\r\n align=\"end\"\r\n >{{ widgetInstance.maxLength - form.controls[widgetInstance.key].value.length }}</mat-hint\r\n >\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance.hint || widgetInstance.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CHECK_BOX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div\r\n class=\"input checkbox widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <section class=\"checkbox-section\" [ngClass]=\"getDirection()\">\r\n <div\r\n class=\"checkbox-item-container\"\r\n *ngFor=\"let checkbox of widgetInstance.valueList; let i = index\"\r\n >\r\n <img\r\n *ngIf=\"checkbox.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"checkbox-item-image\"\r\n [src]=\"checkbox.imageUrl\"\r\n />\r\n <mat-checkbox\r\n class=\"selecatbleObject\"\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n [ngModel]=\"checkbox.value\"\r\n (change)=\"onValueChange?.next(checkbox)\"\r\n >\r\n {{ checkbox.label }}\r\n </mat-checkbox>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CHECK_BOX_2\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div\r\n class=\"input checkbox widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <section class=\"checkbox-section\" [ngClass]=\"getDirection()\">\r\n <div\r\n class=\"checkbox-item-container\"\r\n *ngFor=\"let checkbox of widgetInstance.valueList; let i = index\"\r\n >\r\n <img\r\n *ngIf=\"checkbox.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"checkbox-item-image\"\r\n [src]=\"checkbox.imageUrl\"\r\n />\r\n <mat-checkbox\r\n class=\"selecatbleObject\"\r\n formControlName=\"{{ widgetInstance.key + '.' + checkbox.key }}\"\r\n [value]=\"checkbox.value\"\r\n (change)=\"onValueChange?.next(checkbox)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n >\r\n {{ checkbox.label }}\r\n </mat-checkbox>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.RADIO_BUTTON\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-radio-group\r\n class=\"input radio-section widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n aria-label=\"{{ widgetInstance.label }}\"\r\n appearance=\"outline\"\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <div [ngClass]=\"getDirection()\">\r\n <div class=\"radio-item-container\" *ngFor=\"let radio of widgetInstance.valueList\">\r\n <img\r\n *ngIf=\"radio.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"radio-item-image\"\r\n [src]=\"radio.imageUrl\"\r\n />\r\n <mat-radio-button\r\n class=\"selecatbleObject\"\r\n value=\"{{ radio.value }}\"\r\n [ngClass]=\"getDirection()\"\r\n (change)=\"onValueChange?.next(radio.value)\"\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n >\r\n {{ radio.label }}\r\n </mat-radio-button>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </div>\r\n </mat-radio-group>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_PICKER\"\r\n class=\"datePicker widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent date\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker (closed)=\"onBlur?.next(widgetInstance)\"></mat-datepicker>\r\n <input\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n [min]=\"widgetInstance.minDate ?? null\"\r\n [max]=\"widgetInstance.maxDate ?? null\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n (dateChange)=\"onValueChange?.next(widgetInstance)\"\r\n [matDatepickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <!-- <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_TIME_PICKER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"$any(picker)\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker\r\n #picker\r\n [showSpinners]=\"true\"\r\n [showSeconds]=\"false\"\r\n [stepHour]=\"1\"\r\n [stepMinute]=\"1\"\r\n [stepSecond]=\"10\"\r\n [touchUi]=\"false\"\r\n [color]=\"'primary'\"\r\n [enableMeridian]=\"false\"\r\n [disableMinute]=\"false\"\r\n [hideTime]=\"false\"\r\n >\r\n </ngx-mat-datetime-picker>\r\n <input\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [ngxMatDatetimePicker]=\"picker\"\r\n [ngxMatDatetimePickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n </div> -->\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_TIME_PICKER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"dateTimePickerContainer\">\r\n <mat-form-field\r\n class=\"input widgetContent date\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker (closed)=\"onBlur?.next(widgetInstance)\"></mat-datepicker>\r\n <input\r\n #dateInput\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onDatePickerBlur($event)\"\r\n (dateChange)=\"onValueChange?.next(widgetInstance)\"\r\n [matDatepickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n <mat-form-field\r\n *ngIf=\"hasCreated\"\r\n class=\"input widgetContent time\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <input\r\n #timeInput\r\n [formControlName]=\"widgetInstance.key + '-time'\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'time'\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n (blur)=\"onTimePickerBlur($event)\"\r\n matInput\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.SELECT\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-select\r\n [formControlName]=\"widgetInstance.key\"\r\n (selectionChange)=\"onValueChange?.next($event.value)\"\r\n (closed)=\"onBlur?.next(widgetInstance)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n [compareWith]=\"\r\n widgetInstance.compareWith == null ? compareItems : widgetInstance.compareWith\r\n \"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n >\r\n <div *ngFor=\"let option of widgetInstance.valueList\">\r\n <mat-optgroup\r\n *ngIf=\"option.type === getType().ITEM_GROUP\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <mat-option\r\n *ngFor=\"let innerOption of option.valueList\"\r\n [value]=\"innerOption.value\"\r\n [disabled]=\"innerOption.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"innerOption.icon\"\r\n [icon]=\"innerOption.icon\"\r\n [color]=\"innerOption.iconColor\"\r\n ></smart-icon>\r\n {{ innerOption.label }}\r\n </mat-option>\r\n </mat-optgroup>\r\n <mat-option\r\n *ngIf=\"option.type === getType().ITEM\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"option.icon\"\r\n [icon]=\"option.icon\"\r\n [color]=\"option.iconColor\"\r\n ></smart-icon\r\n >{{ option.label }}</mat-option\r\n >\r\n </div>\r\n </mat-select>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.SELECT_MULTIPLE\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-select\r\n [formControlName]=\"widgetInstance.key\"\r\n multiple\r\n (selectionChange)=\"onValueChange?.next($event.value)\"\r\n (closed)=\"onBlur?.next(widgetInstance)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n [compareWith]=\"\r\n widgetInstance.compareWith == null ? compareItems : widgetInstance.compareWith\r\n \"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n >\r\n <div *ngFor=\"let option of widgetInstance.valueList\">\r\n <mat-optgroup\r\n *ngIf=\"option.type === getType().ITEM_GROUP\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <mat-option\r\n *ngFor=\"let innerOption of option.valueList\"\r\n [value]=\"innerOption.value\"\r\n [disabled]=\"innerOption.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"innerOption.icon\"\r\n [icon]=\"innerOption.icon\"\r\n [color]=\"innerOption.iconColor\"\r\n ></smart-icon\r\n >{{ innerOption.label }}</mat-option\r\n >\r\n </mat-optgroup>\r\n <mat-option\r\n *ngIf=\"option.type === getType().ITEM\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"option.icon\"\r\n [icon]=\"option.icon\"\r\n [color]=\"option.iconColor\"\r\n ></smart-icon\r\n >{{ option.label }}</mat-option\r\n >\r\n </div>\r\n </mat-select>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.LABEL\"\r\n class=\"label widgetContainer\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n >\r\n <div class=\"label-title labelContainer\" [ngClass]=\"widgetInstance.cssClass ?? ''\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <p>{{ widgetInstance.widgetDescription }}</p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TIME\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent time\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <input\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'time'\"\r\n [value]=\"getTime()\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TOGGLE\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <mat-slide-toggle\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n value=\"{{ widgetInstance.value }}\"\r\n (change)=\"onValueChange?.next($event)\"\r\n [labelPosition]=\"widgetInstance.toggleLabelPosition ?? 'before'\"\r\n >{{ !widgetInstance.showLabel ? widgetInstance.label : '' }}</mat-slide-toggle\r\n ><span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.INDICATOR\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"smartIndicator widgetContent\">\r\n <div class=\"indicatorItems\">\r\n <div\r\n *ngFor=\"let item of indicatorItems; let i = index\"\r\n class=\"indicatorItem\"\r\n [ngClass]=\"getIndicatorItemClass(i)\"\r\n ></div>\r\n </div>\r\n <p [ngClass]=\"getIndicatorStatusLabelColor()\">\r\n {{ getIndicatorStatusLabel() }}\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.FILE_UPLOADER\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <smartfileuploader\r\n class=\"widgetContent\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [fileFormats]=\"widgetInstance.fileFormats\"\r\n [maxSizeMb]=\"widgetInstance.maxSizeMb\"\r\n [i18n]=\"widgetInstance.i18n\"\r\n ></smartfileuploader>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.IMAGE\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <img\r\n class=\"widgetContent\"\r\n title=\"{{ widgetInstance.key }}\"\r\n [ngClass]=\"widgetInstance.imageCss ?? ''\"\r\n [src]=\"widgetInstance.value\"\r\n />\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.DIVIDER\" class=\"widgetContainer\">\r\n <hr class=\"smartDivider\" />\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.BUTTON\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"widgetContent\">\r\n <button\r\n mat-button\r\n [ngClass]=\"getButtonType(widgetInstance.uiActionDescriptor)\"\r\n [color]=\"widgetInstance.uiActionDescriptor?.color\"\r\n (click)=\"onButtonClicked(widgetInstance)\"\r\n >\r\n <div\r\n *ngIf=\"isOnlyIcon(widgetInstance.uiActionDescriptor); then iconOnly; else text\"\r\n ></div>\r\n <ng-template #iconOnly>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.uiActionDescriptor?.icon\"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n </ng-template>\r\n <ng-template #text>\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.uiActionDescriptor?.icon &&\r\n widgetInstance.uiActionDescriptor?.iconPosition === 'PRE'\r\n \"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n {{ widgetInstance.uiActionDescriptor?.title }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.uiActionDescriptor?.icon &&\r\n widgetInstance.uiActionDescriptor?.iconPosition === 'POST'\r\n \"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"widgetContainer\">\r\n <h4\r\n class=\"labelContainer\"\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.COMPONENT && widgetInstance.showLabel\"\r\n class=\"{{ labelColor }}\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"widgetContent\">\r\n <ng-template #customComponent></ng-template>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.RICH_TEXT\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <quill-editor\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [modules]=\"widgetInstance.quillModules\"\r\n [placeholder]=\"widgetInstance.placeholder\"\r\n [readOnly]=\"widgetInstance.isReadonly\"\r\n ></quill-editor>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint ||\r\n widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.SORTABLE\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <lib-sortable-widget\r\n [formControlName]=\"widgetInstance.key\"\r\n [widgetInstance]=\"widgetInstance\"\r\n ></lib-sortable-widget>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.MATRIX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n\r\n <table class=\"matrixTable widgetContent\">\r\n <tr>\r\n <th></th>\r\n <th class=\"optionLabel\" *ngFor=\"let option of widgetInstance.value.columns\">\r\n {{ option.displayValue }}\r\n </th>\r\n </tr>\r\n <tr *ngFor=\"let question of widgetInstance.value.rows; let i = index\">\r\n <th class=\"questionLabel\">\r\n <label>{{ question.displayValue }}</label>\r\n </th>\r\n\r\n <td class=\"selectTd\" *ngFor=\"let option of widgetInstance.value.columns; let j = index\">\r\n <mat-radio-group\r\n *ngIf=\"!widgetInstance.isMultiple\"\r\n [formControlName]=\"widgetInstance.key + '.' + question.code\"\r\n [name]=\"'q' + i\"\r\n >\r\n <mat-radio-button [value]=\"option.code\"> </mat-radio-button>\r\n </mat-radio-group>\r\n <div *ngIf=\"widgetInstance.isMultiple\">\r\n <mat-checkbox\r\n [formControlName]=\"widgetInstance.key + '.data.' + question.code + '.' + option.code\"\r\n [value]=\"widgetInstance.value['data'][question.code][option.code]\"\r\n [checked]=\"true\"\r\n ></mat-checkbox>\r\n </div>\r\n </td>\r\n <br />\r\n <button *ngIf=\"widgetInstance.button\" mat-icon-button (click)=\"removeMatrixRow(question)\"\r\n ><smart-icon icon=\"close\"></smart-icon\r\n ></button>\r\n </tr>\r\n </table>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.YOUTUBE_PLAYER\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <youtube-player\r\n videoId=\"{{ widgetInstance.videoId }}\"\r\n [width]=\"widgetInstance.width\"\r\n [height]=\"widgetInstance.height\"\r\n [startSeconds]=\"widgetInstance.startSeconds\"\r\n [endSeconds]=\"widgetInstance.endSeconds\"\r\n ></youtube-player>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.MONTH_PICKER\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <lib-smart-month-picker\r\n [widgetInstance]=\"widgetInstance\"\r\n (valueChange)=\"handleYearMonthPicked($event)\"\r\n ></lib-smart-month-picker>\r\n </div>\r\n</div>\r\n", styles: ["@import\"~quill/dist/quill.snow.css\";.checkbox-section,.radio-section{display:flex;flex-direction:column}.input{width:100%}.direction-col{display:flex;flex-direction:column;gap:.5em}.direction-row{display:flex;flex-direction:row;align-items:center;gap:.5em}.selecatbleObject{margin:.5em}.radioLabel{color:var(--primary-color);text-align:left!important}.container{height:100%}.input{height:100%;display:flex;flex-direction:column}.checkbox{flex-direction:column}.mat-form-field-wrapper{padding-bottom:0!important}.input .mat-standard-chip.mat-chip-with-trailing-icon{padding-right:12px}.time-picker{display:flex;flex-direction:row;height:100%;border:solid 2px lightgrey;padding:1em;border-radius:4px}.time-picker:hover{border-color:#000}::ng-deep .mat-h4 .mat-subheading-1 .mat-typography h4{margin:0}.label{margin:28px 0 8px}.smartIndicator{display:flex;flex-direction:column;gap:.25rem;width:-moz-fit-content;width:fit-content}.indicatorItems{display:flex;flex-direction:row;gap:.25rem}.indicatorItem{width:3rem;height:.25rem;background-color:#d3d3d3;border-radius:.5rem}.radio-error{width:-moz-fit-content;width:fit-content;display:flex;flex-direction:row;gap:.5rem}.mat-calendar-previous-button,.mat-calendar-next-button{padding:0;min-width:0;width:40px!important;height:40px!important;flex-shrink:0;line-height:40px;border-radius:50%}.mat-calendar-arrow{height:36px!important;display:flex!important;flex-direction:column!important;justify-content:center}.radio-item-container,.checkbox-item-container{display:flex;flex-direction:column}.widgetContent::ng-deep .ql-container{height:200px;width:460px}.dateTimePickerContainer{display:flex;flex-direction:row;gap:.25rem;max-width:225px}.date{width:125px}.time{width:90px}.date .mat-form-field-infix,.time .mat-form-field-infix{width:inherit!important}::ng-deep .mat-icon.mat-drag-indicator{--drag-indicator: #3b3b3b;color:var(--drag-indicator)}.matrixTable{width:100%;border-spacing:0 1rem}.matrixTable th{padding:.25rem}.matrixTable .optionLabel,.matrixTable td{text-align:center}.example-month-picker .mat-calendar-period-button{pointer-events:none}.example-month-picker .mat-calendar-arrow{display:none}\n"], components: [{ type: SmartformwidgetComponent, selector: "smartformwidget", inputs: ["form", "widgetInstance", "onBlur", "onValueChange", "labelColor", "sophisticatedValueChange"] }, { type: i3$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i3.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i9.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i11.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i2$3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i2$3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { type: i13.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i7.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { type: i14.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { type: SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }, { type: i16.QuillEditorComponent, selector: "quill-editor" }, { type: SortableWidgetComponent, selector: "lib-sortable-widget", inputs: ["widgetInstance"] }, { type: i18.YouTubePlayer, selector: "youtube-player", inputs: ["videoId", "height", "width", "startSeconds", "endSeconds", "suggestedQuality", "playerVars", "showBeforeIframeApiLoads"], outputs: ["ready", "stateChange", "error", "apiChange", "playbackQualityChange", "playbackRateChange"] }, { type: SmartMonthPickerComponent, selector: "lib-smart-month-picker", inputs: ["widgetInstance"], outputs: ["valueChange"] }], directives: [{ type: i20.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i20.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TrackCapsDirective, selector: "[capsLock]", outputs: ["capsLock"] }, { type: i3$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i3$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3$2.MatLabel, selector: "mat-label" }, { type: i3$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i20.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i24.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { type: i20.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i20.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i20.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i3$2.MatSuffix, selector: "[matSuffix]" }, { type: i3$2.MatPrefix, selector: "[matPrefix]" }, { type: i20.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i20.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i20.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i9.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i9.MatChipRemove, selector: "[matChipRemove]" }, { type: i9.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i11.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i2$3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }], pipes: { "async": i3$1.AsyncPipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
5314
5314
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartformwidgetComponent, decorators: [{
|
|
5315
5315
|
type: Component,
|
|
5316
|
-
args: [{ selector: 'smartformwidget', encapsulation: ViewEncapsulation.None, template: "<div class=\"container\" [formGroup]=\"form\">\r\n <div\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n class=\"container\"\r\n *ngIf=\"widgetInstance.isVisible === undefined ? true : widgetInstance.isVisible\"\r\n >\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CONTAINER\" [ngClass]=\"getDirection()\">\r\n <smartformwidget\r\n *ngFor=\"let widget of widgetInstance.valueList\"\r\n [form]=\"form\"\r\n [widgetInstance]=\"widget\"\r\n class=\"container-item\"\r\n [ngClass]=\"widget.cssClass ?? ''\"\r\n [onBlur]=\"onBlur\"\r\n [onValueChange]=\"onValueChange\"\r\n [sophisticatedValueChange]=\"sophisticatedValueChange\"\r\n class=\"{{ widget.key }}\"\r\n [labelColor]=\"labelColor\"\r\n ></smartformwidget>\r\n </div>\r\n\r\n <div\r\n (capsLock)=\"capsOn = $event\"\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input textField widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n\r\n <input\r\n *ngIf=\"!widgetInstance.selection\"\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n type=\"{{ widgetInstance.isPassword ? (hidePassword ? 'password' : 'text') : '' }}\"\r\n [mask]=\"widgetInstance.mask ?? ''\"\r\n (keydown.enter)=\"onKeydown()\"\r\n maxlength=\"{{ widgetInstance.maxLength }}\"\r\n />\r\n <input\r\n *ngIf=\"widgetInstance.selection\"\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n type=\"{{ widgetInstance.isPassword ? 'password' : '' }}\"\r\n [matAutocomplete]=\"textFieldAuto\"\r\n (keydown.enter)=\"onKeydown()\"\r\n />\r\n <button\r\n *ngIf=\"widgetInstance.isPassword\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"togglePasswordVisibility($event)\"\r\n >\r\n <mat-icon>{{ hidePassword ? 'visibility_off' : 'visibility' }}</mat-icon>\r\n </button>\r\n <mat-autocomplete #textFieldAuto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.label\">\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <span class=\"mat-error\" *ngIf=\"capsOn && widgetInstance.isPassword\">\r\n {{ widgetInstance.capsLockWarning }}\r\n </span>\r\n\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n\r\n <span matPrefix>\r\n <smart-icon\r\n *ngIf=\"capsOn && widgetInstance.isPassword\"\r\n [icon]=\"widgetInstance.capsLockWarningIcon ?? 'keyboard_capslock'\"\r\n color=\"warn\"\r\n ></smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.icon && widgetInstance.iconPosition === 'PRE'\"\r\n [icon]=\"widgetInstance.icon\"\r\n [color]=\"widgetInstance.iconColor ?? 'primary'\"\r\n ></smart-icon>\r\n {{ widgetInstance.prefix }}\r\n </span>\r\n <span matSuffix>\r\n {{ widgetInstance.suffix }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.icon &&\r\n (!widgetInstance.iconPosition || widgetInstance.iconPosition === 'POST')\r\n \"\r\n [icon]=\"widgetInstance.icon\"\r\n [color]=\"widgetInstance.iconColor ?? 'primary'\"\r\n matSuffix\r\n ></smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <button\r\n *ngIf=\"widgetInstance.textFieldButton\"\r\n matSuffix\r\n mat-button\r\n color=\"{{ widgetInstance.textFieldButton.color }}\"\r\n (click)=\"widgetInstance.textFieldButton.callback(widgetInstance)\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().PRE && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n [color]=\"widgetInstance.textFieldButton.iconColor\"\r\n >\r\n </smart-icon>\r\n {{ widgetInstance.textFieldButton.label }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().POST && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n </button>\r\n <mat-hint\r\n *ngIf=\"widgetInstance.showCharacterLimitSuffix && widgetInstance.maxLength\"\r\n matSuffix\r\n align=\"end\"\r\n >{{ widgetInstance.maxLength - form.controls[widgetInstance.key].value.length }}</mat-hint\r\n >\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD_NUMBER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input textField widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <input\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n type=\"number\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [min]=\"widgetInstance.minValues ?? null\"\r\n [max]=\"widgetInstance.maxValues ?? null\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <span matPrefix>\r\n {{ widgetInstance.prefix }}\r\n </span>\r\n <span matSuffix>\r\n {{ widgetInstance.suffix }}\r\n </span>\r\n <smart-icon *ngIf=\"widgetInstance.icon\" [icon]=\"widgetInstance.icon\" matSuffix>\r\n </smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <button\r\n *ngIf=\"widgetInstance.textFieldButton\"\r\n matSuffix\r\n mat-button\r\n color=\"{{ widgetInstance.textFieldButton.color }}\"\r\n (click)=\"widgetInstance.textFieldButton.callback(widgetInstance)\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().PRE && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n {{ widgetInstance.textFieldButton.label }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().POST && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD_CHIPS\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-chip-list #chipList aria-label=\"{{ widgetInstance.label }}\">\r\n <mat-chip\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n *ngFor=\"let value of widgetInstance.value\"\r\n (removed)=\"remove(value)\"\r\n >\r\n {{ value }}\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <input\r\n #chipInput\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matChipInputFor]=\"chipList\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\r\n [matChipInputAddOnBlur]=\"addOnBlur\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n [matAutocomplete]=\"chipAuto\"\r\n (matChipInputTokenEnd)=\"add($event)\"\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n />\r\n <mat-autocomplete\r\n #chipAuto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event, widgetInstance)\"\r\n >\r\n <mat-option\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n *ngFor=\"let item of widgetInstance.valueList\"\r\n [value]=\"item.value\"\r\n >\r\n {{ item.label }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-chip-list>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_BOX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <textarea\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n maxlength=\"{{ widgetInstance.maxLength }}\"\r\n ></textarea>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint\r\n *ngIf=\"widgetInstance.showCharacterLimitSuffix && widgetInstance.maxLength\"\r\n matSuffix\r\n align=\"end\"\r\n >{{ widgetInstance.maxLength - form.controls[widgetInstance.key].value.length }}</mat-hint\r\n >\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance.hint || widgetInstance.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CHECK_BOX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div\r\n class=\"input checkbox widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <section class=\"checkbox-section\" [ngClass]=\"getDirection()\">\r\n <div\r\n class=\"checkbox-item-container\"\r\n *ngFor=\"let checkbox of widgetInstance.valueList; let i = index\"\r\n >\r\n <img\r\n *ngIf=\"checkbox.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"checkbox-item-image\"\r\n [src]=\"checkbox.imageUrl\"\r\n />\r\n <mat-checkbox\r\n class=\"selecatbleObject\"\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n [ngModel]=\"checkbox.value\"\r\n (change)=\"onValueChange?.next(checkbox)\"\r\n >\r\n {{ checkbox.label }}\r\n </mat-checkbox>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CHECK_BOX_2\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div\r\n class=\"input checkbox widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <section class=\"checkbox-section\" [ngClass]=\"getDirection()\">\r\n <div\r\n class=\"checkbox-item-container\"\r\n *ngFor=\"let checkbox of widgetInstance.valueList; let i = index\"\r\n >\r\n <img\r\n *ngIf=\"checkbox.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"checkbox-item-image\"\r\n [src]=\"checkbox.imageUrl\"\r\n />\r\n <mat-checkbox\r\n class=\"selecatbleObject\"\r\n formControlName=\"{{ widgetInstance.key + '.' + checkbox.key }}\"\r\n [value]=\"checkbox.value\"\r\n (change)=\"onValueChange?.next(checkbox)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n >\r\n {{ checkbox.label }}\r\n </mat-checkbox>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.RADIO_BUTTON\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-radio-group\r\n class=\"input radio-section widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n aria-label=\"{{ widgetInstance.label }}\"\r\n appearance=\"outline\"\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <div [ngClass]=\"getDirection()\">\r\n <div class=\"radio-item-container\" *ngFor=\"let radio of widgetInstance.valueList\">\r\n <img\r\n *ngIf=\"radio.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"radio-item-image\"\r\n [src]=\"radio.imageUrl\"\r\n />\r\n <mat-radio-button\r\n class=\"selecatbleObject\"\r\n value=\"{{ radio.value }}\"\r\n [ngClass]=\"getDirection()\"\r\n (change)=\"onValueChange?.next(radio.value)\"\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n >\r\n {{ radio.label }}\r\n </mat-radio-button>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </div>\r\n </mat-radio-group>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_PICKER\"\r\n class=\"datePicker widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent date\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker (closed)=\"onBlur?.next(widgetInstance)\"></mat-datepicker>\r\n <input\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n [min]=\"widgetInstance.minDate ?? null\"\r\n [max]=\"widgetInstance.maxDate ?? null\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n (dateChange)=\"onValueChange?.next(widgetInstance)\"\r\n [matDatepickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <!-- <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_TIME_PICKER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"$any(picker)\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker\r\n #picker\r\n [showSpinners]=\"true\"\r\n [showSeconds]=\"false\"\r\n [stepHour]=\"1\"\r\n [stepMinute]=\"1\"\r\n [stepSecond]=\"10\"\r\n [touchUi]=\"false\"\r\n [color]=\"'primary'\"\r\n [enableMeridian]=\"false\"\r\n [disableMinute]=\"false\"\r\n [hideTime]=\"false\"\r\n >\r\n </ngx-mat-datetime-picker>\r\n <input\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [ngxMatDatetimePicker]=\"picker\"\r\n [ngxMatDatetimePickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n </div> -->\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_TIME_PICKER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"dateTimePickerContainer\">\r\n <mat-form-field\r\n class=\"input widgetContent date\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker (closed)=\"onBlur?.next(widgetInstance)\"></mat-datepicker>\r\n <input\r\n #dateInput\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onDatePickerBlur($event)\"\r\n (dateChange)=\"onValueChange?.next(widgetInstance)\"\r\n [matDatepickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n <mat-form-field\r\n *ngIf=\"hasCreated\"\r\n class=\"input widgetContent time\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <input\r\n #timeInput\r\n [formControlName]=\"widgetInstance.key + '-time'\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'time'\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n (blur)=\"onTimePickerBlur($event)\"\r\n matInput\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.SELECT\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-select\r\n [formControlName]=\"widgetInstance.key\"\r\n (selectionChange)=\"onValueChange?.next($event.value)\"\r\n (closed)=\"onBlur?.next(widgetInstance)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n [compareWith]=\"\r\n widgetInstance.compareWith == null ? compareItems : widgetInstance.compareWith\r\n \"\r\n >\r\n <div *ngFor=\"let option of widgetInstance.valueList\">\r\n <mat-optgroup\r\n *ngIf=\"option.type === getType().ITEM_GROUP\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <mat-option\r\n *ngFor=\"let innerOption of option.valueList\"\r\n [value]=\"innerOption.value\"\r\n [disabled]=\"innerOption.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"innerOption.icon\"\r\n [icon]=\"innerOption.icon\"\r\n [color]=\"innerOption.iconColor\"\r\n ></smart-icon>\r\n {{ innerOption.label }}\r\n </mat-option>\r\n </mat-optgroup>\r\n <mat-option\r\n *ngIf=\"option.type === getType().ITEM\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"option.icon\"\r\n [icon]=\"option.icon\"\r\n [color]=\"option.iconColor\"\r\n ></smart-icon\r\n >{{ option.label }}</mat-option\r\n >\r\n </div>\r\n </mat-select>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.SELECT_MULTIPLE\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-select\r\n [formControlName]=\"widgetInstance.key\"\r\n multiple\r\n (selectionChange)=\"onValueChange?.next($event.value)\"\r\n (closed)=\"onBlur?.next(widgetInstance)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n [compareWith]=\"\r\n widgetInstance.compareWith == null ? compareItems : widgetInstance.compareWith\r\n \"\r\n >\r\n <div *ngFor=\"let option of widgetInstance.valueList\">\r\n <mat-optgroup\r\n *ngIf=\"option.type === getType().ITEM_GROUP\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <mat-option\r\n *ngFor=\"let innerOption of option.valueList\"\r\n [value]=\"innerOption.value\"\r\n [disabled]=\"innerOption.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"innerOption.icon\"\r\n [icon]=\"innerOption.icon\"\r\n [color]=\"innerOption.iconColor\"\r\n ></smart-icon\r\n >{{ innerOption.label }}</mat-option\r\n >\r\n </mat-optgroup>\r\n <mat-option\r\n *ngIf=\"option.type === getType().ITEM\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"option.icon\"\r\n [icon]=\"option.icon\"\r\n [color]=\"option.iconColor\"\r\n ></smart-icon\r\n >{{ option.label }}</mat-option\r\n >\r\n </div>\r\n </mat-select>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.LABEL\"\r\n class=\"label widgetContainer\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n >\r\n <div class=\"label-title labelContainer\" [ngClass]=\"widgetInstance.cssClass ?? ''\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <p>{{ widgetInstance.widgetDescription }}</p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TIME\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent time\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <input\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'time'\"\r\n [value]=\"getTime()\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TOGGLE\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <mat-slide-toggle\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n value=\"{{ widgetInstance.value }}\"\r\n (change)=\"onValueChange?.next($event)\"\r\n [labelPosition]=\"widgetInstance.toggleLabelPosition ?? 'before'\"\r\n >{{ !widgetInstance.showLabel ? widgetInstance.label : '' }}</mat-slide-toggle\r\n ><span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.INDICATOR\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"smartIndicator widgetContent\">\r\n <div class=\"indicatorItems\">\r\n <div\r\n *ngFor=\"let item of indicatorItems; let i = index\"\r\n class=\"indicatorItem\"\r\n [ngClass]=\"getIndicatorItemClass(i)\"\r\n ></div>\r\n </div>\r\n <p [ngClass]=\"getIndicatorStatusLabelColor()\">\r\n {{ getIndicatorStatusLabel() }}\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.FILE_UPLOADER\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <smartfileuploader\r\n class=\"widgetContent\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [fileFormats]=\"widgetInstance.fileFormats\"\r\n [maxSizeMb]=\"widgetInstance.maxSizeMb\"\r\n [i18n]=\"widgetInstance.i18n\"\r\n ></smartfileuploader>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.IMAGE\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <img\r\n class=\"widgetContent\"\r\n title=\"{{ widgetInstance.key }}\"\r\n [ngClass]=\"widgetInstance.imageCss ?? ''\"\r\n [src]=\"widgetInstance.value\"\r\n />\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.DIVIDER\" class=\"widgetContainer\">\r\n <hr class=\"smartDivider\" />\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.BUTTON\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"widgetContent\">\r\n <button\r\n mat-button\r\n [ngClass]=\"getButtonType(widgetInstance.uiActionDescriptor)\"\r\n [color]=\"widgetInstance.uiActionDescriptor?.color\"\r\n (click)=\"onButtonClicked(widgetInstance)\"\r\n >\r\n <div\r\n *ngIf=\"isOnlyIcon(widgetInstance.uiActionDescriptor); then iconOnly; else text\"\r\n ></div>\r\n <ng-template #iconOnly>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.uiActionDescriptor?.icon\"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n </ng-template>\r\n <ng-template #text>\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.uiActionDescriptor?.icon &&\r\n widgetInstance.uiActionDescriptor?.iconPosition === 'PRE'\r\n \"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n {{ widgetInstance.uiActionDescriptor?.title }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.uiActionDescriptor?.icon &&\r\n widgetInstance.uiActionDescriptor?.iconPosition === 'POST'\r\n \"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"widgetContainer\">\r\n <h4\r\n class=\"labelContainer\"\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.COMPONENT && widgetInstance.showLabel\"\r\n class=\"{{ labelColor }}\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"widgetContent\">\r\n <ng-template #customComponent></ng-template>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.RICH_TEXT\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <quill-editor\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [modules]=\"widgetInstance.quillModules\"\r\n [placeholder]=\"widgetInstance.placeholder\"\r\n [readOnly]=\"widgetInstance.isReadonly\"\r\n ></quill-editor>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint ||\r\n widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.SORTABLE\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <lib-sortable-widget\r\n [formControlName]=\"widgetInstance.key\"\r\n [widgetInstance]=\"widgetInstance\"\r\n ></lib-sortable-widget>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.MATRIX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n\r\n <table class=\"matrixTable widgetContent\">\r\n <tr>\r\n <th></th>\r\n <th class=\"optionLabel\" *ngFor=\"let option of widgetInstance.value.columns\">\r\n {{ option.displayValue }}\r\n </th>\r\n </tr>\r\n <tr *ngFor=\"let question of widgetInstance.value.rows; let i = index\">\r\n <th class=\"questionLabel\">\r\n <label>{{ question.displayValue }}</label>\r\n </th>\r\n\r\n <td class=\"selectTd\" *ngFor=\"let option of widgetInstance.value.columns; let j = index\">\r\n <mat-radio-group\r\n *ngIf=\"!widgetInstance.isMultiple\"\r\n [formControlName]=\"widgetInstance.key + '.' + question.code\"\r\n [name]=\"'q' + i\"\r\n >\r\n <mat-radio-button [value]=\"option.code\"> </mat-radio-button>\r\n </mat-radio-group>\r\n <div *ngIf=\"widgetInstance.isMultiple\">\r\n <mat-checkbox\r\n [formControlName]=\"widgetInstance.key + '.data.' + question.code + '.' + option.code\"\r\n [value]=\"widgetInstance.value['data'][question.code][option.code]\"\r\n [checked]=\"true\"\r\n ></mat-checkbox>\r\n </div>\r\n </td>\r\n <br />\r\n <button *ngIf=\"widgetInstance.button\" mat-icon-button (click)=\"removeMatrixRow(question)\"\r\n ><smart-icon icon=\"close\"></smart-icon\r\n ></button>\r\n </tr>\r\n </table>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.YOUTUBE_PLAYER\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <youtube-player\r\n videoId=\"{{ widgetInstance.videoId }}\"\r\n [width]=\"widgetInstance.width\"\r\n [height]=\"widgetInstance.height\"\r\n [startSeconds]=\"widgetInstance.startSeconds\"\r\n [endSeconds]=\"widgetInstance.endSeconds\"\r\n ></youtube-player>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.MONTH_PICKER\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <lib-smart-month-picker\r\n [widgetInstance]=\"widgetInstance\"\r\n (valueChange)=\"handleYearMonthPicked($event)\"\r\n ></lib-smart-month-picker>\r\n </div>\r\n</div>\r\n", styles: ["@import\"~quill/dist/quill.snow.css\";.checkbox-section,.radio-section{display:flex;flex-direction:column}.input{width:100%}.direction-col{display:flex;flex-direction:column;gap:.5em}.direction-row{display:flex;flex-direction:row;align-items:center;gap:.5em}.selecatbleObject{margin:.5em}.radioLabel{color:var(--primary-color);text-align:left!important}.container{height:100%}.input{height:100%;display:flex;flex-direction:column}.checkbox{flex-direction:column}.mat-form-field-wrapper{padding-bottom:0!important}.input .mat-standard-chip.mat-chip-with-trailing-icon{padding-right:12px}.time-picker{display:flex;flex-direction:row;height:100%;border:solid 2px lightgrey;padding:1em;border-radius:4px}.time-picker:hover{border-color:#000}::ng-deep .mat-h4 .mat-subheading-1 .mat-typography h4{margin:0}.label{margin:28px 0 8px}.smartIndicator{display:flex;flex-direction:column;gap:.25rem;width:-moz-fit-content;width:fit-content}.indicatorItems{display:flex;flex-direction:row;gap:.25rem}.indicatorItem{width:3rem;height:.25rem;background-color:#d3d3d3;border-radius:.5rem}.radio-error{width:-moz-fit-content;width:fit-content;display:flex;flex-direction:row;gap:.5rem}.mat-calendar-previous-button,.mat-calendar-next-button{padding:0;min-width:0;width:40px!important;height:40px!important;flex-shrink:0;line-height:40px;border-radius:50%}.mat-calendar-arrow{height:36px!important;display:flex!important;flex-direction:column!important;justify-content:center}.radio-item-container,.checkbox-item-container{display:flex;flex-direction:column}.widgetContent::ng-deep .ql-container{height:200px;width:460px}.dateTimePickerContainer{display:flex;flex-direction:row;gap:.25rem;max-width:225px}.date{width:125px}.time{width:90px}.date .mat-form-field-infix,.time .mat-form-field-infix{width:inherit!important}::ng-deep .mat-icon.mat-drag-indicator{--drag-indicator: #3b3b3b;color:var(--drag-indicator)}.matrixTable{width:100%;border-spacing:0 1rem}.matrixTable th{padding:.25rem}.matrixTable .optionLabel,.matrixTable td{text-align:center}.example-month-picker .mat-calendar-period-button{pointer-events:none}.example-month-picker .mat-calendar-arrow{display:none}\n"] }]
|
|
5316
|
+
args: [{ selector: 'smartformwidget', encapsulation: ViewEncapsulation.None, template: "<div class=\"container\" [formGroup]=\"form\">\r\n <div\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n class=\"container\"\r\n *ngIf=\"widgetInstance.isVisible === undefined ? true : widgetInstance.isVisible\"\r\n >\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CONTAINER\" [ngClass]=\"getDirection()\">\r\n <smartformwidget\r\n *ngFor=\"let widget of widgetInstance.valueList\"\r\n [form]=\"form\"\r\n [widgetInstance]=\"widget\"\r\n class=\"container-item\"\r\n [ngClass]=\"widget.cssClass ?? ''\"\r\n [onBlur]=\"onBlur\"\r\n [onValueChange]=\"onValueChange\"\r\n [sophisticatedValueChange]=\"sophisticatedValueChange\"\r\n class=\"{{ widget.key }}\"\r\n [labelColor]=\"labelColor\"\r\n ></smartformwidget>\r\n </div>\r\n\r\n <div\r\n (capsLock)=\"capsOn = $event\"\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input textField widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n\r\n <input\r\n *ngIf=\"!widgetInstance.selection\"\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n type=\"{{ widgetInstance.isPassword ? (hidePassword ? 'password' : 'text') : '' }}\"\r\n [mask]=\"widgetInstance.mask ?? ''\"\r\n (keydown.enter)=\"onKeydown()\"\r\n maxlength=\"{{ widgetInstance.maxLength }}\"\r\n />\r\n <input\r\n *ngIf=\"widgetInstance.selection\"\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n type=\"{{ widgetInstance.isPassword ? 'password' : '' }}\"\r\n [matAutocomplete]=\"textFieldAuto\"\r\n (keydown.enter)=\"onKeydown()\"\r\n />\r\n <button\r\n *ngIf=\"widgetInstance.isPassword\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"togglePasswordVisibility($event)\"\r\n >\r\n <mat-icon>{{ hidePassword ? 'visibility_off' : 'visibility' }}</mat-icon>\r\n </button>\r\n <mat-autocomplete #textFieldAuto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option.label\">\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n <span class=\"mat-error\" *ngIf=\"capsOn && widgetInstance.isPassword\">\r\n {{ widgetInstance.capsLockWarning }}\r\n </span>\r\n\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n\r\n <span matPrefix>\r\n <smart-icon\r\n *ngIf=\"capsOn && widgetInstance.isPassword\"\r\n [icon]=\"widgetInstance.capsLockWarningIcon ?? 'keyboard_capslock'\"\r\n color=\"warn\"\r\n ></smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.icon && widgetInstance.iconPosition === 'PRE'\"\r\n [icon]=\"widgetInstance.icon\"\r\n [color]=\"widgetInstance.iconColor ?? 'primary'\"\r\n ></smart-icon>\r\n {{ widgetInstance.prefix }}\r\n </span>\r\n <span matSuffix>\r\n {{ widgetInstance.suffix }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.icon &&\r\n (!widgetInstance.iconPosition || widgetInstance.iconPosition === 'POST')\r\n \"\r\n [icon]=\"widgetInstance.icon\"\r\n [color]=\"widgetInstance.iconColor ?? 'primary'\"\r\n matSuffix\r\n ></smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <button\r\n *ngIf=\"widgetInstance.textFieldButton\"\r\n matSuffix\r\n mat-button\r\n color=\"{{ widgetInstance.textFieldButton.color }}\"\r\n (click)=\"widgetInstance.textFieldButton.callback(widgetInstance)\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().PRE && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n [color]=\"widgetInstance.textFieldButton.iconColor\"\r\n >\r\n </smart-icon>\r\n {{ widgetInstance.textFieldButton.label }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().POST && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n </button>\r\n <mat-hint\r\n *ngIf=\"widgetInstance.showCharacterLimitSuffix && widgetInstance.maxLength\"\r\n matSuffix\r\n align=\"end\"\r\n >{{ widgetInstance.maxLength - form.controls[widgetInstance.key].value.length }}</mat-hint\r\n >\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD_NUMBER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input textField widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <input\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n type=\"number\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [min]=\"widgetInstance.minValues ?? null\"\r\n [max]=\"widgetInstance.maxValues ?? null\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <span matPrefix>\r\n {{ widgetInstance.prefix }}\r\n </span>\r\n <span matSuffix>\r\n {{ widgetInstance.suffix }}\r\n </span>\r\n <smart-icon *ngIf=\"widgetInstance.icon\" [icon]=\"widgetInstance.icon\" matSuffix>\r\n </smart-icon>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <button\r\n *ngIf=\"widgetInstance.textFieldButton\"\r\n matSuffix\r\n mat-button\r\n color=\"{{ widgetInstance.textFieldButton.color }}\"\r\n (click)=\"widgetInstance.textFieldButton.callback(widgetInstance)\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().PRE && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n {{ widgetInstance.textFieldButton.label }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.textFieldButton.iconPosition ===\r\n smartFormTextFieldButtonIconPosition().POST && widgetInstance.textFieldButton.icon\r\n \"\r\n [icon]=\"widgetInstance.textFieldButton.icon\"\r\n >\r\n </smart-icon>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_FIELD_CHIPS\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-chip-list #chipList aria-label=\"{{ widgetInstance.label }}\">\r\n <mat-chip\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n *ngFor=\"let value of widgetInstance.value\"\r\n (removed)=\"remove(value)\"\r\n >\r\n {{ value }}\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <input\r\n #chipInput\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matChipInputFor]=\"chipList\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\r\n [matChipInputAddOnBlur]=\"addOnBlur\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n [matAutocomplete]=\"chipAuto\"\r\n (matChipInputTokenEnd)=\"add($event)\"\r\n (blur)=\"onBlur?.next($event)\"\r\n (input)=\"onValueChange?.next($event)\"\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n />\r\n <mat-autocomplete\r\n #chipAuto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event, widgetInstance)\"\r\n >\r\n <mat-option\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n *ngFor=\"let item of widgetInstance.valueList\"\r\n [value]=\"item.value\"\r\n >\r\n {{ item.label }}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-chip-list>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TEXT_BOX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <textarea\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'string'\"\r\n [value]=\"widgetInstance.value\"\r\n [readonly]=\"widgetInstance.isReadonly\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next($event)\"\r\n maxlength=\"{{ widgetInstance.maxLength }}\"\r\n ></textarea>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint\r\n *ngIf=\"widgetInstance.showCharacterLimitSuffix && widgetInstance.maxLength\"\r\n matSuffix\r\n align=\"end\"\r\n >{{ widgetInstance.maxLength - form.controls[widgetInstance.key].value.length }}</mat-hint\r\n >\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance.hint || widgetInstance.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CHECK_BOX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div\r\n class=\"input checkbox widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <section class=\"checkbox-section\" [ngClass]=\"getDirection()\">\r\n <div\r\n class=\"checkbox-item-container\"\r\n *ngFor=\"let checkbox of widgetInstance.valueList; let i = index\"\r\n >\r\n <img\r\n *ngIf=\"checkbox.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"checkbox-item-image\"\r\n [src]=\"checkbox.imageUrl\"\r\n />\r\n <mat-checkbox\r\n class=\"selecatbleObject\"\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n [ngModel]=\"checkbox.value\"\r\n (change)=\"onValueChange?.next(checkbox)\"\r\n >\r\n {{ checkbox.label }}\r\n </mat-checkbox>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.CHECK_BOX_2\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div\r\n class=\"input checkbox widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <section class=\"checkbox-section\" [ngClass]=\"getDirection()\">\r\n <div\r\n class=\"checkbox-item-container\"\r\n *ngFor=\"let checkbox of widgetInstance.valueList; let i = index\"\r\n >\r\n <img\r\n *ngIf=\"checkbox.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"checkbox-item-image\"\r\n [src]=\"checkbox.imageUrl\"\r\n />\r\n <mat-checkbox\r\n class=\"selecatbleObject\"\r\n formControlName=\"{{ widgetInstance.key + '.' + checkbox.key }}\"\r\n [value]=\"checkbox.value\"\r\n (change)=\"onValueChange?.next(checkbox)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n >\r\n {{ checkbox.label }}\r\n </mat-checkbox>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.RADIO_BUTTON\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-radio-group\r\n class=\"input radio-section widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n aria-label=\"{{ widgetInstance.label }}\"\r\n appearance=\"outline\"\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n >\r\n <mat-label class=\"radioLabel\" *ngIf=\"!widgetInstance.showLabel\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <div [ngClass]=\"getDirection()\">\r\n <div class=\"radio-item-container\" *ngFor=\"let radio of widgetInstance.valueList\">\r\n <img\r\n *ngIf=\"radio.imageUrl\"\r\n title=\"{{ widgetInstance.key }}\"\r\n class=\"radio-item-image\"\r\n [src]=\"radio.imageUrl\"\r\n />\r\n <mat-radio-button\r\n class=\"selecatbleObject\"\r\n value=\"{{ radio.value }}\"\r\n [ngClass]=\"getDirection()\"\r\n (change)=\"onValueChange?.next(radio.value)\"\r\n [disabled]=\"widgetInstance.isDisabled\"\r\n >\r\n {{ radio.label }}\r\n </mat-radio-button>\r\n </div>\r\n <div class=\"radio-error\">\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </div>\r\n </mat-radio-group>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_PICKER\"\r\n class=\"datePicker widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent date\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker (closed)=\"onBlur?.next(widgetInstance)\"></mat-datepicker>\r\n <input\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n [min]=\"widgetInstance.minDate ?? null\"\r\n [max]=\"widgetInstance.maxDate ?? null\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n (dateChange)=\"onValueChange?.next(widgetInstance)\"\r\n [matDatepickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n </div>\r\n\r\n <!-- <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_TIME_PICKER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"$any(picker)\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker\r\n #picker\r\n [showSpinners]=\"true\"\r\n [showSeconds]=\"false\"\r\n [stepHour]=\"1\"\r\n [stepMinute]=\"1\"\r\n [stepSecond]=\"10\"\r\n [touchUi]=\"false\"\r\n [color]=\"'primary'\"\r\n [enableMeridian]=\"false\"\r\n [disableMinute]=\"false\"\r\n [hideTime]=\"false\"\r\n >\r\n </ngx-mat-datetime-picker>\r\n <input\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [ngxMatDatetimePicker]=\"picker\"\r\n [ngxMatDatetimePickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n </div> -->\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.DATE_TIME_PICKER\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"dateTimePickerContainer\">\r\n <mat-form-field\r\n class=\"input widgetContent date\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker (closed)=\"onBlur?.next(widgetInstance)\"></mat-datepicker>\r\n <input\r\n #dateInput\r\n matInput\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [value]=\"widgetInstance.value\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onDatePickerBlur($event)\"\r\n (dateChange)=\"onValueChange?.next(widgetInstance)\"\r\n [matDatepickerFilter]=\"widgetInstance.filter ?? dateFilter\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n <mat-hint>\r\n {{ widgetInstance.dateFormatHint }}\r\n </mat-hint>\r\n </mat-form-field>\r\n <mat-form-field\r\n *ngIf=\"hasCreated\"\r\n class=\"input widgetContent time\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <input\r\n #timeInput\r\n [formControlName]=\"widgetInstance.key + '-time'\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'time'\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n (blur)=\"onTimePickerBlur($event)\"\r\n matInput\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.SELECT\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-select\r\n [formControlName]=\"widgetInstance.key\"\r\n (selectionChange)=\"onValueChange?.next($event.value)\"\r\n (closed)=\"onBlur?.next(widgetInstance)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n [compareWith]=\"\r\n widgetInstance.compareWith == null ? compareItems : widgetInstance.compareWith\r\n \"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n >\r\n <div *ngFor=\"let option of widgetInstance.valueList\">\r\n <mat-optgroup\r\n *ngIf=\"option.type === getType().ITEM_GROUP\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <mat-option\r\n *ngFor=\"let innerOption of option.valueList\"\r\n [value]=\"innerOption.value\"\r\n [disabled]=\"innerOption.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"innerOption.icon\"\r\n [icon]=\"innerOption.icon\"\r\n [color]=\"innerOption.iconColor\"\r\n ></smart-icon>\r\n {{ innerOption.label }}\r\n </mat-option>\r\n </mat-optgroup>\r\n <mat-option\r\n *ngIf=\"option.type === getType().ITEM\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"option.icon\"\r\n [icon]=\"option.icon\"\r\n [color]=\"option.iconColor\"\r\n ></smart-icon\r\n >{{ option.label }}</mat-option\r\n >\r\n </div>\r\n </mat-select>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.SELECT_MULTIPLE\"\r\n class=\"widgetContainer\"\r\n >\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <mat-select\r\n [formControlName]=\"widgetInstance.key\"\r\n multiple\r\n (selectionChange)=\"onValueChange?.next($event.value)\"\r\n (closed)=\"onBlur?.next(widgetInstance)\"\r\n [disabled]=\"widgetInstance.isDisabled!\"\r\n [compareWith]=\"\r\n widgetInstance.compareWith == null ? compareItems : widgetInstance.compareWith\r\n \"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n >\r\n <div *ngFor=\"let option of widgetInstance.valueList\">\r\n <mat-optgroup\r\n *ngIf=\"option.type === getType().ITEM_GROUP\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <mat-option\r\n *ngFor=\"let innerOption of option.valueList\"\r\n [value]=\"innerOption.value\"\r\n [disabled]=\"innerOption.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"innerOption.icon\"\r\n [icon]=\"innerOption.icon\"\r\n [color]=\"innerOption.iconColor\"\r\n ></smart-icon\r\n >{{ innerOption.label }}</mat-option\r\n >\r\n </mat-optgroup>\r\n <mat-option\r\n *ngIf=\"option.type === getType().ITEM\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.isDisabled\"\r\n >\r\n <smart-icon\r\n *ngIf=\"option.icon\"\r\n [icon]=\"option.icon\"\r\n [color]=\"option.iconColor\"\r\n ></smart-icon\r\n >{{ option.label }}</mat-option\r\n >\r\n </div>\r\n </mat-select>\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n\r\n <div\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.LABEL\"\r\n class=\"label widgetContainer\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n >\r\n <div class=\"label-title labelContainer\" [ngClass]=\"widgetInstance.cssClass ?? ''\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <p>{{ widgetInstance.widgetDescription }}</p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TIME\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <mat-form-field\r\n class=\"input widgetContent time\"\r\n [ngClass]=\"widgetInstance.cssClass ?? ''\"\r\n [ngStyle]=\"{ width: widgetInstance.minWidth + 'px' }\"\r\n appearance=\"outline\"\r\n >\r\n <mat-label\r\n class=\"label\"\r\n [ngClass]=\"widgetInstance.cssLabelClass ?? ''\"\r\n *ngIf=\"!widgetInstance.showLabel\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </mat-label>\r\n <input\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [type]=\"'time'\"\r\n [value]=\"getTime()\"\r\n placeholder=\"{{ widgetInstance.placeholder }}\"\r\n matInput\r\n (blur)=\"onBlur?.next(widgetInstance)\"\r\n />\r\n <span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n matSuffix\r\n ></smart-icon>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.TOGGLE\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <mat-slide-toggle\r\n formControlName=\"{{ widgetInstance.key }}\"\r\n value=\"{{ widgetInstance.value }}\"\r\n (change)=\"onValueChange?.next($event)\"\r\n [labelPosition]=\"widgetInstance.toggleLabelPosition ?? 'before'\"\r\n >{{ !widgetInstance.showLabel ? widgetInstance.label : '' }}</mat-slide-toggle\r\n ><span class=\"mat-error\">\r\n {{ widgetInstance.error }}\r\n </span>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.error && widgetInstance.errorIcon\"\r\n [icon]=\"widgetInstance.errorIcon\"\r\n [color]=\"widgetInstance.errorIconColor ?? 'warn'\"\r\n ></smart-icon>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.INDICATOR\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"smartIndicator widgetContent\">\r\n <div class=\"indicatorItems\">\r\n <div\r\n *ngFor=\"let item of indicatorItems; let i = index\"\r\n class=\"indicatorItem\"\r\n [ngClass]=\"getIndicatorItemClass(i)\"\r\n ></div>\r\n </div>\r\n <p [ngClass]=\"getIndicatorStatusLabelColor()\">\r\n {{ getIndicatorStatusLabel() }}\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.FILE_UPLOADER\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <smartfileuploader\r\n class=\"widgetContent\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [fileFormats]=\"widgetInstance.fileFormats\"\r\n [maxSizeMb]=\"widgetInstance.maxSizeMb\"\r\n [i18n]=\"widgetInstance.i18n\"\r\n ></smartfileuploader>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.IMAGE\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <img\r\n class=\"widgetContent\"\r\n title=\"{{ widgetInstance.key }}\"\r\n [ngClass]=\"widgetInstance.imageCss ?? ''\"\r\n [src]=\"widgetInstance.value\"\r\n />\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.DIVIDER\" class=\"widgetContainer\">\r\n <hr class=\"smartDivider\" />\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.BUTTON\" class=\"widgetContainer\">\r\n <h4 class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"widgetContent\">\r\n <button\r\n mat-button\r\n [ngClass]=\"getButtonType(widgetInstance.uiActionDescriptor)\"\r\n [color]=\"widgetInstance.uiActionDescriptor?.color\"\r\n (click)=\"onButtonClicked(widgetInstance)\"\r\n >\r\n <div\r\n *ngIf=\"isOnlyIcon(widgetInstance.uiActionDescriptor); then iconOnly; else text\"\r\n ></div>\r\n <ng-template #iconOnly>\r\n <smart-icon\r\n *ngIf=\"widgetInstance.uiActionDescriptor?.icon\"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n </ng-template>\r\n <ng-template #text>\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.uiActionDescriptor?.icon &&\r\n widgetInstance.uiActionDescriptor?.iconPosition === 'PRE'\r\n \"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n {{ widgetInstance.uiActionDescriptor?.title }}\r\n <smart-icon\r\n *ngIf=\"\r\n widgetInstance.uiActionDescriptor?.icon &&\r\n widgetInstance.uiActionDescriptor?.iconPosition === 'POST'\r\n \"\r\n [icon]=\"widgetInstance.uiActionDescriptor!.icon!\"\r\n [color]=\"\r\n widgetInstance.uiActionDescriptor?.iconColor ??\r\n widgetInstance.uiActionDescriptor?.color\r\n \"\r\n ></smart-icon>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"widgetContainer\">\r\n <h4\r\n class=\"labelContainer\"\r\n *ngIf=\"widgetInstance.type === smartFormWidgetType.COMPONENT && widgetInstance.showLabel\"\r\n class=\"{{ labelColor }}\"\r\n >\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <div class=\"widgetContent\">\r\n <ng-template #customComponent></ng-template>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.RICH_TEXT\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <quill-editor\r\n [formControlName]=\"widgetInstance.key\"\r\n [id]=\"widgetInstance.key\"\r\n [modules]=\"widgetInstance.quillModules\"\r\n [placeholder]=\"widgetInstance.placeholder\"\r\n [readOnly]=\"widgetInstance.isReadonly\"\r\n ></quill-editor>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint ||\r\n widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.SORTABLE\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <div class=\"widgetContent\">\r\n <lib-sortable-widget\r\n [formControlName]=\"widgetInstance.key\"\r\n [widgetInstance]=\"widgetInstance\"\r\n ></lib-sortable-widget>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.MATRIX\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n\r\n <table class=\"matrixTable widgetContent\">\r\n <tr>\r\n <th></th>\r\n <th class=\"optionLabel\" *ngFor=\"let option of widgetInstance.value.columns\">\r\n {{ option.displayValue }}\r\n </th>\r\n </tr>\r\n <tr *ngFor=\"let question of widgetInstance.value.rows; let i = index\">\r\n <th class=\"questionLabel\">\r\n <label>{{ question.displayValue }}</label>\r\n </th>\r\n\r\n <td class=\"selectTd\" *ngFor=\"let option of widgetInstance.value.columns; let j = index\">\r\n <mat-radio-group\r\n *ngIf=\"!widgetInstance.isMultiple\"\r\n [formControlName]=\"widgetInstance.key + '.' + question.code\"\r\n [name]=\"'q' + i\"\r\n >\r\n <mat-radio-button [value]=\"option.code\"> </mat-radio-button>\r\n </mat-radio-group>\r\n <div *ngIf=\"widgetInstance.isMultiple\">\r\n <mat-checkbox\r\n [formControlName]=\"widgetInstance.key + '.data.' + question.code + '.' + option.code\"\r\n [value]=\"widgetInstance.value['data'][question.code][option.code]\"\r\n [checked]=\"true\"\r\n ></mat-checkbox>\r\n </div>\r\n </td>\r\n <br />\r\n <button *ngIf=\"widgetInstance.button\" mat-icon-button (click)=\"removeMatrixRow(question)\"\r\n ><smart-icon icon=\"close\"></smart-icon\r\n ></button>\r\n </tr>\r\n </table>\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.YOUTUBE_PLAYER\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\">\r\n <h4 *ngIf=\"widgetInstance.showLabel\" class=\"{{ labelColor }}\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <youtube-player\r\n videoId=\"{{ widgetInstance.videoId }}\"\r\n [width]=\"widgetInstance.width\"\r\n [height]=\"widgetInstance.height\"\r\n [startSeconds]=\"widgetInstance.startSeconds\"\r\n [endSeconds]=\"widgetInstance.endSeconds\"\r\n ></youtube-player>\r\n <mat-hint\r\n *ngIf=\"\r\n !widgetInstance?.hint || widgetInstance?.hint?.position === SmartWidgetHintPosition.INPUT\r\n \"\r\n >{{ widgetInstance.hint?.text }}</mat-hint\r\n >\r\n </div>\r\n <div *ngIf=\"widgetInstance.type === smartFormWidgetType.MONTH_PICKER\" class=\"widgetContainer\">\r\n <div class=\"labelContainer\" *ngIf=\"widgetInstance.showLabel\">\r\n <h4 class=\"{{ labelColor }} smart-form-widget-label\">\r\n {{ getWidgetLabel(widgetInstance) }}\r\n </h4>\r\n <mat-hint *ngIf=\"widgetInstance?.hint?.position === SmartWidgetHintPosition.LABEL\">{{\r\n widgetInstance.hint?.text\r\n }}</mat-hint>\r\n </div>\r\n <lib-smart-month-picker\r\n [widgetInstance]=\"widgetInstance\"\r\n (valueChange)=\"handleYearMonthPicked($event)\"\r\n ></lib-smart-month-picker>\r\n </div>\r\n</div>\r\n", styles: ["@import\"~quill/dist/quill.snow.css\";.checkbox-section,.radio-section{display:flex;flex-direction:column}.input{width:100%}.direction-col{display:flex;flex-direction:column;gap:.5em}.direction-row{display:flex;flex-direction:row;align-items:center;gap:.5em}.selecatbleObject{margin:.5em}.radioLabel{color:var(--primary-color);text-align:left!important}.container{height:100%}.input{height:100%;display:flex;flex-direction:column}.checkbox{flex-direction:column}.mat-form-field-wrapper{padding-bottom:0!important}.input .mat-standard-chip.mat-chip-with-trailing-icon{padding-right:12px}.time-picker{display:flex;flex-direction:row;height:100%;border:solid 2px lightgrey;padding:1em;border-radius:4px}.time-picker:hover{border-color:#000}::ng-deep .mat-h4 .mat-subheading-1 .mat-typography h4{margin:0}.label{margin:28px 0 8px}.smartIndicator{display:flex;flex-direction:column;gap:.25rem;width:-moz-fit-content;width:fit-content}.indicatorItems{display:flex;flex-direction:row;gap:.25rem}.indicatorItem{width:3rem;height:.25rem;background-color:#d3d3d3;border-radius:.5rem}.radio-error{width:-moz-fit-content;width:fit-content;display:flex;flex-direction:row;gap:.5rem}.mat-calendar-previous-button,.mat-calendar-next-button{padding:0;min-width:0;width:40px!important;height:40px!important;flex-shrink:0;line-height:40px;border-radius:50%}.mat-calendar-arrow{height:36px!important;display:flex!important;flex-direction:column!important;justify-content:center}.radio-item-container,.checkbox-item-container{display:flex;flex-direction:column}.widgetContent::ng-deep .ql-container{height:200px;width:460px}.dateTimePickerContainer{display:flex;flex-direction:row;gap:.25rem;max-width:225px}.date{width:125px}.time{width:90px}.date .mat-form-field-infix,.time .mat-form-field-infix{width:inherit!important}::ng-deep .mat-icon.mat-drag-indicator{--drag-indicator: #3b3b3b;color:var(--drag-indicator)}.matrixTable{width:100%;border-spacing:0 1rem}.matrixTable th{padding:.25rem}.matrixTable .optionLabel,.matrixTable td{text-align:center}.example-month-picker .mat-calendar-period-button{pointer-events:none}.example-month-picker .mat-calendar-arrow{display:none}\n"] }]
|
|
5317
5317
|
}], ctorParameters: function () { return [{ type: SmartFormService }, { type: ComponentFactoryService }]; }, propDecorators: { form: [{
|
|
5318
5318
|
type: Input
|
|
5319
5319
|
}], widgetInstance: [{
|
|
@@ -9465,125 +9465,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
9465
9465
|
args: ['forms']
|
|
9466
9466
|
}] } });
|
|
9467
9467
|
|
|
9468
|
-
class SmartFilterService {
|
|
9469
|
-
constructor() {
|
|
9470
|
-
this._destroy$ = new Subject();
|
|
9471
|
-
this.shouldSubmit = new Subject();
|
|
9472
|
-
this.reSubscribeToSubmit = new Subject();
|
|
9473
|
-
this.change = new Subject();
|
|
9474
|
-
}
|
|
9475
|
-
ngOnDestroy() {
|
|
9476
|
-
this._destroy$.next();
|
|
9477
|
-
this._destroy$.complete();
|
|
9478
|
-
}
|
|
9479
|
-
async submit() {
|
|
9480
|
-
this.shouldSubmit.next();
|
|
9481
|
-
await this.shouldSubmit.pipe(takeUntil(this._destroy$)).toPromise();
|
|
9482
|
-
this.shouldSubmit = new Subject();
|
|
9483
|
-
this.reSubscribeToSubmit.next();
|
|
9484
|
-
return this.filter;
|
|
9485
|
-
}
|
|
9486
|
-
}
|
|
9487
|
-
SmartFilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9488
|
-
SmartFilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, providedIn: 'root' });
|
|
9489
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, decorators: [{
|
|
9490
|
-
type: Injectable,
|
|
9491
|
-
args: [{
|
|
9492
|
-
providedIn: 'root',
|
|
9493
|
-
}]
|
|
9494
|
-
}], ctorParameters: function () { return []; } });
|
|
9495
|
-
|
|
9496
|
-
/**
|
|
9497
|
-
* Filter API 2
|
|
9498
|
-
* Filter API 2
|
|
9499
|
-
*
|
|
9500
|
-
* The version of the OpenAPI document: 1.0.0
|
|
9501
|
-
* Contact: info@it4all.hu
|
|
9502
|
-
*
|
|
9503
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9504
|
-
* https://openapi-generator.tech
|
|
9505
|
-
* Do not edit the class manually.
|
|
9506
|
-
*/
|
|
9507
|
-
const FilterExpressionBoolOperator$1 = {
|
|
9508
|
-
And: 'AND',
|
|
9509
|
-
Or: 'OR'
|
|
9510
|
-
};
|
|
9511
|
-
|
|
9512
|
-
/**
|
|
9513
|
-
* Filter API 2
|
|
9514
|
-
* Filter API 2
|
|
9515
|
-
*
|
|
9516
|
-
* The version of the OpenAPI document: 1.0.0
|
|
9517
|
-
* Contact: info@it4all.hu
|
|
9518
|
-
*
|
|
9519
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9520
|
-
* https://openapi-generator.tech
|
|
9521
|
-
* Do not edit the class manually.
|
|
9522
|
-
*/
|
|
9523
|
-
const FilterExpressionDataType = {
|
|
9524
|
-
String: 'STRING',
|
|
9525
|
-
Number: 'NUMBER',
|
|
9526
|
-
Date: 'DATE',
|
|
9527
|
-
DateTime: 'DATE_TIME',
|
|
9528
|
-
Boolean: 'BOOLEAN'
|
|
9529
|
-
};
|
|
9530
|
-
|
|
9531
|
-
/**
|
|
9532
|
-
* Filter API 2
|
|
9533
|
-
* Filter API 2
|
|
9534
|
-
*
|
|
9535
|
-
* The version of the OpenAPI document: 1.0.0
|
|
9536
|
-
* Contact: info@it4all.hu
|
|
9537
|
-
*
|
|
9538
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9539
|
-
* https://openapi-generator.tech
|
|
9540
|
-
* Do not edit the class manually.
|
|
9541
|
-
*/
|
|
9542
|
-
const FilterExpressionFieldWidgetType = {
|
|
9543
|
-
TextField: 'TEXT_FIELD',
|
|
9544
|
-
TextFieldChips: 'TEXT_FIELD_CHIPS',
|
|
9545
|
-
TextBox: 'TEXT_BOX',
|
|
9546
|
-
Select: 'SELECT',
|
|
9547
|
-
SelectMultiple: 'SELECT_MULTIPLE',
|
|
9548
|
-
Date: 'DATE',
|
|
9549
|
-
Time: 'TIME',
|
|
9550
|
-
DateTime: 'DATE_TIME',
|
|
9551
|
-
CheckBox: 'CHECK_BOX',
|
|
9552
|
-
RadioButton: 'RADIO_BUTTON',
|
|
9553
|
-
Range: 'RANGE'
|
|
9554
|
-
};
|
|
9555
|
-
|
|
9556
|
-
/**
|
|
9557
|
-
* Filter API 2
|
|
9558
|
-
* Filter API 2
|
|
9559
|
-
*
|
|
9560
|
-
* The version of the OpenAPI document: 1.0.0
|
|
9561
|
-
* Contact: info@it4all.hu
|
|
9562
|
-
*
|
|
9563
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9564
|
-
* https://openapi-generator.tech
|
|
9565
|
-
* Do not edit the class manually.
|
|
9566
|
-
*/
|
|
9567
|
-
const FilterExpressionOperation = {
|
|
9568
|
-
Expression: 'EXPRESSION',
|
|
9569
|
-
Equal: 'EQUAL',
|
|
9570
|
-
NotEqual: 'NOT_EQUAL',
|
|
9571
|
-
Less: 'LESS',
|
|
9572
|
-
LessOrEqual: 'LESS_OR_EQUAL',
|
|
9573
|
-
Greater: 'GREATER',
|
|
9574
|
-
GreaterOrEqual: 'GREATER_OR_EQUAL',
|
|
9575
|
-
Like: 'LIKE',
|
|
9576
|
-
NotLike: 'NOT_LIKE',
|
|
9577
|
-
Between: 'BETWEEN',
|
|
9578
|
-
NotBetween: 'NOT_BETWEEN',
|
|
9579
|
-
IsEmpty: 'IS_EMPTY',
|
|
9580
|
-
IsNotEmpty: 'IS_NOT_EMPTY',
|
|
9581
|
-
Exists: 'EXISTS',
|
|
9582
|
-
NotExists: 'NOT_EXISTS',
|
|
9583
|
-
In: 'IN',
|
|
9584
|
-
NotIn: 'NOT_IN'
|
|
9585
|
-
};
|
|
9586
|
-
|
|
9587
9468
|
/**
|
|
9588
9469
|
* Filter API 2
|
|
9589
9470
|
* Filter API 2
|
|
@@ -9599,452 +9480,158 @@ var FilterExpressionOrderBy;
|
|
|
9599
9480
|
(function (FilterExpressionOrderBy) {
|
|
9600
9481
|
FilterExpressionOrderBy.OrderEnum = {
|
|
9601
9482
|
Asc: 'ASC',
|
|
9602
|
-
Desc: 'DESC'
|
|
9483
|
+
Desc: 'DESC',
|
|
9603
9484
|
};
|
|
9604
9485
|
})(FilterExpressionOrderBy || (FilterExpressionOrderBy = {}));
|
|
9605
9486
|
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9487
|
+
var ExpandableSectionButtonType;
|
|
9488
|
+
(function (ExpandableSectionButtonType) {
|
|
9489
|
+
ExpandableSectionButtonType[ExpandableSectionButtonType["BUTTON"] = 0] = "BUTTON";
|
|
9490
|
+
ExpandableSectionButtonType[ExpandableSectionButtonType["MENU"] = 1] = "MENU";
|
|
9491
|
+
ExpandableSectionButtonType[ExpandableSectionButtonType["MENU_ITEM"] = 2] = "MENU_ITEM";
|
|
9492
|
+
})(ExpandableSectionButtonType || (ExpandableSectionButtonType = {}));
|
|
9493
|
+
var ExpandableSectionButtonIconPosition;
|
|
9494
|
+
(function (ExpandableSectionButtonIconPosition) {
|
|
9495
|
+
ExpandableSectionButtonIconPosition["PRE"] = "Pre";
|
|
9496
|
+
ExpandableSectionButtonIconPosition["POST"] = "Post";
|
|
9497
|
+
})(ExpandableSectionButtonIconPosition || (ExpandableSectionButtonIconPosition = {}));
|
|
9617
9498
|
|
|
9618
|
-
|
|
9619
|
-
(
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9499
|
+
class ExpandableSectionComponent {
|
|
9500
|
+
constructor(cfService) {
|
|
9501
|
+
this.cfService = cfService;
|
|
9502
|
+
this.stateChange = new Subject();
|
|
9503
|
+
}
|
|
9504
|
+
onStateChange(isOpened) {
|
|
9505
|
+
this.data.isExpanded = isOpened;
|
|
9506
|
+
this.stateChange.next(this.data);
|
|
9507
|
+
if (this.data.stateChanged) {
|
|
9508
|
+
this.data.stateChanged.next({
|
|
9509
|
+
data: this.data.data,
|
|
9510
|
+
isExpanded: isOpened,
|
|
9511
|
+
index: this.data.index,
|
|
9512
|
+
});
|
|
9513
|
+
}
|
|
9514
|
+
}
|
|
9515
|
+
ngOnInit() { }
|
|
9516
|
+
ngAfterViewInit() {
|
|
9517
|
+
if (this.data.headerComponent) {
|
|
9518
|
+
this.cfService.createComponent(this.vcRefheader, this.data.headerComponent, new Map([
|
|
9519
|
+
[this.data.headerInputName ?? '', this.data.headerData],
|
|
9520
|
+
['stateChange', this.stateChange],
|
|
9521
|
+
['index', this.data.index],
|
|
9522
|
+
['sectionIndex', this.index],
|
|
9523
|
+
]));
|
|
9524
|
+
}
|
|
9525
|
+
this.componentRef = this.cfService.createComponent(this.vcRef, this.data.customComponent, new Map([
|
|
9526
|
+
[this.data.inputName ?? '', this.data.data],
|
|
9527
|
+
['stateChange', this.stateChange],
|
|
9528
|
+
['index', this.data.index],
|
|
9529
|
+
['sectionIndex', this.index],
|
|
9530
|
+
]));
|
|
9531
|
+
}
|
|
9532
|
+
action(button, event) {
|
|
9533
|
+
event.stopPropagation();
|
|
9534
|
+
if (!button.callback) {
|
|
9535
|
+
throw new Error(`Button with name ${button.label} or icon ${button.icon} does not have a callback!`);
|
|
9536
|
+
}
|
|
9537
|
+
button.callback(button.args);
|
|
9538
|
+
}
|
|
9539
|
+
setExpanded() { }
|
|
9540
|
+
type() {
|
|
9541
|
+
return ExpandableSectionButtonType;
|
|
9542
|
+
}
|
|
9543
|
+
position() {
|
|
9544
|
+
return ExpandableSectionButtonIconPosition;
|
|
9545
|
+
}
|
|
9546
|
+
customButtonClicked(event, button, element) {
|
|
9547
|
+
event.stopPropagation();
|
|
9548
|
+
if (!button.callback) {
|
|
9549
|
+
throw new Error(`Button with name ${button.label} or icon ${button.icon} does not have a callback!`);
|
|
9550
|
+
}
|
|
9551
|
+
button.callback(button.args, element);
|
|
9552
|
+
}
|
|
9553
|
+
}
|
|
9554
|
+
ExpandableSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ExpandableSectionComponent, deps: [{ token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9555
|
+
ExpandableSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: { data: "data", index: "index" }, viewQueries: [{ propertyName: "vcRef", first: true, predicate: ["renderComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "vcRefheader", first: true, predicate: ["headerComponent"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"section-container\" [ngClass]=\"data.cssClass ?? ''\">\r\n <mat-expansion-panel\r\n [expanded]=\"data.isExpanded\"\r\n (opened)=\"onStateChange(true)\"\r\n (closed)=\"onStateChange(false)\"\r\n >\r\n <mat-expansion-panel-header *ngIf=\"data.headerComponent\">\r\n <ng-template #headerComponent></ng-template>\r\n </mat-expansion-panel-header>\r\n <mat-expansion-panel-header *ngIf=\"!data.headerComponent\">\r\n <mat-panel-title> {{ data.title }} </mat-panel-title>\r\n <div class=\"btn-container\" *ngIf=\"data.button\">\r\n <button\r\n *ngIf=\"data.button.type === type().BUTTON\"\r\n class=\"btn\"\r\n (click)=\"action(data.button, $event)\"\r\n mat-stroked-button\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n data.button.icon &&\r\n (!data.button.iconPosition ||\r\n data.button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n {{ data.button.label }}\r\n <smart-icon\r\n *ngIf=\"data.button.icon && data.button.iconPosition === position().POST\"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n </button>\r\n <button\r\n *ngIf=\"data.button.type === type().MENU\"\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n color=\"{{ data.button.color }}\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n data.button.icon &&\r\n (!data.button.iconPosition ||\r\n data.button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon\r\n >{{ data.button.label }}\r\n <smart-icon\r\n *ngIf=\"data.button.icon && data.button.iconPosition === position().POST\"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n *ngFor=\"let button of data.button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, button, data.index)\"\r\n mat-menu-item\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n button.icon &&\r\n (!button.iconPosition || button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"button.icon\"\r\n ></smart-icon\r\n >{{ button.label }}\r\n <smart-icon\r\n *ngIf=\"button.icon && button.iconPosition === position().POST\"\r\n [icon]=\"button.icon\"\r\n ></smart-icon>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </mat-expansion-panel-header>\r\n <ng-template #renderComponent></ng-template>\r\n </mat-expansion-panel>\r\n</div>\r\n", styles: [".section-container{margin-bottom:50px}:host::ng-deep .mat-expansion-panel-header{background:var(--primary-lighter-color)}:host::ng-deep .mat-expansion-panel-header-title{color:var(--primary-color)}:host::ng-deep .btn-container{margin:1em 3em 1em 1em}:host::ng-deep .btn{border-radius:24px}\n"], components: [{ type: i2$6.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i2$6.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { type: i3.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: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$6.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
9556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ExpandableSectionComponent, decorators: [{
|
|
9557
|
+
type: Component,
|
|
9558
|
+
args: [{ selector: 'smart-expandable-section', template: "<div class=\"section-container\" [ngClass]=\"data.cssClass ?? ''\">\r\n <mat-expansion-panel\r\n [expanded]=\"data.isExpanded\"\r\n (opened)=\"onStateChange(true)\"\r\n (closed)=\"onStateChange(false)\"\r\n >\r\n <mat-expansion-panel-header *ngIf=\"data.headerComponent\">\r\n <ng-template #headerComponent></ng-template>\r\n </mat-expansion-panel-header>\r\n <mat-expansion-panel-header *ngIf=\"!data.headerComponent\">\r\n <mat-panel-title> {{ data.title }} </mat-panel-title>\r\n <div class=\"btn-container\" *ngIf=\"data.button\">\r\n <button\r\n *ngIf=\"data.button.type === type().BUTTON\"\r\n class=\"btn\"\r\n (click)=\"action(data.button, $event)\"\r\n mat-stroked-button\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n data.button.icon &&\r\n (!data.button.iconPosition ||\r\n data.button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n {{ data.button.label }}\r\n <smart-icon\r\n *ngIf=\"data.button.icon && data.button.iconPosition === position().POST\"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n </button>\r\n <button\r\n *ngIf=\"data.button.type === type().MENU\"\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n color=\"{{ data.button.color }}\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n data.button.icon &&\r\n (!data.button.iconPosition ||\r\n data.button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon\r\n >{{ data.button.label }}\r\n <smart-icon\r\n *ngIf=\"data.button.icon && data.button.iconPosition === position().POST\"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n *ngFor=\"let button of data.button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, button, data.index)\"\r\n mat-menu-item\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n button.icon &&\r\n (!button.iconPosition || button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"button.icon\"\r\n ></smart-icon\r\n >{{ button.label }}\r\n <smart-icon\r\n *ngIf=\"button.icon && button.iconPosition === position().POST\"\r\n [icon]=\"button.icon\"\r\n ></smart-icon>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </mat-expansion-panel-header>\r\n <ng-template #renderComponent></ng-template>\r\n </mat-expansion-panel>\r\n</div>\r\n", styles: [".section-container{margin-bottom:50px}:host::ng-deep .mat-expansion-panel-header{background:var(--primary-lighter-color)}:host::ng-deep .mat-expansion-panel-header-title{color:var(--primary-color)}:host::ng-deep .btn-container{margin:1em 3em 1em 1em}:host::ng-deep .btn{border-radius:24px}\n"] }]
|
|
9559
|
+
}], ctorParameters: function () { return [{ type: ComponentFactoryService }]; }, propDecorators: { data: [{
|
|
9560
|
+
type: Input
|
|
9561
|
+
}], index: [{
|
|
9562
|
+
type: Input
|
|
9563
|
+
}], vcRef: [{
|
|
9564
|
+
type: ViewChild,
|
|
9565
|
+
args: ['renderComponent', { read: ViewContainerRef }]
|
|
9566
|
+
}], vcRefheader: [{
|
|
9567
|
+
type: ViewChild,
|
|
9568
|
+
args: ['headerComponent', { read: ViewContainerRef }]
|
|
9569
|
+
}] } });
|
|
9626
9570
|
|
|
9627
|
-
class
|
|
9628
|
-
constructor(service, cfService) {
|
|
9571
|
+
class SmartGridComponent {
|
|
9572
|
+
constructor(service, cfService, dialog, uiActionDescriptorService) {
|
|
9629
9573
|
this.service = service;
|
|
9630
9574
|
this.cfService = cfService;
|
|
9575
|
+
this.dialog = dialog;
|
|
9576
|
+
this.uiActionDescriptorService = uiActionDescriptorService;
|
|
9577
|
+
// private readonly defaultPageSize: number = 10;
|
|
9578
|
+
this.defaultPageSizeOptions = [5, 10, 25, 50];
|
|
9631
9579
|
this._destroy$ = new Subject();
|
|
9580
|
+
this.dev = false;
|
|
9581
|
+
this.pageSizeOptions = this.defaultPageSizeOptions;
|
|
9582
|
+
this.selectionChanges = new Subject();
|
|
9583
|
+
this.uiActionDescriptors = new Map();
|
|
9584
|
+
this.afterViewInitExecuted = false;
|
|
9585
|
+
this.isBlocked = true;
|
|
9586
|
+
this.getLevel = (node) => node.level ?? 0;
|
|
9587
|
+
this.isExpandable = (node) => (node.children && node.children.length > 0 ? true : false);
|
|
9588
|
+
this.getChildren = (node) => {
|
|
9589
|
+
if (node.children) {
|
|
9590
|
+
let rows = this.smartGrid?.gridModel.page.rows?.filter((row) => node.children?.some((child) => child === row.id));
|
|
9591
|
+
if (rows) {
|
|
9592
|
+
return rows;
|
|
9593
|
+
}
|
|
9594
|
+
}
|
|
9595
|
+
return [];
|
|
9596
|
+
};
|
|
9597
|
+
this.hasChild = (_, _nodeData) => this.isExpandable(_nodeData);
|
|
9598
|
+
this.transformer = (row, level) => {
|
|
9599
|
+
row.level = level;
|
|
9600
|
+
return row;
|
|
9601
|
+
};
|
|
9602
|
+
this.service.gridModelChanged.subscribe(() => {
|
|
9603
|
+
// called after every service call (load, save, refresh, etc.)
|
|
9604
|
+
this.smartGrid.gridModel = this.service.gridModel;
|
|
9605
|
+
this.render();
|
|
9606
|
+
});
|
|
9632
9607
|
}
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9608
|
+
ngOnChanges(changes) {
|
|
9609
|
+
if (changes['smartGrid']) {
|
|
9610
|
+
this.smartGrid = changes['smartGrid'].currentValue;
|
|
9611
|
+
this.service.paginator = this.smartGrid?.paginator;
|
|
9612
|
+
this.setupToolbar();
|
|
9613
|
+
}
|
|
9614
|
+
if (changes['uuid']) {
|
|
9615
|
+
this.uuid = changes['uuid'].currentValue;
|
|
9616
|
+
}
|
|
9617
|
+
if (this.afterViewInitExecuted && this.uuid && this.smartGrid) {
|
|
9618
|
+
this.refresh();
|
|
9619
|
+
}
|
|
9639
9620
|
}
|
|
9640
9621
|
ngOnDestroy() {
|
|
9641
9622
|
this._destroy$.next();
|
|
9642
9623
|
this._destroy$.complete();
|
|
9643
9624
|
}
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9625
|
+
ngAfterViewInit() {
|
|
9626
|
+
if (this.dev) {
|
|
9627
|
+
// for dev purposes
|
|
9628
|
+
this.service.gridModel = this.smartGrid.gridModel;
|
|
9629
|
+
this.render();
|
|
9648
9630
|
}
|
|
9649
|
-
|
|
9650
|
-
|
|
9631
|
+
if (this.uuid && this.smartGrid && !this.dev) {
|
|
9632
|
+
this.refresh();
|
|
9651
9633
|
}
|
|
9652
|
-
|
|
9653
|
-
key,
|
|
9654
|
-
label,
|
|
9655
|
-
type,
|
|
9656
|
-
value: '',
|
|
9657
|
-
showLabel: true,
|
|
9658
|
-
valueList: possibleValues.map((value) => {
|
|
9659
|
-
return {
|
|
9660
|
-
key: value.objectUri ? value.objectUri : value.code,
|
|
9661
|
-
label: value.displayValue,
|
|
9662
|
-
type: SmartFormWidgetType.ITEM,
|
|
9663
|
-
value: value.objectUri ? value.objectUri : value.code,
|
|
9664
|
-
};
|
|
9665
|
-
}),
|
|
9666
|
-
};
|
|
9667
|
-
return widget;
|
|
9668
|
-
}
|
|
9669
|
-
constructForm() {
|
|
9670
|
-
this.vcRefForm?.clear();
|
|
9671
|
-
let widgets = [];
|
|
9672
|
-
let key;
|
|
9673
|
-
if (this.filterExpressionField.widgetType === 'SELECT_MULTIPLE') {
|
|
9674
|
-
key = 'expressionData.operand2.selectedValues';
|
|
9675
|
-
}
|
|
9676
|
-
if (this.filterExpressionField.expressionData?.operand2) {
|
|
9677
|
-
if (key !== 'expressionData.operand2.selectedValues') {
|
|
9678
|
-
key = 'expressionData.operand2.valueAsString';
|
|
9679
|
-
}
|
|
9680
|
-
widgets.push(this.constructFormWidget(key, this.filterExpressionField.label2, this.filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.TextField, this.filterExpressionField.possibleValues));
|
|
9681
|
-
}
|
|
9682
|
-
if (this.filterExpressionField.expressionData?.operand3) {
|
|
9683
|
-
if (key !== 'selectedValues') {
|
|
9684
|
-
key = 'expressionData.operand3.valueAsString';
|
|
9685
|
-
}
|
|
9686
|
-
widgets.push(this.constructFormWidget(key, this.filterExpressionField.label3, this.filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.TextField, this.filterExpressionField.possibleValues));
|
|
9687
|
-
}
|
|
9688
|
-
this.operation = this.filterExpressionField.expressionData?.currentOperation;
|
|
9689
|
-
this.currentOperation = this.getOptionLabel(this.operation);
|
|
9690
|
-
this.smartForm = {
|
|
9691
|
-
direction: SmartFormWidgetDirection.ROW,
|
|
9692
|
-
componentModel: { data: this.filterExpressionField },
|
|
9693
|
-
useOnValueChangeEvent: true,
|
|
9694
|
-
useOnBlurEvent: true,
|
|
9695
|
-
submitOnEnter: this.service.filter?.submitOnEnter,
|
|
9696
|
-
widgets,
|
|
9697
|
-
translateService: this.service.filter?.translateService,
|
|
9698
|
-
};
|
|
9699
|
-
// Show form on page
|
|
9700
|
-
this.componentRefForm = this.cfService.createComponent(this.vcRefForm, SmartformComponent, new Map([['smartForm', this.smartForm]]));
|
|
9701
|
-
this.componentRefForm.instance.onValueChangeSubject
|
|
9702
|
-
?.pipe(takeUntil(this._destroy$))
|
|
9703
|
-
.subscribe(() => {
|
|
9704
|
-
this.submit();
|
|
9705
|
-
this.service.change.next();
|
|
9706
|
-
});
|
|
9707
|
-
this.componentRefForm.instance.onBlurSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
9708
|
-
this.submit();
|
|
9709
|
-
this.service.change.next();
|
|
9710
|
-
});
|
|
9711
|
-
}
|
|
9712
|
-
submit() {
|
|
9713
|
-
let form = this.componentRefForm.instance.submitForm();
|
|
9714
|
-
this.filterExpressionField = form.componentModel?.data;
|
|
9715
|
-
this.simpleFieldChildren.forEach((smartFilterFieldComponent, index) => {
|
|
9716
|
-
let filterExpressionField = smartFilterFieldComponent.submit();
|
|
9717
|
-
this.filterExpressionField.subFieldList.filters[index] = filterExpressionField;
|
|
9718
|
-
});
|
|
9719
|
-
return this.filterExpressionField;
|
|
9720
|
-
}
|
|
9721
|
-
optionSelected(option) {
|
|
9722
|
-
let oldOption = this.componentRefForm.instance.smartForm.componentModel.data.expressionData
|
|
9723
|
-
.currentOperation;
|
|
9724
|
-
this.componentRefForm.instance.smartForm.componentModel.data.expressionData.currentOperation =
|
|
9725
|
-
option;
|
|
9726
|
-
this.operation = option;
|
|
9727
|
-
this.currentOperation = this.getOptionLabel(this.operation);
|
|
9728
|
-
if (oldOption !== FilterExpressionOperation.Between &&
|
|
9729
|
-
option === FilterExpressionOperation.Between) {
|
|
9730
|
-
this.submit();
|
|
9731
|
-
let label = this.filterExpressionField.label2;
|
|
9732
|
-
this.filterExpressionField.label2 = `${label} - tól`;
|
|
9733
|
-
this.filterExpressionField.label3 = `${label} - ig`;
|
|
9734
|
-
this.filterExpressionField.expressionData.operand3 = {
|
|
9735
|
-
isDataName: this.filterExpressionField.expressionData.operand2?.isDataName,
|
|
9736
|
-
type: this.filterExpressionField.expressionData.operand3?.type,
|
|
9737
|
-
valueAsString: this.filterExpressionField.expressionData.operand3?.valueAsString,
|
|
9738
|
-
selectedValues: this.filterExpressionField.expressionData.operand3?.selectedValues,
|
|
9739
|
-
};
|
|
9740
|
-
this.constructForm();
|
|
9741
|
-
}
|
|
9742
|
-
else if (oldOption === FilterExpressionOperation.Between &&
|
|
9743
|
-
option !== FilterExpressionOperation.Between) {
|
|
9744
|
-
let label = this.filterExpressionField.label2.replace(' - tól', '');
|
|
9745
|
-
this.filterExpressionField.label2 = `${label}`;
|
|
9746
|
-
this.filterExpressionField.label3 = undefined;
|
|
9747
|
-
this.filterExpressionField.expressionData.operand3 = undefined;
|
|
9748
|
-
this.constructForm();
|
|
9749
|
-
}
|
|
9750
|
-
}
|
|
9751
|
-
getOptionLabel(option) {
|
|
9752
|
-
if (!option) {
|
|
9753
|
-
return '';
|
|
9754
|
-
}
|
|
9755
|
-
else if (this.operationTranslator) {
|
|
9756
|
-
return this.operationTranslator(option);
|
|
9757
|
-
}
|
|
9758
|
-
return option;
|
|
9759
|
-
}
|
|
9760
|
-
}
|
|
9761
|
-
SmartFilterSimpleFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleFieldComponent, deps: [{ token: SmartFilterService }, { token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9762
|
-
SmartFilterSimpleFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterSimpleFieldComponent, selector: "smart-filter-simple-field", inputs: { operationTranslator: "operationTranslator", filterExpressionField: "filterExpressionField", showPossibleActions: "showPossibleActions" }, viewQueries: [{ propertyName: "vcRefForm", first: true, predicate: ["form"], descendants: true, read: ViewContainerRef }, { propertyName: "simpleFieldChildren", predicate: ["simpleField"], descendants: true }], ngImport: i0, template: "<div class=\"smart-filter-simple-field-container\">\r\n <div class=\"smart-filter-simple-field-form-widget\">\r\n <div\r\n class=\"smart-filter-simple-field-form-widget-row\"\r\n *ngIf=\"showPossibleActions\"\r\n >\r\n <p>({{ currentOperation }})</p>\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n aria-label=\"Example icon-button with a menu\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let option of filterExpressionField.possibleOperations\"\r\n (click)=\"optionSelected(option)\"\r\n >\r\n <span>\r\n {{ getOptionLabel(option) }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <ng-template #form></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".smart-filter-simple-field-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-form-widget{padding:1rem;border-radius:1rem;display:flex;flex-direction:column}.smart-filter-simple-field-form-widget-row{display:flex;flex-direction:row;justify-content:space-between}.smart-filter-simple-field-form-widget-row p{color:#00000042}.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button{height:24px;width:24px}.smart-filter-simple-field-form-widget ::ng-deep .mat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-flat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-stroked-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-raised-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-fab .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-mini-fab .mat-button-wrapper>*{vertical-align:inherit!important}.smart-filter-simple-field-subfields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-container ::ng-deep h4{margin:0}\n"], components: [{ type: i3.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
9763
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleFieldComponent, decorators: [{
|
|
9764
|
-
type: Component,
|
|
9765
|
-
args: [{ selector: 'smart-filter-simple-field', template: "<div class=\"smart-filter-simple-field-container\">\r\n <div class=\"smart-filter-simple-field-form-widget\">\r\n <div\r\n class=\"smart-filter-simple-field-form-widget-row\"\r\n *ngIf=\"showPossibleActions\"\r\n >\r\n <p>({{ currentOperation }})</p>\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n aria-label=\"Example icon-button with a menu\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let option of filterExpressionField.possibleOperations\"\r\n (click)=\"optionSelected(option)\"\r\n >\r\n <span>\r\n {{ getOptionLabel(option) }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <ng-template #form></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".smart-filter-simple-field-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-form-widget{padding:1rem;border-radius:1rem;display:flex;flex-direction:column}.smart-filter-simple-field-form-widget-row{display:flex;flex-direction:row;justify-content:space-between}.smart-filter-simple-field-form-widget-row p{color:#00000042}.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button{height:24px;width:24px}.smart-filter-simple-field-form-widget ::ng-deep .mat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-flat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-stroked-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-raised-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-fab .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-mini-fab .mat-button-wrapper>*{vertical-align:inherit!important}.smart-filter-simple-field-subfields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-container ::ng-deep h4{margin:0}\n"] }]
|
|
9766
|
-
}], ctorParameters: function () { return [{ type: SmartFilterService }, { type: ComponentFactoryService }]; }, propDecorators: { simpleFieldChildren: [{
|
|
9767
|
-
type: ViewChildren,
|
|
9768
|
-
args: ['simpleField']
|
|
9769
|
-
}], operationTranslator: [{
|
|
9770
|
-
type: Input
|
|
9771
|
-
}], filterExpressionField: [{
|
|
9772
|
-
type: Input
|
|
9773
|
-
}], showPossibleActions: [{
|
|
9774
|
-
type: Input
|
|
9775
|
-
}], vcRefForm: [{
|
|
9776
|
-
type: ViewChild,
|
|
9777
|
-
args: ['form', { read: ViewContainerRef }]
|
|
9778
|
-
}] } });
|
|
9779
|
-
|
|
9780
|
-
class SmartFilterSimpleComponent {
|
|
9781
|
-
constructor(service) {
|
|
9782
|
-
this.service = service;
|
|
9783
|
-
this._destroy$ = new Subject();
|
|
9784
|
-
this.service.reSubscribeToSubmit.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
9785
|
-
this.subscribeToSubmit();
|
|
9786
|
-
});
|
|
9787
|
-
this.subscribeToSubmit();
|
|
9788
|
-
}
|
|
9789
|
-
ngOnInit() {
|
|
9790
|
-
this.smartFilter = this.service.filter;
|
|
9791
|
-
}
|
|
9792
|
-
ngOnDestroy() {
|
|
9793
|
-
this._destroy$.next();
|
|
9794
|
-
this._destroy$.complete();
|
|
9795
|
-
}
|
|
9796
|
-
subscribeToSubmit() {
|
|
9797
|
-
this.service.shouldSubmit.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
9798
|
-
this.submit();
|
|
9799
|
-
});
|
|
9800
|
-
}
|
|
9801
|
-
submit() {
|
|
9802
|
-
this.simpleFieldChildren.forEach((smartFilterFieldComponent, index) => {
|
|
9803
|
-
this.smartFilter.data[index] = smartFilterFieldComponent.submit();
|
|
9804
|
-
});
|
|
9805
|
-
this.service.filter = this.smartFilter;
|
|
9806
|
-
this.service.shouldSubmit.complete();
|
|
9807
|
-
}
|
|
9808
|
-
}
|
|
9809
|
-
SmartFilterSimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleComponent, deps: [{ token: SmartFilterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9810
|
-
SmartFilterSimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterSimpleComponent, selector: "smart-filter-simple", viewQueries: [{ propertyName: "simpleFieldChildren", predicate: ["simpleField"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"smartFilter\" class=\"smart-simple-fields-container\">\r\n <div *ngFor=\"let filterExpressionField of smartFilter.data; let i = index\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n <div *ngFor=\"let subfilterExpressionField of filterExpressionField.subFieldList?.filters\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".smart-simple-fields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem;justify-content:center}\n"], components: [{ type: SmartFilterSimpleFieldComponent, selector: "smart-filter-simple-field", inputs: ["operationTranslator", "filterExpressionField", "showPossibleActions"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
9811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleComponent, decorators: [{
|
|
9812
|
-
type: Component,
|
|
9813
|
-
args: [{ selector: "smart-filter-simple", template: "<div *ngIf=\"smartFilter\" class=\"smart-simple-fields-container\">\r\n <div *ngFor=\"let filterExpressionField of smartFilter.data; let i = index\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n <div *ngFor=\"let subfilterExpressionField of filterExpressionField.subFieldList?.filters\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".smart-simple-fields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem;justify-content:center}\n"] }]
|
|
9814
|
-
}], ctorParameters: function () { return [{ type: SmartFilterService }]; }, propDecorators: { simpleFieldChildren: [{
|
|
9815
|
-
type: ViewChildren,
|
|
9816
|
-
args: ["simpleField"]
|
|
9817
|
-
}] } });
|
|
9818
|
-
|
|
9819
|
-
class SmartFilterComponent {
|
|
9820
|
-
constructor(service) {
|
|
9821
|
-
this.service = service;
|
|
9822
|
-
}
|
|
9823
|
-
ngOnInit() {
|
|
9824
|
-
if (this.filter) {
|
|
9825
|
-
this.setUp();
|
|
9826
|
-
}
|
|
9827
|
-
}
|
|
9828
|
-
ngOnChanges(changes) {
|
|
9829
|
-
if (changes['filter'].currentValue) {
|
|
9830
|
-
this.setUp();
|
|
9831
|
-
}
|
|
9832
|
-
}
|
|
9833
|
-
setUp() {
|
|
9834
|
-
this.service.filter = this.filter;
|
|
9835
|
-
}
|
|
9836
|
-
async submit() {
|
|
9837
|
-
return await this.service.submit();
|
|
9838
|
-
}
|
|
9839
|
-
}
|
|
9840
|
-
SmartFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterComponent, deps: [{ token: SmartFilterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9841
|
-
SmartFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterComponent, selector: "smart-filter", inputs: { filter: "filter" }, providers: [SmartFilterService], usesOnChanges: true, ngImport: i0, template: "<smart-filter-simple *ngIf=\"filter\" #simpleFilter></smart-filter-simple>\r\n", styles: [""], components: [{ type: SmartFilterSimpleComponent, selector: "smart-filter-simple" }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
9842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterComponent, decorators: [{
|
|
9843
|
-
type: Component,
|
|
9844
|
-
args: [{ selector: 'smart-filter', providers: [SmartFilterService], template: "<smart-filter-simple *ngIf=\"filter\" #simpleFilter></smart-filter-simple>\r\n", styles: [""] }]
|
|
9845
|
-
}], ctorParameters: function () { return [{ type: SmartFilterService }]; }, propDecorators: { filter: [{
|
|
9846
|
-
type: Input
|
|
9847
|
-
}] } });
|
|
9848
|
-
|
|
9849
|
-
class SmartFilterExpressionFieldComponent {
|
|
9850
|
-
constructor() { }
|
|
9851
|
-
ngOnInit() {
|
|
9852
|
-
}
|
|
9853
|
-
}
|
|
9854
|
-
SmartFilterExpressionFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9855
|
-
SmartFilterExpressionFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterExpressionFieldComponent, selector: "lib-smart-filter-expression-field", ngImport: i0, template: "", styles: [""] });
|
|
9856
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionFieldComponent, decorators: [{
|
|
9857
|
-
type: Component,
|
|
9858
|
-
args: [{ selector: 'lib-smart-filter-expression-field', template: "", styles: [""] }]
|
|
9859
|
-
}], ctorParameters: function () { return []; } });
|
|
9860
|
-
|
|
9861
|
-
class SmartFilterModule {
|
|
9862
|
-
}
|
|
9863
|
-
SmartFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9864
|
-
SmartFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, declarations: [SmartFilterComponent,
|
|
9865
|
-
SmartFilterExpressionFieldComponent,
|
|
9866
|
-
SmartFilterSimpleComponent,
|
|
9867
|
-
SmartFilterSimpleFieldComponent], imports: [BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule], exports: [SmartFilterComponent] });
|
|
9868
|
-
SmartFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, imports: [[BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule]] });
|
|
9869
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, decorators: [{
|
|
9870
|
-
type: NgModule,
|
|
9871
|
-
args: [{
|
|
9872
|
-
declarations: [
|
|
9873
|
-
SmartFilterComponent,
|
|
9874
|
-
SmartFilterExpressionFieldComponent,
|
|
9875
|
-
SmartFilterSimpleComponent,
|
|
9876
|
-
SmartFilterSimpleFieldComponent,
|
|
9877
|
-
],
|
|
9878
|
-
imports: [BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule],
|
|
9879
|
-
exports: [SmartFilterComponent],
|
|
9880
|
-
}]
|
|
9881
|
-
}] });
|
|
9882
|
-
|
|
9883
|
-
var SmartFilterPosition;
|
|
9884
|
-
(function (SmartFilterPosition) {
|
|
9885
|
-
SmartFilterPosition[SmartFilterPosition["TOP"] = 0] = "TOP";
|
|
9886
|
-
SmartFilterPosition[SmartFilterPosition["BOTTOM"] = 1] = "BOTTOM";
|
|
9887
|
-
SmartFilterPosition[SmartFilterPosition["LEFT"] = 2] = "LEFT";
|
|
9888
|
-
SmartFilterPosition[SmartFilterPosition["RIGHT"] = 3] = "RIGHT";
|
|
9889
|
-
})(SmartFilterPosition || (SmartFilterPosition = {}));
|
|
9890
|
-
var SmartFilterType;
|
|
9891
|
-
(function (SmartFilterType) {
|
|
9892
|
-
SmartFilterType[SmartFilterType["SIMPLE"] = 0] = "SIMPLE";
|
|
9893
|
-
SmartFilterType[SmartFilterType["ADVANCED"] = 1] = "ADVANCED";
|
|
9894
|
-
})(SmartFilterType || (SmartFilterType = {}));
|
|
9895
|
-
|
|
9896
|
-
/*
|
|
9897
|
-
* Public API Surface of smart-filter
|
|
9898
|
-
*/
|
|
9899
|
-
|
|
9900
|
-
var ExpandableSectionButtonType;
|
|
9901
|
-
(function (ExpandableSectionButtonType) {
|
|
9902
|
-
ExpandableSectionButtonType[ExpandableSectionButtonType["BUTTON"] = 0] = "BUTTON";
|
|
9903
|
-
ExpandableSectionButtonType[ExpandableSectionButtonType["MENU"] = 1] = "MENU";
|
|
9904
|
-
ExpandableSectionButtonType[ExpandableSectionButtonType["MENU_ITEM"] = 2] = "MENU_ITEM";
|
|
9905
|
-
})(ExpandableSectionButtonType || (ExpandableSectionButtonType = {}));
|
|
9906
|
-
var ExpandableSectionButtonIconPosition;
|
|
9907
|
-
(function (ExpandableSectionButtonIconPosition) {
|
|
9908
|
-
ExpandableSectionButtonIconPosition["PRE"] = "Pre";
|
|
9909
|
-
ExpandableSectionButtonIconPosition["POST"] = "Post";
|
|
9910
|
-
})(ExpandableSectionButtonIconPosition || (ExpandableSectionButtonIconPosition = {}));
|
|
9911
|
-
|
|
9912
|
-
class ExpandableSectionComponent {
|
|
9913
|
-
constructor(cfService) {
|
|
9914
|
-
this.cfService = cfService;
|
|
9915
|
-
this.stateChange = new Subject();
|
|
9916
|
-
}
|
|
9917
|
-
onStateChange(isOpened) {
|
|
9918
|
-
this.data.isExpanded = isOpened;
|
|
9919
|
-
this.stateChange.next(this.data);
|
|
9920
|
-
if (this.data.stateChanged) {
|
|
9921
|
-
this.data.stateChanged.next({
|
|
9922
|
-
data: this.data.data,
|
|
9923
|
-
isExpanded: isOpened,
|
|
9924
|
-
index: this.data.index,
|
|
9925
|
-
});
|
|
9926
|
-
}
|
|
9927
|
-
}
|
|
9928
|
-
ngOnInit() { }
|
|
9929
|
-
ngAfterViewInit() {
|
|
9930
|
-
if (this.data.headerComponent) {
|
|
9931
|
-
this.cfService.createComponent(this.vcRefheader, this.data.headerComponent, new Map([
|
|
9932
|
-
[this.data.headerInputName ?? '', this.data.headerData],
|
|
9933
|
-
['stateChange', this.stateChange],
|
|
9934
|
-
['index', this.data.index],
|
|
9935
|
-
['sectionIndex', this.index],
|
|
9936
|
-
]));
|
|
9937
|
-
}
|
|
9938
|
-
this.componentRef = this.cfService.createComponent(this.vcRef, this.data.customComponent, new Map([
|
|
9939
|
-
[this.data.inputName ?? '', this.data.data],
|
|
9940
|
-
['stateChange', this.stateChange],
|
|
9941
|
-
['index', this.data.index],
|
|
9942
|
-
['sectionIndex', this.index],
|
|
9943
|
-
]));
|
|
9944
|
-
}
|
|
9945
|
-
action(button, event) {
|
|
9946
|
-
event.stopPropagation();
|
|
9947
|
-
if (!button.callback) {
|
|
9948
|
-
throw new Error(`Button with name ${button.label} or icon ${button.icon} does not have a callback!`);
|
|
9949
|
-
}
|
|
9950
|
-
button.callback(button.args);
|
|
9951
|
-
}
|
|
9952
|
-
setExpanded() { }
|
|
9953
|
-
type() {
|
|
9954
|
-
return ExpandableSectionButtonType;
|
|
9955
|
-
}
|
|
9956
|
-
position() {
|
|
9957
|
-
return ExpandableSectionButtonIconPosition;
|
|
9958
|
-
}
|
|
9959
|
-
customButtonClicked(event, button, element) {
|
|
9960
|
-
event.stopPropagation();
|
|
9961
|
-
if (!button.callback) {
|
|
9962
|
-
throw new Error(`Button with name ${button.label} or icon ${button.icon} does not have a callback!`);
|
|
9963
|
-
}
|
|
9964
|
-
button.callback(button.args, element);
|
|
9965
|
-
}
|
|
9966
|
-
}
|
|
9967
|
-
ExpandableSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ExpandableSectionComponent, deps: [{ token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9968
|
-
ExpandableSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: { data: "data", index: "index" }, viewQueries: [{ propertyName: "vcRef", first: true, predicate: ["renderComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "vcRefheader", first: true, predicate: ["headerComponent"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"section-container\" [ngClass]=\"data.cssClass ?? ''\">\r\n <mat-expansion-panel\r\n [expanded]=\"data.isExpanded\"\r\n (opened)=\"onStateChange(true)\"\r\n (closed)=\"onStateChange(false)\"\r\n >\r\n <mat-expansion-panel-header *ngIf=\"data.headerComponent\">\r\n <ng-template #headerComponent></ng-template>\r\n </mat-expansion-panel-header>\r\n <mat-expansion-panel-header *ngIf=\"!data.headerComponent\">\r\n <mat-panel-title> {{ data.title }} </mat-panel-title>\r\n <div class=\"btn-container\" *ngIf=\"data.button\">\r\n <button\r\n *ngIf=\"data.button.type === type().BUTTON\"\r\n class=\"btn\"\r\n (click)=\"action(data.button, $event)\"\r\n mat-stroked-button\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n data.button.icon &&\r\n (!data.button.iconPosition ||\r\n data.button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n {{ data.button.label }}\r\n <smart-icon\r\n *ngIf=\"data.button.icon && data.button.iconPosition === position().POST\"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n </button>\r\n <button\r\n *ngIf=\"data.button.type === type().MENU\"\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n color=\"{{ data.button.color }}\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n data.button.icon &&\r\n (!data.button.iconPosition ||\r\n data.button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon\r\n >{{ data.button.label }}\r\n <smart-icon\r\n *ngIf=\"data.button.icon && data.button.iconPosition === position().POST\"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n *ngFor=\"let button of data.button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, button, data.index)\"\r\n mat-menu-item\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n button.icon &&\r\n (!button.iconPosition || button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"button.icon\"\r\n ></smart-icon\r\n >{{ button.label }}\r\n <smart-icon\r\n *ngIf=\"button.icon && button.iconPosition === position().POST\"\r\n [icon]=\"button.icon\"\r\n ></smart-icon>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </mat-expansion-panel-header>\r\n <ng-template #renderComponent></ng-template>\r\n </mat-expansion-panel>\r\n</div>\r\n", styles: [".section-container{margin-bottom:50px}:host::ng-deep .mat-expansion-panel-header{background:var(--primary-lighter-color)}:host::ng-deep .mat-expansion-panel-header-title{color:var(--primary-color)}:host::ng-deep .btn-container{margin:1em 3em 1em 1em}:host::ng-deep .btn{border-radius:24px}\n"], components: [{ type: i2$6.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i2$6.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { type: i3.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: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$6.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
9969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ExpandableSectionComponent, decorators: [{
|
|
9970
|
-
type: Component,
|
|
9971
|
-
args: [{ selector: 'smart-expandable-section', template: "<div class=\"section-container\" [ngClass]=\"data.cssClass ?? ''\">\r\n <mat-expansion-panel\r\n [expanded]=\"data.isExpanded\"\r\n (opened)=\"onStateChange(true)\"\r\n (closed)=\"onStateChange(false)\"\r\n >\r\n <mat-expansion-panel-header *ngIf=\"data.headerComponent\">\r\n <ng-template #headerComponent></ng-template>\r\n </mat-expansion-panel-header>\r\n <mat-expansion-panel-header *ngIf=\"!data.headerComponent\">\r\n <mat-panel-title> {{ data.title }} </mat-panel-title>\r\n <div class=\"btn-container\" *ngIf=\"data.button\">\r\n <button\r\n *ngIf=\"data.button.type === type().BUTTON\"\r\n class=\"btn\"\r\n (click)=\"action(data.button, $event)\"\r\n mat-stroked-button\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n data.button.icon &&\r\n (!data.button.iconPosition ||\r\n data.button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n {{ data.button.label }}\r\n <smart-icon\r\n *ngIf=\"data.button.icon && data.button.iconPosition === position().POST\"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n </button>\r\n <button\r\n *ngIf=\"data.button.type === type().MENU\"\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"$event.stopPropagation()\"\r\n color=\"{{ data.button.color }}\"\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n data.button.icon &&\r\n (!data.button.iconPosition ||\r\n data.button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon\r\n >{{ data.button.label }}\r\n <smart-icon\r\n *ngIf=\"data.button.icon && data.button.iconPosition === position().POST\"\r\n [icon]=\"data.button.icon\"\r\n ></smart-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n *ngFor=\"let button of data.button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, button, data.index)\"\r\n mat-menu-item\r\n >\r\n <smart-icon\r\n *ngIf=\"\r\n button.icon &&\r\n (!button.iconPosition || button.iconPosition === position().PRE)\r\n \"\r\n [icon]=\"button.icon\"\r\n ></smart-icon\r\n >{{ button.label }}\r\n <smart-icon\r\n *ngIf=\"button.icon && button.iconPosition === position().POST\"\r\n [icon]=\"button.icon\"\r\n ></smart-icon>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </mat-expansion-panel-header>\r\n <ng-template #renderComponent></ng-template>\r\n </mat-expansion-panel>\r\n</div>\r\n", styles: [".section-container{margin-bottom:50px}:host::ng-deep .mat-expansion-panel-header{background:var(--primary-lighter-color)}:host::ng-deep .mat-expansion-panel-header-title{color:var(--primary-color)}:host::ng-deep .btn-container{margin:1em 3em 1em 1em}:host::ng-deep .btn{border-radius:24px}\n"] }]
|
|
9972
|
-
}], ctorParameters: function () { return [{ type: ComponentFactoryService }]; }, propDecorators: { data: [{
|
|
9973
|
-
type: Input
|
|
9974
|
-
}], index: [{
|
|
9975
|
-
type: Input
|
|
9976
|
-
}], vcRef: [{
|
|
9977
|
-
type: ViewChild,
|
|
9978
|
-
args: ['renderComponent', { read: ViewContainerRef }]
|
|
9979
|
-
}], vcRefheader: [{
|
|
9980
|
-
type: ViewChild,
|
|
9981
|
-
args: ['headerComponent', { read: ViewContainerRef }]
|
|
9982
|
-
}] } });
|
|
9983
|
-
|
|
9984
|
-
class SmartGridComponent {
|
|
9985
|
-
constructor(service, cfService, dialog, uiActionDescriptorService) {
|
|
9986
|
-
this.service = service;
|
|
9987
|
-
this.cfService = cfService;
|
|
9988
|
-
this.dialog = dialog;
|
|
9989
|
-
this.uiActionDescriptorService = uiActionDescriptorService;
|
|
9990
|
-
// private readonly defaultPageSize: number = 10;
|
|
9991
|
-
this.defaultPageSizeOptions = [5, 10, 25, 50];
|
|
9992
|
-
this._destroy$ = new Subject();
|
|
9993
|
-
this.dev = false;
|
|
9994
|
-
this.pageSizeOptions = this.defaultPageSizeOptions;
|
|
9995
|
-
this.selectionChanges = new Subject();
|
|
9996
|
-
this.uiActionDescriptors = new Map();
|
|
9997
|
-
this.afterViewInitExecuted = false;
|
|
9998
|
-
this.isBlocked = true;
|
|
9999
|
-
this.getLevel = (node) => node.level ?? 0;
|
|
10000
|
-
this.isExpandable = (node) => (node.children && node.children.length > 0 ? true : false);
|
|
10001
|
-
this.getChildren = (node) => {
|
|
10002
|
-
if (node.children) {
|
|
10003
|
-
let rows = this.smartGrid?.gridModel.page.rows?.filter((row) => node.children?.some((child) => child === row.id));
|
|
10004
|
-
if (rows) {
|
|
10005
|
-
return rows;
|
|
10006
|
-
}
|
|
10007
|
-
}
|
|
10008
|
-
return [];
|
|
10009
|
-
};
|
|
10010
|
-
this.hasChild = (_, _nodeData) => this.isExpandable(_nodeData);
|
|
10011
|
-
this.transformer = (row, level) => {
|
|
10012
|
-
row.level = level;
|
|
10013
|
-
return row;
|
|
10014
|
-
};
|
|
10015
|
-
this.service.gridModelChanged.subscribe(() => {
|
|
10016
|
-
// called after every service call (load, save, refresh, etc.)
|
|
10017
|
-
this.smartGrid.gridModel = this.service.gridModel;
|
|
10018
|
-
this.render();
|
|
10019
|
-
});
|
|
10020
|
-
}
|
|
10021
|
-
ngOnChanges(changes) {
|
|
10022
|
-
if (changes['smartGrid']) {
|
|
10023
|
-
this.smartGrid = changes['smartGrid'].currentValue;
|
|
10024
|
-
this.service.paginator = this.smartGrid?.paginator;
|
|
10025
|
-
this.setupToolbar();
|
|
10026
|
-
}
|
|
10027
|
-
if (changes['uuid']) {
|
|
10028
|
-
this.uuid = changes['uuid'].currentValue;
|
|
10029
|
-
}
|
|
10030
|
-
if (this.afterViewInitExecuted && this.uuid && this.smartGrid) {
|
|
10031
|
-
this.refresh();
|
|
10032
|
-
}
|
|
10033
|
-
}
|
|
10034
|
-
ngOnDestroy() {
|
|
10035
|
-
this._destroy$.next();
|
|
10036
|
-
this._destroy$.complete();
|
|
10037
|
-
}
|
|
10038
|
-
ngAfterViewInit() {
|
|
10039
|
-
if (this.dev) {
|
|
10040
|
-
// for dev purposes
|
|
10041
|
-
this.service.gridModel = this.smartGrid.gridModel;
|
|
10042
|
-
this.render();
|
|
10043
|
-
}
|
|
10044
|
-
if (this.uuid && this.smartGrid && !this.dev) {
|
|
10045
|
-
this.refresh();
|
|
10046
|
-
}
|
|
10047
|
-
this.afterViewInitExecuted = true;
|
|
9634
|
+
this.afterViewInitExecuted = true;
|
|
10048
9635
|
}
|
|
10049
9636
|
/**
|
|
10050
9637
|
*
|
|
@@ -11604,9 +11191,169 @@ class TreeService {
|
|
|
11604
11191
|
explode: false,
|
|
11605
11192
|
dataType: 'string',
|
|
11606
11193
|
dataFormat: undefined,
|
|
11607
|
-
})}`;
|
|
11608
|
-
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
11194
|
+
})}`;
|
|
11195
|
+
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
11196
|
+
context: localVarHttpContext,
|
|
11197
|
+
responseType: responseType_,
|
|
11198
|
+
withCredentials: this.configuration.withCredentials,
|
|
11199
|
+
headers: localVarHeaders,
|
|
11200
|
+
observe: observe,
|
|
11201
|
+
reportProgress: reportProgress,
|
|
11202
|
+
});
|
|
11203
|
+
}
|
|
11204
|
+
performAction(viewUuid, treeId, nodeId, body, observe = 'body', reportProgress = false, options) {
|
|
11205
|
+
if (viewUuid === null || viewUuid === undefined) {
|
|
11206
|
+
throw new Error('Required parameter viewUuid was null or undefined when calling performAction.');
|
|
11207
|
+
}
|
|
11208
|
+
if (treeId === null || treeId === undefined) {
|
|
11209
|
+
throw new Error('Required parameter treeId was null or undefined when calling performAction.');
|
|
11210
|
+
}
|
|
11211
|
+
if (nodeId === null || nodeId === undefined) {
|
|
11212
|
+
throw new Error('Required parameter nodeId was null or undefined when calling performAction.');
|
|
11213
|
+
}
|
|
11214
|
+
if (body === null || body === undefined) {
|
|
11215
|
+
throw new Error('Required parameter body was null or undefined when calling performAction.');
|
|
11216
|
+
}
|
|
11217
|
+
let localVarHeaders = this.defaultHeaders;
|
|
11218
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
11219
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
11220
|
+
// to determine the Accept header
|
|
11221
|
+
const httpHeaderAccepts = ['application/json'];
|
|
11222
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
11223
|
+
}
|
|
11224
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
11225
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
11226
|
+
}
|
|
11227
|
+
let localVarHttpContext = options && options.context;
|
|
11228
|
+
if (localVarHttpContext === undefined) {
|
|
11229
|
+
localVarHttpContext = new HttpContext();
|
|
11230
|
+
}
|
|
11231
|
+
// to determine the Content-Type header
|
|
11232
|
+
const consumes = ['application/json'];
|
|
11233
|
+
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
11234
|
+
if (httpContentTypeSelected !== undefined) {
|
|
11235
|
+
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
11236
|
+
}
|
|
11237
|
+
let responseType_ = 'json';
|
|
11238
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
11239
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
11240
|
+
responseType_ = 'text';
|
|
11241
|
+
}
|
|
11242
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
11243
|
+
responseType_ = 'json';
|
|
11244
|
+
}
|
|
11245
|
+
else {
|
|
11246
|
+
responseType_ = 'blob';
|
|
11247
|
+
}
|
|
11248
|
+
}
|
|
11249
|
+
let localVarPath = `/tree/${this.configuration.encodeParam({
|
|
11250
|
+
name: 'viewUuid',
|
|
11251
|
+
value: viewUuid,
|
|
11252
|
+
in: 'path',
|
|
11253
|
+
style: 'simple',
|
|
11254
|
+
explode: false,
|
|
11255
|
+
dataType: 'string',
|
|
11256
|
+
dataFormat: 'uuid',
|
|
11257
|
+
})}/${this.configuration.encodeParam({
|
|
11258
|
+
name: 'treeId',
|
|
11259
|
+
value: treeId,
|
|
11260
|
+
in: 'path',
|
|
11261
|
+
style: 'simple',
|
|
11262
|
+
explode: false,
|
|
11263
|
+
dataType: 'string',
|
|
11264
|
+
dataFormat: undefined,
|
|
11265
|
+
})}/${this.configuration.encodeParam({
|
|
11266
|
+
name: 'nodeId',
|
|
11267
|
+
value: nodeId,
|
|
11268
|
+
in: 'path',
|
|
11269
|
+
style: 'simple',
|
|
11270
|
+
explode: false,
|
|
11271
|
+
dataType: 'string',
|
|
11272
|
+
dataFormat: undefined,
|
|
11273
|
+
})}/action`;
|
|
11274
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
11275
|
+
context: localVarHttpContext,
|
|
11276
|
+
body: body,
|
|
11277
|
+
responseType: responseType_,
|
|
11278
|
+
withCredentials: this.configuration.withCredentials,
|
|
11279
|
+
headers: localVarHeaders,
|
|
11280
|
+
observe: observe,
|
|
11281
|
+
reportProgress: reportProgress,
|
|
11282
|
+
});
|
|
11283
|
+
}
|
|
11284
|
+
performAction2(viewUuid, treeId, nodeId, body, observe = 'body', reportProgress = false, options) {
|
|
11285
|
+
if (viewUuid === null || viewUuid === undefined) {
|
|
11286
|
+
throw new Error('Required parameter viewUuid was null or undefined when calling performAction2.');
|
|
11287
|
+
}
|
|
11288
|
+
if (treeId === null || treeId === undefined) {
|
|
11289
|
+
throw new Error('Required parameter treeId was null or undefined when calling performAction2.');
|
|
11290
|
+
}
|
|
11291
|
+
if (nodeId === null || nodeId === undefined) {
|
|
11292
|
+
throw new Error('Required parameter nodeId was null or undefined when calling performAction2.');
|
|
11293
|
+
}
|
|
11294
|
+
if (body === null || body === undefined) {
|
|
11295
|
+
throw new Error('Required parameter body was null or undefined when calling performAction2.');
|
|
11296
|
+
}
|
|
11297
|
+
let localVarHeaders = this.defaultHeaders;
|
|
11298
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
11299
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
11300
|
+
// to determine the Accept header
|
|
11301
|
+
const httpHeaderAccepts = ['application/json'];
|
|
11302
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
11303
|
+
}
|
|
11304
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
11305
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
11306
|
+
}
|
|
11307
|
+
let localVarHttpContext = options && options.context;
|
|
11308
|
+
if (localVarHttpContext === undefined) {
|
|
11309
|
+
localVarHttpContext = new HttpContext();
|
|
11310
|
+
}
|
|
11311
|
+
// to determine the Content-Type header
|
|
11312
|
+
const consumes = ['application/json'];
|
|
11313
|
+
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
11314
|
+
if (httpContentTypeSelected !== undefined) {
|
|
11315
|
+
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
11316
|
+
}
|
|
11317
|
+
let responseType_ = 'json';
|
|
11318
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
11319
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
11320
|
+
responseType_ = 'text';
|
|
11321
|
+
}
|
|
11322
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
11323
|
+
responseType_ = 'json';
|
|
11324
|
+
}
|
|
11325
|
+
else {
|
|
11326
|
+
responseType_ = 'blob';
|
|
11327
|
+
}
|
|
11328
|
+
}
|
|
11329
|
+
let localVarPath = `/tree2/${this.configuration.encodeParam({
|
|
11330
|
+
name: 'viewUuid',
|
|
11331
|
+
value: viewUuid,
|
|
11332
|
+
in: 'path',
|
|
11333
|
+
style: 'simple',
|
|
11334
|
+
explode: false,
|
|
11335
|
+
dataType: 'string',
|
|
11336
|
+
dataFormat: 'uuid',
|
|
11337
|
+
})}/${this.configuration.encodeParam({
|
|
11338
|
+
name: 'treeId',
|
|
11339
|
+
value: treeId,
|
|
11340
|
+
in: 'path',
|
|
11341
|
+
style: 'simple',
|
|
11342
|
+
explode: false,
|
|
11343
|
+
dataType: 'string',
|
|
11344
|
+
dataFormat: undefined,
|
|
11345
|
+
})}/${this.configuration.encodeParam({
|
|
11346
|
+
name: 'nodeId',
|
|
11347
|
+
value: nodeId,
|
|
11348
|
+
in: 'path',
|
|
11349
|
+
style: 'simple',
|
|
11350
|
+
explode: false,
|
|
11351
|
+
dataType: 'string',
|
|
11352
|
+
dataFormat: undefined,
|
|
11353
|
+
})}/action`;
|
|
11354
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
11609
11355
|
context: localVarHttpContext,
|
|
11356
|
+
body: body,
|
|
11610
11357
|
responseType: responseType_,
|
|
11611
11358
|
withCredentials: this.configuration.withCredentials,
|
|
11612
11359
|
headers: localVarHeaders,
|
|
@@ -11614,18 +11361,15 @@ class TreeService {
|
|
|
11614
11361
|
reportProgress: reportProgress,
|
|
11615
11362
|
});
|
|
11616
11363
|
}
|
|
11617
|
-
|
|
11364
|
+
performMainAction(viewUuid, treeId, body, observe = 'body', reportProgress = false, options) {
|
|
11618
11365
|
if (viewUuid === null || viewUuid === undefined) {
|
|
11619
|
-
throw new Error('Required parameter viewUuid was null or undefined when calling
|
|
11366
|
+
throw new Error('Required parameter viewUuid was null or undefined when calling performMainAction.');
|
|
11620
11367
|
}
|
|
11621
11368
|
if (treeId === null || treeId === undefined) {
|
|
11622
|
-
throw new Error('Required parameter treeId was null or undefined when calling
|
|
11623
|
-
}
|
|
11624
|
-
if (nodeId === null || nodeId === undefined) {
|
|
11625
|
-
throw new Error('Required parameter nodeId was null or undefined when calling performAction.');
|
|
11369
|
+
throw new Error('Required parameter treeId was null or undefined when calling performMainAction.');
|
|
11626
11370
|
}
|
|
11627
11371
|
if (body === null || body === undefined) {
|
|
11628
|
-
throw new Error('Required parameter body was null or undefined when calling
|
|
11372
|
+
throw new Error('Required parameter body was null or undefined when calling performMainAction.');
|
|
11629
11373
|
}
|
|
11630
11374
|
let localVarHeaders = this.defaultHeaders;
|
|
11631
11375
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
@@ -11675,14 +11419,6 @@ class TreeService {
|
|
|
11675
11419
|
explode: false,
|
|
11676
11420
|
dataType: 'string',
|
|
11677
11421
|
dataFormat: undefined,
|
|
11678
|
-
})}/${this.configuration.encodeParam({
|
|
11679
|
-
name: 'nodeId',
|
|
11680
|
-
value: nodeId,
|
|
11681
|
-
in: 'path',
|
|
11682
|
-
style: 'simple',
|
|
11683
|
-
explode: false,
|
|
11684
|
-
dataType: 'string',
|
|
11685
|
-
dataFormat: undefined,
|
|
11686
11422
|
})}/action`;
|
|
11687
11423
|
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
11688
11424
|
context: localVarHttpContext,
|
|
@@ -11694,18 +11430,15 @@ class TreeService {
|
|
|
11694
11430
|
reportProgress: reportProgress,
|
|
11695
11431
|
});
|
|
11696
11432
|
}
|
|
11697
|
-
|
|
11433
|
+
performMainAction2(viewUuid, treeId, body, observe = 'body', reportProgress = false, options) {
|
|
11698
11434
|
if (viewUuid === null || viewUuid === undefined) {
|
|
11699
|
-
throw new Error('Required parameter viewUuid was null or undefined when calling
|
|
11435
|
+
throw new Error('Required parameter viewUuid was null or undefined when calling performMainAction2.');
|
|
11700
11436
|
}
|
|
11701
11437
|
if (treeId === null || treeId === undefined) {
|
|
11702
|
-
throw new Error('Required parameter treeId was null or undefined when calling
|
|
11703
|
-
}
|
|
11704
|
-
if (nodeId === null || nodeId === undefined) {
|
|
11705
|
-
throw new Error('Required parameter nodeId was null or undefined when calling performAction2.');
|
|
11438
|
+
throw new Error('Required parameter treeId was null or undefined when calling performMainAction2.');
|
|
11706
11439
|
}
|
|
11707
11440
|
if (body === null || body === undefined) {
|
|
11708
|
-
throw new Error('Required parameter body was null or undefined when calling
|
|
11441
|
+
throw new Error('Required parameter body was null or undefined when calling performMainAction2.');
|
|
11709
11442
|
}
|
|
11710
11443
|
let localVarHeaders = this.defaultHeaders;
|
|
11711
11444
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
@@ -11755,14 +11488,6 @@ class TreeService {
|
|
|
11755
11488
|
explode: false,
|
|
11756
11489
|
dataType: 'string',
|
|
11757
11490
|
dataFormat: undefined,
|
|
11758
|
-
})}/${this.configuration.encodeParam({
|
|
11759
|
-
name: 'nodeId',
|
|
11760
|
-
value: nodeId,
|
|
11761
|
-
in: 'path',
|
|
11762
|
-
style: 'simple',
|
|
11763
|
-
explode: false,
|
|
11764
|
-
dataType: 'string',
|
|
11765
|
-
dataFormat: undefined,
|
|
11766
11491
|
})}/action`;
|
|
11767
11492
|
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
11768
11493
|
context: localVarHttpContext,
|
|
@@ -11774,15 +11499,15 @@ class TreeService {
|
|
|
11774
11499
|
reportProgress: reportProgress,
|
|
11775
11500
|
});
|
|
11776
11501
|
}
|
|
11777
|
-
|
|
11502
|
+
selectNode(viewUuid, treeId, nodeId, observe = 'body', reportProgress = false, options) {
|
|
11778
11503
|
if (viewUuid === null || viewUuid === undefined) {
|
|
11779
|
-
throw new Error('Required parameter viewUuid was null or undefined when calling
|
|
11504
|
+
throw new Error('Required parameter viewUuid was null or undefined when calling selectNode.');
|
|
11780
11505
|
}
|
|
11781
11506
|
if (treeId === null || treeId === undefined) {
|
|
11782
|
-
throw new Error('Required parameter treeId was null or undefined when calling
|
|
11507
|
+
throw new Error('Required parameter treeId was null or undefined when calling selectNode.');
|
|
11783
11508
|
}
|
|
11784
|
-
if (
|
|
11785
|
-
throw new Error('Required parameter
|
|
11509
|
+
if (nodeId === null || nodeId === undefined) {
|
|
11510
|
+
throw new Error('Required parameter nodeId was null or undefined when calling selectNode.');
|
|
11786
11511
|
}
|
|
11787
11512
|
let localVarHeaders = this.defaultHeaders;
|
|
11788
11513
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
@@ -11798,12 +11523,6 @@ class TreeService {
|
|
|
11798
11523
|
if (localVarHttpContext === undefined) {
|
|
11799
11524
|
localVarHttpContext = new HttpContext();
|
|
11800
11525
|
}
|
|
11801
|
-
// to determine the Content-Type header
|
|
11802
|
-
const consumes = ['application/json'];
|
|
11803
|
-
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
11804
|
-
if (httpContentTypeSelected !== undefined) {
|
|
11805
|
-
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
11806
|
-
}
|
|
11807
11526
|
let responseType_ = 'json';
|
|
11808
11527
|
if (localVarHttpHeaderAcceptSelected) {
|
|
11809
11528
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
@@ -11832,10 +11551,17 @@ class TreeService {
|
|
|
11832
11551
|
explode: false,
|
|
11833
11552
|
dataType: 'string',
|
|
11834
11553
|
dataFormat: undefined,
|
|
11835
|
-
})}
|
|
11554
|
+
})}/${this.configuration.encodeParam({
|
|
11555
|
+
name: 'nodeId',
|
|
11556
|
+
value: nodeId,
|
|
11557
|
+
in: 'path',
|
|
11558
|
+
style: 'simple',
|
|
11559
|
+
explode: false,
|
|
11560
|
+
dataType: 'string',
|
|
11561
|
+
dataFormat: undefined,
|
|
11562
|
+
})}/select`;
|
|
11836
11563
|
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
11837
11564
|
context: localVarHttpContext,
|
|
11838
|
-
body: body,
|
|
11839
11565
|
responseType: responseType_,
|
|
11840
11566
|
withCredentials: this.configuration.withCredentials,
|
|
11841
11567
|
headers: localVarHeaders,
|
|
@@ -11843,15 +11569,15 @@ class TreeService {
|
|
|
11843
11569
|
reportProgress: reportProgress,
|
|
11844
11570
|
});
|
|
11845
11571
|
}
|
|
11846
|
-
|
|
11572
|
+
selectNode2(viewUuid, treeId, nodeId, observe = 'body', reportProgress = false, options) {
|
|
11847
11573
|
if (viewUuid === null || viewUuid === undefined) {
|
|
11848
|
-
throw new Error('Required parameter viewUuid was null or undefined when calling
|
|
11574
|
+
throw new Error('Required parameter viewUuid was null or undefined when calling selectNode2.');
|
|
11849
11575
|
}
|
|
11850
11576
|
if (treeId === null || treeId === undefined) {
|
|
11851
|
-
throw new Error('Required parameter treeId was null or undefined when calling
|
|
11577
|
+
throw new Error('Required parameter treeId was null or undefined when calling selectNode2.');
|
|
11852
11578
|
}
|
|
11853
|
-
if (
|
|
11854
|
-
throw new Error('Required parameter
|
|
11579
|
+
if (nodeId === null || nodeId === undefined) {
|
|
11580
|
+
throw new Error('Required parameter nodeId was null or undefined when calling selectNode2.');
|
|
11855
11581
|
}
|
|
11856
11582
|
let localVarHeaders = this.defaultHeaders;
|
|
11857
11583
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
@@ -11867,12 +11593,6 @@ class TreeService {
|
|
|
11867
11593
|
if (localVarHttpContext === undefined) {
|
|
11868
11594
|
localVarHttpContext = new HttpContext();
|
|
11869
11595
|
}
|
|
11870
|
-
// to determine the Content-Type header
|
|
11871
|
-
const consumes = ['application/json'];
|
|
11872
|
-
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
11873
|
-
if (httpContentTypeSelected !== undefined) {
|
|
11874
|
-
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
11875
|
-
}
|
|
11876
11596
|
let responseType_ = 'json';
|
|
11877
11597
|
if (localVarHttpHeaderAcceptSelected) {
|
|
11878
11598
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
@@ -11901,10 +11621,17 @@ class TreeService {
|
|
|
11901
11621
|
explode: false,
|
|
11902
11622
|
dataType: 'string',
|
|
11903
11623
|
dataFormat: undefined,
|
|
11904
|
-
})}
|
|
11624
|
+
})}/${this.configuration.encodeParam({
|
|
11625
|
+
name: 'nodeId',
|
|
11626
|
+
value: nodeId,
|
|
11627
|
+
in: 'path',
|
|
11628
|
+
style: 'simple',
|
|
11629
|
+
explode: false,
|
|
11630
|
+
dataType: 'string',
|
|
11631
|
+
dataFormat: undefined,
|
|
11632
|
+
})}/select`;
|
|
11905
11633
|
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
11906
11634
|
context: localVarHttpContext,
|
|
11907
|
-
body: body,
|
|
11908
11635
|
responseType: responseType_,
|
|
11909
11636
|
withCredentials: this.configuration.withCredentials,
|
|
11910
11637
|
headers: localVarHeaders,
|
|
@@ -11912,941 +11639,1229 @@ class TreeService {
|
|
|
11912
11639
|
reportProgress: reportProgress,
|
|
11913
11640
|
});
|
|
11914
11641
|
}
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11642
|
+
}
|
|
11643
|
+
TreeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TreeService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH$2, optional: true }, { token: Configuration$2, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11644
|
+
TreeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TreeService, providedIn: 'root' });
|
|
11645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TreeService, decorators: [{
|
|
11646
|
+
type: Injectable,
|
|
11647
|
+
args: [{
|
|
11648
|
+
providedIn: 'root',
|
|
11649
|
+
}]
|
|
11650
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
11651
|
+
type: Optional
|
|
11652
|
+
}, {
|
|
11653
|
+
type: Inject,
|
|
11654
|
+
args: [BASE_PATH$2]
|
|
11655
|
+
}] }, { type: Configuration$2, decorators: [{
|
|
11656
|
+
type: Optional
|
|
11657
|
+
}] }]; } });
|
|
11658
|
+
|
|
11659
|
+
var SmartTreeNodeButtonType;
|
|
11660
|
+
(function (SmartTreeNodeButtonType) {
|
|
11661
|
+
SmartTreeNodeButtonType["MENU"] = "MENU";
|
|
11662
|
+
SmartTreeNodeButtonType["ICON"] = "ICON";
|
|
11663
|
+
SmartTreeNodeButtonType["NORMAL"] = "NORMAL";
|
|
11664
|
+
})(SmartTreeNodeButtonType || (SmartTreeNodeButtonType = {}));
|
|
11665
|
+
|
|
11666
|
+
class SmarttreeService {
|
|
11667
|
+
constructor() {
|
|
11668
|
+
this.errorMessage = 'The tree is currently unavailable';
|
|
11669
|
+
this.smartTreeModelChanged = new Subject();
|
|
11670
|
+
this.uiActionModelsChanged = new Subject();
|
|
11671
|
+
}
|
|
11672
|
+
get uiActionModels() {
|
|
11673
|
+
return this._uiActionModels;
|
|
11674
|
+
}
|
|
11675
|
+
set uiActionModels(uiActionModels) {
|
|
11676
|
+
this._uiActionModels = uiActionModels;
|
|
11677
|
+
this.uiActionModelsChanged.next();
|
|
11678
|
+
}
|
|
11679
|
+
async initialize() {
|
|
11680
|
+
await this.downloadTree().then((rootNodes) => {
|
|
11681
|
+
this.treeFromBackend = rootNodes;
|
|
11682
|
+
this.syncTree();
|
|
11683
|
+
});
|
|
11684
|
+
}
|
|
11685
|
+
async downloadTree() {
|
|
11686
|
+
throw new Error('downloadTree method not implemented.');
|
|
11687
|
+
}
|
|
11688
|
+
async downloadChildren(parentNode) {
|
|
11689
|
+
throw new Error('downloadChildren method not implemented.');
|
|
11690
|
+
}
|
|
11691
|
+
onTreeNodeClick(treeNode) {
|
|
11692
|
+
throw new Error('onTreeNodeClick method not implemented.');
|
|
11693
|
+
}
|
|
11694
|
+
onTreeNodeOpen(treeNode) {
|
|
11695
|
+
throw new Error('onTreeNodeOpen method not implemented.');
|
|
11696
|
+
}
|
|
11697
|
+
syncTree() {
|
|
11698
|
+
throw new Error('syncTree method not implemented.');
|
|
11699
|
+
}
|
|
11700
|
+
}
|
|
11701
|
+
SmarttreeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11702
|
+
SmarttreeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeService, providedIn: 'root' });
|
|
11703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeService, decorators: [{
|
|
11704
|
+
type: Injectable,
|
|
11705
|
+
args: [{
|
|
11706
|
+
providedIn: 'root',
|
|
11707
|
+
}]
|
|
11708
|
+
}], ctorParameters: function () { return []; } });
|
|
11709
|
+
|
|
11710
|
+
class SmarttreeGenericService extends SmarttreeService {
|
|
11711
|
+
constructor(inject, pageName, treeId) {
|
|
11712
|
+
super();
|
|
11713
|
+
this.pageName = pageName;
|
|
11714
|
+
this.treeId = treeId;
|
|
11715
|
+
// UseUiAction properties
|
|
11716
|
+
this.submit = new Subject();
|
|
11717
|
+
this.reSubscribeToChange = new Subject();
|
|
11718
|
+
this.uiActionDescriptors = new Map();
|
|
11719
|
+
this.viewContextName = 'viewContextUuid';
|
|
11720
|
+
this.configureTree({
|
|
11721
|
+
pageName: this.pageName,
|
|
11722
|
+
treeid: this.treeId,
|
|
11723
|
+
viewContextName: this.viewContextName,
|
|
11724
|
+
});
|
|
11725
|
+
this.viewContext = inject.get(SmartViewContextService);
|
|
11726
|
+
this.service = inject.get(TreeService);
|
|
11727
|
+
this.uiActionService = inject.get(UiActionService);
|
|
11728
|
+
this.uiActionDescriptorService = inject.get(UiActionDescriptorService);
|
|
11729
|
+
this.initialize();
|
|
11730
|
+
}
|
|
11731
|
+
constructUiActionModels(uiActions) {
|
|
11732
|
+
this.uiActionModels = uiActions.map((uiAction) => {
|
|
11733
|
+
return {
|
|
11734
|
+
serviceToUse: this,
|
|
11735
|
+
uiAction,
|
|
11736
|
+
};
|
|
11737
|
+
});
|
|
11738
|
+
}
|
|
11739
|
+
configureTree(configuration) {
|
|
11740
|
+
this.treeId = configuration.treeid;
|
|
11741
|
+
this.viewContextName = configuration.viewContextName;
|
|
11742
|
+
this.pageName = configuration.pageName;
|
|
11743
|
+
}
|
|
11744
|
+
async initialize() {
|
|
11745
|
+
if (sessionStorage.getItem(this.viewContextName)) {
|
|
11746
|
+
await this.downloadTree().then((rootNodes) => {
|
|
11747
|
+
if (!deepEqual(this.treeFromBackend, rootNodes)) {
|
|
11748
|
+
this.treeFromBackend = rootNodes;
|
|
11749
|
+
this.syncTree();
|
|
11750
|
+
}
|
|
11751
|
+
});
|
|
11752
|
+
}
|
|
11753
|
+
}
|
|
11754
|
+
async downloadTree() {
|
|
11755
|
+
let uuid = this.viewContext.getUuidOfPage(this.pageName);
|
|
11756
|
+
const rootNodes = await this.viewContext.handlePerformActionResponse(await this.service.getRootNodes2(uuid, this.treeId).toPromise());
|
|
11757
|
+
const uiActions = await this.viewContext.handlePerformActionResponse(await this.service.getMainActions2(uuid, this.treeId).toPromise());
|
|
11758
|
+
if (uiActions) {
|
|
11759
|
+
this.constructUiActionModels(uiActions);
|
|
11760
|
+
}
|
|
11761
|
+
if (!rootNodes) {
|
|
11762
|
+
throw new Error('RootNodes are undefined!');
|
|
11763
|
+
}
|
|
11764
|
+
return rootNodes;
|
|
11765
|
+
}
|
|
11766
|
+
async downloadChildren(parentNode) {
|
|
11767
|
+
let uuid = this.viewContext.getUuidOfPage(this.pageName);
|
|
11768
|
+
const children = await this.viewContext.handlePerformActionResponse(await this.service.getChildrenNodes2(uuid, this.treeId, parentNode.identifier).toPromise());
|
|
11769
|
+
if (!children) {
|
|
11770
|
+
throw new Error(`Node with identifier ${parentNode.identifier} does not have children.`);
|
|
11771
|
+
}
|
|
11772
|
+
return children;
|
|
11773
|
+
}
|
|
11774
|
+
async onTreeNodeOpen(treeNode) {
|
|
11775
|
+
let viewUuid = this.viewContext.getUuidOfPage(this.pageName);
|
|
11776
|
+
if (treeNode?.expanded) {
|
|
11777
|
+
let tempTreeNode = await this.viewContext.handlePerformActionResponse(await this.service.collapseNode2(viewUuid, this.treeId, treeNode.identifier).toPromise());
|
|
11778
|
+
treeNode = tempTreeNode;
|
|
11779
|
+
}
|
|
11780
|
+
else if (!treeNode?.expanded) {
|
|
11781
|
+
let tempTreeNode = await this.viewContext.handlePerformActionResponse(await this.service.expandNode2(viewUuid, this.treeId, treeNode?.identifier).toPromise());
|
|
11782
|
+
treeNode = tempTreeNode;
|
|
11918
11783
|
}
|
|
11919
|
-
|
|
11920
|
-
|
|
11784
|
+
let node = this.deepSearchTreeNode(treeNode?.identifier, this.treeFromBackend);
|
|
11785
|
+
node.expanded = treeNode?.expanded;
|
|
11786
|
+
node.childrenNodes = treeNode?.childrenNodes;
|
|
11787
|
+
this.syncTree();
|
|
11788
|
+
}
|
|
11789
|
+
onTreeNodeClick(treeNode) {
|
|
11790
|
+
this.selectFolder(treeNode.identifier, treeNode);
|
|
11791
|
+
}
|
|
11792
|
+
async selectFolder(folderUri, treeNode) {
|
|
11793
|
+
let viewUuid = this.viewContext.getUuidOfPage(this.pageName);
|
|
11794
|
+
let updatedTreeNode = await this.viewContext.handlePerformActionResponse(await this.service.selectNode2(viewUuid, this.treeId, treeNode.identifier).toPromise());
|
|
11795
|
+
if (this.selectedNode) {
|
|
11796
|
+
this.selectedNode.selected = false;
|
|
11921
11797
|
}
|
|
11922
|
-
|
|
11923
|
-
|
|
11798
|
+
this.selectedNode = updatedTreeNode;
|
|
11799
|
+
let node = this.deepSearchTreeNode(updatedTreeNode?.identifier, this.treeFromBackend);
|
|
11800
|
+
if (!node) {
|
|
11801
|
+
throw Error('Tree node does not exist');
|
|
11924
11802
|
}
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11803
|
+
node.expanded = updatedTreeNode?.expanded;
|
|
11804
|
+
node.childrenNodes = updatedTreeNode?.childrenNodes;
|
|
11805
|
+
node.selected = updatedTreeNode?.selected;
|
|
11806
|
+
treeNode = updatedTreeNode;
|
|
11807
|
+
this.syncTree();
|
|
11808
|
+
this.viewContext.getAndSyncViewContext(this.viewContext.getUuidOfPage(this.viewContextName));
|
|
11809
|
+
}
|
|
11810
|
+
async updateTreeOnTheFly() {
|
|
11811
|
+
await this.initialize();
|
|
11812
|
+
}
|
|
11813
|
+
async syncTree() {
|
|
11814
|
+
await this.cacheActionDesciptors(this.getAllNodes(this.treeFromBackend));
|
|
11815
|
+
if (!this.treeFromBackend) {
|
|
11816
|
+
throw new Error('There is no treeFromBackend available!');
|
|
11931
11817
|
}
|
|
11932
|
-
if (
|
|
11933
|
-
|
|
11818
|
+
if (!this.smartTreeModel) {
|
|
11819
|
+
this.smartTreeModel = {
|
|
11820
|
+
rootNodes: [],
|
|
11821
|
+
};
|
|
11934
11822
|
}
|
|
11935
|
-
let
|
|
11936
|
-
|
|
11937
|
-
|
|
11823
|
+
let smartTreeNodes = this.createButtonsForTreeNodes(this.treeFromBackend);
|
|
11824
|
+
this.smartTreeModel = undefined;
|
|
11825
|
+
this.smartTreeModel = {
|
|
11826
|
+
rootNodes: [],
|
|
11827
|
+
};
|
|
11828
|
+
this.smartTreeModelChanged.next(this.smartTreeModel);
|
|
11829
|
+
this.smartTreeModel.rootNodes = smartTreeNodes;
|
|
11830
|
+
this.findSelected(this.smartTreeModel.rootNodes);
|
|
11831
|
+
this.smartTreeModelChanged.next(this.smartTreeModel);
|
|
11832
|
+
}
|
|
11833
|
+
deepSearchTreeNode(identifier, nodes) {
|
|
11834
|
+
let treeNode;
|
|
11835
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
11836
|
+
const node = nodes[index];
|
|
11837
|
+
if (node.identifier === identifier) {
|
|
11838
|
+
treeNode = node;
|
|
11839
|
+
break;
|
|
11840
|
+
}
|
|
11841
|
+
if (node.childrenNodes && node.childrenNodes.length) {
|
|
11842
|
+
treeNode = this.deepSearchTreeNode(identifier, node.childrenNodes);
|
|
11843
|
+
if (treeNode) {
|
|
11844
|
+
break;
|
|
11845
|
+
}
|
|
11846
|
+
}
|
|
11938
11847
|
}
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11848
|
+
return treeNode;
|
|
11849
|
+
}
|
|
11850
|
+
findSelected(nodes) {
|
|
11851
|
+
return nodes.forEach((node) => {
|
|
11852
|
+
if (node.selected) {
|
|
11853
|
+
this.selectedNode = node;
|
|
11854
|
+
return;
|
|
11943
11855
|
}
|
|
11944
|
-
else if (
|
|
11945
|
-
|
|
11856
|
+
else if (node.childrenNodes && node.childrenNodes.length) {
|
|
11857
|
+
return this.findSelected(node.childrenNodes);
|
|
11946
11858
|
}
|
|
11947
|
-
|
|
11948
|
-
|
|
11859
|
+
});
|
|
11860
|
+
}
|
|
11861
|
+
createButtonsForTreeNodes(nodes) {
|
|
11862
|
+
nodes.map((node) => {
|
|
11863
|
+
node.button = node.actions?.length
|
|
11864
|
+
? {
|
|
11865
|
+
type: SmartTreeNodeButtonType.MENU,
|
|
11866
|
+
icon: 'more_vert',
|
|
11867
|
+
menuItemButtons: node.actions.map((action) => {
|
|
11868
|
+
return {
|
|
11869
|
+
type: SmartTreeNodeButtonType.NORMAL,
|
|
11870
|
+
label: this.getLabelByAction(action),
|
|
11871
|
+
callback: this.doAction.bind(this),
|
|
11872
|
+
args: [action, node.identifier],
|
|
11873
|
+
};
|
|
11874
|
+
}),
|
|
11875
|
+
}
|
|
11876
|
+
: undefined;
|
|
11877
|
+
node.icon = 'Folders';
|
|
11878
|
+
if (node.childrenNodes) {
|
|
11879
|
+
node.childrenNodes = this.createButtonsForTreeNodes(node.childrenNodes);
|
|
11949
11880
|
}
|
|
11950
|
-
}
|
|
11951
|
-
let localVarPath = `/tree/${this.configuration.encodeParam({
|
|
11952
|
-
name: 'viewUuid',
|
|
11953
|
-
value: viewUuid,
|
|
11954
|
-
in: 'path',
|
|
11955
|
-
style: 'simple',
|
|
11956
|
-
explode: false,
|
|
11957
|
-
dataType: 'string',
|
|
11958
|
-
dataFormat: 'uuid',
|
|
11959
|
-
})}/${this.configuration.encodeParam({
|
|
11960
|
-
name: 'treeId',
|
|
11961
|
-
value: treeId,
|
|
11962
|
-
in: 'path',
|
|
11963
|
-
style: 'simple',
|
|
11964
|
-
explode: false,
|
|
11965
|
-
dataType: 'string',
|
|
11966
|
-
dataFormat: undefined,
|
|
11967
|
-
})}/${this.configuration.encodeParam({
|
|
11968
|
-
name: 'nodeId',
|
|
11969
|
-
value: nodeId,
|
|
11970
|
-
in: 'path',
|
|
11971
|
-
style: 'simple',
|
|
11972
|
-
explode: false,
|
|
11973
|
-
dataType: 'string',
|
|
11974
|
-
dataFormat: undefined,
|
|
11975
|
-
})}/select`;
|
|
11976
|
-
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
11977
|
-
context: localVarHttpContext,
|
|
11978
|
-
responseType: responseType_,
|
|
11979
|
-
withCredentials: this.configuration.withCredentials,
|
|
11980
|
-
headers: localVarHeaders,
|
|
11981
|
-
observe: observe,
|
|
11982
|
-
reportProgress: reportProgress,
|
|
11983
11881
|
});
|
|
11882
|
+
return nodes;
|
|
11984
11883
|
}
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
throw new Error('Required parameter treeId was null or undefined when calling selectNode2.');
|
|
11991
|
-
}
|
|
11992
|
-
if (nodeId === null || nodeId === undefined) {
|
|
11993
|
-
throw new Error('Required parameter nodeId was null or undefined when calling selectNode2.');
|
|
11994
|
-
}
|
|
11995
|
-
let localVarHeaders = this.defaultHeaders;
|
|
11996
|
-
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
11997
|
-
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
11998
|
-
// to determine the Accept header
|
|
11999
|
-
const httpHeaderAccepts = ['application/json'];
|
|
12000
|
-
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
12001
|
-
}
|
|
12002
|
-
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
12003
|
-
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
11884
|
+
async doAction(args) {
|
|
11885
|
+
let uiAction = args[0];
|
|
11886
|
+
let nodeUuid = args[1];
|
|
11887
|
+
if (uiAction.params) {
|
|
11888
|
+
uiAction.params['nodeUuid'] = nodeUuid;
|
|
12004
11889
|
}
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
11890
|
+
else {
|
|
11891
|
+
uiAction.params = {
|
|
11892
|
+
nodeUuid: nodeUuid,
|
|
11893
|
+
};
|
|
12008
11894
|
}
|
|
12009
|
-
let
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
11895
|
+
let uiActionModel = {
|
|
11896
|
+
serviceToUse: this,
|
|
11897
|
+
uiAction,
|
|
11898
|
+
};
|
|
11899
|
+
this.uiActionService.uiActionModel = uiActionModel;
|
|
11900
|
+
this.uiActionService.execute(uiAction);
|
|
11901
|
+
}
|
|
11902
|
+
getAllNodes(nodes) {
|
|
11903
|
+
return nodes.flatMap((n) => [n, ...this.getAllNodes(n.childrenNodes)]);
|
|
11904
|
+
}
|
|
11905
|
+
async cacheActionDesciptors(nodes) {
|
|
11906
|
+
let newUiActions = new Set();
|
|
11907
|
+
nodes.forEach((node) => {
|
|
11908
|
+
node.actions
|
|
11909
|
+
?.filter((uiAction) => !this.uiActionDescriptors.get(uiAction.code))
|
|
11910
|
+
.forEach((action) => newUiActions.add(action));
|
|
11911
|
+
});
|
|
11912
|
+
for (let action of newUiActions) {
|
|
11913
|
+
if (!this.uiActionDescriptors.get(action.code)) {
|
|
11914
|
+
let descriptor = await this.uiActionDescriptorService.getActionDescriptor(action);
|
|
11915
|
+
this.uiActionDescriptors.set(action.code, descriptor);
|
|
12019
11916
|
}
|
|
12020
11917
|
}
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
}
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
}
|
|
11918
|
+
}
|
|
11919
|
+
getLabelByAction(action) {
|
|
11920
|
+
let desc = this.uiActionDescriptors.get(action.code);
|
|
11921
|
+
return desc.title;
|
|
11922
|
+
}
|
|
11923
|
+
// #region UseUiAction
|
|
11924
|
+
getAdditionalParams(uiAction) {
|
|
11925
|
+
if (uiAction.params && uiAction.params['nodeUuid']) {
|
|
11926
|
+
let nodeUuid = uiAction.params['nodeUuid'];
|
|
11927
|
+
let nodeName;
|
|
11928
|
+
if (uiAction.code === 'RENAME') {
|
|
11929
|
+
nodeName = this.deepSearchTreeNode(nodeUuid, this.treeFromBackend)?.caption;
|
|
11930
|
+
}
|
|
11931
|
+
return {
|
|
11932
|
+
forTextArea: '',
|
|
11933
|
+
forTextField: nodeName ? nodeName : '',
|
|
11934
|
+
};
|
|
11935
|
+
}
|
|
11936
|
+
return {
|
|
11937
|
+
forTextArea: '',
|
|
11938
|
+
forTextField: '',
|
|
11939
|
+
};
|
|
11940
|
+
}
|
|
11941
|
+
getModel() {
|
|
11942
|
+
return {};
|
|
11943
|
+
}
|
|
11944
|
+
async performUiActionRequest(uiActionRequest) {
|
|
11945
|
+
if (uiActionRequest.params['nodeUuid']) {
|
|
11946
|
+
await this.performNodeUiActionRequest(uiActionRequest);
|
|
11947
|
+
}
|
|
11948
|
+
else {
|
|
11949
|
+
await this.performMainUiActionRequest(uiActionRequest);
|
|
11950
|
+
}
|
|
11951
|
+
await this.viewContext.getAndSyncViewContext();
|
|
11952
|
+
this.syncTree();
|
|
11953
|
+
}
|
|
11954
|
+
async performNodeUiActionRequest(uiActionRequest) {
|
|
11955
|
+
let nodeId = uiActionRequest.params['nodeUuid'];
|
|
11956
|
+
delete uiActionRequest.params['nodeUuid'];
|
|
11957
|
+
let viewUuid = this.viewContext.getUuidOfPage(this.pageName);
|
|
11958
|
+
this.treeFromBackend = await this.viewContext.handlePerformActionResponse(await this.service.performAction2(viewUuid, this.treeId, nodeId, uiActionRequest).toPromise());
|
|
11959
|
+
}
|
|
11960
|
+
async performMainUiActionRequest(uiActionRequest) {
|
|
11961
|
+
let viewUuid = this.viewContext.getUuidOfPage(this.pageName);
|
|
11962
|
+
this.treeFromBackend = await this.viewContext.handlePerformActionResponse(await this.service.performMainAction2(viewUuid, this.treeId, uiActionRequest).toPromise());
|
|
11963
|
+
}
|
|
11964
|
+
handleSpecificDemandsAsynchronously(uiAction, uiActionRequest) {
|
|
11965
|
+
throw new Error('Method not implemented.');
|
|
12054
11966
|
}
|
|
12055
11967
|
}
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type:
|
|
11968
|
+
SmarttreeGenericService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeGenericService, deps: [{ token: i0.Injector }, { token: 'pageName' }, { token: 'treeId' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11969
|
+
SmarttreeGenericService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeGenericService, providedIn: 'root' });
|
|
11970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeGenericService, decorators: [{
|
|
12059
11971
|
type: Injectable,
|
|
12060
11972
|
args: [{
|
|
12061
11973
|
providedIn: 'root',
|
|
12062
11974
|
}]
|
|
12063
|
-
}], ctorParameters: function () { return [{ type:
|
|
12064
|
-
type: Optional
|
|
12065
|
-
}, {
|
|
11975
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: undefined, decorators: [{
|
|
12066
11976
|
type: Inject,
|
|
12067
|
-
args: [
|
|
12068
|
-
}] }, { type:
|
|
12069
|
-
type:
|
|
11977
|
+
args: ['pageName']
|
|
11978
|
+
}] }, { type: undefined, decorators: [{
|
|
11979
|
+
type: Inject,
|
|
11980
|
+
args: ['treeId']
|
|
12070
11981
|
}] }]; } });
|
|
12071
11982
|
|
|
12072
|
-
|
|
12073
|
-
(
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
this.errorMessage = 'The tree is currently unavailable';
|
|
12082
|
-
this.smartTreeModelChanged = new Subject();
|
|
12083
|
-
this.uiActionModelsChanged = new Subject();
|
|
11983
|
+
class SmartTreeComponent {
|
|
11984
|
+
constructor(cdr) {
|
|
11985
|
+
this.cdr = cdr;
|
|
11986
|
+
this._destroy$ = new Subject();
|
|
11987
|
+
this.treeControl = new NestedTreeControl((node) => node.childrenNodes);
|
|
11988
|
+
this.dataSource = new MatTreeNestedDataSource();
|
|
11989
|
+
this.smartTreeNodeButtonType = SmartTreeNodeButtonType;
|
|
11990
|
+
this.uiActionModels = [];
|
|
11991
|
+
this.hasChild = (_, node) => node.hasChildren;
|
|
12084
11992
|
}
|
|
12085
|
-
|
|
12086
|
-
|
|
11993
|
+
ngOnInit() {
|
|
11994
|
+
if (!this.treeService) {
|
|
11995
|
+
throw new Error('TreeService has not been given!');
|
|
11996
|
+
}
|
|
11997
|
+
this.errorMessage = this.treeService.errorMessage;
|
|
11998
|
+
this.treeService.smartTreeModelChanged.subscribe((newSmartTree) => {
|
|
11999
|
+
this.treeData = newSmartTree;
|
|
12000
|
+
this.dataSource.data = this.treeData.rootNodes;
|
|
12001
|
+
this.expandTreeNodes();
|
|
12002
|
+
});
|
|
12003
|
+
this.treeService.uiActionModelsChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
12004
|
+
if (this.treeService.uiActionModels) {
|
|
12005
|
+
this.uiActionModels = this.treeService.uiActionModels;
|
|
12006
|
+
}
|
|
12007
|
+
});
|
|
12087
12008
|
}
|
|
12088
|
-
|
|
12089
|
-
this.
|
|
12090
|
-
this.
|
|
12009
|
+
ngOnDestroy() {
|
|
12010
|
+
this._destroy$.next();
|
|
12011
|
+
this._destroy$.complete();
|
|
12091
12012
|
}
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12013
|
+
getIfExpanded(node) {
|
|
12014
|
+
return this.treeControl.isExpanded(node);
|
|
12015
|
+
}
|
|
12016
|
+
expandTreeNodes() {
|
|
12017
|
+
this.expandTreeNodesDeeply(this.dataSource.data);
|
|
12018
|
+
}
|
|
12019
|
+
expandTreeNodesDeeply(nodes) {
|
|
12020
|
+
nodes.forEach((node) => {
|
|
12021
|
+
if (node.expanded) {
|
|
12022
|
+
this.treeControl.expand(node);
|
|
12023
|
+
this.cdr.markForCheck();
|
|
12024
|
+
if (node.childrenNodes && node.childrenNodes.length) {
|
|
12025
|
+
this.expandTreeNodesDeeply(node.childrenNodes);
|
|
12026
|
+
}
|
|
12027
|
+
}
|
|
12028
|
+
else {
|
|
12029
|
+
this.treeControl.collapse(node);
|
|
12030
|
+
}
|
|
12096
12031
|
});
|
|
12097
12032
|
}
|
|
12098
|
-
|
|
12099
|
-
|
|
12033
|
+
onNodeClick(event, node) {
|
|
12034
|
+
event.stopPropagation();
|
|
12035
|
+
if (this.tempActiveNode)
|
|
12036
|
+
this.tempActiveNode.selected = false;
|
|
12037
|
+
node.selected = true;
|
|
12038
|
+
this.tempActiveNode = node;
|
|
12039
|
+
this.treeService.onTreeNodeClick(node);
|
|
12100
12040
|
}
|
|
12101
|
-
|
|
12102
|
-
|
|
12041
|
+
onOpenNode(event, node) {
|
|
12042
|
+
event.stopPropagation();
|
|
12043
|
+
this.treeService.onTreeNodeOpen(node);
|
|
12103
12044
|
}
|
|
12104
|
-
|
|
12105
|
-
|
|
12045
|
+
getNodeStyle(node) {
|
|
12046
|
+
if (this.treeStyle) {
|
|
12047
|
+
var style = node.selected
|
|
12048
|
+
? {
|
|
12049
|
+
background: this.treeStyle.activeStyle?.backgroundColor,
|
|
12050
|
+
color: this.treeStyle.activeStyle?.color,
|
|
12051
|
+
}
|
|
12052
|
+
: {
|
|
12053
|
+
background: this.treeStyle.levelBackgroundColor[node.level],
|
|
12054
|
+
color: this.treeStyle.color,
|
|
12055
|
+
};
|
|
12056
|
+
return style;
|
|
12057
|
+
}
|
|
12058
|
+
return {};
|
|
12106
12059
|
}
|
|
12107
|
-
|
|
12108
|
-
|
|
12060
|
+
getNodePadding(node) {
|
|
12061
|
+
if (this.treeStyle) {
|
|
12062
|
+
var style = node.selected
|
|
12063
|
+
? {
|
|
12064
|
+
'padding-left': 15 * node.level + 'px',
|
|
12065
|
+
}
|
|
12066
|
+
: {
|
|
12067
|
+
'padding-left': 15 * node.level + 'px',
|
|
12068
|
+
};
|
|
12069
|
+
return style;
|
|
12070
|
+
}
|
|
12071
|
+
return {};
|
|
12109
12072
|
}
|
|
12110
|
-
|
|
12111
|
-
|
|
12073
|
+
customButtonClicked(event, button, close) {
|
|
12074
|
+
event.stopPropagation();
|
|
12075
|
+
if (button.type === SmartTreeNodeButtonType.MENU) {
|
|
12076
|
+
return;
|
|
12077
|
+
}
|
|
12078
|
+
if (!button.callback) {
|
|
12079
|
+
throw new Error(`Button with name ${button.label || button.icon} does not have a callback!`);
|
|
12080
|
+
}
|
|
12081
|
+
button.callback(button.args);
|
|
12082
|
+
if (close) {
|
|
12083
|
+
let openMenus = this.trigger.filter((matMenuTrigger) => matMenuTrigger.menuOpen);
|
|
12084
|
+
openMenus.forEach((matMenuTrigger) => {
|
|
12085
|
+
matMenuTrigger.closeMenu();
|
|
12086
|
+
});
|
|
12087
|
+
}
|
|
12088
|
+
}
|
|
12089
|
+
getClassesForTreeNode(node) {
|
|
12090
|
+
let classes = [];
|
|
12091
|
+
if (node.expanded) {
|
|
12092
|
+
classes.push(this.getCustomClass('expanded', node.level));
|
|
12093
|
+
}
|
|
12094
|
+
else {
|
|
12095
|
+
classes.push(this.getCustomClass('collapsed', node.level));
|
|
12096
|
+
}
|
|
12097
|
+
if (node.selected) {
|
|
12098
|
+
classes.push(this.getCustomClass('selected', node.level));
|
|
12099
|
+
}
|
|
12100
|
+
else {
|
|
12101
|
+
classes.push(this.getCustomClass('unselected', node.level));
|
|
12102
|
+
}
|
|
12103
|
+
if (node.level !== 0) {
|
|
12104
|
+
classes.push(this.getCustomClass('child', node.level));
|
|
12105
|
+
}
|
|
12106
|
+
return classes;
|
|
12107
|
+
}
|
|
12108
|
+
getInnerClassesForTreeNode(node) {
|
|
12109
|
+
let classes = [];
|
|
12110
|
+
if (node.expanded) {
|
|
12111
|
+
classes.push(this.getCustomClass('inner-expanded', node.level));
|
|
12112
|
+
}
|
|
12113
|
+
else {
|
|
12114
|
+
classes.push(this.getCustomClass('inner-collapsed', node.level));
|
|
12115
|
+
}
|
|
12116
|
+
if (node.selected) {
|
|
12117
|
+
classes.push(this.getCustomClass('inner-selected', node.level));
|
|
12118
|
+
}
|
|
12119
|
+
else {
|
|
12120
|
+
classes.push(this.getCustomClass('inner-unselected', node.level));
|
|
12121
|
+
}
|
|
12122
|
+
return classes;
|
|
12123
|
+
}
|
|
12124
|
+
getClassesForTreeNodeChildren(node) {
|
|
12125
|
+
let classes = [];
|
|
12126
|
+
classes.push(this.getCustomClass('group', node.level));
|
|
12127
|
+
return classes;
|
|
12128
|
+
}
|
|
12129
|
+
getCustomClass(cssClass, plusProperty) {
|
|
12130
|
+
return `${cssClass}-${plusProperty}`;
|
|
12112
12131
|
}
|
|
12113
12132
|
}
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type:
|
|
12117
|
-
type:
|
|
12133
|
+
SmartTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartTreeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
12134
|
+
SmartTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartTreeComponent, selector: "smart-tree", inputs: { treeStyle: "treeStyle", treeService: "treeService" }, viewQueries: [{ propertyName: "tree", first: true, predicate: ["tree"], descendants: true }, { propertyName: "trigger", predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: "<div class=\"smartTreeContainer\">\r\n <smart-ui-action-toolbar\r\n *ngIf=\"uiActionModels.length\"\r\n [uiActionModels]=\"uiActionModels\"\r\n ></smart-ui-action-toolbar>\r\n <mat-tree\r\n #tree\r\n *ngIf=\"treeData\"\r\n [dataSource]=\"dataSource\"\r\n [treeControl]=\"treeControl\"\r\n class=\"sm-tree\"\r\n >\r\n <mat-nested-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodeToggle=\"{{ getIfExpanded(node) }}\"\r\n [ngClass]=\"getClassesForTreeNode(node)\"\r\n [ngStyle]=\"getNodeStyle(node)\"\r\n >\r\n <div\r\n [ngStyle]=\"getNodePadding(node)\"\r\n [ngClass]=\"getInnerClassesForTreeNode(node)\"\r\n class=\"mat-tree-node sm-tree-node\"\r\n (click)=\"onNodeClick($event, node)\"\r\n >\r\n <button mat-icon-button [attr.aria-label]=\"'Toggle ' + node.name\">\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n matTreeNodeToggle\r\n (click)=\"onOpenNode($event, node)\"\r\n >\r\n <div *ngIf=\"hasChild(node.level, node)\">\r\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </div>\r\n </mat-icon>\r\n </button>\r\n <smart-icon [icon]=\"node.icon\"> </smart-icon>\r\n <div class=\"sm-tree-row\" [ngClass]=\"node.classes\">\r\n <div class=\"sm-tree-row-caption\">\r\n {{ node.caption }}\r\n </div>\r\n <div class=\"sm-shortDescription-spacer\"></div>\r\n <div class=\"sm-tree-row-shortDescription\">\r\n {{ node.shortDescription }}\r\n </div>\r\n <div class=\"sm-shortDescription-button-spacer\"></div>\r\n <div *ngIf=\"node.button\" class=\"sm-tree-node-button\" [ngSwitch]=\"node.button.type\">\r\n <button\r\n (click)=\"customButtonClicked($event, node.button)\"\r\n *ngSwitchCase=\"smartTreeNodeButtonType.ICON\"\r\n mat-icon-button\r\n >\r\n <smart-icon title=\"{{ node.button.icon }}\" [icon]=\"node.button.icon\"></smart-icon>\r\n </button>\r\n <div *ngSwitchCase=\"smartTreeNodeButtonType.MENU\">\r\n <button\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"customButtonClicked($event, node.button, true)\"\r\n >\r\n <smart-icon *ngIf=\"node.button.icon\" [icon]=\"node.button.icon\"></smart-icon\r\n >{{ node.button.label }}\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n *ngFor=\"let button of node.button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, button, true)\"\r\n mat-menu-item\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon\r\n >{{ button.label }}\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <button\r\n (click)=\"customButtonClicked($event, node.button)\"\r\n *ngSwitchCase=\"smartTreeNodeButtonType.NORMAL\"\r\n mat-raised-button\r\n >\r\n <smart-icon *ngIf=\"node.button.icon\" [icon]=\"node.button.icon\"></smart-icon>\r\n {{ node.button.icon }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n [class.sm-tree-invisible]=\"!treeControl.isExpanded(node)\"\r\n [ngClass]=\"getClassesForTreeNodeChildren(node)\"\r\n role=\"group\"\r\n >\r\n <ng-container matTreeNodeOutlet></ng-container>\r\n </div>\r\n </mat-nested-tree-node>\r\n </mat-tree>\r\n <div *ngIf=\"!treeData\">\r\n <h3>\r\n {{ errorMessage }}\r\n </h3>\r\n </div>\r\n</div>\r\n", styles: [".smartTreeContainer{display:flex;flex-direction:column;gap:.5rem}.sm-tree-invisible{display:none}.sm-tree ul,.sm-tree li{margin-top:0;margin-bottom:0;list-style-type:none}.sm-tree div[role=group]>.mat-tree-node{padding-left:40px}.sm-tee-node{padding-left:40px}.sm-tree-node-name{padding-left:15px;padding-top:15px;display:flex;flex-direction:column}.sm-tree-node-name-row{padding-left:15px;padding-top:15px;display:flex;flex-direction:row;justify-content:space-between}.sm-tree-node-name-col{padding-left:15px;padding-top:15px;display:flex;flex-direction:column}.sm-tee-node-id{font-weight:lighter}.mat-tree-node:hover{cursor:pointer}::ng-deep .mat-icon-rtl-mirror{display:flex;flex-direction:row}.sm-tree-row{display:flex;flex-direction:row;flex:1;align-items:center}.sm-shortDescription-spacer{flex:1}\n"], components: [{ type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService", "id"] }, { type: i10$1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { type: i3.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { type: i5.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10$1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { type: i10$1.MatNestedTreeNode, selector: "mat-nested-tree-node", inputs: ["role", "disabled", "tabIndex", "matNestedTreeNode"], exportAs: ["matNestedTreeNode"] }, { type: i10$1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10$1.MatTreeNodeOutlet, selector: "[matTreeNodeOutlet]" }] });
|
|
12135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartTreeComponent, decorators: [{
|
|
12136
|
+
type: Component,
|
|
12137
|
+
args: [{ selector: 'smart-tree', template: "<div class=\"smartTreeContainer\">\r\n <smart-ui-action-toolbar\r\n *ngIf=\"uiActionModels.length\"\r\n [uiActionModels]=\"uiActionModels\"\r\n ></smart-ui-action-toolbar>\r\n <mat-tree\r\n #tree\r\n *ngIf=\"treeData\"\r\n [dataSource]=\"dataSource\"\r\n [treeControl]=\"treeControl\"\r\n class=\"sm-tree\"\r\n >\r\n <mat-nested-tree-node\r\n *matTreeNodeDef=\"let node; when: hasChild\"\r\n matTreeNodeToggle=\"{{ getIfExpanded(node) }}\"\r\n [ngClass]=\"getClassesForTreeNode(node)\"\r\n [ngStyle]=\"getNodeStyle(node)\"\r\n >\r\n <div\r\n [ngStyle]=\"getNodePadding(node)\"\r\n [ngClass]=\"getInnerClassesForTreeNode(node)\"\r\n class=\"mat-tree-node sm-tree-node\"\r\n (click)=\"onNodeClick($event, node)\"\r\n >\r\n <button mat-icon-button [attr.aria-label]=\"'Toggle ' + node.name\">\r\n <mat-icon\r\n class=\"mat-icon-rtl-mirror\"\r\n matTreeNodeToggle\r\n (click)=\"onOpenNode($event, node)\"\r\n >\r\n <div *ngIf=\"hasChild(node.level, node)\">\r\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </div>\r\n </mat-icon>\r\n </button>\r\n <smart-icon [icon]=\"node.icon\"> </smart-icon>\r\n <div class=\"sm-tree-row\" [ngClass]=\"node.classes\">\r\n <div class=\"sm-tree-row-caption\">\r\n {{ node.caption }}\r\n </div>\r\n <div class=\"sm-shortDescription-spacer\"></div>\r\n <div class=\"sm-tree-row-shortDescription\">\r\n {{ node.shortDescription }}\r\n </div>\r\n <div class=\"sm-shortDescription-button-spacer\"></div>\r\n <div *ngIf=\"node.button\" class=\"sm-tree-node-button\" [ngSwitch]=\"node.button.type\">\r\n <button\r\n (click)=\"customButtonClicked($event, node.button)\"\r\n *ngSwitchCase=\"smartTreeNodeButtonType.ICON\"\r\n mat-icon-button\r\n >\r\n <smart-icon title=\"{{ node.button.icon }}\" [icon]=\"node.button.icon\"></smart-icon>\r\n </button>\r\n <div *ngSwitchCase=\"smartTreeNodeButtonType.MENU\">\r\n <button\r\n mat-button\r\n [matMenuTriggerFor]=\"menu\"\r\n (click)=\"customButtonClicked($event, node.button, true)\"\r\n >\r\n <smart-icon *ngIf=\"node.button.icon\" [icon]=\"node.button.icon\"></smart-icon\r\n >{{ node.button.label }}\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n *ngFor=\"let button of node.button.menuItemButtons\"\r\n (click)=\"customButtonClicked($event, button, true)\"\r\n mat-menu-item\r\n >\r\n <smart-icon *ngIf=\"button.icon\" [icon]=\"button.icon\"></smart-icon\r\n >{{ button.label }}\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <button\r\n (click)=\"customButtonClicked($event, node.button)\"\r\n *ngSwitchCase=\"smartTreeNodeButtonType.NORMAL\"\r\n mat-raised-button\r\n >\r\n <smart-icon *ngIf=\"node.button.icon\" [icon]=\"node.button.icon\"></smart-icon>\r\n {{ node.button.icon }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n [class.sm-tree-invisible]=\"!treeControl.isExpanded(node)\"\r\n [ngClass]=\"getClassesForTreeNodeChildren(node)\"\r\n role=\"group\"\r\n >\r\n <ng-container matTreeNodeOutlet></ng-container>\r\n </div>\r\n </mat-nested-tree-node>\r\n </mat-tree>\r\n <div *ngIf=\"!treeData\">\r\n <h3>\r\n {{ errorMessage }}\r\n </h3>\r\n </div>\r\n</div>\r\n", styles: [".smartTreeContainer{display:flex;flex-direction:column;gap:.5rem}.sm-tree-invisible{display:none}.sm-tree ul,.sm-tree li{margin-top:0;margin-bottom:0;list-style-type:none}.sm-tree div[role=group]>.mat-tree-node{padding-left:40px}.sm-tee-node{padding-left:40px}.sm-tree-node-name{padding-left:15px;padding-top:15px;display:flex;flex-direction:column}.sm-tree-node-name-row{padding-left:15px;padding-top:15px;display:flex;flex-direction:row;justify-content:space-between}.sm-tree-node-name-col{padding-left:15px;padding-top:15px;display:flex;flex-direction:column}.sm-tee-node-id{font-weight:lighter}.mat-tree-node:hover{cursor:pointer}::ng-deep .mat-icon-rtl-mirror{display:flex;flex-direction:row}.sm-tree-row{display:flex;flex-direction:row;flex:1;align-items:center}.sm-shortDescription-spacer{flex:1}\n"] }]
|
|
12138
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { trigger: [{
|
|
12139
|
+
type: ViewChildren,
|
|
12140
|
+
args: [MatMenuTrigger]
|
|
12141
|
+
}], tree: [{
|
|
12142
|
+
type: ViewChild,
|
|
12143
|
+
args: ['tree']
|
|
12144
|
+
}], treeStyle: [{
|
|
12145
|
+
type: Input
|
|
12146
|
+
}], treeService: [{
|
|
12147
|
+
type: Input
|
|
12148
|
+
}] } });
|
|
12149
|
+
|
|
12150
|
+
class SmarttreeModule {
|
|
12151
|
+
}
|
|
12152
|
+
SmarttreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12153
|
+
SmarttreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeModule, declarations: [SmartTreeComponent], imports: [BrowserModule,
|
|
12154
|
+
MatCommonModule,
|
|
12155
|
+
MatButtonModule,
|
|
12156
|
+
MatIconModule,
|
|
12157
|
+
MatTreeModule,
|
|
12158
|
+
MatMenuModule,
|
|
12159
|
+
SmartIconModule,
|
|
12160
|
+
SmartViewContextModule], exports: [SmartTreeComponent] });
|
|
12161
|
+
SmarttreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeModule, providers: [SmarttreeService, SmarttreeGenericService], imports: [[
|
|
12162
|
+
BrowserModule,
|
|
12163
|
+
MatCommonModule,
|
|
12164
|
+
MatButtonModule,
|
|
12165
|
+
MatIconModule,
|
|
12166
|
+
MatTreeModule,
|
|
12167
|
+
MatMenuModule,
|
|
12168
|
+
SmartIconModule,
|
|
12169
|
+
SmartViewContextModule,
|
|
12170
|
+
]] });
|
|
12171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeModule, decorators: [{
|
|
12172
|
+
type: NgModule,
|
|
12118
12173
|
args: [{
|
|
12119
|
-
|
|
12174
|
+
declarations: [SmartTreeComponent],
|
|
12175
|
+
imports: [
|
|
12176
|
+
BrowserModule,
|
|
12177
|
+
MatCommonModule,
|
|
12178
|
+
MatButtonModule,
|
|
12179
|
+
MatIconModule,
|
|
12180
|
+
MatTreeModule,
|
|
12181
|
+
MatMenuModule,
|
|
12182
|
+
SmartIconModule,
|
|
12183
|
+
SmartViewContextModule,
|
|
12184
|
+
],
|
|
12185
|
+
exports: [SmartTreeComponent],
|
|
12186
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
12187
|
+
providers: [SmarttreeService, SmarttreeGenericService],
|
|
12120
12188
|
}]
|
|
12121
|
-
}]
|
|
12189
|
+
}] });
|
|
12122
12190
|
|
|
12123
|
-
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
this.reSubscribeToChange = new Subject();
|
|
12131
|
-
this.uiActionDescriptors = new Map();
|
|
12132
|
-
this.viewContextName = 'viewContextUuid';
|
|
12133
|
-
this.configureTree({
|
|
12134
|
-
pageName: this.pageName,
|
|
12135
|
-
treeid: this.treeId,
|
|
12136
|
-
viewContextName: this.viewContextName,
|
|
12137
|
-
});
|
|
12138
|
-
this.viewContext = inject.get(SmartViewContextService);
|
|
12139
|
-
this.service = inject.get(TreeService);
|
|
12140
|
-
this.uiActionService = inject.get(UiActionService);
|
|
12141
|
-
this.uiActionDescriptorService = inject.get(UiActionDescriptorService);
|
|
12142
|
-
this.initialize();
|
|
12191
|
+
/**
|
|
12192
|
+
* Custom HttpParameterCodec
|
|
12193
|
+
* Workaround for https://github.com/angular/angular/issues/18261
|
|
12194
|
+
*/
|
|
12195
|
+
class CustomHttpParameterCodec$1 {
|
|
12196
|
+
encodeKey(k) {
|
|
12197
|
+
return encodeURIComponent(k);
|
|
12143
12198
|
}
|
|
12144
|
-
|
|
12145
|
-
|
|
12146
|
-
return {
|
|
12147
|
-
serviceToUse: this,
|
|
12148
|
-
uiAction,
|
|
12149
|
-
};
|
|
12150
|
-
});
|
|
12199
|
+
encodeValue(v) {
|
|
12200
|
+
return encodeURIComponent(v);
|
|
12151
12201
|
}
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
this.viewContextName = configuration.viewContextName;
|
|
12155
|
-
this.pageName = configuration.pageName;
|
|
12202
|
+
decodeKey(k) {
|
|
12203
|
+
return decodeURIComponent(k);
|
|
12156
12204
|
}
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
await this.downloadTree().then((rootNodes) => {
|
|
12160
|
-
if (!deepEqual(this.treeFromBackend, rootNodes)) {
|
|
12161
|
-
this.treeFromBackend = rootNodes;
|
|
12162
|
-
this.syncTree();
|
|
12163
|
-
}
|
|
12164
|
-
});
|
|
12165
|
-
}
|
|
12205
|
+
decodeValue(v) {
|
|
12206
|
+
return decodeURIComponent(v);
|
|
12166
12207
|
}
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12208
|
+
}
|
|
12209
|
+
|
|
12210
|
+
const BASE_PATH$1 = new InjectionToken('basePath');
|
|
12211
|
+
const COLLECTION_FORMATS$1 = {
|
|
12212
|
+
'csv': ',',
|
|
12213
|
+
'tsv': ' ',
|
|
12214
|
+
'ssv': ' ',
|
|
12215
|
+
'pipes': '|'
|
|
12216
|
+
};
|
|
12217
|
+
|
|
12218
|
+
class Configuration$1 {
|
|
12219
|
+
constructor(configurationParameters = {}) {
|
|
12220
|
+
this.apiKeys = configurationParameters.apiKeys;
|
|
12221
|
+
this.username = configurationParameters.username;
|
|
12222
|
+
this.password = configurationParameters.password;
|
|
12223
|
+
this.accessToken = configurationParameters.accessToken;
|
|
12224
|
+
this.basePath = configurationParameters.basePath;
|
|
12225
|
+
this.withCredentials = configurationParameters.withCredentials;
|
|
12226
|
+
this.encoder = configurationParameters.encoder;
|
|
12227
|
+
if (configurationParameters.encodeParam) {
|
|
12228
|
+
this.encodeParam = configurationParameters.encodeParam;
|
|
12173
12229
|
}
|
|
12174
|
-
|
|
12175
|
-
|
|
12230
|
+
else {
|
|
12231
|
+
this.encodeParam = param => this.defaultEncodeParam(param);
|
|
12176
12232
|
}
|
|
12177
|
-
|
|
12178
|
-
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
|
|
12182
|
-
if (!children) {
|
|
12183
|
-
throw new Error(`Node with identifier ${parentNode.identifier} does not have children.`);
|
|
12233
|
+
if (configurationParameters.credentials) {
|
|
12234
|
+
this.credentials = configurationParameters.credentials;
|
|
12235
|
+
}
|
|
12236
|
+
else {
|
|
12237
|
+
this.credentials = {};
|
|
12184
12238
|
}
|
|
12185
|
-
return children;
|
|
12186
12239
|
}
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12190
|
-
|
|
12191
|
-
|
|
12240
|
+
/**
|
|
12241
|
+
* Select the correct content-type to use for a request.
|
|
12242
|
+
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
|
|
12243
|
+
* If no content type is found return the first found type if the contentTypes is not empty
|
|
12244
|
+
* @param contentTypes - the array of content types that are available for selection
|
|
12245
|
+
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
|
12246
|
+
*/
|
|
12247
|
+
selectHeaderContentType(contentTypes) {
|
|
12248
|
+
if (contentTypes.length === 0) {
|
|
12249
|
+
return undefined;
|
|
12192
12250
|
}
|
|
12193
|
-
|
|
12194
|
-
|
|
12195
|
-
|
|
12251
|
+
const type = contentTypes.find((x) => this.isJsonMime(x));
|
|
12252
|
+
if (type === undefined) {
|
|
12253
|
+
return contentTypes[0];
|
|
12196
12254
|
}
|
|
12197
|
-
|
|
12198
|
-
node.expanded = treeNode?.expanded;
|
|
12199
|
-
node.childrenNodes = treeNode?.childrenNodes;
|
|
12200
|
-
this.syncTree();
|
|
12201
|
-
}
|
|
12202
|
-
onTreeNodeClick(treeNode) {
|
|
12203
|
-
this.selectFolder(treeNode.identifier, treeNode);
|
|
12255
|
+
return type;
|
|
12204
12256
|
}
|
|
12205
|
-
|
|
12206
|
-
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12257
|
+
/**
|
|
12258
|
+
* Select the correct accept content-type to use for a request.
|
|
12259
|
+
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
|
|
12260
|
+
* If no content type is found return the first found type if the contentTypes is not empty
|
|
12261
|
+
* @param accepts - the array of content types that are available for selection.
|
|
12262
|
+
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
|
12263
|
+
*/
|
|
12264
|
+
selectHeaderAccept(accepts) {
|
|
12265
|
+
if (accepts.length === 0) {
|
|
12266
|
+
return undefined;
|
|
12210
12267
|
}
|
|
12211
|
-
|
|
12212
|
-
|
|
12213
|
-
|
|
12214
|
-
throw Error('Tree node does not exist');
|
|
12268
|
+
const type = accepts.find((x) => this.isJsonMime(x));
|
|
12269
|
+
if (type === undefined) {
|
|
12270
|
+
return accepts[0];
|
|
12215
12271
|
}
|
|
12216
|
-
|
|
12217
|
-
node.childrenNodes = updatedTreeNode?.childrenNodes;
|
|
12218
|
-
node.selected = updatedTreeNode?.selected;
|
|
12219
|
-
treeNode = updatedTreeNode;
|
|
12220
|
-
this.syncTree();
|
|
12221
|
-
this.viewContext.getAndSyncViewContext(this.viewContext.getUuidOfPage(this.viewContextName));
|
|
12272
|
+
return type;
|
|
12222
12273
|
}
|
|
12223
|
-
|
|
12224
|
-
|
|
12274
|
+
/**
|
|
12275
|
+
* Check if the given MIME is a JSON MIME.
|
|
12276
|
+
* JSON MIME examples:
|
|
12277
|
+
* application/json
|
|
12278
|
+
* application/json; charset=UTF8
|
|
12279
|
+
* APPLICATION/JSON
|
|
12280
|
+
* application/vnd.company+json
|
|
12281
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
12282
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
12283
|
+
*/
|
|
12284
|
+
isJsonMime(mime) {
|
|
12285
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
12286
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
12225
12287
|
}
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12229
|
-
|
|
12230
|
-
|
|
12231
|
-
if (!this.smartTreeModel) {
|
|
12232
|
-
this.smartTreeModel = {
|
|
12233
|
-
rootNodes: [],
|
|
12234
|
-
};
|
|
12235
|
-
}
|
|
12236
|
-
let smartTreeNodes = this.createButtonsForTreeNodes(this.treeFromBackend);
|
|
12237
|
-
this.smartTreeModel = undefined;
|
|
12238
|
-
this.smartTreeModel = {
|
|
12239
|
-
rootNodes: [],
|
|
12240
|
-
};
|
|
12241
|
-
this.smartTreeModelChanged.next(this.smartTreeModel);
|
|
12242
|
-
this.smartTreeModel.rootNodes = smartTreeNodes;
|
|
12243
|
-
this.findSelected(this.smartTreeModel.rootNodes);
|
|
12244
|
-
this.smartTreeModelChanged.next(this.smartTreeModel);
|
|
12288
|
+
lookupCredential(key) {
|
|
12289
|
+
const value = this.credentials[key];
|
|
12290
|
+
return typeof value === 'function'
|
|
12291
|
+
? value()
|
|
12292
|
+
: value;
|
|
12245
12293
|
}
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
for
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12294
|
+
defaultEncodeParam(param) {
|
|
12295
|
+
// This implementation exists as fallback for missing configuration
|
|
12296
|
+
// and for backwards compatibility to older typescript-angular generator versions.
|
|
12297
|
+
// It only works for the 'simple' parameter style.
|
|
12298
|
+
// Date-handling only works for the 'date-time' format.
|
|
12299
|
+
// All other styles and Date-formats are probably handled incorrectly.
|
|
12300
|
+
//
|
|
12301
|
+
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
|
|
12302
|
+
const value = param.dataFormat === 'date-time' && param.value instanceof Date
|
|
12303
|
+
? param.value.toISOString()
|
|
12304
|
+
: param.value;
|
|
12305
|
+
return encodeURIComponent(String(value));
|
|
12306
|
+
}
|
|
12307
|
+
}
|
|
12308
|
+
|
|
12309
|
+
/**
|
|
12310
|
+
* Form layout definition
|
|
12311
|
+
* Contains form layout definition objects.
|
|
12312
|
+
*
|
|
12313
|
+
* The version of the OpenAPI document: 1.0.0
|
|
12314
|
+
* Contact: info@it4all.hu
|
|
12315
|
+
*
|
|
12316
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12317
|
+
* https://openapi-generator.tech
|
|
12318
|
+
* Do not edit the class manually.
|
|
12319
|
+
*/
|
|
12320
|
+
class DefaultService {
|
|
12321
|
+
constructor(httpClient, basePath, configuration) {
|
|
12322
|
+
this.httpClient = httpClient;
|
|
12323
|
+
this.basePath = 'http://localhost';
|
|
12324
|
+
this.defaultHeaders = new HttpHeaders();
|
|
12325
|
+
this.configuration = new Configuration$1();
|
|
12326
|
+
if (configuration) {
|
|
12327
|
+
this.configuration = configuration;
|
|
12260
12328
|
}
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
return nodes.forEach((node) => {
|
|
12265
|
-
if (node.selected) {
|
|
12266
|
-
this.selectedNode = node;
|
|
12267
|
-
return;
|
|
12268
|
-
}
|
|
12269
|
-
else if (node.childrenNodes && node.childrenNodes.length) {
|
|
12270
|
-
return this.findSelected(node.childrenNodes);
|
|
12329
|
+
if (typeof this.configuration.basePath !== 'string') {
|
|
12330
|
+
if (Array.isArray(basePath) && basePath.length > 0) {
|
|
12331
|
+
basePath = basePath[0];
|
|
12271
12332
|
}
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
createButtonsForTreeNodes(nodes) {
|
|
12275
|
-
nodes.map((node) => {
|
|
12276
|
-
node.button = node.actions?.length
|
|
12277
|
-
? {
|
|
12278
|
-
type: SmartTreeNodeButtonType.MENU,
|
|
12279
|
-
icon: 'more_vert',
|
|
12280
|
-
menuItemButtons: node.actions.map((action) => {
|
|
12281
|
-
return {
|
|
12282
|
-
type: SmartTreeNodeButtonType.NORMAL,
|
|
12283
|
-
label: this.getLabelByAction(action),
|
|
12284
|
-
callback: this.doAction.bind(this),
|
|
12285
|
-
args: [action, node.identifier],
|
|
12286
|
-
};
|
|
12287
|
-
}),
|
|
12288
|
-
}
|
|
12289
|
-
: undefined;
|
|
12290
|
-
node.icon = 'Folders';
|
|
12291
|
-
if (node.childrenNodes) {
|
|
12292
|
-
node.childrenNodes = this.createButtonsForTreeNodes(node.childrenNodes);
|
|
12333
|
+
if (typeof basePath !== 'string') {
|
|
12334
|
+
basePath = this.basePath;
|
|
12293
12335
|
}
|
|
12294
|
-
|
|
12295
|
-
|
|
12336
|
+
this.configuration.basePath = basePath;
|
|
12337
|
+
}
|
|
12338
|
+
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec$1();
|
|
12296
12339
|
}
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
uiAction.params['nodeUuid'] = nodeUuid;
|
|
12340
|
+
// @ts-ignore
|
|
12341
|
+
addToHttpParams(httpParams, value, key) {
|
|
12342
|
+
if (typeof value === "object" && value instanceof Date === false) {
|
|
12343
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
12302
12344
|
}
|
|
12303
12345
|
else {
|
|
12304
|
-
|
|
12305
|
-
nodeUuid: nodeUuid,
|
|
12306
|
-
};
|
|
12346
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
12307
12347
|
}
|
|
12308
|
-
|
|
12309
|
-
serviceToUse: this,
|
|
12310
|
-
uiAction,
|
|
12311
|
-
};
|
|
12312
|
-
this.uiActionService.uiActionModel = uiActionModel;
|
|
12313
|
-
this.uiActionService.execute(uiAction);
|
|
12314
|
-
}
|
|
12315
|
-
getAllNodes(nodes) {
|
|
12316
|
-
return nodes.flatMap((n) => [n, ...this.getAllNodes(n.childrenNodes)]);
|
|
12348
|
+
return httpParams;
|
|
12317
12349
|
}
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
node.actions
|
|
12322
|
-
?.filter((uiAction) => !this.uiActionDescriptors.get(uiAction.code))
|
|
12323
|
-
.forEach((action) => newUiActions.add(action));
|
|
12324
|
-
});
|
|
12325
|
-
for (let action of newUiActions) {
|
|
12326
|
-
if (!this.uiActionDescriptors.get(action.code)) {
|
|
12327
|
-
let descriptor = await this.uiActionDescriptorService.getActionDescriptor(action);
|
|
12328
|
-
this.uiActionDescriptors.set(action.code, descriptor);
|
|
12329
|
-
}
|
|
12350
|
+
addToHttpParamsRecursive(httpParams, value, key) {
|
|
12351
|
+
if (value == null) {
|
|
12352
|
+
return httpParams;
|
|
12330
12353
|
}
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12354
|
+
if (typeof value === "object") {
|
|
12355
|
+
if (Array.isArray(value)) {
|
|
12356
|
+
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
12357
|
+
}
|
|
12358
|
+
else if (value instanceof Date) {
|
|
12359
|
+
if (key != null) {
|
|
12360
|
+
httpParams = httpParams.append(key, value.toISOString().substr(0, 10));
|
|
12361
|
+
}
|
|
12362
|
+
else {
|
|
12363
|
+
throw Error("key may not be null if value is Date");
|
|
12364
|
+
}
|
|
12365
|
+
}
|
|
12366
|
+
else {
|
|
12367
|
+
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
12343
12368
|
}
|
|
12344
|
-
return {
|
|
12345
|
-
forTextArea: '',
|
|
12346
|
-
forTextField: nodeName ? nodeName : '',
|
|
12347
|
-
};
|
|
12348
12369
|
}
|
|
12349
|
-
|
|
12350
|
-
|
|
12351
|
-
forTextField: '',
|
|
12352
|
-
};
|
|
12353
|
-
}
|
|
12354
|
-
getModel() {
|
|
12355
|
-
return {};
|
|
12356
|
-
}
|
|
12357
|
-
async performUiActionRequest(uiActionRequest) {
|
|
12358
|
-
if (uiActionRequest.params['nodeUuid']) {
|
|
12359
|
-
await this.performNodeUiActionRequest(uiActionRequest);
|
|
12370
|
+
else if (key != null) {
|
|
12371
|
+
httpParams = httpParams.append(key, value);
|
|
12360
12372
|
}
|
|
12361
12373
|
else {
|
|
12362
|
-
|
|
12374
|
+
throw Error("key may not be null if value is not object or array");
|
|
12363
12375
|
}
|
|
12364
|
-
|
|
12365
|
-
this.syncTree();
|
|
12376
|
+
return httpParams;
|
|
12366
12377
|
}
|
|
12367
|
-
|
|
12368
|
-
let
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12378
|
+
nopePost(observe = 'body', reportProgress = false, options) {
|
|
12379
|
+
let localVarHeaders = this.defaultHeaders;
|
|
12380
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
12381
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
12382
|
+
// to determine the Accept header
|
|
12383
|
+
const httpHeaderAccepts = [];
|
|
12384
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
12385
|
+
}
|
|
12386
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
12387
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
12388
|
+
}
|
|
12389
|
+
let localVarHttpContext = options && options.context;
|
|
12390
|
+
if (localVarHttpContext === undefined) {
|
|
12391
|
+
localVarHttpContext = new HttpContext();
|
|
12392
|
+
}
|
|
12393
|
+
let responseType_ = 'json';
|
|
12394
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
12395
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
12396
|
+
responseType_ = 'text';
|
|
12397
|
+
}
|
|
12398
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
12399
|
+
responseType_ = 'json';
|
|
12400
|
+
}
|
|
12401
|
+
else {
|
|
12402
|
+
responseType_ = 'blob';
|
|
12403
|
+
}
|
|
12404
|
+
}
|
|
12405
|
+
let localVarPath = `/nope`;
|
|
12406
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
12407
|
+
context: localVarHttpContext,
|
|
12408
|
+
responseType: responseType_,
|
|
12409
|
+
withCredentials: this.configuration.withCredentials,
|
|
12410
|
+
headers: localVarHeaders,
|
|
12411
|
+
observe: observe,
|
|
12412
|
+
reportProgress: reportProgress
|
|
12413
|
+
});
|
|
12372
12414
|
}
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12415
|
+
}
|
|
12416
|
+
DefaultService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DefaultService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH$1, optional: true }, { token: Configuration$1, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12417
|
+
DefaultService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DefaultService, providedIn: 'root' });
|
|
12418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DefaultService, decorators: [{
|
|
12419
|
+
type: Injectable,
|
|
12420
|
+
args: [{
|
|
12421
|
+
providedIn: 'root'
|
|
12422
|
+
}]
|
|
12423
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
12424
|
+
type: Optional
|
|
12425
|
+
}, {
|
|
12426
|
+
type: Inject,
|
|
12427
|
+
args: [BASE_PATH$1]
|
|
12428
|
+
}] }, { type: Configuration$1, decorators: [{
|
|
12429
|
+
type: Optional
|
|
12430
|
+
}] }]; } });
|
|
12431
|
+
|
|
12432
|
+
const APIS = [DefaultService];
|
|
12433
|
+
|
|
12434
|
+
/**
|
|
12435
|
+
* Form layout definition
|
|
12436
|
+
* Contains form layout definition objects.
|
|
12437
|
+
*
|
|
12438
|
+
* The version of the OpenAPI document: 1.0.0
|
|
12439
|
+
* Contact: info@it4all.hu
|
|
12440
|
+
*
|
|
12441
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12442
|
+
* https://openapi-generator.tech
|
|
12443
|
+
* Do not edit the class manually.
|
|
12444
|
+
*/
|
|
12445
|
+
var ComponentType;
|
|
12446
|
+
(function (ComponentType) {
|
|
12447
|
+
ComponentType["CONTAINER"] = "container";
|
|
12448
|
+
ComponentType["FORM"] = "form";
|
|
12449
|
+
ComponentType["WIDGET"] = "widget";
|
|
12450
|
+
})(ComponentType || (ComponentType = {}));
|
|
12451
|
+
|
|
12452
|
+
/**
|
|
12453
|
+
* Form layout definition
|
|
12454
|
+
* Contains form layout definition objects.
|
|
12455
|
+
*
|
|
12456
|
+
* The version of the OpenAPI document: 1.0.0
|
|
12457
|
+
* Contact: info@it4all.hu
|
|
12458
|
+
*
|
|
12459
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12460
|
+
* https://openapi-generator.tech
|
|
12461
|
+
* Do not edit the class manually.
|
|
12462
|
+
*/
|
|
12463
|
+
var ComponentWidgetType;
|
|
12464
|
+
(function (ComponentWidgetType) {
|
|
12465
|
+
ComponentWidgetType["GRID"] = "grid";
|
|
12466
|
+
ComponentWidgetType["FILTER"] = "filter";
|
|
12467
|
+
ComponentWidgetType["TREE"] = "tree";
|
|
12468
|
+
ComponentWidgetType["TOOLBAR"] = "toolbar";
|
|
12469
|
+
})(ComponentWidgetType || (ComponentWidgetType = {}));
|
|
12470
|
+
|
|
12471
|
+
/**
|
|
12472
|
+
* Form layout definition
|
|
12473
|
+
* Contains form layout definition objects.
|
|
12474
|
+
*
|
|
12475
|
+
* The version of the OpenAPI document: 1.0.0
|
|
12476
|
+
* Contact: info@it4all.hu
|
|
12477
|
+
*
|
|
12478
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12479
|
+
* https://openapi-generator.tech
|
|
12480
|
+
* Do not edit the class manually.
|
|
12481
|
+
*/
|
|
12482
|
+
var LayoutDirection;
|
|
12483
|
+
(function (LayoutDirection) {
|
|
12484
|
+
LayoutDirection["HORIZONTAL"] = "horizontal";
|
|
12485
|
+
LayoutDirection["VERTICAL"] = "vertical";
|
|
12486
|
+
})(LayoutDirection || (LayoutDirection = {}));
|
|
12487
|
+
|
|
12488
|
+
class ApiModule {
|
|
12489
|
+
constructor(parentModule, http) {
|
|
12490
|
+
if (parentModule) {
|
|
12491
|
+
throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
|
|
12492
|
+
}
|
|
12493
|
+
if (!http) {
|
|
12494
|
+
throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
|
|
12495
|
+
'See also https://github.com/angular/angular/issues/20575');
|
|
12496
|
+
}
|
|
12376
12497
|
}
|
|
12377
|
-
|
|
12378
|
-
|
|
12498
|
+
static forRoot(configurationFactory) {
|
|
12499
|
+
return {
|
|
12500
|
+
ngModule: ApiModule,
|
|
12501
|
+
providers: [{ provide: Configuration$1, useFactory: configurationFactory }]
|
|
12502
|
+
};
|
|
12379
12503
|
}
|
|
12380
12504
|
}
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
i0.ɵɵ
|
|
12384
|
-
|
|
12505
|
+
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiModule, deps: [{ token: ApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12506
|
+
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiModule });
|
|
12507
|
+
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiModule, providers: [], imports: [[]] });
|
|
12508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiModule, decorators: [{
|
|
12509
|
+
type: NgModule,
|
|
12385
12510
|
args: [{
|
|
12386
|
-
|
|
12511
|
+
imports: [],
|
|
12512
|
+
declarations: [],
|
|
12513
|
+
exports: [],
|
|
12514
|
+
providers: []
|
|
12387
12515
|
}]
|
|
12388
|
-
}], ctorParameters: function () { return [{ type:
|
|
12389
|
-
type:
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12516
|
+
}], ctorParameters: function () { return [{ type: ApiModule, decorators: [{
|
|
12517
|
+
type: Optional
|
|
12518
|
+
}, {
|
|
12519
|
+
type: SkipSelf
|
|
12520
|
+
}] }, { type: i1.HttpClient, decorators: [{
|
|
12521
|
+
type: Optional
|
|
12394
12522
|
}] }]; } });
|
|
12395
12523
|
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
|
|
12524
|
+
/*
|
|
12525
|
+
* Public API Surface of smart-grid
|
|
12526
|
+
*/
|
|
12527
|
+
|
|
12528
|
+
class SmartComponentLayoutComponent {
|
|
12529
|
+
constructor(layoutService) {
|
|
12530
|
+
this.layoutService = layoutService;
|
|
12399
12531
|
this._destroy$ = new Subject();
|
|
12400
|
-
this.
|
|
12401
|
-
this.dataSource = new MatTreeNestedDataSource();
|
|
12402
|
-
this.smartTreeNodeButtonType = SmartTreeNodeButtonType;
|
|
12403
|
-
this.uiActionModels = [];
|
|
12404
|
-
this.hasChild = (_, node) => node.hasChildren;
|
|
12532
|
+
this.toolbarId = 'not_initialized_yet';
|
|
12405
12533
|
}
|
|
12406
|
-
|
|
12407
|
-
if (
|
|
12408
|
-
|
|
12534
|
+
ngAfterViewInit() {
|
|
12535
|
+
if (this.smartFormList?.first) {
|
|
12536
|
+
this.setFormComponent(this.smartFormList?.first);
|
|
12409
12537
|
}
|
|
12410
|
-
this.
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
this.
|
|
12414
|
-
this.expandTreeNodes();
|
|
12538
|
+
this.smartFormList.changes
|
|
12539
|
+
.pipe(takeUntil(this._destroy$))
|
|
12540
|
+
.subscribe((list) => {
|
|
12541
|
+
this.setFormComponent(list.first);
|
|
12415
12542
|
});
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12543
|
+
if (this.smartGridList?.first) {
|
|
12544
|
+
this.setGridComponent(this.smartGridList?.first);
|
|
12545
|
+
}
|
|
12546
|
+
this.smartGridList.changes
|
|
12547
|
+
.pipe(takeUntil(this._destroy$))
|
|
12548
|
+
.subscribe((list) => {
|
|
12549
|
+
this.setGridComponent(list.first);
|
|
12550
|
+
});
|
|
12551
|
+
this.smartFilterList.changes
|
|
12552
|
+
.pipe(takeUntil(this._destroy$))
|
|
12553
|
+
.subscribe((list) => {
|
|
12554
|
+
if (!this.smartFilterComponent) {
|
|
12555
|
+
this.smartFilterComponent = list.first;
|
|
12556
|
+
this.bindFilter();
|
|
12419
12557
|
}
|
|
12420
12558
|
});
|
|
12559
|
+
if (this.toolbarList?.first) {
|
|
12560
|
+
this.setToolbarComponent(this.toolbarList?.first);
|
|
12561
|
+
}
|
|
12562
|
+
this.toolbarList.changes
|
|
12563
|
+
.pipe(takeUntil(this._destroy$))
|
|
12564
|
+
.subscribe((list) => {
|
|
12565
|
+
this.setToolbarComponent(list.first);
|
|
12566
|
+
});
|
|
12567
|
+
if (this.smartComponentLayout) {
|
|
12568
|
+
this.setUp();
|
|
12569
|
+
}
|
|
12421
12570
|
}
|
|
12422
12571
|
ngOnDestroy() {
|
|
12423
12572
|
this._destroy$.next();
|
|
12424
12573
|
this._destroy$.complete();
|
|
12425
12574
|
}
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12575
|
+
ngOnChanges(changes) {
|
|
12576
|
+
this.smartComponentLayout = changes['smartComponentLayout'].currentValue;
|
|
12577
|
+
if (this.smartComponentLayout) {
|
|
12578
|
+
this.setUp();
|
|
12579
|
+
}
|
|
12431
12580
|
}
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12581
|
+
setUp() {
|
|
12582
|
+
this.parent = this.smartComponentLayout?.parentComponent;
|
|
12583
|
+
this.uuid = this.parent.uuid;
|
|
12584
|
+
this.treeService = this.parent.smartTreeService;
|
|
12585
|
+
if (this.smartComponentLayout?.expandable) {
|
|
12586
|
+
this.constructExpandableSection();
|
|
12587
|
+
}
|
|
12588
|
+
else if (this.smartComponentLayout?.type === ComponentType.FORM) {
|
|
12589
|
+
this.constructForm();
|
|
12590
|
+
}
|
|
12591
|
+
else if (this.smartComponentLayout?.type === ComponentType.WIDGET) {
|
|
12592
|
+
if (this.smartComponentLayout.widget?.type === ComponentWidgetType.GRID) {
|
|
12593
|
+
this.constructGrid();
|
|
12440
12594
|
}
|
|
12441
|
-
else {
|
|
12442
|
-
this.
|
|
12595
|
+
else if (this.smartComponentLayout.widget?.type === ComponentWidgetType.FILTER) {
|
|
12596
|
+
this.constructFilter();
|
|
12443
12597
|
}
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
this.treeService.onTreeNodeClick(node);
|
|
12598
|
+
else if (this.smartComponentLayout.widget?.type === ComponentWidgetType.TREE) {
|
|
12599
|
+
this.constructTree();
|
|
12600
|
+
}
|
|
12601
|
+
else if (this.smartComponentLayout.widget?.type === ComponentWidgetType.TOOLBAR) {
|
|
12602
|
+
this.constructToolbar();
|
|
12603
|
+
}
|
|
12604
|
+
this.parent.initActions();
|
|
12605
|
+
}
|
|
12453
12606
|
}
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
this.treeService.onTreeNodeOpen(node);
|
|
12607
|
+
type() {
|
|
12608
|
+
return ComponentType;
|
|
12457
12609
|
}
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
color: this.treeStyle.color,
|
|
12468
|
-
};
|
|
12469
|
-
return style;
|
|
12470
|
-
}
|
|
12471
|
-
return {};
|
|
12610
|
+
constructExpandableSection() {
|
|
12611
|
+
let data = { ...this.smartComponentLayout };
|
|
12612
|
+
data.expandable = false;
|
|
12613
|
+
this.expandableSection = {
|
|
12614
|
+
title: this.smartComponentLayout?.expandableSectionLabel ?? '',
|
|
12615
|
+
data,
|
|
12616
|
+
inputName: 'smartComponentLayout',
|
|
12617
|
+
customComponent: SmartComponentLayoutComponent,
|
|
12618
|
+
};
|
|
12472
12619
|
}
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
}
|
|
12484
|
-
return {};
|
|
12620
|
+
constructForm() {
|
|
12621
|
+
const widgets = this.layoutService.render({
|
|
12622
|
+
layoutDefinitions: this.smartComponentLayout?.form,
|
|
12623
|
+
});
|
|
12624
|
+
this.smartForm = {
|
|
12625
|
+
direction: SmartFormWidgetDirection.COL,
|
|
12626
|
+
componentModel: this.parent?.model,
|
|
12627
|
+
widgets,
|
|
12628
|
+
};
|
|
12629
|
+
this.bindForm();
|
|
12485
12630
|
}
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
}
|
|
12491
|
-
if (!button.callback) {
|
|
12492
|
-
throw new Error(`Button with name ${button.label || button.icon} does not have a callback!`);
|
|
12493
|
-
}
|
|
12494
|
-
button.callback(button.args);
|
|
12495
|
-
if (close) {
|
|
12496
|
-
let openMenus = this.trigger.filter((matMenuTrigger) => matMenuTrigger.menuOpen);
|
|
12497
|
-
openMenus.forEach((matMenuTrigger) => {
|
|
12498
|
-
matMenuTrigger.closeMenu();
|
|
12499
|
-
});
|
|
12631
|
+
setFormComponent(comp) {
|
|
12632
|
+
if (!this.smartFormComponent) {
|
|
12633
|
+
this.smartFormComponent = comp;
|
|
12634
|
+
this.bindForm();
|
|
12500
12635
|
}
|
|
12501
12636
|
}
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
else {
|
|
12508
|
-
classes.push(this.getCustomClass('collapsed', node.level));
|
|
12509
|
-
}
|
|
12510
|
-
if (node.selected) {
|
|
12511
|
-
classes.push(this.getCustomClass('selected', node.level));
|
|
12512
|
-
}
|
|
12513
|
-
else {
|
|
12514
|
-
classes.push(this.getCustomClass('unselected', node.level));
|
|
12515
|
-
}
|
|
12516
|
-
if (node.level !== 0) {
|
|
12517
|
-
classes.push(this.getCustomClass('child', node.level));
|
|
12637
|
+
bindForm() {
|
|
12638
|
+
if (this.smartForm && this.smartFormComponent) {
|
|
12639
|
+
this.parent?.addForm(
|
|
12640
|
+
// unique identifier for the form
|
|
12641
|
+
`form_${this.makeid(5)}`, this.smartForm, this.smartFormComponent);
|
|
12518
12642
|
}
|
|
12519
|
-
return classes;
|
|
12520
12643
|
}
|
|
12521
|
-
|
|
12522
|
-
let
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12644
|
+
makeid(length) {
|
|
12645
|
+
let result = '';
|
|
12646
|
+
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
12647
|
+
const charactersLength = characters.length;
|
|
12648
|
+
let counter = 0;
|
|
12649
|
+
while (counter < length) {
|
|
12650
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
12651
|
+
counter += 1;
|
|
12528
12652
|
}
|
|
12529
|
-
|
|
12530
|
-
|
|
12653
|
+
return result;
|
|
12654
|
+
}
|
|
12655
|
+
constructGrid() {
|
|
12656
|
+
this.smartGrid = {
|
|
12657
|
+
gridIdentifier: this.smartComponentLayout?.widget?.identifier,
|
|
12658
|
+
gridModel: {
|
|
12659
|
+
page: {},
|
|
12660
|
+
},
|
|
12661
|
+
options: {
|
|
12662
|
+
rowUiActionType: GridUiActionType.POPUP_MENU,
|
|
12663
|
+
},
|
|
12664
|
+
layoutDef: SmartLayoutDef.TABLE,
|
|
12665
|
+
paginator: true,
|
|
12666
|
+
};
|
|
12667
|
+
this.bindGrid();
|
|
12668
|
+
}
|
|
12669
|
+
setGridComponent(comp) {
|
|
12670
|
+
if (!this.smartGridComponent) {
|
|
12671
|
+
this.smartGridComponent = comp;
|
|
12672
|
+
this.bindGrid();
|
|
12531
12673
|
}
|
|
12532
|
-
|
|
12533
|
-
|
|
12674
|
+
}
|
|
12675
|
+
bindGrid() {
|
|
12676
|
+
if (this.smartGrid && this.smartGridComponent) {
|
|
12677
|
+
this.smartGrid = this.parent?.addGrid(this.smartGrid, {
|
|
12678
|
+
rowUiActionType: GridUiActionType.POPUP_MENU,
|
|
12679
|
+
}, false, this.smartGridComponent);
|
|
12534
12680
|
}
|
|
12535
|
-
return classes;
|
|
12536
12681
|
}
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
classes.push(this.getCustomClass('group', node.level));
|
|
12540
|
-
return classes;
|
|
12682
|
+
setToolbarComponent(comp) {
|
|
12683
|
+
this.toolbar = comp;
|
|
12541
12684
|
}
|
|
12542
|
-
|
|
12543
|
-
|
|
12685
|
+
constructFilter() {
|
|
12686
|
+
this.smartFilter = this.smartComponentLayout.parentComponent.addFilter(`filter_${this.makeid(5)}`, this.smartComponentLayout?.widget?.filterExpressionFieldList, this.smartComponentLayout?.widget?.filterType, this.smartFilterComponent);
|
|
12687
|
+
}
|
|
12688
|
+
bindFilter() {
|
|
12689
|
+
// TODO
|
|
12690
|
+
}
|
|
12691
|
+
constructTree() {
|
|
12692
|
+
this.parent.setUpDefaultTree(this.smartComponentLayout?.widget?.identifier);
|
|
12693
|
+
this.treeService?.initialize();
|
|
12694
|
+
}
|
|
12695
|
+
constructToolbar() {
|
|
12696
|
+
let toolbarId = this.smartComponentLayout?.widget?.identifier;
|
|
12697
|
+
if (this.toolbarId !== toolbarId) {
|
|
12698
|
+
this.toolbarId = toolbarId;
|
|
12699
|
+
}
|
|
12544
12700
|
}
|
|
12545
12701
|
}
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type:
|
|
12702
|
+
SmartComponentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, deps: [{ token: SmartformLayoutDefinitionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
12703
|
+
SmartComponentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: { smartComponentLayout: "smartComponentLayout" }, viewQueries: [{ propertyName: "smartFormList", predicate: ["form"], descendants: true }, { propertyName: "smartGridList", predicate: ["grid"], descendants: true }, { propertyName: "smartFilterList", predicate: ["filter"], descendants: true }, { propertyName: "toolbarList", predicate: ["toolbar"], descendants: true }, { propertyName: "components", predicate: SmartComponentLayoutComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n <smart-ui-action-toolbar #toolbar [id]=\"toolbarId\"></smart-ui-action-toolbar>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"], components: [{ type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }, { type: SmartComponentLayoutComponent, selector: "smart-component-layout", inputs: ["smartComponentLayout"] }, { type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }, { type: SmartGridComponent, selector: "smart-grid", inputs: ["smartGrid", "uuid", "dev"] }, { type: SmartTreeComponent, selector: "smart-tree", inputs: ["treeStyle", "treeService"] }, { type: UiActionToolbarComponent, selector: "smart-ui-action-toolbar", inputs: ["uiActionModels", "uiActionDescriptorService", "id"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
12704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutComponent, decorators: [{
|
|
12549
12705
|
type: Component,
|
|
12550
|
-
args: [{ selector: 'smart-
|
|
12551
|
-
}], ctorParameters: function () { return [{ type:
|
|
12552
|
-
type: ViewChildren,
|
|
12553
|
-
args: [MatMenuTrigger]
|
|
12554
|
-
}], tree: [{
|
|
12555
|
-
type: ViewChild,
|
|
12556
|
-
args: ['tree']
|
|
12557
|
-
}], treeStyle: [{
|
|
12558
|
-
type: Input
|
|
12559
|
-
}], treeService: [{
|
|
12706
|
+
args: [{ selector: 'smart-component-layout', template: "<div *ngIf=\"smartComponentLayout?.expandable; then expandable; else normal\"> </div>\r\n\r\n<ng-template #expandable>\r\n <smart-expandable-section\r\n *ngIf=\"expandableSection\"\r\n [data]=\"expandableSection\"\r\n ></smart-expandable-section>\r\n</ng-template>\r\n\r\n<ng-template #normal>\r\n <div\r\n *ngIf=\"smartComponentLayout?.type === type().CONTAINER\"\r\n [ngClass]=\"smartComponentLayout?.direction ?? 'vertical'\"\r\n >\r\n <smart-component-layout\r\n *ngFor=\"let layout of smartComponentLayout?.components\"\r\n [smartComponentLayout]=\"layout\"\r\n ></smart-component-layout>\r\n </div>\r\n <smartform #form [smartForm]=\"smartForm\"></smartform>\r\n <smart-grid #grid [smartGrid]=\"smartGrid\" [uuid]=\"uuid!\"></smart-grid>\r\n <!-- <smart-filter #filter [filter]=\"smartFilter\"></smart-filter> -->\r\n <smart-tree *ngIf=\"treeService\" [treeService]=\"treeService!\"></smart-tree>\r\n <smart-ui-action-toolbar #toolbar [id]=\"toolbarId\"></smart-ui-action-toolbar>\r\n</ng-template>\r\n", styles: [".horizontal{display:flex;flex-direction:row}.vertical{display:flex;flex-direction:column}\n"] }]
|
|
12707
|
+
}], ctorParameters: function () { return [{ type: SmartformLayoutDefinitionService }]; }, propDecorators: { smartComponentLayout: [{
|
|
12560
12708
|
type: Input
|
|
12709
|
+
}], smartFormList: [{
|
|
12710
|
+
type: ViewChildren,
|
|
12711
|
+
args: ['form']
|
|
12712
|
+
}], smartGridList: [{
|
|
12713
|
+
type: ViewChildren,
|
|
12714
|
+
args: ['grid']
|
|
12715
|
+
}], smartFilterList: [{
|
|
12716
|
+
type: ViewChildren,
|
|
12717
|
+
args: ['filter']
|
|
12718
|
+
}], toolbarList: [{
|
|
12719
|
+
type: ViewChildren,
|
|
12720
|
+
args: ['toolbar']
|
|
12721
|
+
}], components: [{
|
|
12722
|
+
type: ViewChildren,
|
|
12723
|
+
args: [SmartComponentLayoutComponent]
|
|
12561
12724
|
}] } });
|
|
12562
12725
|
|
|
12563
|
-
class
|
|
12726
|
+
class SmartComponentLayoutModule {
|
|
12564
12727
|
}
|
|
12565
|
-
|
|
12566
|
-
|
|
12728
|
+
SmartComponentLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12729
|
+
SmartComponentLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, declarations: [SmartComponentLayoutComponent], imports: [BrowserModule,
|
|
12567
12730
|
MatCommonModule,
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
SmarttreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmarttreeModule, providers: [SmarttreeService, SmarttreeGenericService], imports: [[
|
|
12731
|
+
SmartformModule,
|
|
12732
|
+
SmartGridModule,
|
|
12733
|
+
SmartExpandableSectionModule,
|
|
12734
|
+
SmarttreeModule,
|
|
12735
|
+
SmartViewContextModule], exports: [SmartComponentLayoutComponent] });
|
|
12736
|
+
SmartComponentLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, providers: [], imports: [[
|
|
12575
12737
|
BrowserModule,
|
|
12576
12738
|
MatCommonModule,
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
SmartIconModule,
|
|
12739
|
+
SmartformModule,
|
|
12740
|
+
SmartGridModule,
|
|
12741
|
+
SmartExpandableSectionModule,
|
|
12742
|
+
SmarttreeModule,
|
|
12582
12743
|
SmartViewContextModule,
|
|
12583
12744
|
]] });
|
|
12584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type:
|
|
12745
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, decorators: [{
|
|
12585
12746
|
type: NgModule,
|
|
12586
12747
|
args: [{
|
|
12587
|
-
declarations: [
|
|
12748
|
+
declarations: [SmartComponentLayoutComponent],
|
|
12588
12749
|
imports: [
|
|
12589
12750
|
BrowserModule,
|
|
12590
12751
|
MatCommonModule,
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
SmartIconModule,
|
|
12752
|
+
SmartformModule,
|
|
12753
|
+
SmartGridModule,
|
|
12754
|
+
SmartExpandableSectionModule,
|
|
12755
|
+
SmarttreeModule,
|
|
12596
12756
|
SmartViewContextModule,
|
|
12597
12757
|
],
|
|
12598
|
-
exports: [
|
|
12599
|
-
|
|
12600
|
-
providers: [SmarttreeService, SmarttreeGenericService],
|
|
12758
|
+
exports: [SmartComponentLayoutComponent],
|
|
12759
|
+
providers: [],
|
|
12601
12760
|
}]
|
|
12602
12761
|
}] });
|
|
12603
12762
|
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
return encodeURIComponent(v);
|
|
12614
|
-
}
|
|
12615
|
-
decodeKey(k) {
|
|
12616
|
-
return decodeURIComponent(k);
|
|
12617
|
-
}
|
|
12618
|
-
decodeValue(v) {
|
|
12619
|
-
return decodeURIComponent(v);
|
|
12763
|
+
class SmartFilterParamComponent {
|
|
12764
|
+
constructor() { }
|
|
12765
|
+
onItemClick(item) {
|
|
12766
|
+
this.data.serviceToUse.peformWidgetAction({
|
|
12767
|
+
code: 'ADD_FILTER_EXPRESSION',
|
|
12768
|
+
params: {
|
|
12769
|
+
model: item,
|
|
12770
|
+
},
|
|
12771
|
+
});
|
|
12620
12772
|
}
|
|
12621
|
-
}
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
};
|
|
12773
|
+
}
|
|
12774
|
+
SmartFilterParamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12775
|
+
SmartFilterParamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterParamComponent, selector: "app-target-group-filter-param", inputs: { data: "data" }, ngImport: i0, template: "<div class=\"targetGroupFilterParamContainer\">\r\n <div\r\n class=\"targetGroupFilterItem\"\r\n *ngFor=\"let data of data?.group\"\r\n (click)=\"onItemClick(data)\"\r\n >\r\n <smart-icon icon=\"Ic24_Chevron_Right\" color=\"gray\"></smart-icon>\r\n <div class=\"mat-caption\">\r\n {{ data.label }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamContainer{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterItem{padding:.75rem;border-radius:.25rem;display:flex;flex-direction:row;gap:.5rem;cursor:pointer}.targetGroupFilterItem .mat-caption{margin:auto 0}\n"], components: [{ type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }], directives: [{ type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
12776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, decorators: [{
|
|
12777
|
+
type: Component,
|
|
12778
|
+
args: [{ selector: 'app-target-group-filter-param', template: "<div class=\"targetGroupFilterParamContainer\">\r\n <div\r\n class=\"targetGroupFilterItem\"\r\n *ngFor=\"let data of data?.group\"\r\n (click)=\"onItemClick(data)\"\r\n >\r\n <smart-icon icon=\"Ic24_Chevron_Right\" color=\"gray\"></smart-icon>\r\n <div class=\"mat-caption\">\r\n {{ data.label }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamContainer{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterItem{padding:.75rem;border-radius:.25rem;display:flex;flex-direction:row;gap:.5rem;cursor:pointer}.targetGroupFilterItem .mat-caption{margin:auto 0}\n"] }]
|
|
12779
|
+
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
|
|
12780
|
+
type: Input
|
|
12781
|
+
}] } });
|
|
12630
12782
|
|
|
12631
|
-
class
|
|
12632
|
-
constructor(
|
|
12633
|
-
this.
|
|
12634
|
-
this.
|
|
12635
|
-
this.password = configurationParameters.password;
|
|
12636
|
-
this.accessToken = configurationParameters.accessToken;
|
|
12637
|
-
this.basePath = configurationParameters.basePath;
|
|
12638
|
-
this.withCredentials = configurationParameters.withCredentials;
|
|
12639
|
-
this.encoder = configurationParameters.encoder;
|
|
12640
|
-
if (configurationParameters.encodeParam) {
|
|
12641
|
-
this.encodeParam = configurationParameters.encodeParam;
|
|
12642
|
-
}
|
|
12643
|
-
else {
|
|
12644
|
-
this.encodeParam = param => this.defaultEncodeParam(param);
|
|
12645
|
-
}
|
|
12646
|
-
if (configurationParameters.credentials) {
|
|
12647
|
-
this.credentials = configurationParameters.credentials;
|
|
12648
|
-
}
|
|
12649
|
-
else {
|
|
12650
|
-
this.credentials = {};
|
|
12651
|
-
}
|
|
12652
|
-
}
|
|
12653
|
-
/**
|
|
12654
|
-
* Select the correct content-type to use for a request.
|
|
12655
|
-
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
|
|
12656
|
-
* If no content type is found return the first found type if the contentTypes is not empty
|
|
12657
|
-
* @param contentTypes - the array of content types that are available for selection
|
|
12658
|
-
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
|
12659
|
-
*/
|
|
12660
|
-
selectHeaderContentType(contentTypes) {
|
|
12661
|
-
if (contentTypes.length === 0) {
|
|
12662
|
-
return undefined;
|
|
12663
|
-
}
|
|
12664
|
-
const type = contentTypes.find((x) => this.isJsonMime(x));
|
|
12665
|
-
if (type === undefined) {
|
|
12666
|
-
return contentTypes[0];
|
|
12667
|
-
}
|
|
12668
|
-
return type;
|
|
12669
|
-
}
|
|
12670
|
-
/**
|
|
12671
|
-
* Select the correct accept content-type to use for a request.
|
|
12672
|
-
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
|
|
12673
|
-
* If no content type is found return the first found type if the contentTypes is not empty
|
|
12674
|
-
* @param accepts - the array of content types that are available for selection.
|
|
12675
|
-
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
|
12676
|
-
*/
|
|
12677
|
-
selectHeaderAccept(accepts) {
|
|
12678
|
-
if (accepts.length === 0) {
|
|
12679
|
-
return undefined;
|
|
12680
|
-
}
|
|
12681
|
-
const type = accepts.find((x) => this.isJsonMime(x));
|
|
12682
|
-
if (type === undefined) {
|
|
12683
|
-
return accepts[0];
|
|
12684
|
-
}
|
|
12685
|
-
return type;
|
|
12686
|
-
}
|
|
12687
|
-
/**
|
|
12688
|
-
* Check if the given MIME is a JSON MIME.
|
|
12689
|
-
* JSON MIME examples:
|
|
12690
|
-
* application/json
|
|
12691
|
-
* application/json; charset=UTF8
|
|
12692
|
-
* APPLICATION/JSON
|
|
12693
|
-
* application/vnd.company+json
|
|
12694
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
12695
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
12696
|
-
*/
|
|
12697
|
-
isJsonMime(mime) {
|
|
12698
|
-
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
12699
|
-
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
12783
|
+
class SmartFilterParamsComponent {
|
|
12784
|
+
constructor() {
|
|
12785
|
+
this._destroy$ = new Subject();
|
|
12786
|
+
this.expandableSections = [];
|
|
12700
12787
|
}
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
|
|
12788
|
+
ngOnInit() {
|
|
12789
|
+
this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
12790
|
+
this.setUp(this.service.model);
|
|
12791
|
+
});
|
|
12792
|
+
this.setUp(this.service.model);
|
|
12706
12793
|
}
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
// It only works for the 'simple' parameter style.
|
|
12711
|
-
// Date-handling only works for the 'date-time' format.
|
|
12712
|
-
// All other styles and Date-formats are probably handled incorrectly.
|
|
12713
|
-
//
|
|
12714
|
-
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
|
|
12715
|
-
const value = param.dataFormat === 'date-time' && param.value instanceof Date
|
|
12716
|
-
? param.value.toISOString()
|
|
12717
|
-
: param.value;
|
|
12718
|
-
return encodeURIComponent(String(value));
|
|
12794
|
+
ngOnDestroy() {
|
|
12795
|
+
this._destroy$.next();
|
|
12796
|
+
this._destroy$.complete();
|
|
12719
12797
|
}
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
* Contains form layout definition objects.
|
|
12725
|
-
*
|
|
12726
|
-
* The version of the OpenAPI document: 1.0.0
|
|
12727
|
-
* Contact: info@it4all.hu
|
|
12728
|
-
*
|
|
12729
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12730
|
-
* https://openapi-generator.tech
|
|
12731
|
-
* Do not edit the class manually.
|
|
12732
|
-
*/
|
|
12733
|
-
class DefaultService {
|
|
12734
|
-
constructor(httpClient, basePath, configuration) {
|
|
12735
|
-
this.httpClient = httpClient;
|
|
12736
|
-
this.basePath = 'http://localhost';
|
|
12737
|
-
this.defaultHeaders = new HttpHeaders();
|
|
12738
|
-
this.configuration = new Configuration$1();
|
|
12739
|
-
if (configuration) {
|
|
12740
|
-
this.configuration = configuration;
|
|
12741
|
-
}
|
|
12742
|
-
if (typeof this.configuration.basePath !== 'string') {
|
|
12743
|
-
if (Array.isArray(basePath) && basePath.length > 0) {
|
|
12744
|
-
basePath = basePath[0];
|
|
12745
|
-
}
|
|
12746
|
-
if (typeof basePath !== 'string') {
|
|
12747
|
-
basePath = this.basePath;
|
|
12748
|
-
}
|
|
12749
|
-
this.configuration.basePath = basePath;
|
|
12798
|
+
setUp(model) {
|
|
12799
|
+
if (model?.model) {
|
|
12800
|
+
this.filterBuilder = model.model;
|
|
12801
|
+
this.constructExpandableSections();
|
|
12750
12802
|
}
|
|
12751
|
-
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec$1();
|
|
12752
12803
|
}
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12804
|
+
constructExpandableSections() {
|
|
12805
|
+
if (this.filterBuilder.groups) {
|
|
12806
|
+
this.expandableSections = this.filterBuilder.groups.map((filterExpressionBuilderGroup) => {
|
|
12807
|
+
return {
|
|
12808
|
+
title: filterExpressionBuilderGroup.label,
|
|
12809
|
+
cssClass: 'filterExpressionBuilderGroup',
|
|
12810
|
+
customComponent: SmartFilterParamComponent,
|
|
12811
|
+
data: {
|
|
12812
|
+
group: filterExpressionBuilderGroup.fields,
|
|
12813
|
+
serviceToUse: this.service,
|
|
12814
|
+
},
|
|
12815
|
+
inputName: 'data',
|
|
12816
|
+
isExpanded: true,
|
|
12817
|
+
};
|
|
12818
|
+
});
|
|
12760
12819
|
}
|
|
12761
|
-
return httpParams;
|
|
12762
12820
|
}
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
}
|
|
12783
|
-
else if (key != null) {
|
|
12784
|
-
httpParams = httpParams.append(key, value);
|
|
12785
|
-
}
|
|
12786
|
-
else {
|
|
12787
|
-
throw Error("key may not be null if value is not object or array");
|
|
12788
|
-
}
|
|
12789
|
-
return httpParams;
|
|
12821
|
+
}
|
|
12822
|
+
SmartFilterParamsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12823
|
+
SmartFilterParamsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterParamsComponent, selector: "smart-filter-group-params", inputs: { service: "service" }, viewQueries: [{ propertyName: "filterVcRef", first: true, predicate: ["smartFilter"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div\r\n class=\"targetGroupFilterParamsContainer\"\r\n *ngIf=\"service.model?.showGroups && !service.model?.readOnly\"\r\n>\r\n <!-- <ng-template #smartFilter></ng-template> -->\r\n <!-- <div class=\"dataSource-options\" *ngIf=\"service.model?.extarnalDatabase\">\r\n <div class=\"dataSource-btns\">\r\n <div class=\"dataSource-btn\">K\u00FCls\u0151 adatb\u00E1zis</div>\r\n <div class=\"dataSource-btn dataSource-btn-disabled\">Bels\u0151 adatb\u00E1zis</div>\r\n </div>\r\n <div class=\"dataSource-add-database\">\r\n <div class=\"dataSource-add-database-title\">\r\n <smart-icon icon=\"Ic24_View_Table\" color=\"sucess\"></smart-icon>\r\n Adatb\u00E1zis\r\n </div>\r\n <button title=\"add\" mat-icon-button (click)=\"addDataSource()\">\r\n <smart-icon icon=\"Ic24_Plus_Circle\" color=\"success\"></smart-icon>\r\n </button>\r\n </div>\r\n </div> -->\r\n <div class=\"sections\">\r\n <smart-expandable-section\r\n class=\"excel\"\r\n *ngIf=\"expandableSectionsFromExcel\"\r\n [data]=\"expandableSectionsFromExcel!\"\r\n ></smart-expandable-section>\r\n <smart-expandable-section\r\n [data]=\"data\"\r\n *ngFor=\"let data of expandableSections\"\r\n ></smart-expandable-section>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamsContainer{padding:1.5rem;display:flex;flex-direction:column;gap:2.5rem;height:calc(100% - 3rem);overflow:auto;border-right:2px solid var(--primary-dark-color)}.sections{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-body{background-color:var(--success-lighter-color)}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--success-color)!important}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-body{padding:0 0 0 1rem!important;background-color:var(--light-blue-color)}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header{background-color:var(--primary-light-color);padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header-title{color:var(--primary-lighter-color);font-weight:600}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--accent-color)!important;padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-title{color:#fff}.dataSource-btns{display:flex;flex-direction:row;justify-content:space-around;background-color:var(--success-lighter-color);height:44px;padding:8px 12px;align-items:center;border:1.5px solid var(--success-color);border-left:6px solid var(--success-color);border-radius:4px}.dataSource-btn{display:flex;padding:1rem 2rem;justify-content:center;align-items:center;background-color:var(--success-color);border-radius:4px;cursor:pointer}.dataSource-btn-disabled{background-color:var(--success-lighter-color);cursor:auto}.dataSource-add-database{display:flex;flex-direction:row;justify-content:space-between;background-color:var(--success-lighter-color);padding:8px;border-radius:4px}.dataSource-add-database-title{display:flex;flex-direction:row;gap:1rem;align-items:center}.dataSource-options{display:flex;flex-direction:column;gap:1rem}\n"], components: [{ type: ExpandableSectionComponent, selector: "smart-expandable-section", inputs: ["data", "index"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
12824
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamsComponent, decorators: [{
|
|
12825
|
+
type: Component,
|
|
12826
|
+
args: [{ selector: 'smart-filter-group-params', template: "<div\r\n class=\"targetGroupFilterParamsContainer\"\r\n *ngIf=\"service.model?.showGroups && !service.model?.readOnly\"\r\n>\r\n <!-- <ng-template #smartFilter></ng-template> -->\r\n <!-- <div class=\"dataSource-options\" *ngIf=\"service.model?.extarnalDatabase\">\r\n <div class=\"dataSource-btns\">\r\n <div class=\"dataSource-btn\">K\u00FCls\u0151 adatb\u00E1zis</div>\r\n <div class=\"dataSource-btn dataSource-btn-disabled\">Bels\u0151 adatb\u00E1zis</div>\r\n </div>\r\n <div class=\"dataSource-add-database\">\r\n <div class=\"dataSource-add-database-title\">\r\n <smart-icon icon=\"Ic24_View_Table\" color=\"sucess\"></smart-icon>\r\n Adatb\u00E1zis\r\n </div>\r\n <button title=\"add\" mat-icon-button (click)=\"addDataSource()\">\r\n <smart-icon icon=\"Ic24_Plus_Circle\" color=\"success\"></smart-icon>\r\n </button>\r\n </div>\r\n </div> -->\r\n <div class=\"sections\">\r\n <smart-expandable-section\r\n class=\"excel\"\r\n *ngIf=\"expandableSectionsFromExcel\"\r\n [data]=\"expandableSectionsFromExcel!\"\r\n ></smart-expandable-section>\r\n <smart-expandable-section\r\n [data]=\"data\"\r\n *ngFor=\"let data of expandableSections\"\r\n ></smart-expandable-section>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamsContainer{padding:1.5rem;display:flex;flex-direction:column;gap:2.5rem;height:calc(100% - 3rem);overflow:auto;border-right:2px solid var(--primary-dark-color)}.sections{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-body{background-color:var(--success-lighter-color)}.targetGroupFilterParamsContainer .excel::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--success-color)!important}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-body{padding:0 0 0 1rem!important;background-color:var(--light-blue-color)}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header{background-color:var(--primary-light-color);padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header-title{color:var(--primary-lighter-color);font-weight:600}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded{background-color:var(--accent-color)!important;padding:.75rem;height:auto}.targetGroupFilterParamsContainer::ng-deep .mat-expansion-panel-header.mat-expanded .mat-expansion-panel-header-title{color:#fff}.dataSource-btns{display:flex;flex-direction:row;justify-content:space-around;background-color:var(--success-lighter-color);height:44px;padding:8px 12px;align-items:center;border:1.5px solid var(--success-color);border-left:6px solid var(--success-color);border-radius:4px}.dataSource-btn{display:flex;padding:1rem 2rem;justify-content:center;align-items:center;background-color:var(--success-color);border-radius:4px;cursor:pointer}.dataSource-btn-disabled{background-color:var(--success-lighter-color);cursor:auto}.dataSource-add-database{display:flex;flex-direction:row;justify-content:space-between;background-color:var(--success-lighter-color);padding:8px;border-radius:4px}.dataSource-add-database-title{display:flex;flex-direction:row;gap:1rem;align-items:center}.dataSource-options{display:flex;flex-direction:column;gap:1rem}\n"] }]
|
|
12827
|
+
}], ctorParameters: function () { return []; }, propDecorators: { service: [{
|
|
12828
|
+
type: Input
|
|
12829
|
+
}], filterVcRef: [{
|
|
12830
|
+
type: ViewChild,
|
|
12831
|
+
args: ['smartFilter', { read: ViewContainerRef }]
|
|
12832
|
+
}] } });
|
|
12833
|
+
|
|
12834
|
+
class SmartFilterService {
|
|
12835
|
+
constructor() {
|
|
12836
|
+
this._destroy$ = new Subject();
|
|
12837
|
+
this.shouldSubmit = new Subject();
|
|
12838
|
+
this.reSubscribeToSubmit = new Subject();
|
|
12839
|
+
this.change = new Subject();
|
|
12790
12840
|
}
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
}
|
|
12802
|
-
let localVarHttpContext = options && options.context;
|
|
12803
|
-
if (localVarHttpContext === undefined) {
|
|
12804
|
-
localVarHttpContext = new HttpContext();
|
|
12805
|
-
}
|
|
12806
|
-
let responseType_ = 'json';
|
|
12807
|
-
if (localVarHttpHeaderAcceptSelected) {
|
|
12808
|
-
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
12809
|
-
responseType_ = 'text';
|
|
12810
|
-
}
|
|
12811
|
-
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
12812
|
-
responseType_ = 'json';
|
|
12813
|
-
}
|
|
12814
|
-
else {
|
|
12815
|
-
responseType_ = 'blob';
|
|
12816
|
-
}
|
|
12817
|
-
}
|
|
12818
|
-
let localVarPath = `/nope`;
|
|
12819
|
-
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
12820
|
-
context: localVarHttpContext,
|
|
12821
|
-
responseType: responseType_,
|
|
12822
|
-
withCredentials: this.configuration.withCredentials,
|
|
12823
|
-
headers: localVarHeaders,
|
|
12824
|
-
observe: observe,
|
|
12825
|
-
reportProgress: reportProgress
|
|
12826
|
-
});
|
|
12841
|
+
ngOnDestroy() {
|
|
12842
|
+
this._destroy$.next();
|
|
12843
|
+
this._destroy$.complete();
|
|
12844
|
+
}
|
|
12845
|
+
async submit() {
|
|
12846
|
+
this.shouldSubmit.next();
|
|
12847
|
+
await this.shouldSubmit.pipe(takeUntil(this._destroy$)).toPromise();
|
|
12848
|
+
this.shouldSubmit = new Subject();
|
|
12849
|
+
this.reSubscribeToSubmit.next();
|
|
12850
|
+
return this.filter;
|
|
12827
12851
|
}
|
|
12828
12852
|
}
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type:
|
|
12853
|
+
SmartFilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12854
|
+
SmartFilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, providedIn: 'root' });
|
|
12855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterService, decorators: [{
|
|
12832
12856
|
type: Injectable,
|
|
12833
12857
|
args: [{
|
|
12834
|
-
providedIn: 'root'
|
|
12858
|
+
providedIn: 'root',
|
|
12835
12859
|
}]
|
|
12836
|
-
}], ctorParameters: function () { return [
|
|
12837
|
-
type: Optional
|
|
12838
|
-
}, {
|
|
12839
|
-
type: Inject,
|
|
12840
|
-
args: [BASE_PATH$1]
|
|
12841
|
-
}] }, { type: Configuration$1, decorators: [{
|
|
12842
|
-
type: Optional
|
|
12843
|
-
}] }]; } });
|
|
12844
|
-
|
|
12845
|
-
const APIS = [DefaultService];
|
|
12860
|
+
}], ctorParameters: function () { return []; } });
|
|
12846
12861
|
|
|
12847
12862
|
/**
|
|
12848
|
-
*
|
|
12849
|
-
*
|
|
12863
|
+
* Filter API 2
|
|
12864
|
+
* Filter API 2
|
|
12850
12865
|
*
|
|
12851
12866
|
* The version of the OpenAPI document: 1.0.0
|
|
12852
12867
|
* Contact: info@it4all.hu
|
|
@@ -12855,16 +12870,15 @@ const APIS = [DefaultService];
|
|
|
12855
12870
|
* https://openapi-generator.tech
|
|
12856
12871
|
* Do not edit the class manually.
|
|
12857
12872
|
*/
|
|
12858
|
-
var
|
|
12859
|
-
(function (
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
})(ComponentType || (ComponentType = {}));
|
|
12873
|
+
var FilterExpressionBoolOperator$1;
|
|
12874
|
+
(function (FilterExpressionBoolOperator) {
|
|
12875
|
+
FilterExpressionBoolOperator["AND"] = "AND";
|
|
12876
|
+
FilterExpressionBoolOperator["OR"] = "OR";
|
|
12877
|
+
})(FilterExpressionBoolOperator$1 || (FilterExpressionBoolOperator$1 = {}));
|
|
12864
12878
|
|
|
12865
12879
|
/**
|
|
12866
|
-
*
|
|
12867
|
-
*
|
|
12880
|
+
* Filter API 2
|
|
12881
|
+
* Filter API 2
|
|
12868
12882
|
*
|
|
12869
12883
|
* The version of the OpenAPI document: 1.0.0
|
|
12870
12884
|
* Contact: info@it4all.hu
|
|
@@ -12873,17 +12887,18 @@ var ComponentType;
|
|
|
12873
12887
|
* https://openapi-generator.tech
|
|
12874
12888
|
* Do not edit the class manually.
|
|
12875
12889
|
*/
|
|
12876
|
-
var
|
|
12877
|
-
(function (
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12890
|
+
var FilterExpressionDataType;
|
|
12891
|
+
(function (FilterExpressionDataType) {
|
|
12892
|
+
FilterExpressionDataType["STRING"] = "STRING";
|
|
12893
|
+
FilterExpressionDataType["NUMBER"] = "NUMBER";
|
|
12894
|
+
FilterExpressionDataType["DATE"] = "DATE";
|
|
12895
|
+
FilterExpressionDataType["DATE_TIME"] = "DATE_TIME";
|
|
12896
|
+
FilterExpressionDataType["BOOLEAN"] = "BOOLEAN";
|
|
12897
|
+
})(FilterExpressionDataType || (FilterExpressionDataType = {}));
|
|
12883
12898
|
|
|
12884
12899
|
/**
|
|
12885
|
-
*
|
|
12886
|
-
*
|
|
12900
|
+
* Filter API 2
|
|
12901
|
+
* Filter API 2
|
|
12887
12902
|
*
|
|
12888
12903
|
* The version of the OpenAPI document: 1.0.0
|
|
12889
12904
|
* Contact: info@it4all.hu
|
|
@@ -12892,358 +12907,365 @@ var ComponentWidgetType;
|
|
|
12892
12907
|
* https://openapi-generator.tech
|
|
12893
12908
|
* Do not edit the class manually.
|
|
12894
12909
|
*/
|
|
12895
|
-
var
|
|
12896
|
-
(function (
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
}
|
|
12910
|
-
}
|
|
12911
|
-
static forRoot(configurationFactory) {
|
|
12912
|
-
return {
|
|
12913
|
-
ngModule: ApiModule,
|
|
12914
|
-
providers: [{ provide: Configuration$1, useFactory: configurationFactory }]
|
|
12915
|
-
};
|
|
12916
|
-
}
|
|
12917
|
-
}
|
|
12918
|
-
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiModule, deps: [{ token: ApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12919
|
-
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiModule });
|
|
12920
|
-
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiModule, providers: [], imports: [[]] });
|
|
12921
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiModule, decorators: [{
|
|
12922
|
-
type: NgModule,
|
|
12923
|
-
args: [{
|
|
12924
|
-
imports: [],
|
|
12925
|
-
declarations: [],
|
|
12926
|
-
exports: [],
|
|
12927
|
-
providers: []
|
|
12928
|
-
}]
|
|
12929
|
-
}], ctorParameters: function () { return [{ type: ApiModule, decorators: [{
|
|
12930
|
-
type: Optional
|
|
12931
|
-
}, {
|
|
12932
|
-
type: SkipSelf
|
|
12933
|
-
}] }, { type: i1.HttpClient, decorators: [{
|
|
12934
|
-
type: Optional
|
|
12935
|
-
}] }]; } });
|
|
12910
|
+
var FilterExpressionFieldWidgetType;
|
|
12911
|
+
(function (FilterExpressionFieldWidgetType) {
|
|
12912
|
+
FilterExpressionFieldWidgetType["TEXT_FIELD"] = "TEXT_FIELD";
|
|
12913
|
+
FilterExpressionFieldWidgetType["TEXT_FIELD_CHIPS"] = "TEXT_FIELD_CHIPS";
|
|
12914
|
+
FilterExpressionFieldWidgetType["TEXT_BOX"] = "TEXT_BOX";
|
|
12915
|
+
FilterExpressionFieldWidgetType["SELECT"] = "SELECT";
|
|
12916
|
+
FilterExpressionFieldWidgetType["SELECT_MULTIPLE"] = "SELECT_MULTIPLE";
|
|
12917
|
+
FilterExpressionFieldWidgetType["DATE"] = "DATE";
|
|
12918
|
+
FilterExpressionFieldWidgetType["TIME"] = "TIME";
|
|
12919
|
+
FilterExpressionFieldWidgetType["DATE_TIME"] = "DATE_TIME";
|
|
12920
|
+
FilterExpressionFieldWidgetType["CHECK_BOX"] = "CHECK_BOX";
|
|
12921
|
+
FilterExpressionFieldWidgetType["RADIO_BUTTON"] = "RADIO_BUTTON";
|
|
12922
|
+
FilterExpressionFieldWidgetType["RANGE"] = "RANGE";
|
|
12923
|
+
})(FilterExpressionFieldWidgetType || (FilterExpressionFieldWidgetType = {}));
|
|
12936
12924
|
|
|
12937
|
-
|
|
12938
|
-
*
|
|
12925
|
+
/**
|
|
12926
|
+
* Filter API 2
|
|
12927
|
+
* Filter API 2
|
|
12928
|
+
*
|
|
12929
|
+
* The version of the OpenAPI document: 1.0.0
|
|
12930
|
+
* Contact: info@it4all.hu
|
|
12931
|
+
*
|
|
12932
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12933
|
+
* https://openapi-generator.tech
|
|
12934
|
+
* Do not edit the class manually.
|
|
12935
|
+
*/
|
|
12936
|
+
var FilterExpressionOperation;
|
|
12937
|
+
(function (FilterExpressionOperation) {
|
|
12938
|
+
FilterExpressionOperation["EXPRESSION"] = "EXPRESSION";
|
|
12939
|
+
FilterExpressionOperation["EQUAL"] = "EQUAL";
|
|
12940
|
+
FilterExpressionOperation["NOT_EQUAL"] = "NOT_EQUAL";
|
|
12941
|
+
FilterExpressionOperation["LESS"] = "LESS";
|
|
12942
|
+
FilterExpressionOperation["LESS_OR_EQUAL"] = "LESS_OR_EQUAL";
|
|
12943
|
+
FilterExpressionOperation["GREATER"] = "GREATER";
|
|
12944
|
+
FilterExpressionOperation["GREATER_OR_EQUAL"] = "GREATER_OR_EQUAL";
|
|
12945
|
+
FilterExpressionOperation["LIKE"] = "LIKE";
|
|
12946
|
+
FilterExpressionOperation["NOT_LIKE"] = "NOT_LIKE";
|
|
12947
|
+
FilterExpressionOperation["BETWEEN"] = "BETWEEN";
|
|
12948
|
+
FilterExpressionOperation["NOT_BETWEEN"] = "NOT_BETWEEN";
|
|
12949
|
+
FilterExpressionOperation["IS_EMPTY"] = "IS_EMPTY";
|
|
12950
|
+
FilterExpressionOperation["IS_NOT_EMPTY"] = "IS_NOT_EMPTY";
|
|
12951
|
+
FilterExpressionOperation["EXISTS"] = "EXISTS";
|
|
12952
|
+
FilterExpressionOperation["NOT_EXISTS"] = "NOT_EXISTS";
|
|
12953
|
+
FilterExpressionOperation["IN"] = "IN";
|
|
12954
|
+
FilterExpressionOperation["NOT_IN"] = "NOT_IN";
|
|
12955
|
+
})(FilterExpressionOperation || (FilterExpressionOperation = {}));
|
|
12956
|
+
|
|
12957
|
+
/**
|
|
12958
|
+
* Filter API 2
|
|
12959
|
+
* Filter API 2
|
|
12960
|
+
*
|
|
12961
|
+
* The version of the OpenAPI document: 1.0.0
|
|
12962
|
+
* Contact: info@it4all.hu
|
|
12963
|
+
*
|
|
12964
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12965
|
+
* https://openapi-generator.tech
|
|
12966
|
+
* Do not edit the class manually.
|
|
12967
|
+
*/
|
|
12968
|
+
var FilterExpressionOrderByOrderEnum;
|
|
12969
|
+
(function (FilterExpressionOrderByOrderEnum) {
|
|
12970
|
+
FilterExpressionOrderByOrderEnum["ASC"] = "ASC";
|
|
12971
|
+
FilterExpressionOrderByOrderEnum["DESC"] = "DESC";
|
|
12972
|
+
})(FilterExpressionOrderByOrderEnum || (FilterExpressionOrderByOrderEnum = {}));
|
|
12973
|
+
;
|
|
12974
|
+
|
|
12975
|
+
/**
|
|
12976
|
+
* Filter API 2
|
|
12977
|
+
* Filter API 2
|
|
12978
|
+
*
|
|
12979
|
+
* The version of the OpenAPI document: 1.0.0
|
|
12980
|
+
* Contact: info@it4all.hu
|
|
12981
|
+
*
|
|
12982
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12983
|
+
* https://openapi-generator.tech
|
|
12984
|
+
* Do not edit the class manually.
|
|
12939
12985
|
*/
|
|
12940
12986
|
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12987
|
+
var FilterExpressionBuilderGroupBuilderGroupKindEnum;
|
|
12988
|
+
(function (FilterExpressionBuilderGroupBuilderGroupKindEnum) {
|
|
12989
|
+
FilterExpressionBuilderGroupBuilderGroupKindEnum["DIPLAY"] = "DIPLAY";
|
|
12990
|
+
FilterExpressionBuilderGroupBuilderGroupKindEnum["BRACKET"] = "BRACKET";
|
|
12991
|
+
FilterExpressionBuilderGroupBuilderGroupKindEnum["EXIST"] = "EXIST";
|
|
12992
|
+
})(FilterExpressionBuilderGroupBuilderGroupKindEnum || (FilterExpressionBuilderGroupBuilderGroupKindEnum = {}));
|
|
12993
|
+
;
|
|
12994
|
+
|
|
12995
|
+
class SmartFilterSimpleFieldComponent {
|
|
12996
|
+
constructor(service, cfService) {
|
|
12997
|
+
this.service = service;
|
|
12998
|
+
this.cfService = cfService;
|
|
12944
12999
|
this._destroy$ = new Subject();
|
|
12945
|
-
|
|
13000
|
+
}
|
|
13001
|
+
ngOnInit() {
|
|
13002
|
+
this.operation = this.filterExpressionField.expressionData?.currentOperation;
|
|
13003
|
+
this.currentOperation = this.getOptionLabel(this.operation);
|
|
12946
13004
|
}
|
|
12947
13005
|
ngAfterViewInit() {
|
|
12948
|
-
|
|
12949
|
-
this.setFormComponent(this.smartFormList?.first);
|
|
12950
|
-
}
|
|
12951
|
-
this.smartFormList.changes
|
|
12952
|
-
.pipe(takeUntil(this._destroy$))
|
|
12953
|
-
.subscribe((list) => {
|
|
12954
|
-
this.setFormComponent(list.first);
|
|
12955
|
-
});
|
|
12956
|
-
if (this.smartGridList?.first) {
|
|
12957
|
-
this.setGridComponent(this.smartGridList?.first);
|
|
12958
|
-
}
|
|
12959
|
-
this.smartGridList.changes
|
|
12960
|
-
.pipe(takeUntil(this._destroy$))
|
|
12961
|
-
.subscribe((list) => {
|
|
12962
|
-
this.setGridComponent(list.first);
|
|
12963
|
-
});
|
|
12964
|
-
this.smartFilterList.changes
|
|
12965
|
-
.pipe(takeUntil(this._destroy$))
|
|
12966
|
-
.subscribe((list) => {
|
|
12967
|
-
if (!this.smartFilterComponent) {
|
|
12968
|
-
this.smartFilterComponent = list.first;
|
|
12969
|
-
this.bindFilter();
|
|
12970
|
-
}
|
|
12971
|
-
});
|
|
12972
|
-
if (this.toolbarList?.first) {
|
|
12973
|
-
this.setToolbarComponent(this.toolbarList?.first);
|
|
12974
|
-
}
|
|
12975
|
-
this.toolbarList.changes
|
|
12976
|
-
.pipe(takeUntil(this._destroy$))
|
|
12977
|
-
.subscribe((list) => {
|
|
12978
|
-
this.setToolbarComponent(list.first);
|
|
12979
|
-
});
|
|
12980
|
-
if (this.smartComponentLayout) {
|
|
12981
|
-
this.setUp();
|
|
12982
|
-
}
|
|
13006
|
+
this.constructForm();
|
|
12983
13007
|
}
|
|
12984
13008
|
ngOnDestroy() {
|
|
12985
13009
|
this._destroy$.next();
|
|
12986
13010
|
this._destroy$.complete();
|
|
12987
13011
|
}
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
if (
|
|
12991
|
-
|
|
13012
|
+
constructFormWidget(key, label, widgetType, possibleValues, placeholder) {
|
|
13013
|
+
let type = widgetType;
|
|
13014
|
+
if (type === FilterExpressionFieldWidgetType.DATE) {
|
|
13015
|
+
type = SmartFormWidgetType.DATE_PICKER;
|
|
12992
13016
|
}
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
this.parent = this.smartComponentLayout?.parentComponent;
|
|
12996
|
-
this.uuid = this.parent.uuid;
|
|
12997
|
-
this.treeService = this.parent.smartTreeService;
|
|
12998
|
-
if (this.smartComponentLayout?.expandable) {
|
|
12999
|
-
this.constructExpandableSection();
|
|
13017
|
+
else if (type === FilterExpressionFieldWidgetType.DATE_TIME) {
|
|
13018
|
+
type = SmartFormWidgetType.DATE_TIME_PICKER;
|
|
13000
13019
|
}
|
|
13001
|
-
|
|
13002
|
-
|
|
13020
|
+
let widget = {
|
|
13021
|
+
key,
|
|
13022
|
+
label,
|
|
13023
|
+
type,
|
|
13024
|
+
value: '',
|
|
13025
|
+
placeholder: placeholder,
|
|
13026
|
+
showLabel: true,
|
|
13027
|
+
valueList: possibleValues.map((value) => {
|
|
13028
|
+
return {
|
|
13029
|
+
key: value.objectUri ? value.objectUri : value.code,
|
|
13030
|
+
label: value.displayValue,
|
|
13031
|
+
type: SmartFormWidgetType.ITEM,
|
|
13032
|
+
value: value.objectUri ? value.objectUri : value.code,
|
|
13033
|
+
};
|
|
13034
|
+
}),
|
|
13035
|
+
};
|
|
13036
|
+
return widget;
|
|
13037
|
+
}
|
|
13038
|
+
constructForm() {
|
|
13039
|
+
this.vcRefForm?.clear();
|
|
13040
|
+
let widgets = [];
|
|
13041
|
+
let key;
|
|
13042
|
+
if (this.filterExpressionField.widgetType === 'SELECT_MULTIPLE') {
|
|
13043
|
+
key = 'expressionData.operand2.selectedValues';
|
|
13003
13044
|
}
|
|
13004
|
-
|
|
13005
|
-
if (
|
|
13006
|
-
|
|
13007
|
-
}
|
|
13008
|
-
else if (this.smartComponentLayout.widget?.type === ComponentWidgetType.FILTER) {
|
|
13009
|
-
this.constructFilter();
|
|
13010
|
-
}
|
|
13011
|
-
else if (this.smartComponentLayout.widget?.type === ComponentWidgetType.TREE) {
|
|
13012
|
-
this.constructTree();
|
|
13045
|
+
if (this.filterExpressionField.expressionData?.operand2) {
|
|
13046
|
+
if (key !== 'expressionData.operand2.selectedValues') {
|
|
13047
|
+
key = 'expressionData.operand2.valueAsString';
|
|
13013
13048
|
}
|
|
13014
|
-
|
|
13015
|
-
|
|
13049
|
+
widgets.push(this.constructFormWidget(key, this.filterExpressionField.label2, this.filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.TEXT_FIELD, this.filterExpressionField.possibleValues, this.filterExpressionField.placeholder2));
|
|
13050
|
+
}
|
|
13051
|
+
if (this.filterExpressionField.expressionData?.operand3) {
|
|
13052
|
+
if (key !== 'selectedValues') {
|
|
13053
|
+
key = 'expressionData.operand3.valueAsString';
|
|
13016
13054
|
}
|
|
13055
|
+
widgets.push(this.constructFormWidget(key, this.filterExpressionField.label3, this.filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.TEXT_FIELD, this.filterExpressionField.possibleValues, this.filterExpressionField.placeholder3));
|
|
13017
13056
|
}
|
|
13018
|
-
this.
|
|
13019
|
-
|
|
13020
|
-
type() {
|
|
13021
|
-
return ComponentType;
|
|
13022
|
-
}
|
|
13023
|
-
constructExpandableSection() {
|
|
13024
|
-
let data = { ...this.smartComponentLayout };
|
|
13025
|
-
data.expandable = false;
|
|
13026
|
-
this.expandableSection = {
|
|
13027
|
-
title: this.smartComponentLayout?.expandableSectionLabel ?? '',
|
|
13028
|
-
data,
|
|
13029
|
-
inputName: 'smartComponentLayout',
|
|
13030
|
-
customComponent: SmartComponentLayoutComponent,
|
|
13031
|
-
};
|
|
13032
|
-
}
|
|
13033
|
-
constructForm() {
|
|
13034
|
-
const widgets = this.layoutService.render({
|
|
13035
|
-
layoutDefinitions: this.smartComponentLayout?.form,
|
|
13036
|
-
});
|
|
13057
|
+
this.operation = this.filterExpressionField.expressionData?.currentOperation;
|
|
13058
|
+
this.currentOperation = this.getOptionLabel(this.operation);
|
|
13037
13059
|
this.smartForm = {
|
|
13038
|
-
direction: SmartFormWidgetDirection.
|
|
13039
|
-
componentModel: this.
|
|
13060
|
+
direction: SmartFormWidgetDirection.ROW,
|
|
13061
|
+
componentModel: { data: this.filterExpressionField },
|
|
13062
|
+
useOnValueChangeEvent: true,
|
|
13063
|
+
useOnBlurEvent: true,
|
|
13064
|
+
submitOnEnter: this.service.filter?.submitOnEnter,
|
|
13040
13065
|
widgets,
|
|
13066
|
+
translateService: this.service.filter?.translateService,
|
|
13041
13067
|
};
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
this.
|
|
13048
|
-
|
|
13068
|
+
// Show form on page
|
|
13069
|
+
this.componentRefForm = this.cfService.createComponent(this.vcRefForm, SmartformComponent, new Map([['smartForm', this.smartForm]]));
|
|
13070
|
+
this.componentRefForm.instance.onValueChangeSubject
|
|
13071
|
+
?.pipe(takeUntil(this._destroy$))
|
|
13072
|
+
.subscribe(() => {
|
|
13073
|
+
this.submit();
|
|
13074
|
+
this.service.change.next();
|
|
13075
|
+
});
|
|
13076
|
+
this.componentRefForm.instance.onBlurSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13077
|
+
this.submit();
|
|
13078
|
+
this.service.change.next();
|
|
13079
|
+
});
|
|
13049
13080
|
}
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13081
|
+
submit() {
|
|
13082
|
+
let form = this.componentRefForm.instance.submitForm();
|
|
13083
|
+
this.filterExpressionField = form.componentModel?.data;
|
|
13084
|
+
this.simpleFieldChildren.forEach((smartFilterFieldComponent, index) => {
|
|
13085
|
+
let filterExpressionField = smartFilterFieldComponent.submit();
|
|
13086
|
+
this.filterExpressionField.subFieldList.filters[index] = filterExpressionField;
|
|
13087
|
+
});
|
|
13088
|
+
return this.filterExpressionField;
|
|
13056
13089
|
}
|
|
13057
|
-
|
|
13058
|
-
let
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13090
|
+
optionSelected(option) {
|
|
13091
|
+
let oldOption = this.componentRefForm.instance.smartForm.componentModel.data.expressionData
|
|
13092
|
+
.currentOperation;
|
|
13093
|
+
this.componentRefForm.instance.smartForm.componentModel.data.expressionData.currentOperation =
|
|
13094
|
+
option;
|
|
13095
|
+
this.operation = option;
|
|
13096
|
+
this.currentOperation = this.getOptionLabel(this.operation);
|
|
13097
|
+
if (oldOption !== FilterExpressionOperation.BETWEEN &&
|
|
13098
|
+
option === FilterExpressionOperation.BETWEEN) {
|
|
13099
|
+
this.submit();
|
|
13100
|
+
let label = this.filterExpressionField.label2;
|
|
13101
|
+
this.filterExpressionField.label2 = `${label} - tól`;
|
|
13102
|
+
this.filterExpressionField.label3 = `${label} - ig`;
|
|
13103
|
+
this.filterExpressionField.expressionData.operand3 = {
|
|
13104
|
+
isDataName: this.filterExpressionField.expressionData.operand2?.isDataName,
|
|
13105
|
+
type: this.filterExpressionField.expressionData.operand3?.type,
|
|
13106
|
+
valueAsString: this.filterExpressionField.expressionData.operand3?.valueAsString,
|
|
13107
|
+
selectedValues: this.filterExpressionField.expressionData.operand3?.selectedValues,
|
|
13108
|
+
};
|
|
13109
|
+
this.constructForm();
|
|
13065
13110
|
}
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
},
|
|
13074
|
-
options: {
|
|
13075
|
-
rowUiActionType: GridUiActionType.POPUP_MENU,
|
|
13076
|
-
},
|
|
13077
|
-
layoutDef: SmartLayoutDef.TABLE,
|
|
13078
|
-
paginator: true,
|
|
13079
|
-
};
|
|
13080
|
-
this.bindGrid();
|
|
13081
|
-
}
|
|
13082
|
-
setGridComponent(comp) {
|
|
13083
|
-
if (!this.smartGridComponent) {
|
|
13084
|
-
this.smartGridComponent = comp;
|
|
13085
|
-
this.bindGrid();
|
|
13111
|
+
else if (oldOption === FilterExpressionOperation.BETWEEN &&
|
|
13112
|
+
option !== FilterExpressionOperation.BETWEEN) {
|
|
13113
|
+
let label = this.filterExpressionField.label2.replace(' - tól', '');
|
|
13114
|
+
this.filterExpressionField.label2 = `${label}`;
|
|
13115
|
+
this.filterExpressionField.label3 = undefined;
|
|
13116
|
+
this.filterExpressionField.expressionData.operand3 = undefined;
|
|
13117
|
+
this.constructForm();
|
|
13086
13118
|
}
|
|
13087
13119
|
}
|
|
13088
|
-
|
|
13089
|
-
if (
|
|
13090
|
-
|
|
13091
|
-
rowUiActionType: GridUiActionType.POPUP_MENU,
|
|
13092
|
-
}, false, this.smartGridComponent);
|
|
13120
|
+
getOptionLabel(option) {
|
|
13121
|
+
if (!option) {
|
|
13122
|
+
return '';
|
|
13093
13123
|
}
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
this.toolbar = comp;
|
|
13097
|
-
}
|
|
13098
|
-
constructFilter() {
|
|
13099
|
-
this.smartFilter = this.smartComponentLayout.parentComponent.addFilter(`filter_${this.makeid(5)}`, this.smartComponentLayout?.widget?.filterExpressionFieldList, this.smartComponentLayout?.widget?.filterType, this.smartFilterComponent);
|
|
13100
|
-
}
|
|
13101
|
-
bindFilter() {
|
|
13102
|
-
// TODO
|
|
13103
|
-
}
|
|
13104
|
-
constructTree() {
|
|
13105
|
-
this.parent.setUpDefaultTree(this.smartComponentLayout?.widget?.identifier);
|
|
13106
|
-
this.treeService?.initialize();
|
|
13107
|
-
}
|
|
13108
|
-
constructToolbar() {
|
|
13109
|
-
let toolbarId = this.smartComponentLayout?.widget?.identifier;
|
|
13110
|
-
if (this.toolbarId !== toolbarId) {
|
|
13111
|
-
this.toolbarId = toolbarId;
|
|
13124
|
+
else if (this.operationTranslator) {
|
|
13125
|
+
return this.operationTranslator(option);
|
|
13112
13126
|
}
|
|
13127
|
+
return option;
|
|
13113
13128
|
}
|
|
13114
13129
|
}
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type:
|
|
13130
|
+
SmartFilterSimpleFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleFieldComponent, deps: [{ token: SmartFilterService }, { token: ComponentFactoryService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13131
|
+
SmartFilterSimpleFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterSimpleFieldComponent, selector: "smart-filter-simple-field", inputs: { operationTranslator: "operationTranslator", filterExpressionField: "filterExpressionField", showPossibleActions: "showPossibleActions" }, viewQueries: [{ propertyName: "vcRefForm", first: true, predicate: ["form"], descendants: true, read: ViewContainerRef }, { propertyName: "simpleFieldChildren", predicate: ["simpleField"], descendants: true }], ngImport: i0, template: "<div class=\"smart-filter-simple-field-container\">\r\n <div class=\"smart-filter-simple-field-form-widget\">\r\n <div\r\n class=\"smart-filter-simple-field-form-widget-row\"\r\n *ngIf=\"showPossibleActions\"\r\n >\r\n <p>({{ currentOperation }})</p>\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n aria-label=\"Example icon-button with a menu\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let option of filterExpressionField.possibleOperations\"\r\n (click)=\"optionSelected(option)\"\r\n >\r\n <span>\r\n {{ getOptionLabel(option) }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <ng-template #form></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".smart-filter-simple-field-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-form-widget{padding:1rem;border-radius:1rem;display:flex;flex-direction:column}.smart-filter-simple-field-form-widget-row{display:flex;flex-direction:row;justify-content:space-between}.smart-filter-simple-field-form-widget-row p{color:#00000042}.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button{height:24px;width:24px}.smart-filter-simple-field-form-widget ::ng-deep .mat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-flat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-stroked-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-raised-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-fab .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-mini-fab .mat-button-wrapper>*{vertical-align:inherit!important}.smart-filter-simple-field-subfields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-container ::ng-deep h4{margin:0}\n"], components: [{ type: i3.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleFieldComponent, decorators: [{
|
|
13118
13133
|
type: Component,
|
|
13119
|
-
args: [{ selector: 'smart-
|
|
13120
|
-
}], ctorParameters: function () { return [{ type:
|
|
13121
|
-
type: Input
|
|
13122
|
-
}], smartFormList: [{
|
|
13123
|
-
type: ViewChildren,
|
|
13124
|
-
args: ['form']
|
|
13125
|
-
}], smartGridList: [{
|
|
13126
|
-
type: ViewChildren,
|
|
13127
|
-
args: ['grid']
|
|
13128
|
-
}], smartFilterList: [{
|
|
13129
|
-
type: ViewChildren,
|
|
13130
|
-
args: ['filter']
|
|
13131
|
-
}], toolbarList: [{
|
|
13132
|
-
type: ViewChildren,
|
|
13133
|
-
args: ['toolbar']
|
|
13134
|
-
}], components: [{
|
|
13134
|
+
args: [{ selector: 'smart-filter-simple-field', template: "<div class=\"smart-filter-simple-field-container\">\r\n <div class=\"smart-filter-simple-field-form-widget\">\r\n <div\r\n class=\"smart-filter-simple-field-form-widget-row\"\r\n *ngIf=\"showPossibleActions\"\r\n >\r\n <p>({{ currentOperation }})</p>\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerFor]=\"menu\"\r\n aria-label=\"Example icon-button with a menu\"\r\n >\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #menu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let option of filterExpressionField.possibleOperations\"\r\n (click)=\"optionSelected(option)\"\r\n >\r\n <span>\r\n {{ getOptionLabel(option) }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n <ng-template #form></ng-template>\r\n </div>\r\n</div>\r\n", styles: [".smart-filter-simple-field-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-form-widget{padding:1rem;border-radius:1rem;display:flex;flex-direction:column}.smart-filter-simple-field-form-widget-row{display:flex;flex-direction:row;justify-content:space-between}.smart-filter-simple-field-form-widget-row p{color:#00000042}.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button{height:24px;width:24px}.smart-filter-simple-field-form-widget ::ng-deep .mat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-flat-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-stroked-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-raised-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-icon-button .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-fab .mat-button-wrapper>*,.smart-filter-simple-field-form-widget ::ng-deep .mat-mini-fab .mat-button-wrapper>*{vertical-align:inherit!important}.smart-filter-simple-field-subfields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem}.smart-filter-simple-field-container ::ng-deep h4{margin:0}\n"] }]
|
|
13135
|
+
}], ctorParameters: function () { return [{ type: SmartFilterService }, { type: ComponentFactoryService }]; }, propDecorators: { simpleFieldChildren: [{
|
|
13135
13136
|
type: ViewChildren,
|
|
13136
|
-
args: [
|
|
13137
|
-
}]
|
|
13138
|
-
|
|
13139
|
-
class SmartComponentLayoutModule {
|
|
13140
|
-
}
|
|
13141
|
-
SmartComponentLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13142
|
-
SmartComponentLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, declarations: [SmartComponentLayoutComponent], imports: [BrowserModule,
|
|
13143
|
-
MatCommonModule,
|
|
13144
|
-
SmartformModule,
|
|
13145
|
-
SmartGridModule,
|
|
13146
|
-
SmartExpandableSectionModule,
|
|
13147
|
-
SmarttreeModule,
|
|
13148
|
-
SmartViewContextModule], exports: [SmartComponentLayoutComponent] });
|
|
13149
|
-
SmartComponentLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, providers: [], imports: [[
|
|
13150
|
-
BrowserModule,
|
|
13151
|
-
MatCommonModule,
|
|
13152
|
-
SmartformModule,
|
|
13153
|
-
SmartGridModule,
|
|
13154
|
-
SmartExpandableSectionModule,
|
|
13155
|
-
SmarttreeModule,
|
|
13156
|
-
SmartViewContextModule,
|
|
13157
|
-
]] });
|
|
13158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartComponentLayoutModule, decorators: [{
|
|
13159
|
-
type: NgModule,
|
|
13160
|
-
args: [{
|
|
13161
|
-
declarations: [SmartComponentLayoutComponent],
|
|
13162
|
-
imports: [
|
|
13163
|
-
BrowserModule,
|
|
13164
|
-
MatCommonModule,
|
|
13165
|
-
SmartformModule,
|
|
13166
|
-
SmartGridModule,
|
|
13167
|
-
SmartExpandableSectionModule,
|
|
13168
|
-
SmarttreeModule,
|
|
13169
|
-
SmartViewContextModule,
|
|
13170
|
-
],
|
|
13171
|
-
exports: [SmartComponentLayoutComponent],
|
|
13172
|
-
providers: [],
|
|
13173
|
-
}]
|
|
13174
|
-
}] });
|
|
13175
|
-
|
|
13176
|
-
class SmartFilterParamComponent {
|
|
13177
|
-
constructor() { }
|
|
13178
|
-
onItemClick(item) {
|
|
13179
|
-
this.data.serviceToUse.peformWidgetAction({
|
|
13180
|
-
code: 'ADD_FILTER_EXPRESSION',
|
|
13181
|
-
params: {
|
|
13182
|
-
model: item,
|
|
13183
|
-
},
|
|
13184
|
-
});
|
|
13185
|
-
}
|
|
13186
|
-
}
|
|
13187
|
-
SmartFilterParamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13188
|
-
SmartFilterParamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterParamComponent, selector: "app-target-group-filter-param", inputs: { data: "data" }, ngImport: i0, template: "<div class=\"targetGroupFilterParamContainer\">\r\n <div\r\n class=\"targetGroupFilterItem\"\r\n *ngFor=\"let data of data?.group\"\r\n (click)=\"onItemClick(data)\"\r\n >\r\n <smart-icon icon=\"Ic24_Chevron_Right\" color=\"gray\"></smart-icon>\r\n <div class=\"mat-caption\">\r\n {{ data.label }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamContainer{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterItem{padding:.75rem;border-radius:.25rem;display:flex;flex-direction:row;gap:.5rem;cursor:pointer}.targetGroupFilterItem .mat-caption{margin:auto 0}\n"], components: [{ type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }], directives: [{ type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterParamComponent, decorators: [{
|
|
13190
|
-
type: Component,
|
|
13191
|
-
args: [{ selector: 'app-target-group-filter-param', template: "<div class=\"targetGroupFilterParamContainer\">\r\n <div\r\n class=\"targetGroupFilterItem\"\r\n *ngFor=\"let data of data?.group\"\r\n (click)=\"onItemClick(data)\"\r\n >\r\n <smart-icon icon=\"Ic24_Chevron_Right\" color=\"gray\"></smart-icon>\r\n <div class=\"mat-caption\">\r\n {{ data.label }}\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".targetGroupFilterParamContainer{display:flex;flex-direction:column;gap:.25rem}.targetGroupFilterItem{padding:.75rem;border-radius:.25rem;display:flex;flex-direction:row;gap:.5rem;cursor:pointer}.targetGroupFilterItem .mat-caption{margin:auto 0}\n"] }]
|
|
13192
|
-
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
|
|
13137
|
+
args: ['simpleField']
|
|
13138
|
+
}], operationTranslator: [{
|
|
13193
13139
|
type: Input
|
|
13140
|
+
}], filterExpressionField: [{
|
|
13141
|
+
type: Input
|
|
13142
|
+
}], showPossibleActions: [{
|
|
13143
|
+
type: Input
|
|
13144
|
+
}], vcRefForm: [{
|
|
13145
|
+
type: ViewChild,
|
|
13146
|
+
args: ['form', { read: ViewContainerRef }]
|
|
13194
13147
|
}] } });
|
|
13195
13148
|
|
|
13196
|
-
class
|
|
13197
|
-
constructor() {
|
|
13149
|
+
class SmartFilterSimpleComponent {
|
|
13150
|
+
constructor(service) {
|
|
13151
|
+
this.service = service;
|
|
13198
13152
|
this._destroy$ = new Subject();
|
|
13199
|
-
this.
|
|
13153
|
+
this.service.reSubscribeToSubmit.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13154
|
+
this.subscribeToSubmit();
|
|
13155
|
+
});
|
|
13156
|
+
this.subscribeToSubmit();
|
|
13200
13157
|
}
|
|
13201
13158
|
ngOnInit() {
|
|
13202
|
-
this.
|
|
13203
|
-
this.setUp(this.service.model);
|
|
13204
|
-
});
|
|
13205
|
-
this.setUp(this.service.model);
|
|
13159
|
+
this.smartFilter = this.service.filter;
|
|
13206
13160
|
}
|
|
13207
13161
|
ngOnDestroy() {
|
|
13208
13162
|
this._destroy$.next();
|
|
13209
13163
|
this._destroy$.complete();
|
|
13210
13164
|
}
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
this.
|
|
13214
|
-
|
|
13165
|
+
subscribeToSubmit() {
|
|
13166
|
+
this.service.shouldSubmit.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
13167
|
+
this.submit();
|
|
13168
|
+
});
|
|
13169
|
+
}
|
|
13170
|
+
submit() {
|
|
13171
|
+
this.simpleFieldChildren.forEach((smartFilterFieldComponent, index) => {
|
|
13172
|
+
this.smartFilter.data[index] = smartFilterFieldComponent.submit();
|
|
13173
|
+
});
|
|
13174
|
+
this.service.filter = this.smartFilter;
|
|
13175
|
+
this.service.shouldSubmit.complete();
|
|
13176
|
+
}
|
|
13177
|
+
}
|
|
13178
|
+
SmartFilterSimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleComponent, deps: [{ token: SmartFilterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13179
|
+
SmartFilterSimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterSimpleComponent, selector: "smart-filter-simple", viewQueries: [{ propertyName: "simpleFieldChildren", predicate: ["simpleField"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"smartFilter\" class=\"smart-simple-fields-container\">\r\n <div *ngFor=\"let filterExpressionField of smartFilter.data; let i = index\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n <div *ngFor=\"let subfilterExpressionField of filterExpressionField.subFieldList?.filters\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".smart-simple-fields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem;justify-content:center}\n"], components: [{ type: SmartFilterSimpleFieldComponent, selector: "smart-filter-simple-field", inputs: ["operationTranslator", "filterExpressionField", "showPossibleActions"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
13180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterSimpleComponent, decorators: [{
|
|
13181
|
+
type: Component,
|
|
13182
|
+
args: [{ selector: "smart-filter-simple", template: "<div *ngIf=\"smartFilter\" class=\"smart-simple-fields-container\">\r\n <div *ngFor=\"let filterExpressionField of smartFilter.data; let i = index\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n <div *ngFor=\"let subfilterExpressionField of filterExpressionField.subFieldList?.filters\">\r\n <smart-filter-simple-field\r\n #simpleField\r\n [filterExpressionField]=\"filterExpressionField\"\r\n [operationTranslator]=\"smartFilter.operationTranslator\"\r\n [showPossibleActions]=\"smartFilter.showPossibleActions\"\r\n ></smart-filter-simple-field>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".smart-simple-fields-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem;justify-content:center}\n"] }]
|
|
13183
|
+
}], ctorParameters: function () { return [{ type: SmartFilterService }]; }, propDecorators: { simpleFieldChildren: [{
|
|
13184
|
+
type: ViewChildren,
|
|
13185
|
+
args: ["simpleField"]
|
|
13186
|
+
}] } });
|
|
13187
|
+
|
|
13188
|
+
class SmartFilterComponent {
|
|
13189
|
+
constructor(service) {
|
|
13190
|
+
this.service = service;
|
|
13191
|
+
}
|
|
13192
|
+
ngOnInit() {
|
|
13193
|
+
if (this.filter) {
|
|
13194
|
+
this.setUp();
|
|
13215
13195
|
}
|
|
13216
13196
|
}
|
|
13217
|
-
|
|
13218
|
-
if (
|
|
13219
|
-
this.
|
|
13220
|
-
return {
|
|
13221
|
-
title: filterExpressionBuilderGroup.label,
|
|
13222
|
-
cssClass: 'filterExpressionBuilderGroup',
|
|
13223
|
-
customComponent: SmartFilterParamComponent,
|
|
13224
|
-
data: {
|
|
13225
|
-
group: filterExpressionBuilderGroup.fields,
|
|
13226
|
-
serviceToUse: this.service,
|
|
13227
|
-
},
|
|
13228
|
-
inputName: 'data',
|
|
13229
|
-
isExpanded: true,
|
|
13230
|
-
};
|
|
13231
|
-
});
|
|
13197
|
+
ngOnChanges(changes) {
|
|
13198
|
+
if (changes['filter'].currentValue) {
|
|
13199
|
+
this.setUp();
|
|
13232
13200
|
}
|
|
13233
13201
|
}
|
|
13202
|
+
setUp() {
|
|
13203
|
+
this.service.filter = this.filter;
|
|
13204
|
+
}
|
|
13205
|
+
async submit() {
|
|
13206
|
+
return await this.service.submit();
|
|
13207
|
+
}
|
|
13234
13208
|
}
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type:
|
|
13209
|
+
SmartFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterComponent, deps: [{ token: SmartFilterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13210
|
+
SmartFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterComponent, selector: "smart-filter", inputs: { filter: "filter" }, providers: [SmartFilterService], usesOnChanges: true, ngImport: i0, template: "<smart-filter-simple *ngIf=\"filter\" #simpleFilter></smart-filter-simple>\r\n", styles: [""], components: [{ type: SmartFilterSimpleComponent, selector: "smart-filter-simple" }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
13211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterComponent, decorators: [{
|
|
13238
13212
|
type: Component,
|
|
13239
|
-
args: [{ selector: 'smart-filter
|
|
13240
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
13213
|
+
args: [{ selector: 'smart-filter', providers: [SmartFilterService], template: "<smart-filter-simple *ngIf=\"filter\" #simpleFilter></smart-filter-simple>\r\n", styles: [""] }]
|
|
13214
|
+
}], ctorParameters: function () { return [{ type: SmartFilterService }]; }, propDecorators: { filter: [{
|
|
13241
13215
|
type: Input
|
|
13242
|
-
}], filterVcRef: [{
|
|
13243
|
-
type: ViewChild,
|
|
13244
|
-
args: ['smartFilter', { read: ViewContainerRef }]
|
|
13245
13216
|
}] } });
|
|
13246
13217
|
|
|
13218
|
+
class SmartFilterExpressionFieldComponent {
|
|
13219
|
+
constructor() { }
|
|
13220
|
+
ngOnInit() {
|
|
13221
|
+
}
|
|
13222
|
+
}
|
|
13223
|
+
SmartFilterExpressionFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13224
|
+
SmartFilterExpressionFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SmartFilterExpressionFieldComponent, selector: "lib-smart-filter-expression-field", ngImport: i0, template: "", styles: [""] });
|
|
13225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterExpressionFieldComponent, decorators: [{
|
|
13226
|
+
type: Component,
|
|
13227
|
+
args: [{ selector: 'lib-smart-filter-expression-field', template: "", styles: [""] }]
|
|
13228
|
+
}], ctorParameters: function () { return []; } });
|
|
13229
|
+
|
|
13230
|
+
class SmartFilterModule {
|
|
13231
|
+
}
|
|
13232
|
+
SmartFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13233
|
+
SmartFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, declarations: [SmartFilterComponent,
|
|
13234
|
+
SmartFilterExpressionFieldComponent,
|
|
13235
|
+
SmartFilterSimpleComponent,
|
|
13236
|
+
SmartFilterSimpleFieldComponent], imports: [BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule], exports: [SmartFilterComponent] });
|
|
13237
|
+
SmartFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, imports: [[BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule]] });
|
|
13238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SmartFilterModule, decorators: [{
|
|
13239
|
+
type: NgModule,
|
|
13240
|
+
args: [{
|
|
13241
|
+
declarations: [
|
|
13242
|
+
SmartFilterComponent,
|
|
13243
|
+
SmartFilterExpressionFieldComponent,
|
|
13244
|
+
SmartFilterSimpleComponent,
|
|
13245
|
+
SmartFilterSimpleFieldComponent,
|
|
13246
|
+
],
|
|
13247
|
+
imports: [BrowserModule, SmartformModule, MatMenuModule, MatIconModule, MatButtonModule],
|
|
13248
|
+
exports: [SmartFilterComponent],
|
|
13249
|
+
}]
|
|
13250
|
+
}] });
|
|
13251
|
+
|
|
13252
|
+
var SmartFilterPosition;
|
|
13253
|
+
(function (SmartFilterPosition) {
|
|
13254
|
+
SmartFilterPosition[SmartFilterPosition["TOP"] = 0] = "TOP";
|
|
13255
|
+
SmartFilterPosition[SmartFilterPosition["BOTTOM"] = 1] = "BOTTOM";
|
|
13256
|
+
SmartFilterPosition[SmartFilterPosition["LEFT"] = 2] = "LEFT";
|
|
13257
|
+
SmartFilterPosition[SmartFilterPosition["RIGHT"] = 3] = "RIGHT";
|
|
13258
|
+
})(SmartFilterPosition || (SmartFilterPosition = {}));
|
|
13259
|
+
var SmartFilterType;
|
|
13260
|
+
(function (SmartFilterType) {
|
|
13261
|
+
SmartFilterType[SmartFilterType["SIMPLE"] = 0] = "SIMPLE";
|
|
13262
|
+
SmartFilterType[SmartFilterType["ADVANCED"] = 1] = "ADVANCED";
|
|
13263
|
+
})(SmartFilterType || (SmartFilterType = {}));
|
|
13264
|
+
|
|
13265
|
+
/*
|
|
13266
|
+
* Public API Surface of smart-filter
|
|
13267
|
+
*/
|
|
13268
|
+
|
|
13247
13269
|
var FilterExpressionBuilderUiModelTypeEnum;
|
|
13248
13270
|
(function (FilterExpressionBuilderUiModelTypeEnum) {
|
|
13249
13271
|
FilterExpressionBuilderUiModelTypeEnum["SIMPLE"] = "SIMPLE";
|
|
@@ -13431,28 +13453,28 @@ class SmartFilterEditorContentComponent {
|
|
|
13431
13453
|
model[index] = filterExpressionField;
|
|
13432
13454
|
if (filterExpressionField.widgetType === 'SELECT_MULTIPLE') {
|
|
13433
13455
|
key = index + '.expressionData.operand2.selectedValues';
|
|
13434
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.
|
|
13456
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.TEXT_FIELD, filterExpressionField.possibleValues, filterExpressionField.expressionData?.operand2?.valueAsString ?? ''));
|
|
13435
13457
|
return;
|
|
13436
13458
|
}
|
|
13437
13459
|
if (filterExpressionField.expressionData?.currentOperation === 'BETWEEN') {
|
|
13438
13460
|
key = index + '.expressionData.operand2.valueAsString';
|
|
13439
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.
|
|
13461
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.TEXT_FIELD, filterExpressionField.possibleValues, filterExpressionField.expressionData?.operand2?.valueAsString ?? ''));
|
|
13440
13462
|
key = index + '.expressionData.operand3.valueAsString';
|
|
13441
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label3, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.
|
|
13463
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label3, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.TEXT_FIELD, filterExpressionField.possibleValues, filterExpressionField.expressionData?.operand3?.valueAsString ?? ''));
|
|
13442
13464
|
return;
|
|
13443
13465
|
}
|
|
13444
13466
|
if (filterExpressionField.expressionData?.operand2) {
|
|
13445
13467
|
if (key !== index + '.expressionData.operand2.selectedValues') {
|
|
13446
13468
|
key = index + '.expressionData.operand2.valueAsString';
|
|
13447
13469
|
}
|
|
13448
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.
|
|
13470
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label2, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.TEXT_FIELD, filterExpressionField.possibleValues, filterExpressionField.expressionData?.operand2?.valueAsString ?? ''));
|
|
13449
13471
|
return;
|
|
13450
13472
|
}
|
|
13451
13473
|
if (filterExpressionField?.expressionData?.operand3) {
|
|
13452
13474
|
if (key !== index + '.selectedValues') {
|
|
13453
13475
|
key = index + '.expressionData.operand3.valueAsString';
|
|
13454
13476
|
}
|
|
13455
|
-
widgets.push(this.constructFormWidget(key, filterExpressionField.label3, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.
|
|
13477
|
+
widgets.push(this.constructFormWidget(key, filterExpressionField.label3, filterExpressionField.widgetType ?? FilterExpressionFieldWidgetType.TEXT_FIELD, filterExpressionField.possibleValues, filterExpressionField.expressionData?.operand3?.valueAsString ?? ''));
|
|
13456
13478
|
return;
|
|
13457
13479
|
}
|
|
13458
13480
|
});
|
|
@@ -13557,10 +13579,10 @@ class SmartFilterEditorContentComponent {
|
|
|
13557
13579
|
}
|
|
13558
13580
|
constructFormWidget(key, label, widgetType, possibleValues, value) {
|
|
13559
13581
|
let type = widgetType;
|
|
13560
|
-
if (type === FilterExpressionFieldWidgetType.
|
|
13582
|
+
if (type === FilterExpressionFieldWidgetType.DATE) {
|
|
13561
13583
|
type = SmartFormWidgetType.DATE_PICKER;
|
|
13562
13584
|
}
|
|
13563
|
-
else if (type === FilterExpressionFieldWidgetType.
|
|
13585
|
+
else if (type === FilterExpressionFieldWidgetType.DATE_TIME) {
|
|
13564
13586
|
type = SmartFormWidgetType.DATE_TIME_PICKER;
|
|
13565
13587
|
}
|
|
13566
13588
|
let widget = {
|
|
@@ -15231,5 +15253,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
15231
15253
|
* Generated bundle index. Do not edit.
|
|
15232
15254
|
*/
|
|
15233
15255
|
|
|
15234
|
-
export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$5 as BASE_PATH, COLLECTION_FORMATS$5 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$5 as Configuration, DIALOG_DISABLE_CLOSE, DataChangeKind, DefaultUiActionCode_CLOSE, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator$1 as FilterExpressionBoolOperator,
|
|
15256
|
+
export { APIS$3 as APIS, ApiModule$3 as ApiModule, ApiQueueService, BASE_PATH$5 as BASE_PATH, COLLECTION_FORMATS$5 as COLLECTION_FORMATS, CloseResult, ComponentFactoryService, ComponentFactoryServiceModule, ComponentType, ComponentWidgetType, Configuration$5 as Configuration, DIALOG_DISABLE_CLOSE, DataChangeKind, DefaultUiActionCode_CLOSE, ExpandableSectionButtonIconPosition, ExpandableSectionButtonType, ExpandableSectionComponent, FilterExpressionBoolOperator$1 as FilterExpressionBoolOperator, FilterExpressionBuilderGroupBuilderGroupKindEnum, FilterExpressionDataType, FilterExpressionFieldWidgetType, FilterExpressionOperation, FilterExpressionOrderByOrderEnum, GridColumnContentType, GridDataAccessConfigKindEnum, GridSelectionMode, GridSelectionType, GridUiActionType, GridViewDescriptorKindEnum, IS_ASYNC_PARAM_NAME, IconPosition, ImageResourceKindEnum, LayoutDirection, LinkTargetEnum, MessageOptionType, MessageTextType, MessageType, SelectionDefinitionTypeEnum, SessionAPIS, SessionErrorBehaviour, SessionService, SharedModule, SimplifiedTabGroupComponent, SmartActionType, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartComponentLayoutComponent, SmartComponentLayoutModule, SmartComponentLayoutUtility, SmartDatePipe, SmartDateTimePipe, SmartDialog, SmartExpandableSectionModule, SmartExpandableSectionService, SmartFileUploaderComponent, SmartFilterComponent, SmartFilterEditorContentComponent, SmartFilterEditorModule, SmartFilterEditorService, SmartFilterExpressionItemComponent, SmartFilterExpressionItemsComponent, SmartFilterModule, SmartFilterParamComponent, SmartFilterParamsComponent, SmartFilterPosition, SmartFilterType, SmartFormTextFieldButtonIconPosition, SmartFormWidgetDirection, SmartFormWidgetType, SmartFormWidgetWidth, SmartGridButtonType, SmartGridComponent, SmartGridDataLayout, SmartGridModule, SmartGridService, SmartGridType, SmartIconComponent, SmartIconModule, SmartIconService, SmartLayoutDef, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNavbarComponent, SmartNavbarModule, SmartNavbarService, SmartNavigationModule, SmartNavigationService, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartSubject, SmartTabGroupModule, SmartTabGroupService, SmartTable, SmartTableButtonType, SmartTableHeaderPropertyType, SmartTableInterfaceTypeEnum, SmartTableOptionButtonDirection, SmartTableOrder, SmartTableType, SmartTimePipe, SmartTooltipDirective, SmartTreeComponent, SmartTreeNodeButtonType, SmartUserSettinsIconPosition, SmartValidatorName, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, SmartWidgetHintPosition, SmartWidgetHintPositionEnum, SmartWidgetSettings, SmartdialogModule, SmartdialogService, SmartfileuploaderComponent, SmartformComponent, SmartformLayoutDefinitionService, SmartformModule, SmartformwidgetComponent, SmarttableComponent, SmarttableModule, SmarttableService, SmarttreeGenericService, SmarttreeModule, SmarttreeService, TabGroupComponent, ToggleLabelPosition, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, UiActionTooltipTooltipPositionEnum, ViewEventHandlerViewEventTypeEnum, ViewService, ViewState, ViewType, WidgetMap };
|
|
15235
15257
|
//# sourceMappingURL=smartbit4all-ng-client.mjs.map
|