@es.framework/ng.ui.core 2.0.62 → 2.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/fesm2022/es.framework-ng.ui.core-checkbox.mjs +72 -58
  2. package/fesm2022/es.framework-ng.ui.core-checkbox.mjs.map +1 -1
  3. package/fesm2022/es.framework-ng.ui.core-form-button.mjs +38 -27
  4. package/fesm2022/es.framework-ng.ui.core-form-button.mjs.map +1 -1
  5. package/fesm2022/es.framework-ng.ui.core-formly-ui-all.mjs +14 -1
  6. package/fesm2022/es.framework-ng.ui.core-formly-ui-all.mjs.map +1 -1
  7. package/fesm2022/es.framework-ng.ui.core-generic-crud-report.mjs +22 -0
  8. package/fesm2022/es.framework-ng.ui.core-generic-crud-report.mjs.map +1 -0
  9. package/fesm2022/es.framework-ng.ui.core-generic-crud-table.mjs +1 -1
  10. package/fesm2022/es.framework-ng.ui.core-generic-crud-table.mjs.map +1 -1
  11. package/fesm2022/es.framework-ng.ui.core-generic-listbox.mjs +291 -0
  12. package/fesm2022/es.framework-ng.ui.core-generic-listbox.mjs.map +1 -0
  13. package/fesm2022/es.framework-ng.ui.core-generic-view.mjs +108 -131
  14. package/fesm2022/es.framework-ng.ui.core-generic-view.mjs.map +1 -1
  15. package/fesm2022/es.framework-ng.ui.core-input.mjs +2 -0
  16. package/fesm2022/es.framework-ng.ui.core-input.mjs.map +1 -1
  17. package/fesm2022/es.framework-ng.ui.core-repeat.mjs +62 -50
  18. package/fesm2022/es.framework-ng.ui.core-repeat.mjs.map +1 -1
  19. package/generic-crud-report/README.md +3 -0
  20. package/generic-listbox/README.md +3 -0
  21. package/package.json +9 -1
  22. package/types/es.framework-ng.ui.core-checkbox.d.ts +1 -0
  23. package/types/es.framework-ng.ui.core-form-button.d.ts +11 -3
  24. package/types/es.framework-ng.ui.core-formly-ui-all.d.ts +2 -1
  25. package/types/es.framework-ng.ui.core-generic-crud-report.d.ts +10 -0
  26. package/types/es.framework-ng.ui.core-generic-listbox.d.ts +72 -0
  27. package/types/es.framework-ng.ui.core-generic-view.d.ts +17 -6
@@ -1,31 +1,37 @@
1
- import * as i7 from 'primeng/tooltip';
1
+ import * as i8 from 'primeng/tooltip';
2
2
  import { TooltipModule } from 'primeng/tooltip';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, EventEmitter, Input, ViewChild, Output, Component, NgModule } from '@angular/core';
5
- import * as i1 from '@angular/common';
4
+ import { inject, EventEmitter, Input, ViewChild, Output, Optional, Component, NgModule } from '@angular/core';
5
+ import * as i2 from '@angular/common';
6
6
  import { Location, CommonModule } from '@angular/common';
7
- import * as i2 from 'primeng/toolbar';
7
+ import * as i3 from 'primeng/toolbar';
8
8
  import { ToolbarModule } from 'primeng/toolbar';
9
- import * as i4 from 'primeng/button';
9
+ import * as i5 from 'primeng/button';
10
10
  import { ButtonModule } from 'primeng/button';
11
11
  import { FormlyForm } from '@ngx-formly/core';
12
- import * as i6 from '@angular/forms';
12
+ import * as i7 from '@angular/forms';
13
13
  import { UntypedFormGroup, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
14
- import * as i5 from 'primeng/tabs';
14
+ import * as i6 from 'primeng/tabs';
15
15
  import { TabsModule } from 'primeng/tabs';
16
16
  import { TranslatePipe } from '@es.framework/ng.core/pipes';
17
17
  import { BreadcrumbComponent } from '@es.framework/ng.ui.core/breadcrumb';
18
- import { BaseService, SwalService } from '@es.framework/ng.core/services';
18
+ import { SchemaService, BaseService, SwalService, RestService } from '@es.framework/ng.core/services';
19
19
  import { ActivatedRoute, Router } from '@angular/router';
20
- import * as i8 from 'primeng/progressspinner';
20
+ import * as i9 from 'primeng/progressspinner';
21
21
  import { ProgressSpinnerModule } from 'primeng/progressspinner';
22
+ import * as i1 from 'primeng/dynamicdialog';
23
+ import { DialogService } from 'primeng/dynamicdialog';
22
24
  import { GenericDialogComponent } from '@es.framework/ng.ui.core/generic-dialog';
23
25
  import { GenericButton } from '@es.framework/ng.ui.core/generic-button';
24
- import * as i3 from 'primeng/api';
26
+ import * as i4 from 'primeng/api';
25
27
 
26
28
  class GenericViewComponent {
29
+ cdr;
30
+ ref;
31
+ config;
27
32
  route = inject(ActivatedRoute);
28
33
  router = inject(Router);
34
+ schemaService = inject(SchemaService);
29
35
  form = new UntypedFormGroup({});
30
36
  title = '';
31
37
  actions = [];
@@ -40,22 +46,26 @@ class GenericViewComponent {
40
46
  moduleName = '';
41
47
  idField = 'id';
42
48
  standaloneMode = false;
49
+ useRouteParams = true;
50
+ query;
51
+ currentId;
52
+ useTabs = true;
43
53
  isViewMode = true; // وضع المشاهدة فقط
44
54
  isCreateMode = false; // وضع الاضافة فقط
45
55
  isEditMode = false; // وضع التعديل
46
56
  model = {};
47
57
  displayMode = 'drawer';
48
- mode = 'full';
58
+ mode = 'detail';
49
59
  action = new EventEmitter();
50
60
  afterDelete = new EventEmitter();
51
61
  dialog;
52
62
  inlineForm;
53
63
  tabs_ = [];
54
64
  model_ = {};
55
- currentId;
56
65
  list = [];
57
66
  totalRecords = 0;
58
67
  loading = false;
68
+ showToolbar = true;
59
69
  // pagination state
60
70
  pageSize = 10;
61
71
  pageIndex = 0;
@@ -63,25 +73,55 @@ class GenericViewComponent {
63
73
  currentFilters = {};
64
74
  pageFilters = {};
65
75
  searchGlobal = '';
76
+ dialogService = inject(DialogService);
66
77
  swalService = inject(SwalService);
67
78
  _location = inject(Location);
68
- ngOnInit() {
69
- this.loading = true;
79
+ ngOnInit() { }
80
+ constructor(cdr, ref, config) {
81
+ this.cdr = cdr;
82
+ this.ref = ref;
83
+ this.config = config;
84
+ if (config && config.data) {
85
+ const data = config?.data ?? {};
86
+ this.currentId = data.currentId ?? this.currentId;
87
+ this.isViewMode = data.isViewMode ?? this.isViewMode;
88
+ this.apiName = data.apiName ?? this.apiName;
89
+ this.moduleName = data.moduleName ?? this.moduleName;
90
+ this.useRouteParams = data.useRouteParams ?? this.useRouteParams;
91
+ this.standaloneMode = data.standaloneMode ?? this.standaloneMode;
92
+ this.useTabs = data.useTabs ?? this.useTabs;
93
+ this.formFields = data.formFields ?? this.formFields;
94
+ this.tabs = data.tabs ?? this.tabs;
95
+ this.breadcrumb = data.breadcrumb ?? this.breadcrumb;
96
+ this.showToolbar = data.showToolbar ?? this.showToolbar;
97
+ this.mode = data.mode ?? this.mode;
98
+ }
99
+ this.init();
100
+ }
101
+ init() {
70
102
  if (this.apiName) {
103
+ this.service.moduleName = this.service.moduleName || this.moduleName;
71
104
  this.service.apiName = this.apiName;
72
- this.service.moduleName = this.moduleName;
73
105
  }
74
106
  this.actions_ = this.actions.filter(c => c.name != 'view');
75
- this.route.paramMap.subscribe(params => {
76
- const id = params.get(this.idField);
77
- if (id) {
78
- this.currentId = id;
79
- if (this.standaloneMode) {
80
- this.loadList();
107
+ if (this.useRouteParams) {
108
+ this.route.paramMap.subscribe(params => {
109
+ const id = params.get(this.idField);
110
+ if (id) {
111
+ this.currentId = id;
112
+ if (this.standaloneMode) {
113
+ this.loadList();
114
+ }
81
115
  }
116
+ this.refresh();
117
+ });
118
+ }
119
+ else {
120
+ if (this.standaloneMode && (this.currentId || this.query)) {
121
+ this.loadList();
122
+ this.initTabs();
82
123
  }
83
- this.refresh();
84
- });
124
+ }
85
125
  }
86
126
  refresh() {
87
127
  // detect mode based on route
@@ -89,7 +129,16 @@ class GenericViewComponent {
89
129
  this.isViewMode = url.includes('/view');
90
130
  this.isEditMode = url.includes('/edit');
91
131
  this.isCreateMode = url.includes('/create') || url.endsWith('/new') || url.endsWith('/add');
132
+ this.initTabs();
133
+ }
134
+ initTabs() {
92
135
  this.tabs_ = [];
136
+ if (this.tabs.length == 0) {
137
+ this.tabs.push({
138
+ header: 'Details',
139
+ fields: []
140
+ });
141
+ }
93
142
  for (let i = 0; i < this.tabs.length; i++) {
94
143
  const t = this.tabs[i];
95
144
  this.tabs_.push({
@@ -97,113 +146,17 @@ class GenericViewComponent {
97
146
  fields: [
98
147
  {
99
148
  props: { label: '' },
100
- // fieldGroupClassName: 'grid grid-cols-1 md:grid-cols-2 gap-3', // TODO
149
+ // fieldGroupClassName: 'grid grid-cols-1 md:grid-cols-2 gap-3', // TODO
101
150
  fieldGroupClassName: '',
102
151
  fieldGroup: this.isCreateMode || this.isEditMode
103
- ? this.getCreateEditFields(i == 0 ? this.formFields : t.fields)
104
- : this.getViewFields(i == 0 ? this.formFields : t.fields),
152
+ ? this.schemaService.getCreateEditFields(i == 0 ? this.formFields : t.fields, this.isViewMode)
153
+ : this.schemaService.getViewFields(i == 0 ? this.formFields : t.fields, this.isViewMode),
105
154
  },
106
155
  ],
107
156
  });
108
157
  }
109
- this.loading = false;
110
- }
111
- // as form
112
- getCreateEditFields(fields = []) {
113
- return fields.map(f => ({
114
- ...f,
115
- props: { ...f.props, readonly: this.viewMode, disabled: this.viewMode },
116
- }));
158
+ // this.loading = false;
117
159
  }
118
- getViewFields(fields = []) {
119
- const flatten = (fields) => fields.flatMap((field) => {
120
- /* 1. GROUP / PANEL / WRAPPER */
121
- if (field.fieldGroup?.length) {
122
- const children = flatten(field.fieldGroup);
123
- if (!children.length)
124
- return [];
125
- return [{
126
- ...field,
127
- wrappers: field.wrappers,
128
- props: { ...field.props },
129
- fieldGroupClassName: field.fieldGroupClassName,
130
- fieldGroup: children
131
- }];
132
- }
133
- /* 2. FIELD ARRAY (REPEAT / TABLE / MULTI) */
134
- const fieldArrayConfig = typeof field.fieldArray === 'function'
135
- ? field.fieldArray(field)
136
- : field.fieldArray;
137
- if (field.fieldArray) {
138
- if (field.props?.['view']?.hidden)
139
- return [];
140
- const children = flatten(fieldArrayConfig?.fieldGroup || []);
141
- if (!children.length)
142
- return [];
143
- return [{
144
- ...field,
145
- type: field.props?.['view']?.type || field.type,
146
- readonly: this.viewMode,
147
- disabled: this.viewMode,
148
- fieldArray: {
149
- ...fieldArrayConfig,
150
- fieldGroup: children
151
- }
152
- }];
153
- }
154
- /* 3. SINGLE FIELD */
155
- if (!field.props || field.props['view']?.hidden)
156
- return [];
157
- const type = field.props['view']?.type ||
158
- field.props['table']?.type ||
159
- field.props['filter']?.type ||
160
- 'custom-label-type';
161
- return [{
162
- type,
163
- key: field.key,
164
- readonly: this.viewMode,
165
- disabled: this.viewMode,
166
- wrappers: field.wrappers ?? ['field-wrapper'],
167
- className: field.className,
168
- props: {
169
- ...field.props,
170
- ...(field.props['view']?.props ||
171
- field.props['table']?.props ||
172
- field.props['filter']?.props ||
173
- {}),
174
- },
175
- expressions: field.props['view']?.expressions ||
176
- field.props['table']?.expressions ||
177
- field.props['filter']?.expressions
178
- }];
179
- });
180
- return flatten(fields);
181
- }
182
- // getViewFields(fields: FormlyFieldConfig[] = []): FormlyFieldConfig[] {
183
- // const flatten = (fields: FormlyFieldConfig[]): FormlyFieldConfig[] =>
184
- // fields.flatMap(field => {
185
- // if (field.fieldGroup?.length) return flatten(field.fieldGroup);
186
- // if (!field.props
187
- // || field.props['view']?.hidden
188
- // // || field.props['table']?.hidden
189
- // ) return [];
190
- // const type = field.props['view']?.type || field.props['table']?.type || 'custom-label-type';
191
- // return [{
192
- // type,
193
- // key: field['key'],
194
- // readonly: this.viewMode,
195
- // disabled: this.viewMode,
196
- // wrappers: field.wrappers ?? ['field-wrapper'],
197
- // props: {
198
- // ...field.props,
199
- // ...(field.props['view']?.props || field.props['table']?.props),
200
- // },
201
- // expressions: field.props['view']?.expressions || field.props['view']?.expressions,
202
- // }];
203
- // });
204
- // return flatten(fields);
205
- // }
206
- // Use a map to store form groups for each row and column
207
160
  cellForms = new Map();
208
161
  getForm(rowIndex) {
209
162
  const key = `${rowIndex}_`;
@@ -337,16 +290,26 @@ class GenericViewComponent {
337
290
  ...this.pageFilters,
338
291
  ...(this.searchGlobal ? { filter: this.searchGlobal } : {}),
339
292
  };
293
+ if (this.query) {
294
+ filters['query'] = this.query;
295
+ }
296
+ if (this.currentId) {
297
+ filters[this.idField] = this.currentId;
298
+ }
340
299
  this.service.getList(filters).subscribe({
341
300
  next: (res) => {
342
301
  this.list = res.items;
343
302
  this.totalRecords = res.totalCount;
344
303
  this.loading = false;
345
- // set model_ to current id item
346
- const found = this.list.find(x => x[this.idField] == this.currentId);
347
- if (found) {
348
- this.model_ = found;
304
+ if (this.list.length > 0) {
305
+ this.model = this.list[0];
306
+ this.model_ = this.list[0];
349
307
  }
308
+ // set model_ to current id item
309
+ // const found = this.list.find(x => x[this.idField] == this.currentId);
310
+ // if (found) {
311
+ // this.model_ = found;
312
+ // }
350
313
  },
351
314
  error: err => {
352
315
  console.error('Error loading list', err);
@@ -375,8 +338,8 @@ class GenericViewComponent {
375
338
  const currentMode = this.isEditMode ? 'edit' : 'view';
376
339
  // this.goToMode(currentMode);
377
340
  }
378
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
379
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: GenericViewComponent, isStandalone: true, selector: "app-detail-view", inputs: { title: "title", actions: "actions", createEditActions: "createEditActions", tabs: "tabs", viewMode: "viewMode", breadcrumb: "breadcrumb", service: "service", formFields: "formFields", apiName: "apiName", moduleName: "moduleName", idField: "idField", standaloneMode: "standaloneMode", isViewMode: "isViewMode", isCreateMode: "isCreateMode", isEditMode: "isEditMode", model: "model", displayMode: "displayMode", mode: "mode", loading: "loading" }, outputs: { action: "action", afterDelete: "afterDelete" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }, { propertyName: "inlineForm", first: true, predicate: ["inlineForm"], descendants: true }], ngImport: i0, template: "\n@if (mode === 'detail') {\n <div class=\"w-full flex flex-col gap-3\">\n <!-- overlay -->\n @if (loading) {\n <div\n class=\"absolute inset-0 bg-white/70 flex items-center justify-center z-50\">\n <p-progress-spinner/>\n </div>\n }\n\n <!-- actual content -->\n <!-- Toolbar -->\n <p-toolbar style=\"background: transparent;border: 0px;box-shadow: none;\" class=\"bg-transparent shadow-none border-none rounded-md px-3\">\n <ng-template pTemplate=\"left\">\n <!-- <span class=\"font-semibold text-lg xs:hidden block\">{{ title }}</span> -->\n <app-breadcrumb class=\"xs:block\" [breadcrumb]=\"breadcrumb\"></app-breadcrumb> <!-- xs:block hidden -->\n </ng-template>\n <ng-template pTemplate=\"right\">\n <div class=\"flex gap-2\">\n\n <button\n pButton pRipple\n icon=\"pi pi-chevron-right\"\n class=\"p-button-text p-button-sm fd-btn\"\n pTooltip=\"\u0627\u0644\u062A\u0627\u0644\u064A\"\n (click)=\"next()\"\n ></button>\n <button\n pButton pRipple\n icon=\"pi pi-chevron-left\"\n class=\"p-button-text p-button-sm fd-btn\"\n pTooltip=\"\u0627\u0644\u0633\u0627\u0628\u0642\"\n (click)=\"previous()\"\n ></button>\n </div>\n </ng-template>\n </p-toolbar>\n <p-toolbar class=\"bg-white shadow rounded-md px-3\">\n\n <ng-template pTemplate=\"left\">\n @if (isViewMode) {\n <div class=\"flex gap-1\">\n @for (action of actions_; track $index) {\n <button\n pButton pRipple\n [icon]=\"action.icon ?? ''\"\n [label]=\"(action.label ?? '') | translate\"\n class=\"fd-btn\"\n (click)=\"onAction(action,model)\"\n ></button>\n }\n </div>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @if (isEditMode || isCreateMode) {\n <div class=\"flex gap-1\">\n @for (btn of createEditActions; track $index) {\n @if (!btn.visible || (btn.visible && btn.visible === true)) {\n @if (btn.type === 'submit' && inlineForm) {\n <lib-generic-button\n [type]=\"'submit'\"\n [loading]=\"inlineForm.loading\"\n [disabled]=\"inlineForm.loading || form.invalid\"\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [severity]=\"btn.severity\"\n [size]=\"btn.size\"\n [model]=\"btn.splitActions\"\n [permission]=\"btn.permission\"\n (clicked)=\"inlineForm.onSubmit()\"\n ></lib-generic-button>\n }\n @else{\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [severity]=\"btn.severity\"\n [size]=\"btn.size\"\n [model]=\"btn.splitActions\"\n [permission]=\"btn.permission\"\n (clicked)=\"handleCreateEditAction(btn)\"\n ></lib-generic-button>\n }\n }\n }\n </div>\n }\n </ng-template>\n\n </p-toolbar>\n\n <!-- Tabs -->\n <p-tabs value=\"0\">\n <p-tablist>\n @for (tab of tabs_; track $index) {\n <p-tab value=\"{{$index}}\">\n <i [class]=\"tab.icon\"></i>\n <span class=\"mr-1 ml-1\">{{ tab.header }}</span>\n </p-tab>\n }\n </p-tablist>\n <p-tabpanels>\n @for (tab of tabs_; track $index) {\n <p-tabpanel value=\"{{$index}}\">\n\n <!-- Formly fields -->\n <!-- border border-surface p-4-->\n <div class=\"\">\n @if (tab.fields.length && $index === 0) {\n\n @if (form) {\n <form [formGroup]=\"form\">\n @if (tab.fields.length && $index === 0 ) {\n @if (isEditMode || isCreateMode) {\n <app-generic-dialog\n #inlineForm\n [form]=\"form\"\n [model]=\"model\"\n [formFields]=\"formFields ?? []\"\n [apiName]=\"apiName\"\n [moduleName]=\"moduleName\"\n [idField]=\"idField ??'id'\"\n [displayMode]=\"'inline'\"\n [mode]=\"'form-only'\"\n [forceState]=\"isCreateMode ? 'create':'edit'\"\n (afterSave)=\"afterSave($event)\"\n >\n </app-generic-dialog>\n }\n @else if(isViewMode){\n <formly-form\n [form]=\"form\"\n [fields]=\"tab.fields\"\n [model]=\"model\"\n ></formly-form>\n }\n }\n </form>\n }\n\n }\n @if (tab.fields.length && $index > 0) {\n\n\n <formly-form\n [form]=\"getForm($index)\"\n [fields]=\"tab.fields\"\n [model]=\"tab.model || model\"\n ></formly-form>\n\n }\n\n <!-- Custom template -->\n @if (tab.content) {\n <ng-container\n *ngTemplateOutlet=\"tab.content; context: { model: model }\">\n </ng-container>\n }\n </div>\n </p-tabpanel>\n }\n </p-tabpanels>\n</p-tabs>\n</div>\n\n<!-- [model]=\"model\" -->\n<app-generic-dialog\n #dialog\n [formFields]=\"formFields ?? []\"\n [apiName]=\"apiName\"\n [moduleName]=\"moduleName\"\n [idField]=\"idField ??'id'\"\n [displayMode]=\"displayMode ?? 'dialog'\"\n (afterSave)=\"afterSave($event)\"\n >\n</app-generic-dialog>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i2.Toolbar, selector: "p-toolbar", inputs: ["styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i5.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i5.TabPanels, selector: "p-tabpanels" }, { kind: "component", type: i5.TabPanel, selector: "p-tabpanel", inputs: ["lazy", "value"], outputs: ["valueChange"] }, { kind: "component", type: i5.TabList, selector: "p-tablist" }, { kind: "component", type: i5.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: BreadcrumbComponent, selector: "app-breadcrumb", inputs: ["breadcrumb"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i7.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "component", type: GenericDialogComponent, selector: "app-generic-dialog", inputs: ["form", "service", "formFields", "model", "apiName", "moduleName", "idField", "dialogMaxWidth", "displayMode", "mode", "forceState", "drawerVisible", "dialogVisible", "isViewMode", "isEditMode", "useConfirmOnSave", "loading", "errorMsg", "errorMessage", "beforeSaveTransform", "hideTable", "autoShowForm"], outputs: ["action", "afterSave", "afterDelete", "beforeSave", "beforeDelete", "formCancel", "formInit", "dataLoaded", "selectionChange", "error", "visibleChange"] }, { kind: "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: ProgressSpinnerModule }, { kind: "component", type: i8.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
341
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericViewComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.DynamicDialogRef, optional: true }, { token: i1.DynamicDialogConfig, optional: true }], target: i0.ɵɵFactoryTarget.Component });
342
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: GenericViewComponent, isStandalone: true, selector: "app-detail-view", inputs: { title: "title", actions: "actions", createEditActions: "createEditActions", tabs: "tabs", viewMode: "viewMode", breadcrumb: "breadcrumb", service: "service", formFields: "formFields", apiName: "apiName", moduleName: "moduleName", idField: "idField", standaloneMode: "standaloneMode", useRouteParams: "useRouteParams", query: "query", currentId: "currentId", useTabs: "useTabs", isViewMode: "isViewMode", isCreateMode: "isCreateMode", isEditMode: "isEditMode", model: "model", displayMode: "displayMode", mode: "mode", loading: "loading", showToolbar: "showToolbar" }, outputs: { action: "action", afterDelete: "afterDelete" }, providers: [DialogService, BaseService, RestService], viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true }, { propertyName: "inlineForm", first: true, predicate: ["inlineForm"], descendants: true }], ngImport: i0, template: "@if (mode === 'detail') {\n<div class=\"w-full flex flex-col gap-3\">\n <!-- overlay -->\n @if (loading) {\n <div \n class=\"absolute inset-0 bg-white/70 flex items-center justify-center z-50\">\n <p-progress-spinner/>\n </div>\n}\n\n <!-- actual content -->\n <!-- Toolbar -->\n @if (showToolbar) {\n <!-- background: transparent; -->\n <p-toolbar style=\"border: 0px;box-shadow: none;\" class=\"toolbar-top bg-white shadow-none border-none rounded-md px-3\">\n <ng-template pTemplate=\"left\">\n <!-- <span class=\"font-semibold text-lg xs:hidden block\">{{ title }}</span> -->\n <app-breadcrumb class=\"xs:block\" [breadcrumb]=\"breadcrumb\"></app-breadcrumb> <!-- xs:block hidden -->\n </ng-template>\n <ng-template pTemplate=\"right\">\n <div class=\"flex gap-2\">\n\n <button\n pButton pRipple\n icon=\"pi pi-chevron-right\"\n class=\"p-button-text p-button-sm fd-btn\"\n pTooltip=\"\u0627\u0644\u062A\u0627\u0644\u064A\"\n (click)=\"next()\"\n ></button>\n <button\n pButton pRipple\n icon=\"pi pi-chevron-left\"\n class=\"p-button-text p-button-sm fd-btn\"\n pTooltip=\"\u0627\u0644\u0633\u0627\u0628\u0642\"\n (click)=\"previous()\"\n ></button>\n </div>\n </ng-template>\n </p-toolbar>\n\n <p-toolbar class=\"toolbar-bottom bg-white shadow rounded-md px-3\">\n\n <ng-template pTemplate=\"left\">\n @if (isViewMode) {\n <div class=\"flex gap-1\">\n @for (action of actions_; track $index) {\n <button\n pButton pRipple\n [icon]=\"action.icon ?? ''\"\n [label]=\"(action.label ?? '') | translate\"\n class=\"fd-btn\"\n (click)=\"onAction(action,model)\"\n ></button>\n }\n </div>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @if (isEditMode || isCreateMode) {\n <div class=\"flex gap-1\">\n @for (btn of createEditActions; track $index) {\n @if (!btn.visible || (btn.visible && btn.visible === true)) {\n @if (btn.type === 'submit' && inlineForm) {\n <lib-generic-button\n [type]=\"'submit'\"\n [loading]=\"inlineForm.loading\"\n [disabled]=\"inlineForm.loading || form.invalid\"\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [severity]=\"btn.severity\"\n [size]=\"btn.size\"\n [model]=\"btn.splitActions\"\n [permission]=\"btn.permission\"\n (clicked)=\"inlineForm.onSubmit()\"\n ></lib-generic-button>\n }\n @else{\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [severity]=\"btn.severity\"\n [size]=\"btn.size\"\n [model]=\"btn.splitActions\"\n [permission]=\"btn.permission\"\n (clicked)=\"handleCreateEditAction(btn)\"\n ></lib-generic-button>\n }\n }\n }\n </div>\n }\n </ng-template>\n\n </p-toolbar>\n}\n\n <!-- Tabs -->\n <ng-template #tabContent let-tab let-i=\"index\">\n <div>\n \n <!-- First tab special handling -->\n @if (tab.fields.length && i === 0) {\n @if(form){\n\n \n <form [formGroup]=\"form\">\n\n @if (isEditMode || isCreateMode) {\n <app-generic-dialog\n #inlineForm\n [form]=\"form\"\n [model]=\"model\"\n [formFields]=\"formFields ?? []\"\n [apiName]=\"apiName\"\n [idField]=\"idField ?? 'id'\"\n [moduleName]=\"moduleName\"\n [displayMode]=\"'inline'\"\n [mode]=\"'form-only'\"\n [forceState]=\"isCreateMode ? 'create':'edit'\"\n (afterSave)=\"afterSave($event)\">\n </app-generic-dialog>\n }\n @else if (isViewMode) {\n <formly-form\n [form]=\"form\"\n [fields]=\"tab.fields\"\n [model]=\"model\">\n </formly-form>\n }\n\n </form>\n }\n }\n\n <!-- \u0628\u0627\u0642\u064A \u0627\u0644\u062A\u0627\u0628\u0627\u062A -->\n @if (tab.fields.length && i > 0) {\n <formly-form\n [form]=\"getForm(i)\"\n [fields]=\"tab.fields\"\n [model]=\"tab.model || model\">\n </formly-form>\n }\n\n <!-- Custom template -->\n @if (tab.content) {\n <ng-container\n *ngTemplateOutlet=\"tab.content; context: { model: model }\">\n </ng-container>\n }\n\n </div>\n</ng-template>\n@if (useTabs) {\n <p-tabs value=\"0\">\n <p-tablist>\n @for (tab of tabs_; track $index) {\n <p-tab value=\"{{$index}}\">\n <i [class]=\"tab.icon\"></i>\n <span class=\"mr-1 ml-1\">{{ tab.header | translate }}</span>\n </p-tab>\n }\n </p-tablist>\n\n <p-tabpanels>\n @for (tab of tabs_; track $index) {\n <p-tabpanel value=\"{{$index}}\">\n <ng-container\n *ngTemplateOutlet=\"tabContent; context: { $implicit: tab, index: $index }\">\n </ng-container>\n </p-tabpanel>\n }\n </p-tabpanels>\n </p-tabs>\n}\n@else {\n <div class=\"flex flex-column gap-4\">\n @for (tab of tabs_; track $index) {\n\n <!-- Optional header -->\n <!-- <div class=\"font-bold text-lg\">\n <i [class]=\"tab.icon\"></i>\n <span class=\"ml-2\">{{ tab.header | translate }}</span>\n </div> -->\n\n <ng-container\n *ngTemplateOutlet=\"tabContent; context: { $implicit: tab, index: $index }\">\n </ng-container>\n\n }\n </div>\n}\n</div>\n\n<!-- [model]=\"model\" -->\n <app-generic-dialog\n #dialog\n [formFields]=\"formFields ?? []\"\n [apiName]=\"apiName\"\n [idField]=\"idField ??'id'\"\n [moduleName]=\"moduleName\"\n [displayMode]=\"displayMode ?? 'dialog'\"\n (afterSave)=\"afterSave($event)\"\n >\n </app-generic-dialog>\n}\n", styles: [".toolbar-top{position:sticky;top:0;z-index:1000}.toolbar-bottom{position:sticky;top:48px;z-index:999}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i3.Toolbar, selector: "p-toolbar", inputs: ["styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i6.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i6.TabPanels, selector: "p-tabpanels" }, { kind: "component", type: i6.TabPanel, selector: "p-tabpanel", inputs: ["lazy", "value"], outputs: ["valueChange"] }, { kind: "component", type: i6.TabList, selector: "p-tablist" }, { kind: "component", type: i6.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: BreadcrumbComponent, selector: "app-breadcrumb", inputs: ["breadcrumb"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "component", type: GenericDialogComponent, selector: "app-generic-dialog", inputs: ["form", "service", "formFields", "model", "apiName", "moduleName", "idField", "dialogMaxWidth", "displayMode", "mode", "forceState", "drawerVisible", "dialogVisible", "isViewMode", "isEditMode", "useConfirmOnSave", "loading", "errorMsg", "errorMessage", "beforeSaveTransform", "hideTable", "autoShowForm"], outputs: ["action", "afterSave", "afterDelete", "beforeSave", "beforeDelete", "formCancel", "formInit", "dataLoaded", "selectionChange", "error", "visibleChange"] }, { kind: "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: ProgressSpinnerModule }, { kind: "component", type: i9.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
380
343
  }
381
344
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericViewComponent, decorators: [{
382
345
  type: Component,
@@ -394,8 +357,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
394
357
  GenericDialogComponent,
395
358
  GenericButton,
396
359
  ProgressSpinnerModule
397
- ], template: "\n@if (mode === 'detail') {\n <div class=\"w-full flex flex-col gap-3\">\n <!-- overlay -->\n @if (loading) {\n <div\n class=\"absolute inset-0 bg-white/70 flex items-center justify-center z-50\">\n <p-progress-spinner/>\n </div>\n }\n\n <!-- actual content -->\n <!-- Toolbar -->\n <p-toolbar style=\"background: transparent;border: 0px;box-shadow: none;\" class=\"bg-transparent shadow-none border-none rounded-md px-3\">\n <ng-template pTemplate=\"left\">\n <!-- <span class=\"font-semibold text-lg xs:hidden block\">{{ title }}</span> -->\n <app-breadcrumb class=\"xs:block\" [breadcrumb]=\"breadcrumb\"></app-breadcrumb> <!-- xs:block hidden -->\n </ng-template>\n <ng-template pTemplate=\"right\">\n <div class=\"flex gap-2\">\n\n <button\n pButton pRipple\n icon=\"pi pi-chevron-right\"\n class=\"p-button-text p-button-sm fd-btn\"\n pTooltip=\"\u0627\u0644\u062A\u0627\u0644\u064A\"\n (click)=\"next()\"\n ></button>\n <button\n pButton pRipple\n icon=\"pi pi-chevron-left\"\n class=\"p-button-text p-button-sm fd-btn\"\n pTooltip=\"\u0627\u0644\u0633\u0627\u0628\u0642\"\n (click)=\"previous()\"\n ></button>\n </div>\n </ng-template>\n </p-toolbar>\n <p-toolbar class=\"bg-white shadow rounded-md px-3\">\n\n <ng-template pTemplate=\"left\">\n @if (isViewMode) {\n <div class=\"flex gap-1\">\n @for (action of actions_; track $index) {\n <button\n pButton pRipple\n [icon]=\"action.icon ?? ''\"\n [label]=\"(action.label ?? '') | translate\"\n class=\"fd-btn\"\n (click)=\"onAction(action,model)\"\n ></button>\n }\n </div>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @if (isEditMode || isCreateMode) {\n <div class=\"flex gap-1\">\n @for (btn of createEditActions; track $index) {\n @if (!btn.visible || (btn.visible && btn.visible === true)) {\n @if (btn.type === 'submit' && inlineForm) {\n <lib-generic-button\n [type]=\"'submit'\"\n [loading]=\"inlineForm.loading\"\n [disabled]=\"inlineForm.loading || form.invalid\"\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [severity]=\"btn.severity\"\n [size]=\"btn.size\"\n [model]=\"btn.splitActions\"\n [permission]=\"btn.permission\"\n (clicked)=\"inlineForm.onSubmit()\"\n ></lib-generic-button>\n }\n @else{\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [severity]=\"btn.severity\"\n [size]=\"btn.size\"\n [model]=\"btn.splitActions\"\n [permission]=\"btn.permission\"\n (clicked)=\"handleCreateEditAction(btn)\"\n ></lib-generic-button>\n }\n }\n }\n </div>\n }\n </ng-template>\n\n </p-toolbar>\n\n <!-- Tabs -->\n <p-tabs value=\"0\">\n <p-tablist>\n @for (tab of tabs_; track $index) {\n <p-tab value=\"{{$index}}\">\n <i [class]=\"tab.icon\"></i>\n <span class=\"mr-1 ml-1\">{{ tab.header }}</span>\n </p-tab>\n }\n </p-tablist>\n <p-tabpanels>\n @for (tab of tabs_; track $index) {\n <p-tabpanel value=\"{{$index}}\">\n\n <!-- Formly fields -->\n <!-- border border-surface p-4-->\n <div class=\"\">\n @if (tab.fields.length && $index === 0) {\n\n @if (form) {\n <form [formGroup]=\"form\">\n @if (tab.fields.length && $index === 0 ) {\n @if (isEditMode || isCreateMode) {\n <app-generic-dialog\n #inlineForm\n [form]=\"form\"\n [model]=\"model\"\n [formFields]=\"formFields ?? []\"\n [apiName]=\"apiName\"\n [moduleName]=\"moduleName\"\n [idField]=\"idField ??'id'\"\n [displayMode]=\"'inline'\"\n [mode]=\"'form-only'\"\n [forceState]=\"isCreateMode ? 'create':'edit'\"\n (afterSave)=\"afterSave($event)\"\n >\n </app-generic-dialog>\n }\n @else if(isViewMode){\n <formly-form\n [form]=\"form\"\n [fields]=\"tab.fields\"\n [model]=\"model\"\n ></formly-form>\n }\n }\n </form>\n }\n\n }\n @if (tab.fields.length && $index > 0) {\n\n\n <formly-form\n [form]=\"getForm($index)\"\n [fields]=\"tab.fields\"\n [model]=\"tab.model || model\"\n ></formly-form>\n\n }\n\n <!-- Custom template -->\n @if (tab.content) {\n <ng-container\n *ngTemplateOutlet=\"tab.content; context: { model: model }\">\n </ng-container>\n }\n </div>\n </p-tabpanel>\n }\n </p-tabpanels>\n</p-tabs>\n</div>\n\n<!-- [model]=\"model\" -->\n<app-generic-dialog\n #dialog\n [formFields]=\"formFields ?? []\"\n [apiName]=\"apiName\"\n [moduleName]=\"moduleName\"\n [idField]=\"idField ??'id'\"\n [displayMode]=\"displayMode ?? 'dialog'\"\n (afterSave)=\"afterSave($event)\"\n >\n</app-generic-dialog>\n}\n" }]
398
- }], propDecorators: { title: [{
360
+ ], providers: [DialogService, BaseService, RestService], template: "@if (mode === 'detail') {\n<div class=\"w-full flex flex-col gap-3\">\n <!-- overlay -->\n @if (loading) {\n <div \n class=\"absolute inset-0 bg-white/70 flex items-center justify-center z-50\">\n <p-progress-spinner/>\n </div>\n}\n\n <!-- actual content -->\n <!-- Toolbar -->\n @if (showToolbar) {\n <!-- background: transparent; -->\n <p-toolbar style=\"border: 0px;box-shadow: none;\" class=\"toolbar-top bg-white shadow-none border-none rounded-md px-3\">\n <ng-template pTemplate=\"left\">\n <!-- <span class=\"font-semibold text-lg xs:hidden block\">{{ title }}</span> -->\n <app-breadcrumb class=\"xs:block\" [breadcrumb]=\"breadcrumb\"></app-breadcrumb> <!-- xs:block hidden -->\n </ng-template>\n <ng-template pTemplate=\"right\">\n <div class=\"flex gap-2\">\n\n <button\n pButton pRipple\n icon=\"pi pi-chevron-right\"\n class=\"p-button-text p-button-sm fd-btn\"\n pTooltip=\"\u0627\u0644\u062A\u0627\u0644\u064A\"\n (click)=\"next()\"\n ></button>\n <button\n pButton pRipple\n icon=\"pi pi-chevron-left\"\n class=\"p-button-text p-button-sm fd-btn\"\n pTooltip=\"\u0627\u0644\u0633\u0627\u0628\u0642\"\n (click)=\"previous()\"\n ></button>\n </div>\n </ng-template>\n </p-toolbar>\n\n <p-toolbar class=\"toolbar-bottom bg-white shadow rounded-md px-3\">\n\n <ng-template pTemplate=\"left\">\n @if (isViewMode) {\n <div class=\"flex gap-1\">\n @for (action of actions_; track $index) {\n <button\n pButton pRipple\n [icon]=\"action.icon ?? ''\"\n [label]=\"(action.label ?? '') | translate\"\n class=\"fd-btn\"\n (click)=\"onAction(action,model)\"\n ></button>\n }\n </div>\n }\n </ng-template>\n <ng-template pTemplate=\"right\">\n @if (isEditMode || isCreateMode) {\n <div class=\"flex gap-1\">\n @for (btn of createEditActions; track $index) {\n @if (!btn.visible || (btn.visible && btn.visible === true)) {\n @if (btn.type === 'submit' && inlineForm) {\n <lib-generic-button\n [type]=\"'submit'\"\n [loading]=\"inlineForm.loading\"\n [disabled]=\"inlineForm.loading || form.invalid\"\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [severity]=\"btn.severity\"\n [size]=\"btn.size\"\n [model]=\"btn.splitActions\"\n [permission]=\"btn.permission\"\n (clicked)=\"inlineForm.onSubmit()\"\n ></lib-generic-button>\n }\n @else{\n <lib-generic-button\n [icon]=\"btn.icon\"\n [label]=\"btn.label | translate\"\n [variant]=\"btn.variant\"\n [severity]=\"btn.severity\"\n [size]=\"btn.size\"\n [model]=\"btn.splitActions\"\n [permission]=\"btn.permission\"\n (clicked)=\"handleCreateEditAction(btn)\"\n ></lib-generic-button>\n }\n }\n }\n </div>\n }\n </ng-template>\n\n </p-toolbar>\n}\n\n <!-- Tabs -->\n <ng-template #tabContent let-tab let-i=\"index\">\n <div>\n \n <!-- First tab special handling -->\n @if (tab.fields.length && i === 0) {\n @if(form){\n\n \n <form [formGroup]=\"form\">\n\n @if (isEditMode || isCreateMode) {\n <app-generic-dialog\n #inlineForm\n [form]=\"form\"\n [model]=\"model\"\n [formFields]=\"formFields ?? []\"\n [apiName]=\"apiName\"\n [idField]=\"idField ?? 'id'\"\n [moduleName]=\"moduleName\"\n [displayMode]=\"'inline'\"\n [mode]=\"'form-only'\"\n [forceState]=\"isCreateMode ? 'create':'edit'\"\n (afterSave)=\"afterSave($event)\">\n </app-generic-dialog>\n }\n @else if (isViewMode) {\n <formly-form\n [form]=\"form\"\n [fields]=\"tab.fields\"\n [model]=\"model\">\n </formly-form>\n }\n\n </form>\n }\n }\n\n <!-- \u0628\u0627\u0642\u064A \u0627\u0644\u062A\u0627\u0628\u0627\u062A -->\n @if (tab.fields.length && i > 0) {\n <formly-form\n [form]=\"getForm(i)\"\n [fields]=\"tab.fields\"\n [model]=\"tab.model || model\">\n </formly-form>\n }\n\n <!-- Custom template -->\n @if (tab.content) {\n <ng-container\n *ngTemplateOutlet=\"tab.content; context: { model: model }\">\n </ng-container>\n }\n\n </div>\n</ng-template>\n@if (useTabs) {\n <p-tabs value=\"0\">\n <p-tablist>\n @for (tab of tabs_; track $index) {\n <p-tab value=\"{{$index}}\">\n <i [class]=\"tab.icon\"></i>\n <span class=\"mr-1 ml-1\">{{ tab.header | translate }}</span>\n </p-tab>\n }\n </p-tablist>\n\n <p-tabpanels>\n @for (tab of tabs_; track $index) {\n <p-tabpanel value=\"{{$index}}\">\n <ng-container\n *ngTemplateOutlet=\"tabContent; context: { $implicit: tab, index: $index }\">\n </ng-container>\n </p-tabpanel>\n }\n </p-tabpanels>\n </p-tabs>\n}\n@else {\n <div class=\"flex flex-column gap-4\">\n @for (tab of tabs_; track $index) {\n\n <!-- Optional header -->\n <!-- <div class=\"font-bold text-lg\">\n <i [class]=\"tab.icon\"></i>\n <span class=\"ml-2\">{{ tab.header | translate }}</span>\n </div> -->\n\n <ng-container\n *ngTemplateOutlet=\"tabContent; context: { $implicit: tab, index: $index }\">\n </ng-container>\n\n }\n </div>\n}\n</div>\n\n<!-- [model]=\"model\" -->\n <app-generic-dialog\n #dialog\n [formFields]=\"formFields ?? []\"\n [apiName]=\"apiName\"\n [idField]=\"idField ??'id'\"\n [moduleName]=\"moduleName\"\n [displayMode]=\"displayMode ?? 'dialog'\"\n (afterSave)=\"afterSave($event)\"\n >\n </app-generic-dialog>\n}\n", styles: [".toolbar-top{position:sticky;top:0;z-index:1000}.toolbar-bottom{position:sticky;top:48px;z-index:999}\n"] }]
361
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.DynamicDialogRef, decorators: [{
362
+ type: Optional
363
+ }] }, { type: i1.DynamicDialogConfig, decorators: [{
364
+ type: Optional
365
+ }] }], propDecorators: { title: [{
399
366
  type: Input
400
367
  }], actions: [{
401
368
  type: Input
@@ -419,6 +386,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
419
386
  type: Input
420
387
  }], standaloneMode: [{
421
388
  type: Input
389
+ }], useRouteParams: [{
390
+ type: Input
391
+ }], query: [{
392
+ type: Input
393
+ }], currentId: [{
394
+ type: Input
395
+ }], useTabs: [{
396
+ type: Input
422
397
  }], isViewMode: [{
423
398
  type: Input
424
399
  }], isCreateMode: [{
@@ -443,6 +418,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
443
418
  args: ['inlineForm']
444
419
  }], loading: [{
445
420
  type: Input
421
+ }], showToolbar: [{
422
+ type: Input
446
423
  }] } });
447
424
 
448
425
  class GenericViewModule {