ln-20-lib-components 0.0.41 → 0.0.42
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/fesm2022/{ln-20-lib-components-ln-20-lib-components-DHrxn8ai.mjs → ln-20-lib-components-ln-20-lib-components-B_OhDfJy.mjs} +26 -9
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-B_OhDfJy.mjs.map +1 -0
- package/fesm2022/{ln-20-lib-components-selected-items-management.component-BELzWncD.mjs → ln-20-lib-components-selected-items-management.component-95e_4wqx.mjs} +2 -2
- package/fesm2022/{ln-20-lib-components-selected-items-management.component-BELzWncD.mjs.map → ln-20-lib-components-selected-items-management.component-95e_4wqx.mjs.map} +1 -1
- package/fesm2022/ln-20-lib-components.mjs +1 -1
- package/lib/components/prime-ng/table-ng/services/table-ng-edit.service.d.ts +4 -1
- package/lib/components/prime-ng/table-ng/table-ng.component.d.ts +1 -0
- package/package.json +1 -1
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-B5izPne0.mjs +0 -3558
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-B5izPne0.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-BLTq2uGZ.mjs +0 -3558
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-BLTq2uGZ.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-BQKDeJ1C.mjs +0 -3529
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-BQKDeJ1C.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-CeFk-mqA.mjs +0 -3356
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-CeFk-mqA.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-D1SwsYk6.mjs +0 -3355
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-D1SwsYk6.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-ln-20-lib-components-DHrxn8ai.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-selected-items-management.component-CHuW-NSi.mjs +0 -55
- package/fesm2022/ln-20-lib-components-selected-items-management.component-CHuW-NSi.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-selected-items-management.component-Dox7jzc7.mjs +0 -55
- package/fesm2022/ln-20-lib-components-selected-items-management.component-Dox7jzc7.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-selected-items-management.component-Q9503pwt.mjs +0 -55
- package/fesm2022/ln-20-lib-components-selected-items-management.component-Q9503pwt.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-selected-items-management.component-aj67xgdz.mjs +0 -55
- package/fesm2022/ln-20-lib-components-selected-items-management.component-aj67xgdz.mjs.map +0 -1
- package/fesm2022/ln-20-lib-components-selected-items-management.component-sGivAKM5.mjs +0 -55
- package/fesm2022/ln-20-lib-components-selected-items-management.component-sGivAKM5.mjs.map +0 -1
|
@@ -2198,6 +2198,11 @@ class TableNgEditService {
|
|
|
2198
2198
|
return controls;
|
|
2199
2199
|
});
|
|
2200
2200
|
searchFormGroup = signal(new FormGroup({}));
|
|
2201
|
+
_cellTableNgData = signal(undefined);
|
|
2202
|
+
cellTableNgData = this._cellTableNgData.asReadonly();
|
|
2203
|
+
setCellTableNgData(cellTableNgData) {
|
|
2204
|
+
this._cellTableNgData.set(cellTableNgData);
|
|
2205
|
+
}
|
|
2201
2206
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgEditService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2202
2207
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgEditService, providedIn: 'root' });
|
|
2203
2208
|
}
|
|
@@ -2436,7 +2441,7 @@ class TableNgService {
|
|
|
2436
2441
|
//#endregion
|
|
2437
2442
|
//#region Selection
|
|
2438
2443
|
async openModalManagementSelectedItems(selectedItems, config) {
|
|
2439
|
-
const { SelectedItemsManagementComponent } = await import('./ln-20-lib-components-selected-items-management.component-
|
|
2444
|
+
const { SelectedItemsManagementComponent } = await import('./ln-20-lib-components-selected-items-management.component-95e_4wqx.mjs');
|
|
2440
2445
|
let configSelectedItems = config;
|
|
2441
2446
|
if (config) {
|
|
2442
2447
|
configSelectedItems = structuredClone(config);
|
|
@@ -2555,6 +2560,7 @@ class TableNgComponent {
|
|
|
2555
2560
|
tableNgEditService = inject(TableNgEditService);
|
|
2556
2561
|
dialogService = inject(CustomDialogService);
|
|
2557
2562
|
data = model.required();
|
|
2563
|
+
totalRows = computed(() => this.data().length);
|
|
2558
2564
|
// Loading state management
|
|
2559
2565
|
loadingTimeout = null;
|
|
2560
2566
|
isLoading = signal(false);
|
|
@@ -2645,6 +2651,10 @@ class TableNgComponent {
|
|
|
2645
2651
|
}
|
|
2646
2652
|
ngOnInit() {
|
|
2647
2653
|
this.tableNgService.setInitialValue([...this.data()]);
|
|
2654
|
+
const cellTableNgData = this.editConfig()?.cellEditConfig?.defaultTableNgData;
|
|
2655
|
+
if (cellTableNgData) {
|
|
2656
|
+
this.tableNgEditService.setCellTableNgData(cellTableNgData);
|
|
2657
|
+
}
|
|
2648
2658
|
}
|
|
2649
2659
|
ngOnDestroy() {
|
|
2650
2660
|
// Limpiar el timeout al destruir el componente
|
|
@@ -3017,14 +3027,21 @@ class TableNgComponent {
|
|
|
3017
3027
|
});
|
|
3018
3028
|
addRow() {
|
|
3019
3029
|
const editConfig = this.editConfig();
|
|
3030
|
+
const templateRow = this.tableNgEditService.cellTableNgData();
|
|
3020
3031
|
// Si es modo cell y hay defaultTableNgData configurado, agregar la fila directamente
|
|
3021
|
-
if (editConfig?.type === 'cell' &&
|
|
3022
|
-
const
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3032
|
+
if (editConfig?.type === 'cell' && templateRow) {
|
|
3033
|
+
const id = `${(this.totalRows() + 1).toString()}-${generateId()}`;
|
|
3034
|
+
const rowDataId = `${id}-${generateId()}`;
|
|
3035
|
+
// templateRow es siempre la misma referencia (defaultTableNgData): hay que clonar para que
|
|
3036
|
+
// cada fila nueva sea independiente y no comparta el mismo objeto con las demás.
|
|
3037
|
+
const newRow = {
|
|
3038
|
+
...templateRow,
|
|
3039
|
+
id,
|
|
3040
|
+
rowData: { ...structuredClone(templateRow.rowData), id: rowDataId }
|
|
3041
|
+
};
|
|
3042
|
+
this.data.update(currentData => [...currentData, newRow]);
|
|
3043
|
+
this.outputChangeData.emit(this.data());
|
|
3044
|
+
return;
|
|
3028
3045
|
}
|
|
3029
3046
|
// Comportamiento original para modo row o cuando no hay defaultTableNgData
|
|
3030
3047
|
this.outputAddRow.emit(this.data());
|
|
@@ -3551,4 +3568,4 @@ de13d65e8a0357ce9f2e18c899c8e7f6f728181baa031761ecdd7ef5cb166eb2
|
|
|
3551
3568
|
*/
|
|
3552
3569
|
|
|
3553
3570
|
export { AminatedContainerComponent as A, BaseDialogComponent as B, DisabledContainerComponent as D, ETypeInput as E, FormComponent as F, HttpMessageComponent as H, InlineInputComponent as I, LibComponentsService as L, SpeedDialComponent as S, TableNgComponent as T, ButtonNgComponent as a, LibComponentsComponent as b, SpeedDialService as c, SpeedDialNgComponent as d };
|
|
3554
|
-
//# sourceMappingURL=ln-20-lib-components-ln-20-lib-components-
|
|
3571
|
+
//# sourceMappingURL=ln-20-lib-components-ln-20-lib-components-B_OhDfJy.mjs.map
|