@ninebone/grid 0.0.24 → 0.0.26

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/dist/nine-grid.js CHANGED
@@ -2660,17 +2660,17 @@ class ad {
2660
2660
  }
2661
2661
  }
2662
2662
  Xr = new WeakMap(), Do = new WeakMap(), hs = new WeakMap();
2663
- var He, Dt, $e, Cr, ni, $s, nn, Bo, on, Fo, qo, wh, Ho, zo, an, ln, Uo, Vo, Wo;
2663
+ var qe, Dt, $e, Cr, ni, $s, nn, Bo, on, Fo, qo, wh, Ho, zo, an, ln, Uo, Vo, Wo;
2664
2664
  class ld {
2665
2665
  constructor(C, t) {
2666
- Y(this, He);
2666
+ Y(this, qe);
2667
2667
  Y(this, Dt);
2668
2668
  Y(this, $e);
2669
2669
  Y(this, Cr);
2670
2670
  Y(this, ni);
2671
2671
  Y(this, $s);
2672
2672
  it(this, "initialize", () => {
2673
- tt(this, $s, []), $(f(this, He).template).each((C, t) => {
2673
+ tt(this, $s, []), $(f(this, qe).template).each((C, t) => {
2674
2674
  f(this, $s).push($(t).height());
2675
2675
  }), (f(this, Dt).rawRecords || []).forEach((C) => {
2676
2676
  C.__ng.height = f(this, $s).slice();
@@ -2678,7 +2678,7 @@ class ld {
2678
2678
  });
2679
2679
  it(this, "set", (C) => {
2680
2680
  var t, l, c;
2681
- this.clear(), this.add(C, !1), console.log(f(this, Dt)), console.log(f(this, Dt).owner.matrix), console.log(f(this, Dt).owner), (c = (l = (t = f(this, Dt)) == null ? void 0 : t.owner) == null ? void 0 : l.matrix) == null || c.updateCumulativeHeights();
2681
+ this.clear(), this.add(C, !1), console.log(f(this, Dt)), console.log(f(this, qe)), (c = (l = (t = f(this, Dt)) == null ? void 0 : t.owner) == null ? void 0 : l.matrix) == null || c.updateCumulativeHeights();
2682
2682
  });
2683
2683
  it(this, "assign", (C) => {
2684
2684
  this.source = C;
@@ -2700,7 +2700,7 @@ class ld {
2700
2700
  * { "key1": [1,2,...], "key2": [1,2,...], ... }
2701
2701
  */
2702
2702
  it(this, "setFilter", (C) => {
2703
- f(this, He).filtering.on();
2703
+ f(this, qe).filtering.on();
2704
2704
  let t = {};
2705
2705
  if (Array.isArray(C))
2706
2706
  for (let c in C[0])
@@ -2723,12 +2723,12 @@ class ld {
2723
2723
  s.__ng.filtered = !0;
2724
2724
  });
2725
2725
  }
2726
- this.refreshFilter(), f(this, He).shadowRoot.querySelectorAll("ng-filter-button").forEach((c) => {
2726
+ this.refreshFilter(), f(this, qe).shadowRoot.querySelectorAll("ng-filter-button").forEach((c) => {
2727
2727
  c.filterOptions.forEach((o) => {
2728
2728
  o.data = [];
2729
2729
  });
2730
2730
  }), Object.entries(t).forEach(([c, o]) => {
2731
- f(this, He).shadowRoot.querySelectorAll("ng-filter-button").forEach((r) => {
2731
+ f(this, qe).shadowRoot.querySelectorAll("ng-filter-button").forEach((r) => {
2732
2732
  let n = r.filterOptions;
2733
2733
  n.forEach((s) => {
2734
2734
  s.colnm === c && (s.data = o);
@@ -2822,7 +2822,7 @@ class ld {
2822
2822
  var c = {
2823
2823
  v: []
2824
2824
  };
2825
- for (const o of f(this, He).fields.get())
2825
+ for (const o of f(this, qe).fields.get())
2826
2826
  c.v.push(H.nvl(l[o], ""));
2827
2827
  t.push(c);
2828
2828
  }), t;
@@ -2847,16 +2847,16 @@ class ld {
2847
2847
  if (Array.isArray(C)) {
2848
2848
  var t = [];
2849
2849
  for (const r of C) {
2850
- for (var l = {}, c = 0; c < f(this, He).fields.get().length; c++) {
2851
- const n = f(this, He).fields.get()[c];
2850
+ for (var l = {}, c = 0; c < f(this, qe).fields.get().length; c++) {
2851
+ const n = f(this, qe).fields.get()[c];
2852
2852
  l[n] = r.v[c];
2853
2853
  }
2854
2854
  l.__ng = r.__ng, t.push(l);
2855
2855
  }
2856
2856
  return t;
2857
2857
  } else {
2858
- for (var o = C, l = {}, c = 0; c < f(this, He).fields.get().length; c++) {
2859
- const s = f(this, He).fields.get()[c];
2858
+ for (var o = C, l = {}, c = 0; c < f(this, qe).fields.get().length; c++) {
2859
+ const s = f(this, qe).fields.get()[c];
2860
2860
  l[s] = o.v[c];
2861
2861
  }
2862
2862
  return l.__ng = o.__ng, l;
@@ -2867,16 +2867,16 @@ class ld {
2867
2867
  if (Array.isArray(C)) {
2868
2868
  var t = [];
2869
2869
  for (const r of C) {
2870
- for (var l = {}, c = 0; c < f(this, He).fields.get().length; c++) {
2871
- const n = f(this, He).fields.get()[c];
2870
+ for (var l = {}, c = 0; c < f(this, qe).fields.get().length; c++) {
2871
+ const n = f(this, qe).fields.get()[c];
2872
2872
  l[n] = r.v[c];
2873
2873
  }
2874
2874
  l.__ng = r.__ng, t.push(l);
2875
2875
  }
2876
2876
  return t;
2877
2877
  } else {
2878
- for (var o = C, l = {}, c = 0; c < f(this, He).fields.get().length; c++) {
2879
- const s = f(this, He).fields.get()[c];
2878
+ for (var o = C, l = {}, c = 0; c < f(this, qe).fields.get().length; c++) {
2879
+ const s = f(this, qe).fields.get()[c];
2880
2880
  l[s] = o.v[c];
2881
2881
  }
2882
2882
  return l.__ng = o.__ng, l;
@@ -3035,7 +3035,7 @@ class ld {
3035
3035
  var c = C[l], o = !1;
3036
3036
  for (const e in t)
3037
3037
  if (!["__ng", "rowState"].includes(e)) {
3038
- var r = f(this, He).fields.indexOf(e);
3038
+ var r = f(this, qe).fields.indexOf(e);
3039
3039
  if (!(r < 0)) {
3040
3040
  var n = c.v[r], s = t[e];
3041
3041
  c.v[r] = s, n != s && (c.__ng.rowState = H.ROW_STATE.UPDATE, o = !0, f(this, qo).call(this, l, e, n, s));
@@ -3062,7 +3062,7 @@ class ld {
3062
3062
  });
3063
3063
  Y(this, zo, (C, t, l, c, o) => {
3064
3064
  C = parseInt(C), c == null && (c = !0);
3065
- const r = f(this, He).fields.indexOf(t);
3065
+ const r = f(this, qe).fields.indexOf(t);
3066
3066
  if (!(r < 0)) {
3067
3067
  var n = o ? this.getValidDataNF()[C] : this.getValidData()[C], s = n.v[r];
3068
3068
  n.v[r] != l && n.__ng.rowState != H.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(t) || (n.__ng.o[t] = s), c && (n.__ng.rowState = H.ROW_STATE.UPDATE, this.onRowStateChanged())), n.v[r] = l, f(this, Dt).owner.refreshData(C), f(this, qo).call(this, C, t, s, l);
@@ -3117,7 +3117,7 @@ class ld {
3117
3117
  if (t < 0 || t >= C.length)
3118
3118
  throw `invalid row : ${t}`;
3119
3119
  if (l != null) {
3120
- var c = f(this, He).fields.indexOf(l);
3120
+ var c = f(this, qe).fields.indexOf(l);
3121
3121
  return c >= 0 ? C[t].v[c] : null;
3122
3122
  }
3123
3123
  var o = t == null ? C : C[t];
@@ -3146,7 +3146,7 @@ class ld {
3146
3146
  * return : 지정된 컬럼명에 해당하는 데이타 값을 배열로 반환
3147
3147
  */
3148
3148
  Y(this, Uo, (C, t) => {
3149
- var l = f(this, He).fields.indexOf(t);
3149
+ var l = f(this, qe).fields.indexOf(t);
3150
3150
  return l < 0 ? [] : C.map((c) => c.v[l]);
3151
3151
  });
3152
3152
  it(this, "getMap", (C) => f(this, Uo).call(this, this.getValidData(), C));
@@ -3170,7 +3170,7 @@ class ld {
3170
3170
  }
3171
3171
  return -1;
3172
3172
  });
3173
- tt(this, He, C), tt(this, Dt, t), tt(this, $e, []), tt(this, Cr, []), tt(this, ni, 0), this.all = {
3173
+ tt(this, qe, C), tt(this, Dt, t), tt(this, $e, []), tt(this, Cr, []), tt(this, ni, 0), this.all = {
3174
3174
  get: (l, c) => f(this, ln).call(this, this.recordsNF(), l, c),
3175
3175
  records: (l) => this.recordsNF(l),
3176
3176
  count: () => this.recordsNF().length,
@@ -3251,7 +3251,7 @@ class ld {
3251
3251
  delete f(this, Dt).rawRecords, tt(this, $e, []), tt(this, Cr, []), f(this, Dt).rawRecords = [], f(this, Dt).viewRecords.reset();
3252
3252
  }
3253
3253
  }
3254
- He = new WeakMap(), Dt = new WeakMap(), $e = new WeakMap(), Cr = new WeakMap(), ni = new WeakMap(), $s = new WeakMap(), nn = new WeakMap(), Bo = new WeakMap(), on = new WeakMap(), Fo = new WeakMap(), qo = new WeakMap(), wh = new WeakMap(), Ho = new WeakMap(), zo = new WeakMap(), an = new WeakMap(), ln = new WeakMap(), Uo = new WeakMap(), Vo = new WeakMap(), Wo = new WeakMap();
3254
+ qe = new WeakMap(), Dt = new WeakMap(), $e = new WeakMap(), Cr = new WeakMap(), ni = new WeakMap(), $s = new WeakMap(), nn = new WeakMap(), Bo = new WeakMap(), on = new WeakMap(), Fo = new WeakMap(), qo = new WeakMap(), wh = new WeakMap(), Ho = new WeakMap(), zo = new WeakMap(), an = new WeakMap(), ln = new WeakMap(), Uo = new WeakMap(), Vo = new WeakMap(), Wo = new WeakMap();
3255
3255
  class hd {
3256
3256
  constructor(C) {
3257
3257
  this.owner = C, this.row = new ad(this), this.data = new ld(C, this), this.setDataSource = (l) => {
@@ -28123,25 +28123,25 @@ const Ti = class Ti extends Mr {
28123
28123
  Hh = new WeakMap(), //static sourceRow = -1;
28124
28124
  it(Ti, "dragData"), it(Ti, "scrollInterval");
28125
28125
  let ir = Ti;
28126
- var qe, na, oa, aa, ps, la, ha, ca, ua;
28126
+ var He, na, oa, aa, ps, la, ha, ca, ua;
28127
28127
  class Ud {
28128
28128
  constructor(C) {
28129
- Y(this, qe);
28129
+ Y(this, He);
28130
28130
  /** attribute 변경에 대한 반응 */
28131
28131
  it(this, "resetEvent", () => {
28132
- $(".ng-table tbody.bindable", f(this, qe).body).off("dragleave", f(this, ha)).off("dragenter", f(this, la)).off("dragover", f(this, aa)).off("drop", f(this, ua)).off("dragend", f(this, ca)).on("dragleave", f(this, ha)).on("dragenter", f(this, la)).on("dragover", f(this, aa)).on("drop", f(this, ua)).on("dragend", f(this, ca));
28132
+ $(".ng-table tbody.bindable", f(this, He).body).off("dragleave", f(this, ha)).off("dragenter", f(this, la)).off("dragover", f(this, aa)).off("drop", f(this, ua)).off("dragend", f(this, ca)).on("dragleave", f(this, ha)).on("dragenter", f(this, la)).on("dragover", f(this, aa)).on("drop", f(this, ua)).on("dragend", f(this, ca));
28133
28133
  });
28134
28134
  Y(this, na, (C) => {
28135
28135
  [".ng-container-left", ".ng-container-body", ".ng-container-right"].forEach((t) => {
28136
- const l = f(this, qe).body.querySelectorAll(`${t} tr[data-row="${C}"]`);
28136
+ const l = f(this, He).body.querySelectorAll(`${t} tr[data-row="${C}"]`);
28137
28137
  H.j.querySelectorAll("th,td", l[0]).addClass("ng-dragover-up");
28138
28138
  });
28139
28139
  });
28140
28140
  Y(this, oa, (C) => {
28141
28141
  [".ng-container-left", ".ng-container-body", ".ng-container-right"].forEach((t) => {
28142
- f(this, qe).body.querySelectorAll(`${t} tr[data-row="${C}"]`).forEach((l, c) => {
28142
+ f(this, He).body.querySelectorAll(`${t} tr[data-row="${C}"]`).forEach((l, c) => {
28143
28143
  l.querySelectorAll("th,td").forEach((o) => {
28144
- c + (o.rowSpan || 1) == f(this, qe).template.length && H.j.querySelectorAll(o).addClass("ng-dragover-down");
28144
+ c + (o.rowSpan || 1) == f(this, He).template.length && H.j.querySelectorAll(o).addClass("ng-dragover-down");
28145
28145
  });
28146
28146
  });
28147
28147
  });
@@ -28152,7 +28152,7 @@ class Ud {
28152
28152
  if (H.j.querySelectorAll("th,td", t.body).removeClass("ng-dragover-up").removeClass("ng-dragover-down"), H.j.querySelectorAll("th,td", l.body).removeClass("ng-dragover-up").removeClass("ng-dragover-down"), t.id == l.id)
28153
28153
  o < c ? (f(this, na).call(this, o), ir.dragData.targetRow = o) : o > c && (f(this, oa).call(this, o), ir.dragData.targetRow = o - 1);
28154
28154
  else {
28155
- const r = f(this, qe).body.querySelector(`tr[data-row="${o}"]`), s = C.pageY - $(r).offset().top < f(this, qe).view.getRowHeight(o) / 2;
28155
+ const r = f(this, He).body.querySelector(`tr[data-row="${o}"]`), s = C.pageY - $(r).offset().top < f(this, He).view.getRowHeight(o) / 2;
28156
28156
  s ? f(this, na).call(this, o) : f(this, oa).call(this, o), ir.dragData.targetRow = s ? o : o + 1;
28157
28157
  }
28158
28158
  });
@@ -28160,11 +28160,11 @@ class Ud {
28160
28160
  Y(this, la, (C) => {
28161
28161
  C.preventDefault();
28162
28162
  const t = parseInt(C.target.closest("tr").dataset.row);
28163
- [f(this, qe).view.getVisibleFirstRow(), f(this, qe).view.getVisibleLastRow()].includes(t) && setTimeout(() => {
28163
+ [f(this, He).view.getVisibleFirstRow(), f(this, He).view.getVisibleLastRow()].includes(t) && setTimeout(() => {
28164
28164
  if (!f(this, ps)) {
28165
- const l = t == f(this, qe).view.getVisibleLastRow() ? 1 : -1;
28165
+ const l = t == f(this, He).view.getVisibleLastRow() ? 1 : -1;
28166
28166
  tt(this, ps, setInterval(() => {
28167
- f(this, qe).scrollBy(l);
28167
+ f(this, He).scrollBy(l);
28168
28168
  }, ir.scrollInterval));
28169
28169
  }
28170
28170
  });
@@ -28175,13 +28175,13 @@ class Ud {
28175
28175
  Y(this, ca, (C) => {
28176
28176
  });
28177
28177
  Y(this, ua, (C) => {
28178
- C.preventDefault(), clearInterval(f(this, ps)), tt(this, ps, null), f(this, qe).body.querySelectorAll(".ng-container-left .ng-tmp").forEach((a) => {
28178
+ C.preventDefault(), clearInterval(f(this, ps)), tt(this, ps, null), f(this, He).body.querySelectorAll(".ng-container-left .ng-tmp").forEach((a) => {
28179
28179
  $(a).remove();
28180
28180
  });
28181
- const t = H.nvl(document.getElementById(ir.dragData.id), f(this, qe)), l = ir.dragData.row, c = ir.dragData.bind, o = C.target.closest("tr"), r = C.target.getRootNode().host, n = parseInt(o.dataset.row), s = r.body.querySelector("ng-row-drag") ? r.body.querySelector("ng-row-drag").cell.dataset.bind : null;
28181
+ const t = H.nvl(document.getElementById(ir.dragData.id), f(this, He)), l = ir.dragData.row, c = ir.dragData.bind, o = C.target.closest("tr"), r = C.target.getRootNode().host, n = parseInt(o.dataset.row), s = r.body.querySelector("ng-row-drag") ? r.body.querySelector("ng-row-drag").cell.dataset.bind : null;
28182
28182
  if (H.j.querySelectorAll("th,td", t.body).removeClass("ng-dragover-up").removeClass("ng-dragover-down"), H.j.querySelectorAll("th,td", r.body).removeClass("ng-dragover-up").removeClass("ng-dragover-down"), t.id == r.id && l == n) return;
28183
28183
  const e = new CustomEvent(H.EVENT.CAN_ROW_MOVE, { bubbles: !0, cancelable: !0, detail: {} });
28184
- if (e.sourceGrid = t, e.targetGrid = r, e.sourceRow = l, e.targetRow = ir.dragData.targetRow, f(this, qe).dispatchEvent(e) && (t.id == r.id ? C.altKey ? f(this, qe).data.insert(f(this, qe).data.get(l), n) : f(this, qe).data.moveRow(l, n) : (r.data.insert(t.data.get(l), ir.dragData.targetRow), C.altKey || t.data.delete(l))), c) {
28184
+ if (e.sourceGrid = t, e.targetGrid = r, e.sourceRow = l, e.targetRow = ir.dragData.targetRow, f(this, He).dispatchEvent(e) && (t.id == r.id ? C.altKey ? f(this, He).data.insert(f(this, He).data.get(l), n) : f(this, He).data.moveRow(l, n) : (r.data.insert(t.data.get(l), ir.dragData.targetRow), C.altKey || t.data.delete(l))), c) {
28185
28185
  const a = t.fields.indexOf(c);
28186
28186
  for (var i = 0; i < t.data.all.count(); i++)
28187
28187
  t.data.all.setRecord(i, a, i + 1);
@@ -28191,14 +28191,14 @@ class Ud {
28191
28191
  for (var i = 0; i < r.data.all.count(); i++)
28192
28192
  r.data.all.setRecord(i, a, i + 1);
28193
28193
  }
28194
- f(this, qe).dataManager.viewRecords.reset();
28194
+ f(this, He).dataManager.viewRecords.reset();
28195
28195
  const u = new CustomEvent(H.EVENT.ROW_MOVED, { bubbles: !0, detail: {} });
28196
- u.sourceGrid = t, u.targetGrid = r, u.sourceRow = l, u.targetRow = ir.dragData.targetRow, f(this, qe).dispatchEvent(u), ir.dragData = null;
28196
+ u.sourceGrid = t, u.targetGrid = r, u.sourceRow = l, u.targetRow = ir.dragData.targetRow, f(this, He).dispatchEvent(u), ir.dragData = null;
28197
28197
  });
28198
- tt(this, qe, C), this.resetEvent();
28198
+ tt(this, He, C), this.resetEvent();
28199
28199
  }
28200
28200
  }
28201
- qe = new WeakMap(), na = new WeakMap(), oa = new WeakMap(), aa = new WeakMap(), ps = new WeakMap(), la = new WeakMap(), ha = new WeakMap(), ca = new WeakMap(), ua = new WeakMap();
28201
+ He = new WeakMap(), na = new WeakMap(), oa = new WeakMap(), aa = new WeakMap(), ps = new WeakMap(), la = new WeakMap(), ha = new WeakMap(), ca = new WeakMap(), ua = new WeakMap();
28202
28202
  customElements.get("ng-row-drag") || customElements.define("ng-row-drag", ir);
28203
28203
  var sr, pr, fi, zh, Uh, da;
28204
28204
  class Vd extends HTMLElement {