@svgrid/grid-wc 3.0.44 → 3.0.45

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.
@@ -7144,26 +7144,26 @@ function pi(t, n) {
7144
7144
  return c.rowSelectionModel ? c.rowSelectionModel.headerState() : cr(R(nr)) ? or(dr(R(J)), R(nr), c.rowPlaceholder) : "none";
7145
7145
  }), Cs = D(!1), ws = null, Ts = M(function() {
7146
7146
  if (R(T), !c.fitColumns || R(at)) return null;
7147
- let e = K.getAllColumns().filter((e) => !R(Lt)[e.id] && !R(Vt)[e.id] && !R(ve)[e.id]);
7148
- if (!e.length) return null;
7149
- let t = R(dt) ? 16 : 0, n = (R(p)?.clientWidth ?? 0) - R(gt) - t;
7150
- if (n <= 0) return null;
7151
- let r = 0, i = 0, a = [];
7152
- for (let t of e) {
7153
- let e = $l(t.id);
7154
- R(B)[t.id] === void 0 ? (i += e, a.push(t.id)) : r += e;
7155
- }
7156
- let o = n - r;
7157
- if (o <= 0 || i <= 0 || Math.abs(i - o) <= 1) return null;
7158
- let s = o / i;
7159
- if (s < .85) return null;
7160
- let l = {}, u = 0;
7161
- for (let e = 0; e < a.length - 1; e += 1) {
7162
- let t = a[e], n = Math.max(40, Math.round($l(t) * s));
7163
- l[t] = n, u += n;
7164
- }
7165
- let d = a[a.length - 1];
7166
- return l[d] = Math.max(40, o - u), l;
7147
+ let e = !!c.responsive, t = K.getAllColumns().filter((t) => !R(Lt)[t.id] && !R(Vt)[t.id] && !R(ve)[t.id] && !(e && st(t)));
7148
+ if (!t.length) return null;
7149
+ let n = R(dt) ? 16 : 0, r = (R(p)?.clientWidth ?? 0) - R(gt) - n;
7150
+ if (r <= 0) return null;
7151
+ let i = 0, a = 0, o = [];
7152
+ for (let e of t) {
7153
+ let t = $l(e.id);
7154
+ R(B)[e.id] === void 0 ? (a += t, o.push(e.id)) : i += t;
7155
+ }
7156
+ let s = r - i;
7157
+ if (s <= 0 || a <= 0 || Math.abs(a - s) <= 1) return null;
7158
+ let l = s / a;
7159
+ if (l < .85) return null;
7160
+ let u = {}, d = 0;
7161
+ for (let e = 0; e < o.length - 1; e += 1) {
7162
+ let t = o[e], n = Math.max(40, Math.round($l(t) * l));
7163
+ u[t] = n, d += n;
7164
+ }
7165
+ let f = o[o.length - 1];
7166
+ return u[f] = Math.max(40, s - d), u;
7167
7167
  }), Es = M(function() {
7168
7168
  if (!(c.enableCellSelection ?? !1)) return null;
7169
7169
  let e = R(ne).anchor, t = R(ne).focus;
@@ -7144,26 +7144,26 @@ function pi(t, n) {
7144
7144
  return c.rowSelectionModel ? c.rowSelectionModel.headerState() : cr(R(nr)) ? or(dr(R(J)), R(nr), c.rowPlaceholder) : "none";
7145
7145
  }), Cs = D(!1), ws = null, Ts = M(function() {
7146
7146
  if (R(T), !c.fitColumns || R(at)) return null;
7147
- let e = K.getAllColumns().filter((e) => !R(Lt)[e.id] && !R(Vt)[e.id] && !R(ve)[e.id]);
7148
- if (!e.length) return null;
7149
- let t = R(dt) ? 16 : 0, n = (R(p)?.clientWidth ?? 0) - R(gt) - t;
7150
- if (n <= 0) return null;
7151
- let r = 0, i = 0, a = [];
7152
- for (let t of e) {
7153
- let e = $l(t.id);
7154
- R(B)[t.id] === void 0 ? (i += e, a.push(t.id)) : r += e;
7155
- }
7156
- let o = n - r;
7157
- if (o <= 0 || i <= 0 || Math.abs(i - o) <= 1) return null;
7158
- let s = o / i;
7159
- if (s < .85) return null;
7160
- let l = {}, u = 0;
7161
- for (let e = 0; e < a.length - 1; e += 1) {
7162
- let t = a[e], n = Math.max(40, Math.round($l(t) * s));
7163
- l[t] = n, u += n;
7164
- }
7165
- let d = a[a.length - 1];
7166
- return l[d] = Math.max(40, o - u), l;
7147
+ let e = !!c.responsive, t = K.getAllColumns().filter((t) => !R(Lt)[t.id] && !R(Vt)[t.id] && !R(ve)[t.id] && !(e && st(t)));
7148
+ if (!t.length) return null;
7149
+ let n = R(dt) ? 16 : 0, r = (R(p)?.clientWidth ?? 0) - R(gt) - n;
7150
+ if (r <= 0) return null;
7151
+ let i = 0, a = 0, o = [];
7152
+ for (let e of t) {
7153
+ let t = $l(e.id);
7154
+ R(B)[e.id] === void 0 ? (a += t, o.push(e.id)) : i += t;
7155
+ }
7156
+ let s = r - i;
7157
+ if (s <= 0 || a <= 0 || Math.abs(a - s) <= 1) return null;
7158
+ let l = s / a;
7159
+ if (l < .85) return null;
7160
+ let u = {}, d = 0;
7161
+ for (let e = 0; e < o.length - 1; e += 1) {
7162
+ let t = o[e], n = Math.max(40, Math.round($l(t) * l));
7163
+ u[t] = n, d += n;
7164
+ }
7165
+ let f = o[o.length - 1];
7166
+ return u[f] = Math.max(40, s - d), u;
7167
7167
  }), Es = M(function() {
7168
7168
  if (!(c.enableCellSelection ?? !1)) return null;
7169
7169
  let e = R(ne).anchor, t = R(ne).focus;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "commercial",
5
5
  "url": "https://svgrid.com/pricing"
6
6
  },
7
- "version": "3.0.44",
7
+ "version": "3.0.45",
8
8
  "description": "SvGrid as a framework-agnostic web component (<sv-grid> custom element, plus <sv-grid-shadow> for an open shadow root and <sv-chart> for the standalone chart). Drop into React, Vue, Angular, or plain HTML - no build step required.",
9
9
  "type": "module",
10
10
  "license": "MIT",
@@ -113,7 +113,7 @@
113
113
  "vue": "^3.5.42",
114
114
  "vue-tsc": "^3.3.11",
115
115
  "@svgrid/enterprise": "^3.1.36",
116
- "@svgrid/grid": "^3.0.32"
116
+ "@svgrid/grid": "^3.0.33"
117
117
  },
118
118
  "types": "./dist/sv-grid-element.d.ts",
119
119
  "peerDependencies": {