@elite.framework/ng.core 1.0.37 → 1.0.38
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.
|
@@ -2550,7 +2550,7 @@ class FormlyAvatarImageComponent extends FieldType {
|
|
|
2550
2550
|
</label>
|
|
2551
2551
|
<div class="mt-1 flex items-center">
|
|
2552
2552
|
<p-avatar
|
|
2553
|
-
[image]="field.formControl.value || field.props['defaultImage']"
|
|
2553
|
+
[image]="(field.props['baseUrl'] || '' + field.formControl.value )|| field.props['defaultImage']"
|
|
2554
2554
|
[size]="field.props['size'] || 'large'"
|
|
2555
2555
|
[shape]="field.props['shape'] || 'circle'"
|
|
2556
2556
|
[style]="field.props['avatarStyle'] || ''"
|
|
@@ -2588,7 +2588,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
2588
2588
|
</label>
|
|
2589
2589
|
<div class="mt-1 flex items-center">
|
|
2590
2590
|
<p-avatar
|
|
2591
|
-
[image]="field.formControl.value || field.props['defaultImage']"
|
|
2591
|
+
[image]="(field.props['baseUrl'] || '' + field.formControl.value )|| field.props['defaultImage']"
|
|
2592
2592
|
[size]="field.props['size'] || 'large'"
|
|
2593
2593
|
[shape]="field.props['shape'] || 'circle'"
|
|
2594
2594
|
[style]="field.props['avatarStyle'] || ''"
|
|
@@ -3089,7 +3089,7 @@ class GenericSearch {
|
|
|
3089
3089
|
this.search.emit(this.model);
|
|
3090
3090
|
}
|
|
3091
3091
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericSearch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3092
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericSearch, isStandalone: true, selector: "lib-generic-search", inputs: { placeholder: "placeholder", model: "model", fields: "fields" }, outputs: { search: "search" }, viewQueries: [{ propertyName: "overlay", first: true, predicate: ["overlay"], descendants: true }], ngImport: i0, template: "<div class=\"flex items-center gap-3\">\n<p-iconfield iconPosition=\"left\">\n\n <p-inputicon class=\"pi pi-search\"> </p-inputicon>\n <input pInputText type=\"text\" (keyup.enter)=\"onSubmit()\" [(ngModel)]=\"model['filter']\" placeholder=\"{{ 'SEARCH' | translate }}\" />\n <!-- 2) Search Button that toggles the popover -->\n\n</p-iconfield>\n<p-button icon=\"pi pi-filter\" outlined severity=\"secondary\" (onClick)=\"overlay.toggle($event)\" />\n</div>\n<!-- 4) Popover for Advanced Multi-field Search -->\n<p-popover #overlay [dismissable]=\"true\" styleClass=\"p-4 w-80\">\n\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); overlay.hide()\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields_\"\n [model]=\"model\"\n [options]=\"options\">\n </formly-form>\n\n <div class=\"flex justify-end mt-
|
|
3092
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericSearch, isStandalone: true, selector: "lib-generic-search", inputs: { placeholder: "placeholder", model: "model", fields: "fields" }, outputs: { search: "search" }, viewQueries: [{ propertyName: "overlay", first: true, predicate: ["overlay"], descendants: true }], ngImport: i0, template: "<div class=\"flex items-center gap-3\">\r\n<p-iconfield iconPosition=\"left\">\r\n\r\n <p-inputicon class=\"pi pi-search\"> </p-inputicon>\r\n <input pInputText type=\"text\" (keyup.enter)=\"onSubmit()\" [(ngModel)]=\"model['filter']\" placeholder=\"{{ 'SEARCH' | translate }}\" />\r\n <!-- 2) Search Button that toggles the popover -->\r\n\r\n</p-iconfield>\r\n<p-button icon=\"pi pi-filter\" outlined severity=\"secondary\" (onClick)=\"overlay.toggle($event)\" />\r\n</div>\r\n<!-- 4) Popover for Advanced Multi-field Search -->\r\n<p-popover #overlay [dismissable]=\"true\" styleClass=\"p-4 w-80 max-h-96 flex flex-col\">\r\n\r\n <div class=\"flex-1 overflow-auto\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); overlay.hide()\">\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"fields_\"\r\n [model]=\"model\"\r\n [options]=\"options\">\r\n </formly-form>\r\n </form>\r\n </div>\r\n\r\n <div class=\"flex justify-end mt-2 space-x-2 flex-none\">\r\n <button type=\"submit\" pButton size=\"small\" label=\"{{ 'SEARCH' | translate }}\"></button>\r\n <button type=\"button\" pButton size=\"small\" class=\"p-button-text\" (click)=\"onReset(); overlay.hide()\">\r\n {{ 'CLEAR' | translate }}\r\n </button>\r\n </div>\r\n\r\n\r\n</p-popover>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i3$2.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputIconModule }, { kind: "component", type: i4$2.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "component", type: i5$1.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
|
|
3093
3093
|
}
|
|
3094
3094
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericSearch, decorators: [{
|
|
3095
3095
|
type: Component,
|
|
@@ -3106,7 +3106,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
3106
3106
|
InputIconModule,
|
|
3107
3107
|
IconFieldModule,
|
|
3108
3108
|
InputTextModule,
|
|
3109
|
-
], template: "<div class=\"flex items-center gap-3\">\n<p-iconfield iconPosition=\"left\">\n\n <p-inputicon class=\"pi pi-search\"> </p-inputicon>\n <input pInputText type=\"text\" (keyup.enter)=\"onSubmit()\" [(ngModel)]=\"model['filter']\" placeholder=\"{{ 'SEARCH' | translate }}\" />\n <!-- 2) Search Button that toggles the popover -->\n\n</p-iconfield>\n<p-button icon=\"pi pi-filter\" outlined severity=\"secondary\" (onClick)=\"overlay.toggle($event)\" />\n</div>\n<!-- 4) Popover for Advanced Multi-field Search -->\n<p-popover #overlay [dismissable]=\"true\" styleClass=\"p-4 w-80\">\n\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); overlay.hide()\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields_\"\n [model]=\"model\"\n [options]=\"options\">\n </formly-form>\n\n <div class=\"flex justify-end mt-
|
|
3109
|
+
], template: "<div class=\"flex items-center gap-3\">\r\n<p-iconfield iconPosition=\"left\">\r\n\r\n <p-inputicon class=\"pi pi-search\"> </p-inputicon>\r\n <input pInputText type=\"text\" (keyup.enter)=\"onSubmit()\" [(ngModel)]=\"model['filter']\" placeholder=\"{{ 'SEARCH' | translate }}\" />\r\n <!-- 2) Search Button that toggles the popover -->\r\n\r\n</p-iconfield>\r\n<p-button icon=\"pi pi-filter\" outlined severity=\"secondary\" (onClick)=\"overlay.toggle($event)\" />\r\n</div>\r\n<!-- 4) Popover for Advanced Multi-field Search -->\r\n<p-popover #overlay [dismissable]=\"true\" styleClass=\"p-4 w-80 max-h-96 flex flex-col\">\r\n\r\n <div class=\"flex-1 overflow-auto\">\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); overlay.hide()\">\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"fields_\"\r\n [model]=\"model\"\r\n [options]=\"options\">\r\n </formly-form>\r\n </form>\r\n </div>\r\n\r\n <div class=\"flex justify-end mt-2 space-x-2 flex-none\">\r\n <button type=\"submit\" pButton size=\"small\" label=\"{{ 'SEARCH' | translate }}\"></button>\r\n <button type=\"button\" pButton size=\"small\" class=\"p-button-text\" (click)=\"onReset(); overlay.hide()\">\r\n {{ 'CLEAR' | translate }}\r\n </button>\r\n </div>\r\n\r\n\r\n</p-popover>\r\n" }]
|
|
3110
3110
|
}], propDecorators: { overlay: [{
|
|
3111
3111
|
type: ViewChild,
|
|
3112
3112
|
args: ['overlay']
|
|
@@ -3616,7 +3616,7 @@ class GenericCrudTableComponent {
|
|
|
3616
3616
|
});
|
|
3617
3617
|
}
|
|
3618
3618
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericCrudTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3619
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericCrudTableComponent, isStandalone: true, selector: "app-generic-crud-table", inputs: { data: "data", formFields: "formFields", columns: "columns", isViewMode: "isViewMode", isEditMode: "isEditMode", drawerVisible: "drawerVisible", dialogVisible: "dialogVisible", model: "model", loading: "loading", errorMsg: "errorMsg", errorMessage: "errorMessage", actions: "actions", actionsMode: "actionsMode", filters: "filters", filterModel: "filterModel", showSearch: "showSearch", first: "first", rows: "rows", totalRecords: "totalRecords", rowSelectable: "rowSelectable", scrollHeight: "scrollHeight", paginator: "paginator", service: "service", idField: "idField", showRowSelectionCheckbox: "showRowSelectionCheckbox", bulkActionButtons: "bulkActionButtons", singleActionButtons: "singleActionButtons", showAddButton: "showAddButton", addButtonIcon: "addButtonIcon", addButtonLabel: "addButtonLabel", addButtonPosition: "addButtonPosition", addButtonConfigs: "addButtonConfigs", breadcrumb: "breadcrumb", beforeSave: "beforeSave" }, outputs: { action: "action", bulkAction: "bulkAction", singleAction: "singleAction", search: "search", pageChange: "pageChange", onSearch: "onSearch", visibleChange: "visibleChange", rowSelect: "rowSelect" }, host: { classAttribute: "h-full flex-1 flex flex-col overflow-hidden border border-surface rounded-2xl p-4 bg-white" }, viewQueries: [{ propertyName: "genericTable", first: true, predicate: ["genericTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n <div class=\"flex items-start gap-2 justify-between\">\r\n <div>\r\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\r\n <p-breadcrumb\r\n [model]=\"breadcrumb_\"\r\n [home]=\"home\"\r\n styleClass=\"custom-breadcrumb\"\r\n ></p-breadcrumb>\r\n </div> -->\r\n\r\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\r\n\r\n </div>\r\n\r\n<div class=\"flex items-center gap-2 justify-end flex-wrap\">\r\n <ng-container *ngIf=\"isSingleItemSelected\">\r\n <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n\r\n [icon]=\"btn.icon\"\r\n[label]=\"btn.label | translate\"\r\n[variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onSingleItemAction(btn)\"\r\n ></lib-generic-button>\r\n</ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"selectedItems.length > 0\">\r\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onInternalBulkAction(btn)\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n\r\n <p-button\r\n icon=\"pi pi-circle-fill text-green-500\" *ngIf=\"showAddButton && addButtonConfigs.length == 0\"\r\n [label]=\"(addButtonLabel | translate)\r\n \"(onClick)=\"action.emit({ name: 'add', row: null! })\"\r\n outlined severity=\"secondary\" />\r\n\r\n </div>\r\n </div>\r\n <div class=\"mt-2 mb-4 flex items-center justify-between\">\r\n\r\n <ng-container *ngIf=\"showSearch && filters; else emptySearch\">\r\n <lib-generic-search\r\n [model]=\"filterModel\"\r\n [fields]=\"filters\"\r\n (search)=\"applySearch($event)\"\r\n (reset)=\"applySearch('')\"\r\n ></lib-generic-search>\r\n </ng-container>\r\n\r\n <ng-template #emptySearch>\r\n <!-- Render a dummy div to preserve expected DOM shape -->\r\n <!-- <div class=\"min-h-[2.5rem] w-[12rem]\"></div> -->\r\n </ng-template>\r\n\r\n <div class=\"flex items-center gap-3\">\r\n\r\n <p-button icon=\"pi pi-refresh\" outlined severity=\"secondary\" (onClick)=\"applySearch('')\" />\r\n <p-divider layout=\"vertical\" class=\"m-0 p-0\" />\r\n <p-button icon=\"pi pi-sort\" outlined severity=\"secondary\" />\r\n <p-button label=\"1 of 15\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-right\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-left\" outlined severity=\"secondary\" />\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n<lib-generic-table\r\n [data]=\"data\"\r\n [columns]=\"columns\"\r\n [paginator]=\"paginator\"\r\n [loading]=\"loading\"\r\n [actions]=\"actions\"\r\n [actionsMode]=\"actionsMode\"\r\n [first]=\"first\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [sortField]=\"sortField\"\r\n [sortOrder]=\"sortOrder\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [showRowSelectionCheckbox]=\"showRowSelectionCheckbox\"\r\n (action)=\"action.emit($event)\"\r\n (pageChange)=\"onLazyLoad($event)\"\r\n [rowSelectable]=\"rowSelectable\"\r\n (rowSelect)=\"onRowClick($event)\"\r\n [(selection)]=\"_selectedRows\"\r\n #genericTable\r\n></lib-generic-table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<p-drawer *ngIf=\"drawerVisible\"\r\n[(visible)]=\"drawerVisible\" [closable]=\"true\"\r\n[dismissible]=\"false\" [closeOnEscape]=\"true\"\r\n(visibleChange)=\"visibleChange.emit($event)\"\r\nstyleClass=\"!w-full md:!w-80 lg:!w-[40rem]\">\r\n <!-- Header -->\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"flex items-center justify-between w-full\">\r\n <div class=\"flex items-center gap-2\">\r\n <i class=\"pi pi-arrow-left cursor-pointer text-xl\" (click)=\"visibleChange.emit(false)\"></i>\r\n <span class=\"font-bold text-lg\">{{ isEditMode ? '\u062A\u0639\u062F\u064A\u0644 ' : '\u0625\u0636\u0627\u0641\u0629' }}</span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n<form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"p-4\">\r\n <formly-form [form]=\"form\" [fields]=\"formFields_\" [model]=\"model\" [options]=\"options\"></formly-form>\r\n </form>\r\n\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end gap-2\">\r\n <button\r\n pButton\r\n [label]=\"isEditMode ? ('UPDATE' | translate) : ('SAVE' | translate)\"\r\n [disabled]=\"loading || form.invalid\"\r\n [loading]=\"loading\"\r\n size=\"large\"\r\n type=\"submit\"\r\n (click)=\"onSubmit()\">\r\n </button>\r\n\r\n <button\r\n pButton\r\n label=\"{{ 'CANCEL' | translate }}\"\r\n severity=\"danger\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-drawer>\r\n\r\n<p-dialog\r\n *ngIf=\"dialogVisible\"\r\n [(visible)]=\"dialogVisible\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [dismissableMask]=\"true\"\r\n [closeOnEscape]=\"true\"\r\n (visibleChange)=\"visibleChange.emit($event)\"\r\n [style]=\"{ width: '95vw', maxWidth: '40rem' }\"\r\n [header]=\"viewHeaderTitle\"\r\n>\r\n<!-- backdrop-blur-sm -->\r\n <div class=\"relative\">\r\n <!-- Only visible in view mode: disables interaction and adds blur effect -->\r\n <div\r\n *ngIf=\"isViewMode\"\r\n class=\"absolute inset-0 z-10 bg-white/50 pointer-events-auto cursor-not-allowed rounded-md\">\r\n </div>\r\n\r\n <!-- Form -->\r\n <form *ngIf=\"form\" [formGroup]=\"form\" class=\"p-4\">\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"formFields_\"\r\n [model]=\"model\"\r\n [options]=\"options\">\r\n </formly-form>\r\n </form>\r\n </div>\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end\">\r\n <button\r\n pButton\r\n label=\"{{ 'CLOSE' | translate }}\"\r\n severity=\"secondary\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n\r\n\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TableModule }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: GenericButton, selector: "lib-generic-button", inputs: ["model", "type", "icon", "label", "variant", "severity", "size", "iconPosition", "disabled", "loading", "ariaLabel", "extraClasses", "permission"], outputs: ["clicked", "itemClick"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: GenericSearch, selector: "lib-generic-search", inputs: ["placeholder", "model", "fields"], outputs: ["search"] }, { kind: "component", type: GenericTable, selector: "lib-generic-table", inputs: ["data", "columns", "loading", "actions", "actionsMode", "first", "rows", "totalRecords", "sortField", "sortOrder", "globalFilterFields", "scrollHeight", "rowSelectable", "selection", "paginator", "showRowSelectionCheckbox"], outputs: ["action", "pageChange", "rowSelect", "selectionChange"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i4$3.Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i5$2.Drawer, selector: "p-drawer", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: BreadcrumbComponent, selector: "app-breadcrumb", inputs: ["breadcrumb"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
|
|
3619
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericCrudTableComponent, isStandalone: true, selector: "app-generic-crud-table", inputs: { data: "data", formFields: "formFields", columns: "columns", isViewMode: "isViewMode", isEditMode: "isEditMode", drawerVisible: "drawerVisible", dialogVisible: "dialogVisible", model: "model", loading: "loading", errorMsg: "errorMsg", errorMessage: "errorMessage", actions: "actions", actionsMode: "actionsMode", filters: "filters", filterModel: "filterModel", showSearch: "showSearch", first: "first", rows: "rows", totalRecords: "totalRecords", rowSelectable: "rowSelectable", scrollHeight: "scrollHeight", paginator: "paginator", service: "service", idField: "idField", showRowSelectionCheckbox: "showRowSelectionCheckbox", bulkActionButtons: "bulkActionButtons", singleActionButtons: "singleActionButtons", showAddButton: "showAddButton", addButtonIcon: "addButtonIcon", addButtonLabel: "addButtonLabel", addButtonPosition: "addButtonPosition", addButtonConfigs: "addButtonConfigs", breadcrumb: "breadcrumb", beforeSave: "beforeSave" }, outputs: { action: "action", bulkAction: "bulkAction", singleAction: "singleAction", search: "search", pageChange: "pageChange", onSearch: "onSearch", visibleChange: "visibleChange", rowSelect: "rowSelect" }, host: { classAttribute: "h-full flex-1 flex flex-col overflow-hidden border border-surface rounded-2xl p-4 bg-white" }, viewQueries: [{ propertyName: "genericTable", first: true, predicate: ["genericTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n <div class=\"flex items-start gap-2 justify-between\">\r\n <div>\r\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\r\n <p-breadcrumb\r\n [model]=\"breadcrumb_\"\r\n [home]=\"home\"\r\n styleClass=\"custom-breadcrumb\"\r\n ></p-breadcrumb>\r\n </div> -->\r\n\r\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\r\n\r\n </div>\r\n\r\n<div class=\"flex items-center gap-2 justify-end flex-wrap\">\r\n <ng-container *ngIf=\"isSingleItemSelected\">\r\n <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n\r\n [icon]=\"btn.icon\"\r\n[label]=\"btn.label | translate\"\r\n[variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onSingleItemAction(btn)\"\r\n ></lib-generic-button>\r\n</ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"selectedItems.length > 0\">\r\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onInternalBulkAction(btn)\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n\r\n <p-button\r\n icon=\"pi pi-circle-fill text-green-500\" *ngIf=\"showAddButton && addButtonConfigs.length == 0\"\r\n [label]=\"(addButtonLabel | translate)\r\n \"(onClick)=\"action.emit({ name: 'add', row: null! })\"\r\n outlined severity=\"secondary\" />\r\n\r\n </div>\r\n </div>\r\n <div class=\"mt-2 mb-4 flex items-center justify-between\">\r\n\r\n <ng-container *ngIf=\"showSearch && filters; else emptySearch\">\r\n <lib-generic-search\r\n [model]=\"filterModel\"\r\n [fields]=\"filters\"\r\n (search)=\"applySearch($event)\"\r\n (reset)=\"applySearch('')\"\r\n ></lib-generic-search>\r\n </ng-container>\r\n\r\n <ng-template #emptySearch>\r\n <!-- Render a dummy div to preserve expected DOM shape -->\r\n <!-- <div class=\"min-h-[2.5rem] w-[12rem]\"></div> -->\r\n </ng-template>\r\n\r\n <div class=\"flex items-center gap-3\">\r\n\r\n <p-button icon=\"pi pi-refresh\" outlined severity=\"secondary\" (onClick)=\"applySearch('')\" />\r\n <p-divider layout=\"vertical\" class=\"m-0 p-0\" />\r\n <p-button icon=\"pi pi-sort\" outlined severity=\"secondary\" />\r\n <p-button label=\"1 of 15\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-right\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-left\" outlined severity=\"secondary\" />\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n<lib-generic-table\r\n [data]=\"data\"\r\n [columns]=\"columns\"\r\n [paginator]=\"paginator\"\r\n [loading]=\"loading\"\r\n [actions]=\"actions\"\r\n [actionsMode]=\"actionsMode\"\r\n [first]=\"first\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [sortField]=\"sortField\"\r\n [sortOrder]=\"sortOrder\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [showRowSelectionCheckbox]=\"showRowSelectionCheckbox\"\r\n (action)=\"action.emit($event)\"\r\n (pageChange)=\"onLazyLoad($event)\"\r\n [rowSelectable]=\"rowSelectable\"\r\n (rowSelect)=\"onRowClick($event)\"\r\n [(selection)]=\"_selectedRows\"\r\n #genericTable\r\n></lib-generic-table>\r\n\r\n\r\n\r\n\r\n<p-drawer\r\n*ngIf=\"drawerVisible\"\r\n[(visible)]=\"drawerVisible\" [closable]=\"true\"\r\n[dismissible]=\"false\" [closeOnEscape]=\"true\"\r\n(visibleChange)=\"visibleChange.emit($event)\"\r\nstyleClass=\"!w-full md:!w-80 lg:!w-[40rem]\">\r\n <!-- Header -->\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"flex items-center justify-between w-full\">\r\n <div class=\"flex items-center gap-2\">\r\n <i class=\"pi pi-arrow-left cursor-pointer text-xl\" (click)=\"visibleChange.emit(false)\"></i>\r\n <span class=\"font-bold text-lg\">{{ isEditMode ? '\u062A\u0639\u062F\u064A\u0644 ' : '\u0625\u0636\u0627\u0641\u0629' }}</span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n<form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"p-4\">\r\n <formly-form [form]=\"form\" [fields]=\"formFields_\" [model]=\"model\" [options]=\"options\"></formly-form>\r\n </form>\r\n\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end gap-2\">\r\n <button\r\n pButton\r\n [label]=\"isEditMode ? ('UPDATE' | translate) : ('SAVE' | translate)\"\r\n [disabled]=\"loading || form.invalid\"\r\n [loading]=\"loading\"\r\n size=\"large\"\r\n type=\"submit\"\r\n (click)=\"onSubmit()\">\r\n </button>\r\n\r\n <button\r\n pButton\r\n label=\"{{ 'CANCEL' | translate }}\"\r\n severity=\"danger\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-drawer>\r\n\r\n<p-dialog\r\n *ngIf=\"dialogVisible\"\r\n [(visible)]=\"dialogVisible\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [dismissableMask]=\"true\"\r\n [closeOnEscape]=\"true\"\r\n (visibleChange)=\"visibleChange.emit($event)\"\r\n [style]=\"{ width: '95vw', maxWidth: '40rem' }\"\r\n [header]=\"viewHeaderTitle\"\r\n>\r\n<!-- backdrop-blur-sm -->\r\n <div class=\"relative\">\r\n <!-- Only visible in view mode: disables interaction and adds blur effect -->\r\n <div\r\n *ngIf=\"isViewMode\"\r\n class=\"absolute inset-0 z-10 bg-white/50 pointer-events-auto cursor-not-allowed rounded-md\">\r\n </div>\r\n\r\n <!-- Form -->\r\n <form *ngIf=\"form\" [formGroup]=\"form\" class=\"p-4\">\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"formFields_\"\r\n [model]=\"model\"\r\n [options]=\"options\">\r\n </formly-form>\r\n </form>\r\n </div>\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end\">\r\n <button\r\n pButton\r\n label=\"{{ 'CLOSE' | translate }}\"\r\n severity=\"secondary\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n\r\n\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TableModule }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: GenericButton, selector: "lib-generic-button", inputs: ["model", "type", "icon", "label", "variant", "severity", "size", "iconPosition", "disabled", "loading", "ariaLabel", "extraClasses", "permission"], outputs: ["clicked", "itemClick"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: GenericSearch, selector: "lib-generic-search", inputs: ["placeholder", "model", "fields"], outputs: ["search"] }, { kind: "component", type: GenericTable, selector: "lib-generic-table", inputs: ["data", "columns", "loading", "actions", "actionsMode", "first", "rows", "totalRecords", "sortField", "sortOrder", "globalFilterFields", "scrollHeight", "rowSelectable", "selection", "paginator", "showRowSelectionCheckbox"], outputs: ["action", "pageChange", "rowSelect", "selectionChange"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i4$3.Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i5$2.Drawer, selector: "p-drawer", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: BreadcrumbComponent, selector: "app-breadcrumb", inputs: ["breadcrumb"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
|
|
3620
3620
|
}
|
|
3621
3621
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericCrudTableComponent, decorators: [{
|
|
3622
3622
|
type: Component,
|
|
@@ -3640,7 +3640,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
3640
3640
|
DialogModule,
|
|
3641
3641
|
], host: {
|
|
3642
3642
|
class: 'h-full flex-1 flex flex-col overflow-hidden border border-surface rounded-2xl p-4 bg-white'
|
|
3643
|
-
}, template: "\r\n <div class=\"flex items-start gap-2 justify-between\">\r\n <div>\r\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\r\n <p-breadcrumb\r\n [model]=\"breadcrumb_\"\r\n [home]=\"home\"\r\n styleClass=\"custom-breadcrumb\"\r\n ></p-breadcrumb>\r\n </div> -->\r\n\r\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\r\n\r\n </div>\r\n\r\n<div class=\"flex items-center gap-2 justify-end flex-wrap\">\r\n <ng-container *ngIf=\"isSingleItemSelected\">\r\n <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n\r\n [icon]=\"btn.icon\"\r\n[label]=\"btn.label | translate\"\r\n[variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onSingleItemAction(btn)\"\r\n ></lib-generic-button>\r\n</ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"selectedItems.length > 0\">\r\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onInternalBulkAction(btn)\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n\r\n <p-button\r\n icon=\"pi pi-circle-fill text-green-500\" *ngIf=\"showAddButton && addButtonConfigs.length == 0\"\r\n [label]=\"(addButtonLabel | translate)\r\n \"(onClick)=\"action.emit({ name: 'add', row: null! })\"\r\n outlined severity=\"secondary\" />\r\n\r\n </div>\r\n </div>\r\n <div class=\"mt-2 mb-4 flex items-center justify-between\">\r\n\r\n <ng-container *ngIf=\"showSearch && filters; else emptySearch\">\r\n <lib-generic-search\r\n [model]=\"filterModel\"\r\n [fields]=\"filters\"\r\n (search)=\"applySearch($event)\"\r\n (reset)=\"applySearch('')\"\r\n ></lib-generic-search>\r\n </ng-container>\r\n\r\n <ng-template #emptySearch>\r\n <!-- Render a dummy div to preserve expected DOM shape -->\r\n <!-- <div class=\"min-h-[2.5rem] w-[12rem]\"></div> -->\r\n </ng-template>\r\n\r\n <div class=\"flex items-center gap-3\">\r\n\r\n <p-button icon=\"pi pi-refresh\" outlined severity=\"secondary\" (onClick)=\"applySearch('')\" />\r\n <p-divider layout=\"vertical\" class=\"m-0 p-0\" />\r\n <p-button icon=\"pi pi-sort\" outlined severity=\"secondary\" />\r\n <p-button label=\"1 of 15\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-right\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-left\" outlined severity=\"secondary\" />\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n<lib-generic-table\r\n [data]=\"data\"\r\n [columns]=\"columns\"\r\n [paginator]=\"paginator\"\r\n [loading]=\"loading\"\r\n [actions]=\"actions\"\r\n [actionsMode]=\"actionsMode\"\r\n [first]=\"first\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [sortField]=\"sortField\"\r\n [sortOrder]=\"sortOrder\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [showRowSelectionCheckbox]=\"showRowSelectionCheckbox\"\r\n (action)=\"action.emit($event)\"\r\n (pageChange)=\"onLazyLoad($event)\"\r\n [rowSelectable]=\"rowSelectable\"\r\n (rowSelect)=\"onRowClick($event)\"\r\n [(selection)]=\"_selectedRows\"\r\n #genericTable\r\n></lib-generic-table>\r\n\r\n\r\n\r\n\r\n\r\n
|
|
3643
|
+
}, template: "\r\n <div class=\"flex items-start gap-2 justify-between\">\r\n <div>\r\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\r\n <p-breadcrumb\r\n [model]=\"breadcrumb_\"\r\n [home]=\"home\"\r\n styleClass=\"custom-breadcrumb\"\r\n ></p-breadcrumb>\r\n </div> -->\r\n\r\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\r\n\r\n </div>\r\n\r\n<div class=\"flex items-center gap-2 justify-end flex-wrap\">\r\n <ng-container *ngIf=\"isSingleItemSelected\">\r\n <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n\r\n [icon]=\"btn.icon\"\r\n[label]=\"btn.label | translate\"\r\n[variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onSingleItemAction(btn)\"\r\n ></lib-generic-button>\r\n</ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"selectedItems.length > 0\">\r\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onInternalBulkAction(btn)\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n\r\n <p-button\r\n icon=\"pi pi-circle-fill text-green-500\" *ngIf=\"showAddButton && addButtonConfigs.length == 0\"\r\n [label]=\"(addButtonLabel | translate)\r\n \"(onClick)=\"action.emit({ name: 'add', row: null! })\"\r\n outlined severity=\"secondary\" />\r\n\r\n </div>\r\n </div>\r\n <div class=\"mt-2 mb-4 flex items-center justify-between\">\r\n\r\n <ng-container *ngIf=\"showSearch && filters; else emptySearch\">\r\n <lib-generic-search\r\n [model]=\"filterModel\"\r\n [fields]=\"filters\"\r\n (search)=\"applySearch($event)\"\r\n (reset)=\"applySearch('')\"\r\n ></lib-generic-search>\r\n </ng-container>\r\n\r\n <ng-template #emptySearch>\r\n <!-- Render a dummy div to preserve expected DOM shape -->\r\n <!-- <div class=\"min-h-[2.5rem] w-[12rem]\"></div> -->\r\n </ng-template>\r\n\r\n <div class=\"flex items-center gap-3\">\r\n\r\n <p-button icon=\"pi pi-refresh\" outlined severity=\"secondary\" (onClick)=\"applySearch('')\" />\r\n <p-divider layout=\"vertical\" class=\"m-0 p-0\" />\r\n <p-button icon=\"pi pi-sort\" outlined severity=\"secondary\" />\r\n <p-button label=\"1 of 15\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-right\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-left\" outlined severity=\"secondary\" />\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n<lib-generic-table\r\n [data]=\"data\"\r\n [columns]=\"columns\"\r\n [paginator]=\"paginator\"\r\n [loading]=\"loading\"\r\n [actions]=\"actions\"\r\n [actionsMode]=\"actionsMode\"\r\n [first]=\"first\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [sortField]=\"sortField\"\r\n [sortOrder]=\"sortOrder\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [showRowSelectionCheckbox]=\"showRowSelectionCheckbox\"\r\n (action)=\"action.emit($event)\"\r\n (pageChange)=\"onLazyLoad($event)\"\r\n [rowSelectable]=\"rowSelectable\"\r\n (rowSelect)=\"onRowClick($event)\"\r\n [(selection)]=\"_selectedRows\"\r\n #genericTable\r\n></lib-generic-table>\r\n\r\n\r\n\r\n\r\n<p-drawer\r\n*ngIf=\"drawerVisible\"\r\n[(visible)]=\"drawerVisible\" [closable]=\"true\"\r\n[dismissible]=\"false\" [closeOnEscape]=\"true\"\r\n(visibleChange)=\"visibleChange.emit($event)\"\r\nstyleClass=\"!w-full md:!w-80 lg:!w-[40rem]\">\r\n <!-- Header -->\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"flex items-center justify-between w-full\">\r\n <div class=\"flex items-center gap-2\">\r\n <i class=\"pi pi-arrow-left cursor-pointer text-xl\" (click)=\"visibleChange.emit(false)\"></i>\r\n <span class=\"font-bold text-lg\">{{ isEditMode ? '\u062A\u0639\u062F\u064A\u0644 ' : '\u0625\u0636\u0627\u0641\u0629' }}</span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n<form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"p-4\">\r\n <formly-form [form]=\"form\" [fields]=\"formFields_\" [model]=\"model\" [options]=\"options\"></formly-form>\r\n </form>\r\n\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end gap-2\">\r\n <button\r\n pButton\r\n [label]=\"isEditMode ? ('UPDATE' | translate) : ('SAVE' | translate)\"\r\n [disabled]=\"loading || form.invalid\"\r\n [loading]=\"loading\"\r\n size=\"large\"\r\n type=\"submit\"\r\n (click)=\"onSubmit()\">\r\n </button>\r\n\r\n <button\r\n pButton\r\n label=\"{{ 'CANCEL' | translate }}\"\r\n severity=\"danger\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-drawer>\r\n\r\n<p-dialog\r\n *ngIf=\"dialogVisible\"\r\n [(visible)]=\"dialogVisible\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [dismissableMask]=\"true\"\r\n [closeOnEscape]=\"true\"\r\n (visibleChange)=\"visibleChange.emit($event)\"\r\n [style]=\"{ width: '95vw', maxWidth: '40rem' }\"\r\n [header]=\"viewHeaderTitle\"\r\n>\r\n<!-- backdrop-blur-sm -->\r\n <div class=\"relative\">\r\n <!-- Only visible in view mode: disables interaction and adds blur effect -->\r\n <div\r\n *ngIf=\"isViewMode\"\r\n class=\"absolute inset-0 z-10 bg-white/50 pointer-events-auto cursor-not-allowed rounded-md\">\r\n </div>\r\n\r\n <!-- Form -->\r\n <form *ngIf=\"form\" [formGroup]=\"form\" class=\"p-4\">\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"formFields_\"\r\n [model]=\"model\"\r\n [options]=\"options\">\r\n </formly-form>\r\n </form>\r\n </div>\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end\">\r\n <button\r\n pButton\r\n label=\"{{ 'CLOSE' | translate }}\"\r\n severity=\"secondary\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n\r\n\r\n" }]
|
|
3644
3644
|
}], propDecorators: { genericTable: [{
|
|
3645
3645
|
type: ViewChild,
|
|
3646
3646
|
args: ['genericTable']
|
|
@@ -4310,72 +4310,74 @@ class GenericSelectorTypeComponent extends FieldType {
|
|
|
4310
4310
|
this.selectedItem.some((sel) => sel[vf] === item[vf]);
|
|
4311
4311
|
}
|
|
4312
4312
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericSelectorTypeComponent, deps: [{ token: BaseService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4313
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericSelectorTypeComponent, isStandalone: true, selector: "formly-generic-selector", providers: [DialogService, BaseService], viewQueries: [{ propertyName: "autoComp", first: true, predicate: ["autoComp"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
4314
|
-
<p-autoComplete
|
|
4315
|
-
#autoComp
|
|
4316
|
-
(ngModelChange)="onSelectionChange($event)"
|
|
4317
|
-
[ngModel]="selectedItem"
|
|
4318
|
-
[formlyAttributes]="field"
|
|
4319
|
-
[suggestions]="options_"
|
|
4320
|
-
(completeMethod)="search($event)"
|
|
4321
|
-
[multiple]="to['multiple']"
|
|
4322
|
-
[optionLabel]="to['labelField'] || 'name'"
|
|
4323
|
-
[dropdown]="true"
|
|
4324
|
-
[forceSelection]="true"
|
|
4325
|
-
[placeholder]="(props['placeholder'] ?? '')| translate"
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
<
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
[
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
</
|
|
4313
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericSelectorTypeComponent, isStandalone: true, selector: "formly-generic-selector", providers: [DialogService, BaseService], viewQueries: [{ propertyName: "autoComp", first: true, predicate: ["autoComp"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
4314
|
+
<p-autoComplete
|
|
4315
|
+
#autoComp
|
|
4316
|
+
(ngModelChange)="onSelectionChange($event)"
|
|
4317
|
+
[ngModel]="selectedItem"
|
|
4318
|
+
[formlyAttributes]="field"
|
|
4319
|
+
[suggestions]="options_"
|
|
4320
|
+
(completeMethod)="search($event)"
|
|
4321
|
+
[multiple]="to['multiple']"
|
|
4322
|
+
[optionLabel]="to['labelField'] || 'name'"
|
|
4323
|
+
[dropdown]="true"
|
|
4324
|
+
[forceSelection]="true"
|
|
4325
|
+
[placeholder]="(props['placeholder'] ?? '')| translate"
|
|
4326
|
+
[disabled]="!!props.disabled"
|
|
4327
|
+
dropdownMode="current"
|
|
4328
|
+
appendTo="body"
|
|
4329
|
+
class="w-full rounded-none"
|
|
4330
|
+
[showEmptyMessage]="true"
|
|
4331
|
+
emptyMessage="{{ getEmptyMessage() | translate }}"
|
|
4332
|
+
[showTransitionOptions]="'0ms'" >
|
|
4333
|
+
<!-- <ng-template let-item pTemplate="item">
|
|
4334
|
+
<div class="flex items-center gap-2">
|
|
4335
|
+
<p-checkbox
|
|
4336
|
+
[binary]="true"
|
|
4337
|
+
[ngModel]="isItemSelected(item)"
|
|
4338
|
+
(onChange)="toggleItemSelection(item)">
|
|
4339
|
+
</p-checkbox>
|
|
4340
|
+
<span>{{ item[to['labelField'] || 'name'] }}</span>
|
|
4341
|
+
</div>
|
|
4342
|
+
</ng-template> -->
|
|
4343
|
+
</p-autoComplete>
|
|
4343
4344
|
`, 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" }] });
|
|
4344
4345
|
}
|
|
4345
4346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericSelectorTypeComponent, decorators: [{
|
|
4346
4347
|
type: Component,
|
|
4347
4348
|
args: [{
|
|
4348
4349
|
selector: 'formly-generic-selector',
|
|
4349
|
-
template: `
|
|
4350
|
-
<p-autoComplete
|
|
4351
|
-
#autoComp
|
|
4352
|
-
(ngModelChange)="onSelectionChange($event)"
|
|
4353
|
-
[ngModel]="selectedItem"
|
|
4354
|
-
[formlyAttributes]="field"
|
|
4355
|
-
[suggestions]="options_"
|
|
4356
|
-
(completeMethod)="search($event)"
|
|
4357
|
-
[multiple]="to['multiple']"
|
|
4358
|
-
[optionLabel]="to['labelField'] || 'name'"
|
|
4359
|
-
[dropdown]="true"
|
|
4360
|
-
[forceSelection]="true"
|
|
4361
|
-
[placeholder]="(props['placeholder'] ?? '')| translate"
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
<
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
[
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
</
|
|
4350
|
+
template: `
|
|
4351
|
+
<p-autoComplete
|
|
4352
|
+
#autoComp
|
|
4353
|
+
(ngModelChange)="onSelectionChange($event)"
|
|
4354
|
+
[ngModel]="selectedItem"
|
|
4355
|
+
[formlyAttributes]="field"
|
|
4356
|
+
[suggestions]="options_"
|
|
4357
|
+
(completeMethod)="search($event)"
|
|
4358
|
+
[multiple]="to['multiple']"
|
|
4359
|
+
[optionLabel]="to['labelField'] || 'name'"
|
|
4360
|
+
[dropdown]="true"
|
|
4361
|
+
[forceSelection]="true"
|
|
4362
|
+
[placeholder]="(props['placeholder'] ?? '')| translate"
|
|
4363
|
+
[disabled]="!!props.disabled"
|
|
4364
|
+
dropdownMode="current"
|
|
4365
|
+
appendTo="body"
|
|
4366
|
+
class="w-full rounded-none"
|
|
4367
|
+
[showEmptyMessage]="true"
|
|
4368
|
+
emptyMessage="{{ getEmptyMessage() | translate }}"
|
|
4369
|
+
[showTransitionOptions]="'0ms'" >
|
|
4370
|
+
<!-- <ng-template let-item pTemplate="item">
|
|
4371
|
+
<div class="flex items-center gap-2">
|
|
4372
|
+
<p-checkbox
|
|
4373
|
+
[binary]="true"
|
|
4374
|
+
[ngModel]="isItemSelected(item)"
|
|
4375
|
+
(onChange)="toggleItemSelection(item)">
|
|
4376
|
+
</p-checkbox>
|
|
4377
|
+
<span>{{ item[to['labelField'] || 'name'] }}</span>
|
|
4378
|
+
</div>
|
|
4379
|
+
</ng-template> -->
|
|
4380
|
+
</p-autoComplete>
|
|
4379
4381
|
`,
|
|
4380
4382
|
providers: [DialogService, BaseService],
|
|
4381
4383
|
imports: [
|