@colijnit/corecomponents_v12 12.2.4 → 12.2.6
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 +501 -134
- 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/base/base-input.component.js +52 -43
- 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 +453 -125
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base/base-input.component.d.ts +5 -3
- 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
|
import { __awaiter, __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Input, Injectable, NgZone, Component, ViewEncapsulation, HostBinding, ComponentFactoryResolver, ApplicationRef, Injector, EventEmitter, Renderer2, ViewChildren, ElementRef, Output, Directive, ChangeDetectorRef, Optional, ViewChild, ViewContainerRef, HostListener, NgModule, SkipSelf, InjectionToken, Inject, ChangeDetectionStrategy, Pipe, ContentChildren,
|
|
3
|
+
import { Input, Injectable, NgZone, Component, ViewEncapsulation, HostBinding, ComponentFactoryResolver, ApplicationRef, Injector, EventEmitter, Renderer2, ViewChildren, ElementRef, Output, Directive, ChangeDetectorRef, Optional, ViewChild, ViewContainerRef, HostListener, NgModule, SkipSelf, InjectionToken, Inject, forwardRef, ChangeDetectionStrategy, Pipe, ContentChildren, NO_ERRORS_SCHEMA, ContentChild } from '@angular/core';
|
|
4
4
|
import { NgModel, FormGroup, FormsModule } from '@angular/forms';
|
|
5
|
-
import { Subject, merge, fromEvent } from 'rxjs';
|
|
5
|
+
import { Subject, merge, fromEvent, BehaviorSubject } from 'rxjs';
|
|
6
6
|
import { DomSanitizer, HammerGestureConfig, HammerModule, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
|
|
7
7
|
import { trigger, state, style, transition, animate, query, animateChild } from '@angular/animations';
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
@@ -16,6 +16,9 @@ import { OverlayConfig, Overlay } from '@angular/cdk/overlay';
|
|
|
16
16
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
17
17
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
18
18
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
19
|
+
import { ArrayUtils as ArrayUtils$1 } from '@colijnit/ioneconnector/build/utils/array-utils';
|
|
20
|
+
import { DEFAULT_GET_OBJECT_CONFIGURATION_PARAMS } from '@colijnit/ioneconnector/build/model/default-get-object-configurations-params';
|
|
21
|
+
import { ObjectConfiguration } from '@colijnit/ioneconnector/build/model/object-configuration';
|
|
19
22
|
|
|
20
23
|
// @returns true iff given value equals null or equals undefined
|
|
21
24
|
function isNill(value) {
|
|
@@ -1857,6 +1860,7 @@ class BaseInputComponent {
|
|
|
1857
1860
|
this.forceRequired = false; // a force outside of [cfgName]'s influence
|
|
1858
1861
|
// Goal: ability to emulate the red background of input fields (form-submitted invalid state)
|
|
1859
1862
|
this.redErrorBackground = false;
|
|
1863
|
+
this.commitOnBlur = true;
|
|
1860
1864
|
// @Output()
|
|
1861
1865
|
// public commit: EventEmitter<any> = new EventEmitter<any>();
|
|
1862
1866
|
this.nativeBlur = new EventEmitter();
|
|
@@ -1884,6 +1888,7 @@ class BaseInputComponent {
|
|
|
1884
1888
|
this._markedAsUserTouched = false;
|
|
1885
1889
|
this._destroyed = false;
|
|
1886
1890
|
this._hasOnPushCdStrategy = false;
|
|
1891
|
+
this._modelDirtyForCommit = false;
|
|
1887
1892
|
this._initialModelSet = false;
|
|
1888
1893
|
this._forceReadonly = undefined;
|
|
1889
1894
|
this._validators = [];
|
|
@@ -1916,6 +1921,7 @@ class BaseInputComponent {
|
|
|
1916
1921
|
}
|
|
1917
1922
|
this._model = value;
|
|
1918
1923
|
this.canSaveOrCancel = this._model !== this._initialModel;
|
|
1924
|
+
this._modelDirtyForCommit = this._model !== this._initialModel;
|
|
1919
1925
|
this._clearErrorComponent();
|
|
1920
1926
|
this.modelSet();
|
|
1921
1927
|
}
|
|
@@ -2107,7 +2113,7 @@ class BaseInputComponent {
|
|
|
2107
2113
|
committing: false,
|
|
2108
2114
|
commitFinished: false
|
|
2109
2115
|
}, {
|
|
2110
|
-
commitClick: (event) => this.
|
|
2116
|
+
commitClick: (event) => this._handleCommit(event),
|
|
2111
2117
|
cancelClick: (event) => this.cancelClick(event)
|
|
2112
2118
|
});
|
|
2113
2119
|
}
|
|
@@ -2170,22 +2176,6 @@ class BaseInputComponent {
|
|
|
2170
2176
|
this.changeDetector = undefined;
|
|
2171
2177
|
this.input = undefined;
|
|
2172
2178
|
}
|
|
2173
|
-
commitClick(event) {
|
|
2174
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
2175
|
-
this.keepFocus = true;
|
|
2176
|
-
if (this._commitButtonsComponentRef) {
|
|
2177
|
-
this._commitButtonsComponentRef.instance.commitFinished = false;
|
|
2178
|
-
this._commitButtonsComponentRef.instance.committing = true;
|
|
2179
|
-
}
|
|
2180
|
-
const success = yield this.commit(this.model);
|
|
2181
|
-
this.keepFocus = false;
|
|
2182
|
-
yield this._commitFinished();
|
|
2183
|
-
if (success) {
|
|
2184
|
-
this.doBlur(event);
|
|
2185
|
-
}
|
|
2186
|
-
return success;
|
|
2187
|
-
});
|
|
2188
|
-
}
|
|
2189
2179
|
cancelClick(event) {
|
|
2190
2180
|
this.keepFocus = true;
|
|
2191
2181
|
if (this._initialModelSet) {
|
|
@@ -2239,23 +2229,28 @@ class BaseInputComponent {
|
|
|
2239
2229
|
}
|
|
2240
2230
|
this.focus.next();
|
|
2241
2231
|
}
|
|
2242
|
-
doBlur(event) {
|
|
2243
|
-
|
|
2244
|
-
if (this.
|
|
2245
|
-
|
|
2246
|
-
event.preventDefault;
|
|
2247
|
-
}
|
|
2248
|
-
return false;
|
|
2249
|
-
}
|
|
2250
|
-
this.focused = false;
|
|
2251
|
-
if (this._hasOnPushCdStrategy) {
|
|
2252
|
-
this.markForCheck();
|
|
2253
|
-
}
|
|
2254
|
-
if (this.input) {
|
|
2255
|
-
this.input.blur();
|
|
2232
|
+
doBlur(event, handleCommit = true) {
|
|
2233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2234
|
+
if (this.showSaveCancel && handleCommit) {
|
|
2235
|
+
yield this._handleCommit(event, false);
|
|
2256
2236
|
}
|
|
2257
|
-
|
|
2258
|
-
|
|
2237
|
+
setTimeout(() => {
|
|
2238
|
+
if (this.keepFocus || this.keepFocussed) {
|
|
2239
|
+
if (event) {
|
|
2240
|
+
event.preventDefault;
|
|
2241
|
+
}
|
|
2242
|
+
return false;
|
|
2243
|
+
}
|
|
2244
|
+
this.focused = false;
|
|
2245
|
+
if (this._hasOnPushCdStrategy) {
|
|
2246
|
+
this.markForCheck();
|
|
2247
|
+
}
|
|
2248
|
+
if (this.input) {
|
|
2249
|
+
this.input.blur();
|
|
2250
|
+
}
|
|
2251
|
+
this.blur.next();
|
|
2252
|
+
}, 200);
|
|
2253
|
+
});
|
|
2259
2254
|
}
|
|
2260
2255
|
detectChanges() {
|
|
2261
2256
|
if (!this._destroyed) {
|
|
@@ -2366,6 +2361,26 @@ class BaseInputComponent {
|
|
|
2366
2361
|
this.control.updateValueAndValidity();
|
|
2367
2362
|
}
|
|
2368
2363
|
}
|
|
2364
|
+
_handleCommit(event, doBlur = true) {
|
|
2365
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2366
|
+
if (!this.showSaveCancel || (!this._modelDirtyForCommit)) {
|
|
2367
|
+
return true;
|
|
2368
|
+
}
|
|
2369
|
+
this.keepFocus = true;
|
|
2370
|
+
if (this._commitButtonsComponentRef) {
|
|
2371
|
+
this._commitButtonsComponentRef.instance.commitFinished = false;
|
|
2372
|
+
this._commitButtonsComponentRef.instance.committing = true;
|
|
2373
|
+
}
|
|
2374
|
+
const success = yield this.commit(this.model);
|
|
2375
|
+
this.keepFocus = false;
|
|
2376
|
+
yield this._commitFinished();
|
|
2377
|
+
this._modelDirtyForCommit = false;
|
|
2378
|
+
if (success && doBlur) {
|
|
2379
|
+
this.doBlur(event, false);
|
|
2380
|
+
}
|
|
2381
|
+
return success;
|
|
2382
|
+
});
|
|
2383
|
+
}
|
|
2369
2384
|
_commitFinished() {
|
|
2370
2385
|
return new Promise((resolve) => {
|
|
2371
2386
|
if (this._commitButtonsComponentRef) {
|
|
@@ -2377,17 +2392,13 @@ class BaseInputComponent {
|
|
|
2377
2392
|
resolve();
|
|
2378
2393
|
}, 800);
|
|
2379
2394
|
}
|
|
2395
|
+
else {
|
|
2396
|
+
resolve();
|
|
2397
|
+
}
|
|
2380
2398
|
});
|
|
2381
2399
|
}
|
|
2382
2400
|
_clearErrorComponent() {
|
|
2383
2401
|
this.overlayService.removeComponent(this._validationComponentRef);
|
|
2384
|
-
// if (this.validationErrorContainer) {
|
|
2385
|
-
// this.validationErrorContainer.clear();
|
|
2386
|
-
// if (this._errorValidationComponent) {
|
|
2387
|
-
// this._errorValidationComponent.destroy();
|
|
2388
|
-
// this._errorValidationComponent = undefined;
|
|
2389
|
-
// }
|
|
2390
|
-
// }
|
|
2391
2402
|
}
|
|
2392
2403
|
// whether this.ngModel.control has safe access
|
|
2393
2404
|
_controlExists() {
|
|
@@ -2484,14 +2495,14 @@ class BaseInputComponent {
|
|
|
2484
2495
|
case 'NumpadEnter':
|
|
2485
2496
|
if (!event.shiftKey) {
|
|
2486
2497
|
event.preventDefault();
|
|
2487
|
-
yield this.
|
|
2498
|
+
yield this._handleCommit();
|
|
2488
2499
|
return false;
|
|
2489
2500
|
}
|
|
2490
2501
|
return true;
|
|
2491
2502
|
case 'Tab':
|
|
2492
2503
|
const nextSiblingToFocus = event.shiftKey ? event.currentTarget.previousSibling : event.currentTarget.nextSibling;
|
|
2493
2504
|
event.preventDefault();
|
|
2494
|
-
const success = yield this.
|
|
2505
|
+
const success = yield this._handleCommit();
|
|
2495
2506
|
if (success) {
|
|
2496
2507
|
if (nextSiblingToFocus) {
|
|
2497
2508
|
try {
|
|
@@ -2577,6 +2588,7 @@ BaseInputComponent.propDecorators = {
|
|
|
2577
2588
|
customCssClass: [{ type: Input }],
|
|
2578
2589
|
redErrorBackground: [{ type: Input }, { type: HostBinding, args: ["class.cc-red-error-background",] }],
|
|
2579
2590
|
myFormInputInstance: [{ type: Input }],
|
|
2591
|
+
commitOnBlur: [{ type: Input }],
|
|
2580
2592
|
nativeBlur: [{ type: Output }],
|
|
2581
2593
|
blur: [{ type: Output }],
|
|
2582
2594
|
enter: [{ type: Output }],
|
|
@@ -3259,6 +3271,9 @@ EventUtils._passiveSupported = undefined;
|
|
|
3259
3271
|
EventUtils._passiveCapture = undefined;
|
|
3260
3272
|
EventUtils._passiveBubble = undefined;
|
|
3261
3273
|
|
|
3274
|
+
// Enables "DI for interfaces" (see ConfigNameDirective injected .hostComponent).
|
|
3275
|
+
const SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME = new InjectionToken("ScreenConfigAdapterComponent");
|
|
3276
|
+
|
|
3262
3277
|
class ButtonComponent {
|
|
3263
3278
|
constructor(_elementRef) {
|
|
3264
3279
|
this._elementRef = _elementRef;
|
|
@@ -3275,7 +3290,7 @@ class ButtonComponent {
|
|
|
3275
3290
|
return !!this.iconData;
|
|
3276
3291
|
}
|
|
3277
3292
|
onHostClick(event) {
|
|
3278
|
-
if (this.disabled) {
|
|
3293
|
+
if (this.readonly || this.disabled) {
|
|
3279
3294
|
this.clickedWhileDisabled.emit(event);
|
|
3280
3295
|
EventUtils.KillEvent(event);
|
|
3281
3296
|
}
|
|
@@ -3296,16 +3311,21 @@ class ButtonComponent {
|
|
|
3296
3311
|
}
|
|
3297
3312
|
ButtonComponent.decorators = [
|
|
3298
3313
|
{ type: Component, args: [{
|
|
3299
|
-
selector:
|
|
3314
|
+
selector: 'co-button',
|
|
3300
3315
|
template: `
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3316
|
+
<co-icon *ngIf="!!iconData" [iconData]="iconData"></co-icon>
|
|
3317
|
+
<span *ngIf="!!label" class="label">{{ label }}</span>
|
|
3318
|
+
<co-icon *ngIf="!!iconDataRight" [iconData]="iconDataRight"></co-icon>
|
|
3319
|
+
<div class="rippler" md-ripple [mdRippleDisabled]="disabled"></div>
|
|
3320
|
+
`,
|
|
3306
3321
|
host: {
|
|
3307
|
-
tabindex:
|
|
3322
|
+
tabindex: '0'
|
|
3308
3323
|
},
|
|
3324
|
+
providers: [{
|
|
3325
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
3326
|
+
useExisting: forwardRef(() => ButtonComponent)
|
|
3327
|
+
}
|
|
3328
|
+
],
|
|
3309
3329
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3310
3330
|
encapsulation: ViewEncapsulation.None
|
|
3311
3331
|
},] }
|
|
@@ -3314,19 +3334,20 @@ ButtonComponent.ctorParameters = () => [
|
|
|
3314
3334
|
{ type: ElementRef }
|
|
3315
3335
|
];
|
|
3316
3336
|
ButtonComponent.propDecorators = {
|
|
3317
|
-
label: [{ type: HostBinding, args: [
|
|
3318
|
-
iconData: [{ type: HostBinding, args: [
|
|
3319
|
-
iconDataRight: [{ type: HostBinding, args: [
|
|
3337
|
+
label: [{ type: HostBinding, args: ['class.has-label',] }, { type: Input }],
|
|
3338
|
+
iconData: [{ type: HostBinding, args: ['class.has-left-icon',] }, { type: Input }],
|
|
3339
|
+
iconDataRight: [{ type: HostBinding, args: ['class.has-right-icon',] }, { type: Input }],
|
|
3320
3340
|
isToggleButton: [{ type: Input }],
|
|
3321
|
-
isToggled: [{ type: Input }, { type: HostBinding, args: [
|
|
3322
|
-
hidden: [{ type: Input }, { type: HostBinding, args: [
|
|
3323
|
-
disabled: [{ type: Input }, { type: HostBinding, args: [
|
|
3324
|
-
showClass: [{ type: HostBinding, args: [
|
|
3341
|
+
isToggled: [{ type: Input }, { type: HostBinding, args: ['class.toggled',] }],
|
|
3342
|
+
hidden: [{ type: Input }, { type: HostBinding, args: ['class.co-hidden',] }],
|
|
3343
|
+
disabled: [{ type: Input }, { type: HostBinding, args: ['class.disabled',] }],
|
|
3344
|
+
showClass: [{ type: HostBinding, args: ['class.co-button',] }],
|
|
3325
3345
|
onClick: [{ type: Output }],
|
|
3326
3346
|
clickedWhileDisabled: [{ type: Output }],
|
|
3327
3347
|
isToggledChange: [{ type: Output }],
|
|
3328
|
-
hasIcon: [{ type: HostBinding, args: [
|
|
3329
|
-
onHostClick: [{ type: HostListener, args: [
|
|
3348
|
+
hasIcon: [{ type: HostBinding, args: ['class.has-icon',] }],
|
|
3349
|
+
onHostClick: [{ type: HostListener, args: ['click', ['$event'],] }],
|
|
3350
|
+
readonly: [{ type: HostBinding, args: ["class.read-only",] }]
|
|
3330
3351
|
};
|
|
3331
3352
|
|
|
3332
3353
|
class ButtonModule {
|
|
@@ -5195,9 +5216,6 @@ BaseModule.decorators = [
|
|
|
5195
5216
|
},] }
|
|
5196
5217
|
];
|
|
5197
5218
|
|
|
5198
|
-
// Enables "DI for interfaces" (see ConfigNameDirective injected .hostComponent).
|
|
5199
|
-
const SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME = new InjectionToken("ScreenConfigAdapterComponent");
|
|
5200
|
-
|
|
5201
5219
|
class InputCheckboxComponent extends BaseInputComponent {
|
|
5202
5220
|
constructor(formComponent, iconCacheService, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
|
|
5203
5221
|
super(changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef);
|
|
@@ -5403,6 +5421,8 @@ InputDatePickerComponent.decorators = [
|
|
|
5403
5421
|
selector: 'co-input-date',
|
|
5404
5422
|
template: `
|
|
5405
5423
|
<co-input-text (clickOutside)="toggleCalendar(false)" overlayParent #parentForOverlay="overlayParent"
|
|
5424
|
+
[hidden]="hidden"
|
|
5425
|
+
[readonly]="readonly"
|
|
5406
5426
|
[(model)]="modelAsString"
|
|
5407
5427
|
[rightIcon]="rightIcon"
|
|
5408
5428
|
[leftIcon]="leftIcon"
|
|
@@ -10616,8 +10636,11 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
10616
10636
|
if (this._lovPopupComponentRef) {
|
|
10617
10637
|
this._lovPopupComponentRef.instance.searchTerm = model;
|
|
10618
10638
|
}
|
|
10619
|
-
|
|
10620
|
-
this.
|
|
10639
|
+
else {
|
|
10640
|
+
if (!this.selectedModel && model) {
|
|
10641
|
+
this.openPopup();
|
|
10642
|
+
this._lovPopupComponentRef.instance.searchTerm = model;
|
|
10643
|
+
}
|
|
10621
10644
|
}
|
|
10622
10645
|
this.selectedModel = model;
|
|
10623
10646
|
}
|
|
@@ -10736,7 +10759,7 @@ class ListOfValuesComponent extends BaseInputComponent {
|
|
|
10736
10759
|
this.selectedModel = this.model[this.displayField];
|
|
10737
10760
|
}
|
|
10738
10761
|
else {
|
|
10739
|
-
this.selectedModel =
|
|
10762
|
+
this.selectedModel = '';
|
|
10740
10763
|
}
|
|
10741
10764
|
}
|
|
10742
10765
|
}
|
|
@@ -10779,7 +10802,11 @@ ListOfValuesComponent.decorators = [
|
|
|
10779
10802
|
</co-input-text>
|
|
10780
10803
|
`,
|
|
10781
10804
|
providers: [
|
|
10782
|
-
OverlayService
|
|
10805
|
+
OverlayService,
|
|
10806
|
+
{
|
|
10807
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
10808
|
+
useExisting: forwardRef(() => ListOfValuesComponent)
|
|
10809
|
+
}
|
|
10783
10810
|
],
|
|
10784
10811
|
encapsulation: ViewEncapsulation.None
|
|
10785
10812
|
},] }
|
|
@@ -11323,6 +11350,8 @@ class FilterItemComponent {
|
|
|
11323
11350
|
this.sliderMax = !!this.sliderMax ? this.sliderMax : this.sliderDefaultMax;
|
|
11324
11351
|
let trueLowerBound = Math.min(this.sliderMin, this.sliderMax);
|
|
11325
11352
|
let trueUpperBound = Math.max(this.sliderMin, this.sliderMax);
|
|
11353
|
+
this.sliderMin = trueLowerBound;
|
|
11354
|
+
this.sliderMax = trueUpperBound;
|
|
11326
11355
|
this._model = `${trueLowerBound} - ${trueUpperBound}`;
|
|
11327
11356
|
}
|
|
11328
11357
|
_createModelForCheckboxToText() {
|
|
@@ -11564,7 +11593,7 @@ FilterItemComponent.decorators = [
|
|
|
11564
11593
|
[excludePlusMinus]="true"
|
|
11565
11594
|
[label]="'FROM' | localize"
|
|
11566
11595
|
[(model)]="sliderMin"
|
|
11567
|
-
(
|
|
11596
|
+
(focusout)="handleModelChange(sliderMin)"
|
|
11568
11597
|
></co-input-text>
|
|
11569
11598
|
<co-input-text
|
|
11570
11599
|
class="slider-to"
|
|
@@ -11574,19 +11603,22 @@ FilterItemComponent.decorators = [
|
|
|
11574
11603
|
[excludePlusMinus]="true"
|
|
11575
11604
|
[label]="'TO' | localize"
|
|
11576
11605
|
[(model)]="sliderMax"
|
|
11577
|
-
(
|
|
11606
|
+
(focusout)="handleModelChange(sliderMax)"
|
|
11578
11607
|
></co-input-text>
|
|
11579
11608
|
</div>
|
|
11580
11609
|
<div class="co-filter-item-checkbox-content" *ngIf="mode === modes.Checkbox ">
|
|
11581
11610
|
<co-input-checkbox
|
|
11582
11611
|
[(model)]="model"
|
|
11583
|
-
(modelChange)="handleModelChange($event)"
|
|
11612
|
+
(modelChange)="handleModelChange($event)"
|
|
11613
|
+
[label]="placeholder">
|
|
11614
|
+
</co-input-checkbox>
|
|
11584
11615
|
</div>
|
|
11585
11616
|
<div class="co-filter-item-checkbox-content"
|
|
11586
11617
|
*ngIf="mode === modes.CheckboxToText || mode === modes.CheckboxToSimpleText || mode === modes.CheckboxToBinary">
|
|
11587
11618
|
<co-input-checkbox
|
|
11588
11619
|
[(model)]="checkBoxToTextModel"
|
|
11589
|
-
(modelChange)="handleModelChange($event)"
|
|
11620
|
+
(modelChange)="handleModelChange($event)"
|
|
11621
|
+
[label]="placeholder"></co-input-checkbox>
|
|
11590
11622
|
</div>
|
|
11591
11623
|
<div class="co-filter-item-textfield-content" *ngIf="mode === modes.TextField">
|
|
11592
11624
|
<co-input-text
|
|
@@ -11985,94 +12017,391 @@ CheckmarkOverlayModule.decorators = [
|
|
|
11985
12017
|
},] }
|
|
11986
12018
|
];
|
|
11987
12019
|
|
|
11988
|
-
class
|
|
11989
|
-
constructor(
|
|
11990
|
-
|
|
11991
|
-
this.
|
|
12020
|
+
class BaseModuleScreenConfigService {
|
|
12021
|
+
constructor() {
|
|
12022
|
+
// emits the params of the loaded config, each time when a new config was loaded
|
|
12023
|
+
this.configSet = new BehaviorSubject([]);
|
|
12024
|
+
this._configObjects = [];
|
|
12025
|
+
// key: configName, value: the ObjectConfiguration with that configName. For faster ObjectConfiguration lookups, given a configName string (vs. array).
|
|
12026
|
+
this._objectConfigsMap = new Map();
|
|
11992
12027
|
}
|
|
11993
|
-
|
|
11994
|
-
this.
|
|
11995
|
-
this._visibleOnViewInit = visibleOnViewInit;
|
|
12028
|
+
get configObjects() {
|
|
12029
|
+
return this._configObjects;
|
|
11996
12030
|
}
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12031
|
+
// POST: this.configObjects are loaded. Returns the loaded config objects.
|
|
12032
|
+
loadConfig(params = DEFAULT_GET_OBJECT_CONFIGURATION_PARAMS, insertRights) {
|
|
12033
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12034
|
+
const configObjects = yield this.loadConfigForModule(params, insertRights);
|
|
12035
|
+
this._configObjects = configObjects;
|
|
12036
|
+
if (configObjects && Array.isArray(configObjects)) {
|
|
12037
|
+
this._buildScreenConfigMap();
|
|
12038
|
+
this.configSet.next(params);
|
|
12039
|
+
}
|
|
12040
|
+
return this._configObjects;
|
|
12041
|
+
});
|
|
12042
|
+
}
|
|
12043
|
+
lazyLoadConfig() {
|
|
12044
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12045
|
+
if (!this.configObjects.length) {
|
|
12046
|
+
yield this.loadConfig();
|
|
12047
|
+
}
|
|
12048
|
+
});
|
|
12049
|
+
}
|
|
12050
|
+
isActiveFieldValidationObject(configObject) {
|
|
12051
|
+
if (configObject) {
|
|
12052
|
+
return configObject.isActiveFieldValidationObject() && !this.isDataNameHiddenByAnyOfItsParentRubrics(configObject.dataName);
|
|
12053
|
+
}
|
|
12054
|
+
}
|
|
12055
|
+
isBoValid(bo) {
|
|
12056
|
+
if (this.controlValidityByBoMap && !ArrayUtils$1.IsEmptyArray(this.controlValidityByBoMap)) {
|
|
12057
|
+
const mapEntry = this.controlValidityByBoMap.find(value => value.bo === bo && value.valid === false);
|
|
12058
|
+
if (mapEntry) {
|
|
12059
|
+
return mapEntry.valid;
|
|
12060
|
+
}
|
|
12061
|
+
}
|
|
12062
|
+
return true;
|
|
12063
|
+
}
|
|
12064
|
+
getObjectConfigurationFor(configName) {
|
|
12065
|
+
const configuration = this._objectConfigsMap.get(configName);
|
|
12066
|
+
// If configuration not found by configname, try by data name
|
|
12067
|
+
if (!!this._objectConfigsMap.size && !configuration && configName) {
|
|
12068
|
+
const configNameByDataName = this._getConfigNameByDataName(configName);
|
|
12069
|
+
if (this._objectConfigsMap.get(configNameByDataName)) {
|
|
12070
|
+
return this._objectConfigsMap.get(configNameByDataName);
|
|
12071
|
+
} /*else if (!environment.production) {
|
|
12072
|
+
console.warn("No configuration object was found by the name of: ", configName, " or dataname ", configNameByDataName);
|
|
12073
|
+
}*/
|
|
12074
|
+
}
|
|
12075
|
+
return configuration;
|
|
12076
|
+
}
|
|
12077
|
+
setObjectConfigurationFor(configName, configObject) {
|
|
12078
|
+
this._objectConfigsMap.set(configName, configObject);
|
|
12079
|
+
}
|
|
12080
|
+
// Whether the user may read the component that's associated with given config object (visibility).
|
|
12081
|
+
mayRead(configName) {
|
|
12082
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12083
|
+
return objectConfig ? objectConfig.mayRead() : false;
|
|
12084
|
+
}
|
|
12085
|
+
isReadonly(configName) {
|
|
12086
|
+
return !this.mayWrite(configName);
|
|
12087
|
+
}
|
|
12088
|
+
// Whether the user may write onto the component that's associated with given config object.
|
|
12089
|
+
mayWrite(configName) {
|
|
12090
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12091
|
+
return objectConfig ? objectConfig.mayWrite() : false;
|
|
12092
|
+
}
|
|
12093
|
+
// Whether the component associated with given config object should, from the start, be visible to the user.
|
|
12094
|
+
immediatelyVisible(configName) {
|
|
12095
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12096
|
+
return objectConfig ? objectConfig.immediatelyVisible() : false;
|
|
12097
|
+
}
|
|
12098
|
+
// Whether the component associated with given config object should, from the start, be visible to the user.
|
|
12099
|
+
immediatelyHidden(configName) {
|
|
12100
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12101
|
+
return objectConfig ? objectConfig.immediatelyHidden() : false;
|
|
12102
|
+
}
|
|
12103
|
+
noRights(configName) {
|
|
12104
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12105
|
+
return objectConfig ? objectConfig.noRights() : false;
|
|
12106
|
+
}
|
|
12107
|
+
isHidden(configName) {
|
|
12108
|
+
return !this.immediatelyVisible(configName);
|
|
12109
|
+
}
|
|
12110
|
+
isRequired(configName) {
|
|
12111
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12112
|
+
return objectConfig ? !objectConfig.nullable : false;
|
|
12113
|
+
}
|
|
12114
|
+
getDefaultValue(configName) {
|
|
12115
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12116
|
+
return objectConfig ? objectConfig.getDefaultValue() : undefined;
|
|
12117
|
+
}
|
|
12118
|
+
getDefaultStringValue(configName) {
|
|
12119
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12120
|
+
return objectConfig ? objectConfig.getDefaultStringValue() : undefined;
|
|
12121
|
+
}
|
|
12122
|
+
getDefaultNumberValue(configName) {
|
|
12123
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12124
|
+
return objectConfig ? objectConfig.getDefaultNumberValue() : undefined;
|
|
12125
|
+
}
|
|
12126
|
+
getMaxLength(configName) {
|
|
12127
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12128
|
+
return objectConfig ? objectConfig.maxLength : undefined;
|
|
12129
|
+
}
|
|
12130
|
+
getDecimals(configName) {
|
|
12131
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12132
|
+
return objectConfig ? objectConfig.scale : undefined;
|
|
12133
|
+
}
|
|
12134
|
+
hasConfigObjects() {
|
|
12135
|
+
return this._configObjects && this._configObjects.length > 0 && this._objectConfigsMap.size > 0;
|
|
12136
|
+
}
|
|
12137
|
+
isKind(configName, kind) {
|
|
12138
|
+
const objectConfig = this._objectConfigsMap.get(configName);
|
|
12139
|
+
return objectConfig ? objectConfig.isKind(kind) : false;
|
|
12140
|
+
}
|
|
12141
|
+
isDataNameHiddenByItselfOrAnyOfItsParentRubrics(dataName) {
|
|
12142
|
+
const isHiddenItself = ArrayUtils$1.ContainsAnElementFoundBy(this._configObjects, ((item) => {
|
|
12143
|
+
return item.dataName === dataName && item.isHidden();
|
|
12144
|
+
}));
|
|
12145
|
+
if (isHiddenItself) {
|
|
12146
|
+
return true;
|
|
12147
|
+
}
|
|
12148
|
+
else {
|
|
12149
|
+
return this.isDataNameHiddenByAnyOfItsParentRubrics(dataName);
|
|
12150
|
+
}
|
|
12151
|
+
}
|
|
12152
|
+
isDataNameHiddenByAnyOfItsParentRubrics(dataName) {
|
|
12153
|
+
// if (this._hardCodedConfigStructure) {
|
|
12154
|
+
// const parentConfigNames: string[] = this._hardCodedConfigStructure.getParentConfigNamesOfFieldConfigName(this._getConfigNameByDataName(dataName));
|
|
12155
|
+
// if (parentConfigNames) {
|
|
12156
|
+
// for (let i: number = 0, len: number = parentConfigNames.length; i < len; i++) {
|
|
12157
|
+
// const parentConfigObj: ObjectConfiguration = this.getObjectConfigurationFor(parentConfigNames[i]);
|
|
12158
|
+
// if (parentConfigObj && parentConfigObj.isHidden()) {
|
|
12159
|
+
// return true;
|
|
12160
|
+
// }
|
|
12161
|
+
// }
|
|
12162
|
+
// }
|
|
12163
|
+
// return false;
|
|
12164
|
+
// }
|
|
12165
|
+
return false;
|
|
12166
|
+
}
|
|
12167
|
+
// return the first found config name for given data name
|
|
12168
|
+
_getConfigNameByDataName(dataName) {
|
|
12169
|
+
const itsConfigObject = this._getConfigObjectByDataName(dataName);
|
|
12170
|
+
if (itsConfigObject) {
|
|
12171
|
+
return itsConfigObject.configName;
|
|
12172
|
+
}
|
|
12173
|
+
}
|
|
12174
|
+
// return the first found config object with given data name
|
|
12175
|
+
_getConfigObjectByDataName(dataName) {
|
|
12176
|
+
return ArrayUtils$1.Find(this._configObjects, (cfgObj) => {
|
|
12177
|
+
return cfgObj.dataName === dataName;
|
|
12178
|
+
});
|
|
12179
|
+
}
|
|
12180
|
+
// PRE: this.configObjects is loaded. POST: this._objectConfigsMap contains the latest map of configName -> to -> ObjectConfiguration for a live screen module.
|
|
12181
|
+
_buildScreenConfigMap() {
|
|
12182
|
+
this._objectConfigsMap.clear();
|
|
12183
|
+
this.configObjects.forEach(item => this._objectConfigsMap.set(item.configName, item));
|
|
12184
|
+
}
|
|
12185
|
+
setScreenConfigurationObjectsReadOnly(value) {
|
|
12186
|
+
this.configObjects.forEach((object) => {
|
|
12187
|
+
const copy = Object.assign(new ObjectConfiguration(), object);
|
|
12188
|
+
copy.variableReadOnly = value;
|
|
12189
|
+
this.setObjectConfigurationFor(object.configName, copy);
|
|
12190
|
+
});
|
|
12191
|
+
}
|
|
12192
|
+
setScreenConfigurationObjectsRedErrorBackground(errorValidation, setAllFalse = false) {
|
|
12193
|
+
if (setAllFalse) {
|
|
12194
|
+
this.configObjects.forEach((object) => {
|
|
12195
|
+
const copy = Object.assign(new ObjectConfiguration(), object);
|
|
12196
|
+
copy.redErrorBackground = false;
|
|
12197
|
+
this.setObjectConfigurationFor(object.configName, copy);
|
|
12198
|
+
});
|
|
12199
|
+
}
|
|
12200
|
+
else if (errorValidation) {
|
|
12201
|
+
const errorMessages = errorValidation.getAllErrorMessagesOfMyValidationFields();
|
|
12202
|
+
for (let i = 0, len = errorMessages.length; i < len; i++) {
|
|
12203
|
+
const errorMsg = errorMessages[i];
|
|
12204
|
+
const configObject = this.configObjects.find(object => object.configName === errorMsg.fieldId);
|
|
12205
|
+
if (configObject) {
|
|
12206
|
+
const copy = Object.assign(new ObjectConfiguration(), configObject);
|
|
12207
|
+
copy.redErrorBackground = false;
|
|
12208
|
+
this.setObjectConfigurationFor(configObject.configName, copy);
|
|
12209
|
+
}
|
|
12210
|
+
}
|
|
12001
12211
|
}
|
|
12002
12212
|
}
|
|
12003
12213
|
}
|
|
12004
|
-
|
|
12005
|
-
{ type:
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12214
|
+
BaseModuleScreenConfigService.decorators = [
|
|
12215
|
+
{ type: Injectable }
|
|
12216
|
+
];
|
|
12217
|
+
|
|
12218
|
+
/**
|
|
12219
|
+
* Base class for top-level services of CRUD-style iOne modules (the Relation, Article and Transaction modules).
|
|
12220
|
+
* What sets these modules apart, is the concept of a relatively bulky, 'single businessobject' being manipulated throughout all the tabs.
|
|
12221
|
+
*
|
|
12222
|
+
* Many other (smaller?) iOne modules work with multiple LISTS of different business object types instead.
|
|
12223
|
+
*/
|
|
12224
|
+
class BaseModuleService {
|
|
12225
|
+
constructor(screenConfigService) {
|
|
12226
|
+
this.screenConfigService = screenConfigService;
|
|
12227
|
+
this.readonlyChange = new Subject();
|
|
12228
|
+
// Emits this each time a new error validation was received. (there will be zero error tooltips on the screen after this fires)
|
|
12229
|
+
this.errorValidationReceived = new Subject();
|
|
12230
|
+
// Emits once after succesful BO update (i.e. there were no errors)
|
|
12231
|
+
this.successfulUpdate = new Subject();
|
|
12232
|
+
this._readonly = true;
|
|
12233
|
+
this._subscriptions = [];
|
|
12234
|
+
this._subscriptions.push(this.errorValidationReceived.subscribe((errorValidation) => this.screenConfigService.setScreenConfigurationObjectsRedErrorBackground(errorValidation)), this.successfulUpdate.subscribe(() => this.screenConfigService.setScreenConfigurationObjectsRedErrorBackground(null, true)), this.readonlyChange.subscribe((readOnly) => this.screenConfigService.setScreenConfigurationObjectsReadOnly(readOnly)));
|
|
12235
|
+
}
|
|
12236
|
+
// Whether the module is in readonly modus or not. Input fields etc. will be readonly throughout the module.
|
|
12237
|
+
get readonly() {
|
|
12238
|
+
return this._readonly;
|
|
12239
|
+
}
|
|
12240
|
+
set readonly(readonly) {
|
|
12241
|
+
if (this._readonly !== readonly) {
|
|
12242
|
+
this._readonly = readonly;
|
|
12243
|
+
this.readonlyChange.next(this._readonly);
|
|
12244
|
+
}
|
|
12245
|
+
}
|
|
12246
|
+
ngOnDestroy() {
|
|
12247
|
+
this._subscriptions.forEach((subscription) => subscription.unsubscribe());
|
|
12248
|
+
}
|
|
12249
|
+
}
|
|
12250
|
+
BaseModuleService.decorators = [
|
|
12251
|
+
{ type: Injectable }
|
|
12012
12252
|
];
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12253
|
+
BaseModuleService.ctorParameters = () => [
|
|
12254
|
+
{ type: BaseModuleScreenConfigService }
|
|
12255
|
+
];
|
|
12016
12256
|
|
|
12017
12257
|
// Directive to represents the marker of "screen config name ID's" of components within a module.
|
|
12018
12258
|
// Manipulates visibility, readonly and other dynamic states of an input element according to its db-fetched screen configuration object.
|
|
12019
12259
|
class ScreenConfigurationDirective {
|
|
12020
|
-
constructor(hostComponent,
|
|
12260
|
+
constructor(hostComponent, _element,
|
|
12261
|
+
// we must always have a config service to fetch config objects with
|
|
12262
|
+
_configService, _renderer,
|
|
12263
|
+
// to make host readonly when MODULE switches to readonly:
|
|
12264
|
+
_moduleService) {
|
|
12021
12265
|
this.hostComponent = hostComponent;
|
|
12022
|
-
this.
|
|
12023
|
-
this.
|
|
12266
|
+
this._element = _element;
|
|
12267
|
+
this._configService = _configService;
|
|
12268
|
+
this._renderer = _renderer;
|
|
12269
|
+
this._moduleService = _moduleService;
|
|
12270
|
+
this.screenConfigNativeElement = false;
|
|
12024
12271
|
this.noModuleService = false;
|
|
12272
|
+
// 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
|
|
12273
|
+
this._isTurnedOff = false;
|
|
12274
|
+
this._subs = [];
|
|
12275
|
+
this._subs.push(this._configService.configSet.subscribe((configObjects) => {
|
|
12276
|
+
if (configObjects && configObjects.length > 0) {
|
|
12277
|
+
this._updateHost();
|
|
12278
|
+
}
|
|
12279
|
+
}));
|
|
12280
|
+
if (this._moduleService && !this.noModuleService) {
|
|
12281
|
+
this._subs.push(this._moduleService.readonlyChange.subscribe((moduleInReadonlyState) => {
|
|
12282
|
+
if (this.hostComponent) {
|
|
12283
|
+
this.hostComponent.readonly = this.hostComponent.forceReadonly || moduleInReadonlyState;
|
|
12284
|
+
}
|
|
12285
|
+
}), this._moduleService.errorValidationReceived.subscribe((validationResult) => {
|
|
12286
|
+
this._setErrorRedBackgroundAfterScrCfgValidate(validationResult);
|
|
12287
|
+
}), this._moduleService.successfulUpdate.subscribe(() => {
|
|
12288
|
+
if (this.hostComponent) {
|
|
12289
|
+
this.hostComponent.redErrorBackground = false;
|
|
12290
|
+
}
|
|
12291
|
+
}));
|
|
12292
|
+
}
|
|
12025
12293
|
}
|
|
12026
|
-
set screenConfigurationObject(
|
|
12027
|
-
if (
|
|
12028
|
-
this._screenConfigurationObject =
|
|
12029
|
-
this._initWrapperComponent();
|
|
12294
|
+
set screenConfigurationObject(value) {
|
|
12295
|
+
if (value) {
|
|
12296
|
+
this._screenConfigurationObject = value;
|
|
12030
12297
|
this._updateHost();
|
|
12031
12298
|
}
|
|
12032
12299
|
}
|
|
12033
12300
|
get screenConfigurationObject() {
|
|
12034
12301
|
return this._screenConfigurationObject;
|
|
12035
12302
|
}
|
|
12303
|
+
ngOnInit() {
|
|
12304
|
+
this._updateHost();
|
|
12305
|
+
// this._updateHeaderStateOnHostComponent(true);
|
|
12306
|
+
// show initial error message if any
|
|
12307
|
+
if (!this.noModuleService) {
|
|
12308
|
+
// this._setErrorRedBackgroundAfterScrCfgValidate(this._moduleService.lastError);
|
|
12309
|
+
}
|
|
12310
|
+
}
|
|
12036
12311
|
ngOnDestroy() {
|
|
12312
|
+
this._subs.forEach(sub => sub.unsubscribe());
|
|
12313
|
+
if (this._isHeader) {
|
|
12314
|
+
// this._doubleClickHeaders.handleCollapseableDestroy(this.screenConfigurationObject);
|
|
12315
|
+
}
|
|
12316
|
+
this._element = undefined;
|
|
12037
12317
|
this.hostComponent = undefined;
|
|
12038
|
-
this._wrapperComponentInstance = undefined;
|
|
12039
12318
|
}
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
this.
|
|
12319
|
+
// Sets host component visibility, required, readonly etc. if specified in backend screen config OR module readonly status.
|
|
12320
|
+
_updateHost() {
|
|
12321
|
+
if (this._mayUpdateHost() || this.screenConfigNativeElement) {
|
|
12322
|
+
if (!this.screenConfigNativeElement) {
|
|
12323
|
+
this.hostComponent.objectConfigName = this.screenConfigurationObject;
|
|
12324
|
+
}
|
|
12325
|
+
const myCfgObj = this._configService.getObjectConfigurationFor(this.screenConfigurationObject);
|
|
12326
|
+
if (myCfgObj) {
|
|
12327
|
+
this._setHostVisible(myCfgObj.immediatelyVisible());
|
|
12328
|
+
// if (this.hostComponent instanceof GridColumnComponent) {
|
|
12329
|
+
// this.hostComponent.rights = myCfgObj.rights;
|
|
12330
|
+
// }
|
|
12331
|
+
if (!this.screenConfigNativeElement) {
|
|
12332
|
+
this.hostComponent.required = myCfgObj.isRequired();
|
|
12333
|
+
this.hostComponent.readonly = this.hostComponent.forceReadonly || this._moduleInReadonlyMode() || myCfgObj.isReadonly();
|
|
12334
|
+
this.hostComponent.decimals = myCfgObj.scale;
|
|
12335
|
+
this.hostComponent.maxLength = myCfgObj.maxLength;
|
|
12336
|
+
}
|
|
12337
|
+
}
|
|
12338
|
+
else {
|
|
12339
|
+
this._setHostVisible(false);
|
|
12340
|
+
if (!this.screenConfigNativeElement) {
|
|
12341
|
+
this.hostComponent.readonly = this._moduleInReadonlyMode();
|
|
12342
|
+
}
|
|
12343
|
+
}
|
|
12047
12344
|
}
|
|
12048
12345
|
}
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
|
|
12346
|
+
/**
|
|
12347
|
+
* Spawn error message tooltip onto our host comp, if any error was meant for the host (found by screenConfigurationObject);
|
|
12348
|
+
* @param errorValidation A top-level full validation result, either from the backend or from some client-side validation error.
|
|
12349
|
+
*/
|
|
12350
|
+
_setErrorRedBackgroundAfterScrCfgValidate(errorValidation) {
|
|
12351
|
+
if (this.hostComponent && errorValidation) {
|
|
12352
|
+
const errorMessages = errorValidation.getAllErrorMessagesOfMyValidationFields();
|
|
12353
|
+
for (let i = 0, len = errorMessages.length; i < len; i++) {
|
|
12354
|
+
const errorMsg = errorMessages[i];
|
|
12355
|
+
const configName = this.dataName ? this.dataName : this.screenConfigurationObject;
|
|
12356
|
+
if (errorMsg.fieldId === configName && this._element /*&& this._properHost(errorMsg.boId)*/) {
|
|
12357
|
+
this.hostComponent.redErrorBackground = true;
|
|
12358
|
+
}
|
|
12359
|
+
}
|
|
12360
|
+
}
|
|
12361
|
+
}
|
|
12362
|
+
_moduleInReadonlyMode() {
|
|
12363
|
+
return !this.noModuleService ? (this._moduleService ? this._moduleService.readonly : false) : false;
|
|
12364
|
+
}
|
|
12365
|
+
_mayUpdateHost() {
|
|
12366
|
+
return !!this.hostComponent && !this._isTurnedOff && !!this.screenConfigurationObject;
|
|
12367
|
+
}
|
|
12368
|
+
_setHostVisible(visible) {
|
|
12369
|
+
if (!this.screenConfigNativeElement) {
|
|
12370
|
+
this.hostComponent.hidden = !visible;
|
|
12371
|
+
}
|
|
12372
|
+
else {
|
|
12373
|
+
if (this._element && this._element.nativeElement) {
|
|
12374
|
+
if (!visible) {
|
|
12375
|
+
this._renderer.addClass(this._element.nativeElement, 'hidden');
|
|
12376
|
+
}
|
|
12377
|
+
else {
|
|
12378
|
+
this._renderer.removeClass(this._element.nativeElement, 'hidden');
|
|
12379
|
+
}
|
|
12058
12380
|
}
|
|
12059
12381
|
}
|
|
12060
12382
|
}
|
|
12061
12383
|
}
|
|
12062
12384
|
ScreenConfigurationDirective.decorators = [
|
|
12063
12385
|
{ type: Directive, args: [{
|
|
12064
|
-
selector:
|
|
12386
|
+
selector: '[screenConfigurationObject]'
|
|
12065
12387
|
},] }
|
|
12066
12388
|
];
|
|
12067
12389
|
ScreenConfigurationDirective.ctorParameters = () => [
|
|
12068
12390
|
{ type: undefined, decorators: [{ type: Inject, args: [SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,] }] },
|
|
12069
|
-
{ type:
|
|
12070
|
-
{ type:
|
|
12391
|
+
{ type: ElementRef },
|
|
12392
|
+
{ type: BaseModuleScreenConfigService },
|
|
12393
|
+
{ type: Renderer2 },
|
|
12394
|
+
{ type: BaseModuleService }
|
|
12071
12395
|
];
|
|
12072
12396
|
ScreenConfigurationDirective.propDecorators = {
|
|
12073
|
-
screenConfigurationObject: [{ type: Input }],
|
|
12397
|
+
screenConfigurationObject: [{ type: Input, args: ['screenConfigurationObject',] }],
|
|
12398
|
+
dataName: [{ type: Input }],
|
|
12399
|
+
screenConfigNativeElement: [{ type: Input }],
|
|
12074
12400
|
noModuleService: [{ type: Input }]
|
|
12075
12401
|
};
|
|
12402
|
+
__decorate([
|
|
12403
|
+
InputBoolean()
|
|
12404
|
+
], ScreenConfigurationDirective.prototype, "screenConfigNativeElement", void 0);
|
|
12076
12405
|
__decorate([
|
|
12077
12406
|
InputBoolean()
|
|
12078
12407
|
], ScreenConfigurationDirective.prototype, "noModuleService", void 0);
|
|
@@ -12085,8 +12414,7 @@ ScreenConfigurationModule.decorators = [
|
|
|
12085
12414
|
CommonModule
|
|
12086
12415
|
],
|
|
12087
12416
|
declarations: [
|
|
12088
|
-
ScreenConfigurationDirective
|
|
12089
|
-
ScreenConfigComponentWrapper
|
|
12417
|
+
ScreenConfigurationDirective
|
|
12090
12418
|
],
|
|
12091
12419
|
exports: [
|
|
12092
12420
|
ScreenConfigurationDirective,
|
|
@@ -12144,5 +12472,5 @@ ColorSequenceService.decorators = [
|
|
|
12144
12472
|
* Generated bundle index. Do not edit.
|
|
12145
12473
|
*/
|
|
12146
12474
|
|
|
12147
|
-
export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TextInputPopupComponent, TileComponent, TileModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb, PaginationService as ɵba, PaginatePipe as ɵbb, SimpleGridCellComponent as ɵbc, ListOfValuesMultiselectPopupComponent as ɵbd, PrependPipeModule as ɵbe, PrependPipe as ɵbf, TooltipModule as ɵbg, TooltipComponent as ɵbh, TooltipDirective as ɵbi, CheckmarkOverlayComponent as ɵbj,
|
|
12475
|
+
export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TextInputPopupComponent, TileComponent, TileModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb, PaginationService as ɵba, PaginatePipe as ɵbb, SimpleGridCellComponent as ɵbc, ListOfValuesMultiselectPopupComponent as ɵbd, PrependPipeModule as ɵbe, PrependPipe as ɵbf, TooltipModule as ɵbg, TooltipComponent as ɵbh, TooltipDirective as ɵbi, CheckmarkOverlayComponent as ɵbj, MD_RIPPLE_GLOBAL_OPTIONS as ɵc, CoRippleDirective as ɵd, CoViewportRulerService as ɵe, CoScrollDispatcherService as ɵf, CoScrollableDirective as ɵg, StopClickModule as ɵh, StopClickDirective as ɵi, BaseModule as ɵj, AppendPipeModule as ɵk, AppendPipe as ɵl, ValidationErrorModule as ɵm, OverlayDirective as ɵn, OverlayParentDirective as ɵo, LocalizePipe as ɵp, DictionaryService as ɵq, ValidationErrorComponent as ɵr, CommitButtonsModule as ɵs, CommitButtonsComponent as ɵt, ClickOutsideDirective as ɵu, ClickOutsideMasterService as ɵv, CalendarTemplateComponent as ɵw, PopupShowerService as ɵx, BaseSimpleGridComponent as ɵy, ObserveVisibilityDirective as ɵz };
|
|
12148
12476
|
//# sourceMappingURL=colijnit-corecomponents_v12.js.map
|