@es.framework/ng.ui.core 2.0.65 → 2.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/attachments/README.md +3 -3
- package/base-crud/README.md +3 -3
- package/breadcrumb/README.md +3 -3
- package/checkbox/README.md +3 -3
- package/collapsible/README.md +3 -3
- package/color-picker/README.md +3 -3
- package/column-settings-popover/README.md +3 -3
- package/custom-switch/README.md +3 -3
- package/datepicker/README.md +3 -3
- package/deactivation-reason/README.md +3 -3
- package/excel-import/README.md +3 -3
- package/fesm2022/es.framework-ng.ui.core-attachments.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-attachments.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-base-crud.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-breadcrumb.mjs +108 -108
- package/fesm2022/es.framework-ng.ui.core-breadcrumb.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-checkbox.mjs +54 -54
- package/fesm2022/es.framework-ng.ui.core-checkbox.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-collapsible.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-color-picker.mjs +44 -44
- package/fesm2022/es.framework-ng.ui.core-color-picker.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-column-settings-popover.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-column-settings-popover.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-custom-switch.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-datepicker.mjs +178 -178
- package/fesm2022/es.framework-ng.ui.core-datepicker.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-deactivation-reason.mjs +46 -46
- package/fesm2022/es.framework-ng.ui.core-deactivation-reason.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-excel-import.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-filter-templates.mjs +624 -624
- package/fesm2022/es.framework-ng.ui.core-filter-templates.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-form-button.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-form-field.mjs +80 -80
- package/fesm2022/es.framework-ng.ui.core-form-field.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-form-template.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-avatar-image.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-avatar-label.mjs +44 -44
- package/fesm2022/es.framework-ng.ui.core-formly-avatar-label.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-button-selector.mjs +92 -92
- package/fesm2022/es.framework-ng.ui.core-formly-button-selector.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-button.mjs +24 -24
- package/fesm2022/es.framework-ng.ui.core-formly-button.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-presets.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-prime-icon-picker.mjs +366 -366
- package/fesm2022/es.framework-ng.ui.core-formly-prime-icon-picker.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-split-button.mjs +16 -16
- package/fesm2022/es.framework-ng.ui.core-formly-split-button.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-ui-all.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-ui.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-formly-username-with-domain.mjs +16 -16
- package/fesm2022/es.framework-ng.ui.core-formly-username-with-domain.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-assets.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-autocomplete.mjs +38 -38
- package/fesm2022/es.framework-ng.ui.core-generic-autocomplete.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-button.mjs +8 -2
- package/fesm2022/es.framework-ng.ui.core-generic-button.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-card.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-generic-card.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-crud-table.mjs +14 -3
- package/fesm2022/es.framework-ng.ui.core-generic-crud-table.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-dialog.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-generic-dialog.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-errormessage.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-generic-errormessage.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-formly-fields.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-generic-formly-fields.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-listbox.mjs +64 -64
- package/fesm2022/es.framework-ng.ui.core-generic-listbox.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-loadingspinner.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-generic-loadingspinner.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-report-tabs.mjs +68 -68
- package/fesm2022/es.framework-ng.ui.core-generic-report-tabs.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-report.mjs +19 -3
- package/fesm2022/es.framework-ng.ui.core-generic-report.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-search-advanced.mjs +442 -442
- package/fesm2022/es.framework-ng.ui.core-generic-search-advanced.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-search.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-generic-search.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-selector.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-table.mjs +16 -8
- package/fesm2022/es.framework-ng.ui.core-generic-table.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-generic-view.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-generic-view.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-header-wrapper.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-header-wrapper.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-icon-picker.mjs +106 -106
- package/fesm2022/es.framework-ng.ui.core-icon-picker.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-input-switch.mjs +58 -58
- package/fesm2022/es.framework-ng.ui.core-input-switch.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-input-with-icon.mjs +26 -26
- package/fesm2022/es.framework-ng.ui.core-input-with-icon.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-input.mjs +64 -64
- package/fesm2022/es.framework-ng.ui.core-input.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-label-type.mjs +16 -16
- package/fesm2022/es.framework-ng.ui.core-label-type.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-loading-skeletons.mjs +22 -22
- package/fesm2022/es.framework-ng.ui.core-loading-skeletons.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-odata-query-builder.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-odata-query-builder.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-query-type.mjs +14 -14
- package/fesm2022/es.framework-ng.ui.core-query-type.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-radio.mjs +30 -30
- package/fesm2022/es.framework-ng.ui.core-radio.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-repeat.mjs +354 -354
- package/fesm2022/es.framework-ng.ui.core-repeat.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-select.mjs +84 -84
- package/fesm2022/es.framework-ng.ui.core-select.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-sidebar-cards.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-sidebar-cards.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-sidebar-toggles.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core-sidebar-toggles.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-tabs.mjs +14 -14
- package/fesm2022/es.framework-ng.ui.core-tabs.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-tag-type.mjs +80 -80
- package/fesm2022/es.framework-ng.ui.core-tag-type.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-text-editor.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-textarea.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core-wrappers.mjs +118 -118
- package/fesm2022/es.framework-ng.ui.core-wrappers.mjs.map +1 -1
- package/fesm2022/es.framework-ng.ui.core.mjs +2 -2
- package/fesm2022/es.framework-ng.ui.core.mjs.map +1 -1
- package/filter-templates/README.md +3 -3
- package/form-button/README.md +3 -3
- package/form-field/README.md +3 -3
- package/form-template/README.md +3 -3
- package/formly-avatar-image/README.md +3 -3
- package/formly-avatar-label/README.md +3 -3
- package/formly-button/README.md +3 -3
- package/formly-button-selector/README.md +3 -3
- package/formly-presets/README.md +3 -3
- package/formly-prime-icon-picker/README.md +3 -3
- package/formly-split-button/README.md +3 -3
- package/formly-ui/README.md +3 -3
- package/formly-ui-all/README.md +3 -3
- package/formly-username-with-domain/README.md +3 -3
- package/generic-assets/README.md +3 -3
- package/generic-autocomplete/README.md +3 -3
- package/generic-button/README.md +3 -3
- package/generic-card/README.md +3 -3
- package/generic-crud-table/README.md +3 -3
- package/generic-dialog/README.md +3 -3
- package/generic-errormessage/README.md +3 -3
- package/generic-formly-fields/README.md +3 -3
- package/generic-loadingspinner/README.md +3 -3
- package/generic-report/README.md +3 -3
- package/generic-search/README.md +3 -3
- package/generic-search-advanced/README.md +3 -3
- package/generic-selector/README.md +3 -3
- package/generic-table/README.md +3 -3
- package/generic-view/README.md +3 -3
- package/header-wrapper/README.md +3 -3
- package/icon-picker/README.md +3 -3
- package/input/README.md +3 -3
- package/input-switch/README.md +3 -3
- package/input-with-icon/README.md +3 -3
- package/label-type/README.md +3 -3
- package/loading-skeletons/README.md +3 -3
- package/odata-query-builder/README.md +3 -3
- package/package.json +1 -1
- package/query-type/README.md +3 -3
- package/radio/README.md +3 -3
- package/repeat/README.md +3 -3
- package/select/README.md +3 -3
- package/sidebar-cards/README.md +3 -3
- package/sidebar-toggles/README.md +3 -3
- package/styles.css +0 -0
- package/tabs/README.md +3 -3
- package/tag-type/README.md +3 -3
- package/text-editor/README.md +3 -3
- package/textarea/README.md +3 -3
- package/types/es.framework-ng.ui.core-generic-button.d.ts +3 -1
- package/types/es.framework-ng.ui.core-generic-crud-table.d.ts +1 -0
- package/types/es.framework-ng.ui.core-generic-report.d.ts +1 -0
- package/types/es.framework-ng.ui.core-generic-table.d.ts +1 -1
- package/wrappers/README.md +3 -3
|
@@ -119,260 +119,260 @@ class RepeatTypeComponent extends FieldArrayType {
|
|
|
119
119
|
this.cdr.detectChanges();
|
|
120
120
|
}
|
|
121
121
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RepeatTypeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
122
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: RepeatTypeComponent, isStandalone: true, selector: "formly-repeat-section", usesInheritance: true, ngImport: i0, template: `
|
|
123
|
-
<div class="dx-grid-container shadow-md border border-[#c1c1c1] bg-white text-[#333] rounded-sm overflow-hidden">
|
|
124
|
-
|
|
125
|
-
<div class="bg-gradient-to-b from-[#fdfdfd] to-[#ececec] border-b border-[#c1c1c1] px-3 py-1.5 flex items-center justify-between gap-4">
|
|
126
|
-
<span class="text-[11px] font-bold uppercase tracking-tight text-[#555]">{{ field.props?.label || '' }}</span>
|
|
127
|
-
|
|
128
|
-
@if (field.props?.['enableSearch']) {
|
|
129
|
-
<div class="relative flex items-center">
|
|
130
|
-
<i class="pi pi-search absolute left-2 text-[10px] text-gray-400"></i>
|
|
131
|
-
<input
|
|
132
|
-
[(ngModel)]="searchQuery"
|
|
133
|
-
(input)="onSearch()"
|
|
134
|
-
[placeholder]="'Search' | translate"
|
|
135
|
-
class="pl-7 pr-2 py-1 text-[11px] border border-[#ccc] rounded-sm focus:border-[#0078d7] outline-none w-48 transition-all"
|
|
136
|
-
/>
|
|
137
|
-
</div>
|
|
138
|
-
}
|
|
139
|
-
</div>
|
|
140
|
-
|
|
141
|
-
<div class="overflow-x-auto min-h-[100px]">
|
|
142
|
-
<table class="w-full border-collapse table-auto">
|
|
143
|
-
<thead>
|
|
144
|
-
<tr class="bg-[#f2f2f2] border-b border-[#d1d1d1]">
|
|
145
|
-
<th class="sticky right-0 z-10 w-12 border-r border-[#d1d1d1] bg-[#f2f2f2]"></th>
|
|
146
|
-
|
|
147
|
-
<th class="sticky right-12 z-10 w-12 border-r border-[#d1d1d1] bg-[#f2f2f2]"></th>
|
|
148
|
-
@for (col of getFirstRowColumns(); track col) {
|
|
149
|
-
<!-- @if (!col.hide) { -->
|
|
150
|
-
|
|
151
|
-
<th [class.hidden]="col.className?.includes('hidden') || col.hide" style="text-align: initial;" class="px-3 py-2 text-[12px] font-semibold text-[#444] border-r border-[#d1d1d1] bg-gradient-to-b from-[#fdfdfd] to-[#f2f2f2] whitespace-nowrap" >
|
|
152
|
-
{{ (col.props?.label ?? '') | translate }}
|
|
153
|
-
</th>
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
</tr>
|
|
157
|
-
</thead>
|
|
158
|
-
|
|
159
|
-
<tbody cdkDropList (cdkDropListDropped)="onDrop($event)" [cdkDropListData]="field.fieldGroup">
|
|
160
|
-
@for (row of displayedRows(); track row; let rowIndex = $index) {
|
|
161
|
-
<tr cdkDrag
|
|
162
|
-
[id]="'row-' + rowIndex"
|
|
163
|
-
[class.bg-yellow-50]="isMatched(row)"
|
|
164
|
-
class="dx-row border-b border-[#e0e0e0] hover:bg-[#eff4ff] transition-colors bg-white">
|
|
165
|
-
|
|
166
|
-
<div *cdkDragPlaceholder class="bg-blue-50 border-2 border-dashed border-blue-200 h-10"></div>
|
|
167
|
-
|
|
168
|
-
<td class="sticky right-0 z-10 text-center border-r border-[#e0e0e0] bg-[#f6f6f6] py-0 px-2 cursor-move" cdkDragHandle>
|
|
169
|
-
<div class="flex items-center gap-1">
|
|
170
|
-
<i class="pi pi-bars text-[10px] text-gray-300"></i>
|
|
171
|
-
<span class="text-[10px] text-gray-400 font-mono">{{ (currentPage * pageSize) + rowIndex + 1 }}</span>
|
|
172
|
-
</div>
|
|
173
|
-
</td>
|
|
174
|
-
|
|
175
|
-
<td class="sticky right-12 z-10 px-2 py-0 text-center bg-[#fcfcfc] w-12 border-r border-[#e0e0e0]">
|
|
176
|
-
@if (canDelete(rowIndex) && !(field.props?.['delete']?.hidden ?? false)) {
|
|
177
|
-
<button type="button" (click)="remove(rowIndex)" class="p-2 text-gray-400 hover:text-red-600 transition-colors">
|
|
178
|
-
<i class="pi pi-trash text-[13px]"></i>
|
|
179
|
-
</button>
|
|
180
|
-
}
|
|
181
|
-
</td>
|
|
182
|
-
|
|
183
|
-
@for (col of row.fieldGroup; track col) {
|
|
184
|
-
<!-- @if (!col.hide) { -->
|
|
185
|
-
|
|
186
|
-
<td [class.hidden]="col.className?.includes('hidden') || col.hide" class="p-0 border-r border-[#e0e0e0] align-middle min-w-[150px]">
|
|
187
|
-
<div class="dx-field-cell">
|
|
188
|
-
<formly-field [field]="col"></formly-field>
|
|
189
|
-
</div>
|
|
190
|
-
</td>
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
</tr>
|
|
196
|
-
}
|
|
197
|
-
</tbody>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
@if (field.props?.['showFooterTotals']) {
|
|
201
|
-
<tfoot>
|
|
202
|
-
<tr class="bg-[#f9f9f9] border-t-2 border-[#d1d1d1] font-bold text-[12px]">
|
|
203
|
-
<td class="border-r border-[#e0e0e0] bg-[#eee]"></td>
|
|
204
|
-
<td class="border-r border-[#e0e0e0] bg-[#eee]"></td>
|
|
205
|
-
|
|
206
|
-
@for (col of getFirstRowColumns(); track col) {
|
|
207
|
-
<!-- @if (!col.hide) { -->
|
|
208
|
-
<td [class.hidden]="col.className?.includes('hidden') || col.hide" class="px-3 py-1 border-r border-[#e0e0e0] text-[#333]">
|
|
209
|
-
@if (getFooterConfig(col.key); as cfg) {
|
|
210
|
-
<div class="flex flex-col leading-tight">
|
|
211
|
-
<span class="text-[8px] text-gray-400 uppercase tracking-tighter">
|
|
212
|
-
{{ cfg.label | translate }}
|
|
213
|
-
</span>
|
|
214
|
-
<span class="text-[#005a9e]">
|
|
215
|
-
{{ calculateTotal(col.key, cfg.type) }}
|
|
216
|
-
</span>
|
|
217
|
-
</div>
|
|
218
|
-
}
|
|
219
|
-
</td>
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
<td class="bg-[#eee]"></td>
|
|
223
|
-
</tr>
|
|
224
|
-
</tfoot>
|
|
225
|
-
}
|
|
226
|
-
</table>
|
|
227
|
-
</div>
|
|
228
|
-
|
|
229
|
-
<div class="p-2 border-t border-[#c1c1c1] bg-[#f3f3f3] flex items-center justify-between">
|
|
230
|
-
<div class="flex items-center gap-2">
|
|
231
|
-
@if (!(field.props?.['add']?.hidden ?? false)) {
|
|
232
|
-
<button type="button" (click)="add()" class="flex items-center gap-2 px-4 py-1.5 rounded-sm border border-primary-500 bg-primary-600 text-white text-[11px] font-medium hover:bg-primary-700 shadow-sm transition-all">
|
|
233
|
-
<i class="pi pi-plus text-[10px]"></i>
|
|
234
|
-
<span>{{ 'Add' | translate }}</span>
|
|
235
|
-
</button>
|
|
236
|
-
}
|
|
237
|
-
</div>
|
|
238
|
-
|
|
239
|
-
<div class="flex items-center gap-1 text-[11px] text-gray-600">
|
|
240
|
-
<button (click)="nextPage()" [disabled]="currentPage >= totalPages() - 1" class="px-2 py-1 border border-gray-300 bg-white disabled:opacity-50"><i class="pi pi-chevron-right text-[9px]"></i></button>
|
|
241
|
-
<span class="px-2"> {{ currentPage + 1 }} - {{ totalPages() }}</span>
|
|
242
|
-
<button (click)="prevPage()" [disabled]="currentPage === 0" class="px-2 py-1 border border-gray-300 bg-white disabled:opacity-50"><i class="pi pi-chevron-left text-[9px]"></i></button>
|
|
243
|
-
|
|
244
|
-
</div>
|
|
245
|
-
</div>
|
|
246
|
-
</div>
|
|
122
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: RepeatTypeComponent, isStandalone: true, selector: "formly-repeat-section", usesInheritance: true, ngImport: i0, template: `
|
|
123
|
+
<div class="dx-grid-container shadow-md border border-[#c1c1c1] bg-white text-[#333] rounded-sm overflow-hidden">
|
|
124
|
+
|
|
125
|
+
<div class="bg-gradient-to-b from-[#fdfdfd] to-[#ececec] border-b border-[#c1c1c1] px-3 py-1.5 flex items-center justify-between gap-4">
|
|
126
|
+
<span class="text-[11px] font-bold uppercase tracking-tight text-[#555]">{{ field.props?.label || '' }}</span>
|
|
127
|
+
|
|
128
|
+
@if (field.props?.['enableSearch']) {
|
|
129
|
+
<div class="relative flex items-center">
|
|
130
|
+
<i class="pi pi-search absolute left-2 text-[10px] text-gray-400"></i>
|
|
131
|
+
<input
|
|
132
|
+
[(ngModel)]="searchQuery"
|
|
133
|
+
(input)="onSearch()"
|
|
134
|
+
[placeholder]="'Search' | translate"
|
|
135
|
+
class="pl-7 pr-2 py-1 text-[11px] border border-[#ccc] rounded-sm focus:border-[#0078d7] outline-none w-48 transition-all"
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
}
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<div class="overflow-x-auto min-h-[100px]">
|
|
142
|
+
<table class="w-full border-collapse table-auto">
|
|
143
|
+
<thead>
|
|
144
|
+
<tr class="bg-[#f2f2f2] border-b border-[#d1d1d1]">
|
|
145
|
+
<th class="sticky right-0 z-10 w-12 border-r border-[#d1d1d1] bg-[#f2f2f2]"></th>
|
|
146
|
+
|
|
147
|
+
<th class="sticky right-12 z-10 w-12 border-r border-[#d1d1d1] bg-[#f2f2f2]"></th>
|
|
148
|
+
@for (col of getFirstRowColumns(); track col) {
|
|
149
|
+
<!-- @if (!col.hide) { -->
|
|
150
|
+
|
|
151
|
+
<th [class.hidden]="col.className?.includes('hidden') || col.hide" style="text-align: initial;" class="px-3 py-2 text-[12px] font-semibold text-[#444] border-r border-[#d1d1d1] bg-gradient-to-b from-[#fdfdfd] to-[#f2f2f2] whitespace-nowrap" >
|
|
152
|
+
{{ (col.props?.label ?? '') | translate }}
|
|
153
|
+
</th>
|
|
154
|
+
|
|
155
|
+
}
|
|
156
|
+
</tr>
|
|
157
|
+
</thead>
|
|
158
|
+
|
|
159
|
+
<tbody cdkDropList (cdkDropListDropped)="onDrop($event)" [cdkDropListData]="field.fieldGroup">
|
|
160
|
+
@for (row of displayedRows(); track row; let rowIndex = $index) {
|
|
161
|
+
<tr cdkDrag
|
|
162
|
+
[id]="'row-' + rowIndex"
|
|
163
|
+
[class.bg-yellow-50]="isMatched(row)"
|
|
164
|
+
class="dx-row border-b border-[#e0e0e0] hover:bg-[#eff4ff] transition-colors bg-white">
|
|
165
|
+
|
|
166
|
+
<div *cdkDragPlaceholder class="bg-blue-50 border-2 border-dashed border-blue-200 h-10"></div>
|
|
167
|
+
|
|
168
|
+
<td class="sticky right-0 z-10 text-center border-r border-[#e0e0e0] bg-[#f6f6f6] py-0 px-2 cursor-move" cdkDragHandle>
|
|
169
|
+
<div class="flex items-center gap-1">
|
|
170
|
+
<i class="pi pi-bars text-[10px] text-gray-300"></i>
|
|
171
|
+
<span class="text-[10px] text-gray-400 font-mono">{{ (currentPage * pageSize) + rowIndex + 1 }}</span>
|
|
172
|
+
</div>
|
|
173
|
+
</td>
|
|
174
|
+
|
|
175
|
+
<td class="sticky right-12 z-10 px-2 py-0 text-center bg-[#fcfcfc] w-12 border-r border-[#e0e0e0]">
|
|
176
|
+
@if (canDelete(rowIndex) && !(field.props?.['delete']?.hidden ?? false)) {
|
|
177
|
+
<button type="button" (click)="remove(rowIndex)" class="p-2 text-gray-400 hover:text-red-600 transition-colors">
|
|
178
|
+
<i class="pi pi-trash text-[13px]"></i>
|
|
179
|
+
</button>
|
|
180
|
+
}
|
|
181
|
+
</td>
|
|
182
|
+
|
|
183
|
+
@for (col of row.fieldGroup; track col) {
|
|
184
|
+
<!-- @if (!col.hide) { -->
|
|
185
|
+
|
|
186
|
+
<td [class.hidden]="col.className?.includes('hidden') || col.hide" class="p-0 border-r border-[#e0e0e0] align-middle min-w-[150px]">
|
|
187
|
+
<div class="dx-field-cell">
|
|
188
|
+
<formly-field [field]="col"></formly-field>
|
|
189
|
+
</div>
|
|
190
|
+
</td>
|
|
191
|
+
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
</tr>
|
|
196
|
+
}
|
|
197
|
+
</tbody>
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
@if (field.props?.['showFooterTotals']) {
|
|
201
|
+
<tfoot>
|
|
202
|
+
<tr class="bg-[#f9f9f9] border-t-2 border-[#d1d1d1] font-bold text-[12px]">
|
|
203
|
+
<td class="border-r border-[#e0e0e0] bg-[#eee]"></td>
|
|
204
|
+
<td class="border-r border-[#e0e0e0] bg-[#eee]"></td>
|
|
205
|
+
|
|
206
|
+
@for (col of getFirstRowColumns(); track col) {
|
|
207
|
+
<!-- @if (!col.hide) { -->
|
|
208
|
+
<td [class.hidden]="col.className?.includes('hidden') || col.hide" class="px-3 py-1 border-r border-[#e0e0e0] text-[#333]">
|
|
209
|
+
@if (getFooterConfig(col.key); as cfg) {
|
|
210
|
+
<div class="flex flex-col leading-tight">
|
|
211
|
+
<span class="text-[8px] text-gray-400 uppercase tracking-tighter">
|
|
212
|
+
{{ cfg.label | translate }}
|
|
213
|
+
</span>
|
|
214
|
+
<span class="text-[#005a9e]">
|
|
215
|
+
{{ calculateTotal(col.key, cfg.type) }}
|
|
216
|
+
</span>
|
|
217
|
+
</div>
|
|
218
|
+
}
|
|
219
|
+
</td>
|
|
220
|
+
|
|
221
|
+
}
|
|
222
|
+
<td class="bg-[#eee]"></td>
|
|
223
|
+
</tr>
|
|
224
|
+
</tfoot>
|
|
225
|
+
}
|
|
226
|
+
</table>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<div class="p-2 border-t border-[#c1c1c1] bg-[#f3f3f3] flex items-center justify-between">
|
|
230
|
+
<div class="flex items-center gap-2">
|
|
231
|
+
@if (!(field.props?.['add']?.hidden ?? false)) {
|
|
232
|
+
<button type="button" (click)="add()" class="flex items-center gap-2 px-4 py-1.5 rounded-sm border border-primary-500 bg-primary-600 text-white text-[11px] font-medium hover:bg-primary-700 shadow-sm transition-all">
|
|
233
|
+
<i class="pi pi-plus text-[10px]"></i>
|
|
234
|
+
<span>{{ 'Add' | translate }}</span>
|
|
235
|
+
</button>
|
|
236
|
+
}
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
<div class="flex items-center gap-1 text-[11px] text-gray-600">
|
|
240
|
+
<button (click)="nextPage()" [disabled]="currentPage >= totalPages() - 1" class="px-2 py-1 border border-gray-300 bg-white disabled:opacity-50"><i class="pi pi-chevron-right text-[9px]"></i></button>
|
|
241
|
+
<span class="px-2"> {{ currentPage + 1 }} - {{ totalPages() }}</span>
|
|
242
|
+
<button (click)="prevPage()" [disabled]="currentPage === 0" class="px-2 py-1 border border-gray-300 bg-white disabled:opacity-50"><i class="pi pi-chevron-left text-[9px]"></i></button>
|
|
243
|
+
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
247
|
`, isInline: true, styles: [".right-12{right:38px}\n"], dependencies: [{ kind: "component", type: FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i1.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "ngmodule", type: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
248
248
|
}
|
|
249
249
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RepeatTypeComponent, decorators: [{
|
|
250
250
|
type: Component,
|
|
251
|
-
args: [{ selector: 'formly-repeat-section', standalone: true, imports: [FormlyField, TranslatePipe, DragDropModule, FormsModule], template: `
|
|
252
|
-
<div class="dx-grid-container shadow-md border border-[#c1c1c1] bg-white text-[#333] rounded-sm overflow-hidden">
|
|
253
|
-
|
|
254
|
-
<div class="bg-gradient-to-b from-[#fdfdfd] to-[#ececec] border-b border-[#c1c1c1] px-3 py-1.5 flex items-center justify-between gap-4">
|
|
255
|
-
<span class="text-[11px] font-bold uppercase tracking-tight text-[#555]">{{ field.props?.label || '' }}</span>
|
|
256
|
-
|
|
257
|
-
@if (field.props?.['enableSearch']) {
|
|
258
|
-
<div class="relative flex items-center">
|
|
259
|
-
<i class="pi pi-search absolute left-2 text-[10px] text-gray-400"></i>
|
|
260
|
-
<input
|
|
261
|
-
[(ngModel)]="searchQuery"
|
|
262
|
-
(input)="onSearch()"
|
|
263
|
-
[placeholder]="'Search' | translate"
|
|
264
|
-
class="pl-7 pr-2 py-1 text-[11px] border border-[#ccc] rounded-sm focus:border-[#0078d7] outline-none w-48 transition-all"
|
|
265
|
-
/>
|
|
266
|
-
</div>
|
|
267
|
-
}
|
|
268
|
-
</div>
|
|
269
|
-
|
|
270
|
-
<div class="overflow-x-auto min-h-[100px]">
|
|
271
|
-
<table class="w-full border-collapse table-auto">
|
|
272
|
-
<thead>
|
|
273
|
-
<tr class="bg-[#f2f2f2] border-b border-[#d1d1d1]">
|
|
274
|
-
<th class="sticky right-0 z-10 w-12 border-r border-[#d1d1d1] bg-[#f2f2f2]"></th>
|
|
275
|
-
|
|
276
|
-
<th class="sticky right-12 z-10 w-12 border-r border-[#d1d1d1] bg-[#f2f2f2]"></th>
|
|
277
|
-
@for (col of getFirstRowColumns(); track col) {
|
|
278
|
-
<!-- @if (!col.hide) { -->
|
|
279
|
-
|
|
280
|
-
<th [class.hidden]="col.className?.includes('hidden') || col.hide" style="text-align: initial;" class="px-3 py-2 text-[12px] font-semibold text-[#444] border-r border-[#d1d1d1] bg-gradient-to-b from-[#fdfdfd] to-[#f2f2f2] whitespace-nowrap" >
|
|
281
|
-
{{ (col.props?.label ?? '') | translate }}
|
|
282
|
-
</th>
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
</tr>
|
|
286
|
-
</thead>
|
|
287
|
-
|
|
288
|
-
<tbody cdkDropList (cdkDropListDropped)="onDrop($event)" [cdkDropListData]="field.fieldGroup">
|
|
289
|
-
@for (row of displayedRows(); track row; let rowIndex = $index) {
|
|
290
|
-
<tr cdkDrag
|
|
291
|
-
[id]="'row-' + rowIndex"
|
|
292
|
-
[class.bg-yellow-50]="isMatched(row)"
|
|
293
|
-
class="dx-row border-b border-[#e0e0e0] hover:bg-[#eff4ff] transition-colors bg-white">
|
|
294
|
-
|
|
295
|
-
<div *cdkDragPlaceholder class="bg-blue-50 border-2 border-dashed border-blue-200 h-10"></div>
|
|
296
|
-
|
|
297
|
-
<td class="sticky right-0 z-10 text-center border-r border-[#e0e0e0] bg-[#f6f6f6] py-0 px-2 cursor-move" cdkDragHandle>
|
|
298
|
-
<div class="flex items-center gap-1">
|
|
299
|
-
<i class="pi pi-bars text-[10px] text-gray-300"></i>
|
|
300
|
-
<span class="text-[10px] text-gray-400 font-mono">{{ (currentPage * pageSize) + rowIndex + 1 }}</span>
|
|
301
|
-
</div>
|
|
302
|
-
</td>
|
|
303
|
-
|
|
304
|
-
<td class="sticky right-12 z-10 px-2 py-0 text-center bg-[#fcfcfc] w-12 border-r border-[#e0e0e0]">
|
|
305
|
-
@if (canDelete(rowIndex) && !(field.props?.['delete']?.hidden ?? false)) {
|
|
306
|
-
<button type="button" (click)="remove(rowIndex)" class="p-2 text-gray-400 hover:text-red-600 transition-colors">
|
|
307
|
-
<i class="pi pi-trash text-[13px]"></i>
|
|
308
|
-
</button>
|
|
309
|
-
}
|
|
310
|
-
</td>
|
|
311
|
-
|
|
312
|
-
@for (col of row.fieldGroup; track col) {
|
|
313
|
-
<!-- @if (!col.hide) { -->
|
|
314
|
-
|
|
315
|
-
<td [class.hidden]="col.className?.includes('hidden') || col.hide" class="p-0 border-r border-[#e0e0e0] align-middle min-w-[150px]">
|
|
316
|
-
<div class="dx-field-cell">
|
|
317
|
-
<formly-field [field]="col"></formly-field>
|
|
318
|
-
</div>
|
|
319
|
-
</td>
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
</tr>
|
|
325
|
-
}
|
|
326
|
-
</tbody>
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
@if (field.props?.['showFooterTotals']) {
|
|
330
|
-
<tfoot>
|
|
331
|
-
<tr class="bg-[#f9f9f9] border-t-2 border-[#d1d1d1] font-bold text-[12px]">
|
|
332
|
-
<td class="border-r border-[#e0e0e0] bg-[#eee]"></td>
|
|
333
|
-
<td class="border-r border-[#e0e0e0] bg-[#eee]"></td>
|
|
334
|
-
|
|
335
|
-
@for (col of getFirstRowColumns(); track col) {
|
|
336
|
-
<!-- @if (!col.hide) { -->
|
|
337
|
-
<td [class.hidden]="col.className?.includes('hidden') || col.hide" class="px-3 py-1 border-r border-[#e0e0e0] text-[#333]">
|
|
338
|
-
@if (getFooterConfig(col.key); as cfg) {
|
|
339
|
-
<div class="flex flex-col leading-tight">
|
|
340
|
-
<span class="text-[8px] text-gray-400 uppercase tracking-tighter">
|
|
341
|
-
{{ cfg.label | translate }}
|
|
342
|
-
</span>
|
|
343
|
-
<span class="text-[#005a9e]">
|
|
344
|
-
{{ calculateTotal(col.key, cfg.type) }}
|
|
345
|
-
</span>
|
|
346
|
-
</div>
|
|
347
|
-
}
|
|
348
|
-
</td>
|
|
349
|
-
|
|
350
|
-
}
|
|
351
|
-
<td class="bg-[#eee]"></td>
|
|
352
|
-
</tr>
|
|
353
|
-
</tfoot>
|
|
354
|
-
}
|
|
355
|
-
</table>
|
|
356
|
-
</div>
|
|
357
|
-
|
|
358
|
-
<div class="p-2 border-t border-[#c1c1c1] bg-[#f3f3f3] flex items-center justify-between">
|
|
359
|
-
<div class="flex items-center gap-2">
|
|
360
|
-
@if (!(field.props?.['add']?.hidden ?? false)) {
|
|
361
|
-
<button type="button" (click)="add()" class="flex items-center gap-2 px-4 py-1.5 rounded-sm border border-primary-500 bg-primary-600 text-white text-[11px] font-medium hover:bg-primary-700 shadow-sm transition-all">
|
|
362
|
-
<i class="pi pi-plus text-[10px]"></i>
|
|
363
|
-
<span>{{ 'Add' | translate }}</span>
|
|
364
|
-
</button>
|
|
365
|
-
}
|
|
366
|
-
</div>
|
|
367
|
-
|
|
368
|
-
<div class="flex items-center gap-1 text-[11px] text-gray-600">
|
|
369
|
-
<button (click)="nextPage()" [disabled]="currentPage >= totalPages() - 1" class="px-2 py-1 border border-gray-300 bg-white disabled:opacity-50"><i class="pi pi-chevron-right text-[9px]"></i></button>
|
|
370
|
-
<span class="px-2"> {{ currentPage + 1 }} - {{ totalPages() }}</span>
|
|
371
|
-
<button (click)="prevPage()" [disabled]="currentPage === 0" class="px-2 py-1 border border-gray-300 bg-white disabled:opacity-50"><i class="pi pi-chevron-left text-[9px]"></i></button>
|
|
372
|
-
|
|
373
|
-
</div>
|
|
374
|
-
</div>
|
|
375
|
-
</div>
|
|
251
|
+
args: [{ selector: 'formly-repeat-section', standalone: true, imports: [FormlyField, TranslatePipe, DragDropModule, FormsModule], template: `
|
|
252
|
+
<div class="dx-grid-container shadow-md border border-[#c1c1c1] bg-white text-[#333] rounded-sm overflow-hidden">
|
|
253
|
+
|
|
254
|
+
<div class="bg-gradient-to-b from-[#fdfdfd] to-[#ececec] border-b border-[#c1c1c1] px-3 py-1.5 flex items-center justify-between gap-4">
|
|
255
|
+
<span class="text-[11px] font-bold uppercase tracking-tight text-[#555]">{{ field.props?.label || '' }}</span>
|
|
256
|
+
|
|
257
|
+
@if (field.props?.['enableSearch']) {
|
|
258
|
+
<div class="relative flex items-center">
|
|
259
|
+
<i class="pi pi-search absolute left-2 text-[10px] text-gray-400"></i>
|
|
260
|
+
<input
|
|
261
|
+
[(ngModel)]="searchQuery"
|
|
262
|
+
(input)="onSearch()"
|
|
263
|
+
[placeholder]="'Search' | translate"
|
|
264
|
+
class="pl-7 pr-2 py-1 text-[11px] border border-[#ccc] rounded-sm focus:border-[#0078d7] outline-none w-48 transition-all"
|
|
265
|
+
/>
|
|
266
|
+
</div>
|
|
267
|
+
}
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<div class="overflow-x-auto min-h-[100px]">
|
|
271
|
+
<table class="w-full border-collapse table-auto">
|
|
272
|
+
<thead>
|
|
273
|
+
<tr class="bg-[#f2f2f2] border-b border-[#d1d1d1]">
|
|
274
|
+
<th class="sticky right-0 z-10 w-12 border-r border-[#d1d1d1] bg-[#f2f2f2]"></th>
|
|
275
|
+
|
|
276
|
+
<th class="sticky right-12 z-10 w-12 border-r border-[#d1d1d1] bg-[#f2f2f2]"></th>
|
|
277
|
+
@for (col of getFirstRowColumns(); track col) {
|
|
278
|
+
<!-- @if (!col.hide) { -->
|
|
279
|
+
|
|
280
|
+
<th [class.hidden]="col.className?.includes('hidden') || col.hide" style="text-align: initial;" class="px-3 py-2 text-[12px] font-semibold text-[#444] border-r border-[#d1d1d1] bg-gradient-to-b from-[#fdfdfd] to-[#f2f2f2] whitespace-nowrap" >
|
|
281
|
+
{{ (col.props?.label ?? '') | translate }}
|
|
282
|
+
</th>
|
|
283
|
+
|
|
284
|
+
}
|
|
285
|
+
</tr>
|
|
286
|
+
</thead>
|
|
287
|
+
|
|
288
|
+
<tbody cdkDropList (cdkDropListDropped)="onDrop($event)" [cdkDropListData]="field.fieldGroup">
|
|
289
|
+
@for (row of displayedRows(); track row; let rowIndex = $index) {
|
|
290
|
+
<tr cdkDrag
|
|
291
|
+
[id]="'row-' + rowIndex"
|
|
292
|
+
[class.bg-yellow-50]="isMatched(row)"
|
|
293
|
+
class="dx-row border-b border-[#e0e0e0] hover:bg-[#eff4ff] transition-colors bg-white">
|
|
294
|
+
|
|
295
|
+
<div *cdkDragPlaceholder class="bg-blue-50 border-2 border-dashed border-blue-200 h-10"></div>
|
|
296
|
+
|
|
297
|
+
<td class="sticky right-0 z-10 text-center border-r border-[#e0e0e0] bg-[#f6f6f6] py-0 px-2 cursor-move" cdkDragHandle>
|
|
298
|
+
<div class="flex items-center gap-1">
|
|
299
|
+
<i class="pi pi-bars text-[10px] text-gray-300"></i>
|
|
300
|
+
<span class="text-[10px] text-gray-400 font-mono">{{ (currentPage * pageSize) + rowIndex + 1 }}</span>
|
|
301
|
+
</div>
|
|
302
|
+
</td>
|
|
303
|
+
|
|
304
|
+
<td class="sticky right-12 z-10 px-2 py-0 text-center bg-[#fcfcfc] w-12 border-r border-[#e0e0e0]">
|
|
305
|
+
@if (canDelete(rowIndex) && !(field.props?.['delete']?.hidden ?? false)) {
|
|
306
|
+
<button type="button" (click)="remove(rowIndex)" class="p-2 text-gray-400 hover:text-red-600 transition-colors">
|
|
307
|
+
<i class="pi pi-trash text-[13px]"></i>
|
|
308
|
+
</button>
|
|
309
|
+
}
|
|
310
|
+
</td>
|
|
311
|
+
|
|
312
|
+
@for (col of row.fieldGroup; track col) {
|
|
313
|
+
<!-- @if (!col.hide) { -->
|
|
314
|
+
|
|
315
|
+
<td [class.hidden]="col.className?.includes('hidden') || col.hide" class="p-0 border-r border-[#e0e0e0] align-middle min-w-[150px]">
|
|
316
|
+
<div class="dx-field-cell">
|
|
317
|
+
<formly-field [field]="col"></formly-field>
|
|
318
|
+
</div>
|
|
319
|
+
</td>
|
|
320
|
+
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
</tr>
|
|
325
|
+
}
|
|
326
|
+
</tbody>
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
@if (field.props?.['showFooterTotals']) {
|
|
330
|
+
<tfoot>
|
|
331
|
+
<tr class="bg-[#f9f9f9] border-t-2 border-[#d1d1d1] font-bold text-[12px]">
|
|
332
|
+
<td class="border-r border-[#e0e0e0] bg-[#eee]"></td>
|
|
333
|
+
<td class="border-r border-[#e0e0e0] bg-[#eee]"></td>
|
|
334
|
+
|
|
335
|
+
@for (col of getFirstRowColumns(); track col) {
|
|
336
|
+
<!-- @if (!col.hide) { -->
|
|
337
|
+
<td [class.hidden]="col.className?.includes('hidden') || col.hide" class="px-3 py-1 border-r border-[#e0e0e0] text-[#333]">
|
|
338
|
+
@if (getFooterConfig(col.key); as cfg) {
|
|
339
|
+
<div class="flex flex-col leading-tight">
|
|
340
|
+
<span class="text-[8px] text-gray-400 uppercase tracking-tighter">
|
|
341
|
+
{{ cfg.label | translate }}
|
|
342
|
+
</span>
|
|
343
|
+
<span class="text-[#005a9e]">
|
|
344
|
+
{{ calculateTotal(col.key, cfg.type) }}
|
|
345
|
+
</span>
|
|
346
|
+
</div>
|
|
347
|
+
}
|
|
348
|
+
</td>
|
|
349
|
+
|
|
350
|
+
}
|
|
351
|
+
<td class="bg-[#eee]"></td>
|
|
352
|
+
</tr>
|
|
353
|
+
</tfoot>
|
|
354
|
+
}
|
|
355
|
+
</table>
|
|
356
|
+
</div>
|
|
357
|
+
|
|
358
|
+
<div class="p-2 border-t border-[#c1c1c1] bg-[#f3f3f3] flex items-center justify-between">
|
|
359
|
+
<div class="flex items-center gap-2">
|
|
360
|
+
@if (!(field.props?.['add']?.hidden ?? false)) {
|
|
361
|
+
<button type="button" (click)="add()" class="flex items-center gap-2 px-4 py-1.5 rounded-sm border border-primary-500 bg-primary-600 text-white text-[11px] font-medium hover:bg-primary-700 shadow-sm transition-all">
|
|
362
|
+
<i class="pi pi-plus text-[10px]"></i>
|
|
363
|
+
<span>{{ 'Add' | translate }}</span>
|
|
364
|
+
</button>
|
|
365
|
+
}
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
<div class="flex items-center gap-1 text-[11px] text-gray-600">
|
|
369
|
+
<button (click)="nextPage()" [disabled]="currentPage >= totalPages() - 1" class="px-2 py-1 border border-gray-300 bg-white disabled:opacity-50"><i class="pi pi-chevron-right text-[9px]"></i></button>
|
|
370
|
+
<span class="px-2"> {{ currentPage + 1 }} - {{ totalPages() }}</span>
|
|
371
|
+
<button (click)="prevPage()" [disabled]="currentPage === 0" class="px-2 py-1 border border-gray-300 bg-white disabled:opacity-50"><i class="pi pi-chevron-left text-[9px]"></i></button>
|
|
372
|
+
|
|
373
|
+
</div>
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
376
|
`, styles: [".right-12{right:38px}\n"] }]
|
|
377
377
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
378
378
|
|
|
@@ -388,116 +388,116 @@ class RepeatTableViewType extends FieldArrayType {
|
|
|
388
388
|
return this.model || [];
|
|
389
389
|
}
|
|
390
390
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RepeatTableViewType, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
391
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: RepeatTableViewType, isStandalone: true, selector: "formly-repeat-table-view", usesInheritance: true, ngImport: i0, template: `
|
|
392
|
-
<div class="mb-0">
|
|
393
|
-
|
|
394
|
-
<!-- <label class="block text-lg font-semibold mb-3">
|
|
395
|
-
{{ field.props?.label }}
|
|
396
|
-
</label> -->
|
|
397
|
-
|
|
398
|
-
<div class="overflow-x-auto rounded-xl border">
|
|
399
|
-
<table class="min-w-full bg-white border-collapse">
|
|
400
|
-
|
|
401
|
-
<thead class="bg-gray-100">
|
|
402
|
-
<tr>
|
|
403
|
-
<!-- text-left -->
|
|
404
|
-
@for (col of columns; track col) {
|
|
405
|
-
<th
|
|
406
|
-
class="px-4 py-3 text-right font-medium border-b"
|
|
407
|
-
>
|
|
408
|
-
{{ col.label | translate }}
|
|
409
|
-
</th>
|
|
410
|
-
}
|
|
411
|
-
</tr>
|
|
412
|
-
</thead>
|
|
413
|
-
|
|
414
|
-
<tbody>
|
|
415
|
-
@for (row of rows; track row; let i = $index) {
|
|
416
|
-
<tr
|
|
417
|
-
class="border-b hover:bg-gray-50">
|
|
418
|
-
@for (col of columns; track col) {
|
|
419
|
-
<td
|
|
420
|
-
class="px-4 py-2">
|
|
421
|
-
{{ row[col.key] }}
|
|
422
|
-
</td>
|
|
423
|
-
}
|
|
424
|
-
</tr>
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
@if (!rows || rows.length === 0) {
|
|
428
|
-
<tr>
|
|
429
|
-
<td [attr.colspan]="columns.length"
|
|
430
|
-
class="text-center py-6 text-gray-400">
|
|
431
|
-
No data
|
|
432
|
-
</td>
|
|
433
|
-
</tr>
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
</tbody>
|
|
437
|
-
|
|
438
|
-
</table>
|
|
439
|
-
</div>
|
|
440
|
-
|
|
441
|
-
</div>
|
|
442
|
-
|
|
391
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: RepeatTableViewType, isStandalone: true, selector: "formly-repeat-table-view", usesInheritance: true, ngImport: i0, template: `
|
|
392
|
+
<div class="mb-0">
|
|
393
|
+
|
|
394
|
+
<!-- <label class="block text-lg font-semibold mb-3">
|
|
395
|
+
{{ field.props?.label }}
|
|
396
|
+
</label> -->
|
|
397
|
+
|
|
398
|
+
<div class="overflow-x-auto rounded-xl border">
|
|
399
|
+
<table class="min-w-full bg-white border-collapse">
|
|
400
|
+
|
|
401
|
+
<thead class="bg-gray-100">
|
|
402
|
+
<tr>
|
|
403
|
+
<!-- text-left -->
|
|
404
|
+
@for (col of columns; track col) {
|
|
405
|
+
<th
|
|
406
|
+
class="px-4 py-3 text-right font-medium border-b"
|
|
407
|
+
>
|
|
408
|
+
{{ col.label | translate }}
|
|
409
|
+
</th>
|
|
410
|
+
}
|
|
411
|
+
</tr>
|
|
412
|
+
</thead>
|
|
413
|
+
|
|
414
|
+
<tbody>
|
|
415
|
+
@for (row of rows; track row; let i = $index) {
|
|
416
|
+
<tr
|
|
417
|
+
class="border-b hover:bg-gray-50">
|
|
418
|
+
@for (col of columns; track col) {
|
|
419
|
+
<td
|
|
420
|
+
class="px-4 py-2">
|
|
421
|
+
{{ row[col.key] }}
|
|
422
|
+
</td>
|
|
423
|
+
}
|
|
424
|
+
</tr>
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
@if (!rows || rows.length === 0) {
|
|
428
|
+
<tr>
|
|
429
|
+
<td [attr.colspan]="columns.length"
|
|
430
|
+
class="text-center py-6 text-gray-400">
|
|
431
|
+
No data
|
|
432
|
+
</td>
|
|
433
|
+
</tr>
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
</tbody>
|
|
437
|
+
|
|
438
|
+
</table>
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
</div>
|
|
442
|
+
|
|
443
443
|
`, isInline: true, dependencies: [{ kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
444
444
|
}
|
|
445
445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RepeatTableViewType, decorators: [{
|
|
446
446
|
type: Component,
|
|
447
447
|
args: [{
|
|
448
448
|
selector: 'formly-repeat-table-view',
|
|
449
|
-
template: `
|
|
450
|
-
<div class="mb-0">
|
|
451
|
-
|
|
452
|
-
<!-- <label class="block text-lg font-semibold mb-3">
|
|
453
|
-
{{ field.props?.label }}
|
|
454
|
-
</label> -->
|
|
455
|
-
|
|
456
|
-
<div class="overflow-x-auto rounded-xl border">
|
|
457
|
-
<table class="min-w-full bg-white border-collapse">
|
|
458
|
-
|
|
459
|
-
<thead class="bg-gray-100">
|
|
460
|
-
<tr>
|
|
461
|
-
<!-- text-left -->
|
|
462
|
-
@for (col of columns; track col) {
|
|
463
|
-
<th
|
|
464
|
-
class="px-4 py-3 text-right font-medium border-b"
|
|
465
|
-
>
|
|
466
|
-
{{ col.label | translate }}
|
|
467
|
-
</th>
|
|
468
|
-
}
|
|
469
|
-
</tr>
|
|
470
|
-
</thead>
|
|
471
|
-
|
|
472
|
-
<tbody>
|
|
473
|
-
@for (row of rows; track row; let i = $index) {
|
|
474
|
-
<tr
|
|
475
|
-
class="border-b hover:bg-gray-50">
|
|
476
|
-
@for (col of columns; track col) {
|
|
477
|
-
<td
|
|
478
|
-
class="px-4 py-2">
|
|
479
|
-
{{ row[col.key] }}
|
|
480
|
-
</td>
|
|
481
|
-
}
|
|
482
|
-
</tr>
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
@if (!rows || rows.length === 0) {
|
|
486
|
-
<tr>
|
|
487
|
-
<td [attr.colspan]="columns.length"
|
|
488
|
-
class="text-center py-6 text-gray-400">
|
|
489
|
-
No data
|
|
490
|
-
</td>
|
|
491
|
-
</tr>
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
</tbody>
|
|
495
|
-
|
|
496
|
-
</table>
|
|
497
|
-
</div>
|
|
498
|
-
|
|
499
|
-
</div>
|
|
500
|
-
|
|
449
|
+
template: `
|
|
450
|
+
<div class="mb-0">
|
|
451
|
+
|
|
452
|
+
<!-- <label class="block text-lg font-semibold mb-3">
|
|
453
|
+
{{ field.props?.label }}
|
|
454
|
+
</label> -->
|
|
455
|
+
|
|
456
|
+
<div class="overflow-x-auto rounded-xl border">
|
|
457
|
+
<table class="min-w-full bg-white border-collapse">
|
|
458
|
+
|
|
459
|
+
<thead class="bg-gray-100">
|
|
460
|
+
<tr>
|
|
461
|
+
<!-- text-left -->
|
|
462
|
+
@for (col of columns; track col) {
|
|
463
|
+
<th
|
|
464
|
+
class="px-4 py-3 text-right font-medium border-b"
|
|
465
|
+
>
|
|
466
|
+
{{ col.label | translate }}
|
|
467
|
+
</th>
|
|
468
|
+
}
|
|
469
|
+
</tr>
|
|
470
|
+
</thead>
|
|
471
|
+
|
|
472
|
+
<tbody>
|
|
473
|
+
@for (row of rows; track row; let i = $index) {
|
|
474
|
+
<tr
|
|
475
|
+
class="border-b hover:bg-gray-50">
|
|
476
|
+
@for (col of columns; track col) {
|
|
477
|
+
<td
|
|
478
|
+
class="px-4 py-2">
|
|
479
|
+
{{ row[col.key] }}
|
|
480
|
+
</td>
|
|
481
|
+
}
|
|
482
|
+
</tr>
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
@if (!rows || rows.length === 0) {
|
|
486
|
+
<tr>
|
|
487
|
+
<td [attr.colspan]="columns.length"
|
|
488
|
+
class="text-center py-6 text-gray-400">
|
|
489
|
+
No data
|
|
490
|
+
</td>
|
|
491
|
+
</tr>
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
</tbody>
|
|
495
|
+
|
|
496
|
+
</table>
|
|
497
|
+
</div>
|
|
498
|
+
|
|
499
|
+
</div>
|
|
500
|
+
|
|
501
501
|
`,
|
|
502
502
|
imports: [TranslatePipe],
|
|
503
503
|
}]
|