@elite.framework/ng.core 1.0.2 → 1.0.4
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.
|
@@ -3302,7 +3302,7 @@ class GenericCrudTableComponent {
|
|
|
3302
3302
|
return index;
|
|
3303
3303
|
}
|
|
3304
3304
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericCrudTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3305
|
-
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", showAddButton: "showAddButton", addButtonIcon: "addButtonIcon", addButtonLabel: "addButtonLabel", addButtonPosition: "addButtonPosition", addButtonConfigs: "addButtonConfigs", breadcrumb: "breadcrumb" }, outputs: { action: "action", 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: "\n <div class=\"flex items-start gap-2 justify-between\">\n <div>\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\n <p-breadcrumb\n [model]=\"breadcrumb_\"\n [home]=\"home\"\n styleClass=\"custom-breadcrumb\"\n ></p-breadcrumb>\n </div> -->\n\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\n\n </div>\n\n\n <!-- <ng-container *ngIf=\"isSingleItemSelected\">\n\u00A0 \u00A0 \u00A0 <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\n\u00A0 \u00A0 \u00A0 \u00A0 <lib-generic-button\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [icon]=\"btn.icon\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [label]=\"btn.label | translate\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [variant]=\"btn.variant\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [size]=\"btn.size\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [permission]=\"btn.permission\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 (clicked)=\"onSingleItemAction(btn)\"\n\u00A0 \u00A0 \u00A0 \u00A0 ></lib-generic-button>\n\u00A0 \u00A0 \u00A0 </ng-container>\n\u00A0 \u00A0 </ng-container>\n\n <ng-container *ngIf=\"selectedItems.length > 0\">\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [size]=\"btn.size\"\n [permission]=\"btn.permission\"\n (clicked)=\"onInternalBulkAction(btn)\"\n ></lib-generic-button>\n </ng-container>\n </ng-container> -->\n\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [size]=\"btn.size\"\n [permission]=\"btn.permission\"\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\n ></lib-generic-button>\n </ng-container>\n\n <!-- <p-button\n icon=\"pi pi-circle-fill text-green-500\" *ngIf=\"showAddButton\"\n [label]=\"(addButtonLabel | translate)\n \"(onClick)=\"action.emit({ name: 'add', row: null! })\"\n outlined severity=\"secondary\" /> -->\n </div>\n <div class=\"mt-2 mb-4 flex items-center justify-between\">\n\n <ng-container *ngIf=\"showSearch && filters; else emptySearch\">\n <lib-generic-search\n [model]=\"filterModel\"\n [fields]=\"filters\"\n (search)=\"applySearch($event)\"\n (reset)=\"applySearch('')\"\n ></lib-generic-search>\n </ng-container>\n\n <ng-template #emptySearch>\n <!-- Render a dummy div to preserve expected DOM shape -->\n <!-- <div class=\"min-h-[2.5rem] w-[12rem]\"></div> -->\n </ng-template>\n\n <div class=\"flex items-center gap-3\">\n\n <p-button icon=\"pi pi-refresh\" outlined severity=\"secondary\" (onClick)=\"applySearch('')\" />\n <p-divider layout=\"vertical\" class=\"m-0 p-0\" />\n <p-button icon=\"pi pi-sort\" outlined severity=\"secondary\" />\n <p-button label=\"1 of 15\" outlined severity=\"secondary\" />\n <p-button icon=\"pi pi-chevron-right\" outlined severity=\"secondary\" />\n <p-button icon=\"pi pi-chevron-left\" outlined severity=\"secondary\" />\n </div>\n </div>\n\n\n\n<lib-generic-table\n [data]=\"data\"\n [columns]=\"columns\"\n [paginator]=\"paginator\"\n [loading]=\"loading\"\n [actions]=\"actions\"\n [actionsMode]=\"actionsMode\"\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"totalRecords\"\n [sortField]=\"sortField\"\n [sortOrder]=\"sortOrder\"\n [globalFilterFields]=\"globalFilterFields\"\n [scrollHeight]=\"scrollHeight\"\n (action)=\"action.emit($event)\"\n (pageChange)=\"onLazyLoad($event)\"\n [rowSelectable]=\"rowSelectable\"\n (rowSelect)=\"onRowClick($event)\"\n #genericTable\n></lib-generic-table>\n\n\n\n\n\n\n<p-drawer *ngIf=\"drawerVisible\" [(visible)]=\"drawerVisible\" [closable]=\"true\" [dismissible]=\"false\" [closeOnEscape]=\"true\" (visibleChange)=\"visibleChange.emit($event)\" styleClass=\"!w-full md:!w-80 lg:!w-[40rem]\">\n <!-- Header -->\n <ng-template pTemplate=\"header\">\n <div class=\"flex items-center justify-between w-full\">\n <div class=\"flex items-center gap-2\">\n <i class=\"pi pi-arrow-left cursor-pointer text-xl\" (click)=\"visibleChange.emit(false)\"></i>\n <span class=\"font-bold text-lg\">{{ isEditMode ? '\u062A\u0639\u062F\u064A\u0644 ' : '\u0625\u0636\u0627\u0641\u0629' }}</span>\n </div>\n </div>\n </ng-template>\n<form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"p-4\">\n <formly-form [form]=\"form\" [fields]=\"formFields_\" [model]=\"model\" [options]=\"options\"></formly-form>\n </form>\n\n <!-- Footer -->\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-end gap-2\">\n <button\n pButton\n [label]=\"isEditMode ? ('UPDATE' | translate) : ('SAVE' | translate)\"\n [disabled]=\"loading || form.invalid\"\n [loading]=\"loading\"\n size=\"large\"\n [attr.type]=\"'submit'\"\n (click)=\"onSubmit()\">\n </button>\n\n <button\n pButton\n label=\"{{ 'CANCEL' | translate }}\"\n severity=\"danger\"\n size=\"large\"\n (click)=\"visibleChange.emit(false)\">\n </button>\n </div>\n </ng-template>\n</p-drawer>\n\n<p-dialog\n *ngIf=\"dialogVisible\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n [closable]=\"true\"\n [dismissableMask]=\"true\"\n [closeOnEscape]=\"true\"\n (visibleChange)=\"visibleChange.emit($event)\"\n [style]=\"{ width: '95vw', maxWidth: '40rem' }\"\n [header]=\"viewHeaderTitle\"\n>\n<!-- backdrop-blur-sm -->\n <div class=\"relative\">\n <!-- Only visible in view mode: disables interaction and adds blur effect -->\n <div\n *ngIf=\"isViewMode\"\n class=\"absolute inset-0 z-10 bg-white/50 pointer-events-auto cursor-not-allowed rounded-md\">\n </div>\n\n <!-- Form -->\n <form *ngIf=\"form\" [formGroup]=\"form\" class=\"p-4\">\n <formly-form\n [form]=\"form\"\n [fields]=\"formFields_\"\n [model]=\"model\"\n [options]=\"options\">\n </formly-form>\n </form>\n </div>\n <!-- Footer -->\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-end\">\n <button\n pButton\n label=\"{{ 'CLOSE' | translate }}\"\n severity=\"secondary\"\n size=\"large\"\n (click)=\"visibleChange.emit(false)\">\n </button>\n </div>\n </ng-template>\n</p-dialog>\n\n\n\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"], outputs: ["action", "pageChange", "rowSelect"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i4$2.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" }] });
|
|
3305
|
+
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", showAddButton: "showAddButton", addButtonIcon: "addButtonIcon", addButtonLabel: "addButtonLabel", addButtonPosition: "addButtonPosition", addButtonConfigs: "addButtonConfigs", breadcrumb: "breadcrumb" }, outputs: { action: "action", 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: "\n <div class=\"flex items-start gap-2 justify-between\">\n <div>\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\n <p-breadcrumb\n [model]=\"breadcrumb_\"\n [home]=\"home\"\n styleClass=\"custom-breadcrumb\"\n ></p-breadcrumb>\n </div> -->\n\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\n\n </div>\n\n\n <!-- <ng-container *ngIf=\"isSingleItemSelected\">\n\u00A0 \u00A0 \u00A0 <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\n\u00A0 \u00A0 \u00A0 \u00A0 <lib-generic-button\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [icon]=\"btn.icon\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [label]=\"btn.label | translate\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [variant]=\"btn.variant\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [size]=\"btn.size\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [permission]=\"btn.permission\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 (clicked)=\"onSingleItemAction(btn)\"\n\u00A0 \u00A0 \u00A0 \u00A0 ></lib-generic-button>\n\u00A0 \u00A0 \u00A0 </ng-container>\n\u00A0 \u00A0 </ng-container>\n\n <ng-container *ngIf=\"selectedItems.length > 0\">\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [size]=\"btn.size\"\n [permission]=\"btn.permission\"\n (clicked)=\"onInternalBulkAction(btn)\"\n ></lib-generic-button>\n </ng-container>\n </ng-container> -->\n\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [size]=\"btn.size\"\n [permission]=\"btn.permission\"\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\n ></lib-generic-button>\n </ng-container>\n\n <p-button\n icon=\"pi pi-circle-fill text-green-500\" *ngIf=\"showAddButton && addButtonConfigs.length == 0\"\n [label]=\"(addButtonLabel | translate)\n \"(onClick)=\"action.emit({ name: 'add', row: null! })\"\n outlined severity=\"secondary\" />\n </div>\n <div class=\"mt-2 mb-4 flex items-center justify-between\">\n\n <ng-container *ngIf=\"showSearch && filters; else emptySearch\">\n <lib-generic-search\n [model]=\"filterModel\"\n [fields]=\"filters\"\n (search)=\"applySearch($event)\"\n (reset)=\"applySearch('')\"\n ></lib-generic-search>\n </ng-container>\n\n <ng-template #emptySearch>\n <!-- Render a dummy div to preserve expected DOM shape -->\n <!-- <div class=\"min-h-[2.5rem] w-[12rem]\"></div> -->\n </ng-template>\n\n <div class=\"flex items-center gap-3\">\n\n <p-button icon=\"pi pi-refresh\" outlined severity=\"secondary\" (onClick)=\"applySearch('')\" />\n <p-divider layout=\"vertical\" class=\"m-0 p-0\" />\n <p-button icon=\"pi pi-sort\" outlined severity=\"secondary\" />\n <p-button label=\"1 of 15\" outlined severity=\"secondary\" />\n <p-button icon=\"pi pi-chevron-right\" outlined severity=\"secondary\" />\n <p-button icon=\"pi pi-chevron-left\" outlined severity=\"secondary\" />\n </div>\n </div>\n\n\n\n<lib-generic-table\n [data]=\"data\"\n [columns]=\"columns\"\n [paginator]=\"paginator\"\n [loading]=\"loading\"\n [actions]=\"actions\"\n [actionsMode]=\"actionsMode\"\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"totalRecords\"\n [sortField]=\"sortField\"\n [sortOrder]=\"sortOrder\"\n [globalFilterFields]=\"globalFilterFields\"\n [scrollHeight]=\"scrollHeight\"\n (action)=\"action.emit($event)\"\n (pageChange)=\"onLazyLoad($event)\"\n [rowSelectable]=\"rowSelectable\"\n (rowSelect)=\"onRowClick($event)\"\n #genericTable\n></lib-generic-table>\n\n\n\n\n\n\n<p-drawer *ngIf=\"drawerVisible\" [(visible)]=\"drawerVisible\" [closable]=\"true\" [dismissible]=\"false\" [closeOnEscape]=\"true\" (visibleChange)=\"visibleChange.emit($event)\" styleClass=\"!w-full md:!w-80 lg:!w-[40rem]\">\n <!-- Header -->\n <ng-template pTemplate=\"header\">\n <div class=\"flex items-center justify-between w-full\">\n <div class=\"flex items-center gap-2\">\n <i class=\"pi pi-arrow-left cursor-pointer text-xl\" (click)=\"visibleChange.emit(false)\"></i>\n <span class=\"font-bold text-lg\">{{ isEditMode ? '\u062A\u0639\u062F\u064A\u0644 ' : '\u0625\u0636\u0627\u0641\u0629' }}</span>\n </div>\n </div>\n </ng-template>\n<form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"p-4\">\n <formly-form [form]=\"form\" [fields]=\"formFields_\" [model]=\"model\" [options]=\"options\"></formly-form>\n </form>\n\n <!-- Footer -->\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-end gap-2\">\n <button\n pButton\n [label]=\"isEditMode ? ('UPDATE' | translate) : ('SAVE' | translate)\"\n [disabled]=\"loading || form.invalid\"\n [loading]=\"loading\"\n size=\"large\"\n [attr.type]=\"'submit'\"\n (click)=\"onSubmit()\">\n </button>\n\n <button\n pButton\n label=\"{{ 'CANCEL' | translate }}\"\n severity=\"danger\"\n size=\"large\"\n (click)=\"visibleChange.emit(false)\">\n </button>\n </div>\n </ng-template>\n</p-drawer>\n\n<p-dialog\n *ngIf=\"dialogVisible\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n [closable]=\"true\"\n [dismissableMask]=\"true\"\n [closeOnEscape]=\"true\"\n (visibleChange)=\"visibleChange.emit($event)\"\n [style]=\"{ width: '95vw', maxWidth: '40rem' }\"\n [header]=\"viewHeaderTitle\"\n>\n<!-- backdrop-blur-sm -->\n <div class=\"relative\">\n <!-- Only visible in view mode: disables interaction and adds blur effect -->\n <div\n *ngIf=\"isViewMode\"\n class=\"absolute inset-0 z-10 bg-white/50 pointer-events-auto cursor-not-allowed rounded-md\">\n </div>\n\n <!-- Form -->\n <form *ngIf=\"form\" [formGroup]=\"form\" class=\"p-4\">\n <formly-form\n [form]=\"form\"\n [fields]=\"formFields_\"\n [model]=\"model\"\n [options]=\"options\">\n </formly-form>\n </form>\n </div>\n <!-- Footer -->\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-end\">\n <button\n pButton\n label=\"{{ 'CLOSE' | translate }}\"\n severity=\"secondary\"\n size=\"large\"\n (click)=\"visibleChange.emit(false)\">\n </button>\n </div>\n </ng-template>\n</p-dialog>\n\n\n\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"], outputs: ["action", "pageChange", "rowSelect"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i4$2.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" }] });
|
|
3306
3306
|
}
|
|
3307
3307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericCrudTableComponent, decorators: [{
|
|
3308
3308
|
type: Component,
|
|
@@ -3330,7 +3330,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
|
|
|
3330
3330
|
Divider
|
|
3331
3331
|
], host: {
|
|
3332
3332
|
class: 'h-full flex-1 flex flex-col overflow-hidden border border-surface rounded-2xl p-4 bg-white'
|
|
3333
|
-
}, template: "\n <div class=\"flex items-start gap-2 justify-between\">\n <div>\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\n <p-breadcrumb\n [model]=\"breadcrumb_\"\n [home]=\"home\"\n styleClass=\"custom-breadcrumb\"\n ></p-breadcrumb>\n </div> -->\n\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\n\n </div>\n\n\n <!-- <ng-container *ngIf=\"isSingleItemSelected\">\n\u00A0 \u00A0 \u00A0 <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\n\u00A0 \u00A0 \u00A0 \u00A0 <lib-generic-button\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [icon]=\"btn.icon\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [label]=\"btn.label | translate\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [variant]=\"btn.variant\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [size]=\"btn.size\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [permission]=\"btn.permission\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 (clicked)=\"onSingleItemAction(btn)\"\n\u00A0 \u00A0 \u00A0 \u00A0 ></lib-generic-button>\n\u00A0 \u00A0 \u00A0 </ng-container>\n\u00A0 \u00A0 </ng-container>\n\n <ng-container *ngIf=\"selectedItems.length > 0\">\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [size]=\"btn.size\"\n [permission]=\"btn.permission\"\n (clicked)=\"onInternalBulkAction(btn)\"\n ></lib-generic-button>\n </ng-container>\n </ng-container> -->\n\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [size]=\"btn.size\"\n [permission]=\"btn.permission\"\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\n ></lib-generic-button>\n </ng-container>\n\n
|
|
3333
|
+
}, template: "\n <div class=\"flex items-start gap-2 justify-between\">\n <div>\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\n <p-breadcrumb\n [model]=\"breadcrumb_\"\n [home]=\"home\"\n styleClass=\"custom-breadcrumb\"\n ></p-breadcrumb>\n </div> -->\n\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\n\n </div>\n\n\n <!-- <ng-container *ngIf=\"isSingleItemSelected\">\n\u00A0 \u00A0 \u00A0 <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\n\u00A0 \u00A0 \u00A0 \u00A0 <lib-generic-button\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [icon]=\"btn.icon\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [label]=\"btn.label | translate\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [variant]=\"btn.variant\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [size]=\"btn.size\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 [permission]=\"btn.permission\"\n\u00A0 \u00A0 \u00A0 \u00A0 \u00A0 (clicked)=\"onSingleItemAction(btn)\"\n\u00A0 \u00A0 \u00A0 \u00A0 ></lib-generic-button>\n\u00A0 \u00A0 \u00A0 </ng-container>\n\u00A0 \u00A0 </ng-container>\n\n <ng-container *ngIf=\"selectedItems.length > 0\">\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [size]=\"btn.size\"\n [permission]=\"btn.permission\"\n (clicked)=\"onInternalBulkAction(btn)\"\n ></lib-generic-button>\n </ng-container>\n </ng-container> -->\n\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [size]=\"btn.size\"\n [permission]=\"btn.permission\"\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\n ></lib-generic-button>\n </ng-container>\n\n <p-button\n icon=\"pi pi-circle-fill text-green-500\" *ngIf=\"showAddButton && addButtonConfigs.length == 0\"\n [label]=\"(addButtonLabel | translate)\n \"(onClick)=\"action.emit({ name: 'add', row: null! })\"\n outlined severity=\"secondary\" />\n </div>\n <div class=\"mt-2 mb-4 flex items-center justify-between\">\n\n <ng-container *ngIf=\"showSearch && filters; else emptySearch\">\n <lib-generic-search\n [model]=\"filterModel\"\n [fields]=\"filters\"\n (search)=\"applySearch($event)\"\n (reset)=\"applySearch('')\"\n ></lib-generic-search>\n </ng-container>\n\n <ng-template #emptySearch>\n <!-- Render a dummy div to preserve expected DOM shape -->\n <!-- <div class=\"min-h-[2.5rem] w-[12rem]\"></div> -->\n </ng-template>\n\n <div class=\"flex items-center gap-3\">\n\n <p-button icon=\"pi pi-refresh\" outlined severity=\"secondary\" (onClick)=\"applySearch('')\" />\n <p-divider layout=\"vertical\" class=\"m-0 p-0\" />\n <p-button icon=\"pi pi-sort\" outlined severity=\"secondary\" />\n <p-button label=\"1 of 15\" outlined severity=\"secondary\" />\n <p-button icon=\"pi pi-chevron-right\" outlined severity=\"secondary\" />\n <p-button icon=\"pi pi-chevron-left\" outlined severity=\"secondary\" />\n </div>\n </div>\n\n\n\n<lib-generic-table\n [data]=\"data\"\n [columns]=\"columns\"\n [paginator]=\"paginator\"\n [loading]=\"loading\"\n [actions]=\"actions\"\n [actionsMode]=\"actionsMode\"\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"totalRecords\"\n [sortField]=\"sortField\"\n [sortOrder]=\"sortOrder\"\n [globalFilterFields]=\"globalFilterFields\"\n [scrollHeight]=\"scrollHeight\"\n (action)=\"action.emit($event)\"\n (pageChange)=\"onLazyLoad($event)\"\n [rowSelectable]=\"rowSelectable\"\n (rowSelect)=\"onRowClick($event)\"\n #genericTable\n></lib-generic-table>\n\n\n\n\n\n\n<p-drawer *ngIf=\"drawerVisible\" [(visible)]=\"drawerVisible\" [closable]=\"true\" [dismissible]=\"false\" [closeOnEscape]=\"true\" (visibleChange)=\"visibleChange.emit($event)\" styleClass=\"!w-full md:!w-80 lg:!w-[40rem]\">\n <!-- Header -->\n <ng-template pTemplate=\"header\">\n <div class=\"flex items-center justify-between w-full\">\n <div class=\"flex items-center gap-2\">\n <i class=\"pi pi-arrow-left cursor-pointer text-xl\" (click)=\"visibleChange.emit(false)\"></i>\n <span class=\"font-bold text-lg\">{{ isEditMode ? '\u062A\u0639\u062F\u064A\u0644 ' : '\u0625\u0636\u0627\u0641\u0629' }}</span>\n </div>\n </div>\n </ng-template>\n<form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"p-4\">\n <formly-form [form]=\"form\" [fields]=\"formFields_\" [model]=\"model\" [options]=\"options\"></formly-form>\n </form>\n\n <!-- Footer -->\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-end gap-2\">\n <button\n pButton\n [label]=\"isEditMode ? ('UPDATE' | translate) : ('SAVE' | translate)\"\n [disabled]=\"loading || form.invalid\"\n [loading]=\"loading\"\n size=\"large\"\n [attr.type]=\"'submit'\"\n (click)=\"onSubmit()\">\n </button>\n\n <button\n pButton\n label=\"{{ 'CANCEL' | translate }}\"\n severity=\"danger\"\n size=\"large\"\n (click)=\"visibleChange.emit(false)\">\n </button>\n </div>\n </ng-template>\n</p-drawer>\n\n<p-dialog\n *ngIf=\"dialogVisible\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n [closable]=\"true\"\n [dismissableMask]=\"true\"\n [closeOnEscape]=\"true\"\n (visibleChange)=\"visibleChange.emit($event)\"\n [style]=\"{ width: '95vw', maxWidth: '40rem' }\"\n [header]=\"viewHeaderTitle\"\n>\n<!-- backdrop-blur-sm -->\n <div class=\"relative\">\n <!-- Only visible in view mode: disables interaction and adds blur effect -->\n <div\n *ngIf=\"isViewMode\"\n class=\"absolute inset-0 z-10 bg-white/50 pointer-events-auto cursor-not-allowed rounded-md\">\n </div>\n\n <!-- Form -->\n <form *ngIf=\"form\" [formGroup]=\"form\" class=\"p-4\">\n <formly-form\n [form]=\"form\"\n [fields]=\"formFields_\"\n [model]=\"model\"\n [options]=\"options\">\n </formly-form>\n </form>\n </div>\n <!-- Footer -->\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-end\">\n <button\n pButton\n label=\"{{ 'CLOSE' | translate }}\"\n severity=\"secondary\"\n size=\"large\"\n (click)=\"visibleChange.emit(false)\">\n </button>\n </div>\n </ng-template>\n</p-dialog>\n\n\n\n" }]
|
|
3334
3334
|
}], propDecorators: { genericTable: [{
|
|
3335
3335
|
type: ViewChild,
|
|
3336
3336
|
args: ['genericTable']
|
|
@@ -5334,7 +5334,7 @@ const provideFormly = provideFormlyCore([
|
|
|
5334
5334
|
{ name: 'attachment-type', component: AttachmentTypeComponent, wrappers: ['form-field'] },
|
|
5335
5335
|
{ name: 'rich-text-editor', component: RichTextEditorTypeComponent, wrappers: ['form-field'] },
|
|
5336
5336
|
{ name: 'generic-selector', component: GenericSelectorTypeComponent, wrappers: ['form-field'] },
|
|
5337
|
-
{ name: 'switch', component: InputSwitchTypeComponent, wrappers: ['form-field'] },
|
|
5337
|
+
{ name: 'switch', component: InputSwitchTypeComponent, wrappers: ['form-field-no'] },
|
|
5338
5338
|
{ name: 'username-with-domain', component: UsernameWithDomainComponent, wrappers: ['form-field'] },
|
|
5339
5339
|
{ name: 'custom-switch', component: CustomSwitchFieldComponent, wrappers: ['form-field'] },
|
|
5340
5340
|
{ name: 'Formly-Split', component: FormlySplitButtonComponent, wrappers: ['form-field'] },
|