@elite.framework/ng.core 1.0.55 → 1.0.57
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.
|
@@ -4284,6 +4284,11 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4284
4284
|
}
|
|
4285
4285
|
return fixedFilters || {};
|
|
4286
4286
|
}
|
|
4287
|
+
onDropdownButtonClick() {
|
|
4288
|
+
console.log('Custom dropdown button clicked!');
|
|
4289
|
+
this.search({ query: '' }); // trigger your own search
|
|
4290
|
+
setTimeout(() => this.autoComp.show(), 0); // force dropdown to open
|
|
4291
|
+
}
|
|
4287
4292
|
// Called when dropdown button clicked
|
|
4288
4293
|
onDropdownClick(event) {
|
|
4289
4294
|
// 🚫 stop the default dropdown behavior
|
|
@@ -4375,7 +4380,7 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4375
4380
|
(completeMethod)="search($event)"
|
|
4376
4381
|
[multiple]="to['multiple']"
|
|
4377
4382
|
[optionLabel]="to['labelField'] || 'name'"
|
|
4378
|
-
[dropdown]="
|
|
4383
|
+
[dropdown]="false"
|
|
4379
4384
|
[forceSelection]="true"
|
|
4380
4385
|
[placeholder]="(props['placeholder'] ?? '')| translate"
|
|
4381
4386
|
[disabled]="!!props.disabled"
|
|
@@ -4384,7 +4389,6 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4384
4389
|
class="w-full rounded-none"
|
|
4385
4390
|
[showEmptyMessage]="true"
|
|
4386
4391
|
(onSelect)="onSelect($event)"
|
|
4387
|
-
(onDropdownClick)="onDropdownClick($event)"
|
|
4388
4392
|
emptyMessage="{{ getEmptyMessage() | translate }}"
|
|
4389
4393
|
[showTransitionOptions]="'0ms'" >
|
|
4390
4394
|
<!-- <ng-template let-item pTemplate="item">
|
|
@@ -4401,7 +4405,16 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4401
4405
|
<a (click)="onSelect(option)"> {{option[to['labelField'] || 'name'] }} </a>
|
|
4402
4406
|
</ng-template>
|
|
4403
4407
|
-->
|
|
4408
|
+
<!-- (onDropdownClick)="onDropdownClick($event)" -->
|
|
4404
4409
|
</p-autoComplete>
|
|
4410
|
+
<button
|
|
4411
|
+
type="button"
|
|
4412
|
+
pButton
|
|
4413
|
+
icon="pi pi-chevron-down"
|
|
4414
|
+
class="p-button-outlined p-button-secondary rounded-l-none"
|
|
4415
|
+
(click)="onDropdownButtonClick()">
|
|
4416
|
+
</button>
|
|
4417
|
+
|
|
4405
4418
|
`, 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: AutoCompleteModule }, { kind: "component", type: i3.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: InputGroupModule }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
|
|
4406
4419
|
}
|
|
4407
4420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericSelectorTypeComponent, decorators: [{
|
|
@@ -4419,7 +4432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
4419
4432
|
(completeMethod)="search($event)"
|
|
4420
4433
|
[multiple]="to['multiple']"
|
|
4421
4434
|
[optionLabel]="to['labelField'] || 'name'"
|
|
4422
|
-
[dropdown]="
|
|
4435
|
+
[dropdown]="false"
|
|
4423
4436
|
[forceSelection]="true"
|
|
4424
4437
|
[placeholder]="(props['placeholder'] ?? '')| translate"
|
|
4425
4438
|
[disabled]="!!props.disabled"
|
|
@@ -4428,7 +4441,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
4428
4441
|
class="w-full rounded-none"
|
|
4429
4442
|
[showEmptyMessage]="true"
|
|
4430
4443
|
(onSelect)="onSelect($event)"
|
|
4431
|
-
(onDropdownClick)="onDropdownClick($event)"
|
|
4432
4444
|
emptyMessage="{{ getEmptyMessage() | translate }}"
|
|
4433
4445
|
[showTransitionOptions]="'0ms'" >
|
|
4434
4446
|
<!-- <ng-template let-item pTemplate="item">
|
|
@@ -4445,7 +4457,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
4445
4457
|
<a (click)="onSelect(option)"> {{option[to['labelField'] || 'name'] }} </a>
|
|
4446
4458
|
</ng-template>
|
|
4447
4459
|
-->
|
|
4460
|
+
<!-- (onDropdownClick)="onDropdownClick($event)" -->
|
|
4448
4461
|
</p-autoComplete>
|
|
4462
|
+
<button
|
|
4463
|
+
type="button"
|
|
4464
|
+
pButton
|
|
4465
|
+
icon="pi pi-chevron-down"
|
|
4466
|
+
class="p-button-outlined p-button-secondary rounded-l-none"
|
|
4467
|
+
(click)="onDropdownButtonClick()">
|
|
4468
|
+
</button>
|
|
4469
|
+
|
|
4449
4470
|
`,
|
|
4450
4471
|
providers: [DialogService, BaseService],
|
|
4451
4472
|
imports: [
|
|
@@ -6312,14 +6333,6 @@ class BaseCrud {
|
|
|
6312
6333
|
}
|
|
6313
6334
|
this.loadPage(0, 10);
|
|
6314
6335
|
}
|
|
6315
|
-
visibleChange(value) {
|
|
6316
|
-
if (this.mode == 'view') {
|
|
6317
|
-
this.dialogVisible = value;
|
|
6318
|
-
}
|
|
6319
|
-
else {
|
|
6320
|
-
this.drawerVisible = value;
|
|
6321
|
-
}
|
|
6322
|
-
}
|
|
6323
6336
|
onPageChange(event) {
|
|
6324
6337
|
// فك المتغيّرات مع قيمة افتراضية لفلاتر
|
|
6325
6338
|
const { first = this.first, rows = this.rows, sort = this.sort, filters = {} } = event;
|
|
@@ -6350,6 +6363,21 @@ class BaseCrud {
|
|
|
6350
6363
|
this.dialogVisible = true;
|
|
6351
6364
|
}
|
|
6352
6365
|
}
|
|
6366
|
+
visibleChange(value) {
|
|
6367
|
+
// let modeConfig: string; // 'drawer' | 'dialog'
|
|
6368
|
+
// if (typeof this.displayMode === 'string') {
|
|
6369
|
+
// modeConfig = this.displayMode;
|
|
6370
|
+
// } else {
|
|
6371
|
+
// // Per-action override if displayMode is an object
|
|
6372
|
+
// modeConfig = this.displayMode[this.mode as string] ?? 'drawer';
|
|
6373
|
+
// }
|
|
6374
|
+
if (this.displayMode == 'dialog') {
|
|
6375
|
+
this.dialogVisible = value;
|
|
6376
|
+
}
|
|
6377
|
+
else {
|
|
6378
|
+
this.drawerVisible = value;
|
|
6379
|
+
}
|
|
6380
|
+
}
|
|
6353
6381
|
// onTableAction(event: { name: string; row: T | null }): void {
|
|
6354
6382
|
// switch (event.name) {
|
|
6355
6383
|
// case 'add': this.openDrawer(null,event.name); break;
|