@colijnit/corecomponents_v12 12.2.4 → 12.2.5
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/bundles/colijnit-corecomponents_v12.umd.js +428 -81
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.d.ts +0 -2
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/colijnit-corecomponents_v12.js +1 -3
- package/esm2015/lib/components/button/button.component.js +27 -20
- package/esm2015/lib/components/filter-item/filter-item.component.js +10 -5
- package/esm2015/lib/components/input-date-picker/input-date-picker.component.js +3 -1
- package/esm2015/lib/components/list-of-values/list-of-values.component.js +14 -6
- package/esm2015/lib/directives/screen-configuration/screen-configuration.directive.js +123 -33
- package/esm2015/lib/directives/screen-configuration/screen-configuration.module.js +4 -6
- package/esm2015/lib/service/base-module-screen-config.service.js +205 -0
- package/esm2015/lib/service/base-module.service.js +42 -0
- package/esm2015/public-api.js +4 -1
- package/fesm2015/colijnit-corecomponents_v12.js +402 -83
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/button/button.component.d.ts +11 -3
- package/lib/directives/screen-configuration/screen-configuration.directive.d.ts +25 -9
- package/lib/service/base-module-screen-config.service.d.ts +47 -0
- package/lib/service/base-module.service.d.ts +22 -0
- package/package.json +5 -4
- package/public-api.d.ts +3 -0
- package/esm2015/lib/directives/screen-configuration/screen-config-component-wrapper.component.js +0 -30
- package/lib/directives/screen-configuration/screen-config-component-wrapper.component.d.ts +0 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('rxjs'), require('@angular/platform-browser'), require('@angular/animations'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js'), require('hammerjs'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/drag-drop'), require('@angular/cdk/scrolling')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/forms', 'rxjs', '@angular/platform-browser', '@angular/animations', '@angular/common', '@angular/common/http', 'rxjs/operators', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js', 'hammerjs', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/drag-drop', '@angular/cdk/scrolling'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.forms, global.rxjs, global.ng.platformBrowser, global.ng.animations, global.ng.common, global.ng.common.http, global.rxjs.operators, global.three, global.CSS3DRenderer, global.TWEEN, null, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.dragDrop, global.ng.cdk.scrolling));
|
|
5
|
-
})(this, (function (exports, i0, forms, rxjs, platformBrowser, animations, common, http, operators, three, CSS3DRenderer, TWEEN, hammerjs, overlay, portal, dragDrop, scrolling) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('rxjs'), require('@angular/platform-browser'), require('@angular/animations'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js'), require('hammerjs'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/drag-drop'), require('@angular/cdk/scrolling'), require('@colijnit/ioneconnector/build/utils/array-utils'), require('@colijnit/ioneconnector/build/model/default-get-object-configurations-params'), require('@colijnit/ioneconnector/build/model/object-configuration')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/forms', 'rxjs', '@angular/platform-browser', '@angular/animations', '@angular/common', '@angular/common/http', 'rxjs/operators', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js', 'hammerjs', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/drag-drop', '@angular/cdk/scrolling', '@colijnit/ioneconnector/build/utils/array-utils', '@colijnit/ioneconnector/build/model/default-get-object-configurations-params', '@colijnit/ioneconnector/build/model/object-configuration'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.forms, global.rxjs, global.ng.platformBrowser, global.ng.animations, global.ng.common, global.ng.common.http, global.rxjs.operators, global.three, global.CSS3DRenderer, global.TWEEN, null, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.dragDrop, global.ng.cdk.scrolling, global.arrayUtils, global.defaultGetObjectConfigurationsParams, global.objectConfiguration));
|
|
5
|
+
})(this, (function (exports, i0, forms, rxjs, platformBrowser, animations, common, http, operators, three, CSS3DRenderer, TWEEN, hammerjs, overlay, portal, dragDrop, scrolling, arrayUtils, defaultGetObjectConfigurationsParams, objectConfiguration) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -3845,6 +3845,9 @@
|
|
|
3845
3845
|
EventUtils._passiveCapture = undefined;
|
|
3846
3846
|
EventUtils._passiveBubble = undefined;
|
|
3847
3847
|
|
|
3848
|
+
// Enables "DI for interfaces" (see ConfigNameDirective injected .hostComponent).
|
|
3849
|
+
var SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME = new i0.InjectionToken("ScreenConfigAdapterComponent");
|
|
3850
|
+
|
|
3848
3851
|
var ButtonComponent = /** @class */ (function () {
|
|
3849
3852
|
function ButtonComponent(_elementRef) {
|
|
3850
3853
|
this._elementRef = _elementRef;
|
|
@@ -3865,7 +3868,7 @@
|
|
|
3865
3868
|
configurable: true
|
|
3866
3869
|
});
|
|
3867
3870
|
ButtonComponent.prototype.onHostClick = function (event) {
|
|
3868
|
-
if (this.disabled) {
|
|
3871
|
+
if (this.readonly || this.disabled) {
|
|
3869
3872
|
this.clickedWhileDisabled.emit(event);
|
|
3870
3873
|
EventUtils.KillEvent(event);
|
|
3871
3874
|
}
|
|
@@ -3887,11 +3890,16 @@
|
|
|
3887
3890
|
}());
|
|
3888
3891
|
ButtonComponent.decorators = [
|
|
3889
3892
|
{ type: i0.Component, args: [{
|
|
3890
|
-
selector:
|
|
3891
|
-
template: "\n
|
|
3893
|
+
selector: 'co-button',
|
|
3894
|
+
template: "\n <co-icon *ngIf=\"!!iconData\" [iconData]=\"iconData\"></co-icon>\n <span *ngIf=\"!!label\" class=\"label\">{{ label }}</span>\n <co-icon *ngIf=\"!!iconDataRight\" [iconData]=\"iconDataRight\"></co-icon>\n <div class=\"rippler\" md-ripple [mdRippleDisabled]=\"disabled\"></div>\n ",
|
|
3892
3895
|
host: {
|
|
3893
|
-
tabindex:
|
|
3896
|
+
tabindex: '0'
|
|
3894
3897
|
},
|
|
3898
|
+
providers: [{
|
|
3899
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
3900
|
+
useExisting: i0.forwardRef(function () { return ButtonComponent; })
|
|
3901
|
+
}
|
|
3902
|
+
],
|
|
3895
3903
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3896
3904
|
encapsulation: i0.ViewEncapsulation.None
|
|
3897
3905
|
},] }
|
|
@@ -3900,19 +3908,20 @@
|
|
|
3900
3908
|
{ type: i0.ElementRef }
|
|
3901
3909
|
]; };
|
|
3902
3910
|
ButtonComponent.propDecorators = {
|
|
3903
|
-
label: [{ type: i0.HostBinding, args: [
|
|
3904
|
-
iconData: [{ type: i0.HostBinding, args: [
|
|
3905
|
-
iconDataRight: [{ type: i0.HostBinding, args: [
|
|
3911
|
+
label: [{ type: i0.HostBinding, args: ['class.has-label',] }, { type: i0.Input }],
|
|
3912
|
+
iconData: [{ type: i0.HostBinding, args: ['class.has-left-icon',] }, { type: i0.Input }],
|
|
3913
|
+
iconDataRight: [{ type: i0.HostBinding, args: ['class.has-right-icon',] }, { type: i0.Input }],
|
|
3906
3914
|
isToggleButton: [{ type: i0.Input }],
|
|
3907
|
-
isToggled: [{ type: i0.Input }, { type: i0.HostBinding, args: [
|
|
3908
|
-
hidden: [{ type: i0.Input }, { type: i0.HostBinding, args: [
|
|
3909
|
-
disabled: [{ type: i0.Input }, { type: i0.HostBinding, args: [
|
|
3910
|
-
showClass: [{ type: i0.HostBinding, args: [
|
|
3915
|
+
isToggled: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.toggled',] }],
|
|
3916
|
+
hidden: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.co-hidden',] }],
|
|
3917
|
+
disabled: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.disabled',] }],
|
|
3918
|
+
showClass: [{ type: i0.HostBinding, args: ['class.co-button',] }],
|
|
3911
3919
|
onClick: [{ type: i0.Output }],
|
|
3912
3920
|
clickedWhileDisabled: [{ type: i0.Output }],
|
|
3913
3921
|
isToggledChange: [{ type: i0.Output }],
|
|
3914
|
-
hasIcon: [{ type: i0.HostBinding, args: [
|
|
3915
|
-
onHostClick: [{ type: i0.HostListener, args: [
|
|
3922
|
+
hasIcon: [{ type: i0.HostBinding, args: ['class.has-icon',] }],
|
|
3923
|
+
onHostClick: [{ type: i0.HostListener, args: ['click', ['$event'],] }],
|
|
3924
|
+
readonly: [{ type: i0.HostBinding, args: ["class.read-only",] }]
|
|
3916
3925
|
};
|
|
3917
3926
|
|
|
3918
3927
|
var ButtonModule = /** @class */ (function () {
|
|
@@ -5725,9 +5734,6 @@
|
|
|
5725
5734
|
},] }
|
|
5726
5735
|
];
|
|
5727
5736
|
|
|
5728
|
-
// Enables "DI for interfaces" (see ConfigNameDirective injected .hostComponent).
|
|
5729
|
-
var SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME = new i0.InjectionToken("ScreenConfigAdapterComponent");
|
|
5730
|
-
|
|
5731
5737
|
var InputCheckboxComponent = /** @class */ (function (_super) {
|
|
5732
5738
|
__extends(InputCheckboxComponent, _super);
|
|
5733
5739
|
function InputCheckboxComponent(formComponent, iconCacheService, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
|
|
@@ -5928,7 +5934,7 @@
|
|
|
5928
5934
|
InputDatePickerComponent.decorators = [
|
|
5929
5935
|
{ type: i0.Component, args: [{
|
|
5930
5936
|
selector: 'co-input-date',
|
|
5931
|
-
template: "\n <co-input-text (clickOutside)=\"toggleCalendar(false)\" overlayParent #parentForOverlay=\"overlayParent\"\n [(model)]=\"modelAsString\"\n [rightIcon]=\"rightIcon\"\n [leftIcon]=\"leftIcon\"\n [leftIconData]=\"leftIconData\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [placeholder]=\"placeholder\"\n (rightIconClick)=\"toggleCalendar(true)\"\n (blur)=\"handleDateChange(modelAsString)\"\n (clearIconClick)=\"handleClearIconClicked()\"\n ></co-input-text>\n ",
|
|
5937
|
+
template: "\n <co-input-text (clickOutside)=\"toggleCalendar(false)\" overlayParent #parentForOverlay=\"overlayParent\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [(model)]=\"modelAsString\"\n [rightIcon]=\"rightIcon\"\n [leftIcon]=\"leftIcon\"\n [leftIconData]=\"leftIconData\"\n [pattern]=\"'yyyy-MM-dd'\"\n [type]=\"'date'\"\n [placeholder]=\"placeholder\"\n (rightIconClick)=\"toggleCalendar(true)\"\n (blur)=\"handleDateChange(modelAsString)\"\n (clearIconClick)=\"handleClearIconClicked()\"\n ></co-input-text>\n ",
|
|
5932
5938
|
providers: [
|
|
5933
5939
|
OverlayService, {
|
|
5934
5940
|
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, useExisting: i0.forwardRef(function () { return InputDatePickerComponent; })
|
|
@@ -11202,8 +11208,11 @@
|
|
|
11202
11208
|
if (this._lovPopupComponentRef) {
|
|
11203
11209
|
this._lovPopupComponentRef.instance.searchTerm = model;
|
|
11204
11210
|
}
|
|
11205
|
-
|
|
11206
|
-
this.
|
|
11211
|
+
else {
|
|
11212
|
+
if (!this.selectedModel && model) {
|
|
11213
|
+
this.openPopup();
|
|
11214
|
+
this._lovPopupComponentRef.instance.searchTerm = model;
|
|
11215
|
+
}
|
|
11207
11216
|
}
|
|
11208
11217
|
this.selectedModel = model;
|
|
11209
11218
|
};
|
|
@@ -11326,7 +11335,7 @@
|
|
|
11326
11335
|
this.selectedModel = this.model[this.displayField];
|
|
11327
11336
|
}
|
|
11328
11337
|
else {
|
|
11329
|
-
this.selectedModel =
|
|
11338
|
+
this.selectedModel = '';
|
|
11330
11339
|
}
|
|
11331
11340
|
}
|
|
11332
11341
|
};
|
|
@@ -11337,7 +11346,11 @@
|
|
|
11337
11346
|
selector: 'co-list-of-values',
|
|
11338
11347
|
template: "\n <co-input-text aria-haspopup=\"listbox\" [attr.aria-expanded]=\"isSelectOpen\" aria-controls=\"lov-popup\" role=\"combobox\"\n class=\"no-focus-line\"\n overlayParent\n #parentForOverlay=\"overlayParent\" type=\"text\" [id]=\"label\"\n [model]=\"multiselect ? selectedModels : selectedModel\"\n [placeholder]=\"label\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [noClickFocus]=\"false\"\n [leftIconData]=\"leftIconData\"\n [rightIcon]=\"isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular\"\n [showClearButton]=\"true\"\n [useContent]=\"multiselect\"\n [customHeight]=\"multiselect\"\n [keepFocussed]=\"keepFocussed\"\n (modelChange)=\"handleInputModelChange($event)\"\n (click)=\"openPopup()\"\n (rightIconClick)=\"toggleSelect()\"\n (keydown)=\"handleInputKeyDown($event)\"\n (clearIconClick)=\"clearModel($event)\"\n (blur)=\"checkModel()\"\n >\n <ng-container *ngIf=\"multiselect\">\n <div class=\"multiselect-chips-wrapper\">\n <div class=\"chips\" *ngFor=\"let chip of model\">\n <span class=\"chips-description\" [textContent]=\"chip[displayField]\"></span>\n <co-icon class=\"remove-chip-icon\" [icon]=\"icons.CrossSkinny\" (click)=\"removeOptionFromModel(chip)\"></co-icon>\n </div>\n </div>\n </ng-container>\n </co-input-text>\n ",
|
|
11339
11348
|
providers: [
|
|
11340
|
-
OverlayService
|
|
11349
|
+
OverlayService,
|
|
11350
|
+
{
|
|
11351
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
11352
|
+
useExisting: i0.forwardRef(function () { return ListOfValuesComponent; })
|
|
11353
|
+
}
|
|
11341
11354
|
],
|
|
11342
11355
|
encapsulation: i0.ViewEncapsulation.None
|
|
11343
11356
|
},] }
|
|
@@ -11903,6 +11916,8 @@
|
|
|
11903
11916
|
this.sliderMax = !!this.sliderMax ? this.sliderMax : this.sliderDefaultMax;
|
|
11904
11917
|
var trueLowerBound = Math.min(this.sliderMin, this.sliderMax);
|
|
11905
11918
|
var trueUpperBound = Math.max(this.sliderMin, this.sliderMax);
|
|
11919
|
+
this.sliderMin = trueLowerBound;
|
|
11920
|
+
this.sliderMax = trueUpperBound;
|
|
11906
11921
|
this._model = trueLowerBound + " - " + trueUpperBound;
|
|
11907
11922
|
};
|
|
11908
11923
|
FilterItemComponent.prototype._createModelForCheckboxToText = function () {
|
|
@@ -12094,7 +12109,7 @@
|
|
|
12094
12109
|
FilterItemComponent.decorators = [
|
|
12095
12110
|
{ type: i0.Component, args: [{
|
|
12096
12111
|
selector: "co-filter-item",
|
|
12097
|
-
template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n [showButton]=\"showButton\"\n [buttonText]=\"filterButtonLabel\"\n (buttonClicked)=\"onButtonClicked()\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\"\n (keydown)=\"showButton=true\" (mousedown)=\"showButton=true\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\" *ngIf=\"mode === modes.Filterlist || mode === modes.SingleSelectList\n || mode === modes.SelectListWithNumberOutput || mode === modes.SelectListWithStringCollectionOutput\">\n <co-input-text\n *ngIf=\"collection?.length > 10 || minSearchCharsToLoadCollection\"\n [placeholder]=\"searchPlaceholder\"\n [model]=\"filterText\"\n (modelChange)=\"applyFilter($event)\"\n >\n </co-input-text>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <ng-container\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox *ngIf=\"mode !== modes.SingleSelectList\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n [clickableLabel]=\"false\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"mode === modes.SingleSelectList\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n <div class=\"co-filter-item-slider-content\" *ngIf=\"mode === modes.Slider\">\n <co-input-text\n class=\"slider-from\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'FROM' | localize\"\n [(model)]=\"sliderMin\"\n (
|
|
12112
|
+
template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n [showButton]=\"showButton\"\n [buttonText]=\"filterButtonLabel\"\n (buttonClicked)=\"onButtonClicked()\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\"\n (keydown)=\"showButton=true\" (mousedown)=\"showButton=true\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\" *ngIf=\"mode === modes.Filterlist || mode === modes.SingleSelectList\n || mode === modes.SelectListWithNumberOutput || mode === modes.SelectListWithStringCollectionOutput\">\n <co-input-text\n *ngIf=\"collection?.length > 10 || minSearchCharsToLoadCollection\"\n [placeholder]=\"searchPlaceholder\"\n [model]=\"filterText\"\n (modelChange)=\"applyFilter($event)\"\n >\n </co-input-text>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <ng-container\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox *ngIf=\"mode !== modes.SingleSelectList\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n [clickableLabel]=\"false\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"mode === modes.SingleSelectList\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n <div class=\"co-filter-item-slider-content\" *ngIf=\"mode === modes.Slider\">\n <co-input-text\n class=\"slider-from\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'FROM' | localize\"\n [(model)]=\"sliderMin\"\n (focusout)=\"handleModelChange(sliderMin)\"\n ></co-input-text>\n <co-input-text\n class=\"slider-to\"\n [type]=\"'number'\"\n [digitsOnly]=\"true\"\n [hideArrowButtons]=\"true\"\n [excludePlusMinus]=\"true\"\n [label]=\"'TO' | localize\"\n [(model)]=\"sliderMax\"\n (focusout)=\"handleModelChange(sliderMax)\"\n ></co-input-text>\n </div>\n <div class=\"co-filter-item-checkbox-content\" *ngIf=\"mode === modes.Checkbox \">\n <co-input-checkbox\n [(model)]=\"model\"\n (modelChange)=\"handleModelChange($event)\"\n [label]=\"placeholder\">\n </co-input-checkbox>\n </div>\n <div class=\"co-filter-item-checkbox-content\"\n *ngIf=\"mode === modes.CheckboxToText || mode === modes.CheckboxToSimpleText || mode === modes.CheckboxToBinary\">\n <co-input-checkbox\n [(model)]=\"checkBoxToTextModel\"\n (modelChange)=\"handleModelChange($event)\"\n [label]=\"placeholder\"></co-input-checkbox>\n </div>\n <div class=\"co-filter-item-textfield-content\" *ngIf=\"mode === modes.TextField\">\n <co-input-text\n [(model)]=\"model\"\n (modelChange)=\"handleModelChange($event)\"></co-input-text>\n </div>\n <div class=\"co-filter-item-dateField-content\" *ngIf=\"mode === modes.DateField\">\n <co-input-date\n [(model)]=\"model\"\n (modelChange)=\"handleModelChange($event)\"\n ></co-input-date>\n </div>\n <div class=\"co-filter-item-dateField-content\" *ngIf=\"mode === modes.DateRangeField\">\n <co-input-date-range\n [model]=\"[dateRangeStart, dateRangeEnd]\"\n (modelChange)=\"handleModelChange($event)\"\n [placeholder]=\"'SELECT_DATE' | localize\">\n </co-input-date-range>\n </div>\n </ng-template>\n </div>\n </co-collapsible>\n </div>\n\n ",
|
|
12098
12113
|
encapsulation: i0.ViewEncapsulation.None,
|
|
12099
12114
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
12100
12115
|
},] }
|
|
@@ -12496,81 +12511,406 @@
|
|
|
12496
12511
|
},] }
|
|
12497
12512
|
];
|
|
12498
12513
|
|
|
12499
|
-
var
|
|
12500
|
-
function
|
|
12501
|
-
|
|
12502
|
-
this.
|
|
12514
|
+
var BaseModuleScreenConfigService = /** @class */ (function () {
|
|
12515
|
+
function BaseModuleScreenConfigService() {
|
|
12516
|
+
// emits the params of the loaded config, each time when a new config was loaded
|
|
12517
|
+
this.configSet = new rxjs.BehaviorSubject([]);
|
|
12518
|
+
this._configObjects = [];
|
|
12519
|
+
// key: configName, value: the ObjectConfiguration with that configName. For faster ObjectConfiguration lookups, given a configName string (vs. array).
|
|
12520
|
+
this._objectConfigsMap = new Map();
|
|
12503
12521
|
}
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12522
|
+
Object.defineProperty(BaseModuleScreenConfigService.prototype, "configObjects", {
|
|
12523
|
+
get: function () {
|
|
12524
|
+
return this._configObjects;
|
|
12525
|
+
},
|
|
12526
|
+
enumerable: false,
|
|
12527
|
+
configurable: true
|
|
12528
|
+
});
|
|
12529
|
+
// POST: this.configObjects are loaded. Returns the loaded config objects.
|
|
12530
|
+
BaseModuleScreenConfigService.prototype.loadConfig = function (params, insertRights) {
|
|
12531
|
+
if (params === void 0) { params = defaultGetObjectConfigurationsParams.DEFAULT_GET_OBJECT_CONFIGURATION_PARAMS; }
|
|
12532
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
12533
|
+
var configObjects;
|
|
12534
|
+
return __generator(this, function (_a) {
|
|
12535
|
+
switch (_a.label) {
|
|
12536
|
+
case 0: return [4 /*yield*/, this.loadConfigForModule(params, insertRights)];
|
|
12537
|
+
case 1:
|
|
12538
|
+
configObjects = _a.sent();
|
|
12539
|
+
this._configObjects = configObjects;
|
|
12540
|
+
if (configObjects && Array.isArray(configObjects)) {
|
|
12541
|
+
this._buildScreenConfigMap();
|
|
12542
|
+
this.configSet.next(params);
|
|
12543
|
+
}
|
|
12544
|
+
return [2 /*return*/, this._configObjects];
|
|
12545
|
+
}
|
|
12546
|
+
});
|
|
12547
|
+
});
|
|
12548
|
+
};
|
|
12549
|
+
BaseModuleScreenConfigService.prototype.lazyLoadConfig = function () {
|
|
12550
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
12551
|
+
return __generator(this, function (_a) {
|
|
12552
|
+
switch (_a.label) {
|
|
12553
|
+
case 0:
|
|
12554
|
+
if (!!this.configObjects.length) return [3 /*break*/, 2];
|
|
12555
|
+
return [4 /*yield*/, this.loadConfig()];
|
|
12556
|
+
case 1:
|
|
12557
|
+
_a.sent();
|
|
12558
|
+
_a.label = 2;
|
|
12559
|
+
case 2: return [2 /*return*/];
|
|
12560
|
+
}
|
|
12561
|
+
});
|
|
12562
|
+
});
|
|
12507
12563
|
};
|
|
12508
|
-
|
|
12509
|
-
if (
|
|
12510
|
-
|
|
12511
|
-
this.hidden = !this._visibleOnViewInit;
|
|
12564
|
+
BaseModuleScreenConfigService.prototype.isActiveFieldValidationObject = function (configObject) {
|
|
12565
|
+
if (configObject) {
|
|
12566
|
+
return configObject.isActiveFieldValidationObject() && !this.isDataNameHiddenByAnyOfItsParentRubrics(configObject.dataName);
|
|
12512
12567
|
}
|
|
12513
12568
|
};
|
|
12514
|
-
|
|
12569
|
+
BaseModuleScreenConfigService.prototype.isBoValid = function (bo) {
|
|
12570
|
+
if (this.controlValidityByBoMap && !arrayUtils.ArrayUtils.IsEmptyArray(this.controlValidityByBoMap)) {
|
|
12571
|
+
var mapEntry = this.controlValidityByBoMap.find(function (value) { return value.bo === bo && value.valid === false; });
|
|
12572
|
+
if (mapEntry) {
|
|
12573
|
+
return mapEntry.valid;
|
|
12574
|
+
}
|
|
12575
|
+
}
|
|
12576
|
+
return true;
|
|
12577
|
+
};
|
|
12578
|
+
BaseModuleScreenConfigService.prototype.getObjectConfigurationFor = function (configName) {
|
|
12579
|
+
var configuration = this._objectConfigsMap.get(configName);
|
|
12580
|
+
// If configuration not found by configname, try by data name
|
|
12581
|
+
if (!!this._objectConfigsMap.size && !configuration && configName) {
|
|
12582
|
+
var configNameByDataName = this._getConfigNameByDataName(configName);
|
|
12583
|
+
if (this._objectConfigsMap.get(configNameByDataName)) {
|
|
12584
|
+
return this._objectConfigsMap.get(configNameByDataName);
|
|
12585
|
+
} /*else if (!environment.production) {
|
|
12586
|
+
console.warn("No configuration object was found by the name of: ", configName, " or dataname ", configNameByDataName);
|
|
12587
|
+
}*/
|
|
12588
|
+
}
|
|
12589
|
+
return configuration;
|
|
12590
|
+
};
|
|
12591
|
+
BaseModuleScreenConfigService.prototype.setObjectConfigurationFor = function (configName, configObject) {
|
|
12592
|
+
this._objectConfigsMap.set(configName, configObject);
|
|
12593
|
+
};
|
|
12594
|
+
// Whether the user may read the component that's associated with given config object (visibility).
|
|
12595
|
+
BaseModuleScreenConfigService.prototype.mayRead = function (configName) {
|
|
12596
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12597
|
+
return objectConfig ? objectConfig.mayRead() : false;
|
|
12598
|
+
};
|
|
12599
|
+
BaseModuleScreenConfigService.prototype.isReadonly = function (configName) {
|
|
12600
|
+
return !this.mayWrite(configName);
|
|
12601
|
+
};
|
|
12602
|
+
// Whether the user may write onto the component that's associated with given config object.
|
|
12603
|
+
BaseModuleScreenConfigService.prototype.mayWrite = function (configName) {
|
|
12604
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12605
|
+
return objectConfig ? objectConfig.mayWrite() : false;
|
|
12606
|
+
};
|
|
12607
|
+
// Whether the component associated with given config object should, from the start, be visible to the user.
|
|
12608
|
+
BaseModuleScreenConfigService.prototype.immediatelyVisible = function (configName) {
|
|
12609
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12610
|
+
return objectConfig ? objectConfig.immediatelyVisible() : false;
|
|
12611
|
+
};
|
|
12612
|
+
// Whether the component associated with given config object should, from the start, be visible to the user.
|
|
12613
|
+
BaseModuleScreenConfigService.prototype.immediatelyHidden = function (configName) {
|
|
12614
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12615
|
+
return objectConfig ? objectConfig.immediatelyHidden() : false;
|
|
12616
|
+
};
|
|
12617
|
+
BaseModuleScreenConfigService.prototype.noRights = function (configName) {
|
|
12618
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12619
|
+
return objectConfig ? objectConfig.noRights() : false;
|
|
12620
|
+
};
|
|
12621
|
+
BaseModuleScreenConfigService.prototype.isHidden = function (configName) {
|
|
12622
|
+
return !this.immediatelyVisible(configName);
|
|
12623
|
+
};
|
|
12624
|
+
BaseModuleScreenConfigService.prototype.isRequired = function (configName) {
|
|
12625
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12626
|
+
return objectConfig ? !objectConfig.nullable : false;
|
|
12627
|
+
};
|
|
12628
|
+
BaseModuleScreenConfigService.prototype.getDefaultValue = function (configName) {
|
|
12629
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12630
|
+
return objectConfig ? objectConfig.getDefaultValue() : undefined;
|
|
12631
|
+
};
|
|
12632
|
+
BaseModuleScreenConfigService.prototype.getDefaultStringValue = function (configName) {
|
|
12633
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12634
|
+
return objectConfig ? objectConfig.getDefaultStringValue() : undefined;
|
|
12635
|
+
};
|
|
12636
|
+
BaseModuleScreenConfigService.prototype.getDefaultNumberValue = function (configName) {
|
|
12637
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12638
|
+
return objectConfig ? objectConfig.getDefaultNumberValue() : undefined;
|
|
12639
|
+
};
|
|
12640
|
+
BaseModuleScreenConfigService.prototype.getMaxLength = function (configName) {
|
|
12641
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12642
|
+
return objectConfig ? objectConfig.maxLength : undefined;
|
|
12643
|
+
};
|
|
12644
|
+
BaseModuleScreenConfigService.prototype.getDecimals = function (configName) {
|
|
12645
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12646
|
+
return objectConfig ? objectConfig.scale : undefined;
|
|
12647
|
+
};
|
|
12648
|
+
BaseModuleScreenConfigService.prototype.hasConfigObjects = function () {
|
|
12649
|
+
return this._configObjects && this._configObjects.length > 0 && this._objectConfigsMap.size > 0;
|
|
12650
|
+
};
|
|
12651
|
+
BaseModuleScreenConfigService.prototype.isKind = function (configName, kind) {
|
|
12652
|
+
var objectConfig = this._objectConfigsMap.get(configName);
|
|
12653
|
+
return objectConfig ? objectConfig.isKind(kind) : false;
|
|
12654
|
+
};
|
|
12655
|
+
BaseModuleScreenConfigService.prototype.isDataNameHiddenByItselfOrAnyOfItsParentRubrics = function (dataName) {
|
|
12656
|
+
var isHiddenItself = arrayUtils.ArrayUtils.ContainsAnElementFoundBy(this._configObjects, (function (item) {
|
|
12657
|
+
return item.dataName === dataName && item.isHidden();
|
|
12658
|
+
}));
|
|
12659
|
+
if (isHiddenItself) {
|
|
12660
|
+
return true;
|
|
12661
|
+
}
|
|
12662
|
+
else {
|
|
12663
|
+
return this.isDataNameHiddenByAnyOfItsParentRubrics(dataName);
|
|
12664
|
+
}
|
|
12665
|
+
};
|
|
12666
|
+
BaseModuleScreenConfigService.prototype.isDataNameHiddenByAnyOfItsParentRubrics = function (dataName) {
|
|
12667
|
+
// if (this._hardCodedConfigStructure) {
|
|
12668
|
+
// const parentConfigNames: string[] = this._hardCodedConfigStructure.getParentConfigNamesOfFieldConfigName(this._getConfigNameByDataName(dataName));
|
|
12669
|
+
// if (parentConfigNames) {
|
|
12670
|
+
// for (let i: number = 0, len: number = parentConfigNames.length; i < len; i++) {
|
|
12671
|
+
// const parentConfigObj: ObjectConfiguration = this.getObjectConfigurationFor(parentConfigNames[i]);
|
|
12672
|
+
// if (parentConfigObj && parentConfigObj.isHidden()) {
|
|
12673
|
+
// return true;
|
|
12674
|
+
// }
|
|
12675
|
+
// }
|
|
12676
|
+
// }
|
|
12677
|
+
// return false;
|
|
12678
|
+
// }
|
|
12679
|
+
return false;
|
|
12680
|
+
};
|
|
12681
|
+
// return the first found config name for given data name
|
|
12682
|
+
BaseModuleScreenConfigService.prototype._getConfigNameByDataName = function (dataName) {
|
|
12683
|
+
var itsConfigObject = this._getConfigObjectByDataName(dataName);
|
|
12684
|
+
if (itsConfigObject) {
|
|
12685
|
+
return itsConfigObject.configName;
|
|
12686
|
+
}
|
|
12687
|
+
};
|
|
12688
|
+
// return the first found config object with given data name
|
|
12689
|
+
BaseModuleScreenConfigService.prototype._getConfigObjectByDataName = function (dataName) {
|
|
12690
|
+
return arrayUtils.ArrayUtils.Find(this._configObjects, function (cfgObj) {
|
|
12691
|
+
return cfgObj.dataName === dataName;
|
|
12692
|
+
});
|
|
12693
|
+
};
|
|
12694
|
+
// PRE: this.configObjects is loaded. POST: this._objectConfigsMap contains the latest map of configName -> to -> ObjectConfiguration for a live screen module.
|
|
12695
|
+
BaseModuleScreenConfigService.prototype._buildScreenConfigMap = function () {
|
|
12696
|
+
var _this = this;
|
|
12697
|
+
this._objectConfigsMap.clear();
|
|
12698
|
+
this.configObjects.forEach(function (item) { return _this._objectConfigsMap.set(item.configName, item); });
|
|
12699
|
+
};
|
|
12700
|
+
BaseModuleScreenConfigService.prototype.setScreenConfigurationObjectsReadOnly = function (value) {
|
|
12701
|
+
var _this = this;
|
|
12702
|
+
this.configObjects.forEach(function (object) {
|
|
12703
|
+
var copy = Object.assign(new objectConfiguration.ObjectConfiguration(), object);
|
|
12704
|
+
copy.variableReadOnly = value;
|
|
12705
|
+
_this.setObjectConfigurationFor(object.configName, copy);
|
|
12706
|
+
});
|
|
12707
|
+
};
|
|
12708
|
+
BaseModuleScreenConfigService.prototype.setScreenConfigurationObjectsRedErrorBackground = function (errorValidation, setAllFalse) {
|
|
12709
|
+
var _this = this;
|
|
12710
|
+
if (setAllFalse === void 0) { setAllFalse = false; }
|
|
12711
|
+
if (setAllFalse) {
|
|
12712
|
+
this.configObjects.forEach(function (object) {
|
|
12713
|
+
var copy = Object.assign(new objectConfiguration.ObjectConfiguration(), object);
|
|
12714
|
+
copy.redErrorBackground = false;
|
|
12715
|
+
_this.setObjectConfigurationFor(object.configName, copy);
|
|
12716
|
+
});
|
|
12717
|
+
}
|
|
12718
|
+
else if (errorValidation) {
|
|
12719
|
+
var errorMessages = errorValidation.getAllErrorMessagesOfMyValidationFields();
|
|
12720
|
+
var _loop_1 = function (i, len) {
|
|
12721
|
+
var errorMsg = errorMessages[i];
|
|
12722
|
+
var configObject = this_1.configObjects.find(function (object) { return object.configName === errorMsg.fieldId; });
|
|
12723
|
+
if (configObject) {
|
|
12724
|
+
var copy = Object.assign(new objectConfiguration.ObjectConfiguration(), configObject);
|
|
12725
|
+
copy.redErrorBackground = false;
|
|
12726
|
+
this_1.setObjectConfigurationFor(configObject.configName, copy);
|
|
12727
|
+
}
|
|
12728
|
+
};
|
|
12729
|
+
var this_1 = this;
|
|
12730
|
+
for (var i = 0, len = errorMessages.length; i < len; i++) {
|
|
12731
|
+
_loop_1(i, len);
|
|
12732
|
+
}
|
|
12733
|
+
}
|
|
12734
|
+
};
|
|
12735
|
+
return BaseModuleScreenConfigService;
|
|
12515
12736
|
}());
|
|
12516
|
-
|
|
12517
|
-
{ type: i0.
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12737
|
+
BaseModuleScreenConfigService.decorators = [
|
|
12738
|
+
{ type: i0.Injectable }
|
|
12739
|
+
];
|
|
12740
|
+
|
|
12741
|
+
/**
|
|
12742
|
+
* Base class for top-level services of CRUD-style iOne modules (the Relation, Article and Transaction modules).
|
|
12743
|
+
* What sets these modules apart, is the concept of a relatively bulky, 'single businessobject' being manipulated throughout all the tabs.
|
|
12744
|
+
*
|
|
12745
|
+
* Many other (smaller?) iOne modules work with multiple LISTS of different business object types instead.
|
|
12746
|
+
*/
|
|
12747
|
+
var BaseModuleService = /** @class */ (function () {
|
|
12748
|
+
function BaseModuleService(screenConfigService) {
|
|
12749
|
+
var _this = this;
|
|
12750
|
+
this.screenConfigService = screenConfigService;
|
|
12751
|
+
this.readonlyChange = new rxjs.Subject();
|
|
12752
|
+
// Emits this each time a new error validation was received. (there will be zero error tooltips on the screen after this fires)
|
|
12753
|
+
this.errorValidationReceived = new rxjs.Subject();
|
|
12754
|
+
// Emits once after succesful BO update (i.e. there were no errors)
|
|
12755
|
+
this.successfulUpdate = new rxjs.Subject();
|
|
12756
|
+
this._readonly = true;
|
|
12757
|
+
this._subscriptions = [];
|
|
12758
|
+
this._subscriptions.push(this.errorValidationReceived.subscribe(function (errorValidation) { return _this.screenConfigService.setScreenConfigurationObjectsRedErrorBackground(errorValidation); }), this.successfulUpdate.subscribe(function () { return _this.screenConfigService.setScreenConfigurationObjectsRedErrorBackground(null, true); }), this.readonlyChange.subscribe(function (readOnly) { return _this.screenConfigService.setScreenConfigurationObjectsReadOnly(readOnly); }));
|
|
12759
|
+
}
|
|
12760
|
+
Object.defineProperty(BaseModuleService.prototype, "readonly", {
|
|
12761
|
+
// Whether the module is in readonly modus or not. Input fields etc. will be readonly throughout the module.
|
|
12762
|
+
get: function () {
|
|
12763
|
+
return this._readonly;
|
|
12764
|
+
},
|
|
12765
|
+
set: function (readonly) {
|
|
12766
|
+
if (this._readonly !== readonly) {
|
|
12767
|
+
this._readonly = readonly;
|
|
12768
|
+
this.readonlyChange.next(this._readonly);
|
|
12769
|
+
}
|
|
12770
|
+
},
|
|
12771
|
+
enumerable: false,
|
|
12772
|
+
configurable: true
|
|
12773
|
+
});
|
|
12774
|
+
BaseModuleService.prototype.ngOnDestroy = function () {
|
|
12775
|
+
this._subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); });
|
|
12776
|
+
};
|
|
12777
|
+
return BaseModuleService;
|
|
12778
|
+
}());
|
|
12779
|
+
BaseModuleService.decorators = [
|
|
12780
|
+
{ type: i0.Injectable }
|
|
12521
12781
|
];
|
|
12522
|
-
|
|
12523
|
-
{ type:
|
|
12524
|
-
]; };
|
|
12525
|
-
ScreenConfigComponentWrapper.propDecorators = {
|
|
12526
|
-
screenConfigComponentWrapper: [{ type: i0.ViewChild, args: ['screenConfigComponentWrapper',] }]
|
|
12527
|
-
};
|
|
12782
|
+
BaseModuleService.ctorParameters = function () { return [
|
|
12783
|
+
{ type: BaseModuleScreenConfigService }
|
|
12784
|
+
]; };
|
|
12528
12785
|
|
|
12529
12786
|
// Directive to represents the marker of "screen config name ID's" of components within a module.
|
|
12530
12787
|
// Manipulates visibility, readonly and other dynamic states of an input element according to its db-fetched screen configuration object.
|
|
12531
12788
|
var ScreenConfigurationDirective = /** @class */ (function () {
|
|
12532
|
-
function ScreenConfigurationDirective(hostComponent,
|
|
12789
|
+
function ScreenConfigurationDirective(hostComponent, _element,
|
|
12790
|
+
// we must always have a config service to fetch config objects with
|
|
12791
|
+
_configService, _renderer,
|
|
12792
|
+
// to make host readonly when MODULE switches to readonly:
|
|
12793
|
+
_moduleService) {
|
|
12794
|
+
var _this = this;
|
|
12533
12795
|
this.hostComponent = hostComponent;
|
|
12534
|
-
this.
|
|
12535
|
-
this.
|
|
12796
|
+
this._element = _element;
|
|
12797
|
+
this._configService = _configService;
|
|
12798
|
+
this._renderer = _renderer;
|
|
12799
|
+
this._moduleService = _moduleService;
|
|
12800
|
+
this.screenConfigNativeElement = false;
|
|
12536
12801
|
this.noModuleService = false;
|
|
12802
|
+
// feature toggle for devs so you can see the whole screen with all inputs etc by temporarily turning off the hiding effects of this directive on its host
|
|
12803
|
+
this._isTurnedOff = false;
|
|
12804
|
+
this._subs = [];
|
|
12805
|
+
this._subs.push(this._configService.configSet.subscribe(function (configObjects) {
|
|
12806
|
+
if (configObjects && configObjects.length > 0) {
|
|
12807
|
+
_this._updateHost();
|
|
12808
|
+
}
|
|
12809
|
+
}));
|
|
12810
|
+
if (this._moduleService && !this.noModuleService) {
|
|
12811
|
+
this._subs.push(this._moduleService.readonlyChange.subscribe(function (moduleInReadonlyState) {
|
|
12812
|
+
if (_this.hostComponent) {
|
|
12813
|
+
_this.hostComponent.readonly = _this.hostComponent.forceReadonly || moduleInReadonlyState;
|
|
12814
|
+
}
|
|
12815
|
+
}), this._moduleService.errorValidationReceived.subscribe(function (validationResult) {
|
|
12816
|
+
_this._setErrorRedBackgroundAfterScrCfgValidate(validationResult);
|
|
12817
|
+
}), this._moduleService.successfulUpdate.subscribe(function () {
|
|
12818
|
+
if (_this.hostComponent) {
|
|
12819
|
+
_this.hostComponent.redErrorBackground = false;
|
|
12820
|
+
}
|
|
12821
|
+
}));
|
|
12822
|
+
}
|
|
12537
12823
|
}
|
|
12538
12824
|
Object.defineProperty(ScreenConfigurationDirective.prototype, "screenConfigurationObject", {
|
|
12539
12825
|
get: function () {
|
|
12540
12826
|
return this._screenConfigurationObject;
|
|
12541
12827
|
},
|
|
12542
|
-
set: function (
|
|
12543
|
-
if (
|
|
12544
|
-
this._screenConfigurationObject =
|
|
12545
|
-
this._initWrapperComponent();
|
|
12828
|
+
set: function (value) {
|
|
12829
|
+
if (value) {
|
|
12830
|
+
this._screenConfigurationObject = value;
|
|
12546
12831
|
this._updateHost();
|
|
12547
12832
|
}
|
|
12548
12833
|
},
|
|
12549
12834
|
enumerable: false,
|
|
12550
12835
|
configurable: true
|
|
12551
12836
|
});
|
|
12837
|
+
ScreenConfigurationDirective.prototype.ngOnInit = function () {
|
|
12838
|
+
this._updateHost();
|
|
12839
|
+
// this._updateHeaderStateOnHostComponent(true);
|
|
12840
|
+
// show initial error message if any
|
|
12841
|
+
if (!this.noModuleService) {
|
|
12842
|
+
// this._setErrorRedBackgroundAfterScrCfgValidate(this._moduleService.lastError);
|
|
12843
|
+
}
|
|
12844
|
+
};
|
|
12552
12845
|
ScreenConfigurationDirective.prototype.ngOnDestroy = function () {
|
|
12846
|
+
this._subs.forEach(function (sub) { return sub.unsubscribe(); });
|
|
12847
|
+
if (this._isHeader) {
|
|
12848
|
+
// this._doubleClickHeaders.handleCollapseableDestroy(this.screenConfigurationObject);
|
|
12849
|
+
}
|
|
12850
|
+
this._element = undefined;
|
|
12553
12851
|
this.hostComponent = undefined;
|
|
12554
|
-
this._wrapperComponentInstance = undefined;
|
|
12555
12852
|
};
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
this.
|
|
12853
|
+
// Sets host component visibility, required, readonly etc. if specified in backend screen config OR module readonly status.
|
|
12854
|
+
ScreenConfigurationDirective.prototype._updateHost = function () {
|
|
12855
|
+
if (this._mayUpdateHost() || this.screenConfigNativeElement) {
|
|
12856
|
+
if (!this.screenConfigNativeElement) {
|
|
12857
|
+
this.hostComponent.objectConfigName = this.screenConfigurationObject;
|
|
12858
|
+
}
|
|
12859
|
+
var myCfgObj = this._configService.getObjectConfigurationFor(this.screenConfigurationObject);
|
|
12860
|
+
if (myCfgObj) {
|
|
12861
|
+
this._setHostVisible(myCfgObj.immediatelyVisible());
|
|
12862
|
+
// if (this.hostComponent instanceof GridColumnComponent) {
|
|
12863
|
+
// this.hostComponent.rights = myCfgObj.rights;
|
|
12864
|
+
// }
|
|
12865
|
+
if (!this.screenConfigNativeElement) {
|
|
12866
|
+
this.hostComponent.required = myCfgObj.isRequired();
|
|
12867
|
+
this.hostComponent.readonly = this.hostComponent.forceReadonly || this._moduleInReadonlyMode() || myCfgObj.isReadonly();
|
|
12868
|
+
this.hostComponent.decimals = myCfgObj.scale;
|
|
12869
|
+
this.hostComponent.maxLength = myCfgObj.maxLength;
|
|
12870
|
+
}
|
|
12871
|
+
}
|
|
12872
|
+
else {
|
|
12873
|
+
this._setHostVisible(false);
|
|
12874
|
+
if (!this.screenConfigNativeElement) {
|
|
12875
|
+
this.hostComponent.readonly = this._moduleInReadonlyMode();
|
|
12876
|
+
}
|
|
12877
|
+
}
|
|
12563
12878
|
}
|
|
12564
12879
|
};
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12880
|
+
/**
|
|
12881
|
+
* Spawn error message tooltip onto our host comp, if any error was meant for the host (found by screenConfigurationObject);
|
|
12882
|
+
* @param errorValidation A top-level full validation result, either from the backend or from some client-side validation error.
|
|
12883
|
+
*/
|
|
12884
|
+
ScreenConfigurationDirective.prototype._setErrorRedBackgroundAfterScrCfgValidate = function (errorValidation) {
|
|
12885
|
+
if (this.hostComponent && errorValidation) {
|
|
12886
|
+
var errorMessages = errorValidation.getAllErrorMessagesOfMyValidationFields();
|
|
12887
|
+
for (var i = 0, len = errorMessages.length; i < len; i++) {
|
|
12888
|
+
var errorMsg = errorMessages[i];
|
|
12889
|
+
var configName = this.dataName ? this.dataName : this.screenConfigurationObject;
|
|
12890
|
+
if (errorMsg.fieldId === configName && this._element /*&& this._properHost(errorMsg.boId)*/) {
|
|
12891
|
+
this.hostComponent.redErrorBackground = true;
|
|
12892
|
+
}
|
|
12893
|
+
}
|
|
12894
|
+
}
|
|
12895
|
+
};
|
|
12896
|
+
ScreenConfigurationDirective.prototype._moduleInReadonlyMode = function () {
|
|
12897
|
+
return !this.noModuleService ? (this._moduleService ? this._moduleService.readonly : false) : false;
|
|
12898
|
+
};
|
|
12899
|
+
ScreenConfigurationDirective.prototype._mayUpdateHost = function () {
|
|
12900
|
+
return !!this.hostComponent && !this._isTurnedOff && !!this.screenConfigurationObject;
|
|
12901
|
+
};
|
|
12902
|
+
ScreenConfigurationDirective.prototype._setHostVisible = function (visible) {
|
|
12903
|
+
if (!this.screenConfigNativeElement) {
|
|
12904
|
+
this.hostComponent.hidden = !visible;
|
|
12905
|
+
}
|
|
12906
|
+
else {
|
|
12907
|
+
if (this._element && this._element.nativeElement) {
|
|
12908
|
+
if (!visible) {
|
|
12909
|
+
this._renderer.addClass(this._element.nativeElement, 'hidden');
|
|
12910
|
+
}
|
|
12911
|
+
else {
|
|
12912
|
+
this._renderer.removeClass(this._element.nativeElement, 'hidden');
|
|
12913
|
+
}
|
|
12574
12914
|
}
|
|
12575
12915
|
}
|
|
12576
12916
|
};
|
|
@@ -12578,18 +12918,25 @@
|
|
|
12578
12918
|
}());
|
|
12579
12919
|
ScreenConfigurationDirective.decorators = [
|
|
12580
12920
|
{ type: i0.Directive, args: [{
|
|
12581
|
-
selector:
|
|
12921
|
+
selector: '[screenConfigurationObject]'
|
|
12582
12922
|
},] }
|
|
12583
12923
|
];
|
|
12584
12924
|
ScreenConfigurationDirective.ctorParameters = function () { return [
|
|
12585
12925
|
{ type: undefined, decorators: [{ type: i0.Inject, args: [SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,] }] },
|
|
12586
|
-
{ type: i0.
|
|
12587
|
-
{ type:
|
|
12926
|
+
{ type: i0.ElementRef },
|
|
12927
|
+
{ type: BaseModuleScreenConfigService },
|
|
12928
|
+
{ type: i0.Renderer2 },
|
|
12929
|
+
{ type: BaseModuleService }
|
|
12588
12930
|
]; };
|
|
12589
12931
|
ScreenConfigurationDirective.propDecorators = {
|
|
12590
|
-
screenConfigurationObject: [{ type: i0.Input }],
|
|
12932
|
+
screenConfigurationObject: [{ type: i0.Input, args: ['screenConfigurationObject',] }],
|
|
12933
|
+
dataName: [{ type: i0.Input }],
|
|
12934
|
+
screenConfigNativeElement: [{ type: i0.Input }],
|
|
12591
12935
|
noModuleService: [{ type: i0.Input }]
|
|
12592
12936
|
};
|
|
12937
|
+
__decorate([
|
|
12938
|
+
InputBoolean()
|
|
12939
|
+
], ScreenConfigurationDirective.prototype, "screenConfigNativeElement", void 0);
|
|
12593
12940
|
__decorate([
|
|
12594
12941
|
InputBoolean()
|
|
12595
12942
|
], ScreenConfigurationDirective.prototype, "noModuleService", void 0);
|
|
@@ -12605,8 +12952,7 @@
|
|
|
12605
12952
|
common.CommonModule
|
|
12606
12953
|
],
|
|
12607
12954
|
declarations: [
|
|
12608
|
-
ScreenConfigurationDirective
|
|
12609
|
-
ScreenConfigComponentWrapper
|
|
12955
|
+
ScreenConfigurationDirective
|
|
12610
12956
|
],
|
|
12611
12957
|
exports: [
|
|
12612
12958
|
ScreenConfigurationDirective,
|
|
@@ -12672,6 +13018,8 @@
|
|
|
12672
13018
|
exports.ArticleTileModule = ArticleTileModule;
|
|
12673
13019
|
exports.BaseInputComponent = BaseInputComponent;
|
|
12674
13020
|
exports.BaseInputDatePickerDirective = BaseInputDatePickerDirective;
|
|
13021
|
+
exports.BaseModuleScreenConfigService = BaseModuleScreenConfigService;
|
|
13022
|
+
exports.BaseModuleService = BaseModuleService;
|
|
12675
13023
|
exports.ButtonComponent = ButtonComponent;
|
|
12676
13024
|
exports.ButtonModule = ButtonModule;
|
|
12677
13025
|
exports.CalendarComponent = CalendarComponent;
|
|
@@ -12757,6 +13105,7 @@
|
|
|
12757
13105
|
exports.ResponsiveTextComponent = ResponsiveTextComponent;
|
|
12758
13106
|
exports.ResponsiveTextModule = ResponsiveTextModule;
|
|
12759
13107
|
exports.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME = SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME;
|
|
13108
|
+
exports.ScreenConfigurationDirective = ScreenConfigurationDirective;
|
|
12760
13109
|
exports.ScreenConfigurationModule = ScreenConfigurationModule;
|
|
12761
13110
|
exports.SimpleGridColumnDirective = SimpleGridColumnDirective;
|
|
12762
13111
|
exports.SimpleGridComponent = SimpleGridComponent;
|
|
@@ -12787,8 +13136,6 @@
|
|
|
12787
13136
|
exports["ɵbh"] = TooltipComponent;
|
|
12788
13137
|
exports["ɵbi"] = TooltipDirective;
|
|
12789
13138
|
exports["ɵbj"] = CheckmarkOverlayComponent;
|
|
12790
|
-
exports["ɵbk"] = ScreenConfigurationDirective;
|
|
12791
|
-
exports["ɵbl"] = ScreenConfigComponentWrapper;
|
|
12792
13139
|
exports["ɵc"] = MD_RIPPLE_GLOBAL_OPTIONS;
|
|
12793
13140
|
exports["ɵd"] = CoRippleDirective;
|
|
12794
13141
|
exports["ɵe"] = CoViewportRulerService;
|