@acorex/components 4.2.44 → 4.2.45
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/esm2020/lib/property-editor/editors/searchbar-selectbox-editor/searchbar-selectbox-editor.mjs +72 -0
- package/esm2020/lib/property-editor/editors/selectbox-editor/selectbox.module.mjs +5 -5
- package/esm2020/lib/property-editor/editors/text-editor/text.editor.mjs +1 -2
- package/esm2020/lib/property-editor/property-editor.module.mjs +17 -6
- package/esm2020/lib/search-bar/search-bar.component.mjs +15 -26
- package/fesm2015/acorex-components.mjs +98 -35
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs +97 -35
- package/fesm2020/acorex-components.mjs.map +1 -1
- package/lib/property-editor/editors/searchbar-selectbox-editor/searchbar-selectbox-editor.d.ts +29 -0
- package/lib/property-editor/editors/selectbox-editor/selectbox.module.d.ts +7 -6
- package/lib/property-editor/editors/text-editor/text.editor.d.ts +1 -1
- package/package.json +1 -1
|
@@ -10305,7 +10305,6 @@ class AXSearchBarComponent {
|
|
|
10305
10305
|
set items(v) {
|
|
10306
10306
|
v.forEach((el) => {
|
|
10307
10307
|
if (el.value != null) {
|
|
10308
|
-
debugger;
|
|
10309
10308
|
this._filterItems.push({
|
|
10310
10309
|
name: el.property.name,
|
|
10311
10310
|
title: el.property.title,
|
|
@@ -10321,7 +10320,7 @@ class AXSearchBarComponent {
|
|
|
10321
10320
|
.value();
|
|
10322
10321
|
}
|
|
10323
10322
|
clearItem(name) {
|
|
10324
|
-
this._editors.find((
|
|
10323
|
+
this._editors.find((x) => x.property.property.name === name).clear();
|
|
10325
10324
|
}
|
|
10326
10325
|
refresh() {
|
|
10327
10326
|
this._items = JSON.parse(JSON.stringify(this._items));
|
|
@@ -10332,7 +10331,6 @@ class AXSearchBarComponent {
|
|
|
10332
10331
|
handleValueChange(e) {
|
|
10333
10332
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
10334
10333
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10335
|
-
debugger;
|
|
10336
10334
|
let value = [];
|
|
10337
10335
|
let text = [];
|
|
10338
10336
|
if (((_a = e.property.editorOptions) === null || _a === void 0 ? void 0 : _a.valueField) && e.value != null) {
|
|
@@ -10342,7 +10340,6 @@ class AXSearchBarComponent {
|
|
|
10342
10340
|
}
|
|
10343
10341
|
else if (((_b = e.property.editorOptions) === null || _b === void 0 ? void 0 : _b.mode) == 'multiple') {
|
|
10344
10342
|
e.value.forEach((element) => {
|
|
10345
|
-
debugger;
|
|
10346
10343
|
value.push(element[e.property.editorOptions.valueField]);
|
|
10347
10344
|
text.push(element[e.property.editorOptions.textField]);
|
|
10348
10345
|
});
|
|
@@ -10392,10 +10389,8 @@ class AXSearchBarComponent {
|
|
|
10392
10389
|
this._filterItems = this._filterItems.filter((el) => el.name != item.name);
|
|
10393
10390
|
}
|
|
10394
10391
|
search() {
|
|
10395
|
-
debugger;
|
|
10396
10392
|
this.form.validate().then((c) => {
|
|
10397
10393
|
if (c.result) {
|
|
10398
|
-
debugger;
|
|
10399
10394
|
this._filterItems = JSON.parse(JSON.stringify(this._filterItemsClone.filter((el) => el.value != null && el.value != '')));
|
|
10400
10395
|
this.handleButtonClick();
|
|
10401
10396
|
console.log(this._filterItems);
|
|
@@ -10447,30 +10442,24 @@ class AXSearchBarComponent {
|
|
|
10447
10442
|
return item.title;
|
|
10448
10443
|
}
|
|
10449
10444
|
else {
|
|
10450
|
-
// if (Array.isArray(item.textValue)) {
|
|
10451
|
-
// let textValue = '';
|
|
10452
|
-
// item.textValue.forEach((element, index) => {
|
|
10453
|
-
// textValue +=
|
|
10454
|
-
// index === item.textValue.length - 1
|
|
10455
|
-
// ? element[item.component.property.editorOptions.textField]
|
|
10456
|
-
// : element[item.component.property.editorOptions.textField] + ',';
|
|
10457
|
-
// });
|
|
10458
|
-
// return textValue;
|
|
10459
|
-
// } else {
|
|
10460
10445
|
return item.textValue;
|
|
10461
|
-
// }
|
|
10462
10446
|
}
|
|
10463
10447
|
}
|
|
10464
10448
|
ngOnInit() { }
|
|
10465
10449
|
handleTextValue(dataItem) {
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10450
|
+
if (dataItem.value.length) {
|
|
10451
|
+
let text = '';
|
|
10452
|
+
dataItem.value.forEach((element, index) => {
|
|
10453
|
+
text +=
|
|
10454
|
+
index === dataItem.value.length - 1
|
|
10455
|
+
? element[dataItem.property.editorOptions.textField]
|
|
10456
|
+
: element[dataItem.property.editorOptions.textField] + ',';
|
|
10457
|
+
});
|
|
10458
|
+
return text;
|
|
10459
|
+
}
|
|
10460
|
+
else {
|
|
10461
|
+
return;
|
|
10462
|
+
}
|
|
10474
10463
|
}
|
|
10475
10464
|
}
|
|
10476
10465
|
AXSearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -11900,6 +11889,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11900
11889
|
}]
|
|
11901
11890
|
}], ctorParameters: function () { return []; } });
|
|
11902
11891
|
|
|
11892
|
+
class AXSearchBarSelectBoxEditorComponent extends AXProperyEditorComponent {
|
|
11893
|
+
constructor(cdr) {
|
|
11894
|
+
super(cdr);
|
|
11895
|
+
this.cdr = cdr;
|
|
11896
|
+
this.valueField = 'id';
|
|
11897
|
+
this.textField = 'text';
|
|
11898
|
+
this.mode = 'single';
|
|
11899
|
+
this.selectionDataMode = 'value';
|
|
11900
|
+
this.allowSearch = true;
|
|
11901
|
+
this.allowNull = true;
|
|
11902
|
+
this.disabled = false;
|
|
11903
|
+
this.items = [];
|
|
11904
|
+
this.remoteOperation = false;
|
|
11905
|
+
this.returnAllData = false;
|
|
11906
|
+
this.provideData = (e) => {
|
|
11907
|
+
return new Promise((resolve) => {
|
|
11908
|
+
const func = () => {
|
|
11909
|
+
if (Array.isArray(this.items)) {
|
|
11910
|
+
resolve(this.items.slice());
|
|
11911
|
+
}
|
|
11912
|
+
else if (typeof this.items === 'function') {
|
|
11913
|
+
const a = Object.assign(e, { sender: this });
|
|
11914
|
+
resolve(this.items(a));
|
|
11915
|
+
}
|
|
11916
|
+
else {
|
|
11917
|
+
resolve([]);
|
|
11918
|
+
}
|
|
11919
|
+
};
|
|
11920
|
+
const intVal = setInterval(() => {
|
|
11921
|
+
if (this.initiated) {
|
|
11922
|
+
func();
|
|
11923
|
+
clearInterval(intVal);
|
|
11924
|
+
}
|
|
11925
|
+
}, 50);
|
|
11926
|
+
});
|
|
11927
|
+
};
|
|
11928
|
+
}
|
|
11929
|
+
get filter() {
|
|
11930
|
+
return this._filter;
|
|
11931
|
+
}
|
|
11932
|
+
set filter(v) {
|
|
11933
|
+
var _a;
|
|
11934
|
+
this._filter = v;
|
|
11935
|
+
if (this.value && this.initiated) {
|
|
11936
|
+
this.value = null;
|
|
11937
|
+
(_a = this.selectBox) === null || _a === void 0 ? void 0 : _a.refresh();
|
|
11938
|
+
}
|
|
11939
|
+
}
|
|
11940
|
+
handleValueChange(e) {
|
|
11941
|
+
super.handleValueChange(e.selectedItems);
|
|
11942
|
+
}
|
|
11943
|
+
ngAfterViewInit() {
|
|
11944
|
+
this.registerForValidationForm(this.selectBox);
|
|
11945
|
+
this.onRenderCompleted.emit();
|
|
11946
|
+
}
|
|
11947
|
+
}
|
|
11948
|
+
AXSearchBarSelectBoxEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarSelectBoxEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11949
|
+
AXSearchBarSelectBoxEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXSearchBarSelectBoxEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "selectBox", first: true, predicate: AXSelectBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-select-box [mode]=\"mode\" [textField]=\"textField\" [valueField]=\"valueField\" [remoteOperation]=\"remoteOperation\"\r\n [selectedItems]=\"value\" [allowSearch]=\"allowSearch\" [allowNull]=\"allowNull\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" (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>", components: [{ type: AXSelectBoxComponent, selector: "ax-select-box", inputs: ["showDropDownButton", "rowInputTemplate", "showCheckBox", "readonly", "rtl", "disabled", "placeholder", "size", "allowNull", "textAlign", "bufferSize", "remoteOperation", "dataSource", "validation", "disabledCallback", "allowSearch", "textField", "valueField", "disabledField", "mode", "items", "selectedItems", "selectedValues"], outputs: ["dropdownToggle", "itemsChange", "onBlur", "onFocus", "selectionChanged", "selectedItemsChange", "selectedValuesChange"] }, { type: AXDataSourceComponent, selector: "ax-data-source", inputs: ["provideData", "params"] }, { type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
|
|
11950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarSelectBoxEditorComponent, decorators: [{
|
|
11951
|
+
type: Component,
|
|
11952
|
+
args: [{ template: "<ax-select-box [mode]=\"mode\" [textField]=\"textField\" [valueField]=\"valueField\" [remoteOperation]=\"remoteOperation\"\r\n [selectedItems]=\"value\" [allowSearch]=\"allowSearch\" [allowNull]=\"allowNull\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" (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>" }]
|
|
11953
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { selectBox: [{
|
|
11954
|
+
type: ViewChild,
|
|
11955
|
+
args: [AXSelectBoxComponent, { static: false }]
|
|
11956
|
+
}] } });
|
|
11957
|
+
|
|
11903
11958
|
class AXSelectBoxPropertyEditorComponent extends AXProperyEditorComponent {
|
|
11904
11959
|
constructor(cdr) {
|
|
11905
11960
|
super(cdr);
|
|
@@ -11972,16 +12027,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11972
12027
|
}] } });
|
|
11973
12028
|
|
|
11974
12029
|
class AXSelectBoxPropertyEditorModule {
|
|
11975
|
-
constructor() {
|
|
11976
|
-
}
|
|
12030
|
+
constructor() { }
|
|
11977
12031
|
}
|
|
11978
12032
|
AXSelectBoxPropertyEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11979
|
-
AXSelectBoxPropertyEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, declarations: [AXSelectBoxPropertyEditorComponent], imports: [CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule], exports: [AXSelectBoxPropertyEditorComponent] });
|
|
12033
|
+
AXSelectBoxPropertyEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, declarations: [AXSelectBoxPropertyEditorComponent, AXSearchBarSelectBoxEditorComponent], imports: [CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule], exports: [AXSelectBoxPropertyEditorComponent] });
|
|
11980
12034
|
AXSelectBoxPropertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, providers: [], imports: [[CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule]] });
|
|
11981
12035
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, decorators: [{
|
|
11982
12036
|
type: NgModule,
|
|
11983
12037
|
args: [{
|
|
11984
|
-
declarations: [AXSelectBoxPropertyEditorComponent],
|
|
12038
|
+
declarations: [AXSelectBoxPropertyEditorComponent, AXSearchBarSelectBoxEditorComponent],
|
|
11985
12039
|
imports: [CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule],
|
|
11986
12040
|
exports: [AXSelectBoxPropertyEditorComponent],
|
|
11987
12041
|
providers: []
|
|
@@ -12175,7 +12229,6 @@ class AXTextPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
12175
12229
|
super(cdr);
|
|
12176
12230
|
this.cdr = cdr;
|
|
12177
12231
|
this.clearButton = false;
|
|
12178
|
-
this.mask = null;
|
|
12179
12232
|
this.maskGuid = false;
|
|
12180
12233
|
this.showMask = true;
|
|
12181
12234
|
}
|
|
@@ -13356,6 +13409,10 @@ AXProppertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
13356
13409
|
component: AXSelectBoxPropertyEditorComponent,
|
|
13357
13410
|
path: 'ax/editors/select'
|
|
13358
13411
|
},
|
|
13412
|
+
{
|
|
13413
|
+
component: AXSearchBarSelectBoxEditorComponent,
|
|
13414
|
+
path: 'ax/editors/selectBox'
|
|
13415
|
+
},
|
|
13359
13416
|
{
|
|
13360
13417
|
component: AXNumberBoxPropertyEditorComponent,
|
|
13361
13418
|
path: 'ax/editors/number'
|
|
@@ -13379,14 +13436,15 @@ AXProppertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
13379
13436
|
{
|
|
13380
13437
|
component: ColumnPropertyEditorComponent,
|
|
13381
13438
|
path: 'ax/editors/column'
|
|
13382
|
-
},
|
|
13439
|
+
},
|
|
13440
|
+
{
|
|
13383
13441
|
component: AXDatePropertyEditorComponent,
|
|
13384
13442
|
path: 'ax/editors/date'
|
|
13385
13443
|
},
|
|
13386
13444
|
{
|
|
13387
13445
|
component: AXTimePropertyEditorComponent,
|
|
13388
13446
|
path: 'ax/editors/time'
|
|
13389
|
-
}
|
|
13447
|
+
}
|
|
13390
13448
|
])
|
|
13391
13449
|
]] });
|
|
13392
13450
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXProppertyEditorModule, decorators: [{
|
|
@@ -13415,6 +13473,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
13415
13473
|
component: AXSelectBoxPropertyEditorComponent,
|
|
13416
13474
|
path: 'ax/editors/select'
|
|
13417
13475
|
},
|
|
13476
|
+
{
|
|
13477
|
+
component: AXSearchBarSelectBoxEditorComponent,
|
|
13478
|
+
path: 'ax/editors/selectBox'
|
|
13479
|
+
},
|
|
13418
13480
|
{
|
|
13419
13481
|
component: AXNumberBoxPropertyEditorComponent,
|
|
13420
13482
|
path: 'ax/editors/number'
|
|
@@ -13438,19 +13500,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
13438
13500
|
{
|
|
13439
13501
|
component: ColumnPropertyEditorComponent,
|
|
13440
13502
|
path: 'ax/editors/column'
|
|
13441
|
-
},
|
|
13503
|
+
},
|
|
13504
|
+
{
|
|
13442
13505
|
component: AXDatePropertyEditorComponent,
|
|
13443
13506
|
path: 'ax/editors/date'
|
|
13444
13507
|
},
|
|
13445
13508
|
{
|
|
13446
13509
|
component: AXTimePropertyEditorComponent,
|
|
13447
13510
|
path: 'ax/editors/time'
|
|
13448
|
-
}
|
|
13511
|
+
}
|
|
13449
13512
|
])
|
|
13450
13513
|
],
|
|
13451
13514
|
exports: [AXPropertyEditorRendererDirective],
|
|
13452
13515
|
declarations: [AXPropertyEditorRendererDirective],
|
|
13453
|
-
providers: []
|
|
13516
|
+
providers: []
|
|
13454
13517
|
}]
|
|
13455
13518
|
}] });
|
|
13456
13519
|
|