@shival99/z-ui 2.6.7 → 2.6.9

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.
Files changed (35) hide show
  1. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +2 -3
  2. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
  3. package/fesm2022/shival99-z-ui-components-z-button-group.mjs +1 -1
  4. package/fesm2022/shival99-z-ui-components-z-button-group.mjs.map +1 -1
  5. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +13 -13
  6. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +4 -7
  8. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-editor.mjs +1 -1
  10. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
  11. package/fesm2022/shival99-z-ui-components-z-modal.mjs +6 -7
  12. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  13. package/fesm2022/shival99-z-ui-components-z-popover.mjs +2 -2
  14. package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
  15. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +1 -1
  16. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -1
  17. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +3 -9
  18. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -1
  19. package/fesm2022/shival99-z-ui-components-z-show-more.mjs +9 -9
  20. package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -1
  21. package/fesm2022/shival99-z-ui-components-z-table.mjs +83 -149
  22. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
  23. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +2 -2
  24. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
  25. package/fesm2022/shival99-z-ui-components-z-toast.mjs +4 -4
  26. package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
  27. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +1 -1
  28. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
  29. package/package.json +1 -1
  30. package/types/shival99-z-ui-components-z-autocomplete.d.ts +1 -1
  31. package/types/shival99-z-ui-components-z-button-group.d.ts +1 -1
  32. package/types/shival99-z-ui-components-z-drawer.d.ts +3 -6
  33. package/types/shival99-z-ui-components-z-scrollarea.d.ts +2 -0
  34. package/types/shival99-z-ui-components-z-table.d.ts +36 -64
  35. package/.npmignore +0 -58
@@ -1261,23 +1261,20 @@ declare class ZTableComponent<T> implements AfterViewInit {
1261
1261
  protected readonly hasScrollLeft: _angular_core.WritableSignal<boolean>;
1262
1262
  /** True when table has right-pinned columns and body isn't scrolled to the end */
1263
1263
  protected readonly hasScrollRight: _angular_core.WritableSignal<boolean>;
1264
- /** True khi top-pinned rows đang đè lên nội dung body đã scroll qua đầu */
1264
+ /** True when top-pinned rows overlap body content that has scrolled underneath. */
1265
1265
  protected readonly hasScrollTop: _angular_core.WritableSignal<boolean>;
1266
- /** True khi bottom-pinned rows đang đè lên nội dung body còn scroll xuống được */
1266
+ /** True when bottom-pinned rows overlap body content that can still scroll down. */
1267
1267
  protected readonly hasScrollBottom: _angular_core.WritableSignal<boolean>;
1268
1268
  /**
1269
- * Group header (non-virtual) đang ghim ở mép dưới cùng của chồng sticky — chỉ mình nó đổ shadow.
1270
- * Nhiều header ghim chung một chỗ, mỗi cái một shadow thì alpha cộng dồn thành vệt đen đậm dần.
1271
- * Chỉ dùng cho shadow: class này bám theo scroll nên luôn trễ một frame, chấp nhận được với shadow
1272
- * nhưng không dùng được cho z-index (xem `tr.z-group-row-sticky`).
1269
+ * ID of the lowest stuck non-virtual group header. Only this header receives a shadow.
1270
+ * The value is for shadows only; it can lag scrolling by one frame and must not control z-index.
1273
1271
  */
1274
1272
  protected readonly shadowGroupRowId: _angular_core.WritableSignal<string | null>;
1275
- /** Chiều cao thật của group header row (non-virtual), dùng để xếp chồng sticky theo depth. */
1273
+ /** Measured non-virtual group-row height used to stack sticky headers by depth. */
1276
1274
  private readonly _groupRowHeight;
1277
1275
  /**
1278
- * Tổng chiều cao khối pinned top rows (non-virtual), đo trực tiếp từ DOM sau mỗi render.
1279
- * Không dùng `pinnedRowHeights` vì signal đó chỉ refresh trong `_checkScrollState`, nên có thể
1280
- * còn giữ số đo cũ khi bảng vừa đổi cấu hình — sticky group header sẽ hở một khoảng vài px.
1276
+ * Total height of non-virtual top-pinned rows, measured from the DOM after each render.
1277
+ * This avoids stale values while table configuration changes.
1281
1278
  */
1282
1279
  private readonly _nonVirtualPinnedTopHeight;
1283
1280
  /** Maps row IDs to measured DOM heights for pinned row offset calculations */
@@ -1359,10 +1356,10 @@ declare class ZTableComponent<T> implements AfterViewInit {
1359
1356
  protected readonly hasLocalSorting: _angular_core.Signal<boolean>;
1360
1357
  protected readonly hasServerFiltering: _angular_core.Signal<boolean>;
1361
1358
  protected readonly groupingConfig: _angular_core.Signal<ZTableGroupingConfig<T>>;
1362
- /** EN/VI: true khi grouping chạy ở chế độ server (group meta do server cung cấp). */
1359
+ /** True when grouping runs in server mode and group metadata comes from the server. */
1363
1360
  protected readonly isServerGrouping: _angular_core.Signal<boolean>;
1364
1361
  protected readonly canUseGrouping: _angular_core.Signal<boolean>;
1365
- /** EN/VI: cột group hiệu lực cho chế độ server (config cung cấp, không suy ra từ data). */
1362
+ /** Effective grouping column for server mode, provided by configuration. */
1366
1363
  protected readonly serverGroupColumnId: _angular_core.Signal<string | null>;
1367
1364
  protected readonly activeGroupingColumnIds: _angular_core.Signal<string[]>;
1368
1365
  protected readonly activeGroupingColumnId: _angular_core.Signal<string>;
@@ -1372,59 +1369,46 @@ declare class ZTableComponent<T> implements AfterViewInit {
1372
1369
  protected readonly groupableColumnMap: _angular_core.Signal<Record<string, boolean>>;
1373
1370
  protected readonly groupingHeaderMenuMap: _angular_core.Signal<Record<string, boolean>>;
1374
1371
  protected readonly groupedCenterRowItems: _angular_core.Signal<ZTableGroupedRowItem<T>[]>;
1375
- /** Local grouping: group được tính tại client từ rows của trang hiện tại. */
1372
+ /** Builds groups on the client from rows on the current page. */
1376
1373
  private _buildLocalGroupedItems;
1377
1374
  private _appendLocalGroupedItems;
1378
1375
  /**
1379
- * Server grouping: thứ tự & meta group do `config.enableGrouping.serverGroups` quyết định.
1380
- * Child rows lấy từ `getCenterRows()` (data parent đã fetch) và gán vào group theo value.
1376
+ * Server grouping uses the order and metadata from `serverGroups`.
1377
+ * Fetched center rows are assigned to groups by their value.
1381
1378
  */
1382
1379
  private _buildServerGroupedItems;
1383
1380
  private _getGroupTotals;
1384
1381
  private _sumGroupColumn;
1385
1382
  /**
1386
- * EN: Flat list of body rows in the exact order they are rendered. When grouping is active the
1383
+ * Flat list of body rows in the exact order they are rendered. When grouping is active the
1387
1384
  * center rows are re-ordered group-by-group, so the flat `table.getRowModel().rows` no longer
1388
1385
  * matches the visual order. The `z-at-bottom` border logic must use this visual order, otherwise
1389
1386
  * `border-bottom: none` is applied to whichever row happens to be last in the flat model — which
1390
1387
  * after grouping lands somewhere in the middle of the table.
1391
- * VI: Danh sách phẳng các row body theo đúng thứ tự render. Khi đang group, center rows bị sắp xếp
1392
- * lại theo từng group nên `table.getRowModel().rows` không còn khớp thứ tự hiển thị. Logic
1393
- * border `z-at-bottom` phải dùng thứ tự hiển thị này, nếu không `border-bottom: none` sẽ bị gán
1394
- * nhầm cho row đang nằm ở giữa bảng.
1395
1388
  */
1396
1389
  protected readonly renderedBodyRows: _angular_core.Signal<Row<T>[]>;
1397
1390
  protected readonly bodyRowSpanRows: _angular_core.Signal<Row<T>[]>;
1398
1391
  protected readonly virtualGroupedFlatItems: _angular_core.Signal<ZVirtualFlatItem<T>[]>;
1399
- /** Sticky group header đang bật (config cho phép và đang thực sự group theo cột nào đó). */
1392
+ /** True when sticky group headers are enabled and at least one grouping column is active. */
1400
1393
  protected readonly isStickyGroupHeaderEnabled: _angular_core.Signal<boolean>;
1401
- /** Flow layout: một transform cho cả khối thay vì mỗi row một cái. Sticky group header phải
1402
- * dùng absolute vì rangeExtractor làm tập render không liền mạch. */
1394
+ /** Uses one transform for the virtual block; sticky group headers require absolute positioning. */
1403
1395
  protected readonly usesFlowVirtualRows: _angular_core.Signal<boolean>;
1404
1396
  protected readonly virtualFlowOffset: _angular_core.Signal<number>;
1405
1397
  /**
1406
- * `top` (px) của sticky group header theo depth ở chế độ non-virtual.
1407
- * Ở đây mọi group header đều là `<tr>` thật trong cùng một `<tbody>`, nên chỉ cần `position: sticky`:
1408
- * header sau (đứng sau trong DOM) tự đè lên header trước khi trôi tới rồi lộ lại khi cuộn ngược —
1409
- * không cần rangeExtractor như bên virtual (cơ chế đó chỉ để giữ row đã ra khỏi range).
1410
- * Header con xếp chồng ngay dưới header cha nên cộng thêm `depth * chiều cao group row`.
1398
+ * Computes `top` offsets for non-virtual sticky group headers.
1399
+ * Headers share one tbody, so native sticky positioning handles their stacking order.
1411
1400
  */
1412
1401
  protected readonly stickyGroupTopByDepth: _angular_core.Signal<number[]>;
1413
1402
  /**
1414
- * Lookup phục vụ sticky group header trong virtual scroll:
1415
- * - `nearest[i]`: index group header gần nhất tại hoặc trước `i` (-1 nếu chưa có).
1416
- * - `parent`: index group header cha của một header (multi-level grouping), -1 nếu là cấp gốc.
1417
- * Trả `null` khi tắt sticky hoặc không ở chế độ virtual + grouping.
1403
+ * Lookup data for sticky group headers in virtual scroll.
1404
+ * `nearest[i]` points to the closest preceding header; `parent` stores each header's parent.
1405
+ * Returns `null` when sticky grouping is inactive.
1418
1406
  */
1419
1407
  private readonly _stickyGroupHeaderMeta;
1420
- /** Chuỗi header (gốc → sâu nhất) cần ghim khi viewport bắt đầu tại `startIndex`. */
1408
+ /** Builds the root-to-leaf header chain for a virtual viewport start index. */
1421
1409
  private _buildStickyGroupChain;
1422
1410
  /**
1423
- * Trạng thái sticky group header theo virtual index:
1424
- * - `tops`: offset `top` (px) của từng header đang ghim; header cấp sâu hơn xếp chồng bên dưới
1425
- * header cha nên cộng dồn chiều cao.
1426
- * - `shadowIndex`: header cuối chuỗi mang shadow (giống pinned row), -1 khi chưa có row nào
1427
- * cuộn xuống dưới nó — lúc đó header vẫn ở đúng vị trí thật nên không cần shadow.
1411
+ * Returns sticky header offsets and the header that should receive the shadow.
1428
1412
  */
1429
1413
  protected readonly stickyGroupHeaderState: _angular_core.Signal<{
1430
1414
  shadowIndex: number;
@@ -1703,10 +1687,8 @@ declare class ZTableComponent<T> implements AfterViewInit {
1703
1687
  rowSortingFeature: _tanstack_angular_table.TableFeature;
1704
1688
  }, T & Record<string, unknown>>[]>;
1705
1689
  /**
1706
- * Id row ở hai biên của mỗi khối pinned, theo THỨ TỰ HIỂN THỊ (pinned bottom render ngược lại).
1707
- * Dùng signal thay cho `zTableRow` pipe: pipe là pure, chỉ chạy lại khi một tham số đổi reference.
1708
- * Khi ghim thêm/bớt row thì `row` và `table` giữ nguyên reference, nên row từng là biên vẫn giữ
1709
- * class cũ — pin bottom lộ rõ nhất vì shadow ở lại row cũ và row mới cũng có shadow.
1690
+ * Tracks the first and last visible row IDs in each pinned block.
1691
+ * Signals are used because the pure pipe does not rerun when pinning mutates existing references.
1710
1692
  */
1711
1693
  protected readonly firstTopPinnedRowId: _angular_core.Signal<string>;
1712
1694
  protected readonly lastTopPinnedRowId: _angular_core.Signal<string>;
@@ -1879,41 +1861,31 @@ declare class ZTableComponent<T> implements AfterViewInit {
1879
1861
  /** Virtualizer instance — operates on groups rather than individual rows */
1880
1862
  protected readonly virtualizer: _tanstack_angular_virtual.AngularVirtualizer<HTMLElement, Element>;
1881
1863
  /**
1882
- * Nhận diện group header đang ghim sau MỖI render, không chỉ khi scroll.
1883
- * Đổi virtual/non-virtual, đổi cột group hay pin/unpin row đều giữ nguyên scrollOffset nhưng dựng
1884
- * lại DOM và đổi đường sticky — nếu chỉ trông vào scroll handler thì header đang ghim sẽ thiếu
1885
- * class `z-group-row-stuck` cho tới lần cuộn kế tiếp, và bị data row đè trong khoảng đó.
1886
- * `_refreshStuckGroupRows` đọc `groupRowElements` + `stickyGroupTopByDepth` trước mọi early-return
1887
- * nên effect này tự chạy lại khi hai nguồn đó đổi (kể cả khi số đo tới muộn hơn một pass).
1864
+ * Detects stuck group headers after every render, not only after scrolling.
1865
+ * Layout and grouping changes can rebuild the DOM without changing scrollOffset.
1888
1866
  */
1889
1867
  private readonly _trackStuckGroupRows;
1890
1868
  /** Measures in the render `read` phase so corrected offsets land before paint, not a frame later. */
1891
1869
  private readonly _measureVirtualItems;
1892
1870
  private _stuckGroupRowsFrame;
1893
- /** Gom nhiều lần scroll trong cùng một frame — mỗi lần chạy đều đọc rect nên phải giới hạn tần suất. */
1871
+ /** Coalesces stuck-row refreshes so DOM measurements run at most once per frame. */
1894
1872
  private _scheduleStuckGroupRowsRefresh;
1895
1873
  private _cancelStuckGroupRowsRefresh;
1896
1874
  /**
1897
- * Tìm group header (non-virtual) đang ghim ở mép dưới cùng của chồng sticky để trao shadow.
1898
- * Header đã ghim có `rect.top` đúng bằng đường sticky của depth đó; header chưa tới thì lớn hơn.
1899
- * Ưu tiên đường sticky thấp nhất (multi-level: header con), tie thì lấy cái sau cùng trong DOM vì
1900
- * đó là cái đang nằm trên khi nhiều header chồng nhau.
1875
+ * Finds the lowest stuck non-virtual group header and assigns its shadow.
1876
+ * Prefer the lowest sticky offset, then the last matching DOM element.
1901
1877
  */
1902
1878
  private _refreshStuckGroupRows;
1903
- /** Đo các mốc mà `stickyGroupTopByDepth` cần (non-virtual): chiều cao group row và khối pinned top. */
1879
+ /** Measures the group-row and top-pinned heights used by non-virtual sticky offsets. */
1904
1880
  private _refreshStickyGroupMetrics;
1905
1881
  private _hasWarnedOverflowingFixedRows;
1906
1882
  /**
1907
- * Cảnh báo một lần mỗi bảng khi body row cao hơn `virtual.size`.
1908
- * CSS table layout coi `height` trên `<tr>`/`<td>` là min-height, nên nội dung cell không nén được
1909
- * (tag, button, nhiều dòng…) sẽ đẩy row vượt slot của virtualizer; row kế tiếp định vị tuyệt đối
1910
- * đúng theo `virtual.size` nên đè lên phần dôi ra — nhìn như mỗi row bị hụt mất vài px.
1911
- * Không tự sửa: chiều cao đúng phụ thuộc dữ liệu, chọn tăng `size` hay bật `dynamicSize` là của app.
1883
+ * Warns once when a body row exceeds the fixed virtual size.
1884
+ * CSS table layout treats row height as a minimum, so dense cell content can overflow its slot.
1912
1885
  */
1913
1886
  private _warnOnOverflowingFixedRows;
1914
1887
  private _dynamicEstimateSampleCount;
1915
- /** Averages the rows measured so far to estimate the ones not yet rendered.
1916
- * Tính lại theo bậc ~1.5x để tổng công việc là O(N) thay vì O(N²) khi cuộn hết danh sách dài. */
1888
+ /** Averages measured rows and refreshes at roughly 1.5x sample growth to keep work O(N). */
1917
1889
  private _refreshDynamicEstimate;
1918
1890
  private readonly _rowDragAutoScroll;
1919
1891
  private readonly _rowDragCellSelectionCleanup;
@@ -1964,7 +1936,7 @@ declare class ZTableComponent<T> implements AfterViewInit {
1964
1936
  private _scheduleFitColumnWidths;
1965
1937
  private _applyFitColumnWidths;
1966
1938
  private _setColumnSizingFromFit;
1967
- /** Cập nhật state sizing ngoài và atom của TanStack v9 đồng thời. */
1939
+ /** Updates the external sizing state and TanStack's state together. */
1968
1940
  private _setColumnSizingState;
1969
1941
  private _getColumnBaseSize;
1970
1942
  private _isSameColumnSizing;
@@ -1974,12 +1946,12 @@ declare class ZTableComponent<T> implements AfterViewInit {
1974
1946
  private _updateVerticalScrollShadowState;
1975
1947
  hasRightPinnedColumns(): boolean;
1976
1948
  onTbodyScroll(event: Event): void;
1977
- /** Chặn wheel trực tiếp trên header; header chỉ nhận scrollLeft từ body. */
1949
+ /** Prevent direct header wheel scrolling; the body owns horizontal scroll. */
1978
1950
  onTheadWheel(event: WheelEvent): void;
1979
1951
  private _syncScrollLeft;
1980
1952
  /**
1981
1953
  * @deprecated Header sort now lives in the column filter popover.
1982
- * Giữ tạm để các consumer/template cũ còn compile trong giai đoạn chuyển đổi.
1954
+ * Kept for compatibility with existing consumers and templates.
1983
1955
  */
1984
1956
  handleSort(event: Event, handler?: (event: unknown) => void): void;
1985
1957
  protected _handleDragDrop(event: ZTableDragDropData): void;
package/.npmignore DELETED
@@ -1,58 +0,0 @@
1
- # Nested package.json's are only needed for development.
2
- i18n/package.json
3
- pipes/package.json
4
- providers/package.json
5
- services/package.json
6
- utils/package.json
7
- components/z-accordion/package.json
8
- components/z-audio-player/package.json
9
- components/z-autocomplete/package.json
10
- components/z-avatar/package.json
11
- components/z-badge/package.json
12
- components/z-breadcrumb/package.json
13
- components/z-button/package.json
14
- components/z-button-group/package.json
15
- components/z-calendar/package.json
16
- components/z-card/package.json
17
- components/z-chat/package.json
18
- components/z-checkbox/package.json
19
- components/z-code/package.json
20
- components/z-command/package.json
21
- components/z-dropdown-menu/package.json
22
- components/z-drawer/package.json
23
- components/z-editor/package.json
24
- components/z-filter/package.json
25
- components/z-empty/package.json
26
- components/z-gallery/package.json
27
- components/z-hover-glide/package.json
28
- components/z-icon/package.json
29
- components/z-input/package.json
30
- components/z-kanban/package.json
31
- components/z-loading/package.json
32
- components/z-marquee/package.json
33
- components/z-media-player/package.json
34
- components/z-metric-card/package.json
35
- components/z-menu/package.json
36
- components/z-modal/package.json
37
- components/z-number-ticker/package.json
38
- components/z-pagination/package.json
39
- components/z-overlay/package.json
40
- components/z-qrcode/package.json
41
- components/z-popover/package.json
42
- components/z-radio/package.json
43
- components/z-scrollarea/package.json
44
- components/z-select/package.json
45
- components/z-show-more/package.json
46
- components/z-skeleton/package.json
47
- components/z-skeleton-auto/package.json
48
- components/z-steps/package.json
49
- components/z-switch/package.json
50
- components/z-table/package.json
51
- components/z-tabs/package.json
52
- components/z-tags/package.json
53
- components/z-timeline/package.json
54
- components/z-toast/package.json
55
- components/z-tooltip/package.json
56
- components/z-upload/package.json
57
- services/excel/package.json
58
- services/office/package.json