@shival99/z-ui 2.0.52 → 2.0.54
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/shival99-z-ui-components-z-autocomplete.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-popover.mjs +171 -41
- package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +22 -13
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +722 -19
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +12 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/package.json +1 -1
- package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
- package/types/shival99-z-ui-components-z-popover.d.ts +21 -3
- package/types/shival99-z-ui-components-z-select.d.ts +1 -0
- package/types/shival99-z-ui-components-z-table.d.ts +91 -4
|
@@ -531,6 +531,13 @@ interface ZTableBulkActionClickEvent<T = unknown> extends ZTableBulkActionContex
|
|
|
531
531
|
key: string;
|
|
532
532
|
action: ZTableBulkActionItem<T>;
|
|
533
533
|
}
|
|
534
|
+
interface ZTableCellSelectionOptions {
|
|
535
|
+
enabled?: boolean;
|
|
536
|
+
range?: boolean;
|
|
537
|
+
contextMenu?: boolean;
|
|
538
|
+
copyWithHeaders?: boolean;
|
|
539
|
+
}
|
|
540
|
+
type ZTableCellSelectionConfig = boolean | ZTableCellSelectionOptions;
|
|
534
541
|
type ZTableExcelExportScope = 'selected' | 'filtered' | 'all';
|
|
535
542
|
interface ZTableExcelExportContext<T = unknown> extends ZTableBulkActionContext<T> {
|
|
536
543
|
data: T[];
|
|
@@ -796,6 +803,8 @@ interface ZTableConfig<T> {
|
|
|
796
803
|
search?: ZTableSearchConfig | boolean;
|
|
797
804
|
/** Floating bulk action bar shown when rows are selected */
|
|
798
805
|
bulkAction?: ZTableBulkActionConfig<T> | boolean;
|
|
806
|
+
/** Bật chọn cell/range và copy giống spreadsheet. Mặc định bật. */
|
|
807
|
+
cellSelection?: ZTableCellSelectionConfig;
|
|
799
808
|
/** Bật menu chuột phải để chèn dòng khi bảng có cell editContent. */
|
|
800
809
|
enableContentRowInsert?: boolean;
|
|
801
810
|
enableRowPinning?: boolean;
|
|
@@ -904,9 +913,11 @@ declare class ZTableComponent<T> implements AfterViewInit {
|
|
|
904
913
|
private _bulkBarTimer;
|
|
905
914
|
private _contentRowMenuOutsideTimer;
|
|
906
915
|
private _contentRowMenuOutsideCleanup;
|
|
916
|
+
private _cellInteractionOutsideCleanup;
|
|
907
917
|
private readonly _activeColumnVisibilityPopover;
|
|
908
918
|
private _hasInitializedColumnPinning;
|
|
909
919
|
private _isFitColumnScheduled;
|
|
920
|
+
private _skipNextConfigSave;
|
|
910
921
|
/** Merged loading state from both zLoading input and config.loading */
|
|
911
922
|
protected readonly isLoading: _angular_core.Signal<boolean>;
|
|
912
923
|
/** True during debounced async state transitions (sort/filter processing) */
|
|
@@ -933,10 +944,30 @@ declare class ZTableComponent<T> implements AfterViewInit {
|
|
|
933
944
|
} | null>;
|
|
934
945
|
protected readonly contentRowMenu: _angular_core.WritableSignal<{
|
|
935
946
|
row: Row<T>;
|
|
947
|
+
columnId?: string;
|
|
948
|
+
left: number;
|
|
949
|
+
top: number;
|
|
950
|
+
} | null>;
|
|
951
|
+
protected readonly activeCell: _angular_core.WritableSignal<{
|
|
952
|
+
rowId: string;
|
|
953
|
+
columnId: string;
|
|
954
|
+
} | null>;
|
|
955
|
+
protected readonly cellSelectionAnchor: _angular_core.WritableSignal<{
|
|
956
|
+
rowId: string;
|
|
957
|
+
columnId: string;
|
|
958
|
+
} | null>;
|
|
959
|
+
protected readonly cellSelectionFocus: _angular_core.WritableSignal<{
|
|
960
|
+
rowId: string;
|
|
961
|
+
columnId: string;
|
|
962
|
+
} | null>;
|
|
963
|
+
protected readonly cellMenu: _angular_core.WritableSignal<{
|
|
964
|
+
rowId: string;
|
|
965
|
+
columnId: string;
|
|
936
966
|
left: number;
|
|
937
967
|
top: number;
|
|
938
968
|
} | null>;
|
|
939
969
|
protected readonly contentRowMenuControl: _angular_core.WritableSignal<ZPopoverControl | null>;
|
|
970
|
+
protected readonly cellMenuControl: _angular_core.WritableSignal<ZPopoverControl | null>;
|
|
940
971
|
protected readonly contentRowClipboard: _angular_core.WritableSignal<T[]>;
|
|
941
972
|
protected readonly columnSizingState: _angular_core.WritableSignal<ColumnSizingState>;
|
|
942
973
|
private readonly _columnBaseSizing;
|
|
@@ -1004,6 +1035,25 @@ declare class ZTableComponent<T> implements AfterViewInit {
|
|
|
1004
1035
|
protected readonly hasRowDragColumn: _angular_core.Signal<boolean>;
|
|
1005
1036
|
protected readonly hasContentEditableColumns: _angular_core.Signal<boolean>;
|
|
1006
1037
|
protected readonly canUseContentRowInsert: _angular_core.Signal<boolean>;
|
|
1038
|
+
protected readonly canUseRowSelection: _angular_core.Signal<boolean>;
|
|
1039
|
+
protected readonly cellSelectionOptions: _angular_core.Signal<Required<ZTableCellSelectionOptions>>;
|
|
1040
|
+
protected readonly canUseCellSelection: _angular_core.Signal<boolean>;
|
|
1041
|
+
protected readonly selectedCellIds: _angular_core.Signal<Set<string>>;
|
|
1042
|
+
protected readonly visualSelectedCellIds: _angular_core.Signal<Set<string>>;
|
|
1043
|
+
protected readonly hasMultipleSelectedCells: _angular_core.Signal<boolean>;
|
|
1044
|
+
protected readonly canCopyCellMenuSelection: _angular_core.Signal<boolean>;
|
|
1045
|
+
protected readonly selectedCellRangeInsets: _angular_core.Signal<Map<string, {
|
|
1046
|
+
top: number;
|
|
1047
|
+
right: number;
|
|
1048
|
+
bottom: number;
|
|
1049
|
+
left: number;
|
|
1050
|
+
}>>;
|
|
1051
|
+
protected readonly selectedCellEdgeIds: _angular_core.Signal<{
|
|
1052
|
+
top: Set<string>;
|
|
1053
|
+
right: Set<string>;
|
|
1054
|
+
bottom: Set<string>;
|
|
1055
|
+
left: Set<string>;
|
|
1056
|
+
}>;
|
|
1007
1057
|
protected readonly contentRowDeleteCount: _angular_core.Signal<number>;
|
|
1008
1058
|
protected readonly canMoveContentRowUp: _angular_core.Signal<boolean>;
|
|
1009
1059
|
protected readonly canMoveContentRowDown: _angular_core.Signal<boolean>;
|
|
@@ -1112,6 +1162,7 @@ declare class ZTableComponent<T> implements AfterViewInit {
|
|
|
1112
1162
|
protected readonly virtualizer: _shival99_angular_virtual.AngularVirtualizer<HTMLDivElement, Element>;
|
|
1113
1163
|
private readonly _measureVirtualItems;
|
|
1114
1164
|
private readonly _rowDragAutoScroll;
|
|
1165
|
+
private readonly _rowDragCellSelectionCleanup;
|
|
1115
1166
|
constructor();
|
|
1116
1167
|
ngAfterViewInit(): void;
|
|
1117
1168
|
/**
|
|
@@ -1146,6 +1197,7 @@ declare class ZTableComponent<T> implements AfterViewInit {
|
|
|
1146
1197
|
private _checkLastRowTouchesBottom;
|
|
1147
1198
|
private _getTbodyViewportElement;
|
|
1148
1199
|
private _handleColumnSizingChange;
|
|
1200
|
+
private _clampColumnSizing;
|
|
1149
1201
|
private _syncColumnBaseSizing;
|
|
1150
1202
|
private _scheduleFitColumnWidths;
|
|
1151
1203
|
private _applyFitColumnWidths;
|
|
@@ -1174,12 +1226,19 @@ declare class ZTableComponent<T> implements AfterViewInit {
|
|
|
1174
1226
|
toggleHeaderFooterShadow(): void;
|
|
1175
1227
|
onActionClick(event: ZTableActionClickEvent<T>): void;
|
|
1176
1228
|
protected setContentRowMenuControl(control: ZPopoverControl): void;
|
|
1229
|
+
protected setCellMenuControl(control: ZPopoverControl): void;
|
|
1230
|
+
protected clearCellMenu(): void;
|
|
1177
1231
|
protected clearContentRowMenu(): void;
|
|
1178
|
-
protected
|
|
1232
|
+
protected onCellPointerDown(event: PointerEvent, row: Row<T>, columnId: string): void;
|
|
1233
|
+
protected onCellPointerEnter(event: PointerEvent, row: Row<T>, columnId: string): void;
|
|
1234
|
+
protected openCellMenu(event: MouseEvent, row: Row<T>, columnId: string): void;
|
|
1235
|
+
protected openContentRowMenu(event: MouseEvent, row: Row<T>, columnId?: string): void;
|
|
1179
1236
|
protected insertContentRow(position: ZTableRowInsertPosition): void;
|
|
1180
1237
|
protected deleteContentRows(): void;
|
|
1181
1238
|
private _removeDeletedRowsFromSelection;
|
|
1182
1239
|
protected onContentTableKeydown(event: KeyboardEvent): void;
|
|
1240
|
+
protected copySelectedCells(includeHeaders: boolean): void;
|
|
1241
|
+
protected copyContentCell(): void;
|
|
1183
1242
|
protected copyContentRows(rowId?: string): void;
|
|
1184
1243
|
protected pasteContentRows(position: ZTableRowInsertPosition, rowId?: string): void;
|
|
1185
1244
|
protected moveContentRow(direction: ZTableRowMoveDirection): void;
|
|
@@ -1189,6 +1248,28 @@ declare class ZTableComponent<T> implements AfterViewInit {
|
|
|
1189
1248
|
private _getContentRowsForRowAction;
|
|
1190
1249
|
private _getContentRowActionTarget;
|
|
1191
1250
|
private _isEditableKeyboardTarget;
|
|
1251
|
+
private _isContentEditorTarget;
|
|
1252
|
+
private _getContentEditClipboardText;
|
|
1253
|
+
private _getSelectedTextFromEditor;
|
|
1254
|
+
protected isCellInSelectedRange(rowId: string, columnId: string): boolean;
|
|
1255
|
+
private _listenCellInteractionOutside;
|
|
1256
|
+
private _hasCellInteractionState;
|
|
1257
|
+
private _isInsideCellInteractionBoundary;
|
|
1258
|
+
private _clearCellInteractionState;
|
|
1259
|
+
private _getCellSelectionId;
|
|
1260
|
+
private _getSelectedCellRange;
|
|
1261
|
+
private _getSelectedCellVisualRects;
|
|
1262
|
+
private _getRenderedCellVisualRect;
|
|
1263
|
+
private _hasOutsideVisualNeighbor;
|
|
1264
|
+
private _getCellVisualSlotId;
|
|
1265
|
+
private _buildSelectedCellsText;
|
|
1266
|
+
private _getSelectableColumnIds;
|
|
1267
|
+
private _isSelectableCellColumn;
|
|
1268
|
+
private _isIgnoredCellSelectionTarget;
|
|
1269
|
+
private _isCellSelectionDragTarget;
|
|
1270
|
+
private _formatCellClipboardValue;
|
|
1271
|
+
private _getColumnCopyHeader;
|
|
1272
|
+
private _writeClipboardText;
|
|
1192
1273
|
private _getContentEditTriggerTarget;
|
|
1193
1274
|
private _clearContentEditCell;
|
|
1194
1275
|
private _listenContentRowMenuOutside;
|
|
@@ -1215,7 +1296,13 @@ declare class ZTableComponent<T> implements AfterViewInit {
|
|
|
1215
1296
|
hideActiveColumnVisibilityPopover(): void;
|
|
1216
1297
|
hideColumnPopoversOnOutsideClick(optionsPopover: ZPopoverDirective): void;
|
|
1217
1298
|
openSettingsDrawerFromColumnMenu(...popovers: ZPopoverDirective[]): void;
|
|
1299
|
+
autosizeColumn(columnId: string): void;
|
|
1300
|
+
autosizeAllColumns(): void;
|
|
1301
|
+
resetColumns(): void;
|
|
1218
1302
|
private _isColumnHiddenFromVisibilityMenu;
|
|
1303
|
+
private _setMeasuredColumnWidth;
|
|
1304
|
+
private _measureColumnContentWidth;
|
|
1305
|
+
private _defaultColumnPinning;
|
|
1219
1306
|
private _setColumnPinning;
|
|
1220
1307
|
private _areColumnIdListsEqual;
|
|
1221
1308
|
moveColumnLeft(columnId: string): void;
|
|
@@ -1263,7 +1350,7 @@ declare class ZTableFilterComponent<T> {
|
|
|
1263
1350
|
protected readonly sortOptions: _angular_core.Signal<ZSelectOption<string>[]>;
|
|
1264
1351
|
protected readonly draftFilters: _angular_core.WritableSignal<ZTableDraftFilterCondition[]>;
|
|
1265
1352
|
protected readonly draftLegacyFilterValue: _angular_core.WritableSignal<unknown>;
|
|
1266
|
-
protected readonly draftSortState: _angular_core.WritableSignal<false | "
|
|
1353
|
+
protected readonly draftSortState: _angular_core.WritableSignal<false | "asc" | "desc">;
|
|
1267
1354
|
protected readonly columnFilterValue: _angular_core.Signal<unknown>;
|
|
1268
1355
|
protected readonly effectiveFilterValue: _angular_core.Signal<unknown>;
|
|
1269
1356
|
protected readonly sortState: _angular_core.Signal<false | _tanstack_angular_table.SortDirection>;
|
|
@@ -1285,7 +1372,7 @@ declare class ZTableFilterComponent<T> {
|
|
|
1285
1372
|
protected readonly filterBadgeCount: _angular_core.Signal<number>;
|
|
1286
1373
|
protected readonly hasFilterValue: _angular_core.Signal<boolean>;
|
|
1287
1374
|
protected readonly isActive: _angular_core.Signal<boolean>;
|
|
1288
|
-
protected readonly draftSortValue: _angular_core.Signal<"
|
|
1375
|
+
protected readonly draftSortValue: _angular_core.Signal<"asc" | "desc" | "none">;
|
|
1289
1376
|
protected readonly rangeMinValue: _angular_core.Signal<any>;
|
|
1290
1377
|
protected readonly rangeMaxValue: _angular_core.Signal<any>;
|
|
1291
1378
|
protected readonly dateValue: _angular_core.Signal<Date | null>;
|
|
@@ -1353,7 +1440,7 @@ declare class ZTableActionsComponent<T = unknown> {
|
|
|
1353
1440
|
readonly zConfig: _angular_core.InputSignal<ZTableActionColumnConfig<T>>;
|
|
1354
1441
|
readonly zRow: _angular_core.InputSignal<T>;
|
|
1355
1442
|
readonly zRowId: _angular_core.InputSignal<string>;
|
|
1356
|
-
readonly zDropdownButtonSize: _angular_core.InputSignal<"
|
|
1443
|
+
readonly zDropdownButtonSize: _angular_core.InputSignal<"default" | "sm" | "lg" | "xs" | "xl" | null | undefined>;
|
|
1357
1444
|
readonly zActionClick: _angular_core.OutputEmitterRef<ZTableActionClickEvent<T>>;
|
|
1358
1445
|
protected readonly allActions: _angular_core.Signal<ZTableActionItem<T>[]>;
|
|
1359
1446
|
protected readonly shouldShowAsButtons: _angular_core.Signal<boolean>;
|