@acorex/components 3.0.45 → 3.0.50
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 +164 -76
- 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/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/selectbox/selectbox.component.js +6 -3
- 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/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/selectbox/selectbox.component.js +6 -3
- 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 +152 -78
- package/fesm2015/acorex-components.js.map +1 -1
- package/fesm5/acorex-components.js +165 -77
- 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 '';
|
|
@@ -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
|
}),
|
|
@@ -8720,7 +8719,10 @@
|
|
|
8720
8719
|
v = [];
|
|
8721
8720
|
}
|
|
8722
8721
|
// const old = this.selectedItems;
|
|
8723
|
-
|
|
8722
|
+
var f = lodash.differenceBy(old, v, this.valueField);
|
|
8723
|
+
var s = lodash.differenceBy(v, old, this.valueField);
|
|
8724
|
+
// if (JSON.stringify(old) !== JSON.stringify(v)) {
|
|
8725
|
+
if (f.length != 0 || s.length != 0) {
|
|
8724
8726
|
this._selectedItems = this.mode == 'single' ? v.slice(0, 1) : __spread(new Set(v)); //[...new Set(v[0])] : [...new Set(v)];
|
|
8725
8727
|
this._selectedItems.forEach(function (c) { return (c.selected = true); });
|
|
8726
8728
|
this.selectedItemsChange.emit(this._selectedItems);
|
|
@@ -9627,7 +9629,7 @@
|
|
|
9627
9629
|
AXSelectBoxComponent = AXSelectBoxComponent_1 = __decorate([
|
|
9628
9630
|
core.Component({
|
|
9629
9631
|
selector: 'ax-select-box',
|
|
9630
|
-
template: "<ax-drop-down [size]=\"size\" [rtl]=\"rtl\" [showDropDownButton]=\"showDropDownButton\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" #d (dropdownToggle)=\"dropdownToggleSelecBox($event)\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container header>\r\n <div class=\"ax chips-container\" [horizontalScroll]=\"40\">\r\n <div class=\"chips\" [class.chips-blank]=\"mode === 'single'\" [title]=\"item[textField]\"\r\n *ngFor=\"let item of selectedItems\">\r\n <span class=\"chips-text\">\r\n {{item[textField]}}\r\n </span>\r\n <span class=\"close-icon\" (click)=\"handleItemRemoveClick(item)\"\r\n *ngIf=\"(readonly!=true || itemRemove ==true)&& disabled!=true && (allowNull==true || (selectedItems.length > 1))\">\r\n <i class=\"far fa-times-circle close\"></i>\r\n </span>\r\n </div>\r\n <div class=\"search-wrapper\" (click)=\"onTextBoxClick($event)\">\r\n <ax-text-box #textBoxSelectBox [textAlign]=\"textAlign\"\r\n [placeholder]=\"selectedItems.length == 0 ? placeholder : ''\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" (onkey)=\"handleKeyEvent($event)\" [size]=\"size\"\r\n (onFocus)=\"onFocusTextBox($event)\">\r\n </ax-text-box>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container end>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container panel>\r\n <div *ngIf=\"allowSearch\" class=\"search-wrapper\" style=\"padding: 0.7em;\">\r\n <ax-search-box #serchBox [(value)]=\"text\" (onkey)=\"handleKeyEventSearch($event)\"\r\n (textChanged)=\"textChanged($event)\" (onButtonClick)=\"textChanged($event)\">\r\n </ax-search-box>\r\n </div>\r\n <div class=\"ax list-container\">\r\n <div #listContainer style=\"max-height: 300px;overflow-y: auto;width: 100%;\" (scroll)=\"scrolled($event)\">\r\n <ng-container *ngIf=\"getItems().length>0; then thenTemplate; else elseTemplate\"></ng-container>\r\n <ng-template #thenTemplate>\r\n <div class=\"list-item\" *ngFor=\"let item of getItems();let i = index\"\r\n [class.focused]=\"i==currentfocusedIndex\" [class.selected]=\"isItemSelected(item)\"\r\n (click)=\"handleItemClick($event,item)\">\r\n <div style=\"display: flex;\">\r\n <ax-check-box *ngIf=\"showCheckBox\" [size]=\"size\" [value]=\"isItemSelected(item)\"\r\n [disabled]=\"!allowNull && selectedItems.length === 1 && isItemSelected(item)\">\r\n </ax-check-box>\r\n <ng-container *ngIf=\"rowTemplate; else elseTemplate\">\r\n <div style=\"white-space: nowrap;text-overflow: ellipsis;overflow: hidden;\"\r\n [title]=\"item[textField]\"\r\n [ngStyle]=\"(showCheckBox) ? {'padding-inline-start': '0.5rem'}:''\">\r\n <ng-container *ngTemplateOutlet=\"rowTemplate; context:{ $implicit: item }\">\r\n </ng-container>\r\n </div>\r\n\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <div style=\"white-space: nowrap;text-overflow: ellipsis;overflow: hidden;\"\r\n [title]=\"item[textField]\"\r\n [ngStyle]=\"(showCheckBox) ? {'padding-inline-start': '0.5rem'}:''\">\r\n {{ item[textField] }}\r\n </div>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </ng-template>\r\n <div *ngIf=\"showLoading\" class=\"ax-pad-sm\" style=\"text-align: center;\">\r\n <i class=\"far fa-spinner-third fa-pulse fa-2x\" style=\"color: var(--ax-primary-color);\"></i>\r\n\r\n </div>\r\n <!-- <ax-loading-indicator ></ax-loading-indicator> -->\r\n <ng-template #elseTemplate>\r\n <ng-container *ngIf=\"showLoading == true; then searchTemplate else noDataTemplate\"></ng-container>\r\n <ng-template #searchTemplate>\r\n <div class=\"list-item\">\r\n {{'common.searching' | trans}}\r\n </div>\r\n </ng-template>\r\n <ng-template #noDataTemplate>\r\n <div class=\"list-item\">\r\n {{'common.noDataFound' | trans}}\r\n </div>\r\n </ng-template>\r\n\r\n </ng-template>\r\n\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n\r\n</ax-drop-down>",
|
|
9632
|
+
template: "<ax-drop-down [size]=\"size\" [rtl]=\"rtl\" [showDropDownButton]=\"showDropDownButton\" [disabled]=\"disabled\"\r\n [readonly]=\"readonly\" #d (dropdownToggle)=\"dropdownToggleSelecBox($event)\">\r\n <ng-container start>\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n </ng-container>\r\n <ng-container header>\r\n <div class=\"ax chips-container\" [horizontalScroll]=\"40\">\r\n <div class=\"chips\" [class.chips-blank]=\"mode === 'single'\" [title]=\"item[textField]\"\r\n *ngFor=\"let item of selectedItems\">\r\n <span class=\"chips-text\">\r\n {{item[textField]}}\r\n </span>\r\n <span class=\"close-icon\" (click)=\"handleItemRemoveClick(item)\"\r\n *ngIf=\"(readonly!=true || itemRemove ==true)&& disabled!=true && (allowNull==true || (selectedItems.length > 1))\">\r\n <i class=\"far fa-times-circle close\"></i>\r\n </span>\r\n </div>\r\n <div class=\"search-wrapper\" (click)=\"onTextBoxClick($event)\">\r\n <ax-text-box #textBoxSelectBox [textAlign]=\"textAlign\"\r\n [placeholder]=\"selectedItems.length == 0 ? placeholder : ''\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" (onkey)=\"handleKeyEvent($event)\" [size]=\"size\"\r\n (onFocus)=\"onFocusTextBox($event)\">\r\n </ax-text-box>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container end>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container panel>\r\n <div *ngIf=\"allowSearch\" class=\"search-wrapper\" style=\"padding: 0.7em;\">\r\n <ax-search-box #serchBox [(value)]=\"text\" (onkey)=\"handleKeyEventSearch($event)\"\r\n (textChanged)=\"textChanged($event)\" (onButtonClick)=\"textChanged($event)\">\r\n </ax-search-box>\r\n </div>\r\n <div class=\"ax list-container\">\r\n <div #listContainer style=\"max-height: 300px;overflow-y: auto;width: 100%;\" (scroll)=\"scrolled($event)\">\r\n <ng-container *ngIf=\"getItems().length>0; then thenTemplate; else elseTemplate\"></ng-container>\r\n <ng-template #thenTemplate>\r\n <div class=\"list-item\" *ngFor=\"let item of getItems();let i = index\"\r\n [class.focused]=\"i==currentfocusedIndex\" [class.selected]=\"isItemSelected(item)\"\r\n (click)=\"handleItemClick($event,item)\">\r\n <div style=\"display: flex;\">\r\n <ax-check-box *ngIf=\"showCheckBox\" [size]=\"size\" [value]=\"isItemSelected(item)\"\r\n [disabled]=\"!allowNull && selectedItems.length === 1 && isItemSelected(item)\"\r\n (onClick)=\"handleItemClick($event,item)\">\r\n </ax-check-box>\r\n <ng-container *ngIf=\"rowTemplate; else elseTemplate\">\r\n <div style=\"white-space: nowrap;text-overflow: ellipsis;overflow: hidden;\"\r\n [title]=\"item[textField]\"\r\n [ngStyle]=\"(showCheckBox) ? {'padding-inline-start': '0.5rem'}:''\">\r\n <ng-container *ngTemplateOutlet=\"rowTemplate; context:{ $implicit: item }\">\r\n </ng-container>\r\n </div>\r\n\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <div style=\"white-space: nowrap;text-overflow: ellipsis;overflow: hidden;\"\r\n [title]=\"item[textField]\"\r\n [ngStyle]=\"(showCheckBox) ? {'padding-inline-start': '0.5rem'}:''\">\r\n {{ item[textField] }}\r\n </div>\r\n </ng-template>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </ng-template>\r\n <div *ngIf=\"showLoading\" class=\"ax-pad-sm\" style=\"text-align: center;\">\r\n <i class=\"far fa-spinner-third fa-pulse fa-2x\" style=\"color: var(--ax-primary-color);\"></i>\r\n\r\n </div>\r\n <!-- <ax-loading-indicator ></ax-loading-indicator> -->\r\n <ng-template #elseTemplate>\r\n <ng-container *ngIf=\"showLoading == true; then searchTemplate else noDataTemplate\"></ng-container>\r\n <ng-template #searchTemplate>\r\n <div class=\"list-item\">\r\n {{'common.searching' | trans}}\r\n </div>\r\n </ng-template>\r\n <ng-template #noDataTemplate>\r\n <div class=\"list-item\">\r\n {{'common.noDataFound' | trans}}\r\n </div>\r\n </ng-template>\r\n\r\n </ng-template>\r\n\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n\r\n</ax-drop-down>",
|
|
9631
9633
|
encapsulation: core.ViewEncapsulation.None,
|
|
9632
9634
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
9633
9635
|
host: { style: 'width: 100%' },
|
|
@@ -11843,13 +11845,15 @@
|
|
|
11843
11845
|
}
|
|
11844
11846
|
AXTabStripComponent.prototype.ngOnInit = function () { };
|
|
11845
11847
|
AXTabStripComponent.prototype.handleClick = function (i) {
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11848
|
+
if (!i.disable) {
|
|
11849
|
+
this.items.forEach(function (c) { return (c.active = false); });
|
|
11850
|
+
i.active = true;
|
|
11851
|
+
this.onTabChanged.emit({
|
|
11852
|
+
component: this,
|
|
11853
|
+
seledtedTab: i,
|
|
11854
|
+
htmlElement: this.ref.nativeElement
|
|
11855
|
+
});
|
|
11856
|
+
}
|
|
11853
11857
|
};
|
|
11854
11858
|
AXTabStripComponent.ctorParameters = function () { return [
|
|
11855
11859
|
{ type: core.ElementRef }
|
|
@@ -11865,7 +11869,7 @@
|
|
|
11865
11869
|
AXTabStripComponent = __decorate([
|
|
11866
11870
|
core.Component({
|
|
11867
11871
|
selector: 'ax-tab-strip',
|
|
11868
|
-
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>"
|
|
11872
|
+
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>"
|
|
11869
11873
|
}),
|
|
11870
11874
|
__metadata("design:paramtypes", [core.ElementRef])
|
|
11871
11875
|
], AXTabStripComponent);
|
|
@@ -14970,12 +14974,25 @@
|
|
|
14970
14974
|
|
|
14971
14975
|
var AXProperyEditorComponent = /** @class */ (function () {
|
|
14972
14976
|
function AXProperyEditorComponent(cdr) {
|
|
14977
|
+
var _this = this;
|
|
14973
14978
|
this.cdr = cdr;
|
|
14974
14979
|
this.readonly = false;
|
|
14975
|
-
this.
|
|
14980
|
+
this._initiated = false;
|
|
14981
|
+
this._valueBound = false;
|
|
14976
14982
|
this.validatableComponentRegistered = new rxjs.Subject();
|
|
14977
14983
|
this.valueChange = new core.EventEmitter();
|
|
14984
|
+
this.onRenderCompleted = new core.EventEmitter();
|
|
14985
|
+
this.onRenderCompleted.subscribe(function () {
|
|
14986
|
+
_this._initiated = true;
|
|
14987
|
+
});
|
|
14978
14988
|
}
|
|
14989
|
+
Object.defineProperty(AXProperyEditorComponent.prototype, "initiated", {
|
|
14990
|
+
get: function () {
|
|
14991
|
+
return this._initiated && this._valueBound;
|
|
14992
|
+
},
|
|
14993
|
+
enumerable: true,
|
|
14994
|
+
configurable: true
|
|
14995
|
+
});
|
|
14979
14996
|
AXProperyEditorComponent.prototype.registerForValidationForm = function (component) {
|
|
14980
14997
|
this.validatableComponentRegistered.next(component);
|
|
14981
14998
|
};
|
|
@@ -14984,10 +15001,15 @@
|
|
|
14984
15001
|
return this._value;
|
|
14985
15002
|
},
|
|
14986
15003
|
set: function (v) {
|
|
15004
|
+
var _this = this;
|
|
14987
15005
|
if (v !== this._value) {
|
|
14988
15006
|
this._value = v;
|
|
14989
15007
|
this.valueChange.emit(v);
|
|
14990
15008
|
this.cdr.detectChanges();
|
|
15009
|
+
//TODO: find better solution
|
|
15010
|
+
setTimeout(function () {
|
|
15011
|
+
_this._valueBound = true;
|
|
15012
|
+
}, 100);
|
|
14991
15013
|
}
|
|
14992
15014
|
},
|
|
14993
15015
|
enumerable: true,
|
|
@@ -14996,12 +15018,14 @@
|
|
|
14996
15018
|
AXProperyEditorComponent.prototype.handleValueChange = function (v) {
|
|
14997
15019
|
this.value = v;
|
|
14998
15020
|
};
|
|
14999
|
-
AXProperyEditorComponent.prototype.initiat = function () {
|
|
15000
|
-
};
|
|
15001
15021
|
__decorate([
|
|
15002
15022
|
core.Output(),
|
|
15003
15023
|
__metadata("design:type", core.EventEmitter)
|
|
15004
15024
|
], AXProperyEditorComponent.prototype, "valueChange", void 0);
|
|
15025
|
+
__decorate([
|
|
15026
|
+
core.Output(),
|
|
15027
|
+
__metadata("design:type", core.EventEmitter)
|
|
15028
|
+
], AXProperyEditorComponent.prototype, "onRenderCompleted", void 0);
|
|
15005
15029
|
__decorate([
|
|
15006
15030
|
core.Input(),
|
|
15007
15031
|
__metadata("design:type", Object),
|
|
@@ -15064,11 +15088,12 @@
|
|
|
15064
15088
|
}
|
|
15065
15089
|
|
|
15066
15090
|
var AXPropertyEditorRendererDirective = /** @class */ (function () {
|
|
15067
|
-
function AXPropertyEditorRendererDirective(target, componentFactoryResolver, renderService) {
|
|
15091
|
+
function AXPropertyEditorRendererDirective(target, componentFactoryResolver, renderService, eventService) {
|
|
15068
15092
|
this.target = target;
|
|
15069
15093
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
15070
15094
|
this.renderService = renderService;
|
|
15071
|
-
this.
|
|
15095
|
+
this.eventService = eventService;
|
|
15096
|
+
this._context = {};
|
|
15072
15097
|
this.onValueChange = new core.EventEmitter();
|
|
15073
15098
|
}
|
|
15074
15099
|
Object.defineProperty(AXPropertyEditorRendererDirective.prototype, "context", {
|
|
@@ -15077,9 +15102,6 @@
|
|
|
15077
15102
|
},
|
|
15078
15103
|
set: function (v) {
|
|
15079
15104
|
this._context = v;
|
|
15080
|
-
if (v && this.instance) {
|
|
15081
|
-
this.assignProps();
|
|
15082
|
-
}
|
|
15083
15105
|
},
|
|
15084
15106
|
enumerable: true,
|
|
15085
15107
|
configurable: true
|
|
@@ -15098,60 +15120,110 @@
|
|
|
15098
15120
|
var cmpRef = _this.target.createComponent(factory);
|
|
15099
15121
|
_this.instance = cmpRef.instance;
|
|
15100
15122
|
_this.subscription = _this.instance.valueChange.subscribe(function (value) {
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15123
|
+
var _a, _b;
|
|
15124
|
+
_this.property.value = value;
|
|
15125
|
+
_this.onValueChange.emit(_this.property);
|
|
15126
|
+
if ((_b = (_a = _this.property) === null || _a === void 0 ? void 0 : _a.property) === null || _b === void 0 ? void 0 : _b.name) {
|
|
15127
|
+
setTimeout(function () {
|
|
15128
|
+
_this.eventService.broadcast("props-" + _this.groupId + "-" + _this.property.property.name, _this.property);
|
|
15129
|
+
}, 0);
|
|
15104
15130
|
}
|
|
15105
15131
|
});
|
|
15106
|
-
|
|
15132
|
+
_this.watchChanges();
|
|
15133
|
+
_this.assignProps();
|
|
15134
|
+
_this.instance.value = _this.property.value;
|
|
15135
|
+
// this.instance.onRenderCompleted.subscribe(() => {
|
|
15136
|
+
// });
|
|
15107
15137
|
if (_this.validationForm) {
|
|
15108
15138
|
_this.instance.validatableComponentRegistered.subscribe(function (v) {
|
|
15109
15139
|
_this.validationForm.addWidget(v);
|
|
15110
15140
|
});
|
|
15111
15141
|
}
|
|
15112
|
-
//
|
|
15113
|
-
//setTimeout(() => {
|
|
15114
|
-
_this.instance.readonly = _this.readonly;
|
|
15115
|
-
_this.assignProps();
|
|
15116
|
-
_this.instance.value = _this.property.value;
|
|
15117
|
-
_this.instance.initiat();
|
|
15118
|
-
cmpRef.changeDetectorRef.markForCheck();
|
|
15119
|
-
//});
|
|
15120
15142
|
}
|
|
15121
15143
|
});
|
|
15122
15144
|
};
|
|
15123
|
-
AXPropertyEditorRendererDirective.prototype.
|
|
15145
|
+
AXPropertyEditorRendererDirective.prototype.watchChanges = function () {
|
|
15124
15146
|
var _this = this;
|
|
15147
|
+
var _a, _b;
|
|
15148
|
+
var varsRegx = /((\$\{[a-zA-Z_0-9]+\})+)/gm;
|
|
15149
|
+
var varNameRegx = /[a-zA-Z_0-9]+/gm;
|
|
15125
15150
|
var options = this.property.property.editorOptions;
|
|
15126
15151
|
if (!options) {
|
|
15127
15152
|
return;
|
|
15128
15153
|
}
|
|
15129
15154
|
var _loop_1 = function (p) {
|
|
15155
|
+
if (options.hasOwnProperty(p)) {
|
|
15156
|
+
var opt_1 = options[p];
|
|
15157
|
+
var vars_1 = typeof opt_1 === 'string' ? (_a = opt_1) === null || _a === void 0 ? void 0 : _a.match(varsRegx) : [];
|
|
15158
|
+
// bind the props
|
|
15159
|
+
if ((_b = vars_1) === null || _b === void 0 ? void 0 : _b.length) {
|
|
15160
|
+
vars_1.forEach(function (v) {
|
|
15161
|
+
var _a;
|
|
15162
|
+
var path = ((_a = v.match(varNameRegx)) === null || _a === void 0 ? void 0 : _a.length) ? v.match(varNameRegx)[0] : null;
|
|
15163
|
+
if (path) {
|
|
15164
|
+
_this.eventService.on("props-" + _this.groupId + "-" + path, function (e) {
|
|
15165
|
+
var execCode = opt_1.slice();
|
|
15166
|
+
var params = {};
|
|
15167
|
+
vars_1.forEach(function (vv) {
|
|
15168
|
+
var _a;
|
|
15169
|
+
var p2 = ((_a = vv.match(varNameRegx)) === null || _a === void 0 ? void 0 : _a.length) ? vv.match(varNameRegx)[0] : null;
|
|
15170
|
+
params[p2] = core$1.AXObjectUtil.deepCopy(_this.context[p2]) || null;
|
|
15171
|
+
execCode = execCode.replace(vv, "__params__." + p2);
|
|
15172
|
+
});
|
|
15173
|
+
var func = new Function('__params__', "try { return " + execCode + "} catch(e){ console.log(e); return null; }");
|
|
15174
|
+
var val = func(params);
|
|
15175
|
+
var keys = p.split('.');
|
|
15176
|
+
var prop = Object.assign({}, _this.instance[keys[0]]);
|
|
15177
|
+
if (keys.length > 1) {
|
|
15178
|
+
_this.instance[keys[0]] = core$1.setPropByPath(prop, p, val);
|
|
15179
|
+
}
|
|
15180
|
+
else {
|
|
15181
|
+
core$1.setPropByPath(_this.instance, p, val);
|
|
15182
|
+
}
|
|
15183
|
+
});
|
|
15184
|
+
}
|
|
15185
|
+
});
|
|
15186
|
+
}
|
|
15187
|
+
// else {
|
|
15188
|
+
// this.assignProps();
|
|
15189
|
+
// }
|
|
15190
|
+
}
|
|
15191
|
+
};
|
|
15192
|
+
for (var p in options) {
|
|
15193
|
+
_loop_1(p);
|
|
15194
|
+
}
|
|
15195
|
+
};
|
|
15196
|
+
AXPropertyEditorRendererDirective.prototype.assignProps = function () {
|
|
15197
|
+
var _this = this;
|
|
15198
|
+
var _a, _b;
|
|
15199
|
+
var options = this.property.property.editorOptions;
|
|
15200
|
+
if (!options) {
|
|
15201
|
+
return;
|
|
15202
|
+
}
|
|
15203
|
+
var varsRegx = /((\$\{[a-zA-Z_0-9]+\})+)/gm;
|
|
15204
|
+
var _loop_2 = function (p) {
|
|
15130
15205
|
if (options.hasOwnProperty(p)) {
|
|
15131
15206
|
var opt = options[p];
|
|
15132
|
-
|
|
15133
|
-
|
|
15134
|
-
|
|
15135
|
-
if (val) {
|
|
15136
|
-
this_1.instance[p] = typeof val === 'function' ? val({ data: this_1.context, host: this_1.host }, this_1.property) : val;
|
|
15137
|
-
}
|
|
15207
|
+
var vars = typeof opt === 'string' ? (_a = opt) === null || _a === void 0 ? void 0 : _a.match(varsRegx) : [];
|
|
15208
|
+
if ((_b = vars) === null || _b === void 0 ? void 0 : _b.length) {
|
|
15209
|
+
return "continue";
|
|
15138
15210
|
}
|
|
15139
15211
|
else {
|
|
15140
|
-
var
|
|
15141
|
-
if (
|
|
15142
|
-
|
|
15143
|
-
_this.instance
|
|
15212
|
+
var val_1 = typeof opt === 'function' ? opt({ data: this_1.context, host: this_1.host }, this_1.property) : opt;
|
|
15213
|
+
if (val_1 instanceof Promise) {
|
|
15214
|
+
val_1.then(function (v) {
|
|
15215
|
+
core$1.setPropByPath(_this.instance, p, val_1);
|
|
15144
15216
|
});
|
|
15145
15217
|
}
|
|
15146
15218
|
else {
|
|
15147
|
-
this_1.instance
|
|
15219
|
+
core$1.setPropByPath(this_1.instance, p, val_1);
|
|
15148
15220
|
}
|
|
15149
15221
|
}
|
|
15150
15222
|
}
|
|
15151
15223
|
};
|
|
15152
15224
|
var this_1 = this;
|
|
15153
15225
|
for (var p in options) {
|
|
15154
|
-
|
|
15226
|
+
_loop_2(p);
|
|
15155
15227
|
}
|
|
15156
15228
|
};
|
|
15157
15229
|
AXPropertyEditorRendererDirective.prototype.ngOnDestroy = function () {
|
|
@@ -15162,16 +15234,13 @@
|
|
|
15162
15234
|
AXPropertyEditorRendererDirective.ctorParameters = function () { return [
|
|
15163
15235
|
{ type: core.ViewContainerRef },
|
|
15164
15236
|
{ type: core.ComponentFactoryResolver },
|
|
15165
|
-
{ type: core$1.AXRenderService }
|
|
15237
|
+
{ type: core$1.AXRenderService },
|
|
15238
|
+
{ type: core$1.AXEventService }
|
|
15166
15239
|
]; };
|
|
15167
15240
|
__decorate([
|
|
15168
15241
|
core.Input(),
|
|
15169
15242
|
__metadata("design:type", Object)
|
|
15170
15243
|
], AXPropertyEditorRendererDirective.prototype, "property", void 0);
|
|
15171
|
-
__decorate([
|
|
15172
|
-
core.Input(),
|
|
15173
|
-
__metadata("design:type", Boolean)
|
|
15174
|
-
], AXPropertyEditorRendererDirective.prototype, "readonly", void 0);
|
|
15175
15244
|
__decorate([
|
|
15176
15245
|
core.Input(),
|
|
15177
15246
|
__metadata("design:type", AXValidationFormComponent)
|
|
@@ -15185,6 +15254,10 @@
|
|
|
15185
15254
|
core.Input(),
|
|
15186
15255
|
__metadata("design:type", Object)
|
|
15187
15256
|
], AXPropertyEditorRendererDirective.prototype, "host", void 0);
|
|
15257
|
+
__decorate([
|
|
15258
|
+
core.Input(),
|
|
15259
|
+
__metadata("design:type", Object)
|
|
15260
|
+
], AXPropertyEditorRendererDirective.prototype, "groupId", void 0);
|
|
15188
15261
|
__decorate([
|
|
15189
15262
|
core.Output(),
|
|
15190
15263
|
__metadata("design:type", core.EventEmitter)
|
|
@@ -15195,7 +15268,8 @@
|
|
|
15195
15268
|
}),
|
|
15196
15269
|
__metadata("design:paramtypes", [core.ViewContainerRef,
|
|
15197
15270
|
core.ComponentFactoryResolver,
|
|
15198
|
-
core$1.AXRenderService
|
|
15271
|
+
core$1.AXRenderService,
|
|
15272
|
+
core$1.AXEventService])
|
|
15199
15273
|
], AXPropertyEditorRendererDirective);
|
|
15200
15274
|
return AXPropertyEditorRendererDirective;
|
|
15201
15275
|
}());
|
|
@@ -15213,7 +15287,7 @@
|
|
|
15213
15287
|
};
|
|
15214
15288
|
AXTextPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15215
15289
|
this.registerForValidationForm(this.textBox);
|
|
15216
|
-
this.
|
|
15290
|
+
this.onRenderCompleted.emit();
|
|
15217
15291
|
};
|
|
15218
15292
|
AXTextPropertyEditorComponent.ctorParameters = function () { return [
|
|
15219
15293
|
{ type: core.ChangeDetectorRef }
|
|
@@ -15263,8 +15337,8 @@
|
|
|
15263
15337
|
_super.prototype.handleValueChange.call(this, e.value);
|
|
15264
15338
|
};
|
|
15265
15339
|
AXNumberBoxPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15266
|
-
this.initiated = true;
|
|
15267
15340
|
this.registerForValidationForm(this.textBox);
|
|
15341
|
+
this.onRenderCompleted.emit();
|
|
15268
15342
|
};
|
|
15269
15343
|
AXNumberBoxPropertyEditorComponent.ctorParameters = function () { return [
|
|
15270
15344
|
{ type: core.ChangeDetectorRef }
|
|
@@ -15309,16 +15383,18 @@
|
|
|
15309
15383
|
_this.selectionDataMode = 'value';
|
|
15310
15384
|
_this.allowSearch = true;
|
|
15311
15385
|
_this.allowNull = false;
|
|
15386
|
+
_this.disabled = false;
|
|
15312
15387
|
_this.items = [];
|
|
15313
15388
|
_this.remoteOperation = false;
|
|
15314
15389
|
_this.provideData = function (e) {
|
|
15315
15390
|
return new Promise(function (resolve) {
|
|
15316
15391
|
var func = function () {
|
|
15317
15392
|
if (Array.isArray(_this.items)) {
|
|
15318
|
-
resolve(_this.items);
|
|
15393
|
+
resolve(_this.items.slice());
|
|
15319
15394
|
}
|
|
15320
15395
|
else if (typeof _this.items === 'function') {
|
|
15321
|
-
|
|
15396
|
+
var a = Object.assign(e, { sender: _this });
|
|
15397
|
+
resolve(_this.items(a));
|
|
15322
15398
|
}
|
|
15323
15399
|
else {
|
|
15324
15400
|
resolve([]);
|
|
@@ -15334,26 +15410,38 @@
|
|
|
15334
15410
|
};
|
|
15335
15411
|
return _this;
|
|
15336
15412
|
}
|
|
15413
|
+
Object.defineProperty(AXSelectBoxPropertyEditorComponent.prototype, "filter", {
|
|
15414
|
+
get: function () {
|
|
15415
|
+
return this._filter;
|
|
15416
|
+
},
|
|
15417
|
+
set: function (v) {
|
|
15418
|
+
var _a;
|
|
15419
|
+
this._filter = v;
|
|
15420
|
+
if (this.value && this.initiated) {
|
|
15421
|
+
this.value = null;
|
|
15422
|
+
(_a = this.selectBox) === null || _a === void 0 ? void 0 : _a.refresh();
|
|
15423
|
+
}
|
|
15424
|
+
},
|
|
15425
|
+
enumerable: true,
|
|
15426
|
+
configurable: true
|
|
15427
|
+
});
|
|
15337
15428
|
AXSelectBoxPropertyEditorComponent.prototype.handleValueChange = function (e) {
|
|
15338
|
-
_super.prototype.handleValueChange.call(this, e.
|
|
15429
|
+
_super.prototype.handleValueChange.call(this, e.selectedValues);
|
|
15339
15430
|
};
|
|
15340
15431
|
AXSelectBoxPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15341
|
-
this.selectBox.refresh();
|
|
15342
15432
|
this.registerForValidationForm(this.selectBox);
|
|
15343
|
-
|
|
15344
|
-
AXSelectBoxPropertyEditorComponent.prototype.initiat = function () {
|
|
15345
|
-
this.initiated = true;
|
|
15433
|
+
this.onRenderCompleted.emit();
|
|
15346
15434
|
};
|
|
15347
15435
|
AXSelectBoxPropertyEditorComponent.ctorParameters = function () { return [
|
|
15348
15436
|
{ type: core.ChangeDetectorRef }
|
|
15349
15437
|
]; };
|
|
15350
15438
|
__decorate([
|
|
15351
|
-
core.ViewChild(
|
|
15352
|
-
__metadata("design:type",
|
|
15439
|
+
core.ViewChild(AXSelectBoxComponent, { static: true }),
|
|
15440
|
+
__metadata("design:type", AXSelectBoxComponent)
|
|
15353
15441
|
], AXSelectBoxPropertyEditorComponent.prototype, "selectBox", void 0);
|
|
15354
15442
|
AXSelectBoxPropertyEditorComponent = __decorate([
|
|
15355
15443
|
core.Component({
|
|
15356
|
-
template: "<ax-select-
|
|
15444
|
+
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>"
|
|
15357
15445
|
}),
|
|
15358
15446
|
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
15359
15447
|
], AXSelectBoxPropertyEditorComponent);
|
|
@@ -15392,7 +15480,7 @@
|
|
|
15392
15480
|
this.cdr.detectChanges();
|
|
15393
15481
|
};
|
|
15394
15482
|
AXRangePropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15395
|
-
this.
|
|
15483
|
+
this.onRenderCompleted.emit();
|
|
15396
15484
|
};
|
|
15397
15485
|
// getRanges() {
|
|
15398
15486
|
// return this.ranges.sort((a, b) => a.minValue - b.minValue);
|
|
@@ -16098,7 +16186,7 @@
|
|
|
16098
16186
|
}
|
|
16099
16187
|
AXColorPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16100
16188
|
this.registerForValidationForm(this.textBox);
|
|
16101
|
-
this.
|
|
16189
|
+
this.onRenderCompleted.emit();
|
|
16102
16190
|
};
|
|
16103
16191
|
AXColorPropertyEditorComponent.ctorParameters = function () { return [
|
|
16104
16192
|
{ type: core.ChangeDetectorRef }
|
|
@@ -16156,7 +16244,7 @@
|
|
|
16156
16244
|
this.columns = this.value ? JSON.parse(JSON.stringify(this.value)) : [];
|
|
16157
16245
|
};
|
|
16158
16246
|
ColumnPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16159
|
-
this.
|
|
16247
|
+
this.onRenderCompleted.emit();
|
|
16160
16248
|
};
|
|
16161
16249
|
ColumnPropertyEditorComponent.prototype.drop = function (event) {
|
|
16162
16250
|
dragDrop.moveItemInArray(this.columns, event.previousIndex, event.currentIndex);
|
|
@@ -16316,8 +16404,8 @@
|
|
|
16316
16404
|
].filter(function (c) { return c.dataTypes == null || c.dataTypes.includes(_this.dataType); });
|
|
16317
16405
|
};
|
|
16318
16406
|
AXConditionalColorPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16319
|
-
this.initiated = true;
|
|
16320
16407
|
this.cdr.detectChanges();
|
|
16408
|
+
this.onRenderCompleted.emit();
|
|
16321
16409
|
};
|
|
16322
16410
|
AXConditionalColorPropertyEditorComponent.prototype.handleEditClick = function (item) {
|
|
16323
16411
|
var _this = this;
|
|
@@ -16516,7 +16604,7 @@
|
|
|
16516
16604
|
_super.prototype.handleValueChange.call(this, e.value);
|
|
16517
16605
|
};
|
|
16518
16606
|
AXSwitchPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16519
|
-
this.
|
|
16607
|
+
this.onRenderCompleted.emit();
|
|
16520
16608
|
};
|
|
16521
16609
|
AXSwitchPropertyEditorComponent.ctorParameters = function () { return [
|
|
16522
16610
|
{ type: core.ChangeDetectorRef }
|
|
@@ -16565,8 +16653,8 @@
|
|
|
16565
16653
|
_super.prototype.handleValueChange.call(this, e.value);
|
|
16566
16654
|
};
|
|
16567
16655
|
AXDatePropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16568
|
-
this.initiated = true;
|
|
16569
16656
|
this.registerForValidationForm(this.date);
|
|
16657
|
+
this.onRenderCompleted.emit();
|
|
16570
16658
|
};
|
|
16571
16659
|
AXDatePropertyEditorComponent.ctorParameters = function () { return [
|
|
16572
16660
|
{ type: core.ChangeDetectorRef }
|
|
@@ -16614,8 +16702,8 @@
|
|
|
16614
16702
|
_super.prototype.handleValueChange.call(this, (_a = e.value) === null || _a === void 0 ? void 0 : _a.time);
|
|
16615
16703
|
};
|
|
16616
16704
|
AXTimePropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16617
|
-
this.initiated = true;
|
|
16618
16705
|
this.registerForValidationForm(this.time);
|
|
16706
|
+
this.onRenderCompleted.emit();
|
|
16619
16707
|
};
|
|
16620
16708
|
AXTimePropertyEditorComponent.ctorParameters = function () { return [
|
|
16621
16709
|
{ type: core.ChangeDetectorRef }
|