@moda-grid/vue2 1.0.3 → 2.0.0

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.
@@ -0,0 +1,29 @@
1
+ import type { PropType } from "vue";
2
+ import type { Grid } from "@moda-grid/core";
3
+ /**
4
+ * 기본 테이블 렌더러 (Vue 2.7 render API).
5
+ * Vue 2의 h()는 attrs/on을 분리해서 받는다 — Vue 3용 컴포넌트와
6
+ * 데이터 객체 형태가 다르므로 주의.
7
+ */
8
+ export declare const DataGrid: import("vue").DefineComponent<{
9
+ grid: {
10
+ type: PropType<Grid<any>>;
11
+ required: true;
12
+ };
13
+ selectable: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ }, () => import("vue").VNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
18
+ grid: {
19
+ type: PropType<Grid<any>>;
20
+ required: true;
21
+ };
22
+ selectable: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ }>>, {
27
+ selectable: boolean;
28
+ }>;
29
+ //# sourceMappingURL=DataGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../src/DataGrid.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5C;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;cAIC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;;;;;;;;cAAnB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;;;;;;;;EAgHvC,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { defineComponent, h, onBeforeUnmount, shallowRef } from "vue";
2
+ const SORT_ARROWS = { asc: "▲", desc: "▼" };
3
+ /**
4
+ * 기본 테이블 렌더러 (Vue 2.7 render API).
5
+ * Vue 2의 h()는 attrs/on을 분리해서 받는다 — Vue 3용 컴포넌트와
6
+ * 데이터 객체 형태가 다르므로 주의.
7
+ */
8
+ export const DataGrid = defineComponent({
9
+ name: "MyGridDataGrid",
10
+ props: {
11
+ grid: {
12
+ type: Object,
13
+ required: true,
14
+ },
15
+ selectable: {
16
+ type: Boolean,
17
+ default: true,
18
+ },
19
+ },
20
+ setup(props) {
21
+ const state = shallowRef(props.grid.getSnapshot());
22
+ const unsubscribe = props.grid.subscribe(() => {
23
+ state.value = props.grid.getSnapshot();
24
+ });
25
+ onBeforeUnmount(unsubscribe);
26
+ return () => {
27
+ const { visibleColumns, rows, sort, selectedRowIds, filters } = state.value;
28
+ const grid = props.grid;
29
+ const hasFilterRow = visibleColumns.some((c) => c.filterable);
30
+ return h("table", { class: "mg-table" }, [
31
+ h("thead", [
32
+ h("tr", visibleColumns.map((col) => h("th", {
33
+ key: col.field,
34
+ style: col.width ? { width: `${col.width}px` } : undefined,
35
+ class: col.sortable === false ? undefined : "mg-sortable",
36
+ attrs: {
37
+ "aria-sort": sort?.field === col.field
38
+ ? sort.direction === "asc"
39
+ ? "ascending"
40
+ : "descending"
41
+ : "none",
42
+ },
43
+ on: { click: () => grid.toggleSort(col.field) },
44
+ }, [
45
+ col.header ?? col.field,
46
+ sort?.field === col.field
47
+ ? h("span", { class: "mg-sort-arrow" }, SORT_ARROWS[sort.direction])
48
+ : null,
49
+ ]))),
50
+ hasFilterRow
51
+ ? h("tr", { class: "mg-filter-row" }, visibleColumns.map((col) => h("th", { key: col.field }, [
52
+ col.filterable
53
+ ? h("input", {
54
+ class: "mg-filter-input",
55
+ domProps: { value: filters[col.field] ?? "" },
56
+ attrs: {
57
+ placeholder: `${col.header ?? col.field} 필터`,
58
+ },
59
+ on: {
60
+ input: (e) => grid.setFilter(col.field, e.target.value),
61
+ },
62
+ })
63
+ : null,
64
+ ])))
65
+ : null,
66
+ ]),
67
+ h("tbody", rows.length === 0
68
+ ? [
69
+ h("tr", [
70
+ h("td", {
71
+ class: "mg-empty",
72
+ attrs: { colspan: visibleColumns.length || 1 },
73
+ }, "No rows"),
74
+ ]),
75
+ ]
76
+ : rows.map((row) => {
77
+ const id = grid.getRowId(row);
78
+ return h("tr", {
79
+ key: id,
80
+ class: selectedRowIds.has(id) ? "mg-selected" : undefined,
81
+ on: {
82
+ click: () => props.selectable && grid.toggleRowSelection(id),
83
+ },
84
+ }, visibleColumns.map((col) => h("td", { key: col.field }, grid.getCellText(row, col))));
85
+ })),
86
+ ]);
87
+ };
88
+ },
89
+ });
90
+ //# sourceMappingURL=DataGrid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataGrid.js","sourceRoot":"","sources":["../src/DataGrid.ts"],"names":[],"mappings":"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"}
package/dist/DataGrid.vue CHANGED
@@ -4,6 +4,7 @@ import {
4
4
  nextTick,
5
5
  onBeforeUnmount,
6
6
  onMounted,
7
+ onUpdated,
7
8
  ref,
8
9
  useSlots,
9
10
  watch,
@@ -11,6 +12,11 @@ import {
11
12
  } from "vue";
12
13
  import type { CSSProperties, PropType } from "vue";
13
14
  import {
15
+ applyEditMask,
16
+ applyRowFlip,
17
+ buildColumnFilter,
18
+ buildColumnWindow,
19
+ captureRowTops,
14
20
  createLongPressTracker,
15
21
  createTouchDrag,
16
22
  DEFAULT_COLUMN_WIDTH,
@@ -20,6 +26,7 @@ import {
20
26
  formatAggregate,
21
27
  gridThemeClasses,
22
28
  gridThemeVars,
29
+ logicalToDomScrollLeft,
23
30
  } from "@moda-grid/core";
24
31
  import type {
25
32
  AggregateFn,
@@ -34,6 +41,7 @@ import type {
34
41
  ColumnDef,
35
42
  ColumnFilter,
36
43
  DisplayRow,
44
+ FilterBuilderInput,
37
45
  FilterOperator,
38
46
  Grid,
39
47
  GridDensity,
@@ -90,6 +98,21 @@ const props = defineProps({
90
98
  rowHeight: { type: Number, default: undefined },
91
99
  /** 가상 스크롤: overscan 행 수 */
92
100
  overscan: { type: Number, default: undefined },
101
+ /**
102
+ * 컬럼 가상화 — 뷰포트(+overscan) 밖 컬럼을 `td.mg-col-spacer`로 대체.
103
+ * pinned 컬럼은 항상 렌더. 멀티레벨 헤더(headerGroups) 조합은 미지원.
104
+ */
105
+ virtualColumns: {
106
+ type: [Boolean, Object] as PropType<GridOptions<RowData>["virtualColumns"]>,
107
+ default: undefined,
108
+ },
109
+ /** 다른 그리드에서 드래그한 행을 드롭으로 받는다 (이동 시맨틱) */
110
+ rowDragAcceptExternal: { type: Boolean, default: undefined },
111
+ /** 텍스트 방향 — "rtl"이면 루트 dir 속성 + 내비/핀/스크롤 좌표 반전 */
112
+ dir: {
113
+ type: String as PropType<GridOptions<RowData>["dir"]>,
114
+ default: undefined,
115
+ },
93
116
  /** 헤더 리사이저 핸들 표시 */
94
117
  resizable: { type: Boolean, default: true },
95
118
  /** 헤더 드래그로 컬럼 순서 변경 허용 */
@@ -196,6 +219,16 @@ const props = defineProps({
196
219
  type: Function as PropType<GridOptions<RowData>["beforeCopy"]>,
197
220
  default: undefined,
198
221
  },
222
+ /**
223
+ * 전체 너비 행 판정 — true인 행은 컬럼 대신 단일 셀(colspan)로
224
+ * 렌더링된다. 내용은 `#fullwidth="{ row, rowIndex }"` 슬롯으로 채운다.
225
+ */
226
+ isFullWidthRow: {
227
+ type: Function as PropType<GridOptions<RowData>["isFullWidthRow"]>,
228
+ default: undefined,
229
+ },
230
+ /** 행 이동 트랜지션 — 정렬/필터 시 위치 전이 (animateRows 대응) */
231
+ animateRows: { type: Boolean, default: undefined },
199
232
  /** 레이아웃 모드 — "autoHeight"면 내용만큼 늘어남 (내부 스크롤·가상 스크롤 무시) */
200
233
  domLayout: {
201
234
  type: String as PropType<"normal" | "autoHeight">,
@@ -255,6 +288,7 @@ const internal = props.grid
255
288
  postSort: props.postSort,
256
289
  beforePaste: props.beforePaste,
257
290
  beforeCopy: props.beforeCopy,
291
+ isFullWidthRow: props.isFullWidthRow,
258
292
  virtualScroll:
259
293
  props.domLayout !== "autoHeight" &&
260
294
  props.height != null &&
@@ -266,6 +300,9 @@ const internal = props.grid
266
300
  overscan: props.overscan,
267
301
  }
268
302
  : undefined,
303
+ virtualColumns: props.virtualColumns,
304
+ rowDragAcceptExternal: props.rowDragAcceptExternal,
305
+ dir: props.dir,
269
306
  });
270
307
  const grid = props.grid ?? internal!.grid;
271
308
  const state = props.grid ? useGridState(grid).state : internal!.state;
@@ -326,6 +363,15 @@ watchEffect(() => {
326
363
  grid.setVirtualScroll(null);
327
364
  }
328
365
  });
366
+ watchEffect(() => {
367
+ grid.setVirtualColumns(props.virtualColumns ?? null);
368
+ });
369
+ watchEffect(() => {
370
+ grid.setRowDragAcceptExternal(props.rowDragAcceptExternal ?? null);
371
+ });
372
+ watchEffect(() => {
373
+ grid.setDir(props.dir ?? null);
374
+ });
329
375
  watchEffect(() => {
330
376
  if (props.selectionMode) grid.setSelectionMode(props.selectionMode);
331
377
  });
@@ -345,6 +391,8 @@ watchEffect(() => {
345
391
  grid.setPostSort(props.postSort ?? null);
346
392
  grid.setBeforePaste(props.beforePaste ?? null);
347
393
  grid.setBeforeCopy(props.beforeCopy ?? null);
394
+ grid.setIsFullWidthRow(props.isFullWidthRow ?? null);
395
+ grid.setAnimateRows(props.animateRows ?? false);
348
396
  // 외부 grid prop 경로에서도 컨텍스트 메뉴 prop이 적용되도록
349
397
  // 런타임 setter로 동기화한다
350
398
  grid.setContextMenu(props.contextMenu ?? null);
@@ -362,8 +410,55 @@ watchEffect(() => {
362
410
  if (v && el && el.scrollTop !== v.scrollTop) el.scrollTop = v.scrollTop;
363
411
  });
364
412
 
413
+ // 컬럼 가상화: 코어가 보정한 scrollLeft를 DOM에 동기화한다
414
+ // (ensureColumnVisible/scrollToColumn 경로). 사용자 스크롤은 같은 값이라 no-op.
415
+ watchEffect(() => {
416
+ const vc = state.value.virtualCols;
417
+ const el = scrollEl.value;
418
+ // 스냅샷의 scrollLeft는 논리 좌표 — RTL에서는 DOM 음수 규약으로 변환
419
+ if (vc && el) {
420
+ const domLeft = logicalToDomScrollLeft(
421
+ vc.scrollLeft,
422
+ state.value.dir === "rtl",
423
+ );
424
+ if (el.scrollLeft !== domLeft) el.scrollLeft = domLeft;
425
+ }
426
+ });
427
+
428
+ // 컬럼 가상화 뷰포트 측정 — 스크롤 컨테이너 폭과 보조 셀(상태/체크/행번호)
429
+ // 너비 합을 코어에 보고한다. 마운트 시 1회 + 리사이즈마다 갱신.
430
+ let colViewObs: ResizeObserver | null = null;
431
+ onMounted(() => {
432
+ const el = scrollEl.value;
433
+ if (!el) return;
434
+ const lead =
435
+ (props.rowStatus ? 40 : 0) +
436
+ (props.rowCheckboxes ? 36 : 0) +
437
+ (props.rowNumbers ? 40 : 0);
438
+ const sync = () => grid.setColumnViewport(el.clientWidth, lead);
439
+ nextTick(sync);
440
+ if (typeof ResizeObserver !== "undefined") {
441
+ colViewObs = new ResizeObserver(sync);
442
+ colViewObs.observe(el);
443
+ }
444
+ });
445
+ onBeforeUnmount(() => colViewObs?.disconnect());
446
+
365
447
  // 비가상 스크롤: scrollToRow 요청을 scrollIntoView로 처리 (seq로 호출 구분)
366
448
  const hostEl = ref<HTMLElement | null>(null);
449
+ // animateRows — 행 키(getRowId)→직전 offsetTop 맵. DOM 갱신 후(mounted/
450
+ // updated) 위치가 바뀐 행에만 FLIP 트랜지션을 건다
451
+ const tbodyEl = ref<HTMLElement | null>(null);
452
+ let prevRowTops = new Map<string, number>();
453
+ const flipRows = () => {
454
+ const tbody = tbodyEl.value;
455
+ if (!tbody) return;
456
+ const prev = prevRowTops;
457
+ prevRowTops = captureRowTops(tbody);
458
+ if (grid.isRowAnimationEnabled()) applyRowFlip(tbody, prev);
459
+ };
460
+ onMounted(flipRows);
461
+ onUpdated(flipRows);
367
462
  watch(
368
463
  () => state.value.scrollRequest?.seq,
369
464
  async () => {
@@ -499,24 +594,72 @@ const filterDropActive = computed(() =>
499
594
  ? state.value.filters[filterDropCol.value.field]?.values
500
595
  : undefined,
501
596
  );
597
+ // ── 필터 빌더 상태: 조건식(연산자+값)과 값 체크리스트를 분리해 다룬다 ──
598
+ // 레거시 {operator:"set", values}는 "조건 없음 + 체크리스트"로 읽는다
599
+ const filterDropType = computed(
600
+ () => filterDropCol.value?.filterType ?? "text",
601
+ );
602
+ const filterDropBuilder = computed<FilterBuilderInput>(() => {
603
+ const col = filterDropCol.value;
604
+ if (!col)
605
+ return {
606
+ operator: "contains",
607
+ value: "",
608
+ values: null,
609
+ join: "and" as const,
610
+ };
611
+ const cur = state.value.filters[col.field];
612
+ const condOn = cur != null && cur.operator !== "set";
613
+ return {
614
+ operator: condOn
615
+ ? cur.operator
616
+ : DEFAULT_OPERATOR_BY_TYPE[filterDropType.value],
617
+ value: condOn ? (cur.value ?? "") : "",
618
+ valueTo: cur?.valueTo ?? "",
619
+ values: cur?.values ?? null,
620
+ join: cur?.join === "or" ? "or" : "and",
621
+ };
622
+ });
623
+ const filterDropOps = computed(() =>
624
+ FILTER_OPERATORS_BY_TYPE[filterDropType.value].filter((o) => o !== "set"),
625
+ );
626
+ /** 빌더 패치를 현재 모델과 병합 — 조건/체크리스트 한쪽만 바뀌어도 다른 쪽 유지 */
627
+ function applyFilterBuilder(patch: Partial<FilterBuilderInput>) {
628
+ const col = filterDropCol.value;
629
+ if (!col) return;
630
+ grid.setFilter(
631
+ col.field,
632
+ buildColumnFilter({ ...filterDropBuilder.value, ...patch }),
633
+ );
634
+ }
635
+ function onFilterCondValue(e: Event) {
636
+ applyFilterBuilder({ value: (e.target as HTMLInputElement).value });
637
+ }
638
+ function onFilterCondValueTo(e: Event) {
639
+ applyFilterBuilder({ valueTo: (e.target as HTMLInputElement).value });
640
+ }
641
+ function onFilterCondOp(e: Event) {
642
+ applyFilterBuilder({
643
+ operator: (e.target as HTMLSelectElement).value as FilterOperator,
644
+ });
645
+ }
646
+ function onFilterJoin(e: Event) {
647
+ const v = (e.target as HTMLInputElement).value;
648
+ if (v === "and" || v === "or") applyFilterBuilder({ join: v });
649
+ }
502
650
  function filterDropChecked(v: string) {
503
651
  const active = filterDropActive.value;
504
652
  return active ? active.includes(v) : true;
505
653
  }
506
654
  function toggleFilterValue(v: string) {
507
- const col = filterDropCol.value;
508
- if (!col) return;
509
655
  const all = filterDropAll.value;
510
656
  const next = new Set(filterDropActive.value ?? all);
511
657
  if (next.has(v)) next.delete(v);
512
658
  else next.add(v);
513
- if (next.size >= all.length) grid.setFilter(col.field, null);
514
- else
515
- grid.setFilter(col.field, {
516
- operator: "set",
517
- value: "",
518
- values: [...next],
519
- });
659
+ // 전부 체크면 체크리스트 비활성(null) — 조건식만 남는다
660
+ applyFilterBuilder({
661
+ values: next.size >= all.length ? null : [...next],
662
+ });
520
663
  }
521
664
  function onFilterDropKeydown(e: KeyboardEvent) {
522
665
  e.stopPropagation();
@@ -751,9 +894,30 @@ const hasPinned = computed(
751
894
  );
752
895
  const hasAppend = computed(() => !!state.value.appendScroll);
753
896
 
897
+ // ── 컬럼 가상화 — 윈도우 밖 연속 구간을 spacer 셀로 대체 ──
898
+ // buildColumnWindow를 5개 렌더러가 공유해 DOM 계약(td.mg-col-spacer)이
899
+ // 일치한다. 멀티레벨 헤더(headerGroups)는 그룹 colSpan과 윈도우 경계가
900
+ // 교차해 정렬이 깨지므로 그 경우 전체 컬럼 렌더로 폴백한다.
901
+ const colVirtualOn = computed(() => state.value.virtualCols != null);
902
+ const renderCols = computed(() =>
903
+ buildColumnWindow(
904
+ state.value.visibleColumns,
905
+ state.value.headerGroups ? null : state.value.virtualCols,
906
+ ).map((it) => ({
907
+ kind: it.kind,
908
+ // spacer 아이템에도 col 슬롯을 두어 v-for 디스트럭처가 안전하다 —
909
+ // v-else-if="col" 가드로 좁혀져 본문은 col을 그대로 쓴다
910
+ col: it.kind === "col" ? it.col : null,
911
+ index: it.index,
912
+ count: it.kind === "spacer" ? it.count : 0,
913
+ })),
914
+ );
915
+
754
916
  function pinStyleOf(col: ColumnDef<RowT>): CSSProperties | undefined {
755
917
  if (!col.pinned) return undefined;
756
- const side = col.pinned === "left" ? "left" : "right";
918
+ // 논리 인셋 — pinned:"left"는 inline-start라 dir="rtl"이면 우측에 붙는다
919
+ const side =
920
+ col.pinned === "left" ? "inset-inline-start" : "inset-inline-end";
757
921
  return {
758
922
  position: "sticky",
759
923
  width: `${col.width ?? DEFAULT_COLUMN_WIDTH}px`,
@@ -793,7 +957,7 @@ function onColumnToggle(field: string, event: Event) {
793
957
 
794
958
  function onScroll(event: Event) {
795
959
  const el = event.target as HTMLElement;
796
- grid.handleScroll(el.scrollTop);
960
+ grid.handleScroll(el.scrollTop, el.scrollLeft);
797
961
  grid.maybeLoadMore(el.scrollTop, el.clientHeight, el.scrollHeight);
798
962
  }
799
963
 
@@ -1187,6 +1351,7 @@ function onSetToggle(
1187
1351
  // ── 컬럼 그룹 헤더 (다단계 헤더) ──
1188
1352
  type HeaderCell =
1189
1353
  | { kind: "group"; key: string; header: string; colSpan: number }
1354
+ | { kind: "spacer"; key: string; colSpan: number }
1190
1355
  | {
1191
1356
  kind: "col";
1192
1357
  key: string;
@@ -1207,13 +1372,23 @@ const headerRows = computed<HeaderCell[][]>(() => {
1207
1372
  const spans = state.value.headerGroups;
1208
1373
  const cols = state.value.visibleColumns;
1209
1374
  if (!spans) {
1375
+ // 컬럼 가상화 — tbody와 동일 윈도우를 헤더에도 적용한다
1376
+ // (spans가 있으면 멀티레벨 헤더 → 위에서 전체 렌더 폴백)
1210
1377
  return [
1211
- cols.map((col, colIndex) => ({
1212
- kind: "col" as const,
1213
- key: col.field,
1214
- col,
1215
- colIndex,
1216
- })),
1378
+ buildColumnWindow(cols, state.value.virtualCols).map((it) =>
1379
+ it.kind === "spacer"
1380
+ ? {
1381
+ kind: "spacer" as const,
1382
+ key: `csp-${it.index}`,
1383
+ colSpan: it.count,
1384
+ }
1385
+ : {
1386
+ kind: "col" as const,
1387
+ key: it.col.field,
1388
+ col: it.col,
1389
+ colIndex: it.index,
1390
+ },
1391
+ ),
1217
1392
  ];
1218
1393
  }
1219
1394
  const row1: HeaderCell[] = spans.map((s) =>
@@ -1358,13 +1533,15 @@ const rowDraggable = computed(
1358
1533
  state.value.groupBy.length === 0,
1359
1534
  );
1360
1535
  const rowCount = computed(() => state.value.rows.length);
1361
- // 자기 자신 위/바로 아래 갭은 제자리 드롭 — 인디케이터를 숨긴다
1536
+ // 자기 자신 위/바로 아래 갭은 제자리 드롭 — 인디케이터를 숨긴다.
1537
+ // 외부 수신(external)은 이 그리드에 드래그 행이 없으므로(draggingIndex는
1538
+ // 센티널 -1) 모든 갭이 유효 — 억제 규칙을 적용하면 갭 0이 -1+1과 충돌한다
1362
1539
  const dropGap = computed(() => {
1363
1540
  const rd = state.value.rowDrag;
1364
1541
  if (!rd || rd.dropIndex == null) return null;
1365
1542
  if (
1366
- rd.dropIndex === rd.draggingIndex ||
1367
- rd.dropIndex === rd.draggingIndex + 1
1543
+ !rd.external &&
1544
+ (rd.dropIndex === rd.draggingIndex || rd.dropIndex === rd.draggingIndex + 1)
1368
1545
  )
1369
1546
  return null;
1370
1547
  return rd.dropIndex;
@@ -1439,7 +1616,9 @@ function onRowDragStart(rowIndex: number, event: DragEvent) {
1439
1616
  }
1440
1617
 
1441
1618
  function onRowDragOver(rowIndex: number, event: DragEvent) {
1442
- if (!state.value.rowDrag) return;
1619
+ // 자체 드래그가 없어도 다른 그리드의 드래그 세션은 수락한다
1620
+ // (rowDragAcceptExternal)
1621
+ if (!state.value.rowDrag && !grid.canAcceptExternalRowDrop()) return;
1443
1622
  event.preventDefault();
1444
1623
  if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
1445
1624
  const rect = (event.currentTarget as HTMLElement).getBoundingClientRect();
@@ -1449,7 +1628,7 @@ function onRowDragOver(rowIndex: number, event: DragEvent) {
1449
1628
  }
1450
1629
 
1451
1630
  function onRowDrop(event: DragEvent) {
1452
- if (!state.value.rowDrag) return;
1631
+ if (!state.value.rowDrag && !grid.canAcceptExternalRowDrop()) return;
1453
1632
  event.preventDefault();
1454
1633
  grid.endRowDrag(true);
1455
1634
  }
@@ -1533,10 +1712,17 @@ function onGridKeydown(event: KeyboardEvent) {
1533
1712
  grid.navigateCell("bottom", event.shiftKey);
1534
1713
  } else if (event.key === "ArrowLeft") {
1535
1714
  event.preventDefault();
1536
- grid.navigateCell("home", event.shiftKey);
1715
+ // Ctrl+←는 시각적 왼쪽 가장자리 — RTL에서는 논리적으로 마지막 컬럼
1716
+ grid.navigateCell(
1717
+ state.value.dir === "rtl" ? "end" : "home",
1718
+ event.shiftKey,
1719
+ );
1537
1720
  } else if (event.key === "ArrowRight") {
1538
1721
  event.preventDefault();
1539
- grid.navigateCell("end", event.shiftKey);
1722
+ grid.navigateCell(
1723
+ state.value.dir === "rtl" ? "home" : "end",
1724
+ event.shiftKey,
1725
+ );
1540
1726
  } else if (event.key === " ") {
1541
1727
  event.preventDefault();
1542
1728
  grid.selectEntireColumn(); // 엑셀 Ctrl+Space — 열 선택
@@ -1637,6 +1823,13 @@ function leafExpanded(entry: AnyRow): boolean {
1637
1823
  return leafOf(entry)?.expanded === true;
1638
1824
  }
1639
1825
 
1826
+ /** 전체 너비 행 판정 — leaf 행만 검사 (스켈레톤·그룹 행 제외) */
1827
+ function isFullWidthOf(entry: AnyRow, rowIdx: number): boolean {
1828
+ const row = rowDataOf(entry);
1829
+ if (row == null) return false;
1830
+ return grid.isFullWidthRow(row, entryIndexOf(entry, rowIdx));
1831
+ }
1832
+
1640
1833
  function entryIndexOf(entry: AnyRow, rowIdx: number) {
1641
1834
  const l = leafOf(entry);
1642
1835
  if (l) return l.rowIndex;
@@ -1756,10 +1949,22 @@ function editorInputType(col: ColumnDef) {
1756
1949
  }
1757
1950
 
1758
1951
  function onEditorInput(event: Event, col: ColumnDef) {
1759
- grid.updateEditValue(
1760
- (event.target as HTMLInputElement | HTMLSelectElement).value,
1761
- col.field,
1762
- );
1952
+ const el = event.target as HTMLInputElement | HTMLSelectElement;
1953
+ // 입력 마스크 — text 에디터에서 타이핑마다 패턴 자동 포맷
1954
+ if (col.editMask && el instanceof HTMLInputElement && el.type === "text") {
1955
+ const next = applyEditMask(el.value, col.editMask);
1956
+ if (next !== el.value) {
1957
+ el.value = next;
1958
+ el.setSelectionRange(next.length, next.length);
1959
+ }
1960
+ }
1961
+ grid.updateEditValue(el.value, col.field);
1962
+ }
1963
+
1964
+ // text 에디터 표시 값 — editMask가 있으면 기존 저장값도 마스크 형태로 표시
1965
+ function editorMaskedValue(col: ColumnDef): string {
1966
+ const s = editorInputValue(editValueOf(col));
1967
+ return col.editMask ? applyEditMask(s, col.editMask) : s;
1763
1968
  }
1764
1969
 
1765
1970
  // multiselect 에디터 — 선택된 옵션들을 배열로 저장
@@ -1867,6 +2072,7 @@ watch(
1867
2072
  <template>
1868
2073
  <div
1869
2074
  ref="hostEl"
2075
+ :dir="state.dir"
1870
2076
  :class="[
1871
2077
  showOverlay ? 'mg-colctl-host' : undefined,
1872
2078
  ...themeClasses,
@@ -1938,14 +2144,65 @@ watch(
1938
2144
  :aria-label="`${filterDropCol.header || filterDropCol.field} 필터`"
1939
2145
  @keydown="onFilterDropKeydown"
1940
2146
  >
2147
+ <!-- 조건 섹션: 연산자 + 비교 값 (+ inRange 상한). set 전용 컬럼은 생략 -->
2148
+ <template v-if="filterDropType !== 'set'">
2149
+ <div class="mg-filter-cond">
2150
+ <select
2151
+ class="mg-filter-cond-op"
2152
+ :value="filterDropBuilder.operator"
2153
+ @change="onFilterCondOp"
2154
+ >
2155
+ <option v-for="op in filterDropOps" :key="op" :value="op">
2156
+ {{ FILTER_OPERATOR_LABELS[op] }}
2157
+ </option>
2158
+ </select>
2159
+ <input
2160
+ class="mg-filter-cond-val"
2161
+ :type="filterDropType === 'text' ? 'text' : filterDropType"
2162
+ :value="filterDropBuilder.value"
2163
+ :placeholder="
2164
+ state.locale.filterPlaceholder(
2165
+ filterDropCol.header || filterDropCol.field,
2166
+ )
2167
+ "
2168
+ @change="onFilterCondValue"
2169
+ />
2170
+ <input
2171
+ v-if="filterDropBuilder.operator === 'inRange'"
2172
+ class="mg-filter-cond-val mg-filter-to"
2173
+ :type="filterDropType === 'text' ? 'text' : filterDropType"
2174
+ :value="filterDropBuilder.valueTo"
2175
+ :placeholder="state.locale.rangeEndPlaceholder"
2176
+ @change="onFilterCondValueTo"
2177
+ />
2178
+ </div>
2179
+ <!-- 결합 토글: 조건식 ↔ 체크리스트를 AND/OR로 묶는다 -->
2180
+ <div class="mg-filter-join">
2181
+ <label
2182
+ v-for="mode in ['and', 'or']"
2183
+ :key="mode"
2184
+ class="mg-filter-join-opt"
2185
+ >
2186
+ <input
2187
+ type="radio"
2188
+ class="mg-filter-join-radio"
2189
+ :name="`mg-join-${filterDropCol.field}`"
2190
+ :value="mode"
2191
+ :checked="filterDropBuilder.join === mode"
2192
+ @change="onFilterJoin"
2193
+ />
2194
+ {{
2195
+ mode === "and" ? state.locale.filterAnd : state.locale.filterOr
2196
+ }}
2197
+ </label>
2198
+ </div>
2199
+ </template>
2200
+ <!-- 값 체크리스트 — 조건식과 독립 상태 (전체 체크 = 비활성) -->
1941
2201
  <label class="mg-colctl-item">
1942
2202
  <input
1943
2203
  type="checkbox"
1944
- :checked="
1945
- !filterDropActive ||
1946
- filterDropActive.length >= filterDropAll.length
1947
- "
1948
- @change="grid.setFilter(filterDropCol.field, null)"
2204
+ :checked="filterDropBuilder.values == null"
2205
+ @change="applyFilterBuilder({ values: null })"
1949
2206
  />
1950
2207
  {{ state.locale.setFilterAll }}
1951
2208
  </label>
@@ -2089,14 +2346,21 @@ watch(
2089
2346
  <div
2090
2347
  ref="scrollEl"
2091
2348
  :class="{
2092
- 'mg-scroll': (virtual || hasPinned || hasAppend) && !autoHeight,
2349
+ // 컬럼 가상화는 가로 스크롤 컨테이너가 필요 — autoHeight에서도 유지
2350
+ 'mg-scroll':
2351
+ ((virtual || hasPinned || hasAppend) && !autoHeight) || colVirtualOn,
2093
2352
  }"
2094
2353
  :style="
2095
2354
  autoHeight
2096
- ? undefined
2355
+ ? colVirtualOn
2356
+ ? // autoHeight는 세로 스크롤 해제 — 가로만 유지한다.
2357
+ // overflow-y를 명시하지 않으면 stylesheet의 overflow:auto가
2358
+ // y축을 되살린다
2359
+ { overflowX: 'auto', overflowY: 'visible' }
2360
+ : undefined
2097
2361
  : virtual || (hasAppend && height)
2098
2362
  ? { height: `${height}px`, overflow: 'auto' }
2099
- : hasPinned || hasAppend
2363
+ : hasPinned || hasAppend || colVirtualOn
2100
2364
  ? { overflowX: 'auto', overflowY: height ? undefined : 'auto' }
2101
2365
  : undefined
2102
2366
  "
@@ -2161,6 +2425,12 @@ watch(
2161
2425
  >
2162
2426
  {{ cell.header }}
2163
2427
  </th>
2428
+ <th
2429
+ v-else-if="cell.kind === 'spacer'"
2430
+ :key="cell.key"
2431
+ class="mg-col-spacer"
2432
+ :colspan="cell.colSpan"
2433
+ ></th>
2164
2434
  <th
2165
2435
  v-else
2166
2436
  :key="cell.key"
@@ -2258,77 +2528,92 @@ watch(
2258
2528
  <th v-if="rowStatus" class="mg-status-cell" />
2259
2529
  <th v-if="rowCheckboxes" class="mg-check-cell" />
2260
2530
  <th v-if="rowNumbers" class="mg-rownum-cell" />
2261
- <th
2262
- v-for="(col, colIndex) in state.visibleColumns"
2263
- :key="col.field"
2264
- :class="{
2265
- 'mg-pinned': !!col.pinned,
2266
- 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2267
- 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2268
- }"
2269
- :style="pinStyleOf(col)"
2531
+ <!-- 컬럼 가상화 — tbody와 동일 윈도우. spacer는 colSpan 단일 셀 -->
2532
+ <template
2533
+ v-for="{ kind, col, index: colIndex, count } in renderCols"
2270
2534
  >
2271
- <div v-if="col.filterable" class="mg-filter-cell">
2272
- <details v-if="isSetFilter(col)" class="mg-setfilter">
2273
- <summary>{{ setFilterLabel(col) }}</summary>
2274
- <div class="mg-setfilter-panel">
2275
- <label class="mg-setfilter-item">
2276
- <input
2277
- type="checkbox"
2278
- :checked="setAllCheckedOf(col)"
2279
- @change="grid.setFilter(col.field, null)"
2280
- />
2281
- {{ state.locale.setFilterAll }}
2282
- </label>
2283
- <label
2284
- v-for="v in setValuesOf(col)"
2285
- :key="v"
2286
- class="mg-setfilter-item"
2287
- >
2288
- <input
2289
- type="checkbox"
2290
- :checked="setCheckedOf(col, v)"
2291
- @change="onSetToggle(col, v, $event)"
2292
- />
2293
- {{ v }}
2294
- </label>
2295
- </div>
2296
- </details>
2297
- <template v-else>
2298
- <select
2299
- class="mg-filter-op"
2300
- :value="filterOpOf(col)"
2301
- @change="onFilterOpChange(col, $event)"
2302
- >
2303
- <option
2304
- v-for="op in filterOpsOf(col)"
2305
- :key="op"
2306
- :value="op"
2535
+ <th
2536
+ v-if="kind === 'spacer'"
2537
+ :key="`csp-${colIndex}`"
2538
+ class="mg-col-spacer"
2539
+ :colspan="count"
2540
+ ></th>
2541
+ <th
2542
+ v-else
2543
+ :key="col.field"
2544
+ :class="{
2545
+ 'mg-pinned': !!col.pinned,
2546
+ 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2547
+ 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2548
+ }"
2549
+ :style="pinStyleOf(col)"
2550
+ >
2551
+ <div v-if="col.filterable" class="mg-filter-cell">
2552
+ <details v-if="isSetFilter(col)" class="mg-setfilter">
2553
+ <summary>{{ setFilterLabel(col) }}</summary>
2554
+ <div class="mg-setfilter-panel">
2555
+ <label class="mg-setfilter-item">
2556
+ <input
2557
+ type="checkbox"
2558
+ :checked="setAllCheckedOf(col)"
2559
+ @change="grid.setFilter(col.field, null)"
2560
+ />
2561
+ {{ state.locale.setFilterAll }}
2562
+ </label>
2563
+ <label
2564
+ v-for="v in setValuesOf(col)"
2565
+ :key="v"
2566
+ class="mg-setfilter-item"
2567
+ >
2568
+ <input
2569
+ type="checkbox"
2570
+ :checked="setCheckedOf(col, v)"
2571
+ @change="onSetToggle(col, v, $event)"
2572
+ />
2573
+ {{ v }}
2574
+ </label>
2575
+ </div>
2576
+ </details>
2577
+ <template v-else>
2578
+ <select
2579
+ class="mg-filter-op"
2580
+ :value="filterOpOf(col)"
2581
+ @change="onFilterOpChange(col, $event)"
2307
2582
  >
2308
- {{ FILTER_OPERATOR_LABELS[op] }}
2309
- </option>
2310
- </select>
2311
- <input
2312
- class="mg-filter-input"
2313
- :type="filterInputType(col)"
2314
- :value="filterValueOf(col, 'value')"
2315
- :placeholder="`${col.header || col.field} 필터`"
2316
- @input="onFilterInput(col, 'value', $event)"
2317
- />
2318
- <input
2319
- v-if="filterOpOf(col) === 'inRange'"
2320
- class="mg-filter-input mg-filter-to"
2321
- :type="filterInputType(col)"
2322
- :value="filterValueOf(col, 'valueTo')"
2323
- :placeholder="state.locale.rangeEndPlaceholder"
2324
- @input="onFilterInput(col, 'valueTo', $event)"
2325
- />
2326
- </template>
2327
- </div>
2328
- </th>
2583
+ <option
2584
+ v-for="op in filterOpsOf(col)"
2585
+ :key="op"
2586
+ :value="op"
2587
+ >
2588
+ {{ FILTER_OPERATOR_LABELS[op] }}
2589
+ </option>
2590
+ </select>
2591
+ <input
2592
+ class="mg-filter-input"
2593
+ :type="filterInputType(col)"
2594
+ :value="filterValueOf(col, 'value')"
2595
+ :placeholder="`${col.header || col.field} 필터`"
2596
+ @input="onFilterInput(col, 'value', $event)"
2597
+ />
2598
+ <input
2599
+ v-if="filterOpOf(col) === 'inRange'"
2600
+ class="mg-filter-input mg-filter-to"
2601
+ :type="filterInputType(col)"
2602
+ :value="filterValueOf(col, 'valueTo')"
2603
+ :placeholder="state.locale.rangeEndPlaceholder"
2604
+ @input="onFilterInput(col, 'valueTo', $event)"
2605
+ />
2606
+ </template>
2607
+ </div>
2608
+ </th>
2609
+ </template>
2329
2610
  </tr>
2330
2611
  </thead>
2331
- <tbody role="rowgroup">
2612
+ <tbody
2613
+ role="rowgroup"
2614
+ ref="tbodyEl"
2615
+ :class="{ 'mg-animate-rows': grid.isRowAnimationEnabled() }"
2616
+ >
2332
2617
  <tr
2333
2618
  v-for="(prow, pIdx) in state.pinnedTopRows"
2334
2619
  :key="`pin-top-${pIdx}`"
@@ -2337,18 +2622,28 @@ watch(
2337
2622
  <td v-if="rowStatus" class="mg-status-cell" />
2338
2623
  <td v-if="rowCheckboxes" class="mg-check-cell" />
2339
2624
  <td v-if="rowNumbers" class="mg-rownum-cell" />
2340
- <td
2341
- v-for="(col, colIndex) in state.visibleColumns"
2342
- :key="col.field"
2343
- :class="{
2344
- 'mg-pinned': !!col.pinned,
2345
- 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2346
- 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2347
- }"
2348
- :style="pinStyleOf(col)"
2625
+ <template
2626
+ v-for="{ kind, col, index: colIndex, count } in renderCols"
2349
2627
  >
2350
- {{ grid.getCellText(prow, col) }}
2351
- </td>
2628
+ <td
2629
+ v-if="kind === 'spacer'"
2630
+ :key="`csp-${colIndex}`"
2631
+ class="mg-col-spacer"
2632
+ :colspan="count"
2633
+ />
2634
+ <td
2635
+ v-else
2636
+ :key="col.field"
2637
+ :class="{
2638
+ 'mg-pinned': !!col.pinned,
2639
+ 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2640
+ 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2641
+ }"
2642
+ :style="pinStyleOf(col)"
2643
+ >
2644
+ {{ grid.getCellText(prow, col) }}
2645
+ </td>
2646
+ </template>
2352
2647
  </tr>
2353
2648
  <tr
2354
2649
  v-if="virtual && virtual.startOffset > 0"
@@ -2376,34 +2671,44 @@ watch(
2376
2671
  <td v-if="rowStatus" class="mg-status-cell" />
2377
2672
  <td v-if="rowCheckboxes" class="mg-check-cell" />
2378
2673
  <td v-if="rowNumbers" class="mg-rownum-cell" />
2379
- <td
2380
- v-for="(col, colIndex) in state.visibleColumns"
2381
- :key="col.field"
2382
- class="mg-group-cell"
2383
- :class="{
2384
- 'mg-pinned': !!col.pinned,
2385
- 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2386
- 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2387
- }"
2388
- :style="pinStyleOf(col)"
2674
+ <template
2675
+ v-for="{ kind, col, index: colIndex, count } in renderCols"
2389
2676
  >
2390
- <span
2391
- v-if="colIndex === 0"
2392
- class="mg-group-label"
2393
- :style="{ paddingLeft: `${groupOf(entry).depth * 16}px` }"
2677
+ <td
2678
+ v-if="kind === 'spacer'"
2679
+ :key="`csp-${colIndex}`"
2680
+ class="mg-col-spacer"
2681
+ :colspan="count"
2682
+ />
2683
+ <td
2684
+ v-else
2685
+ :key="col.field"
2686
+ class="mg-group-cell"
2687
+ :class="{
2688
+ 'mg-pinned': !!col.pinned,
2689
+ 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2690
+ 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2691
+ }"
2692
+ :style="pinStyleOf(col)"
2394
2693
  >
2395
- <span class="mg-group-toggle">
2396
- {{ groupOf(entry).expanded ? "▾" : "▸" }}
2397
- </span>
2398
- <strong>{{ groupLabelOf(entry) }}</strong>
2399
- <span class="mg-group-count"
2400
- >({{ groupOf(entry).rowCount }})</span
2694
+ <span
2695
+ v-if="colIndex === 0"
2696
+ class="mg-group-label"
2697
+ :style="{ paddingLeft: `${groupOf(entry).depth * 16}px` }"
2401
2698
  >
2402
- </span>
2403
- <span v-else-if="groupAggOf(entry, col)" class="mg-agg">
2404
- {{ groupAggOf(entry, col) }}
2405
- </span>
2406
- </td>
2699
+ <span class="mg-group-toggle">
2700
+ {{ groupOf(entry).expanded ? "▾" : "▸" }}
2701
+ </span>
2702
+ <strong>{{ groupLabelOf(entry) }}</strong>
2703
+ <span class="mg-group-count"
2704
+ >({{ groupOf(entry).rowCount }})</span
2705
+ >
2706
+ </span>
2707
+ <span v-else-if="groupAggOf(entry, col)" class="mg-agg">
2708
+ {{ groupAggOf(entry, col) }}
2709
+ </span>
2710
+ </td>
2711
+ </template>
2407
2712
  </tr>
2408
2713
  <!-- 그룹 소계 행 -->
2409
2714
  <tr
@@ -2414,28 +2719,38 @@ watch(
2414
2719
  <td v-if="rowStatus" class="mg-status-cell" />
2415
2720
  <td v-if="rowCheckboxes" class="mg-check-cell" />
2416
2721
  <td v-if="rowNumbers" class="mg-rownum-cell" />
2417
- <td
2418
- v-for="(col, colIndex) in state.visibleColumns"
2419
- :key="col.field"
2420
- class="mg-subtotal-cell"
2421
- :class="{
2422
- 'mg-pinned': !!col.pinned,
2423
- 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2424
- 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2425
- }"
2426
- :style="pinStyleOf(col)"
2722
+ <template
2723
+ v-for="{ kind, col, index: colIndex, count } in renderCols"
2427
2724
  >
2428
- <span
2429
- v-if="colIndex === 0"
2430
- class="mg-subtotal-label"
2431
- :style="{ paddingLeft: `${groupOf(entry).depth * 16}px` }"
2725
+ <td
2726
+ v-if="kind === 'spacer'"
2727
+ :key="`csp-${colIndex}`"
2728
+ class="mg-col-spacer"
2729
+ :colspan="count"
2730
+ />
2731
+ <td
2732
+ v-else
2733
+ :key="col.field"
2734
+ class="mg-subtotal-cell"
2735
+ :class="{
2736
+ 'mg-pinned': !!col.pinned,
2737
+ 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2738
+ 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2739
+ }"
2740
+ :style="pinStyleOf(col)"
2432
2741
  >
2433
- {{ state.locale.subtotalLabel }}: {{ groupLabelOf(entry) }}
2434
- </span>
2435
- <span v-else-if="groupAggOf(entry, col)" class="mg-agg">
2436
- {{ groupAggOf(entry, col) }}
2437
- </span>
2438
- </td>
2742
+ <span
2743
+ v-if="colIndex === 0"
2744
+ class="mg-subtotal-label"
2745
+ :style="{ paddingLeft: `${groupOf(entry).depth * 16}px` }"
2746
+ >
2747
+ {{ state.locale.subtotalLabel }}: {{ groupLabelOf(entry) }}
2748
+ </span>
2749
+ <span v-else-if="groupAggOf(entry, col)" class="mg-agg">
2750
+ {{ groupAggOf(entry, col) }}
2751
+ </span>
2752
+ </td>
2753
+ </template>
2439
2754
  </tr>
2440
2755
  <!-- 서버 사이드 미로드 행 → 스켈레톤 -->
2441
2756
  <tr
@@ -2447,17 +2762,42 @@ watch(
2447
2762
  <td v-if="rowStatus" class="mg-status-cell" />
2448
2763
  <td v-if="rowCheckboxes" class="mg-check-cell" />
2449
2764
  <td v-if="rowNumbers" class="mg-rownum-cell" />
2450
- <td
2451
- v-for="(col, colIndex) in state.visibleColumns"
2452
- :key="col.field"
2453
- :class="{
2454
- 'mg-pinned': !!col.pinned,
2455
- 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2456
- 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2457
- }"
2458
- :style="pinStyleOf(col)"
2765
+ <template
2766
+ v-for="{ kind, col, index: colIndex, count } in renderCols"
2459
2767
  >
2460
- <span class="mg-skeleton-bar" />
2768
+ <td
2769
+ v-if="kind === 'spacer'"
2770
+ :key="`csp-${colIndex}`"
2771
+ class="mg-col-spacer"
2772
+ :colspan="count"
2773
+ />
2774
+ <td
2775
+ v-else
2776
+ :key="col.field"
2777
+ :class="{
2778
+ 'mg-pinned': !!col.pinned,
2779
+ 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2780
+ 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2781
+ }"
2782
+ :style="pinStyleOf(col)"
2783
+ >
2784
+ <span class="mg-skeleton-bar" />
2785
+ </td>
2786
+ </template>
2787
+ </tr>
2788
+ <!-- 전체 너비 행 (fullWidth) — 컬럼 대신 단일 셀 -->
2789
+ <tr
2790
+ v-else-if="isFullWidthOf(entry, rowIdx)"
2791
+ :key="rowKeyOf(entry, rowIdx)"
2792
+ class="mg-fullwidth-row"
2793
+ :data-mg-key="grid.getRowId(rowDataOf(entry))"
2794
+ >
2795
+ <td class="mg-fullwidth-cell" :colspan="colSpan">
2796
+ <slot
2797
+ name="fullwidth"
2798
+ :row="rowDataOf(entry)"
2799
+ :row-index="entryIndexOf(entry, rowIdx)"
2800
+ />
2461
2801
  </td>
2462
2802
  </tr>
2463
2803
  <!-- 리프(데이터) 행 -->
@@ -2465,6 +2805,7 @@ watch(
2465
2805
  v-else
2466
2806
  :key="rowKeyOf(entry, rowIdx)"
2467
2807
  role="row"
2808
+ :data-mg-key="grid.getRowId(rowDataOf(entry))"
2468
2809
  :aria-selected="
2469
2810
  state.selectedRowIds.has(grid.getRowId(rowDataOf(entry)))
2470
2811
  "
@@ -2515,9 +2856,17 @@ watch(
2515
2856
  "
2516
2857
  />
2517
2858
  </td>
2518
- <template v-for="(col, colIndex) in state.visibleColumns">
2859
+ <template
2860
+ v-for="{ kind, col, index: colIndex, count } in renderCols"
2861
+ >
2862
+ <td
2863
+ v-if="kind === 'spacer'"
2864
+ :key="`csp-${colIndex}`"
2865
+ class="mg-col-spacer"
2866
+ :colspan="count"
2867
+ />
2519
2868
  <td
2520
- v-if="!cellSpanOf(rowDataOf(entry), col).hidden"
2869
+ v-else-if="!cellSpanOf(rowDataOf(entry), col).hidden"
2521
2870
  :key="col.field"
2522
2871
  :rowspan="cellSpanOf(rowDataOf(entry), col).rowSpan"
2523
2872
  :colspan="cellSpanOf(rowDataOf(entry), col).colSpan"
@@ -2765,7 +3114,11 @@ watch(
2765
3114
  :type="editorInputType(col)"
2766
3115
  class="mg-editor"
2767
3116
  :class="{ 'mg-editor-error': editErrorOf(col) }"
2768
- :value="editorInputValue(editValueOf(col))"
3117
+ :value="
3118
+ editorInputType(col) === 'text'
3119
+ ? editorMaskedValue(col)
3120
+ : editorInputValue(editValueOf(col))
3121
+ "
2769
3122
  :list="
2770
3123
  editorInputType(col) === 'text' &&
2771
3124
  editorOptionsOf(col, rowDataOf(entry)).length
@@ -2921,18 +3274,28 @@ watch(
2921
3274
  <td v-if="rowStatus" class="mg-status-cell" />
2922
3275
  <td v-if="rowCheckboxes" class="mg-check-cell" />
2923
3276
  <td v-if="rowNumbers" class="mg-rownum-cell" />
2924
- <td
2925
- v-for="(col, colIndex) in state.visibleColumns"
2926
- :key="col.field"
2927
- :class="{
2928
- 'mg-pinned': !!col.pinned,
2929
- 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2930
- 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2931
- }"
2932
- :style="pinStyleOf(col)"
3277
+ <template
3278
+ v-for="{ kind, col, index: colIndex, count } in renderCols"
2933
3279
  >
2934
- {{ grid.getCellText(prow, col) }}
2935
- </td>
3280
+ <td
3281
+ v-if="kind === 'spacer'"
3282
+ :key="`csp-${colIndex}`"
3283
+ class="mg-col-spacer"
3284
+ :colspan="count"
3285
+ />
3286
+ <td
3287
+ v-else
3288
+ :key="col.field"
3289
+ :class="{
3290
+ 'mg-pinned': !!col.pinned,
3291
+ 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
3292
+ 'mg-pin-right-edge': colIndex === firstRightPinIdx,
3293
+ }"
3294
+ :style="pinStyleOf(col)"
3295
+ >
3296
+ {{ grid.getCellText(prow, col) }}
3297
+ </td>
3298
+ </template>
2936
3299
  </tr>
2937
3300
  <tr
2938
3301
  v-if="
@@ -2961,26 +3324,38 @@ watch(
2961
3324
  <td v-if="rowStatus" class="mg-status-cell" />
2962
3325
  <td v-if="rowCheckboxes" class="mg-check-cell" />
2963
3326
  <td v-if="rowNumbers" class="mg-rownum-cell" />
2964
- <td
2965
- v-for="(col, colIndex) in state.visibleColumns"
2966
- :key="col.field"
2967
- :class="{
2968
- 'mg-pinned': !!col.pinned,
2969
- 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
2970
- 'mg-pin-right-edge': colIndex === firstRightPinIdx,
2971
- }"
2972
- :style="pinStyleOf(col)"
3327
+ <template
3328
+ v-for="{ kind, col, index: colIndex, count } in renderCols"
2973
3329
  >
2974
- <span
2975
- v-if="col.aggregationFn && state.grandTotals[col.field] != null"
2976
- class="mg-agg"
3330
+ <td
3331
+ v-if="kind === 'spacer'"
3332
+ :key="`csp-${colIndex}`"
3333
+ class="mg-col-spacer"
3334
+ :colspan="count"
3335
+ />
3336
+ <td
3337
+ v-else
3338
+ :key="col.field"
3339
+ :class="{
3340
+ 'mg-pinned': !!col.pinned,
3341
+ 'mg-pin-left-edge': colIndex === lastLeftPinIdx,
3342
+ 'mg-pin-right-edge': colIndex === firstRightPinIdx,
3343
+ }"
3344
+ :style="pinStyleOf(col)"
2977
3345
  >
2978
- {{ formatAggregate(state.grandTotals[col.field]) }}
2979
- </span>
2980
- <template v-else-if="colIndex === 0">{{
2981
- state.locale.totalLabel
2982
- }}</template>
2983
- </td>
3346
+ <span
3347
+ v-if="
3348
+ col.aggregationFn && state.grandTotals[col.field] != null
3349
+ "
3350
+ class="mg-agg"
3351
+ >
3352
+ {{ formatAggregate(state.grandTotals[col.field]) }}
3353
+ </span>
3354
+ <template v-else-if="colIndex === 0">{{
3355
+ state.locale.totalLabel
3356
+ }}</template>
3357
+ </td>
3358
+ </template>
2984
3359
  </tr>
2985
3360
  </tfoot>
2986
3361
  </table>
@@ -1,5 +1,5 @@
1
1
  import Vue from "vue";
2
- import { runGridConformance } from "@moda-grid/core/conformance";
2
+ import { conformanceGroupSource, runGridConformance, } from "@moda-grid/core/conformance";
3
3
  import DataGrid from "./DataGrid.vue";
4
4
  // Vue 2.7 렌더러 — new Vue + $mount 마운트, nextTick으로 DOM 반영 대기.
5
5
  runGridConformance("vue2", async (opts) => {
@@ -9,7 +9,22 @@ runGridConformance("vue2", async (opts) => {
9
9
  const inner = document.createElement("div");
10
10
  el.appendChild(inner);
11
11
  const vm = new Vue({
12
- render: (h) => h(DataGrid, { props: opts }),
12
+ render: (h) => h(DataGrid, {
13
+ props: {
14
+ ...opts,
15
+ // 서버 그룹화 계약 — 그룹 행 소스 + 준비 시점 groupBy 적용
16
+ serverSide: opts.serverGrouping
17
+ ? { dataSource: conformanceGroupSource(), cacheBlockSize: 10 }
18
+ : undefined,
19
+ onReady: opts.serverGrouping
20
+ ? (g) => g.setGroupBy(["name"])
21
+ : undefined,
22
+ },
23
+ // 스펙의 fullWidthContent를 Vue2 렌더 계약(#fullwidth 슬롯)으로 변환
24
+ scopedSlots: opts.fullWidthContent != null
25
+ ? { fullwidth: () => opts.fullWidthContent }
26
+ : {},
27
+ }),
13
28
  });
14
29
  vm.$mount(inner);
15
30
  await Vue.nextTick();
@@ -1 +1 @@
1
- {"version":3,"file":"conformance.test.js","sourceRoot":"","sources":["../src/conformance.test.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,4DAA4D;AAC5D,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IACxC,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAC9B,4CAA4C;IAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5C,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACtB,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC;QACjB,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;KAC5C,CAAC,CAAC;IACH,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjB,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC;IACrB,OAAO;QACL,EAAE;QACF,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE;QAC3B,OAAO,EAAE,GAAG,EAAE;YACZ,EAAE,CAAC,QAAQ,EAAE,CAAC;YACd,0CAA0C;YAC1C,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;YAChB,EAAE,CAAC,MAAM,EAAE,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"conformance.test.js","sourceRoot":"","sources":["../src/conformance.test.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EACL,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,4DAA4D;AAC5D,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IACxC,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAC9B,4CAA4C;IAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5C,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACtB,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC;QACjB,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CACZ,CAAC,CAAC,QAAQ,EAAE;YACV,KAAK,EAAE;gBACL,GAAG,IAAI;gBACP,yCAAyC;gBACzC,UAAU,EAAE,IAAI,CAAC,cAAc;oBAC7B,CAAC,CAAC,EAAE,UAAU,EAAE,sBAAsB,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE;oBAC9D,CAAC,CAAC,SAAS;gBACb,OAAO,EAAE,IAAI,CAAC,cAAc;oBAC1B,CAAC,CAAC,CAAC,CAAwC,EAAE,EAAE,CAC3C,CAAC,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;oBAC1B,CAAC,CAAC,SAAS;aACd;YACD,uDAAuD;YACvD,WAAW,EACT,IAAI,CAAC,gBAAgB,IAAI,IAAI;gBAC3B,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAiB,EAAE;gBAC7C,CAAC,CAAC,EAAE;SACT,CAAC;KACL,CAAC,CAAC;IACH,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjB,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC;IACrB,OAAO;QACL,EAAE;QACF,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE;QAC3B,OAAO,EAAE,GAAG,EAAE;YACZ,EAAE,CAAC,QAAQ,EAAE,CAAC;YACd,0CAA0C;YAC1C,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;YAChB,EAAE,CAAC,MAAM,EAAE,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export { useGrid, useGridState } from "./useGrid.js";
2
2
  export type { UseGridReturn } from "./useGrid.js";
3
3
  export { default as DataGrid } from "./DataGrid.vue";
4
4
  export type { Grid, GridSnapshot, ColumnDef, GridOptions, RowData, SortState, VirtualScrollState, } from "@moda-grid/core";
5
- export { matchFilterValue } from "@moda-grid/core";
5
+ export { buildPivot, matchFilterValue } from "@moda-grid/core";
6
6
  export { defaultContextMenuItems, defaultHeaderContextMenuItems, DEFAULT_LOCALE, enLocale, gridThemePresets, } from "@moda-grid/core";
7
- export type { ServerSideDataSource, ServerSideGetRowsParams, ServerSideGetRowsResult, ServerSideOptions, ServerSideState, TreeDataOptions, CellClassParams, ClassSource, RowClassParams, AggregateFn, AggregateParams, BuiltInAggregateFn, GridDensity, GridTheme, GridThemeOverrides, } from "@moda-grid/core";
7
+ export type { ServerSideDataSource, ServerSideGetRowsParams, ServerSideGetRowsResult, ServerSideGroupRow, ServerSideOptions, ServerSidePivotModel, PivotOptions, PivotValueDef, ServerSideState, TreeDataOptions, CellClassParams, ClassSource, RowClassParams, AggregateFn, AggregateParams, BuiltInAggregateFn, GridDensity, GridTheme, GridThemeOverrides, } from "@moda-grid/core";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EACV,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,WAAW,EACX,OAAO,EACP,SAAS,EACT,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,cAAc,EACd,QAAQ,EACR,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,WAAW,EACX,cAAc,EACd,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,kBAAkB,GACnB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EACV,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,WAAW,EACX,OAAO,EACP,SAAS,EACT,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,cAAc,EACd,QAAQ,EACR,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,WAAW,EACX,cAAc,EACd,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,kBAAkB,GACnB,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { useGrid, useGridState } from "./useGrid.js";
2
2
  export { default as DataGrid } from "./DataGrid.vue";
3
3
  // 서버 사이드 데이터 모델 (무한 스크롤/스켈레톤)
4
- export { matchFilterValue } from "@moda-grid/core";
4
+ export { buildPivot, matchFilterValue } from "@moda-grid/core";
5
5
  export { defaultContextMenuItems, defaultHeaderContextMenuItems, DEFAULT_LOCALE, enLocale, gridThemePresets, } from "@moda-grid/core";
6
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAWrD,8BAA8B;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,cAAc,EACd,QAAQ,EACR,gBAAgB,GACjB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAWrD,8BAA8B;AAC9B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,cAAc,EACd,QAAQ,EACR,gBAAgB,GACjB,MAAM,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda-grid/vue2",
3
- "version": "1.0.3",
3
+ "version": "2.0.0",
4
4
  "description": "Vue 2.7 adapter for @moda-grid — DataGrid SFC and useGrid composable",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,7 +36,7 @@
36
36
  "grid"
37
37
  ],
38
38
  "dependencies": {
39
- "@moda-grid/core": "1.0.3"
39
+ "@moda-grid/core": "2.0.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "vue": "^2.7.0"