@shival99/z-ui 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@ import { moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
|
|
|
2
2
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
3
3
|
import { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { input, output, computed, ChangeDetectionStrategy, Component, inject, DestroyRef, Injector, signal, ElementRef, Renderer2, Directive, NgZone, Pipe, TemplateRef, viewChild, viewChildren, untracked,
|
|
5
|
+
import { input, output, computed, ChangeDetectionStrategy, Component, inject, DestroyRef, Injector, signal, effect, ElementRef, Renderer2, Directive, NgZone, Pipe, TemplateRef, viewChild, viewChildren, untracked, afterNextRender } from '@angular/core';
|
|
6
6
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
7
7
|
import { injectVirtualizer } from '@shival99/angular-virtual';
|
|
8
8
|
import { ZButtonComponent } from '@shival99/z-ui/components/z-button';
|
|
@@ -255,10 +255,15 @@ class ZTableEditCellComponent {
|
|
|
255
255
|
zChange = output();
|
|
256
256
|
_currentValue = signal(undefined, ...(ngDevMode ? [{ debugName: "_currentValue" }] : []));
|
|
257
257
|
_valueChange$ = new Subject();
|
|
258
|
-
_lastExternalValue = undefined;
|
|
259
258
|
_pendingBlurValue = undefined;
|
|
260
259
|
_hasPendingBlur = false;
|
|
261
260
|
_inputControl = null;
|
|
261
|
+
constructor() {
|
|
262
|
+
effect(() => {
|
|
263
|
+
const externalValue = this.zValue();
|
|
264
|
+
this._currentValue.set(externalValue);
|
|
265
|
+
});
|
|
266
|
+
}
|
|
262
267
|
editConfig = computed(() => {
|
|
263
268
|
const config = this.zEditConfig();
|
|
264
269
|
if (!config || typeof config === 'boolean') {
|
|
@@ -339,15 +344,7 @@ class ZTableEditCellComponent {
|
|
|
339
344
|
}
|
|
340
345
|
return config.readonly;
|
|
341
346
|
}, ...(ngDevMode ? [{ debugName: "isReadonly" }] : []));
|
|
342
|
-
value = computed(() => {
|
|
343
|
-
const externalValue = this.zValue();
|
|
344
|
-
if (externalValue !== this._lastExternalValue) {
|
|
345
|
-
this._lastExternalValue = externalValue;
|
|
346
|
-
this._currentValue.set(externalValue);
|
|
347
|
-
return externalValue;
|
|
348
|
-
}
|
|
349
|
-
return this._currentValue();
|
|
350
|
-
}, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
347
|
+
value = computed(() => this._currentValue(), ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
351
348
|
stringValue = computed(() => {
|
|
352
349
|
const val = this.value();
|
|
353
350
|
if (val === null || val === undefined) {
|
|
@@ -654,7 +651,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
654
651
|
`, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
655
652
|
class: 'z-table-edit-cell block',
|
|
656
653
|
}, styles: [":host{display:block;width:100%}\n"] }]
|
|
657
|
-
}], propDecorators: { zRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRow", required: true }] }], zRowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRowId", required: true }] }], zRowIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRowIndex", required: true }] }], zColumnId: [{ type: i0.Input, args: [{ isSignal: true, alias: "zColumnId", required: true }] }], zValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "zValue", required: false }] }], zEditConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEditConfig", required: false }] }], zChange: [{ type: i0.Output, args: ["zChange"] }] } });
|
|
654
|
+
}], ctorParameters: () => [], propDecorators: { zRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRow", required: true }] }], zRowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRowId", required: true }] }], zRowIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRowIndex", required: true }] }], zColumnId: [{ type: i0.Input, args: [{ isSignal: true, alias: "zColumnId", required: true }] }], zValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "zValue", required: false }] }], zEditConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEditConfig", required: false }] }], zChange: [{ type: i0.Output, args: ["zChange"] }] } });
|
|
658
655
|
|
|
659
656
|
class ZTableFilterComponent {
|
|
660
657
|
zColumn = input.required(...(ngDevMode ? [{ debugName: "zColumn" }] : []));
|