@sd-angular/core 19.0.0-beta.17 → 19.0.0-beta.19

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.
@@ -1,4 +1,14 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * Directive thêm hiệu ứng đổ bóng (elevation-2) vào cột sticky cuối cùng bên trái
4
+ * và cột sticky đầu tiên bên phải, tạo ngăn cách trực quan với phần được scroll.
5
+ *
6
+ * Chỉ dùng nội bộ trong sd-table, không chìa ra ngoài.
7
+ *
8
+ * Gắn vào scroll container của table:
9
+ * @example
10
+ * <div class="c-table" stickyShadow>...</div>
11
+ */
2
12
  export declare class StickyShadowDirective {
3
13
  #private;
4
14
  constructor();
@@ -1,7 +1,7 @@
1
1
  import { TemplateRef } from '@angular/core';
2
2
  import { SdBadge } from '@sd-angular/core/components/badge';
3
3
  import { SdSearch } from '@sd-angular/core/forms';
4
- import { SdColor, SdOperator } from '@sd-angular/core/utilities';
4
+ import { SdColor, SdNestedKeyOf, SdOperator } from '@sd-angular/core/utilities';
5
5
  export type SdTableColumn<T = any> = SdTableColumnText<T> | SdTableColumnNumber<T> | SdTableColumnBool<T> | SdTableColumnDate<T> | SdTableColumnValues<T> | SdTableColumnLazyValues<T> | SdTableColumnChildren<T>;
6
6
  export type SdTableColumnTransformFunc<T = any> = (value: any, rowData: T, args?: {
7
7
  isExport?: boolean;
@@ -45,14 +45,14 @@ interface SdTableColumnBase<T = any> {
45
45
  copiable?: boolean;
46
46
  }
47
47
  interface SdTableColumnText<T = any> extends SdTableColumnBase<T> {
48
- field: Extract<keyof T, string>;
48
+ field: SdNestedKeyOf<T>;
49
49
  type: 'string';
50
50
  badge?: (value: any, rowData: T) => SdColor;
51
51
  badgeIcon?: (value: any, rowData: T) => string;
52
52
  badgeType?: SdBadge['type'];
53
53
  }
54
54
  interface SdTableColumnNumber<T = any> extends SdTableColumnBase<T> {
55
- field: Extract<keyof T, string>;
55
+ field: SdNestedKeyOf<T>;
56
56
  type: 'number';
57
57
  badge?: (value: any, rowData: T) => SdColor;
58
58
  badgeIcon?: (value: any, rowData: T) => string;
@@ -62,7 +62,7 @@ interface SdTableColumnNumber<T = any> extends SdTableColumnBase<T> {
62
62
  };
63
63
  }
64
64
  interface SdTableColumnBool<T = any> extends SdTableColumnBase<T> {
65
- field: Extract<keyof T, string>;
65
+ field: SdNestedKeyOf<T>;
66
66
  type: 'boolean';
67
67
  option?: {
68
68
  displayOnTrue?: string;
@@ -70,14 +70,14 @@ interface SdTableColumnBool<T = any> extends SdTableColumnBase<T> {
70
70
  };
71
71
  }
72
72
  interface SdTableColumnDate<T = any> extends SdTableColumnBase<T> {
73
- field: Extract<keyof T, string>;
73
+ field: SdNestedKeyOf<T>;
74
74
  type: 'date' | 'datetime' | 'time';
75
75
  filter?: SdTableColumnBase['filter'] & {
76
76
  type?: 'daterange' | 'date' | 'split-date';
77
77
  };
78
78
  }
79
79
  export interface SdTableColumnValues<T = any> extends SdTableColumnBase<T> {
80
- field: Extract<keyof T, string>;
80
+ field: SdNestedKeyOf<T>;
81
81
  type: 'values';
82
82
  badge?: (value: any, rowData: T) => SdColor;
83
83
  badgeIcon?: (value: any, rowData: T) => string;
@@ -90,7 +90,7 @@ export interface SdTableColumnValues<T = any> extends SdTableColumnBase<T> {
90
90
  };
91
91
  }
92
92
  export interface SdTableColumnLazyValues<T = any> extends SdTableColumnBase<T> {
93
- field: Extract<keyof T, string>;
93
+ field: SdNestedKeyOf<T>;
94
94
  type: 'lazy-values';
95
95
  option: {
96
96
  valueField: string;
@@ -1,3 +1,4 @@
1
+ import { SdNestedKeyOf } from '@sd-angular/core/utilities';
1
2
  import { SdTableFilterRequest } from '../services/table-filter/table-filter.model';
2
3
  export type SdTableOptionExport<T = any> = SdTableOptionExportDefault<T> | SdTableOptionExportCustom;
3
4
  export interface SdTableOptionExportDefault<T = any> {
@@ -22,7 +23,7 @@ export interface SdTableOptionExportCustom {
22
23
  onExport: (filterRequest: SdTableFilterRequest) => Promise<void>;
23
24
  }
24
25
  export interface SdTableOptionExportColumn<T = any> {
25
- field: Extract<keyof T, string>;
26
+ field: SdNestedKeyOf<T>;
26
27
  title: string;
27
28
  description?: string;
28
29
  width?: string;
@@ -35,7 +36,7 @@ export interface SdTableOptionExportSheet<T = any> {
35
36
  name: string;
36
37
  items: T[] | (() => T[] | Promise<T[]>);
37
38
  headers: {
38
- value: Extract<keyof T, string>;
39
+ value: SdNestedKeyOf<T>;
39
40
  display: string;
40
41
  }[];
41
42
  }
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs';
2
2
  import { SdTableColumn } from '../../models/table-column.model';
3
3
  import { TemplateRef } from '@angular/core';
4
4
  import { SdSearch } from '@sd-angular/core/forms';
5
- import { SdOperator, SdOrder, SdPagingReq } from '@sd-angular/core/utilities';
5
+ import { SdNestedKeyOf, SdOperator, SdOrder, SdPagingReq } from '@sd-angular/core/utilities';
6
6
  export interface SdTableQuickFilter {
7
7
  code: string;
8
8
  columnFilter: Record<string, any>;
@@ -20,7 +20,7 @@ export interface TableFilterValue {
20
20
  }
21
21
  export interface SdTableFilterRequest<T = any> {
22
22
  columnOperator: Record<string, SdOperator>;
23
- rawColumnFilter: Record<keyof T, any>;
23
+ rawColumnFilter: Record<SdNestedKeyOf<T>, any>;
24
24
  rawExternalFilter: Record<string, any>;
25
25
  pageNumber: number;
26
26
  pageSize: number;