@es.framework/ng.ui.core 2.0.62 → 2.0.64
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/fesm2022/es.framework-ng.ui.core-checkbox.mjs +72 -58
- package/fesm2022/es.framework-ng.ui.core-checkbox.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-form-button.mjs +38 -27
- package/fesm2022/es.framework-ng.ui.core-form-button.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-ui-all.mjs +14 -1
- package/fesm2022/es.framework-ng.ui.core-formly-ui-all.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-crud-report.mjs +22 -0
- package/fesm2022/es.framework-ng.ui.core-generic-crud-report.mjs.map +1 -0
- package/fesm2022/es.framework-ng.ui.core-generic-crud-table.mjs +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-crud-table.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-listbox.mjs +291 -0
- package/fesm2022/es.framework-ng.ui.core-generic-listbox.mjs.map +1 -0
- package/fesm2022/es.framework-ng.ui.core-generic-view.mjs +108 -131
- package/fesm2022/es.framework-ng.ui.core-generic-view.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-input.mjs +2 -0
- package/fesm2022/es.framework-ng.ui.core-input.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-repeat.mjs +62 -50
- package/fesm2022/es.framework-ng.ui.core-repeat.mjs.map +1 -1
- package/generic-crud-report/README.md +3 -0
- package/generic-listbox/README.md +3 -0
- package/package.json +9 -1
- package/types/es.framework-ng.ui.core-checkbox.d.ts +1 -0
- package/types/es.framework-ng.ui.core-form-button.d.ts +11 -3
- package/types/es.framework-ng.ui.core-formly-ui-all.d.ts +2 -1
- package/types/es.framework-ng.ui.core-generic-crud-report.d.ts +10 -0
- package/types/es.framework-ng.ui.core-generic-listbox.d.ts +72 -0
- package/types/es.framework-ng.ui.core-generic-view.d.ts +17 -6
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { NgModule, inject, ViewChild, Component } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
5
|
+
import { finalize } from 'rxjs/operators';
|
|
6
|
+
import * as i2 from '@angular/forms';
|
|
7
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import * as i3 from 'primeng/listbox';
|
|
9
|
+
import { ListboxModule } from 'primeng/listbox';
|
|
10
|
+
import * as i5 from 'primeng/button';
|
|
11
|
+
import { ButtonModule } from 'primeng/button';
|
|
12
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
13
|
+
import { FieldType, FormlyAttributes } from '@ngx-formly/core';
|
|
14
|
+
import { TranslatePipe } from '@es.framework/ng.core/pipes';
|
|
15
|
+
import * as i1 from '@es.framework/ng.core/services';
|
|
16
|
+
import { LocalizationService, QueryParser, BaseService } from '@es.framework/ng.core/services';
|
|
17
|
+
import { GenericDialogComponent } from '@es.framework/ng.ui.core/generic-dialog';
|
|
18
|
+
import * as i4 from 'primeng/api';
|
|
19
|
+
|
|
20
|
+
class GenericListboxModule {
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericListboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
22
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: GenericListboxModule, imports: [CommonModule] });
|
|
23
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericListboxModule, imports: [CommonModule] });
|
|
24
|
+
}
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericListboxModule, decorators: [{
|
|
26
|
+
type: NgModule,
|
|
27
|
+
args: [{
|
|
28
|
+
imports: [CommonModule],
|
|
29
|
+
}]
|
|
30
|
+
}] });
|
|
31
|
+
|
|
32
|
+
class GenericListboxTypeComponent extends FieldType {
|
|
33
|
+
svc;
|
|
34
|
+
cdr;
|
|
35
|
+
dialog;
|
|
36
|
+
options_ = [];
|
|
37
|
+
selectedItem;
|
|
38
|
+
loading = false;
|
|
39
|
+
_offlineList = [];
|
|
40
|
+
translateService = inject(LocalizationService);
|
|
41
|
+
sanitizer = inject(DomSanitizer);
|
|
42
|
+
api;
|
|
43
|
+
valueChangeSubscription;
|
|
44
|
+
constructor(svc, cdr) {
|
|
45
|
+
super();
|
|
46
|
+
this.svc = svc;
|
|
47
|
+
this.cdr = cdr;
|
|
48
|
+
}
|
|
49
|
+
get optionLabel() {
|
|
50
|
+
if (this.props.useMultiLang) {
|
|
51
|
+
return this.translateService.currentLang === 'en' ? (this.props.labelFieldEn || 'name') : (this.props.labelField || 'name');
|
|
52
|
+
}
|
|
53
|
+
return this.props.labelField || 'name';
|
|
54
|
+
}
|
|
55
|
+
ngOnInit() {
|
|
56
|
+
this.api = this.svc;
|
|
57
|
+
this.api.apiName = this.props.serviceName;
|
|
58
|
+
this.api.moduleName = this.props.moduleName;
|
|
59
|
+
// تحميل البيانات لأول مرة
|
|
60
|
+
this.search({ query: '' });
|
|
61
|
+
this.valueChangeSubscription = this.formControl.valueChanges.subscribe(() => {
|
|
62
|
+
this.syncSelectionWithControl();
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
onFilterSearch(event) {
|
|
66
|
+
if (!this.props.offline) {
|
|
67
|
+
this.search({ query: event.filter });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
onSelectionChange(val) {
|
|
71
|
+
const vf = this.props.valueField || 'id';
|
|
72
|
+
this.selectedItem = val;
|
|
73
|
+
if (this.props.multiple) {
|
|
74
|
+
const values = Array.isArray(val) ? val.map(i => i[vf]) : [];
|
|
75
|
+
this.formControl.setValue(values);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.formControl.setValue(val ? val[vf] : null);
|
|
79
|
+
}
|
|
80
|
+
if (this.props.onSelect) {
|
|
81
|
+
this.props.onSelect(this.field, { item: val });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
syncSelectionWithControl() {
|
|
85
|
+
const val = this.formControl.value;
|
|
86
|
+
const vf = this.props.valueField || 'id';
|
|
87
|
+
if (val == null || (Array.isArray(val) && val.length === 0)) {
|
|
88
|
+
this.selectedItem = this.props.multiple ? [] : null;
|
|
89
|
+
}
|
|
90
|
+
else if (this.props.multiple && Array.isArray(val)) {
|
|
91
|
+
this.selectedItem = this.options_.filter(opt => val.includes(opt[vf]));
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
this.selectedItem = this.options_.find(opt => opt[vf] === val);
|
|
95
|
+
}
|
|
96
|
+
this.cdr.detectChanges();
|
|
97
|
+
}
|
|
98
|
+
// الدالة التي طلبتها بنفس الآلية البسيطة
|
|
99
|
+
search(event) {
|
|
100
|
+
const q = event.query?.toString() || '';
|
|
101
|
+
const lf = this.optionLabel;
|
|
102
|
+
// --- أولاً: حالة الـ Offline (البحث المحلي) ---
|
|
103
|
+
if (this.props.offline) {
|
|
104
|
+
if (this.props.offlineDataFn) {
|
|
105
|
+
// إذا كان هناك دالة مخصصة لجلب البيانات محلياً
|
|
106
|
+
this.options_ = this.props.offlineDataFn(q);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// البحث الافتراضي في المصفوفة المخزنة
|
|
110
|
+
this.options_ = this._offlineList.filter(item => {
|
|
111
|
+
const searchStr = q.toLowerCase();
|
|
112
|
+
// يبحث في الحقل المعرف كـ labelField
|
|
113
|
+
return item[lf]?.toString().toLowerCase().includes(searchStr) ||
|
|
114
|
+
// أو يبحث في id إذا كان البحث نصياً مطابقاً
|
|
115
|
+
item[this.props.valueField || 'id']?.toString().toLowerCase() === searchStr;
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
this.syncSelectionWithControl();
|
|
119
|
+
this.cdr.detectChanges();
|
|
120
|
+
return; // إنهاء الدالة هنا لأننا في وضع الأوفلاين
|
|
121
|
+
}
|
|
122
|
+
// --- ثانياً: حالة الـ Online (طلب API) ---
|
|
123
|
+
this.loading = true;
|
|
124
|
+
const fixedFilters = this.getFixedFilters(q);
|
|
125
|
+
const queryParams = {
|
|
126
|
+
filters: [],
|
|
127
|
+
top: this.props.query?.['top'] ?? 20,
|
|
128
|
+
skip: this.props.query?.['skip'] ?? 0,
|
|
129
|
+
orderBy: this.props.query?.['orderBy'] || [],
|
|
130
|
+
expand: this.props.query?.['expand'] || [],
|
|
131
|
+
select: this.props.query?.['select'] || [],
|
|
132
|
+
};
|
|
133
|
+
let dynamicFilters = [];
|
|
134
|
+
if (this.props.query && this.props.query['filters']) {
|
|
135
|
+
const f = this.props.query['filters'];
|
|
136
|
+
// هنا يتم تمرير searchText للدالة التي أرسلتها أنت في الـ Config
|
|
137
|
+
dynamicFilters = typeof f === 'function' ? f(q, this.field, this.model) : f;
|
|
138
|
+
}
|
|
139
|
+
if (dynamicFilters.length === 0) {
|
|
140
|
+
const mainGroup = { logicalOperator: 'and', conditions: [] };
|
|
141
|
+
if (q)
|
|
142
|
+
mainGroup.conditions.push({ field: lf, operator: 'contains', value: q });
|
|
143
|
+
Object.keys(fixedFilters || {}).forEach(key => {
|
|
144
|
+
if (fixedFilters[key] != null)
|
|
145
|
+
mainGroup.conditions.push({ field: key, operator: 'eq', value: fixedFilters[key] });
|
|
146
|
+
});
|
|
147
|
+
if (mainGroup.conditions.length > 0)
|
|
148
|
+
queryParams.filters.push(mainGroup);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
dynamicFilters.forEach((fg) => {
|
|
152
|
+
queryParams.filters.push({ ...fg, groupLogicalOperator: fg.groupLogicalOperator || 'and' });
|
|
153
|
+
});
|
|
154
|
+
if (Object.keys(fixedFilters || {}).length > 0) {
|
|
155
|
+
queryParams.filters.push({
|
|
156
|
+
logicalOperator: 'and',
|
|
157
|
+
groupLogicalOperator: 'and',
|
|
158
|
+
conditions: Object.keys(fixedFilters).map(k => ({ field: k, operator: 'eq', value: fixedFilters[k] }))
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
let listEndpoint = this.props.listEndpoint;
|
|
163
|
+
if (typeof listEndpoint === 'function')
|
|
164
|
+
listEndpoint = listEndpoint(this.model);
|
|
165
|
+
this.api.getList({ 'query': QueryParser.toString(queryParams) }, listEndpoint)
|
|
166
|
+
.pipe(finalize(() => {
|
|
167
|
+
this.loading = false;
|
|
168
|
+
this.cdr.detectChanges();
|
|
169
|
+
}))
|
|
170
|
+
.subscribe({
|
|
171
|
+
next: (res) => {
|
|
172
|
+
this.options_ = res.items ?? res ?? [];
|
|
173
|
+
this.syncSelectionWithControl();
|
|
174
|
+
this.cdr.detectChanges();
|
|
175
|
+
},
|
|
176
|
+
error: () => {
|
|
177
|
+
this.options_ = [];
|
|
178
|
+
this.cdr.detectChanges();
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
getFixedFilters(query = '') {
|
|
183
|
+
const ff = this.props.fixedFilters;
|
|
184
|
+
return typeof ff === 'function' ? ff(query, this.field) : (ff || {});
|
|
185
|
+
}
|
|
186
|
+
getFormattedLabel(item) {
|
|
187
|
+
if (!item)
|
|
188
|
+
return '';
|
|
189
|
+
const label = this.props.formatter ? this.props.formatter(item) : (item[this.optionLabel] || '');
|
|
190
|
+
return this.sanitizer.bypassSecurityTrustHtml(label);
|
|
191
|
+
}
|
|
192
|
+
getEmptyMessage() {
|
|
193
|
+
return this.loading ? 'LOADING_DATA_MESSAGE' : 'NO_RESULTS_FOUND';
|
|
194
|
+
}
|
|
195
|
+
onAddNewClick() { this.dialog.openForm("create"); }
|
|
196
|
+
afterSave(event) {
|
|
197
|
+
this.search({ query: '' });
|
|
198
|
+
if (this.props.afterSave)
|
|
199
|
+
this.props.afterSave(this.field, { item: event.record });
|
|
200
|
+
}
|
|
201
|
+
ngOnDestroy() {
|
|
202
|
+
if (this.valueChangeSubscription)
|
|
203
|
+
this.valueChangeSubscription.unsubscribe();
|
|
204
|
+
}
|
|
205
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericListboxTypeComponent, deps: [{ token: i1.BaseService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
206
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: GenericListboxTypeComponent, isStandalone: true, selector: "formly-generic-listbox", providers: [DialogService, BaseService], viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
207
|
+
<div class="flex flex-col gap-2 w-full">
|
|
208
|
+
<div class="flex gap-1 items-center mb-1" *ngIf="props.canAdd && props.formFields">
|
|
209
|
+
<p-button icon="pi pi-plus" [label]="'ADD_NEW' | translate" size="small" severity="primary" (click)="onAddNewClick()" />
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<p-listbox
|
|
213
|
+
[options]="options_"
|
|
214
|
+
[ngModel]="selectedItem"
|
|
215
|
+
(ngModelChange)="onSelectionChange($event)"
|
|
216
|
+
[formlyAttributes]="field"
|
|
217
|
+
[multiple]="props.multiple"
|
|
218
|
+
[checkbox]="props.multiple"
|
|
219
|
+
[filter]="props.filters !== false"
|
|
220
|
+
[optionLabel]="optionLabel"
|
|
221
|
+
[disabled]="!!props.disabled"
|
|
222
|
+
[listStyle]="{'max-height': props.listHeight || '250px'}"
|
|
223
|
+
(onFilter)="onFilterSearch($event)"
|
|
224
|
+
class="w-full"
|
|
225
|
+
[emptyMessage]="getEmptyMessage() | translate">
|
|
226
|
+
|
|
227
|
+
<ng-template let-item pTemplate="item">
|
|
228
|
+
<div class="flex flex-col">
|
|
229
|
+
<span [innerHTML]="getFormattedLabel(item)"></span>
|
|
230
|
+
</div>
|
|
231
|
+
</ng-template>
|
|
232
|
+
</p-listbox>
|
|
233
|
+
|
|
234
|
+
<app-generic-dialog #dialog [formFields]="props.formFields ?? []" [apiName]="props.serviceName" [moduleName]="props.moduleName"
|
|
235
|
+
[idField]="props.idField ?? 'id'" [displayMode]="'dialog'" (afterSave)="afterSave($event)">
|
|
236
|
+
</app-generic-dialog>
|
|
237
|
+
</div>
|
|
238
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: ListboxModule }, { kind: "component", type: i3.Listbox, selector: "p-listbox, p-listBox, p-list-box", inputs: ["hostName", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "ariaLabel", "selectOnFocus", "searchLocale", "focusOnHover", "filterMessage", "filterFields", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "scrollHeight", "tabindex", "multiple", "styleClass", "listStyle", "listStyleClass", "readonly", "checkbox", "filter", "filterBy", "filterMatchMode", "filterLocale", "metaKeySelection", "dataKey", "showToggleAll", "optionLabel", "optionValue", "optionGroupChildren", "optionGroupLabel", "optionDisabled", "ariaFilterLabel", "filterPlaceHolder", "emptyFilterMessage", "emptyMessage", "group", "options", "filterValue", "selectAll", "striped", "highlightOnSelect", "checkmark", "dragdrop", "dropListData", "fluid"], outputs: ["onChange", "onClick", "onDblClick", "onFilter", "onFocus", "onBlur", "onSelectAllChange", "onLazyLoad", "onDrop"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i5.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: GenericDialogComponent, selector: "app-generic-dialog", inputs: ["form", "service", "formFields", "model", "apiName", "moduleName", "idField", "dialogMaxWidth", "displayMode", "mode", "forceState", "drawerVisible", "dialogVisible", "isViewMode", "isEditMode", "useConfirmOnSave", "loading", "errorMsg", "errorMessage", "beforeSaveTransform", "hideTable", "autoShowForm"], outputs: ["action", "afterSave", "afterDelete", "beforeSave", "beforeDelete", "formCancel", "formInit", "dataLoaded", "selectionChange", "error", "visibleChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
239
|
+
}
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericListboxTypeComponent, decorators: [{
|
|
241
|
+
type: Component,
|
|
242
|
+
args: [{
|
|
243
|
+
selector: 'formly-generic-listbox',
|
|
244
|
+
template: `
|
|
245
|
+
<div class="flex flex-col gap-2 w-full">
|
|
246
|
+
<div class="flex gap-1 items-center mb-1" *ngIf="props.canAdd && props.formFields">
|
|
247
|
+
<p-button icon="pi pi-plus" [label]="'ADD_NEW' | translate" size="small" severity="primary" (click)="onAddNewClick()" />
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
<p-listbox
|
|
251
|
+
[options]="options_"
|
|
252
|
+
[ngModel]="selectedItem"
|
|
253
|
+
(ngModelChange)="onSelectionChange($event)"
|
|
254
|
+
[formlyAttributes]="field"
|
|
255
|
+
[multiple]="props.multiple"
|
|
256
|
+
[checkbox]="props.multiple"
|
|
257
|
+
[filter]="props.filters !== false"
|
|
258
|
+
[optionLabel]="optionLabel"
|
|
259
|
+
[disabled]="!!props.disabled"
|
|
260
|
+
[listStyle]="{'max-height': props.listHeight || '250px'}"
|
|
261
|
+
(onFilter)="onFilterSearch($event)"
|
|
262
|
+
class="w-full"
|
|
263
|
+
[emptyMessage]="getEmptyMessage() | translate">
|
|
264
|
+
|
|
265
|
+
<ng-template let-item pTemplate="item">
|
|
266
|
+
<div class="flex flex-col">
|
|
267
|
+
<span [innerHTML]="getFormattedLabel(item)"></span>
|
|
268
|
+
</div>
|
|
269
|
+
</ng-template>
|
|
270
|
+
</p-listbox>
|
|
271
|
+
|
|
272
|
+
<app-generic-dialog #dialog [formFields]="props.formFields ?? []" [apiName]="props.serviceName" [moduleName]="props.moduleName"
|
|
273
|
+
[idField]="props.idField ?? 'id'" [displayMode]="'dialog'" (afterSave)="afterSave($event)">
|
|
274
|
+
</app-generic-dialog>
|
|
275
|
+
</div>
|
|
276
|
+
`,
|
|
277
|
+
providers: [DialogService, BaseService],
|
|
278
|
+
standalone: true,
|
|
279
|
+
imports: [FormsModule, ReactiveFormsModule, ListboxModule, FormlyAttributes, TranslatePipe, ButtonModule, GenericDialogComponent]
|
|
280
|
+
}]
|
|
281
|
+
}], ctorParameters: () => [{ type: i1.BaseService }, { type: i0.ChangeDetectorRef }], propDecorators: { dialog: [{
|
|
282
|
+
type: ViewChild,
|
|
283
|
+
args: ['dialog']
|
|
284
|
+
}] } });
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Generated bundle index. Do not edit.
|
|
288
|
+
*/
|
|
289
|
+
|
|
290
|
+
export { GenericListboxModule, GenericListboxTypeComponent };
|
|
291
|
+
//# sourceMappingURL=es.framework-ng.ui.core-generic-listbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es.framework-ng.ui.core-generic-listbox.mjs","sources":["../../../../libs/ng.ui.core/generic-listbox/src/lib/generic-listbox.module.ts","../../../../libs/ng.ui.core/generic-listbox/src/lib/generic-listbox.component.ts","../../../../libs/ng.ui.core/generic-listbox/src/es.framework-ng.ui.core-generic-listbox.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class GenericListboxModule {}\n","import { ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild, inject } from '@angular/core';\nimport { DialogService } from 'primeng/dynamicdialog';\nimport { Observable, Subscription } from 'rxjs';\nimport { finalize } from 'rxjs/operators';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { ListboxModule } from 'primeng/listbox';\nimport { ButtonModule } from 'primeng/button';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { FormlyFieldConfig, FieldType, FormlyAttributes, FieldTypeConfig } from '@ngx-formly/core';\nimport { TranslatePipe } from '@es.framework/ng.core/pipes';\nimport { FormlyFieldProps } from '@ngx-formly/primeng/form-field';\nimport { BaseService, FilterGroup, LocalizationService, QueryParameters, QueryParser } from '@es.framework/ng.core/services';\nimport { GenericDialogComponent } from '@es.framework/ng.ui.core/generic-dialog';\n\ninterface GenericListboxProps extends FormlyFieldProps {\n moduleName: string;\n serviceName: string;\n listEndpoint?: string | ((model: any) => string);\n labelField?: string;\n labelFieldEn?: string;\n valueField?: string;\n useMultiLang?: boolean;\n multiple?: boolean;\n offline?: boolean;\n offlineItems?: any[];\n offlineItems$?: Observable<any[]>;\n onSelect?: (field: FormlyFieldConfig, event?: any) => void;\n offlineDataFn?: (query?: string) => any[];\n query?: Record<string, any> | QueryParameters;\n fixedFilters?: Record<string, any>;\n canAdd?: boolean;\n formFields?: FormlyFieldConfig[];\n afterSave?: (field: FormlyFieldConfig, event?: any) => void;\n formatter?: (row: any, value?: any) => string;\n listHeight?: string;\n filters?: boolean;\n idField?: string;\n}\n\n@Component({\n selector: 'formly-generic-listbox',\n template: `\n <div class=\"flex flex-col gap-2 w-full\">\n <div class=\"flex gap-1 items-center mb-1\" *ngIf=\"props.canAdd && props.formFields\">\n <p-button icon=\"pi pi-plus\" [label]=\"'ADD_NEW' | translate\" size=\"small\" severity=\"primary\" (click)=\"onAddNewClick()\" />\n </div>\n\n <p-listbox\n [options]=\"options_\"\n [ngModel]=\"selectedItem\"\n (ngModelChange)=\"onSelectionChange($event)\"\n [formlyAttributes]=\"field\"\n [multiple]=\"props.multiple\"\n [checkbox]=\"props.multiple\"\n [filter]=\"props.filters !== false\"\n [optionLabel]=\"optionLabel\"\n [disabled]=\"!!props.disabled\"\n [listStyle]=\"{'max-height': props.listHeight || '250px'}\"\n (onFilter)=\"onFilterSearch($event)\"\n class=\"w-full\"\n [emptyMessage]=\"getEmptyMessage() | translate\">\n\n <ng-template let-item pTemplate=\"item\">\n <div class=\"flex flex-col\">\n <span [innerHTML]=\"getFormattedLabel(item)\"></span>\n </div>\n </ng-template>\n </p-listbox>\n\n <app-generic-dialog #dialog [formFields]=\"props.formFields ?? []\" [apiName]=\"props.serviceName\" [moduleName]=\"props.moduleName\"\n [idField]=\"props.idField ?? 'id'\" [displayMode]=\"'dialog'\" (afterSave)=\"afterSave($event)\">\n </app-generic-dialog>\n </div>\n `,\n providers: [DialogService, BaseService],\n standalone: true,\n imports: [FormsModule, ReactiveFormsModule, ListboxModule, FormlyAttributes, TranslatePipe, ButtonModule, GenericDialogComponent]\n})\nexport class GenericListboxTypeComponent extends FieldType<FieldTypeConfig<GenericListboxProps>> implements OnInit, OnDestroy {\n @ViewChild('dialog') dialog!: GenericDialogComponent;\n options_: any[] = [];\n selectedItem: any;\n loading = false;\n private _offlineList: any[] = [];\n private translateService = inject(LocalizationService);\n private sanitizer: DomSanitizer = inject(DomSanitizer);\n api: BaseService | any;\n private valueChangeSubscription!: Subscription;\n\n constructor(private svc: BaseService, private cdr: ChangeDetectorRef) { super(); }\n\n get optionLabel(): string {\n if (this.props.useMultiLang) {\n return this.translateService.currentLang === 'en' ? (this.props.labelFieldEn || 'name') : (this.props.labelField || 'name');\n }\n return this.props.labelField || 'name';\n }\n\n ngOnInit() {\n this.api = this.svc;\n this.api.apiName = this.props.serviceName;\n this.api.moduleName = this.props.moduleName;\n\n // تحميل البيانات لأول مرة\n this.search({ query: '' });\n\n this.valueChangeSubscription = this.formControl.valueChanges.subscribe(() => {\n this.syncSelectionWithControl();\n });\n }\n\n onFilterSearch(event: any) {\n if (!this.props.offline) {\n this.search({ query: event.filter });\n }\n }\n\n onSelectionChange(val: any) {\n const vf = this.props.valueField || 'id';\n this.selectedItem = val;\n\n if (this.props.multiple) {\n const values = Array.isArray(val) ? val.map(i => i[vf]) : [];\n this.formControl.setValue(values);\n } else {\n this.formControl.setValue(val ? val[vf] : null);\n }\n\n if (this.props.onSelect) {\n this.props.onSelect(this.field, { item: val });\n }\n }\n\n private syncSelectionWithControl() {\n const val = this.formControl.value;\n const vf = this.props.valueField || 'id';\n\n if (val == null || (Array.isArray(val) && val.length === 0)) {\n this.selectedItem = this.props.multiple ? [] : null;\n } else if (this.props.multiple && Array.isArray(val)) {\n this.selectedItem = this.options_.filter(opt => val.includes(opt[vf]));\n } else {\n this.selectedItem = this.options_.find(opt => opt[vf] === val);\n }\n this.cdr.detectChanges();\n }\n\n // الدالة التي طلبتها بنفس الآلية البسيطة\n search(event: { query: string }) {\n const q = event.query?.toString() || '';\n const lf = this.optionLabel;\n\n // --- أولاً: حالة الـ Offline (البحث المحلي) ---\n if (this.props.offline) {\n if (this.props.offlineDataFn) {\n // إذا كان هناك دالة مخصصة لجلب البيانات محلياً\n this.options_ = this.props.offlineDataFn(q);\n } else {\n // البحث الافتراضي في المصفوفة المخزنة\n this.options_ = this._offlineList.filter(item => {\n const searchStr = q.toLowerCase();\n // يبحث في الحقل المعرف كـ labelField\n return item[lf]?.toString().toLowerCase().includes(searchStr) ||\n // أو يبحث في id إذا كان البحث نصياً مطابقاً\n item[this.props.valueField || 'id']?.toString().toLowerCase() === searchStr;\n });\n }\n this.syncSelectionWithControl();\n this.cdr.detectChanges();\n return; // إنهاء الدالة هنا لأننا في وضع الأوفلاين\n }\n\n // --- ثانياً: حالة الـ Online (طلب API) ---\n this.loading = true;\n const fixedFilters = this.getFixedFilters(q);\n\n const queryParams: QueryParameters = {\n filters: [],\n top: this.props.query?.['top'] ?? 20,\n skip: this.props.query?.['skip'] ?? 0,\n orderBy: this.props.query?.['orderBy'] || [],\n expand: this.props.query?.['expand'] || [],\n select: this.props.query?.['select'] || [],\n };\n\n let dynamicFilters: any[] = [];\n if (this.props.query && this.props.query['filters']) {\n const f = this.props.query['filters'];\n // هنا يتم تمرير searchText للدالة التي أرسلتها أنت في الـ Config\n dynamicFilters = typeof f === 'function' ? f(q, this.field, this.model) : f;\n }\n\n if (dynamicFilters.length === 0) {\n const mainGroup: FilterGroup = { logicalOperator: 'and', conditions: [] };\n if (q) mainGroup.conditions.push({ field: lf, operator: 'contains', value: q });\n\n Object.keys(fixedFilters || {}).forEach(key => {\n if (fixedFilters[key] != null) mainGroup.conditions.push({ field: key, operator: 'eq', value: fixedFilters[key] });\n });\n\n if (mainGroup.conditions.length > 0) queryParams.filters.push(mainGroup);\n } else {\n dynamicFilters.forEach((fg) => {\n queryParams.filters.push({ ...fg, groupLogicalOperator: fg.groupLogicalOperator || 'and' });\n });\n\n if (Object.keys(fixedFilters || {}).length > 0) {\n queryParams.filters.push({\n logicalOperator: 'and',\n groupLogicalOperator: 'and',\n conditions: Object.keys(fixedFilters).map(k => ({ field: k, operator: 'eq', value: fixedFilters[k] }))\n });\n }\n }\n\n let listEndpoint = this.props.listEndpoint;\n if (typeof listEndpoint === 'function') listEndpoint = listEndpoint(this.model);\n\n this.api.getList({ 'query': QueryParser.toString(queryParams) }, listEndpoint)\n .pipe(finalize(() => {\n this.loading = false;\n this.cdr.detectChanges();\n }))\n .subscribe({\n next: (res: any) => {\n this.options_ = res.items ?? res ?? [];\n this.syncSelectionWithControl();\n this.cdr.detectChanges();\n },\n error: () => {\n this.options_ = [];\n this.cdr.detectChanges();\n }\n });\n }\n\n getFixedFilters(query: string = ''): any {\n const ff = this.props.fixedFilters;\n return typeof ff === 'function' ? ff(query, this.field) : (ff || {});\n }\n\n getFormattedLabel(item: any): SafeHtml {\n if (!item) return '';\n const label = this.props.formatter ? this.props.formatter(item) : (item[this.optionLabel] || '');\n return this.sanitizer.bypassSecurityTrustHtml(label);\n }\n\n getEmptyMessage(): string {\n return this.loading ? 'LOADING_DATA_MESSAGE' : 'NO_RESULTS_FOUND';\n }\n\n onAddNewClick() { this.dialog.openForm(\"create\"); }\n\n afterSave(event: any) {\n this.search({ query: '' });\n if (this.props.afterSave) this.props.afterSave(this.field, { item: event.record });\n }\n\n ngOnDestroy() {\n if (this.valueChangeSubscription) this.valueChangeSubscription.unsubscribe();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAMa,oBAAoB,CAAA;uGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAFrB,YAAY,CAAA,EAAA,CAAA;AAEX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAFrB,YAAY,CAAA,EAAA,CAAA;;2FAEX,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA;;;ACyEK,MAAO,2BAA4B,SAAQ,SAA+C,CAAA;AAW1E,IAAA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