@shival99/z-ui 2.0.54 → 2.0.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shival99/z-ui",
3
- "version": "2.0.54",
3
+ "version": "2.0.56",
4
4
  "description": "Z-UI: Modern Angular UI Component Library - A comprehensive, high-performance design system built with Angular 20+, featuring 40+ customizable components with dark mode, accessibility, and enterprise-ready features.",
5
5
  "keywords": [
6
6
  "angular",
@@ -274,7 +274,7 @@ declare class ZAutocompleteComponent<T = unknown> implements OnInit, ControlValu
274
274
 
275
275
  declare const zAutocompleteInputVariants: (props?: ({
276
276
  zSize?: "sm" | "default" | "lg" | null | undefined;
277
- zStatus?: "default" | "error" | "disabled" | "readonly" | "open" | null | undefined;
277
+ zStatus?: "default" | "open" | "error" | "disabled" | "readonly" | null | undefined;
278
278
  } & class_variance_authority_types.ClassProp) | undefined) => string;
279
279
  type ZAutocompleteInputVariants = VariantProps<typeof zAutocompleteInputVariants>;
280
280
  declare const zAutocompleteOptionVariants: (props?: ({
@@ -328,7 +328,7 @@ declare const Z_EDITOR_DEFAULT_TOOLBAR: readonly ZEditorToolbarItem[];
328
328
 
329
329
  declare const zEditorVariants: (props?: ({
330
330
  zSize?: "sm" | "default" | "lg" | null | undefined;
331
- zStatus?: "default" | "disabled" | "readonly" | "error" | null | undefined;
331
+ zStatus?: "default" | "error" | "disabled" | "readonly" | null | undefined;
332
332
  zPlaceholderMode?: "firstLine" | "everyLine" | null | undefined;
333
333
  } & class_variance_authority_types.ClassProp) | undefined) => string;
334
334
  type ZEditorVariants = VariantProps<typeof zEditorVariants>;
@@ -116,7 +116,7 @@ declare class ZPopoverDirective implements OnInit, OnDestroy {
116
116
  readonly zHideDelay: _angular_core.InputSignal<number>;
117
117
  readonly zDisabled: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
118
118
  readonly zOffset: _angular_core.InputSignal<number>;
119
- readonly zPopoverWidth: _angular_core.InputSignal<number | "auto" | "trigger">;
119
+ readonly zPopoverWidth: _angular_core.InputSignal<number | "trigger" | "auto">;
120
120
  readonly zTriggerRef: _angular_core.InputSignal<HTMLElement | ElementRef<HTMLElement> | null>;
121
121
  readonly zManualClose: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
122
122
  readonly zOutsideClickClose: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
@@ -323,7 +323,7 @@ declare class ZTagClassesPipe implements PipeTransform {
323
323
 
324
324
  declare const zSelectVariants: (props?: ({
325
325
  zSize?: "sm" | "default" | "lg" | null | undefined;
326
- zStatus?: "default" | "error" | "disabled" | "readonly" | "open" | null | undefined;
326
+ zStatus?: "default" | "open" | "error" | "disabled" | "readonly" | null | undefined;
327
327
  } & class_variance_authority_types.ClassProp) | undefined) => string;
328
328
  declare const zSelectTagVariants: (props?: ({
329
329
  zSize?: "sm" | "default" | "lg" | null | undefined;
@@ -531,13 +531,24 @@ interface ZTableBulkActionClickEvent<T = unknown> extends ZTableBulkActionContex
531
531
  key: string;
532
532
  action: ZTableBulkActionItem<T>;
533
533
  }
534
- interface ZTableCellSelectionOptions {
534
+ interface ZTableCellSelectionPredicateContext<T = unknown> {
535
+ row: T;
536
+ rowId: string;
537
+ rowIndex: number;
538
+ columnId: string;
539
+ column: ZTableColumnConfig<T> | undefined;
540
+ }
541
+ interface ZTableCellSelectionOptions<T = unknown> {
535
542
  enabled?: boolean;
536
543
  range?: boolean;
537
544
  contextMenu?: boolean;
538
545
  copyWithHeaders?: boolean;
546
+ /** Column ids that cannot be selected, used as range boundaries, or copied from a range. */
547
+ disabledColumnIds?: string[];
548
+ /** Disable selection for a specific custom cell. */
549
+ isCellDisabled?: (context: ZTableCellSelectionPredicateContext<T>) => boolean;
539
550
  }
540
- type ZTableCellSelectionConfig = boolean | ZTableCellSelectionOptions;
551
+ type ZTableCellSelectionConfig<T = unknown> = boolean | ZTableCellSelectionOptions<T>;
541
552
  type ZTableExcelExportScope = 'selected' | 'filtered' | 'all';
542
553
  interface ZTableExcelExportContext<T = unknown> extends ZTableBulkActionContext<T> {
543
554
  data: T[];
@@ -804,7 +815,7 @@ interface ZTableConfig<T> {
804
815
  /** Floating bulk action bar shown when rows are selected */
805
816
  bulkAction?: ZTableBulkActionConfig<T> | boolean;
806
817
  /** Bật chọn cell/range và copy giống spreadsheet. Mặc định bật. */
807
- cellSelection?: ZTableCellSelectionConfig;
818
+ cellSelection?: ZTableCellSelectionConfig<T>;
808
819
  /** Bật menu chuột phải để chèn dòng khi bảng có cell editContent. */
809
820
  enableContentRowInsert?: boolean;
810
821
  enableRowPinning?: boolean;
@@ -876,6 +887,7 @@ declare module '@tanstack/angular-table' {
876
887
  }
877
888
  }
878
889
 
890
+ type ZTableResolvedCellSelectionOptions<T> = Required<Pick<ZTableCellSelectionOptions<T>, 'enabled' | 'range' | 'contextMenu' | 'copyWithHeaders'>> & Pick<ZTableCellSelectionOptions<T>, 'disabledColumnIds' | 'isCellDisabled'>;
879
891
  declare class ZTableComponent<T> implements AfterViewInit {
880
892
  private static _dragInstanceCount;
881
893
  /** Unified change event — parent listens to this for all table interactions */
@@ -1036,7 +1048,7 @@ declare class ZTableComponent<T> implements AfterViewInit {
1036
1048
  protected readonly hasContentEditableColumns: _angular_core.Signal<boolean>;
1037
1049
  protected readonly canUseContentRowInsert: _angular_core.Signal<boolean>;
1038
1050
  protected readonly canUseRowSelection: _angular_core.Signal<boolean>;
1039
- protected readonly cellSelectionOptions: _angular_core.Signal<Required<ZTableCellSelectionOptions>>;
1051
+ protected readonly cellSelectionOptions: _angular_core.Signal<ZTableResolvedCellSelectionOptions<T>>;
1040
1052
  protected readonly canUseCellSelection: _angular_core.Signal<boolean>;
1041
1053
  protected readonly selectedCellIds: _angular_core.Signal<Set<string>>;
1042
1054
  protected readonly visualSelectedCellIds: _angular_core.Signal<Set<string>>;
@@ -1265,6 +1277,7 @@ declare class ZTableComponent<T> implements AfterViewInit {
1265
1277
  private _buildSelectedCellsText;
1266
1278
  private _getSelectableColumnIds;
1267
1279
  private _isSelectableCellColumn;
1280
+ private _isSelectableCell;
1268
1281
  private _isIgnoredCellSelectionTarget;
1269
1282
  private _isCellSelectionDragTarget;
1270
1283
  private _formatCellClipboardValue;
@@ -1440,7 +1453,7 @@ declare class ZTableActionsComponent<T = unknown> {
1440
1453
  readonly zConfig: _angular_core.InputSignal<ZTableActionColumnConfig<T>>;
1441
1454
  readonly zRow: _angular_core.InputSignal<T>;
1442
1455
  readonly zRowId: _angular_core.InputSignal<string>;
1443
- readonly zDropdownButtonSize: _angular_core.InputSignal<"default" | "sm" | "lg" | "xs" | "xl" | null | undefined>;
1456
+ readonly zDropdownButtonSize: _angular_core.InputSignal<"sm" | "default" | "lg" | "xs" | "xl" | null | undefined>;
1444
1457
  readonly zActionClick: _angular_core.OutputEmitterRef<ZTableActionClickEvent<T>>;
1445
1458
  protected readonly allActions: _angular_core.Signal<ZTableActionItem<T>[]>;
1446
1459
  protected readonly shouldShowAsButtons: _angular_core.Signal<boolean>;