@trudb/tru-common-lib 0.0.775 → 0.0.777
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/esm2022/lib/components/grid-validation-dialog/tru-grid-validation-dialog-config.mjs +25 -0
- package/esm2022/lib/components/grid-validation-dialog/tru-grid-validation-dialog-module.mjs +19 -0
- package/esm2022/lib/components/grid-validation-dialog/tru-grid-validation-dialog.mjs +85 -0
- package/esm2022/lib/directives/breeze-grid-validator/tru-breeze-grid-validator-module.mjs +19 -0
- package/esm2022/lib/directives/breeze-grid-validator/tru-breeze-grid-validator.mjs +118 -0
- package/esm2022/lib/directives/breeze-validator/tru-breeze-validator.mjs +10 -4
- package/esm2022/public-api.mjs +7 -1
- package/fesm2022/trudb-tru-common-lib.mjs +257 -4
- package/fesm2022/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/components/grid-validation-dialog/tru-grid-validation-dialog-config.d.ts +13 -0
- package/lib/components/grid-validation-dialog/tru-grid-validation-dialog-module.d.ts +9 -0
- package/lib/components/grid-validation-dialog/tru-grid-validation-dialog.d.ts +21 -0
- package/lib/directives/breeze-grid-validator/tru-breeze-grid-validator-module.d.ts +9 -0
- package/lib/directives/breeze-grid-validator/tru-breeze-grid-validator.d.ts +30 -0
- package/package.json +1 -1
- package/public-api.d.ts +6 -0
|
@@ -5979,6 +5979,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
5979
5979
|
}]
|
|
5980
5980
|
}] });
|
|
5981
5981
|
|
|
5982
|
+
class TruGridValidationDialog {
|
|
5983
|
+
renderer;
|
|
5984
|
+
elementRef;
|
|
5985
|
+
util;
|
|
5986
|
+
config;
|
|
5987
|
+
errorMsg = '';
|
|
5988
|
+
listeners = [];
|
|
5989
|
+
constructor(renderer, elementRef, util) {
|
|
5990
|
+
this.renderer = renderer;
|
|
5991
|
+
this.elementRef = elementRef;
|
|
5992
|
+
this.util = util;
|
|
5993
|
+
}
|
|
5994
|
+
onAcceptAll = () => {
|
|
5995
|
+
let entity = this.config.entity;
|
|
5996
|
+
let originalValues = entity.entityAspect.originalValues;
|
|
5997
|
+
for (const key in this.config.mergeData) {
|
|
5998
|
+
entity[key] = this.config.mergeData.getData(key).value;
|
|
5999
|
+
if (originalValues.hasOwnProperty(key))
|
|
6000
|
+
delete originalValues[key];
|
|
6001
|
+
}
|
|
6002
|
+
;
|
|
6003
|
+
if (Object.keys(originalValues).length === 0 && originalValues.constructor === Object)
|
|
6004
|
+
entity.entityAspect.setUnchanged();
|
|
6005
|
+
entity.Merge_Data_Set = JSON.stringify({});
|
|
6006
|
+
for (const key in this.config.mergeData) {
|
|
6007
|
+
entity.entityAspect.validateProperty(key);
|
|
6008
|
+
}
|
|
6009
|
+
;
|
|
6010
|
+
};
|
|
6011
|
+
onAccept = () => {
|
|
6012
|
+
//let entity = this.config.entity as any;
|
|
6013
|
+
//let originalValues = entity.entityAspect.originalValues;
|
|
6014
|
+
//let propertyName = '';
|
|
6015
|
+
//let mergeData = JSON.parse(entity.Merge_Data_Set);
|
|
6016
|
+
//let propertyNameKey = propertyName as keyof typeof this.mergeData;
|
|
6017
|
+
//entity[propertyName] = this.config.mergeData?.getData(propertyNameKey)!.value;
|
|
6018
|
+
//delete this.mergeData[propertyNameKey];
|
|
6019
|
+
//if (originalValues.hasOwnProperty(propertyName) && (Object.keys(originalValues).length === 0 && originalValues.constructor === Object))
|
|
6020
|
+
// delete originalValues[propertyName];
|
|
6021
|
+
//if (!Object.keys(this.mergeData).length)
|
|
6022
|
+
// entity.entityAspect.setUnchanged();
|
|
6023
|
+
//entity.Merge_Data = JSON.stringify(this.mergeData);
|
|
6024
|
+
//entity.entityAspect.validateProperty(propertyName);
|
|
6025
|
+
};
|
|
6026
|
+
onDecline = () => {
|
|
6027
|
+
//let entity = this.entity as any;
|
|
6028
|
+
//let propertyName = '';
|
|
6029
|
+
//this.mergeData = JSON.parse(entity.Merge_Data);
|
|
6030
|
+
//let propertyNameKey = propertyName as keyof typeof this.mergeData;
|
|
6031
|
+
//delete this.mergeData[propertyNameKey];
|
|
6032
|
+
//entity.Merge_Data = JSON.stringify(this.mergeData);
|
|
6033
|
+
//entity.entityAspect.validateProperty(propertyName);
|
|
6034
|
+
};
|
|
6035
|
+
ngOnInit() {
|
|
6036
|
+
this.errorMsg = this.config.errorMsg;
|
|
6037
|
+
this.listeners.push(this.renderer.listen(this.elementRef.nativeElement.previousElementSibling, 'mouseenter', (event) => {
|
|
6038
|
+
this.elementRef.nativeElement.childNodes[0].classList.remove('hide');
|
|
6039
|
+
this.elementRef.nativeElement.childNodes[0].classList.add('show');
|
|
6040
|
+
}));
|
|
6041
|
+
this.listeners.push(this.renderer.listen(this.elementRef.nativeElement.previousElementSibling, 'mouseleave', (event) => {
|
|
6042
|
+
this.elementRef.nativeElement.childNodes[0].classList.remove('show');
|
|
6043
|
+
this.elementRef.nativeElement.childNodes[0].classList.add('hide');
|
|
6044
|
+
}));
|
|
6045
|
+
}
|
|
6046
|
+
ngAfterViewInit() {
|
|
6047
|
+
this.util.findClosestAncestorByClass(this.elementRef.nativeElement, '.ag-cell-value').classList.add('invalid');
|
|
6048
|
+
}
|
|
6049
|
+
ngOnDestroy() {
|
|
6050
|
+
this.util.findClosestAncestorByClass(this.elementRef.nativeElement, '.ag-cell-value').classList.remove('invalid');
|
|
6051
|
+
this.listeners.forEach(l => l());
|
|
6052
|
+
}
|
|
6053
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruGridValidationDialog, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: TruUtil }], target: i0.ɵɵFactoryTarget.Component });
|
|
6054
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: TruGridValidationDialog, selector: "tru-grid-validation-dialog", inputs: { config: "config" }, ngImport: i0, template: "<div class=\"invalid hide\">\r\n <i class=\"icon-warning-sign icon-white\"></i>{{config.errorMsg}}\r\n <div *ngIf=\"config.mergeData\">\r\n <button class=\"md-primary md-button ng-scope md-ink-ripple merge-button\" (click)=\"onAcceptAll()\">Accept All</button>\r\n <button class=\"md-primary md-button ng-scope md-ink-ripple merge-button\" (click)=\"onAccept()\">Accept</button>\r\n <button class=\"md-primary md-button ng-scope md-ink-ripple merge-button\" (click)=\"onDecline()\">Decline</button>\r\n </div>\r\n</div>\r\n<span class=\"invalid-flag\"></span>\r\n", styles: [".invalid{position:absolute;left:0;top:24px;-moz-min-width:200px;-ms-min-width:200px;-o-min-width:200px;-webkit-min-width:200px;min-width:200px;min-height:20px;max-width:500px;max-height:500px;font-size:12px}.invalid.hide{display:none!important}.invalid.show{display:inline-block!important}.invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:8px;height:8px;border-bottom:solid 4px transparent;border-right:solid 4px transparent;border-left:solid 4px red;border-top:solid 4px red}.invalid-triangle:after{box-sizing:border-box}.invalid{background-color:#bd362f;margin:2px 0 0;padding:4px 10px;border-radius:3px!important;background-position:15px center;background-repeat:no-repeat;-ms-box-shadow:0 0 12px #999999;box-shadow:0 0 12px #999;color:#fff;-ms-opacity:.9;opacity:.9;z-index:1000}.merge-button{margin:5px;background-color:#fff}::ng-deep .mat-mdc-form-field.invalid .mdc-line-ripple:before{border-bottom-color:red!important}::ng-deep .mat-mdc-form-field.invalid .mdc-line-ripple:after{border-bottom-color:red!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
6055
|
+
}
|
|
6056
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruGridValidationDialog, decorators: [{
|
|
6057
|
+
type: Component,
|
|
6058
|
+
args: [{ selector: 'tru-grid-validation-dialog', template: "<div class=\"invalid hide\">\r\n <i class=\"icon-warning-sign icon-white\"></i>{{config.errorMsg}}\r\n <div *ngIf=\"config.mergeData\">\r\n <button class=\"md-primary md-button ng-scope md-ink-ripple merge-button\" (click)=\"onAcceptAll()\">Accept All</button>\r\n <button class=\"md-primary md-button ng-scope md-ink-ripple merge-button\" (click)=\"onAccept()\">Accept</button>\r\n <button class=\"md-primary md-button ng-scope md-ink-ripple merge-button\" (click)=\"onDecline()\">Decline</button>\r\n </div>\r\n</div>\r\n<span class=\"invalid-flag\"></span>\r\n", styles: [".invalid{position:absolute;left:0;top:24px;-moz-min-width:200px;-ms-min-width:200px;-o-min-width:200px;-webkit-min-width:200px;min-width:200px;min-height:20px;max-width:500px;max-height:500px;font-size:12px}.invalid.hide{display:none!important}.invalid.show{display:inline-block!important}.invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:8px;height:8px;border-bottom:solid 4px transparent;border-right:solid 4px transparent;border-left:solid 4px red;border-top:solid 4px red}.invalid-triangle:after{box-sizing:border-box}.invalid{background-color:#bd362f;margin:2px 0 0;padding:4px 10px;border-radius:3px!important;background-position:15px center;background-repeat:no-repeat;-ms-box-shadow:0 0 12px #999999;box-shadow:0 0 12px #999;color:#fff;-ms-opacity:.9;opacity:.9;z-index:1000}.merge-button{margin:5px;background-color:#fff}::ng-deep .mat-mdc-form-field.invalid .mdc-line-ripple:before{border-bottom-color:red!important}::ng-deep .mat-mdc-form-field.invalid .mdc-line-ripple:after{border-bottom-color:red!important}\n"] }]
|
|
6059
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: TruUtil }], propDecorators: { config: [{
|
|
6060
|
+
type: Input
|
|
6061
|
+
}] } });
|
|
6062
|
+
|
|
6063
|
+
class TruGridValidationDialogModule {
|
|
6064
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruGridValidationDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6065
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: TruGridValidationDialogModule, declarations: [TruGridValidationDialog], imports: [CommonModule, FormsModule], exports: [TruGridValidationDialog] });
|
|
6066
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruGridValidationDialogModule, imports: [CommonModule, FormsModule] });
|
|
6067
|
+
}
|
|
6068
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruGridValidationDialogModule, decorators: [{
|
|
6069
|
+
type: NgModule,
|
|
6070
|
+
args: [{
|
|
6071
|
+
declarations: [TruGridValidationDialog],
|
|
6072
|
+
imports: [CommonModule, FormsModule],
|
|
6073
|
+
exports: [TruGridValidationDialog]
|
|
6074
|
+
}]
|
|
6075
|
+
}] });
|
|
6076
|
+
|
|
5982
6077
|
class TruColumn {
|
|
5983
6078
|
constructor() { }
|
|
5984
6079
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -6425,6 +6520,158 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
6425
6520
|
}]
|
|
6426
6521
|
}] });
|
|
6427
6522
|
|
|
6523
|
+
class TruGridValidationDialogConfig {
|
|
6524
|
+
_entity;
|
|
6525
|
+
_propertyName;
|
|
6526
|
+
_errorMsg;
|
|
6527
|
+
_mergeData;
|
|
6528
|
+
get entity() {
|
|
6529
|
+
return this._entity;
|
|
6530
|
+
}
|
|
6531
|
+
get propertyName() {
|
|
6532
|
+
return this._propertyName;
|
|
6533
|
+
}
|
|
6534
|
+
get errorMsg() {
|
|
6535
|
+
return this._errorMsg;
|
|
6536
|
+
}
|
|
6537
|
+
get mergeData() {
|
|
6538
|
+
return this._mergeData;
|
|
6539
|
+
}
|
|
6540
|
+
constructor(entity, propertyName, errorMsg, mergeData = null) {
|
|
6541
|
+
this._entity = entity;
|
|
6542
|
+
this._propertyName = propertyName;
|
|
6543
|
+
this._errorMsg = errorMsg;
|
|
6544
|
+
this._mergeData = mergeData;
|
|
6545
|
+
}
|
|
6546
|
+
}
|
|
6547
|
+
|
|
6548
|
+
class TruBreezeGridValidator {
|
|
6549
|
+
el;
|
|
6550
|
+
dataContext;
|
|
6551
|
+
viewContainerRef;
|
|
6552
|
+
componentFactoryResolver;
|
|
6553
|
+
entity;
|
|
6554
|
+
config;
|
|
6555
|
+
constructor(el, dataContext, viewContainerRef, componentFactoryResolver) {
|
|
6556
|
+
this.el = el;
|
|
6557
|
+
this.dataContext = dataContext;
|
|
6558
|
+
this.viewContainerRef = viewContainerRef;
|
|
6559
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
6560
|
+
}
|
|
6561
|
+
configModel = {};
|
|
6562
|
+
mergeData;
|
|
6563
|
+
dialogRef = null;
|
|
6564
|
+
subs = [];
|
|
6565
|
+
currentDialog = null;
|
|
6566
|
+
getMergeData = () => {
|
|
6567
|
+
if (this.config.propertyPath?.includes('/')) {
|
|
6568
|
+
let propertyNameParts = this.config.propertyPath.split('/');
|
|
6569
|
+
propertyNameParts.pop();
|
|
6570
|
+
let targetProperty;
|
|
6571
|
+
propertyNameParts.forEach((name) => {
|
|
6572
|
+
if (!targetProperty) {
|
|
6573
|
+
let targetPropertyName = 'o' + name;
|
|
6574
|
+
targetProperty = this.entity[targetPropertyName];
|
|
6575
|
+
}
|
|
6576
|
+
else {
|
|
6577
|
+
let targetPropertyName = 'o' + name;
|
|
6578
|
+
targetProperty = targetProperty[targetPropertyName];
|
|
6579
|
+
}
|
|
6580
|
+
});
|
|
6581
|
+
if (targetProperty && targetProperty.Merge_Data) {
|
|
6582
|
+
return targetProperty.Merge_Data_Set;
|
|
6583
|
+
}
|
|
6584
|
+
return undefined;
|
|
6585
|
+
}
|
|
6586
|
+
else {
|
|
6587
|
+
return this.entity.Merge_Data_Set;
|
|
6588
|
+
}
|
|
6589
|
+
};
|
|
6590
|
+
parseErrorMessages = (validationErrors) => {
|
|
6591
|
+
let errorMsg = '';
|
|
6592
|
+
validationErrors.forEach((error) => {
|
|
6593
|
+
errorMsg += error.errorMessage + '; ';
|
|
6594
|
+
});
|
|
6595
|
+
return errorMsg;
|
|
6596
|
+
};
|
|
6597
|
+
addValidationDialog = (config) => {
|
|
6598
|
+
let componentFactory = this.componentFactoryResolver.resolveComponentFactory(TruGridValidationDialog);
|
|
6599
|
+
let component = this.viewContainerRef.createComponent(componentFactory, 0, this.viewContainerRef.injector);
|
|
6600
|
+
component.instance.config = config;
|
|
6601
|
+
this.currentDialog = component;
|
|
6602
|
+
this.dialogRef = component;
|
|
6603
|
+
};
|
|
6604
|
+
removeValidationDialog = () => {
|
|
6605
|
+
if (this.currentDialog) {
|
|
6606
|
+
this.currentDialog.destroy();
|
|
6607
|
+
this.currentDialog = null;
|
|
6608
|
+
}
|
|
6609
|
+
};
|
|
6610
|
+
valErrsChanged = (validationObject) => {
|
|
6611
|
+
let validationObjectEntity = validationObject.entity;
|
|
6612
|
+
let validationTableName = validationObjectEntity.constructor.name;
|
|
6613
|
+
const entityPkeyName = validationTableName + 'Ref';
|
|
6614
|
+
const validationObjectEntitypkeyName = validationTableName + 'Ref';
|
|
6615
|
+
let addedPropertyValdations = validationObject.added.filter((v) => {
|
|
6616
|
+
return v.propertyName === this.config.propertyName;
|
|
6617
|
+
});
|
|
6618
|
+
let removedPropertyValdations = validationObject.removed.filter((v) => {
|
|
6619
|
+
return v.propertyName === this.config.propertyName;
|
|
6620
|
+
});
|
|
6621
|
+
this.mergeData = this.getMergeData();
|
|
6622
|
+
if (this.config.rootTable === validationTableName &&
|
|
6623
|
+
this.entity[entityPkeyName] === validationObjectEntity[validationObjectEntitypkeyName] &&
|
|
6624
|
+
(addedPropertyValdations.length || this.mergeData)) {
|
|
6625
|
+
this.addValidationDialog(new TruGridValidationDialogConfig(this.entity, this.config.propertyName, this.parseErrorMessages(addedPropertyValdations), this.mergeData));
|
|
6626
|
+
}
|
|
6627
|
+
if (this.config.rootTable === validationTableName &&
|
|
6628
|
+
this.entity[entityPkeyName] === validationObjectEntity[validationObjectEntitypkeyName] &&
|
|
6629
|
+
(removedPropertyValdations.length)) {
|
|
6630
|
+
this.removeValidationDialog();
|
|
6631
|
+
}
|
|
6632
|
+
};
|
|
6633
|
+
ngOnInit() { }
|
|
6634
|
+
ngAfterViewInit() {
|
|
6635
|
+
this.subs.push(this.dataContext.validationChangeDetection.subscribe(entities => {
|
|
6636
|
+
this.valErrsChanged(entities);
|
|
6637
|
+
}));
|
|
6638
|
+
this.entity.entityAspect.validateEntity();
|
|
6639
|
+
}
|
|
6640
|
+
ngOnChanges(changes) {
|
|
6641
|
+
this.entity.entityAspect.validateEntity();
|
|
6642
|
+
}
|
|
6643
|
+
ngOnDestroy() {
|
|
6644
|
+
this.subs.forEach(s => s.unsubscribe());
|
|
6645
|
+
}
|
|
6646
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruBreezeGridValidator, deps: [{ token: i0.ElementRef }, { token: TruDataContext }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6647
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: TruBreezeGridValidator, selector: "[truBreezeGridValidator]", inputs: { entity: ["truBreezeValidator", "entity"], config: "config" }, usesOnChanges: true, ngImport: i0 });
|
|
6648
|
+
}
|
|
6649
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruBreezeGridValidator, decorators: [{
|
|
6650
|
+
type: Directive,
|
|
6651
|
+
args: [{
|
|
6652
|
+
selector: '[truBreezeGridValidator]'
|
|
6653
|
+
}]
|
|
6654
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: TruDataContext }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }], propDecorators: { entity: [{
|
|
6655
|
+
type: Input,
|
|
6656
|
+
args: ['truBreezeValidator']
|
|
6657
|
+
}], config: [{
|
|
6658
|
+
type: Input
|
|
6659
|
+
}] } });
|
|
6660
|
+
|
|
6661
|
+
class TruBreezeGridValidatorModule {
|
|
6662
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruBreezeGridValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6663
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: TruBreezeGridValidatorModule, declarations: [TruBreezeGridValidator], imports: [CommonModule, FormsModule], exports: [TruBreezeGridValidator] });
|
|
6664
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruBreezeGridValidatorModule, imports: [CommonModule, FormsModule] });
|
|
6665
|
+
}
|
|
6666
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: TruBreezeGridValidatorModule, decorators: [{
|
|
6667
|
+
type: NgModule,
|
|
6668
|
+
args: [{
|
|
6669
|
+
declarations: [TruBreezeGridValidator],
|
|
6670
|
+
imports: [CommonModule, FormsModule],
|
|
6671
|
+
exports: [TruBreezeGridValidator]
|
|
6672
|
+
}]
|
|
6673
|
+
}] });
|
|
6674
|
+
|
|
6428
6675
|
class TruValidationDialogConfig {
|
|
6429
6676
|
_entity;
|
|
6430
6677
|
_propertyName;
|
|
@@ -6520,13 +6767,20 @@ class TruBreezeValidator {
|
|
|
6520
6767
|
let addedPropertyValdations = validationObject.added.filter((v) => {
|
|
6521
6768
|
return v.propertyName === this.config.propertyName;
|
|
6522
6769
|
});
|
|
6770
|
+
let removedPropertyValdations = validationObject.removed.filter((v) => {
|
|
6771
|
+
return v.propertyName === this.config.propertyName;
|
|
6772
|
+
});
|
|
6523
6773
|
this.mergeData = this.getMergeData();
|
|
6524
6774
|
if (this.config.rootTable === validationTableName &&
|
|
6525
6775
|
this.entity[entityPkeyName] === validationObjectEntity[validationObjectEntitypkeyName] &&
|
|
6526
6776
|
(addedPropertyValdations.length || this.mergeData)) {
|
|
6527
|
-
this.removeValidationDialog();
|
|
6528
6777
|
this.addValidationDialog(new TruValidationDialogConfig(this.entity, this.config.propertyName, this.parseErrorMessages(addedPropertyValdations), this.mergeData));
|
|
6529
6778
|
}
|
|
6779
|
+
if (this.config.rootTable === validationTableName &&
|
|
6780
|
+
this.entity[entityPkeyName] === validationObjectEntity[validationObjectEntitypkeyName] &&
|
|
6781
|
+
(removedPropertyValdations.length)) {
|
|
6782
|
+
this.removeValidationDialog();
|
|
6783
|
+
}
|
|
6530
6784
|
};
|
|
6531
6785
|
ngOnInit() { }
|
|
6532
6786
|
ngAfterViewInit() {
|
|
@@ -6536,8 +6790,7 @@ class TruBreezeValidator {
|
|
|
6536
6790
|
this.entity.entityAspect.validateEntity();
|
|
6537
6791
|
}
|
|
6538
6792
|
ngOnChanges(changes) {
|
|
6539
|
-
|
|
6540
|
-
//this.removeValidationDialog();
|
|
6793
|
+
this.entity.entityAspect.validateEntity();
|
|
6541
6794
|
}
|
|
6542
6795
|
ngOnDestroy() {
|
|
6543
6796
|
this.subs.forEach(s => s.unsubscribe());
|
|
@@ -6976,5 +7229,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
6976
7229
|
* Generated bundle index. Do not edit.
|
|
6977
7230
|
*/
|
|
6978
7231
|
|
|
6979
|
-
export { DetailViewModule, TruAppEnvironment, TruAuth, TruAuthInterceptor, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruBreezeValidator, TruBreezeValidatorModule, TruChoice, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruConnectionHub, TruContextFilter, TruContextFilterChoice, TruContextFilters, TruControlComponentConfigBase, TruDataChange, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruDesktopViewConfig, TruDetailViewBase, TruEditControlBase, TruEditControlConfigBase, TruEditParentControlConfigBase, TruEditPkeyControlConfigBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruIconModule, TruListControlConfigBase, TruLogin, TruLoginModule, TruMatSelectPanel, TruMatSelectPanelModule, TruModelPropertyLookup, TruNameValue, TruPasswordDialog, TruPasswordDialogModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDate, TruPropertyConfigDecimal, TruPropertyConfigFile, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchConfigBase, TruSearchControlBase, TruSearchControlConfigBase, TruSearchControlRangeBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchResultViewBase, TruSearchResultViewBaseModule, TruSearchResultViewManager, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTableRegistry, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruToolbarUserProfile, TruToolbarUserProfileModule, TruUiNotification, TruUser, TruUtil, TruValidationDialog, TruValidationDialogModule, TruWindowActionEventHandler, TruWindowEventArgs, TruWindowEventHandler };
|
|
7232
|
+
export { DetailViewModule, TruAppEnvironment, TruAuth, TruAuthInterceptor, TruBreezeContext, TruBreezeContextFactory, TruBreezeGridValidator, TruBreezeGridValidatorModule, TruBreezeMetadataProvider, TruBreezeValidator, TruBreezeValidatorModule, TruChoice, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruConnectionHub, TruContextFilter, TruContextFilterChoice, TruContextFilters, TruControlComponentConfigBase, TruDataChange, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruDesktopViewConfig, TruDetailViewBase, TruEditControlBase, TruEditControlConfigBase, TruEditParentControlConfigBase, TruEditPkeyControlConfigBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGridValidationDialog, TruGridValidationDialogModule, TruGroupBox, TruGroupBoxModule, TruIconModule, TruListControlConfigBase, TruLogin, TruLoginModule, TruMatSelectPanel, TruMatSelectPanelModule, TruModelPropertyLookup, TruNameValue, TruPasswordDialog, TruPasswordDialogModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDate, TruPropertyConfigDecimal, TruPropertyConfigFile, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchConfigBase, TruSearchControlBase, TruSearchControlConfigBase, TruSearchControlRangeBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchResultViewBase, TruSearchResultViewBaseModule, TruSearchResultViewManager, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTableRegistry, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruToolbarUserProfile, TruToolbarUserProfileModule, TruUiNotification, TruUser, TruUtil, TruValidationDialog, TruValidationDialogModule, TruWindowActionEventHandler, TruWindowEventArgs, TruWindowEventHandler };
|
|
6980
7233
|
//# sourceMappingURL=trudb-tru-common-lib.mjs.map
|