@owp/core 2.5.12 → 2.5.14

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 (45) hide show
  1. package/dist/_virtual/index11.js +2 -2
  2. package/dist/_virtual/index13.js +2 -2
  3. package/dist/_virtual/index14.js +2 -2
  4. package/dist/_virtual/index15.js +2 -2
  5. package/dist/_virtual/index16.js +4 -4
  6. package/dist/_virtual/index17.js +4 -4
  7. package/dist/_virtual/index18.js +4 -4
  8. package/dist/_virtual/index19.js +4 -4
  9. package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js +78 -0
  10. package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js.map +1 -0
  11. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +79 -77
  12. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  13. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +105 -103
  14. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  15. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +214 -188
  16. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  17. package/dist/index.js +68 -65
  18. package/dist/index.js.map +1 -1
  19. package/dist/layout/components/toggles/NavigationSearchToggle.js +3 -3
  20. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  21. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/index.js +1 -1
  22. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
  23. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
  24. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
  25. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  26. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  29. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
  30. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
  31. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
  32. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
  33. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
  34. package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
  35. package/dist/types/components/OwpCommonCode/OwpCommonCodeQuerySelector.d.ts +32 -0
  36. package/dist/types/components/OwpCommonCode/index.d.ts +2 -0
  37. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +2 -1
  38. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +2 -1
  39. package/dist/types/utils/treeGridUtil.d.ts +23 -0
  40. package/dist/utils/treeGridExportExcelUtil.js +118 -118
  41. package/dist/utils/treeGridExportExcelUtil.js.map +1 -1
  42. package/dist/utils/treeGridUtil.js +123 -103
  43. package/dist/utils/treeGridUtil.js.map +1 -1
  44. package/dist/utils.js +81 -75
  45. package/package.json +1 -1
@@ -18,6 +18,7 @@ export type TreeGridEventBindingOptions<T> = Pick<OwpTreeGridProps<T>, 'id'> & {
18
18
  latestEventHandlersRef: RefObject<TreeGridEventHandlers<T>>;
19
19
  highlightEditableCellsRef: RefObject<boolean>;
20
20
  highlightChangedCellsRef: RefObject<boolean>;
21
+ syncDeletedRowCanEditRef: RefObject<boolean>;
21
22
  editableCellBackgroundColorValueRef: RefObject<number | undefined>;
22
23
  changedCellBackgroundColorRef: RefObject<string>;
23
24
  selectedCellBackgroundColorRef: RefObject<string>;
@@ -85,5 +86,5 @@ export declare const replaceTreeGridBodyData: <T>(grid: TGrid, bodyData: OwpTree
85
86
  * TreeGrid 이벤트 바인딩
86
87
  * @param options 이벤트 바인딩 옵션
87
88
  */
88
- export declare const bindTreeGridEvents: <T>({ id, latestEventHandlersRef, highlightEditableCellsRef, highlightChangedCellsRef, editableCellBackgroundColorValueRef, changedCellBackgroundColorRef, selectedCellBackgroundColorRef, hoverCellBackgroundColorRef, treeGridInstanceRef, treeGridInitStartedAtRef, latestLayoutOverridesRef, appliedLayoutOverridesRef, appliedBodyDataPropRef, latestColumnEditRulesRef, latestColumnEditRuleLookupRef, appliedColumnEditRulesRef, columnEditRulesStateRef, hasAppliedInitialLayoutRef, syncHasDisplayDataRows, setIsTreeGridReady, }: TreeGridEventBindingOptions<T>) => void;
89
+ export declare const bindTreeGridEvents: <T>({ id, latestEventHandlersRef, highlightEditableCellsRef, highlightChangedCellsRef, syncDeletedRowCanEditRef, editableCellBackgroundColorValueRef, changedCellBackgroundColorRef, selectedCellBackgroundColorRef, hoverCellBackgroundColorRef, treeGridInstanceRef, treeGridInitStartedAtRef, latestLayoutOverridesRef, appliedLayoutOverridesRef, appliedBodyDataPropRef, latestColumnEditRulesRef, latestColumnEditRuleLookupRef, appliedColumnEditRulesRef, columnEditRulesStateRef, hasAppliedInitialLayoutRef, syncHasDisplayDataRows, setIsTreeGridReady, }: TreeGridEventBindingOptions<T>) => void;
89
90
  export {};
@@ -17,6 +17,29 @@ type TreeGridHighlightTargetOption = {
17
17
  col: string;
18
18
  backgroundColor?: string;
19
19
  };
20
+ export declare const TREEGRID_ADDED_ROW_BY_ID_FLAG = "__owpAddedByAddTreeGridRowById";
21
+ export declare const TREEGRID_ADDED_ROW_HIGHLIGHT_COLUMNS_KEY = "__owpAddedRowHighlightColumns";
22
+ /**
23
+ * addTreeGridRowById 생성 행 마킹
24
+ * @param row 대상 행
25
+ */
26
+ export declare const markTreeGridRowAddedById: (row: TRow | null | undefined) => void;
27
+ /**
28
+ * addTreeGridRowById 생성 행 여부
29
+ * @param row 대상 행
30
+ */
31
+ export declare const isTreeGridRowAddedById: (row: TRow | null | undefined) => boolean;
32
+ /**
33
+ * addTreeGridRowById 생성 행 하이라이트 컬럼 누적
34
+ * @param row 대상 행
35
+ * @param col 대상 컬럼
36
+ */
37
+ export declare const appendTreeGridAddedRowHighlightColumn: (row: TRow | null | undefined, col: string) => void;
38
+ /**
39
+ * addTreeGridRowById 생성 행 하이라이트 컬럼 조회
40
+ * @param row 대상 행
41
+ */
42
+ export declare const getTreeGridAddedRowHighlightColumns: (row: TRow | null | undefined) => string[];
20
43
  /**
21
44
  * TreeGrid 인스턴스 ID 조회
22
45
  * @param gridId TreeGrid 인스턴스 ID
@@ -5,7 +5,7 @@ import { enqueueSnackbar as Q } from "notistack";
5
5
  import { exportExcelByBuffer as v } from "./excelUtil.js";
6
6
  import { loadExcelJSBrowser as tt } from "./exceljsBrowser.js";
7
7
  import { DEFAULT_WRAP_CELL_ALIGNMENT as L, DEFAULT_HEADER_FONT as et, DEFAULT_HEADER_FILL as nt, DEFAULT_THIN_BORDER as P, DEFAULT_VALUE_FONT as ot } from "../constants/excel.js";
8
- const S = 200, F = /* @__PURE__ */ new Map(), rt = "엑셀 다운로드 중 오류가 발생했습니다.", st = "TreeGrid 인스턴스가 없습니다.", _ = /* @__PURE__ */ l((t) => t == null || typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t instanceof Date, "isPrimitiveCellValue"), R = /* @__PURE__ */ l(() => new Promise((t) => {
8
+ const S = 200, F = /* @__PURE__ */ new Map(), rt = "엑셀 다운로드 중 오류가 발생했습니다.", st = "TreeGrid 인스턴스가 없습니다.", D = /* @__PURE__ */ l((t) => t == null || typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t instanceof Date, "isPrimitiveCellValue"), R = /* @__PURE__ */ l(() => new Promise((t) => {
9
9
  if (typeof requestAnimationFrame == "function") {
10
10
  requestAnimationFrame(() => {
11
11
  t();
@@ -13,27 +13,27 @@ const S = 200, F = /* @__PURE__ */ new Map(), rt = "엑셀 다운로드 중 오
13
13
  return;
14
14
  }
15
15
  setTimeout(t, 0);
16
- }), "yieldToMain"), H = /* @__PURE__ */ l((t, e, o) => (t == null ? void 0 : t(e, { defaultValue: o })) ?? o, "translateText"), at = /* @__PURE__ */ l((t) => t.ColNames ?? [], "getGridColNames"), D = /* @__PURE__ */ l((t) => t.Cols, "getGridCols"), it = /* @__PURE__ */ l((t) => t.Rows, "getGridRows"), lt = /* @__PURE__ */ l((t) => t.Header ?? null, "getGridHeader"), ft = /* @__PURE__ */ l((t) => t.Head ?? null, "getGridHead"), ct = /* @__PURE__ */ l((t) => t.ExportName, "getGridExportName"), dt = /* @__PURE__ */ l((t) => (t == null ? void 0 : t.firstChild) ?? null, "getRowFirstChild"), pt = /* @__PURE__ */ l((t) => (t == null ? void 0 : t.nextSibling) ?? null, "getRowNextSibling"), Y = /* @__PURE__ */ l((t) => (t ?? "sheet").trim().replace(/[\\/:*?"<>|]/g, "_") || "sheet", "getSafeExportName"), ut = /* @__PURE__ */ l((t) => Y(t).slice(0, 31) || "sheet", "getSafeSheetName"), U = /* @__PURE__ */ l((t) => {
16
+ }), "yieldToMain"), H = /* @__PURE__ */ l((t, e, o) => (t == null ? void 0 : t(e, { defaultValue: o })) ?? o, "translateText"), it = /* @__PURE__ */ l((t) => t.ColNames ?? [], "getGridColNames"), _ = /* @__PURE__ */ l((t) => t.Cols, "getGridCols"), at = /* @__PURE__ */ l((t) => t.Rows, "getGridRows"), lt = /* @__PURE__ */ l((t) => t.Header ?? null, "getGridHeader"), ft = /* @__PURE__ */ l((t) => t.Head ?? null, "getGridHead"), ct = /* @__PURE__ */ l((t) => t.ExportName, "getGridExportName"), dt = /* @__PURE__ */ l((t) => (t == null ? void 0 : t.firstChild) ?? null, "getRowFirstChild"), pt = /* @__PURE__ */ l((t) => (t == null ? void 0 : t.nextSibling) ?? null, "getRowNextSibling"), Y = /* @__PURE__ */ l((t) => (t ?? "sheet").trim().replace(/[\\/:*?"<>|]/g, "_") || "sheet", "getSafeExportName"), ut = /* @__PURE__ */ l((t) => Y(t).slice(0, 31) || "sheet", "getSafeSheetName"), U = /* @__PURE__ */ l((t) => {
17
17
  const e = Number(t);
18
18
  return !Number.isFinite(e) || e < 1 ? 1 : Math.floor(e);
19
- }, "toPositiveInt"), O = /* @__PURE__ */ l((t) => t !== 0 && t !== !1 && t !== "0", "isVisible"), gt = /* @__PURE__ */ l((t) => (t == null ? void 0 : t.Type) === "Button" || `${(t == null ? void 0 : t.Button) ?? ""}` == "Button", "isButtonColumn"), wt = /* @__PURE__ */ l((t) => {
20
- const e = at(t).flat(), o = e.length > 0 ? e : typeof t.GetCols == "function" ? t.GetCols() : [], n = [], s = /* @__PURE__ */ new Set();
19
+ }, "toPositiveInt"), O = /* @__PURE__ */ l((t) => t !== 0 && t !== !1 && t !== "0", "isVisible"), gt = /* @__PURE__ */ l((t) => t === 1 || t === !0 || t === "1", "isDeleted"), wt = /* @__PURE__ */ l((t) => (t == null ? void 0 : t.Type) === "Button" || `${(t == null ? void 0 : t.Button) ?? ""}` == "Button", "isButtonColumn"), ht = /* @__PURE__ */ l((t) => {
20
+ const e = it(t).flat(), o = e.length > 0 ? e : typeof t.GetCols == "function" ? t.GetCols() : [], n = [], s = /* @__PURE__ */ new Set();
21
21
  for (const r of o)
22
22
  !r || s.has(r) || (s.add(r), n.push(r));
23
23
  return n;
24
- }, "getColumnNames"), ht = /* @__PURE__ */ l((t) => {
25
- const e = D(t);
26
- return wt(t).filter((o) => {
24
+ }, "getColumnNames"), xt = /* @__PURE__ */ l((t) => {
25
+ const e = _(t);
26
+ return ht(t).filter((o) => {
27
27
  const n = e[o];
28
- return !n || o === "Panel" || gt(n) ? !1 : n.CanExport !== 0;
28
+ return !n || o === "Panel" || wt(n) ? !1 : n.CanExport !== 0;
29
29
  });
30
- }, "getAllExportColumns"), xt = /* @__PURE__ */ l((t, e) => {
31
- const o = D(t);
30
+ }, "getAllExportColumns"), yt = /* @__PURE__ */ l((t, e) => {
31
+ const o = _(t);
32
32
  return e.filter((n) => {
33
33
  const s = o[n];
34
34
  return s ? O(s.Visible) : !1;
35
35
  });
36
- }, "getVisibleExportColumns"), yt = /* @__PURE__ */ l((t) => {
36
+ }, "getVisibleExportColumns"), Rt = /* @__PURE__ */ l((t) => {
37
37
  const e = [], o = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ l((r) => {
38
38
  !r || o.has(r) || r.Kind && r.Kind !== "Header" || (o.add(r), e.push(r));
39
39
  }, "appendHeaderRow");
@@ -42,7 +42,7 @@ const S = 200, F = /* @__PURE__ */ new Map(), rt = "엑셀 다운로드 중 오
42
42
  for (; s; )
43
43
  n(s), s = pt(s);
44
44
  return e;
45
- }, "getHeaderRows"), V = /* @__PURE__ */ l((t) => !!t && t.Kind === "Data" && O(t.Visible) && t.Fixed !== "Foot", "isExportDataRow");
45
+ }, "getHeaderRows"), V = /* @__PURE__ */ l((t) => !!t && t.Kind === "Data" && O(t.Visible) && !gt(t.Deleted) && t.Fixed !== "Foot", "isExportDataRow");
46
46
  function* k(t) {
47
47
  if (typeof t.GetFirst == "function" && typeof t.GetNext == "function") {
48
48
  let o = t.GetFirst();
@@ -50,23 +50,23 @@ function* k(t) {
50
50
  V(o) && (yield o), o = t.GetNext(o);
51
51
  return;
52
52
  }
53
- const e = it(t);
53
+ const e = at(t);
54
54
  for (const o in e) {
55
55
  const n = e[o];
56
56
  V(n) && (yield n);
57
57
  }
58
58
  }
59
59
  l(k, "iterateExportDataRows");
60
- const Rt = /* @__PURE__ */ l((t) => {
60
+ const Ct = /* @__PURE__ */ l((t) => {
61
61
  let e = 0;
62
62
  for (const o of k(t))
63
63
  o && (e += 1);
64
64
  return e;
65
- }, "getExportDataRowCount"), Ct = /* @__PURE__ */ l((t, e) => {
65
+ }, "getExportDataRowCount"), St = /* @__PURE__ */ l((t, e) => {
66
66
  const o = new Map(t.map((f, c) => [f, c])), n = new Map(
67
67
  e.map((f, c) => [f, c])
68
- ), s = new Array(t.length + 1).fill(0), r = new Array(t.length).fill(-1), i = new Array(t.length).fill(-1);
69
- let a = -1;
68
+ ), s = new Array(t.length + 1).fill(0), r = new Array(t.length).fill(-1), a = new Array(t.length).fill(-1);
69
+ let i = -1;
70
70
  for (let f = 0; f < t.length; f += 1) {
71
71
  const c = t[f];
72
72
  if (!c)
@@ -75,7 +75,7 @@ const Rt = /* @__PURE__ */ l((t) => {
75
75
  r[f] = d, s[f + 1] = s[f] + (d >= 0 ? 1 : 0);
76
76
  }
77
77
  for (let f = t.length - 1; f >= 0; f -= 1)
78
- r[f] >= 0 && (a = f), i[f] = a;
78
+ r[f] >= 0 && (i = f), a[f] = i;
79
79
  return (f, c) => {
80
80
  const d = o.get(f);
81
81
  if (d === void 0)
@@ -84,17 +84,17 @@ const Rt = /* @__PURE__ */ l((t) => {
84
84
  visibleColIndex: null,
85
85
  visibleColSpan: 0
86
86
  };
87
- const g = U(c), p = Math.min(t.length - 1, d + g - 1), x = i[d], u = x >= 0 && x <= p ? r[x] : null, w = s[p + 1] - s[d];
87
+ const g = U(c), p = Math.min(t.length - 1, d + g - 1), x = a[d], u = x >= 0 && x <= p ? r[x] : null, w = s[p + 1] - s[d];
88
88
  return {
89
89
  allColSpan: g,
90
90
  visibleColIndex: u !== null && u >= 0 ? u : null,
91
91
  visibleColSpan: w
92
92
  };
93
93
  };
94
- }, "createSpanResolver"), St = /* @__PURE__ */ l((t) => {
94
+ }, "createSpanResolver"), It = /* @__PURE__ */ l((t) => {
95
95
  const e = `${(t == null ? void 0 : t.Align) ?? ""}`.toLowerCase();
96
96
  return e === "left" || e === "center" || e === "right" ? e : (t == null ? void 0 : t.Type) === "Int" || (t == null ? void 0 : t.Type) === "Float" ? "right" : (t == null ? void 0 : t.Type) === "Date" || (t == null ? void 0 : t.Type) === "Enum" ? "center" : "left";
97
- }, "getCellHorizontalAlignment"), It = /* @__PURE__ */ l((t) => {
97
+ }, "getCellHorizontalAlignment"), Et = /* @__PURE__ */ l((t) => {
98
98
  if ((t == null ? void 0 : t.Type) !== "Date")
99
99
  return null;
100
100
  const e = `${t.Format ?? ""}`.trim();
@@ -106,8 +106,8 @@ const Rt = /* @__PURE__ */ l((t) => {
106
106
  const n = "__TREEGRID_MINUTE_TWO__", s = "__TREEGRID_MINUTE_ONE__", r = e.replace(/yyyy/g, "YYYY").replace(/yy/g, "YY").replace(/tt/g, "A").replace(/hh/g, "HH").replace(/\bh\b/g, "H").replace(/(H{1,2}:)mm/g, `$1${n}`).replace(/(H{1,2}:)m/g, `$1${s}`).replace(/mmmm/g, "MMMM").replace(/mmm/g, "MMM").replace(/mm/g, "MM").replace(/\bm\b/g, "M").replace(new RegExp(n, "g"), "mm").replace(new RegExp(s, "g"), "m").replace(/dddd/g, "dddd").replace(/ddd/g, "ddd").replace(/dd/g, "DD").replace(/\bd\b/g, "D");
107
107
  return F.set(e, r), r;
108
108
  }, "getDayjsDateFormat"), T = /* @__PURE__ */ l((t, e) => {
109
- const o = It(e);
110
- if (!o || !_(t) || t === null || t === void 0 || t === "" || typeof t == "boolean")
109
+ const o = Et(e);
110
+ if (!o || !D(t) || t === null || t === void 0 || t === "" || typeof t == "boolean")
111
111
  return null;
112
112
  const n = $(t);
113
113
  return n.isValid() ? n.format(o) : null;
@@ -117,39 +117,39 @@ const Rt = /* @__PURE__ */ l((t) => {
117
117
  }, "getHeaderValue"), y = /* @__PURE__ */ l((t, e) => {
118
118
  const o = `${(e == null ? void 0 : e.HtmlPostfix) ?? ""}`;
119
119
  return !o || t === null || t === void 0 || t === "" ? t : `${t}${o}`;
120
- }, "appendHtmlPostfix"), Et = /* @__PURE__ */ l((t, e, o, n) => {
120
+ }, "appendHtmlPostfix"), mt = /* @__PURE__ */ l((t, e, o, n) => {
121
121
  if ((n == null ? void 0 : n.Type) === "Enum" && typeof t.GetString == "function") {
122
- const a = t.GetString(e, o);
123
- if (a != null)
124
- return y(a, n);
122
+ const i = t.GetString(e, o);
123
+ if (i != null)
124
+ return y(i, n);
125
125
  }
126
126
  const s = e[o], r = b(s, n);
127
127
  if (r !== null)
128
128
  return y(r, n);
129
- const i = T(s, n);
130
- if (i !== null)
131
- return y(i, n);
132
- if (_(s))
129
+ const a = T(s, n);
130
+ if (a !== null)
131
+ return y(a, n);
132
+ if (D(s))
133
133
  return y(s, n);
134
134
  if (typeof t.GetValue == "function") {
135
- const a = t.GetValue(e, o), f = b(a, n);
135
+ const i = t.GetValue(e, o), f = b(i, n);
136
136
  if (f !== null)
137
137
  return y(f, n);
138
- const c = T(a, n);
138
+ const c = T(i, n);
139
139
  if (c !== null)
140
140
  return y(c, n);
141
- if (_(a))
142
- return y(a, n);
141
+ if (D(i))
142
+ return y(i, n);
143
143
  }
144
144
  if (typeof t.GetString == "function") {
145
- const a = t.GetString(e, o), f = b(a, n);
145
+ const i = t.GetString(e, o), f = b(i, n);
146
146
  if (f !== null)
147
147
  return y(f, n);
148
- const c = T(a, n);
148
+ const c = T(i, n);
149
149
  if (c !== null)
150
150
  return y(c, n);
151
- if (a != null)
152
- return y(a, n);
151
+ if (i != null)
152
+ return y(i, n);
153
153
  }
154
154
  return "";
155
155
  }, "getBodyValue"), q = /* @__PURE__ */ l(({
@@ -162,14 +162,14 @@ const Rt = /* @__PURE__ */ l((t) => {
162
162
  const r = Math.min(
163
163
  U(o[`${t}RowSpan`]),
164
164
  Math.max(1, s - n)
165
- ), { allColSpan: i, visibleColIndex: a, visibleColSpan: f } = e(
165
+ ), { allColSpan: a, visibleColIndex: i, visibleColSpan: f } = e(
166
166
  t,
167
167
  o[`${t}Span`]
168
168
  );
169
169
  return {
170
- allColSpan: i,
170
+ allColSpan: a,
171
171
  rowSpan: r,
172
- visibleColIndex: a,
172
+ visibleColIndex: i,
173
173
  visibleColSpan: f
174
174
  };
175
175
  }, "getCellSpanInfo"), z = /* @__PURE__ */ l((t, e, o) => {
@@ -177,12 +177,12 @@ const Rt = /* @__PURE__ */ l((t) => {
177
177
  return (n = t.get(e)) == null ? void 0 : n.has(o);
178
178
  }, "isOccupied"), J = /* @__PURE__ */ l((t, e, o, n, s) => {
179
179
  for (let r = e; r < e + n; r += 1) {
180
- const i = t.get(r) ?? /* @__PURE__ */ new Set();
181
- for (let a = o; a < o + s; a += 1)
182
- i.add(a);
183
- t.set(r, i);
180
+ const a = t.get(r) ?? /* @__PURE__ */ new Set();
181
+ for (let i = o; i < o + s; i += 1)
182
+ a.add(i);
183
+ t.set(r, a);
184
184
  }
185
- }, "markOccupied"), mt = /* @__PURE__ */ l(async ({
185
+ }, "markOccupied"), Mt = /* @__PURE__ */ l(async ({
186
186
  allExportColumns: t,
187
187
  getValue: e,
188
188
  onVisibleEntry: o,
@@ -191,22 +191,22 @@ const Rt = /* @__PURE__ */ l((t) => {
191
191
  }) => {
192
192
  if (!t.length)
193
193
  return [];
194
- const r = /* @__PURE__ */ new Map(), i = s.map(() => []);
195
- for (let a = 0; a < s.length; a += 1) {
196
- const f = s[a], c = i[a];
194
+ const r = /* @__PURE__ */ new Map(), a = s.map(() => []);
195
+ for (let i = 0; i < s.length; i += 1) {
196
+ const f = s[i], c = a[i];
197
197
  if (!(!f || !c)) {
198
198
  for (let d = 0; d < t.length; d += 1) {
199
199
  const g = t[d];
200
- if (!g || z(r, a, d))
200
+ if (!g || z(r, i, d))
201
201
  continue;
202
202
  const { allColSpan: p, rowSpan: x, visibleColIndex: u, visibleColSpan: w } = q({
203
203
  row: f,
204
204
  colName: g,
205
- rowIndex: a,
205
+ rowIndex: i,
206
206
  totalRows: s.length,
207
207
  resolveSpan: n
208
208
  });
209
- if (J(r, a, d, x, p), u === null || w < 1)
209
+ if (J(r, i, d, x, p), u === null || w < 1)
210
210
  continue;
211
211
  const C = e(f, g);
212
212
  o == null || o(u, C), c.push({
@@ -216,45 +216,45 @@ const Rt = /* @__PURE__ */ l((t) => {
216
216
  colSpan: w
217
217
  });
218
218
  }
219
- (a + 1) % S === 0 && await R();
219
+ (i + 1) % S === 0 && await R();
220
220
  }
221
221
  }
222
- return i;
223
- }, "createEntryRows"), Mt = /* @__PURE__ */ l(async ({
222
+ return a;
223
+ }, "createEntryRows"), At = /* @__PURE__ */ l(async ({
224
224
  allExportColumns: t,
225
225
  grid: e,
226
226
  headerRows: o,
227
227
  resolveSpan: n,
228
228
  visibleExportColumns: s
229
- }) => s.length ? o.length ? mt({
229
+ }) => s.length ? o.length ? Mt({
230
230
  allExportColumns: t,
231
- getValue: /* @__PURE__ */ l((r, i) => B(e, r, i), "getValue"),
231
+ getValue: /* @__PURE__ */ l((r, a) => B(e, r, a), "getValue"),
232
232
  resolveSpan: n,
233
233
  rows: o
234
234
  }) : [
235
- s.map((r, i) => ({
235
+ s.map((r, a) => ({
236
236
  colName: r,
237
- colIndex: i,
237
+ colIndex: a,
238
238
  value: B(e, null, r),
239
239
  rowSpan: 1,
240
240
  colSpan: 1
241
241
  }))
242
- ] : [], "createHeaderEntries"), At = /* @__PURE__ */ l(async ({
242
+ ] : [], "createHeaderEntries"), Tt = /* @__PURE__ */ l(async ({
243
243
  worksheet: t,
244
244
  allExportColumns: e,
245
245
  columns: o,
246
246
  grid: n,
247
247
  onVisibleEntry: s,
248
248
  resolveSpan: r,
249
- visibleColumnCount: i
249
+ visibleColumnCount: a
250
250
  }) => {
251
- const a = t.rowCount + 1;
252
- if (!i)
253
- return { startRowIndex: a, rowCount: 0, mergeRanges: [] };
254
- const f = Rt(n), c = /* @__PURE__ */ new Map(), d = [], g = [];
251
+ const i = t.rowCount + 1;
252
+ if (!a)
253
+ return { startRowIndex: i, rowCount: 0, mergeRanges: [] };
254
+ const f = Ct(n), c = /* @__PURE__ */ new Map(), d = [], g = [];
255
255
  let p = 0;
256
256
  for (const x of k(n)) {
257
- const u = new Array(i).fill("");
257
+ const u = new Array(a).fill("");
258
258
  for (let w = 0; w < e.length; w += 1) {
259
259
  const C = e[w];
260
260
  if (!C || z(c, p, w))
@@ -268,38 +268,38 @@ const Rt = /* @__PURE__ */ l((t) => {
268
268
  });
269
269
  if (J(c, p, w, h, M), I === null || E < 1)
270
270
  continue;
271
- const A = Et(n, x, C, o[C]);
271
+ const A = mt(n, x, C, o[C]);
272
272
  s == null || s(I, A), u[I] = A ?? "", !(h === 1 && E === 1) && g.push({
273
- startRowIndex: a + p,
273
+ startRowIndex: i + p,
274
274
  startColIndex: I + 1,
275
- endRowIndex: a + p + h - 1,
275
+ endRowIndex: i + p + h - 1,
276
276
  endColIndex: I + E
277
277
  });
278
278
  }
279
279
  d.push(u), c.delete(p), p += 1, d.length === S ? (t.addRows(d), d.length = 0, await R()) : p % S === 0 && await R();
280
280
  }
281
- return d.length && t.addRows(d), { startRowIndex: a, rowCount: p, mergeRanges: g };
282
- }, "appendBodyRows"), Tt = /* @__PURE__ */ l(async (t, e, o) => {
281
+ return d.length && t.addRows(d), { startRowIndex: i, rowCount: p, mergeRanges: g };
282
+ }, "appendBodyRows"), bt = /* @__PURE__ */ l(async (t, e, o) => {
283
283
  const n = t.rowCount + 1, s = [];
284
284
  for (let r = 0; r < e.length; r += 1) {
285
- const i = e[r] ?? [], a = new Array(o).fill("");
286
- for (let f = 0; f < i.length; f += 1) {
287
- const c = i[f];
288
- c && (a[c.colIndex] = c.value ?? "");
285
+ const a = e[r] ?? [], i = new Array(o).fill("");
286
+ for (let f = 0; f < a.length; f += 1) {
287
+ const c = a[f];
288
+ c && (i[c.colIndex] = c.value ?? "");
289
289
  }
290
- s.push(a), s.length === S ? (t.addRows(s), s.length = 0, await R()) : (r + 1) % S === 0 && await R();
290
+ s.push(i), s.length === S ? (t.addRows(s), s.length = 0, await R()) : (r + 1) % S === 0 && await R();
291
291
  }
292
292
  return s.length && t.addRows(s), n;
293
- }, "appendEntryRows"), bt = /* @__PURE__ */ l(async (t, e, o) => {
293
+ }, "appendEntryRows"), Dt = /* @__PURE__ */ l(async (t, e, o) => {
294
294
  for (let n = 0; n < e.length; n += 1) {
295
295
  const s = e[n] ?? [];
296
296
  for (let r = 0; r < s.length; r += 1) {
297
- const i = s[r];
298
- i && (i.rowSpan === 1 && i.colSpan === 1 || t.mergeCells(
297
+ const a = s[r];
298
+ a && (a.rowSpan === 1 && a.colSpan === 1 || t.mergeCells(
299
299
  o + n,
300
- i.colIndex + 1,
301
- o + n + i.rowSpan - 1,
302
- i.colIndex + i.colSpan
300
+ a.colIndex + 1,
301
+ o + n + a.rowSpan - 1,
302
+ a.colIndex + a.colSpan
303
303
  ));
304
304
  }
305
305
  (n + 1) % S === 0 && await R();
@@ -314,106 +314,106 @@ const Rt = /* @__PURE__ */ l((t) => {
314
314
  n.endColIndex
315
315
  ), (o + 1) % S === 0 && await R());
316
316
  }
317
- }, "mergeWorksheetRanges"), Dt = /* @__PURE__ */ l(async (t, e, o, n) => {
317
+ }, "mergeWorksheetRanges"), Nt = /* @__PURE__ */ l(async (t, e, o, n) => {
318
318
  for (let s = 0; s < o; s += 1) {
319
319
  const r = t.getRow(e + s);
320
320
  r.font = et;
321
- for (let i = 1; i <= n; i += 1) {
322
- const a = r.getCell(i);
323
- a.fill = nt, a.border = P, a.alignment = {
321
+ for (let a = 1; a <= n; a += 1) {
322
+ const i = r.getCell(a);
323
+ i.fill = nt, i.border = P, i.alignment = {
324
324
  ...L,
325
325
  horizontal: "center"
326
326
  };
327
327
  }
328
328
  (s + 1) % S === 0 && await R();
329
329
  }
330
- }, "styleHeaderRows"), Nt = /* @__PURE__ */ l(async (t, e, o, n) => {
330
+ }, "styleHeaderRows"), Gt = /* @__PURE__ */ l(async (t, e, o, n) => {
331
331
  for (let s = 0; s < o; s += 1) {
332
332
  const r = t.getRow(e + s);
333
333
  r.font = ot;
334
- for (let i = 1; i <= n; i += 1)
335
- r.getCell(i).border = P;
334
+ for (let a = 1; a <= n; a += 1)
335
+ r.getCell(a).border = P;
336
336
  (s + 1) % S === 0 && await R();
337
337
  }
338
- }, "styleBodyRows"), Gt = /* @__PURE__ */ l((t) => {
338
+ }, "styleBodyRows"), Ft = /* @__PURE__ */ l((t) => {
339
339
  const e = Number((t == null ? void 0 : t.Width) ?? (t == null ? void 0 : t.MinWidth));
340
340
  return !Number.isFinite(e) || e <= 0 ? null : Math.min(Math.max(Math.round(e / 8), 10), 50);
341
- }, "getPreferredColumnWidth"), W = /* @__PURE__ */ l((t) => Math.min(Math.max(t + 4, 10), 50), "getAutoColumnWidth"), Ft = /* @__PURE__ */ l((t, e, o) => {
341
+ }, "getPreferredColumnWidth"), W = /* @__PURE__ */ l((t) => Math.min(Math.max(t + 4, 10), 50), "getAutoColumnWidth"), Ht = /* @__PURE__ */ l((t, e, o) => {
342
342
  const n = new Array(o.length).fill(10), s = new Array(o.length).fill(!1);
343
343
  for (let r = 0; r < o.length; r += 1) {
344
- const i = o[r];
345
- if (!i)
344
+ const a = o[r];
345
+ if (!a)
346
346
  continue;
347
- const a = e[i], f = Gt(a);
347
+ const i = e[a], f = Ft(i);
348
348
  if (f !== null) {
349
349
  n[r] = f, s[r] = !0;
350
350
  continue;
351
351
  }
352
- const c = (typeof t.GetCaption == "function" ? t.GetCaption(i) : "") || i;
352
+ const c = (typeof t.GetCaption == "function" ? t.GetCaption(a) : "") || a;
353
353
  n[r] = W(`${c}`.length);
354
354
  }
355
355
  return {
356
356
  widths: n,
357
- updateWidth: /* @__PURE__ */ l((r, i) => {
357
+ updateWidth: /* @__PURE__ */ l((r, a) => {
358
358
  if (s[r])
359
359
  return;
360
- const a = n[r];
361
- if (a === void 0)
360
+ const i = n[r];
361
+ if (i === void 0)
362
362
  return;
363
- const f = W(`${i ?? ""}`.length);
364
- f > a && (n[r] = f);
363
+ const f = W(`${a ?? ""}`.length);
364
+ f > i && (n[r] = f);
365
365
  }, "updateWidth")
366
366
  };
367
- }, "createColumnWidths"), Pt = /* @__PURE__ */ l(async (t, e) => {
367
+ }, "createColumnWidths"), Yt = /* @__PURE__ */ l(async (t, e) => {
368
368
  try {
369
369
  const o = typeof e == "string" ? { exportName: e } : e, n = o == null ? void 0 : o.t;
370
370
  if (!t)
371
371
  throw new Error(
372
372
  H(n, "Message.TreeGrid 인스턴스가 없습니다.", st)
373
373
  );
374
- const s = tt(), r = D(t), i = ht(t), a = xt(t, i), { widths: f, updateWidth: c } = Ft(t, r, a), d = yt(t), g = Ct(i, a), p = await Mt({
375
- allExportColumns: i,
374
+ const s = tt(), r = _(t), a = xt(t), i = yt(t, a), { widths: f, updateWidth: c } = Ht(t, r, i), d = Rt(t), g = St(a, i), p = await At({
375
+ allExportColumns: a,
376
376
  grid: t,
377
377
  headerRows: d,
378
378
  resolveSpan: g,
379
- visibleExportColumns: a
380
- }), x = await s, u = new x.Workbook(), w = (o == null ? void 0 : o.exportName) ?? ct(t) ?? t.id ?? "sheet", C = o != null && o.useAppendCurrentDateTimeToExportName ? `-${$().format("YYYY-MM-DD-HH-mm-ss")}` : "", M = Y(`${w}${C}`), h = u.addWorksheet(ut(M)), I = await Tt(
379
+ visibleExportColumns: i
380
+ }), x = await s, u = new x.Workbook(), w = (o == null ? void 0 : o.exportName) ?? ct(t) ?? t.id ?? "sheet", C = o != null && o.useAppendCurrentDateTimeToExportName ? `-${$().format("YYYY-MM-DD-HH-mm-ss")}` : "", M = Y(`${w}${C}`), h = u.addWorksheet(ut(M)), I = await bt(
381
381
  h,
382
382
  p,
383
- a.length
383
+ i.length
384
384
  ), {
385
385
  startRowIndex: E,
386
386
  rowCount: A,
387
387
  mergeRanges: K
388
- } = await At({
388
+ } = await Tt({
389
389
  worksheet: h,
390
- allExportColumns: i,
390
+ allExportColumns: a,
391
391
  columns: r,
392
392
  grid: t,
393
393
  onVisibleEntry: c,
394
394
  resolveSpan: g,
395
- visibleColumnCount: a.length
395
+ visibleColumnCount: i.length
396
396
  });
397
- for (let m = 0; m < a.length; m += 1) {
398
- const N = a[m];
397
+ for (let m = 0; m < i.length; m += 1) {
398
+ const N = i[m];
399
399
  if (!N)
400
400
  continue;
401
401
  const X = r[N], G = h.getColumn(m + 1);
402
402
  G.width = f[m], G.alignment = {
403
403
  ...L,
404
- horizontal: St(X)
404
+ horizontal: It(X)
405
405
  };
406
406
  }
407
- await bt(h, p, I), await _t(h, K), await Dt(
407
+ await Dt(h, p, I), await _t(h, K), await Nt(
408
408
  h,
409
409
  I,
410
410
  p.length,
411
- a.length
412
- ), await Nt(
411
+ i.length
412
+ ), await Gt(
413
413
  h,
414
414
  E,
415
415
  A,
416
- a.length
416
+ i.length
417
417
  ), h.views = [{ state: "frozen", ySplit: p.length }], await R();
418
418
  const j = await u.xlsx.writeBuffer({
419
419
  useSharedStrings: !1,
@@ -435,6 +435,6 @@ const Rt = /* @__PURE__ */ l((t) => {
435
435
  }
436
436
  }, "exportTreeGridExcel");
437
437
  export {
438
- Pt as exportTreeGridExcel
438
+ Yt as exportTreeGridExcel
439
439
  };
440
440
  //# sourceMappingURL=treeGridExportExcelUtil.js.map