@acorex/components 3.0.44 → 3.0.48
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 +212 -102
- 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 +4 -4
- package/esm2015/lib/checkbox/checkbox.component.js +17 -17
- package/esm2015/lib/date-picker/date-picker.component.js +5 -4
- package/esm2015/lib/number-box/number-box.component.js +16 -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/query-builder/query-builder-group.component.js +2 -1
- package/esm2015/lib/query-builder/query-builder.service.js +4 -1
- 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/esm2015/lib/tree-view/tree-view.component.js +12 -4
- package/esm5/lib/calendar/calendar-box/calendar-box.component.js +4 -4
- package/esm5/lib/checkbox/checkbox.component.js +17 -18
- package/esm5/lib/date-picker/date-picker.component.js +5 -4
- package/esm5/lib/number-box/number-box.component.js +16 -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/query-builder/query-builder-group.component.js +2 -1
- package/esm5/lib/query-builder/query-builder.service.js +4 -1
- 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/esm5/lib/tree-view/tree-view.component.js +12 -4
- package/fesm2015/acorex-components.js +200 -103
- package/fesm2015/acorex-components.js.map +1 -1
- package/fesm5/acorex-components.js +213 -103
- package/fesm5/acorex-components.js.map +1 -1
- package/lib/number-box/number-box.component.d.ts +1 -0
- 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/lib/tree-view/tree-view.component.d.ts +1 -0
- 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,8 +1385,8 @@
|
|
|
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 '';
|
|
@@ -3729,7 +3729,7 @@
|
|
|
3729
3729
|
return this._value;
|
|
3730
3730
|
},
|
|
3731
3731
|
set: function (v) {
|
|
3732
|
-
if (v != this._value
|
|
3732
|
+
if (v != this._value && v !== undefined) {
|
|
3733
3733
|
var old = this._value;
|
|
3734
3734
|
this._value = v;
|
|
3735
3735
|
this.valueChange.emit(v);
|
|
@@ -3754,21 +3754,20 @@
|
|
|
3754
3754
|
}
|
|
3755
3755
|
};
|
|
3756
3756
|
AXCheckBoxComponent.prototype.handleClick = function (e) {
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
//
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
}, 100);
|
|
3757
|
+
e.preventDefault();
|
|
3758
|
+
e.stopPropagation();
|
|
3759
|
+
// setTimeout(() => {
|
|
3760
|
+
if (!this.disabled && !this.readonly) {
|
|
3761
|
+
//TODO: check intermddiate;
|
|
3762
|
+
this.value = !this.value;
|
|
3763
|
+
this.onClick.emit({
|
|
3764
|
+
component: this,
|
|
3765
|
+
htmlElement: this.ref.nativeElement,
|
|
3766
|
+
htmlEvent: e,
|
|
3767
|
+
value: this.value
|
|
3768
|
+
});
|
|
3769
|
+
}
|
|
3770
|
+
// }, 100);
|
|
3772
3771
|
};
|
|
3773
3772
|
AXCheckBoxComponent.ctorParameters = function () { return [
|
|
3774
3773
|
{ type: core.ChangeDetectorRef },
|
|
@@ -3822,7 +3821,7 @@
|
|
|
3822
3821
|
AXCheckBoxComponent = __decorate([
|
|
3823
3822
|
core.Component({
|
|
3824
3823
|
selector: 'ax-check-box',
|
|
3825
|
-
template: "<!-- <label class=\"ax checkbox {{size}}\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n {{ label }}\r\n <input #input type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\"\r\n [disabled]=\"disabled || readonly\" />\r\n <span class=\"checkmark\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"></span>\r\n\r\n</label> -->\r\n\r\n
|
|
3824
|
+
template: "<!-- <label class=\"ax checkbox {{size}}\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n {{ label }}\r\n <input #input type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\"\r\n [disabled]=\"disabled || readonly\" />\r\n <span class=\"checkmark\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"></span>\r\n\r\n</label> -->\r\n\r\n\r\n<!-- [(ngModel)]=\"value\" -->\r\n<!-- (click)=\"handleClick($event)\" -->\r\n\r\n<label class=\"ax-checkbox-container\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\">\r\n\r\n <input #input class=\"ax-checkbox\" type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [class.checked]=\"value\"\r\n [checked]=\"value\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\" (click)=\"handleClick($event)\"\r\n [disabled]=\"disabled || readonly\" />\r\n\r\n\r\n <span>{{ label ? label : ' ' }}</span>\r\n</label>",
|
|
3826
3825
|
encapsulation: core.ViewEncapsulation.None,
|
|
3827
3826
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3828
3827
|
}),
|
|
@@ -4226,8 +4225,7 @@
|
|
|
4226
4225
|
}
|
|
4227
4226
|
}
|
|
4228
4227
|
};
|
|
4229
|
-
AXSelectionListComponent.prototype.focus = function () {
|
|
4230
|
-
};
|
|
4228
|
+
AXSelectionListComponent.prototype.focus = function () { };
|
|
4231
4229
|
AXSelectionListComponent.prototype.onvalueChanged = function (e) {
|
|
4232
4230
|
if (!this.disabled) {
|
|
4233
4231
|
this.selectedItemsChange.emit([e]);
|
|
@@ -4293,7 +4291,7 @@
|
|
|
4293
4291
|
AXSelectionListComponent = __decorate([
|
|
4294
4292
|
core.Component({
|
|
4295
4293
|
selector: 'ax-selection-list',
|
|
4296
|
-
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>",
|
|
4297
4295
|
encapsulation: core.ViewEncapsulation.None,
|
|
4298
4296
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
4299
4297
|
}),
|
|
@@ -5765,8 +5763,9 @@
|
|
|
5765
5763
|
if (_this.showToday && !_this.value) {
|
|
5766
5764
|
_this.selectToday();
|
|
5767
5765
|
}
|
|
5768
|
-
|
|
5769
|
-
|
|
5766
|
+
console.log(Boolean(_this.dropdown.dropdownWidth > 200));
|
|
5767
|
+
if (_this.dropdown.dropdownWidth > 200) {
|
|
5768
|
+
_this.dropdown.dropdownWidth = 250;
|
|
5770
5769
|
}
|
|
5771
5770
|
_this.cdr.markForCheck();
|
|
5772
5771
|
});
|
|
@@ -6394,7 +6393,7 @@
|
|
|
6394
6393
|
AXDatePickerComponent = AXDatePickerComponent_1 = __decorate([
|
|
6395
6394
|
core.Component({
|
|
6396
6395
|
selector: 'ax-date-picker',
|
|
6397
|
-
template: "<ax-drop-down [readonly]=\"readonly\" [size]=\"size\" [showDropDownButton]=\"false\" icon=\"far fa-calendar-alt\" #dropdown maxHeight=\"unset\">\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 <ax-text-box #input [textAlign]=\"textAlign\" [(value)]=\"text\" [readonly]=\"false\" [textMask]=\"dateType\" [disabled]=\"disabled\" [placeholder]=\"placeholder\" [size]=\"size\" (onkey)=\"handleKeyPress($event)\" (onFocus)=\"handleInputFocus()\" (click)=\"handleClick()\"\r\n (onBlur)=\"handleInputBlur()\" (onValueChanged)=\"textChange($event)\"></ax-text-box>\r\n </ng-container>\r\n <ng-container panel>\r\n <ax-calendar-box *ngIf=\"_renderPicker\" [showTodayButton]=\"showTodayButton\" [selectableHoliday]=\"selectableHoliday\" [min]=\"min\" [max]=\"max\" [size]=\"size\" (onClick)=\"onClick($event)\" (onValueChanged)=\"onDateChange($event)\" [type]=\"type\" [(value)]=\"value\"\r\n [dayStyle]=\"dayStyle\">\r\n </ax-calendar-box>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button end *ngIf=\"allowClear && value\" [disabled]=\"disabled\" icon=\"far fa-times icon\" type=\"blank danger\" (click)=\"clear()\" [size]=\"size\" [tabIndex]=\"-1\">\r\n </ax-button>\r\n <ax-button end icon=\"far fa-calendar-alt icon\" type=\"light blank\" (click)=\"handleButtonClick()\" [disabled]=\"disabled\" [size]=\"size\" [tabIndex]=\"-1\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n\r\n</ax-drop-down>",
|
|
6396
|
+
template: "<ax-drop-down [readonly]=\"readonly\" [fitParent]=\"true\" [size]=\"size\" [showDropDownButton]=\"false\" icon=\"far fa-calendar-alt\" #dropdown maxHeight=\"unset\">\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 <ax-text-box #input [textAlign]=\"textAlign\" [(value)]=\"text\" [readonly]=\"false\" [textMask]=\"dateType\" [disabled]=\"disabled\" [placeholder]=\"placeholder\" [size]=\"size\" (onkey)=\"handleKeyPress($event)\" (onFocus)=\"handleInputFocus()\" (click)=\"handleClick()\"\r\n (onBlur)=\"handleInputBlur()\" (onValueChanged)=\"textChange($event)\"></ax-text-box>\r\n </ng-container>\r\n <ng-container panel>\r\n <ax-calendar-box *ngIf=\"_renderPicker\" [showTodayButton]=\"showTodayButton\" [selectableHoliday]=\"selectableHoliday\" [min]=\"min\" [max]=\"max\" [size]=\"size\" (onClick)=\"onClick($event)\" (onValueChanged)=\"onDateChange($event)\" [type]=\"type\" [(value)]=\"value\"\r\n [dayStyle]=\"dayStyle\">\r\n </ax-calendar-box>\r\n </ng-container>\r\n <ng-container end>\r\n <ax-button end *ngIf=\"allowClear && value\" [disabled]=\"disabled\" icon=\"far fa-times icon\" type=\"blank danger\" (click)=\"clear()\" [size]=\"size\" [tabIndex]=\"-1\">\r\n </ax-button>\r\n <ax-button end icon=\"far fa-calendar-alt icon\" type=\"light blank\" (click)=\"handleButtonClick()\" [disabled]=\"disabled\" [size]=\"size\" [tabIndex]=\"-1\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n </ng-container>\r\n\r\n</ax-drop-down>",
|
|
6398
6397
|
encapsulation: core.ViewEncapsulation.None,
|
|
6399
6398
|
providers: [{ provide: AXValidatableComponent, useExisting: AXDatePickerComponent_1 }],
|
|
6400
6399
|
host: { style: 'width: 100%' },
|
|
@@ -7778,7 +7777,7 @@
|
|
|
7778
7777
|
});
|
|
7779
7778
|
AXNumberBoxComponent.prototype.calcSeparator = function (num) {
|
|
7780
7779
|
if (this.showSeparator) {
|
|
7781
|
-
return num +
|
|
7780
|
+
return num + +(num / 3);
|
|
7782
7781
|
}
|
|
7783
7782
|
else {
|
|
7784
7783
|
return num;
|
|
@@ -7803,9 +7802,11 @@
|
|
|
7803
7802
|
if (this.disabled === false) {
|
|
7804
7803
|
if (this.scrollWeel === true) {
|
|
7805
7804
|
setTimeout(function () {
|
|
7806
|
-
_this.
|
|
7807
|
-
_this.
|
|
7808
|
-
|
|
7805
|
+
if (_this.readonly === false) {
|
|
7806
|
+
_this.input.nativeElement.addEventListener('wheel', function (e) {
|
|
7807
|
+
_this.handleWheel(e);
|
|
7808
|
+
});
|
|
7809
|
+
}
|
|
7809
7810
|
}, 500);
|
|
7810
7811
|
}
|
|
7811
7812
|
}
|
|
@@ -8216,6 +8217,14 @@
|
|
|
8216
8217
|
}
|
|
8217
8218
|
}
|
|
8218
8219
|
};
|
|
8220
|
+
AXNumberBoxComponent.prototype.handleInputBlur = function (e) {
|
|
8221
|
+
this.checkMinMax(this.textValue);
|
|
8222
|
+
this.onBlur.emit({
|
|
8223
|
+
component: this,
|
|
8224
|
+
htmlElement: this.ref.nativeElement,
|
|
8225
|
+
htmlEvent: e
|
|
8226
|
+
});
|
|
8227
|
+
};
|
|
8219
8228
|
var AXNumberBoxComponent_1;
|
|
8220
8229
|
AXNumberBoxComponent.ctorParameters = function () { return [
|
|
8221
8230
|
{ type: core.ChangeDetectorRef },
|
|
@@ -8268,7 +8277,7 @@
|
|
|
8268
8277
|
AXNumberBoxComponent = AXNumberBoxComponent_1 = __decorate([
|
|
8269
8278
|
core.Component({
|
|
8270
8279
|
selector: 'ax-number-box',
|
|
8271
|
-
template: "<div class=\"ax form-item\" [class.disabled]=\"disabled\" [attr.id]=\"uid\" #fc>\r\n <div class=\"ax items-wrapper\">\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n <ax-button icon=\"far fa-plus\" type=\"success blank\" (click)=\"upStepHandel()\" [disabled]=\"disabled\" *ngIf=\"showDoubleCounter\"></ax-button>\r\n </div>\r\n <div class=\"content\" #content>\r\n <div class=\"ax form-control input {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\"\r\n [class.icon]=\"icon\">\r\n <input #input type=\"text\" class=\"ax {{size}}\" [maxlength]=\"calcSeparator(maxLength)\" [(ngModel)]=\"textValue\" placeholder=\"{{placeholder}}\"\r\n [readonly]=\"readonly\" [disabled]=\"disabled\" [ngClass]=\"setTextAlign()\"\r\n [class.clear]=\"value && allowClear\" (focus)=\"handleInputFocus($event)\" (blur)=\"handleInputBlur($event)\"\r\n (keypress)=\"handleKeyPress($event)\" (ngModelChange)=\"this.userQuestionUpdate.next($event)\"\r\n (keydown)=\"handleKeyDown($event)\" (click)=\"handleClick()\" (keyup)=\"handleKeyUp($event)\">\r\n <i class=\"{{icon}}\" *ngIf=\"icon\"></i>\r\n </div>\r\n </div>\r\n <div class=\"ax items-wrapper\">\r\n <ax-button *ngIf=\"value && allowClear\" [disabled]=\"disabled\" icon=\"far fa-times\" type=\"danger blank\"\r\n (click)=\"clear()\"></ax-button>\r\n <ax-button icon=\"far fa-minus\" type=\"danger blank\" (click)=\"downStepHandel()\" [disabled]=\"disabled\" *ngIf=\"showDoubleCounter\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n <div class=\"arrow-number\" *ngIf=\"showCounter && !showDoubleCounter\" >\r\n <ax-button type=\"light blank\" [disabled]=\"disabled\" icon=\"fas fa-angle-up\" [size]=\"size\"\r\n (mousedown)=\"upStepHandel()\" (mouseup)=\"delaySearch()\" [tabIndex]=\"-1\"></ax-button>\r\n <ax-button type=\"light blank\" [disabled]=\"disabled\" icon=\"fas fa-angle-down\" [size]=\"size\"\r\n (mousedown)=\"downStepHandel()\" (mouseup)=\"delaySearch()\" [tabIndex]=\"-1\"></ax-button>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n",
|
|
8280
|
+
template: "<div class=\"ax form-item\" [class.disabled]=\"disabled\" [attr.id]=\"uid\" #fc>\r\n <div class=\"ax items-wrapper\">\r\n <ng-content select=\"[start]\">\r\n </ng-content>\r\n <ax-button icon=\"far fa-plus\" type=\"success blank\" (click)=\"upStepHandel()\" [disabled]=\"disabled\" *ngIf=\"showDoubleCounter\"></ax-button>\r\n </div>\r\n <div class=\"content\" #content>\r\n <div class=\"ax form-control input {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\"\r\n [class.icon]=\"icon\">\r\n <input #input type=\"text\" class=\"ax {{size}}\" [maxlength]=\"calcSeparator(maxLength)\" [(ngModel)]=\"textValue\" placeholder=\"{{placeholder}}\"\r\n [readonly]=\"readonly\" [disabled]=\"disabled\" [ngClass]=\"setTextAlign()\"\r\n [class.clear]=\"value && allowClear\" (focus)=\"handleInputFocus($event)\" (blur)=\"handleInputBlur($event)\"\r\n (keypress)=\"handleKeyPress($event)\" (ngModelChange)=\"this.userQuestionUpdate.next($event)\"\r\n (keydown)=\"handleKeyDown($event)\" (click)=\"handleClick()\" (keyup)=\"handleKeyUp($event)\">\r\n <i class=\"{{icon}}\" *ngIf=\"icon\"></i>\r\n </div>\r\n </div>\r\n <div class=\"ax items-wrapper\">\r\n <ax-button *ngIf=\"value && allowClear\" [disabled]=\"disabled\" icon=\"far fa-times\" type=\"danger blank\"\r\n (click)=\"clear()\"></ax-button>\r\n <ax-button icon=\"far fa-minus\" type=\"danger blank\" (click)=\"downStepHandel()\" [disabled]=\"disabled\" *ngIf=\"showDoubleCounter\"></ax-button>\r\n <ng-content select=\"[end]\">\r\n </ng-content>\r\n <div class=\"arrow-number\" *ngIf=\"showCounter && !showDoubleCounter && !readonly\" >\r\n <ax-button type=\"light blank\" [disabled]=\"disabled\" icon=\"fas fa-angle-up\" [size]=\"size\"\r\n (mousedown)=\"upStepHandel()\" (mouseup)=\"delaySearch()\" [tabIndex]=\"-1\"></ax-button>\r\n <ax-button type=\"light blank\" [disabled]=\"disabled\" icon=\"fas fa-angle-down\" [size]=\"size\"\r\n (mousedown)=\"downStepHandel()\" (mouseup)=\"delaySearch()\" [tabIndex]=\"-1\"></ax-button>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n",
|
|
8272
8281
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
8273
8282
|
host: { style: 'width: 100%' },
|
|
8274
8283
|
providers: [{ provide: AXValidatableComponent, useExisting: AXNumberBoxComponent_1 }]
|
|
@@ -8710,7 +8719,10 @@
|
|
|
8710
8719
|
v = [];
|
|
8711
8720
|
}
|
|
8712
8721
|
// const old = this.selectedItems;
|
|
8713
|
-
|
|
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) {
|
|
8714
8726
|
this._selectedItems = this.mode == 'single' ? v.slice(0, 1) : __spread(new Set(v)); //[...new Set(v[0])] : [...new Set(v)];
|
|
8715
8727
|
this._selectedItems.forEach(function (c) { return (c.selected = true); });
|
|
8716
8728
|
this.selectedItemsChange.emit(this._selectedItems);
|
|
@@ -9617,7 +9629,7 @@
|
|
|
9617
9629
|
AXSelectBoxComponent = AXSelectBoxComponent_1 = __decorate([
|
|
9618
9630
|
core.Component({
|
|
9619
9631
|
selector: 'ax-select-box',
|
|
9620
|
-
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>",
|
|
9621
9633
|
encapsulation: core.ViewEncapsulation.None,
|
|
9622
9634
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
9623
9635
|
host: { style: 'width: 100%' },
|
|
@@ -10227,6 +10239,7 @@
|
|
|
10227
10239
|
return __generator(this, function (_d) {
|
|
10228
10240
|
switch (_d.label) {
|
|
10229
10241
|
case 0:
|
|
10242
|
+
;
|
|
10230
10243
|
if (group.items.length > 0) {
|
|
10231
10244
|
query = ' ( ';
|
|
10232
10245
|
}
|
|
@@ -10285,6 +10298,7 @@
|
|
|
10285
10298
|
codeOperator = item.operator;
|
|
10286
10299
|
break;
|
|
10287
10300
|
}
|
|
10301
|
+
;
|
|
10288
10302
|
query = query + ' ' + item.caption + ' ' + codeOperator + ' ' + item.text;
|
|
10289
10303
|
_d.label = 6;
|
|
10290
10304
|
case 6:
|
|
@@ -10327,6 +10341,7 @@
|
|
|
10327
10341
|
var query = '';
|
|
10328
10342
|
switch (type) {
|
|
10329
10343
|
case 'simple':
|
|
10344
|
+
;
|
|
10330
10345
|
if (group.items.length > 0) {
|
|
10331
10346
|
query = ' ( ';
|
|
10332
10347
|
}
|
|
@@ -10468,6 +10483,7 @@
|
|
|
10468
10483
|
};
|
|
10469
10484
|
AXQueryBuilderGroupComponent.prototype.ruleChanged = function (e) {
|
|
10470
10485
|
var _this = this;
|
|
10486
|
+
;
|
|
10471
10487
|
// this.group.queryString = this.qs.getQueryString(this.group, 'simple');
|
|
10472
10488
|
this.qs.getQueryStringSimple(this.group).then(function (c) {
|
|
10473
10489
|
_this.group.queryString = c;
|
|
@@ -11829,13 +11845,15 @@
|
|
|
11829
11845
|
}
|
|
11830
11846
|
AXTabStripComponent.prototype.ngOnInit = function () { };
|
|
11831
11847
|
AXTabStripComponent.prototype.handleClick = function (i) {
|
|
11832
|
-
|
|
11833
|
-
|
|
11834
|
-
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
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
|
+
}
|
|
11839
11857
|
};
|
|
11840
11858
|
AXTabStripComponent.ctorParameters = function () { return [
|
|
11841
11859
|
{ type: core.ElementRef }
|
|
@@ -11851,7 +11869,7 @@
|
|
|
11851
11869
|
AXTabStripComponent = __decorate([
|
|
11852
11870
|
core.Component({
|
|
11853
11871
|
selector: 'ax-tab-strip',
|
|
11854
|
-
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>"
|
|
11855
11873
|
}),
|
|
11856
11874
|
__metadata("design:paramtypes", [core.ElementRef])
|
|
11857
11875
|
], AXTabStripComponent);
|
|
@@ -14052,7 +14070,7 @@
|
|
|
14052
14070
|
}
|
|
14053
14071
|
};
|
|
14054
14072
|
node.parent.unSelectParent = function () {
|
|
14055
|
-
if (item.parentNode['select']
|
|
14073
|
+
if (item.parentNode['select'] == true) {
|
|
14056
14074
|
_this.internalSelectItem(item.parentNode, true);
|
|
14057
14075
|
}
|
|
14058
14076
|
};
|
|
@@ -14067,7 +14085,7 @@
|
|
|
14067
14085
|
};
|
|
14068
14086
|
node.children.unSelectChilds = function () {
|
|
14069
14087
|
item.childeren.forEach(function (element) {
|
|
14070
|
-
if (element['select']
|
|
14088
|
+
if (element['select'] == true) {
|
|
14071
14089
|
_this.internalSelectItem(element, true);
|
|
14072
14090
|
}
|
|
14073
14091
|
});
|
|
@@ -14177,6 +14195,14 @@
|
|
|
14177
14195
|
flag: flag
|
|
14178
14196
|
});
|
|
14179
14197
|
};
|
|
14198
|
+
AXTreeViewComponent.prototype.nodeClick = function (item) {
|
|
14199
|
+
if (item[this.hasChildField] == true) {
|
|
14200
|
+
this.toggleNode(item, true);
|
|
14201
|
+
}
|
|
14202
|
+
else {
|
|
14203
|
+
this.internalSelectItem(item, true);
|
|
14204
|
+
}
|
|
14205
|
+
};
|
|
14180
14206
|
AXTreeViewComponent.prototype.toggleNode = function (item, flag) {
|
|
14181
14207
|
if (flag === void 0) { flag = false; }
|
|
14182
14208
|
//item[this.hasChildField] === false &&
|
|
@@ -14661,7 +14687,7 @@
|
|
|
14661
14687
|
AXTreeViewComponent = __decorate([
|
|
14662
14688
|
core.Component({
|
|
14663
14689
|
selector: 'ax-tree-view',
|
|
14664
|
-
template: "<ul class=\"ax treeview {{size}}\">\r\n <ng-template #recursiveList let-list>\r\n <ng-container *ngFor=\"let item of list\">\r\n <li class=\"active {{item[hasChildField] ? '':'node'}}\" [class.bordered]=\"bordered\"
|
|
14690
|
+
template: "<ul class=\"ax treeview {{size}}\">\r\n <ng-template #recursiveList let-list>\r\n <ng-container *ngFor=\"let item of list\">\r\n <li class=\"active {{item[hasChildField] ? '':'node'}}\" [class.bordered]=\"bordered\"\r\n [class.selected]=\"item.select\" [draggable]=\"allowDrag\" (dragstart)=\"onDragStart($event, item)\"\r\n [attr.data-id]=\"item[keyField]\" (dragleave)=\"onDragEnd($event,item)\" (dragend)=drop($event)>\r\n <div axContextMenu [contextDataItem]=\"item\" [contextMenuItems]=\"contextMenuItems\" [contextMenu]=\"menu\"\r\n (onContextMenuItemClick)=\"handleOnContextMenuItem($event)\"\r\n style=\"display: flex; cursor: pointer;align-items: center;\">\r\n <div class=\"start-side\">\r\n <div *ngIf=\"item[hasChildField]\" class=\"collapse-icon\"\r\n (click)=\"handleOnNodeClick($event,item,true)\">\r\n <i class=\"fal\"\r\n [ngClass]=\"{'fa-minus': !!item.toggle , 'fa-plus': !item.toggle , 'fa-spinner fa-spin':item.loading }\"></i>\r\n </div>\r\n\r\n <ax-check-box *ngIf=\"showSelectBox\" [disabled]=\"item.disabledCheckBox\" [size]=\"size\"\r\n [indeterminate]=\"true\" [value]=\"item.select\" (onClick)=\"internalSelectItem(item)\">\r\n </ax-check-box>\r\n\r\n\r\n </div>\r\n <div class=\"text-list\" (click)=\"nodeClick(item)\" (dblclick)=\"itemdbClick($event,item)\">\r\n <ng-container *ngIf=\"nodeTemplate; else elseTemplate\">\r\n <ng-container *ngTemplateOutlet=\"nodeTemplate; context:{ $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n {{item.title}}\r\n </ng-template>\r\n </div>\r\n </div>\r\n <ul *ngIf=\"item.loading\">\r\n <i class=\"far \"></i>\r\n </ul>\r\n <ul class=\"child\" *ngIf=\"item.toggle\" style=\"background-color: white !important;\">\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: item.childeren }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"recursiveList; context:{ $implicit: list }\"></ng-container>\r\n</ul>\r\n\r\n<ax-context-menu #menu></ax-context-menu>",
|
|
14665
14691
|
encapsulation: core.ViewEncapsulation.None
|
|
14666
14692
|
}),
|
|
14667
14693
|
__metadata("design:paramtypes", [core.ElementRef])
|
|
@@ -14948,12 +14974,25 @@
|
|
|
14948
14974
|
|
|
14949
14975
|
var AXProperyEditorComponent = /** @class */ (function () {
|
|
14950
14976
|
function AXProperyEditorComponent(cdr) {
|
|
14977
|
+
var _this = this;
|
|
14951
14978
|
this.cdr = cdr;
|
|
14952
14979
|
this.readonly = false;
|
|
14953
|
-
this.
|
|
14980
|
+
this._initiated = false;
|
|
14981
|
+
this._valueBound = false;
|
|
14954
14982
|
this.validatableComponentRegistered = new rxjs.Subject();
|
|
14955
14983
|
this.valueChange = new core.EventEmitter();
|
|
14984
|
+
this.onRenderCompleted = new core.EventEmitter();
|
|
14985
|
+
this.onRenderCompleted.subscribe(function () {
|
|
14986
|
+
_this._initiated = true;
|
|
14987
|
+
});
|
|
14956
14988
|
}
|
|
14989
|
+
Object.defineProperty(AXProperyEditorComponent.prototype, "initiated", {
|
|
14990
|
+
get: function () {
|
|
14991
|
+
return this._initiated && this._valueBound;
|
|
14992
|
+
},
|
|
14993
|
+
enumerable: true,
|
|
14994
|
+
configurable: true
|
|
14995
|
+
});
|
|
14957
14996
|
AXProperyEditorComponent.prototype.registerForValidationForm = function (component) {
|
|
14958
14997
|
this.validatableComponentRegistered.next(component);
|
|
14959
14998
|
};
|
|
@@ -14962,10 +15001,15 @@
|
|
|
14962
15001
|
return this._value;
|
|
14963
15002
|
},
|
|
14964
15003
|
set: function (v) {
|
|
15004
|
+
var _this = this;
|
|
14965
15005
|
if (v !== this._value) {
|
|
14966
15006
|
this._value = v;
|
|
14967
15007
|
this.valueChange.emit(v);
|
|
14968
15008
|
this.cdr.detectChanges();
|
|
15009
|
+
//TODO: find better solution
|
|
15010
|
+
setTimeout(function () {
|
|
15011
|
+
_this._valueBound = true;
|
|
15012
|
+
}, 100);
|
|
14969
15013
|
}
|
|
14970
15014
|
},
|
|
14971
15015
|
enumerable: true,
|
|
@@ -14974,12 +15018,14 @@
|
|
|
14974
15018
|
AXProperyEditorComponent.prototype.handleValueChange = function (v) {
|
|
14975
15019
|
this.value = v;
|
|
14976
15020
|
};
|
|
14977
|
-
AXProperyEditorComponent.prototype.initiat = function () {
|
|
14978
|
-
};
|
|
14979
15021
|
__decorate([
|
|
14980
15022
|
core.Output(),
|
|
14981
15023
|
__metadata("design:type", core.EventEmitter)
|
|
14982
15024
|
], AXProperyEditorComponent.prototype, "valueChange", void 0);
|
|
15025
|
+
__decorate([
|
|
15026
|
+
core.Output(),
|
|
15027
|
+
__metadata("design:type", core.EventEmitter)
|
|
15028
|
+
], AXProperyEditorComponent.prototype, "onRenderCompleted", void 0);
|
|
14983
15029
|
__decorate([
|
|
14984
15030
|
core.Input(),
|
|
14985
15031
|
__metadata("design:type", Object),
|
|
@@ -15042,11 +15088,12 @@
|
|
|
15042
15088
|
}
|
|
15043
15089
|
|
|
15044
15090
|
var AXPropertyEditorRendererDirective = /** @class */ (function () {
|
|
15045
|
-
function AXPropertyEditorRendererDirective(target, componentFactoryResolver, renderService) {
|
|
15091
|
+
function AXPropertyEditorRendererDirective(target, componentFactoryResolver, renderService, eventService) {
|
|
15046
15092
|
this.target = target;
|
|
15047
15093
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
15048
15094
|
this.renderService = renderService;
|
|
15049
|
-
this.
|
|
15095
|
+
this.eventService = eventService;
|
|
15096
|
+
this._context = {};
|
|
15050
15097
|
this.onValueChange = new core.EventEmitter();
|
|
15051
15098
|
}
|
|
15052
15099
|
Object.defineProperty(AXPropertyEditorRendererDirective.prototype, "context", {
|
|
@@ -15055,9 +15102,6 @@
|
|
|
15055
15102
|
},
|
|
15056
15103
|
set: function (v) {
|
|
15057
15104
|
this._context = v;
|
|
15058
|
-
if (v && this.instance) {
|
|
15059
|
-
this.assignProps();
|
|
15060
|
-
}
|
|
15061
15105
|
},
|
|
15062
15106
|
enumerable: true,
|
|
15063
15107
|
configurable: true
|
|
@@ -15076,60 +15120,110 @@
|
|
|
15076
15120
|
var cmpRef = _this.target.createComponent(factory);
|
|
15077
15121
|
_this.instance = cmpRef.instance;
|
|
15078
15122
|
_this.subscription = _this.instance.valueChange.subscribe(function (value) {
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
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);
|
|
15082
15130
|
}
|
|
15083
15131
|
});
|
|
15084
|
-
|
|
15132
|
+
_this.watchChanges();
|
|
15133
|
+
_this.assignProps();
|
|
15134
|
+
_this.instance.value = _this.property.value;
|
|
15135
|
+
// this.instance.onRenderCompleted.subscribe(() => {
|
|
15136
|
+
// });
|
|
15085
15137
|
if (_this.validationForm) {
|
|
15086
15138
|
_this.instance.validatableComponentRegistered.subscribe(function (v) {
|
|
15087
15139
|
_this.validationForm.addWidget(v);
|
|
15088
15140
|
});
|
|
15089
15141
|
}
|
|
15090
|
-
//
|
|
15091
|
-
//setTimeout(() => {
|
|
15092
|
-
_this.instance.readonly = _this.readonly;
|
|
15093
|
-
_this.assignProps();
|
|
15094
|
-
_this.instance.value = _this.property.value;
|
|
15095
|
-
_this.instance.initiat();
|
|
15096
|
-
cmpRef.changeDetectorRef.markForCheck();
|
|
15097
|
-
//});
|
|
15098
15142
|
}
|
|
15099
15143
|
});
|
|
15100
15144
|
};
|
|
15101
|
-
AXPropertyEditorRendererDirective.prototype.
|
|
15145
|
+
AXPropertyEditorRendererDirective.prototype.watchChanges = function () {
|
|
15102
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;
|
|
15103
15150
|
var options = this.property.property.editorOptions;
|
|
15104
15151
|
if (!options) {
|
|
15105
15152
|
return;
|
|
15106
15153
|
}
|
|
15107
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) {
|
|
15108
15205
|
if (options.hasOwnProperty(p)) {
|
|
15109
15206
|
var opt = options[p];
|
|
15110
|
-
|
|
15111
|
-
|
|
15112
|
-
|
|
15113
|
-
if (val) {
|
|
15114
|
-
this_1.instance[p] = typeof val === 'function' ? val({ data: this_1.context, host: this_1.host }, this_1.property) : val;
|
|
15115
|
-
}
|
|
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";
|
|
15116
15210
|
}
|
|
15117
15211
|
else {
|
|
15118
|
-
var
|
|
15119
|
-
if (
|
|
15120
|
-
|
|
15121
|
-
_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);
|
|
15122
15216
|
});
|
|
15123
15217
|
}
|
|
15124
15218
|
else {
|
|
15125
|
-
this_1.instance
|
|
15219
|
+
core$1.setPropByPath(this_1.instance, p, val_1);
|
|
15126
15220
|
}
|
|
15127
15221
|
}
|
|
15128
15222
|
}
|
|
15129
15223
|
};
|
|
15130
15224
|
var this_1 = this;
|
|
15131
15225
|
for (var p in options) {
|
|
15132
|
-
|
|
15226
|
+
_loop_2(p);
|
|
15133
15227
|
}
|
|
15134
15228
|
};
|
|
15135
15229
|
AXPropertyEditorRendererDirective.prototype.ngOnDestroy = function () {
|
|
@@ -15140,16 +15234,13 @@
|
|
|
15140
15234
|
AXPropertyEditorRendererDirective.ctorParameters = function () { return [
|
|
15141
15235
|
{ type: core.ViewContainerRef },
|
|
15142
15236
|
{ type: core.ComponentFactoryResolver },
|
|
15143
|
-
{ type: core$1.AXRenderService }
|
|
15237
|
+
{ type: core$1.AXRenderService },
|
|
15238
|
+
{ type: core$1.AXEventService }
|
|
15144
15239
|
]; };
|
|
15145
15240
|
__decorate([
|
|
15146
15241
|
core.Input(),
|
|
15147
15242
|
__metadata("design:type", Object)
|
|
15148
15243
|
], AXPropertyEditorRendererDirective.prototype, "property", void 0);
|
|
15149
|
-
__decorate([
|
|
15150
|
-
core.Input(),
|
|
15151
|
-
__metadata("design:type", Boolean)
|
|
15152
|
-
], AXPropertyEditorRendererDirective.prototype, "readonly", void 0);
|
|
15153
15244
|
__decorate([
|
|
15154
15245
|
core.Input(),
|
|
15155
15246
|
__metadata("design:type", AXValidationFormComponent)
|
|
@@ -15163,6 +15254,10 @@
|
|
|
15163
15254
|
core.Input(),
|
|
15164
15255
|
__metadata("design:type", Object)
|
|
15165
15256
|
], AXPropertyEditorRendererDirective.prototype, "host", void 0);
|
|
15257
|
+
__decorate([
|
|
15258
|
+
core.Input(),
|
|
15259
|
+
__metadata("design:type", Object)
|
|
15260
|
+
], AXPropertyEditorRendererDirective.prototype, "groupId", void 0);
|
|
15166
15261
|
__decorate([
|
|
15167
15262
|
core.Output(),
|
|
15168
15263
|
__metadata("design:type", core.EventEmitter)
|
|
@@ -15173,7 +15268,8 @@
|
|
|
15173
15268
|
}),
|
|
15174
15269
|
__metadata("design:paramtypes", [core.ViewContainerRef,
|
|
15175
15270
|
core.ComponentFactoryResolver,
|
|
15176
|
-
core$1.AXRenderService
|
|
15271
|
+
core$1.AXRenderService,
|
|
15272
|
+
core$1.AXEventService])
|
|
15177
15273
|
], AXPropertyEditorRendererDirective);
|
|
15178
15274
|
return AXPropertyEditorRendererDirective;
|
|
15179
15275
|
}());
|
|
@@ -15191,7 +15287,7 @@
|
|
|
15191
15287
|
};
|
|
15192
15288
|
AXTextPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15193
15289
|
this.registerForValidationForm(this.textBox);
|
|
15194
|
-
this.
|
|
15290
|
+
this.onRenderCompleted.emit();
|
|
15195
15291
|
};
|
|
15196
15292
|
AXTextPropertyEditorComponent.ctorParameters = function () { return [
|
|
15197
15293
|
{ type: core.ChangeDetectorRef }
|
|
@@ -15241,8 +15337,8 @@
|
|
|
15241
15337
|
_super.prototype.handleValueChange.call(this, e.value);
|
|
15242
15338
|
};
|
|
15243
15339
|
AXNumberBoxPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15244
|
-
this.initiated = true;
|
|
15245
15340
|
this.registerForValidationForm(this.textBox);
|
|
15341
|
+
this.onRenderCompleted.emit();
|
|
15246
15342
|
};
|
|
15247
15343
|
AXNumberBoxPropertyEditorComponent.ctorParameters = function () { return [
|
|
15248
15344
|
{ type: core.ChangeDetectorRef }
|
|
@@ -15287,16 +15383,18 @@
|
|
|
15287
15383
|
_this.selectionDataMode = 'value';
|
|
15288
15384
|
_this.allowSearch = true;
|
|
15289
15385
|
_this.allowNull = false;
|
|
15386
|
+
_this.disabled = false;
|
|
15290
15387
|
_this.items = [];
|
|
15291
15388
|
_this.remoteOperation = false;
|
|
15292
15389
|
_this.provideData = function (e) {
|
|
15293
15390
|
return new Promise(function (resolve) {
|
|
15294
15391
|
var func = function () {
|
|
15295
15392
|
if (Array.isArray(_this.items)) {
|
|
15296
|
-
resolve(_this.items);
|
|
15393
|
+
resolve(_this.items.slice());
|
|
15297
15394
|
}
|
|
15298
15395
|
else if (typeof _this.items === 'function') {
|
|
15299
|
-
|
|
15396
|
+
var a = Object.assign(e, { sender: _this });
|
|
15397
|
+
resolve(_this.items(a));
|
|
15300
15398
|
}
|
|
15301
15399
|
else {
|
|
15302
15400
|
resolve([]);
|
|
@@ -15312,26 +15410,38 @@
|
|
|
15312
15410
|
};
|
|
15313
15411
|
return _this;
|
|
15314
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
|
+
});
|
|
15315
15428
|
AXSelectBoxPropertyEditorComponent.prototype.handleValueChange = function (e) {
|
|
15316
|
-
_super.prototype.handleValueChange.call(this, e.
|
|
15429
|
+
_super.prototype.handleValueChange.call(this, e.selectedValues);
|
|
15317
15430
|
};
|
|
15318
15431
|
AXSelectBoxPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15319
|
-
this.selectBox.refresh();
|
|
15320
15432
|
this.registerForValidationForm(this.selectBox);
|
|
15321
|
-
|
|
15322
|
-
AXSelectBoxPropertyEditorComponent.prototype.initiat = function () {
|
|
15323
|
-
this.initiated = true;
|
|
15433
|
+
this.onRenderCompleted.emit();
|
|
15324
15434
|
};
|
|
15325
15435
|
AXSelectBoxPropertyEditorComponent.ctorParameters = function () { return [
|
|
15326
15436
|
{ type: core.ChangeDetectorRef }
|
|
15327
15437
|
]; };
|
|
15328
15438
|
__decorate([
|
|
15329
|
-
core.ViewChild(
|
|
15330
|
-
__metadata("design:type",
|
|
15439
|
+
core.ViewChild(AXSelectBoxComponent, { static: true }),
|
|
15440
|
+
__metadata("design:type", AXSelectBoxComponent)
|
|
15331
15441
|
], AXSelectBoxPropertyEditorComponent.prototype, "selectBox", void 0);
|
|
15332
15442
|
AXSelectBoxPropertyEditorComponent = __decorate([
|
|
15333
15443
|
core.Component({
|
|
15334
|
-
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>"
|
|
15335
15445
|
}),
|
|
15336
15446
|
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
15337
15447
|
], AXSelectBoxPropertyEditorComponent);
|
|
@@ -15370,7 +15480,7 @@
|
|
|
15370
15480
|
this.cdr.detectChanges();
|
|
15371
15481
|
};
|
|
15372
15482
|
AXRangePropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
15373
|
-
this.
|
|
15483
|
+
this.onRenderCompleted.emit();
|
|
15374
15484
|
};
|
|
15375
15485
|
// getRanges() {
|
|
15376
15486
|
// return this.ranges.sort((a, b) => a.minValue - b.minValue);
|
|
@@ -16076,7 +16186,7 @@
|
|
|
16076
16186
|
}
|
|
16077
16187
|
AXColorPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16078
16188
|
this.registerForValidationForm(this.textBox);
|
|
16079
|
-
this.
|
|
16189
|
+
this.onRenderCompleted.emit();
|
|
16080
16190
|
};
|
|
16081
16191
|
AXColorPropertyEditorComponent.ctorParameters = function () { return [
|
|
16082
16192
|
{ type: core.ChangeDetectorRef }
|
|
@@ -16134,7 +16244,7 @@
|
|
|
16134
16244
|
this.columns = this.value ? JSON.parse(JSON.stringify(this.value)) : [];
|
|
16135
16245
|
};
|
|
16136
16246
|
ColumnPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16137
|
-
this.
|
|
16247
|
+
this.onRenderCompleted.emit();
|
|
16138
16248
|
};
|
|
16139
16249
|
ColumnPropertyEditorComponent.prototype.drop = function (event) {
|
|
16140
16250
|
dragDrop.moveItemInArray(this.columns, event.previousIndex, event.currentIndex);
|
|
@@ -16294,8 +16404,8 @@
|
|
|
16294
16404
|
].filter(function (c) { return c.dataTypes == null || c.dataTypes.includes(_this.dataType); });
|
|
16295
16405
|
};
|
|
16296
16406
|
AXConditionalColorPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16297
|
-
this.initiated = true;
|
|
16298
16407
|
this.cdr.detectChanges();
|
|
16408
|
+
this.onRenderCompleted.emit();
|
|
16299
16409
|
};
|
|
16300
16410
|
AXConditionalColorPropertyEditorComponent.prototype.handleEditClick = function (item) {
|
|
16301
16411
|
var _this = this;
|
|
@@ -16494,7 +16604,7 @@
|
|
|
16494
16604
|
_super.prototype.handleValueChange.call(this, e.value);
|
|
16495
16605
|
};
|
|
16496
16606
|
AXSwitchPropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16497
|
-
this.
|
|
16607
|
+
this.onRenderCompleted.emit();
|
|
16498
16608
|
};
|
|
16499
16609
|
AXSwitchPropertyEditorComponent.ctorParameters = function () { return [
|
|
16500
16610
|
{ type: core.ChangeDetectorRef }
|
|
@@ -16543,8 +16653,8 @@
|
|
|
16543
16653
|
_super.prototype.handleValueChange.call(this, e.value);
|
|
16544
16654
|
};
|
|
16545
16655
|
AXDatePropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16546
|
-
this.initiated = true;
|
|
16547
16656
|
this.registerForValidationForm(this.date);
|
|
16657
|
+
this.onRenderCompleted.emit();
|
|
16548
16658
|
};
|
|
16549
16659
|
AXDatePropertyEditorComponent.ctorParameters = function () { return [
|
|
16550
16660
|
{ type: core.ChangeDetectorRef }
|
|
@@ -16592,8 +16702,8 @@
|
|
|
16592
16702
|
_super.prototype.handleValueChange.call(this, (_a = e.value) === null || _a === void 0 ? void 0 : _a.time);
|
|
16593
16703
|
};
|
|
16594
16704
|
AXTimePropertyEditorComponent.prototype.ngAfterViewInit = function () {
|
|
16595
|
-
this.initiated = true;
|
|
16596
16705
|
this.registerForValidationForm(this.time);
|
|
16706
|
+
this.onRenderCompleted.emit();
|
|
16597
16707
|
};
|
|
16598
16708
|
AXTimePropertyEditorComponent.ctorParameters = function () { return [
|
|
16599
16709
|
{ type: core.ChangeDetectorRef }
|