@acorex/components 3.0.46 → 3.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/acorex-components.metadata.json +1 -1
- package/bundles/acorex-components.umd.js +171 -80
- package/bundles/acorex-components.umd.js.map +1 -1
- package/bundles/acorex-components.umd.min.js +1 -1
- package/bundles/acorex-components.umd.min.js.map +1 -1
- package/esm2015/lib/calendar/calendar-box/calendar-box.component.js +6 -6
- package/esm2015/lib/date-picker/date-picker.component.js +3 -2
- package/esm2015/lib/dropdown/dropdown.component.js +3 -2
- package/esm2015/lib/menu/menu2.component.js +1 -1
- package/esm2015/lib/property-editor/editors/color-editor/color.editor.js +2 -2
- package/esm2015/lib/property-editor/editors/column-editor/column.editor.js +2 -2
- package/esm2015/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.js +2 -2
- package/esm2015/lib/property-editor/editors/date-editor/date.editor.js +2 -2
- package/esm2015/lib/property-editor/editors/number-editor/number.editor.js +2 -2
- package/esm2015/lib/property-editor/editors/range-editor/range.editor.js +2 -2
- package/esm2015/lib/property-editor/editors/selectbox-editor/selectbox.editor.js +22 -12
- package/esm2015/lib/property-editor/editors/switch-editor/number.editor.js +2 -2
- package/esm2015/lib/property-editor/editors/text-editor/text.editor.js +2 -2
- package/esm2015/lib/property-editor/editors/time-editor/time.editor.js +2 -2
- package/esm2015/lib/property-editor/property-editor-renderer.directive.js +83 -37
- package/esm2015/lib/property-editor/property-editor.class.js +18 -4
- package/esm2015/lib/query-builder/query-builder-rule.component.js +5 -1
- package/esm2015/lib/query-builder/query-builder.service.js +4 -4
- package/esm2015/lib/selection-list/selection-list.component.js +6 -7
- package/esm2015/lib/tab-strip/tab-strip.component.js +11 -9
- package/esm5/lib/calendar/calendar-box/calendar-box.component.js +6 -6
- package/esm5/lib/date-picker/date-picker.component.js +3 -2
- package/esm5/lib/dropdown/dropdown.component.js +3 -2
- package/esm5/lib/menu/menu2.component.js +1 -1
- package/esm5/lib/property-editor/editors/color-editor/color.editor.js +2 -2
- package/esm5/lib/property-editor/editors/column-editor/column.editor.js +2 -2
- package/esm5/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.js +2 -2
- package/esm5/lib/property-editor/editors/date-editor/date.editor.js +2 -2
- package/esm5/lib/property-editor/editors/number-editor/number.editor.js +2 -2
- package/esm5/lib/property-editor/editors/range-editor/range.editor.js +2 -2
- package/esm5/lib/property-editor/editors/selectbox-editor/selectbox.editor.js +26 -12
- package/esm5/lib/property-editor/editors/switch-editor/number.editor.js +2 -2
- package/esm5/lib/property-editor/editors/text-editor/text.editor.js +2 -2
- package/esm5/lib/property-editor/editors/time-editor/time.editor.js +2 -2
- package/esm5/lib/property-editor/property-editor-renderer.directive.js +89 -39
- package/esm5/lib/property-editor/property-editor.class.js +24 -4
- package/esm5/lib/query-builder/query-builder-rule.component.js +5 -1
- package/esm5/lib/query-builder/query-builder.service.js +4 -4
- package/esm5/lib/selection-list/selection-list.component.js +3 -4
- package/esm5/lib/tab-strip/tab-strip.component.js +11 -9
- package/fesm2015/acorex-components.js +159 -82
- package/fesm2015/acorex-components.js.map +1 -1
- package/fesm5/acorex-components.js +172 -81
- package/fesm5/acorex-components.js.map +1 -1
- package/lib/property-editor/editors/selectbox-editor/selectbox.editor.d.ts +7 -4
- package/lib/property-editor/property-editor-renderer.directive.d.ts +5 -3
- package/lib/property-editor/property-editor.class.d.ts +4 -2
- package/package.json +1 -1
|
@@ -1377,7 +1377,7 @@
|
|
|
1377
1377
|
configurable: true
|
|
1378
1378
|
});
|
|
1379
1379
|
AXCalendarBoxComponent.prototype.findDay = function (date) {
|
|
1380
|
-
if (this.dayStyle.find(function (c) { return c.date == date.toISOString().split('T')[0]; })) {
|
|
1380
|
+
if (this.dayStyle.find(function (c) { return c.date.split('T')[0] == date.toISOString().split('T')[0]; })) {
|
|
1381
1381
|
return true;
|
|
1382
1382
|
}
|
|
1383
1383
|
else {
|
|
@@ -1385,16 +1385,16 @@
|
|
|
1385
1385
|
}
|
|
1386
1386
|
};
|
|
1387
1387
|
AXCalendarBoxComponent.prototype.getStyle = function (date) {
|
|
1388
|
-
if (this.dayStyle.find(function (c) { return c.date == date.toISOString().split('T')[0]; })) {
|
|
1389
|
-
return this.dayStyle.find(function (c) { return c.date == date.toISOString().split('T')[0]; }).style;
|
|
1388
|
+
if (this.dayStyle.find(function (c) { return c.date.split('T')[0] == date.toISOString().split('T')[0]; })) {
|
|
1389
|
+
return this.dayStyle.find(function (c) { return c.date.split('T')[0] == date.toISOString().split('T')[0]; }).style;
|
|
1390
1390
|
}
|
|
1391
1391
|
else {
|
|
1392
1392
|
return '';
|
|
1393
1393
|
}
|
|
1394
1394
|
};
|
|
1395
1395
|
AXCalendarBoxComponent.prototype.getTitle = function (date) {
|
|
1396
|
-
if (this.dayStyle.find(function (c) { return c.date == date.toISOString().split('T')[0]; })) {
|
|
1397
|
-
return this.dayStyle.find(function (c) { return c.date == date.toISOString().split('T')[0]; }).text;
|
|
1396
|
+
if (this.dayStyle.find(function (c) { return c.date.split('T')[0] == date.toISOString().split('T')[0]; })) {
|
|
1397
|
+
return this.dayStyle.find(function (c) { return c.date.split('T')[0] == date.toISOString().split('T')[0]; }).text;
|
|
1398
1398
|
}
|
|
1399
1399
|
else {
|
|
1400
1400
|
return '';
|
|
@@ -3448,7 +3448,7 @@
|
|
|
3448
3448
|
selector: 'ax-menu2',
|
|
3449
3449
|
template: "\n <div class=\"ax ax-menu ax-menu-vertical\" [attr.data-level]=\"level\">\n <ax-menu-item\n *ngFor=\"let item of items\"\n [level]=\"level\"\n [item]=\"item\"\n (showSubMenu)=\"showSubmenu($event)\">\n </ax-menu-item>\n </div>\n ",
|
|
3450
3450
|
encapsulation: core.ViewEncapsulation.None,
|
|
3451
|
-
styles: [".ax.ax-menu{display:flex}.ax.ax-menu.ax-menu-vertical[data-level=\"0\"]{display:flex;flex-direction:row}.ax.ax-menu.ax-menu-vertical:not([data-level=\"0\"]){display:flex;transition:opacity .3s;min-width:12em;box-shadow:0 1px 7px 0 var(--ax-border-color);background:#fff;flex-direction:column}.ax.ax-menu.ax-menu-vertical .ax-menu-item{display:flex;white-space:nowrap;cursor:pointer;padding:0 10px;font-weight:400;font-size:1rem;line-height:40px;text-decoration:none;align-items:center}.ax.ax-menu.ax-menu-vertical .ax-menu-item .icon:first-child{-webkit-margin-end:var(--ax-size-md);margin-inline-end:var(--ax-size-md)}.ax.ax-menu.ax-menu-vertical .ax-menu-item .icon:last-child{-webkit-margin-start:var(--ax-size-md);margin-inline-start:var(--ax-size-md)}.ax.ax-menu.ax-menu-vertical .ax-menu-item span{flex:1}.ax.ax-menu.ax-menu-vertical .ax-menu-item.disabled{
|
|
3451
|
+
styles: [".ax.ax-menu{display:flex}.ax.ax-menu.ax-menu-vertical[data-level=\"0\"]{display:flex;flex-direction:row}.ax.ax-menu.ax-menu-vertical:not([data-level=\"0\"]){display:flex;transition:opacity .3s;min-width:12em;box-shadow:0 1px 7px 0 var(--ax-border-color);background:#fff;flex-direction:column}.ax.ax-menu.ax-menu-vertical .ax-menu-item{display:flex;white-space:nowrap;cursor:pointer;padding:0 10px;font-weight:400;font-size:1rem;line-height:40px;text-decoration:none;align-items:center}.ax.ax-menu.ax-menu-vertical .ax-menu-item .icon:first-child{-webkit-margin-end:var(--ax-size-md);margin-inline-end:var(--ax-size-md)}.ax.ax-menu.ax-menu-vertical .ax-menu-item .icon:last-child{-webkit-margin-start:var(--ax-size-md);margin-inline-start:var(--ax-size-md)}.ax.ax-menu.ax-menu-vertical .ax-menu-item span{flex:1}.ax.ax-menu.ax-menu-vertical .ax-menu-item.disabled{opacity:.6;cursor:not-allowed!important}.ax.ax-menu.ax-menu-vertical .ax-menu-item.disabled .icon{color:var(--ax-gray-dark-color)!important}.ax.ax-menu.ax-menu-vertical .ax-menu-item.disabled:hover{cursor:not-allowed!important}"]
|
|
3452
3452
|
}),
|
|
3453
3453
|
__metadata("design:paramtypes", [overlay.Overlay,
|
|
3454
3454
|
core.ViewContainerRef,
|
|
@@ -4225,8 +4225,7 @@
|
|
|
4225
4225
|
}
|
|
4226
4226
|
}
|
|
4227
4227
|
};
|
|
4228
|
-
AXSelectionListComponent.prototype.focus = function () {
|
|
4229
|
-
};
|
|
4228
|
+
AXSelectionListComponent.prototype.focus = function () { };
|
|
4230
4229
|
AXSelectionListComponent.prototype.onvalueChanged = function (e) {
|
|
4231
4230
|
if (!this.disabled) {
|
|
4232
4231
|
this.selectedItemsChange.emit([e]);
|
|
@@ -4292,7 +4291,7 @@
|
|
|
4292
4291
|
AXSelectionListComponent = __decorate([
|
|
4293
4292
|
core.Component({
|
|
4294
4293
|
selector: 'ax-selection-list',
|
|
4295
|
-
template: "<ng-container *ngIf=\" mode == 'multiple'; then checkboxList; else radioButtonList\"></ng-container>\r\n<ng-template #checkboxList>\r\n <div class=\"ax selection-list {{size}}\" [ngClass]=\"direction\">\r\n <ax-check-box label=\"{{item[textField]}}\" *ngFor=\"let item of items\" [disabled]=\"disabled\"
|
|
4294
|
+
template: "<ng-container *ngIf=\" mode == 'multiple'; then checkboxList; else radioButtonList\"></ng-container>\r\n<ng-template #checkboxList>\r\n <div class=\"ax selection-list {{size}}\" [ngClass]=\"direction\">\r\n <ax-check-box label=\"{{item[textField]}}\" *ngFor=\"let item of items\" [disabled]=\"item.disable || disabled\"\r\n [readonly]=\"item.readonly || readonly\" [value]=\"selectedValues.indexOf(item[valueField])>-1\"\r\n (onValueChanged)=\"onCheckValueChange(item[valueField],$event.value)\">\r\n </ax-check-box>\r\n </div>\r\n</ng-template>\r\n<ng-template #radioButtonList>\r\n <div class=\"ax selection-list {{size}}\" [ngClass]=\"direction\">\r\n <label class=\"ax radio\" for=\"{{uid}}\" [class.disabled]=\"disabled\" [class.readonly]=\"disabled\"\r\n *ngFor=\"let item of items\" (click)=\"onvalueChanged(item)\">\r\n {{ item[textField] }}\r\n <input type=\"radio\" (change)=\"onCheckValueChange(item[valueField],true)\" [value]=\"item[valueField]\"\r\n [checked]=\"selectedValues==item[valueField]\" [name]=\"uid\" [disabled]=\"item.disable || disabled\"\r\n [readonly]=\"item.readonly || readonly\" />\r\n <span class=\"checkmark\"></span>\r\n </label>\r\n </div>\r\n</ng-template>",
|
|
4296
4295
|
encapsulation: core.ViewEncapsulation.None,
|
|
4297
4296
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
4298
4297
|
}),
|
|
@@ -5522,7 +5521,8 @@
|
|
|
5522
5521
|
var _this = this;
|
|
5523
5522
|
if (!this.overlayRef) {
|
|
5524
5523
|
var targetEl = document.querySelector('#' + this.uid);
|
|
5525
|
-
var positionStrategy = this.overlay
|
|
5524
|
+
var positionStrategy = this.overlay
|
|
5525
|
+
.position()
|
|
5526
5526
|
.flexibleConnectedTo(targetEl)
|
|
5527
5527
|
.withPositions([
|
|
5528
5528
|
{
|
|
@@ -5712,7 +5712,8 @@
|
|
|
5712
5712
|
this.value = new Date();
|
|
5713
5713
|
};
|
|
5714
5714
|
AXDatePickerComponent.prototype.focus = function () {
|
|
5715
|
-
this.dropdown.focus();
|
|
5715
|
+
// this.dropdown.focus();
|
|
5716
|
+
this.input.focus();
|
|
5716
5717
|
};
|
|
5717
5718
|
AXDatePickerComponent.prototype.convertMaskToDate = function (text) {
|
|
5718
5719
|
if (this.type == 'jalali') {
|
|
@@ -9681,6 +9682,10 @@
|
|
|
9681
9682
|
value: 'not-contains',
|
|
9682
9683
|
text: core$1.AXTranslator.get('queryBuilder.not-contains')
|
|
9683
9684
|
},
|
|
9685
|
+
{
|
|
9686
|
+
value: 'contains-all',
|
|
9687
|
+
text: core$1.AXTranslator.get('queryBuilder.contains-all')
|
|
9688
|
+
},
|
|
9684
9689
|
{
|
|
9685
9690
|
value: 'null',
|
|
9686
9691
|
text: core$1.AXTranslator.get('queryBuilder.null')
|
|
@@ -10240,7 +10245,6 @@
|
|
|
10240
10245
|
return __generator(this, function (_d) {
|
|
10241
10246
|
switch (_d.label) {
|
|
10242
10247
|
case 0:
|
|
10243
|
-
;
|
|
10244
10248
|
if (group.items.length > 0) {
|
|
10245
10249
|
query = ' ( ';
|
|
10246
10250
|
}
|
|
@@ -10298,8 +10302,10 @@
|
|
|
10298
10302
|
case 'end-with':
|
|
10299
10303
|
codeOperator = item.operator;
|
|
10300
10304
|
break;
|
|
10305
|
+
default:
|
|
10306
|
+
codeOperator = item.operator;
|
|
10307
|
+
break;
|
|
10301
10308
|
}
|
|
10302
|
-
;
|
|
10303
10309
|
query = query + ' ' + item.caption + ' ' + codeOperator + ' ' + item.text;
|
|
10304
10310
|
_d.label = 6;
|
|
10305
10311
|
case 6:
|
|
@@ -10342,7 +10348,6 @@
|
|
|
10342
10348
|
var query = '';
|
|
10343
10349
|
switch (type) {
|
|
10344
10350
|
case 'simple':
|
|
10345
|
-
;
|
|
10346
10351
|
if (group.items.length > 0) {
|
|
10347
10352
|
query = ' ( ';
|
|
10348
10353
|
}
|
|
@@ -11846,13 +11851,15 @@
|
|
|
11846
11851
|
}
|
|
11847
11852
|
AXTabStripComponent.prototype.ngOnInit = function () { };
|
|
11848
11853
|
AXTabStripComponent.prototype.handleClick = function (i) {
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
11854
|
+
if (!i.disable) {
|
|
11855
|
+
this.items.forEach(function (c) { return (c.active = false); });
|
|
11856
|
+
i.active = true;
|
|
11857
|
+
this.onTabChanged.emit({
|
|
11858
|
+
component: this,
|
|
11859
|
+
seledtedTab: i,
|
|
11860
|
+
htmlElement: this.ref.nativeElement
|
|
11861
|
+
});
|
|
11862
|
+
}
|
|
11856
11863
|
};
|
|
11857
11864
|
AXTabStripComponent.ctorParameters = function () { return [
|
|
11858
11865
|
{ type: core.ElementRef }
|
|
@@ -11868,7 +11875,7 @@
|
|
|
11868
11875
|
AXTabStripComponent = __decorate([
|
|
11869
11876
|
core.Component({
|
|
11870
11877
|
selector: 'ax-tab-strip',
|
|
11871
|
-
template: "<ul class=\"tab-strip-container\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <li [class.active]=\"item.active\" (click)=\"handleClick(item)\">{{item.text}}</li>\r\n </ng-container>\r\n</ul>"
|
|
11878
|
+
template: "<ul class=\"tab-strip-container\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <li *ngIf=\"!!item.visible || item.visible == undefined\" [class.active]=\"item.active\"\r\n [class.disabled]=\"item.disable\" (click)=\"handleClick(item)\">{{item.text}}</li>\r\n </ng-container>\r\n</ul>"
|
|
11872
11879
|
}),
|
|
11873
11880
|
__metadata("design:paramtypes", [core.ElementRef])
|
|
11874
11881
|
], AXTabStripComponent);
|
|
@@ -14973,12 +14980,25 @@
|
|
|
14973
14980
|
|
|
14974
14981
|
var AXProperyEditorComponent = /** @class */ (function () {
|
|
14975
14982
|
function AXProperyEditorComponent(cdr) {
|
|
14983
|
+
var _this = this;
|
|
14976
14984
|
this.cdr = cdr;
|
|
14977
14985
|
this.readonly = false;
|
|
14978
|
-
this.
|
|
14986
|
+
this._initiated = false;
|
|
14987
|
+
this._valueBound = false;
|
|
14979
14988
|
this.validatableComponentRegistered = new rxjs.Subject();
|
|
14980
14989
|
this.valueChange = new core.EventEmitter();
|
|
14990
|
+
this.onRenderCompleted = new core.EventEmitter();
|
|
14991
|
+
this.onRenderCompleted.subscribe(function () {
|
|
14992
|
+
_this._initiated = true;
|
|
14993
|
+
});
|
|
14981
14994
|
}
|
|
14995
|
+
Object.defineProperty(AXProperyEditorComponent.prototype, "initiated", {
|
|
14996
|
+
get: function () {
|
|
14997
|
+
return this._initiated && this._valueBound;
|
|
14998
|
+
},
|
|
14999
|
+
enumerable: true,
|
|
15000
|
+
configurable: true
|
|
15001
|
+
});
|
|
14982
15002
|
AXProperyEditorComponent.prototype.registerForValidationForm = function (component) {
|
|
14983
15003
|
this.validatableComponentRegistered.next(component);
|
|
14984
15004
|
};
|
|
@@ -14987,10 +15007,15 @@
|
|
|
14987
15007
|
return this._value;
|
|
14988
15008
|
},
|
|
14989
15009
|
set: function (v) {
|
|
15010
|
+
var _this = this;
|
|
14990
15011
|
if (v !== this._value) {
|
|
14991
15012
|
this._value = v;
|
|
14992
15013
|
this.valueChange.emit(v);
|
|
14993
15014
|
this.cdr.detectChanges();
|
|
15015
|
+
//TODO: find better solution
|
|
15016
|
+
setTimeout(function () {
|
|
15017
|
+
_this._valueBound = true;
|
|
15018
|
+
}, 100);
|
|
14994
15019
|
}
|
|
14995
15020
|
},
|
|
14996
15021
|
enumerable: true,
|
|
@@ -14999,12 +15024,14 @@
|
|
|
14999
15024
|
AXProperyEditorComponent.prototype.handleValueChange = function (v) {
|
|
15000
15025
|
this.value = v;
|
|
15001
15026
|
};
|
|
15002
|
-
AXProperyEditorComponent.prototype.initiat = function () {
|
|
15003
|
-
};
|
|
15004
15027
|
__decorate([
|
|
15005
15028
|
core.Output(),
|
|
15006
15029
|
__metadata("design:type", core.EventEmitter)
|
|
15007
15030
|
], AXProperyEditorComponent.prototype, "valueChange", void 0);
|
|
15031
|
+
__decorate([
|
|
15032
|
+
core.Output(),
|
|
15033
|
+
__metadata("design:type", core.EventEmitter)
|
|
15034
|
+
], AXProperyEditorComponent.prototype, "onRenderCompleted", void 0);
|
|
15008
15035
|
__decorate([
|
|
15009
15036
|
core.Input(),
|
|
15010
15037
|
__metadata("design:type", Object),
|
|
@@ -15067,11 +15094,12 @@
|
|
|
15067
15094
|
}
|
|
15068
15095
|
|
|
15069
15096
|
var AXPropertyEditorRendererDirective = /** @class */ (function () {
|
|
15070
|
-
function AXPropertyEditorRendererDirective(target, componentFactoryResolver, renderService) {
|
|
15097
|
+
function AXPropertyEditorRendererDirective(target, componentFactoryResolver, renderService, eventService) {
|
|
15071
15098
|
this.target = target;
|
|
15072
15099
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
15073
15100
|
this.renderService = renderService;
|
|
15074
|
-
this.
|
|
15101
|
+
this.eventService = eventService;
|
|
15102
|
+
this._context = {};
|
|
15075
15103
|
this.onValueChange = new core.EventEmitter();
|
|
15076
15104
|
}
|
|
15077
15105
|
Object.defineProperty(AXPropertyEditorRendererDirective.prototype, "context", {
|
|
@@ -15080,9 +15108,6 @@
|
|
|
15080
15108
|
},
|
|
15081
15109
|
set: function (v) {
|
|
15082
15110
|
this._context = v;
|
|
15083
|
-
if (v && this.instance) {
|
|
15084
|
-
this.assignProps();
|
|
15085
|
-
}
|
|
15086
15111
|
},
|
|
15087
15112
|
enumerable: true,
|
|
15088
15113
|
configurable: true
|
|
@@ -15101,60 +15126,110 @@
|
|
|
15101
15126
|
var cmpRef = _this.target.createComponent(factory);
|
|
15102
15127
|
_this.instance = cmpRef.instance;
|
|
15103
15128
|
_this.subscription = _this.instance.valueChange.subscribe(function (value) {
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
|
|
15129
|
+
var _a, _b;
|
|
15130
|
+
_this.property.value = value;
|
|
15131
|
+
_this.onValueChange.emit(_this.property);
|
|
15132
|
+
if ((_b = (_a = _this.property) === null || _a === void 0 ? void 0 : _a.property) === null || _b === void 0 ? void 0 : _b.name) {
|
|
15133
|
+
setTimeout(function () {
|
|
15134
|
+
_this.eventService.broadcast("props-" + _this.groupId + "-" + _this.property.property.name, _this.property);
|
|
15135
|
+
}, 0);
|
|
15107
15136
|
}
|
|
15108
15137
|
});
|
|
15109
|
-
|
|
15138
|
+
_this.watchChanges();
|
|
15139
|
+
_this.assignProps();
|
|
15140
|
+
_this.instance.value = _this.property.value;
|
|
15141
|
+
// this.instance.onRenderCompleted.subscribe(() => {
|
|
15142
|
+
// });
|
|
15110
15143
|
if (_this.validationForm) {
|
|
15111
15144
|
_this.instance.validatableComponentRegistered.subscribe(function (v) {
|
|
15112
15145
|
_this.validationForm.addWidget(v);
|
|
15113
15146
|
});
|
|
15114
15147
|
}
|
|
15115
|
-
//
|
|
15116
|
-
//setTimeout(() => {
|
|
15117
|
-
_this.instance.readonly = _this.readonly;
|
|
15118
|
-
_this.assignProps();
|
|
15119
|
-
_this.instance.value = _this.property.value;
|
|
15120
|
-
_this.instance.initiat();
|
|
15121
|
-
cmpRef.changeDetectorRef.markForCheck();
|
|
15122
|
-
//});
|
|
15123
15148
|
}
|
|
15124
15149
|
});
|
|
15125
15150
|
};
|
|
15126
|
-
AXPropertyEditorRendererDirective.prototype.
|
|
15151
|
+
AXPropertyEditorRendererDirective.prototype.watchChanges = function () {
|
|
15127
15152
|
var _this = this;
|
|
15153
|
+
var _a, _b;
|
|
15154
|
+
var varsRegx = /((\$\{[a-zA-Z_0-9]+\})+)/gm;
|
|
15155
|
+
var varNameRegx = /[a-zA-Z_0-9]+/gm;
|
|
15128
15156
|
var options = this.property.property.editorOptions;
|
|
15129
15157
|
if (!options) {
|
|
15130
15158
|
return;
|
|
15131
15159
|
}
|
|
15132
15160
|
var _loop_1 = function (p) {
|
|
15161
|
+
if (options.hasOwnProperty(p)) {
|
|
15162
|
+
var opt_1 = options[p];
|
|
15163
|
+
var vars_1 = typeof opt_1 === 'string' ? (_a = opt_1) === null || _a === void 0 ? void 0 : _a.match(varsRegx) : [];
|
|
15164
|
+
// bind the props
|
|
15165
|
+
if ((_b = vars_1) === null || _b === void 0 ? void 0 : _b.length) {
|
|
15166
|
+
vars_1.forEach(function (v) {
|
|
15167
|
+
var _a;
|
|
15168
|
+
var path = ((_a = v.match(varNameRegx)) === null || _a === void 0 ? void 0 : _a.length) ? v.match(varNameRegx)[0] : null;
|
|
15169
|
+
if (path) {
|
|
15170
|
+
_this.eventService.on("props-" + _this.groupId + "-" + path, function (e) {
|
|
15171
|
+
var execCode = opt_1.slice();
|
|
15172
|
+
var params = {};
|
|
15173
|
+
vars_1.forEach(function (vv) {
|
|
15174
|
+
var _a;
|
|
15175
|
+
var p2 = ((_a = vv.match(varNameRegx)) === null || _a === void 0 ? void 0 : _a.length) ? vv.match(varNameRegx)[0] : null;
|
|
15176
|
+
params[p2] = core$1.AXObjectUtil.deepCopy(_this.context[p2]) || null;
|
|
15177
|
+
execCode = execCode.replace(vv, "__params__." + p2);
|
|
15178
|
+
});
|
|
15179
|
+
var func = new Function('__params__', "try { return " + execCode + "} catch(e){ console.log(e); return null; }");
|
|
15180
|
+
var val = func(params);
|
|
15181
|
+
var keys = p.split('.');
|
|
15182
|
+
var prop = Object.assign({}, _this.instance[keys[0]]);
|
|
15183
|
+
if (keys.length > 1) {
|
|
15184
|
+
_this.instance[keys[0]] = core$1.setPropByPath(prop, p, val);
|
|
15185
|
+
}
|
|
15186
|
+
else {
|
|
15187
|
+
core$1.setPropByPath(_this.instance, p, val);
|
|
15188
|
+
}
|
|
15189
|
+
});
|
|
15190
|
+
}
|
|
15191
|
+
});
|
|
15192
|
+
}
|
|
15193
|
+
// else {
|
|
15194
|
+
// this.assignProps();
|
|
15195
|
+
// }
|
|
15196
|
+
}
|
|
15197
|
+
};
|
|
15198
|
+
for (var p in options) {
|
|
15199
|
+
_loop_1(p);
|
|
15200
|
+
}
|
|
15201
|
+
};
|
|
15202
|
+
AXPropertyEditorRendererDirective.prototype.assignProps = function () {
|
|
15203
|
+
var _this = this;
|
|
15204
|
+
var _a, _b;
|
|
15205
|
+
var options = this.property.property.editorOptions;
|
|
15206
|
+
if (!options) {
|
|
15207
|
+
return;
|
|
15208
|
+
}
|
|
15209
|
+
var varsRegx = /((\$\{[a-zA-Z_0-9]+\})+)/gm;
|
|
15210
|
+
var _loop_2 = function (p) {
|
|
15133
15211
|
if (options.hasOwnProperty(p)) {
|
|
15134
15212
|
var opt = options[p];
|
|
15135
|
-
|
|
15136
|
-
|
|
15137
|
-
|
|
15138
|
-
if (val) {
|
|
15139
|
-
this_1.instance[p] = typeof val === 'function' ? val({ data: this_1.context, host: this_1.host }, this_1.property) : val;
|
|
15140
|
-
}
|
|
15213
|
+
var vars = typeof opt === 'string' ? (_a = opt) === null || _a === void 0 ? void 0 : _a.match(varsRegx) : [];
|
|
15214
|
+
if ((_b = vars) === null || _b === void 0 ? void 0 : _b.length) {
|
|
15215
|
+
return "continue";
|
|
15141
15216
|
}
|
|
15142
15217
|
else {
|
|
15143
|
-
var
|
|
15144
|
-
if (
|
|
15145
|
-
|
|
15146
|
-
_this.instance
|
|
15218
|
+
var val_1 = typeof opt === 'function' ? opt({ data: this_1.context, host: this_1.host }, this_1.property) : opt;
|
|
15219
|
+
if (val_1 instanceof Promise) {
|
|
15220
|
+
val_1.then(function (v) {
|
|
15221
|
+
core$1.setPropByPath(_this.instance, p, val_1);
|
|
15147
15222
|
});
|
|
15148
15223
|
}
|
|
15149
15224
|
else {
|
|
15150
|
-
this_1.instance
|
|
15225
|
+
core$1.setPropByPath(this_1.instance, p, val_1);
|
|
15151
15226
|
}
|
|
15152
15227
|
}
|
|
15153
15228
|
}
|
|
15154
15229
|
};
|
|
15155
15230
|
var this_1 = this;
|
|
15156
15231
|
for (var p in options) {
|
|
15157
|
-
|
|
15232
|
+
_loop_2(p);
|
|
15158
15233
|
}
|
|
15159
15234
|
};
|
|
15160
15235
|
AXPropertyEditorRendererDirective.prototype.ngOnDestroy = function () {
|
|
@@ -15165,16 +15240,13 @@
|
|
|
15165
15240
|
AXPropertyEditorRendererDirective.ctorParameters = function () { return [
|
|
15166
15241
|
{ type: core.ViewContainerRef },
|
|
15167
15242
|
{ type: core.ComponentFactoryResolver },
|
|
15168
|
-
{ type: core$1.AXRenderService }
|
|
15243
|
+
{ type: core$1.AXRenderService },
|
|
15244
|
+
{ type: core$1.AXEventService }
|
|
15169
15245
|
]; };
|
|
15170
15246
|
__decorate([
|
|
15171
15247
|
core.Input(),
|
|
15172
15248
|
__metadata("design:type", Object)
|
|
15173
15249
|
], AXPropertyEditorRendererDirective.prototype, "property", void 0);
|
|
15174
|
-
__decorate([
|
|
15175
|
-
core.Input(),
|
|
15176
|
-
__metadata("design:type", Boolean)
|
|
15177
|
-
], AXPropertyEditorRendererDirective.prototype, "readonly", void 0);
|
|
15178
15250
|
__decorate([
|
|
15179
15251
|
core.Input(),
|
|
15180
15252
|
__metadata("design:type", AXValidationFormComponent)
|
|
@@ -15188,6 +15260,10 @@
|
|
|
15188
15260
|
core.Input(),
|
|
15189
15261
|
__metadata("design:type", Object)
|
|
15190
15262
|
], AXPropertyEditorRendererDirective.prototype, "host", void 0);
|
|
15263
|
+
__decorate([
|
|
15264
|
+
core.Input(),
|
|
15265
|
+
__metadata("design:type", Object)
|
|
15266
|
+
], AXPropertyEditorRendererDirective.prototype, "groupId", void 0);
|
|
15191
15267
|
__decorate([
|
|
15192
15268
|
core.Output(),
|
|
15193
15269
|
__metadata("design:type", core.EventEmitter)
|
|
@@ -15198,7 +15274,8 @@
|
|
|
15198
15274
|
}),
|
|
15199
15275
|
__metadata("design:paramtypes", [core.ViewContainerRef,
|
|
15200
15276
|
core.ComponentFactoryResolver,
|
|
15201
|
-
core$1.AXRenderService
|
|
15277
|
+
core$1.AXRenderService,
|
|
15278
|
+
core$1.AXEventService])
|
|
15202
15279
|
], AXPropertyEditorRendererDirective);
|
|
15203
15280
|
return AXPropertyEditorRendererDirective;
|
|
15204
15281
|
}());
|
|
@@ -15216,7 +15293,7 @@
|
|
|
15216
15293
|
};
|
|
15217
15294
|
AXTextPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15218
15295
|
this.registerForValidationForm(this.textBox);
|
|
15219
|
-
this.
|
|
15296
|
+
this.onRenderCompleted.emit();
|
|
15220
15297
|
};
|
|
15221
15298
|
AXTextPropertyEditorComponent.ctorParameters = function () { return [
|
|
15222
15299
|
{ type: core.ChangeDetectorRef }
|
|
@@ -15266,8 +15343,8 @@
|
|
|
15266
15343
|
_super.prototype.handleValueChange.call(this, e.value);
|
|
15267
15344
|
};
|
|
15268
15345
|
AXNumberBoxPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15269
|
-
this.initiated = true;
|
|
15270
15346
|
this.registerForValidationForm(this.textBox);
|
|
15347
|
+
this.onRenderCompleted.emit();
|
|
15271
15348
|
};
|
|
15272
15349
|
AXNumberBoxPropertyEditorComponent.ctorParameters = function () { return [
|
|
15273
15350
|
{ type: core.ChangeDetectorRef }
|
|
@@ -15312,16 +15389,18 @@
|
|
|
15312
15389
|
_this.selectionDataMode = 'value';
|
|
15313
15390
|
_this.allowSearch = true;
|
|
15314
15391
|
_this.allowNull = false;
|
|
15392
|
+
_this.disabled = false;
|
|
15315
15393
|
_this.items = [];
|
|
15316
15394
|
_this.remoteOperation = false;
|
|
15317
15395
|
_this.provideData = function (e) {
|
|
15318
15396
|
return new Promise(function (resolve) {
|
|
15319
15397
|
var func = function () {
|
|
15320
15398
|
if (Array.isArray(_this.items)) {
|
|
15321
|
-
resolve(_this.items);
|
|
15399
|
+
resolve(_this.items.slice());
|
|
15322
15400
|
}
|
|
15323
15401
|
else if (typeof _this.items === 'function') {
|
|
15324
|
-
|
|
15402
|
+
var a = Object.assign(e, { sender: _this });
|
|
15403
|
+
resolve(_this.items(a));
|
|
15325
15404
|
}
|
|
15326
15405
|
else {
|
|
15327
15406
|
resolve([]);
|
|
@@ -15337,26 +15416,38 @@
|
|
|
15337
15416
|
};
|
|
15338
15417
|
return _this;
|
|
15339
15418
|
}
|
|
15419
|
+
Object.defineProperty(AXSelectBoxPropertyEditorComponent.prototype, "filter", {
|
|
15420
|
+
get: function () {
|
|
15421
|
+
return this._filter;
|
|
15422
|
+
},
|
|
15423
|
+
set: function (v) {
|
|
15424
|
+
var _a;
|
|
15425
|
+
this._filter = v;
|
|
15426
|
+
if (this.value && this.initiated) {
|
|
15427
|
+
this.value = null;
|
|
15428
|
+
(_a = this.selectBox) === null || _a === void 0 ? void 0 : _a.refresh();
|
|
15429
|
+
}
|
|
15430
|
+
},
|
|
15431
|
+
enumerable: true,
|
|
15432
|
+
configurable: true
|
|
15433
|
+
});
|
|
15340
15434
|
AXSelectBoxPropertyEditorComponent.prototype.handleValueChange = function (e) {
|
|
15341
|
-
_super.prototype.handleValueChange.call(this, e.
|
|
15435
|
+
_super.prototype.handleValueChange.call(this, e.selectedValues);
|
|
15342
15436
|
};
|
|
15343
15437
|
AXSelectBoxPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15344
|
-
this.selectBox.refresh();
|
|
15345
15438
|
this.registerForValidationForm(this.selectBox);
|
|
15346
|
-
|
|
15347
|
-
AXSelectBoxPropertyEditorComponent.prototype.initiat = function () {
|
|
15348
|
-
this.initiated = true;
|
|
15439
|
+
this.onRenderCompleted.emit();
|
|
15349
15440
|
};
|
|
15350
15441
|
AXSelectBoxPropertyEditorComponent.ctorParameters = function () { return [
|
|
15351
15442
|
{ type: core.ChangeDetectorRef }
|
|
15352
15443
|
]; };
|
|
15353
15444
|
__decorate([
|
|
15354
|
-
core.ViewChild(
|
|
15355
|
-
__metadata("design:type",
|
|
15445
|
+
core.ViewChild(AXSelectBoxComponent, { static: true }),
|
|
15446
|
+
__metadata("design:type", AXSelectBoxComponent)
|
|
15356
15447
|
], AXSelectBoxPropertyEditorComponent.prototype, "selectBox", void 0);
|
|
15357
15448
|
AXSelectBoxPropertyEditorComponent = __decorate([
|
|
15358
15449
|
core.Component({
|
|
15359
|
-
template: "<ax-select-
|
|
15450
|
+
template: "<ax-select-box [mode]=\"selectionMode\"\r\n [textField]=\"textField\" \r\n [valueField]=\"valueField\" \r\n [selectedValues]=\"value\" \r\n [remoteOperation]=\"remoteOperation\"\r\n [allowSearch]=\"allowSearch\" \r\n [allowNull]=\"allowNull\"\r\n [readonly]=\"readonly\"\r\n [disabled]=\"disabled\"\r\n (selectionChanged)=\"handleValueChange($event)\">\r\n <ax-data-source [provideData]=\"provideData\">\r\n </ax-data-source>\r\n <ax-validation [rules]=\"validation?.rules\">\r\n </ax-validation>\r\n</ax-select-box>"
|
|
15360
15451
|
}),
|
|
15361
15452
|
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
15362
15453
|
], AXSelectBoxPropertyEditorComponent);
|
|
@@ -15395,7 +15486,7 @@
|
|
|
15395
15486
|
this.cdr.detectChanges();
|
|
15396
15487
|
};
|
|
15397
15488
|
AXRangePropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15398
|
-
this.
|
|
15489
|
+
this.onRenderCompleted.emit();
|
|
15399
15490
|
};
|
|
15400
15491
|
// getRanges() {
|
|
15401
15492
|
// return this.ranges.sort((a, b) => a.minValue - b.minValue);
|
|
@@ -16101,7 +16192,7 @@
|
|
|
16101
16192
|
}
|
|
16102
16193
|
AXColorPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16103
16194
|
this.registerForValidationForm(this.textBox);
|
|
16104
|
-
this.
|
|
16195
|
+
this.onRenderCompleted.emit();
|
|
16105
16196
|
};
|
|
16106
16197
|
AXColorPropertyEditorComponent.ctorParameters = function () { return [
|
|
16107
16198
|
{ type: core.ChangeDetectorRef }
|
|
@@ -16159,7 +16250,7 @@
|
|
|
16159
16250
|
this.columns = this.value ? JSON.parse(JSON.stringify(this.value)) : [];
|
|
16160
16251
|
};
|
|
16161
16252
|
ColumnPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16162
|
-
this.
|
|
16253
|
+
this.onRenderCompleted.emit();
|
|
16163
16254
|
};
|
|
16164
16255
|
ColumnPropertyEditorComponent.prototype.drop = function (event) {
|
|
16165
16256
|
dragDrop.moveItemInArray(this.columns, event.previousIndex, event.currentIndex);
|
|
@@ -16319,8 +16410,8 @@
|
|
|
16319
16410
|
].filter(function (c) { return c.dataTypes == null || c.dataTypes.includes(_this.dataType); });
|
|
16320
16411
|
};
|
|
16321
16412
|
AXConditionalColorPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16322
|
-
this.initiated = true;
|
|
16323
16413
|
this.cdr.detectChanges();
|
|
16414
|
+
this.onRenderCompleted.emit();
|
|
16324
16415
|
};
|
|
16325
16416
|
AXConditionalColorPropertyEditorComponent.prototype.handleEditClick = function (item) {
|
|
16326
16417
|
var _this = this;
|
|
@@ -16519,7 +16610,7 @@
|
|
|
16519
16610
|
_super.prototype.handleValueChange.call(this, e.value);
|
|
16520
16611
|
};
|
|
16521
16612
|
AXSwitchPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16522
|
-
this.
|
|
16613
|
+
this.onRenderCompleted.emit();
|
|
16523
16614
|
};
|
|
16524
16615
|
AXSwitchPropertyEditorComponent.ctorParameters = function () { return [
|
|
16525
16616
|
{ type: core.ChangeDetectorRef }
|
|
@@ -16568,8 +16659,8 @@
|
|
|
16568
16659
|
_super.prototype.handleValueChange.call(this, e.value);
|
|
16569
16660
|
};
|
|
16570
16661
|
AXDatePropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16571
|
-
this.initiated = true;
|
|
16572
16662
|
this.registerForValidationForm(this.date);
|
|
16663
|
+
this.onRenderCompleted.emit();
|
|
16573
16664
|
};
|
|
16574
16665
|
AXDatePropertyEditorComponent.ctorParameters = function () { return [
|
|
16575
16666
|
{ type: core.ChangeDetectorRef }
|
|
@@ -16617,8 +16708,8 @@
|
|
|
16617
16708
|
_super.prototype.handleValueChange.call(this, (_a = e.value) === null || _a === void 0 ? void 0 : _a.time);
|
|
16618
16709
|
};
|
|
16619
16710
|
AXTimePropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16620
|
-
this.initiated = true;
|
|
16621
16711
|
this.registerForValidationForm(this.time);
|
|
16712
|
+
this.onRenderCompleted.emit();
|
|
16622
16713
|
};
|
|
16623
16714
|
AXTimePropertyEditorComponent.ctorParameters = function () { return [
|
|
16624
16715
|
{ type: core.ChangeDetectorRef }
|