@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
|
@@ -10260,7 +10260,6 @@ class AXSearchBarComponent {
|
|
|
10260
10260
|
set items(v) {
|
|
10261
10261
|
v.forEach((el) => {
|
|
10262
10262
|
if (el.value != null) {
|
|
10263
|
-
debugger;
|
|
10264
10263
|
this._filterItems.push({
|
|
10265
10264
|
name: el.property.name,
|
|
10266
10265
|
title: el.property.title,
|
|
@@ -10276,7 +10275,7 @@ class AXSearchBarComponent {
|
|
|
10276
10275
|
.value();
|
|
10277
10276
|
}
|
|
10278
10277
|
clearItem(name) {
|
|
10279
|
-
this._editors.find((
|
|
10278
|
+
this._editors.find((x) => x.property.property.name === name).clear();
|
|
10280
10279
|
}
|
|
10281
10280
|
refresh() {
|
|
10282
10281
|
this._items = JSON.parse(JSON.stringify(this._items));
|
|
@@ -10285,7 +10284,6 @@ class AXSearchBarComponent {
|
|
|
10285
10284
|
this.dropdown.toggle();
|
|
10286
10285
|
}
|
|
10287
10286
|
async handleValueChange(e) {
|
|
10288
|
-
debugger;
|
|
10289
10287
|
let value = [];
|
|
10290
10288
|
let text = [];
|
|
10291
10289
|
if (e.property.editorOptions?.valueField && e.value != null) {
|
|
@@ -10295,7 +10293,6 @@ class AXSearchBarComponent {
|
|
|
10295
10293
|
}
|
|
10296
10294
|
else if (e.property.editorOptions?.mode == 'multiple') {
|
|
10297
10295
|
e.value.forEach((element) => {
|
|
10298
|
-
debugger;
|
|
10299
10296
|
value.push(element[e.property.editorOptions.valueField]);
|
|
10300
10297
|
text.push(element[e.property.editorOptions.textField]);
|
|
10301
10298
|
});
|
|
@@ -10344,10 +10341,8 @@ class AXSearchBarComponent {
|
|
|
10344
10341
|
this._filterItems = this._filterItems.filter((el) => el.name != item.name);
|
|
10345
10342
|
}
|
|
10346
10343
|
search() {
|
|
10347
|
-
debugger;
|
|
10348
10344
|
this.form.validate().then((c) => {
|
|
10349
10345
|
if (c.result) {
|
|
10350
|
-
debugger;
|
|
10351
10346
|
this._filterItems = JSON.parse(JSON.stringify(this._filterItemsClone.filter((el) => el.value != null && el.value != '')));
|
|
10352
10347
|
this.handleButtonClick();
|
|
10353
10348
|
console.log(this._filterItems);
|
|
@@ -10399,30 +10394,24 @@ class AXSearchBarComponent {
|
|
|
10399
10394
|
return item.title;
|
|
10400
10395
|
}
|
|
10401
10396
|
else {
|
|
10402
|
-
// if (Array.isArray(item.textValue)) {
|
|
10403
|
-
// let textValue = '';
|
|
10404
|
-
// item.textValue.forEach((element, index) => {
|
|
10405
|
-
// textValue +=
|
|
10406
|
-
// index === item.textValue.length - 1
|
|
10407
|
-
// ? element[item.component.property.editorOptions.textField]
|
|
10408
|
-
// : element[item.component.property.editorOptions.textField] + ',';
|
|
10409
|
-
// });
|
|
10410
|
-
// return textValue;
|
|
10411
|
-
// } else {
|
|
10412
10397
|
return item.textValue;
|
|
10413
|
-
// }
|
|
10414
10398
|
}
|
|
10415
10399
|
}
|
|
10416
10400
|
ngOnInit() { }
|
|
10417
10401
|
handleTextValue(dataItem) {
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10402
|
+
if (dataItem.value.length) {
|
|
10403
|
+
let text = '';
|
|
10404
|
+
dataItem.value.forEach((element, index) => {
|
|
10405
|
+
text +=
|
|
10406
|
+
index === dataItem.value.length - 1
|
|
10407
|
+
? element[dataItem.property.editorOptions.textField]
|
|
10408
|
+
: element[dataItem.property.editorOptions.textField] + ',';
|
|
10409
|
+
});
|
|
10410
|
+
return text;
|
|
10411
|
+
}
|
|
10412
|
+
else {
|
|
10413
|
+
return;
|
|
10414
|
+
}
|
|
10426
10415
|
}
|
|
10427
10416
|
}
|
|
10428
10417
|
AXSearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -11851,6 +11840,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11851
11840
|
}]
|
|
11852
11841
|
}], ctorParameters: function () { return []; } });
|
|
11853
11842
|
|
|
11843
|
+
class AXSearchBarSelectBoxEditorComponent extends AXProperyEditorComponent {
|
|
11844
|
+
constructor(cdr) {
|
|
11845
|
+
super(cdr);
|
|
11846
|
+
this.cdr = cdr;
|
|
11847
|
+
this.valueField = 'id';
|
|
11848
|
+
this.textField = 'text';
|
|
11849
|
+
this.mode = 'single';
|
|
11850
|
+
this.selectionDataMode = 'value';
|
|
11851
|
+
this.allowSearch = true;
|
|
11852
|
+
this.allowNull = true;
|
|
11853
|
+
this.disabled = false;
|
|
11854
|
+
this.items = [];
|
|
11855
|
+
this.remoteOperation = false;
|
|
11856
|
+
this.returnAllData = false;
|
|
11857
|
+
this.provideData = (e) => {
|
|
11858
|
+
return new Promise((resolve) => {
|
|
11859
|
+
const func = () => {
|
|
11860
|
+
if (Array.isArray(this.items)) {
|
|
11861
|
+
resolve(this.items.slice());
|
|
11862
|
+
}
|
|
11863
|
+
else if (typeof this.items === 'function') {
|
|
11864
|
+
const a = Object.assign(e, { sender: this });
|
|
11865
|
+
resolve(this.items(a));
|
|
11866
|
+
}
|
|
11867
|
+
else {
|
|
11868
|
+
resolve([]);
|
|
11869
|
+
}
|
|
11870
|
+
};
|
|
11871
|
+
const intVal = setInterval(() => {
|
|
11872
|
+
if (this.initiated) {
|
|
11873
|
+
func();
|
|
11874
|
+
clearInterval(intVal);
|
|
11875
|
+
}
|
|
11876
|
+
}, 50);
|
|
11877
|
+
});
|
|
11878
|
+
};
|
|
11879
|
+
}
|
|
11880
|
+
get filter() {
|
|
11881
|
+
return this._filter;
|
|
11882
|
+
}
|
|
11883
|
+
set filter(v) {
|
|
11884
|
+
this._filter = v;
|
|
11885
|
+
if (this.value && this.initiated) {
|
|
11886
|
+
this.value = null;
|
|
11887
|
+
this.selectBox?.refresh();
|
|
11888
|
+
}
|
|
11889
|
+
}
|
|
11890
|
+
handleValueChange(e) {
|
|
11891
|
+
super.handleValueChange(e.selectedItems);
|
|
11892
|
+
}
|
|
11893
|
+
ngAfterViewInit() {
|
|
11894
|
+
this.registerForValidationForm(this.selectBox);
|
|
11895
|
+
this.onRenderCompleted.emit();
|
|
11896
|
+
}
|
|
11897
|
+
}
|
|
11898
|
+
AXSearchBarSelectBoxEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarSelectBoxEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11899
|
+
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"] }] });
|
|
11900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSearchBarSelectBoxEditorComponent, decorators: [{
|
|
11901
|
+
type: Component,
|
|
11902
|
+
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>" }]
|
|
11903
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { selectBox: [{
|
|
11904
|
+
type: ViewChild,
|
|
11905
|
+
args: [AXSelectBoxComponent, { static: false }]
|
|
11906
|
+
}] } });
|
|
11907
|
+
|
|
11854
11908
|
class AXSelectBoxPropertyEditorComponent extends AXProperyEditorComponent {
|
|
11855
11909
|
constructor(cdr) {
|
|
11856
11910
|
super(cdr);
|
|
@@ -11922,16 +11976,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
11922
11976
|
}] } });
|
|
11923
11977
|
|
|
11924
11978
|
class AXSelectBoxPropertyEditorModule {
|
|
11925
|
-
constructor() {
|
|
11926
|
-
}
|
|
11979
|
+
constructor() { }
|
|
11927
11980
|
}
|
|
11928
11981
|
AXSelectBoxPropertyEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11929
|
-
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] });
|
|
11982
|
+
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] });
|
|
11930
11983
|
AXSelectBoxPropertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, providers: [], imports: [[CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule]] });
|
|
11931
11984
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSelectBoxPropertyEditorModule, decorators: [{
|
|
11932
11985
|
type: NgModule,
|
|
11933
11986
|
args: [{
|
|
11934
|
-
declarations: [AXSelectBoxPropertyEditorComponent],
|
|
11987
|
+
declarations: [AXSelectBoxPropertyEditorComponent, AXSearchBarSelectBoxEditorComponent],
|
|
11935
11988
|
imports: [CommonModule, FormsModule, AXSelectBoxModule, AXDataSourceModule, AXValidationModule],
|
|
11936
11989
|
exports: [AXSelectBoxPropertyEditorComponent],
|
|
11937
11990
|
providers: []
|
|
@@ -12125,7 +12178,6 @@ class AXTextPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
12125
12178
|
super(cdr);
|
|
12126
12179
|
this.cdr = cdr;
|
|
12127
12180
|
this.clearButton = false;
|
|
12128
|
-
this.mask = null;
|
|
12129
12181
|
this.maskGuid = false;
|
|
12130
12182
|
this.showMask = true;
|
|
12131
12183
|
}
|
|
@@ -13305,6 +13357,10 @@ AXProppertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
13305
13357
|
component: AXSelectBoxPropertyEditorComponent,
|
|
13306
13358
|
path: 'ax/editors/select'
|
|
13307
13359
|
},
|
|
13360
|
+
{
|
|
13361
|
+
component: AXSearchBarSelectBoxEditorComponent,
|
|
13362
|
+
path: 'ax/editors/selectBox'
|
|
13363
|
+
},
|
|
13308
13364
|
{
|
|
13309
13365
|
component: AXNumberBoxPropertyEditorComponent,
|
|
13310
13366
|
path: 'ax/editors/number'
|
|
@@ -13328,14 +13384,15 @@ AXProppertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
13328
13384
|
{
|
|
13329
13385
|
component: ColumnPropertyEditorComponent,
|
|
13330
13386
|
path: 'ax/editors/column'
|
|
13331
|
-
},
|
|
13387
|
+
},
|
|
13388
|
+
{
|
|
13332
13389
|
component: AXDatePropertyEditorComponent,
|
|
13333
13390
|
path: 'ax/editors/date'
|
|
13334
13391
|
},
|
|
13335
13392
|
{
|
|
13336
13393
|
component: AXTimePropertyEditorComponent,
|
|
13337
13394
|
path: 'ax/editors/time'
|
|
13338
|
-
}
|
|
13395
|
+
}
|
|
13339
13396
|
])
|
|
13340
13397
|
]] });
|
|
13341
13398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXProppertyEditorModule, decorators: [{
|
|
@@ -13364,6 +13421,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
13364
13421
|
component: AXSelectBoxPropertyEditorComponent,
|
|
13365
13422
|
path: 'ax/editors/select'
|
|
13366
13423
|
},
|
|
13424
|
+
{
|
|
13425
|
+
component: AXSearchBarSelectBoxEditorComponent,
|
|
13426
|
+
path: 'ax/editors/selectBox'
|
|
13427
|
+
},
|
|
13367
13428
|
{
|
|
13368
13429
|
component: AXNumberBoxPropertyEditorComponent,
|
|
13369
13430
|
path: 'ax/editors/number'
|
|
@@ -13387,19 +13448,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
13387
13448
|
{
|
|
13388
13449
|
component: ColumnPropertyEditorComponent,
|
|
13389
13450
|
path: 'ax/editors/column'
|
|
13390
|
-
},
|
|
13451
|
+
},
|
|
13452
|
+
{
|
|
13391
13453
|
component: AXDatePropertyEditorComponent,
|
|
13392
13454
|
path: 'ax/editors/date'
|
|
13393
13455
|
},
|
|
13394
13456
|
{
|
|
13395
13457
|
component: AXTimePropertyEditorComponent,
|
|
13396
13458
|
path: 'ax/editors/time'
|
|
13397
|
-
}
|
|
13459
|
+
}
|
|
13398
13460
|
])
|
|
13399
13461
|
],
|
|
13400
13462
|
exports: [AXPropertyEditorRendererDirective],
|
|
13401
13463
|
declarations: [AXPropertyEditorRendererDirective],
|
|
13402
|
-
providers: []
|
|
13464
|
+
providers: []
|
|
13403
13465
|
}]
|
|
13404
13466
|
}] });
|
|
13405
13467
|
|