@isi-ui7/bos7-shared 0.3.8 → 0.3.10

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,47 @@
1
+ import { ReactNode } from 'react';
2
+ import { DetailModalConfig, FormMode, FormSection } from './form-types';
3
+ import { BosSharedLabels } from './i18n';
4
+
5
+ /**
6
+ * Tabel ringkas + modal form per baris — badan tipe field `detail-modal`.
7
+ *
8
+ * Semua gaya di sini INLINE (atau memakai kelas `ui7-form-*` yang sudah ikut
9
+ * `corporate-themes/dist/globals.css`), mengikuti `wizard-stepper.tsx`.
10
+ * Sengaja tidak ada berkas `.css` bersebelahan: `packages/bos7-shared` tidak
11
+ * punya `sideEffects`, tidak punya titik impor CSS, dan `form-contract.css`
12
+ * membuktikan jalur itu berakhir sebagai berkas yang tidak pernah dimuat siapa
13
+ * pun — komponennya tetap jalan, hanya tampilannya rusak, tanpa satu pun galat.
14
+ */
15
+ export type DetailModalFieldProps = {
16
+ /** Dipakai untuk id/aria yang unik antar field dalam satu form. */
17
+ fieldKey: string;
18
+ label: ReactNode;
19
+ required?: boolean;
20
+ helperText?: ReactNode;
21
+ config: DetailModalConfig;
22
+ rows: Record<string, unknown>[];
23
+ mode: FormMode;
24
+ /** View mode atau field readonly: tabel tetap tampil, aksinya hilang. */
25
+ readOnly: boolean;
26
+ disabled: boolean;
27
+ labels: BosSharedLabels;
28
+ /** Pesan galat tingkat field dari validator form induk. */
29
+ invalidText?: string;
30
+ onChange: (rows: Record<string, unknown>[]) => void;
31
+ /**
32
+ * Perender form untuk isi modal.
33
+ *
34
+ * Disuntikkan dari `form-renderer.tsx` alih-alih di-import langsung supaya
35
+ * tidak ada lingkaran impor antara kedua modul — `form-renderer` sudah
36
+ * meng-import berkas ini.
37
+ */
38
+ renderForm: (props: {
39
+ value: Record<string, unknown>;
40
+ sections: FormSection<Record<string, unknown>>[];
41
+ mode: FormMode;
42
+ errors: Partial<Record<string, string>>;
43
+ disabled: boolean;
44
+ onChange: (patch: Partial<Record<string, unknown>>) => void;
45
+ }) => ReactNode;
46
+ };
47
+ export declare function DetailModalField({ fieldKey, label, required, helperText, config, rows, mode, readOnly, disabled, labels, invalidText, onChange, renderForm, }: DetailModalFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -19,7 +19,7 @@ export type FieldValidation<TData extends Record<string, unknown>> = {
19
19
  /** Array of validators — compose Rules.* or custom functions. Runs after built-in rules. */
20
20
  validators?: FieldValidatorFn<TData>[];
21
21
  };
22
- export type FormFieldType = "text" | "textarea" | "number" | "date" | "datetime" | "select" | "lookup" | "checkbox" | "toggle" | "detail-rows";
22
+ export type FormFieldType = "text" | "textarea" | "number" | "date" | "datetime" | "select" | "lookup" | "checkbox" | "toggle" | "detail-rows" | "detail-modal";
23
23
  /**
24
24
  * Select option. `value` may be a number for numeric-coded columns (e.g.
25
25
  * kolektibilitas 1–5); the renderer compares via `String(value)` and the
@@ -106,6 +106,93 @@ export type DetailRowsConfig = {
106
106
  */
107
107
  lockExistingRows?: boolean;
108
108
  };
109
+ /**
110
+ * Satu kolom pada tabel RINGKAS `detail-modal`.
111
+ *
112
+ * Sengaja BUKAN `EditableColumnDef`: kolom di sini hanya menampilkan, tidak
113
+ * pernah menyunting — penyuntingan seluruhnya terjadi di dalam modal. Memakai
114
+ * `EditableColumnDef` akan menuntut `columnType` untuk setiap kolom padahal
115
+ * tipe itu hanya menentukan editor sel yang tidak akan pernah dipakai.
116
+ */
117
+ export type DetailModalColumn = {
118
+ /** Nama properti pada baris. */
119
+ field: string;
120
+ header: ReactNode;
121
+ /** Lebar kolom dalam piksel. Tanpa ini kolom ikut lebar isi. */
122
+ width?: number;
123
+ /** `end` untuk angka. Default `start`. */
124
+ align?: "start" | "end";
125
+ /**
126
+ * Ubah nilai mentah jadi tampilan. Tanpa ini nilai kosong tampil sebagai
127
+ * em-dash (`labels.emptyValue`) dan sisanya lewat `String(value)`.
128
+ *
129
+ * ⚠️ Kolom ringkas menampilkan nilai SIMPAN, bukan label. Untuk field
130
+ * `select`, `String(value)` menghasilkan kodenya ("M"), bukan "Laki-laki" —
131
+ * pakai `format` bila yang harus terbaca operator adalah labelnya.
132
+ */
133
+ format?: (value: unknown, row: Record<string, unknown>) => ReactNode;
134
+ };
135
+ /**
136
+ * Detail-modal config — tabel RINGKAS + tombol Tambah yang membuka modal
137
+ * berisi form penuh untuk SATU baris.
138
+ *
139
+ * Bedanya dengan `detail-rows`: `detail-rows` menyunting DI DALAM sel, jadi
140
+ * setiap field baris harus muat sebagai satu kolom. Begitu satu baris punya
141
+ * belasan field (Beneficial Owner: ~20 field + dua blok alamat), barisnya jadi
142
+ * selebar beberapa layar dan tidak ada tempat untuk alur per-baris seperti cek
143
+ * identitas. `detail-modal` memindahkan seluruh form baris ke modal, dan
144
+ * menyisakan hanya beberapa kolom penanda di tabel.
145
+ *
146
+ * Nilai field di `key` harus berupa array objek biasa; renderer membaca dan
147
+ * menulis array itu secara utuh lewat `onChange({ [key]: newRows })` — sama
148
+ * seperti `detail-rows`.
149
+ *
150
+ * Isi modal dirender oleh `SchemaFormRenderer` yang sama dengan form induknya,
151
+ * jadi SEMUA tipe field yang sudah ada (lookup, date, numeric, toggle, bahkan
152
+ * `FormSection.render`) langsung bisa dipakai di dalam baris tanpa tambahan
153
+ * apa pun di sini.
154
+ */
155
+ export type DetailModalConfig = {
156
+ /**
157
+ * Form untuk SATU baris. Section-nya sama persis dengan section form biasa,
158
+ * dan `TData`-nya adalah barisnya — bukan form induk.
159
+ */
160
+ sections: FormSection<Record<string, unknown>>[];
161
+ /** Kolom yang tampil di tabel ringkas. Boleh sebagian kecil saja dari field baris. */
162
+ columns: DetailModalColumn[];
163
+ newRowFactory: () => Record<string, unknown>;
164
+ /**
165
+ * Aturan lintas-field untuk satu baris, dijalankan SETELAH validasi per-field
166
+ * milik `sections`. Kuncinya nama field; hasilnya menimpa error per-field.
167
+ *
168
+ * `index` adalah posisi baris — untuk baris baru, posisi tempat ia akan
169
+ * mendarat (`rows.length`).
170
+ */
171
+ validateRow?: (row: Record<string, unknown>, index: number) => Record<string, string>;
172
+ /** Batas jumlah baris. Tombol Tambah nonaktif setelah tercapai. */
173
+ maxRows?: number;
174
+ /** Teks tombol tambah, mis. "Tambah Ahli Waris". Default: "Tambah". */
175
+ addLabel?: ReactNode;
176
+ /** Judul modal saat menambah. Default: "Tambah Data". */
177
+ addModalTitle?: ReactNode;
178
+ /** Judul modal saat mengubah. Default: "Ubah Data". */
179
+ editModalTitle?: ReactNode;
180
+ /** Teks saat tabel kosong. Default: "Belum ada data." */
181
+ emptyText?: ReactNode;
182
+ /** Lebar modal Carbon. Default `lg` — form baris biasanya padat. */
183
+ modalSize?: "xs" | "sm" | "md" | "lg";
184
+ /** Izinkan membuka baris yang sudah ada untuk diubah. Default `true`. */
185
+ allowEdit?: boolean;
186
+ /** Izinkan menghapus baris. Default `true`. */
187
+ allowDelete?: boolean;
188
+ /**
189
+ * Kunci React per baris. Default memakai indeks.
190
+ *
191
+ * Berguna bila baris punya identitas sendiri (mis. `person_id`) supaya state
192
+ * modal tidak nyangkut ke baris lain setelah penghapusan di tengah.
193
+ */
194
+ rowKey?: (row: Record<string, unknown>, index: number) => string;
195
+ };
109
196
  export type FormField<TData extends Record<string, unknown>> = {
110
197
  key: keyof TData;
111
198
  label: ReactNode;
@@ -138,6 +225,7 @@ export type FormField<TData extends Record<string, unknown>> = {
138
225
  numeric?: FormFieldNumericConfig<TData>;
139
226
  toggle?: FormFieldToggleConfig;
140
227
  detailRows?: DetailRowsConfig;
228
+ detailModal?: DetailModalConfig;
141
229
  format?: (value: TData[keyof TData], data: TData) => ReactNode;
142
230
  validation?: FieldValidation<TData>;
143
231
  };
package/dist/i18n.d.ts CHANGED
@@ -34,5 +34,14 @@ export type BosSharedLabels = {
34
34
  deleteTitle: string;
35
35
  deleteDescription: string;
36
36
  deleteConfirm: string;
37
+ /** Tipe field `detail-modal` — tabel ringkas + modal form per baris. */
38
+ detailAdd: string;
39
+ detailEdit: string;
40
+ detailDelete: string;
41
+ detailEmpty: string;
42
+ detailNo: string;
43
+ detailActions: string;
44
+ detailAddTitle: string;
45
+ detailEditTitle: string;
37
46
  };
38
47
  export declare function useBosSharedI18n(): BosSharedLabels;
@@ -27391,7 +27391,7 @@ function ba(M, L) {
27391
27391
  return String(pr(M, L));
27392
27392
  }
27393
27393
  async function Io(M, L, r) {
27394
- const { default: x } = await import("./jspdf.es.min-DzRwzM6G.js").then((o) => o.j), { default: w } = await import("./jspdf.plugin.autotable-DFaknRns.js"), c = new x({ orientation: "landscape" });
27394
+ const { default: x } = await import("./jspdf.es.min-C5VEsLZd.js").then((o) => o.j), { default: w } = await import("./jspdf.plugin.autotable-DcntYaes.js"), c = new x({ orientation: "landscape" });
27395
27395
  c.setFontSize(14), c.text(r, 14, 15), c.setFontSize(10), w(c, {
27396
27396
  head: [L.map((o) => o.title)],
27397
27397
  body: M.map((o) => L.map((a) => ba(o[a.field], a.displayFormat))),
@@ -28654,7 +28654,15 @@ function tl() {
28654
28654
  submitEdit: M("bos7.submitEdit", "Update"),
28655
28655
  deleteTitle: M("bos7.deleteTitle", "Konfirmasi Hapus"),
28656
28656
  deleteDescription: M("bos7.deleteDescription", "Data berikut akan dihapus permanen."),
28657
- deleteConfirm: M("bos7.deleteConfirm", "Hapus")
28657
+ deleteConfirm: M("bos7.deleteConfirm", "Hapus"),
28658
+ detailAdd: M("bos7.detailAdd", "Tambah"),
28659
+ detailEdit: M("bos7.detailEdit", "Ubah"),
28660
+ detailDelete: M("bos7.detailDelete", "Hapus"),
28661
+ detailEmpty: M("bos7.detailEmpty", "Belum ada data."),
28662
+ detailNo: M("bos7.detailNo", "No"),
28663
+ detailActions: M("bos7.detailActions", "Aksi"),
28664
+ detailAddTitle: M("bos7.detailAddTitle", "Tambah Data"),
28665
+ detailEditTitle: M("bos7.detailEditTitle", "Ubah Data")
28658
28666
  };
28659
28667
  }
28660
28668
  function Ri(M, L) {
@@ -28690,77 +28698,77 @@ async function rl(M, L) {
28690
28698
  return o.columnTypes = { ...a, ...L.extraColumnTypes }, Dt.NextResponse.json(o, { status: c.status });
28691
28699
  }
28692
28700
  export {
28693
- Wi as $,
28694
- vo as A,
28695
- Lo as B,
28696
- Vo as C,
28697
- wi as D,
28698
- io as E,
28699
- Jr as F,
28700
- Oo as G,
28701
- Io as H,
28702
- jo as I,
28703
- Bo as J,
28704
- uo as K,
28705
- ho as L,
28706
- dr as M,
28707
- ga as N,
28701
+ Ho as $,
28702
+ Bi as A,
28703
+ lo as B,
28704
+ uo as C,
28705
+ co as D,
28706
+ Eo as E,
28707
+ ko as F,
28708
+ To as G,
28709
+ Ao as H,
28710
+ Co as I,
28711
+ Ro as J,
28712
+ Mo as K,
28713
+ Oo as L,
28714
+ Io as M,
28715
+ Po as N,
28708
28716
  go as O,
28709
- ko as P,
28710
- qo as Q,
28711
- xa as R,
28712
- Sa as S,
28713
- ao as T,
28714
- Wo as U,
28715
- Ko as V,
28716
- Go as W,
28717
- Yo as X,
28718
- Zo as Y,
28719
- xo as Z,
28720
- Do as _,
28721
- Xo as a,
28722
- _a as a0,
28723
- Uo as a1,
28724
- wa as a2,
28725
- Qa as a3,
28726
- rl as a4,
28727
- Po as a5,
28728
- $i as a6,
28729
- _o as a7,
28730
- Ho as a8,
28731
- so as a9,
28732
- Jo as aa,
28733
- wo as ab,
28734
- lo as ac,
28735
- qi as ad,
28736
- Fi as ae,
28737
- En as af,
28738
- tl as ag,
28739
- Fo as ah,
28740
- fo as ai,
28741
- Bi as b,
28717
+ So as P,
28718
+ No as Q,
28719
+ ga as R,
28720
+ ya as S,
28721
+ jo as T,
28722
+ Do as U,
28723
+ Lo as V,
28724
+ Bo as W,
28725
+ Fo as X,
28726
+ wi as Y,
28727
+ Uo as Z,
28728
+ wa as _,
28729
+ rl as a,
28730
+ zo as a0,
28731
+ $o as a1,
28732
+ Bt as a2,
28733
+ Wo as a3,
28734
+ _a as a4,
28735
+ xa as a5,
28736
+ Sa as a6,
28737
+ qo as a7,
28738
+ Vo as a8,
28739
+ Xo as a9,
28740
+ Ko as aa,
28741
+ Go as ab,
28742
+ Yo as ac,
28743
+ Zo as ad,
28744
+ Jo as ae,
28745
+ Qo as af,
28746
+ Za as ag,
28747
+ el as ah,
28748
+ tl as ai,
28749
+ Fi as b,
28742
28750
  Ze as c,
28743
- yo as d,
28744
- To as e,
28745
- Eo as f,
28751
+ fo as d,
28752
+ ho as e,
28753
+ po as f,
28746
28754
  Qi as g,
28747
- So as h,
28748
- Bt as i,
28749
- $o as j,
28750
- zo as k,
28751
- Qo as l,
28752
- Mo as m,
28753
- Ao as n,
28754
- Co as o,
28755
- Ro as p,
28756
- no as q,
28757
- el as r,
28758
- Za as s,
28759
- No as t,
28760
- mo as u,
28761
- co as v,
28762
- po as w,
28763
- oo as x,
28764
- ya as y,
28765
- bo as z
28755
+ Jr as h,
28756
+ mo as i,
28757
+ bo as j,
28758
+ xo as k,
28759
+ yo as l,
28760
+ vo as m,
28761
+ no as n,
28762
+ io as o,
28763
+ Qa as p,
28764
+ $i as q,
28765
+ _o as r,
28766
+ wo as s,
28767
+ so as t,
28768
+ En as u,
28769
+ ao as v,
28770
+ Wi as w,
28771
+ qi as x,
28772
+ oo as y,
28773
+ dr as z
28766
28774
  };
@@ -1,5 +1,5 @@
1
- import { c as Ke, g as Do } from "./index-BI2MxWot.js";
2
- import { _ as Xa } from "./jspdf.es.min-DzRwzM6G.js";
1
+ import { c as Ke, g as Do } from "./index-C_114Ysm.js";
2
+ import { _ as Xa } from "./jspdf.es.min-C5VEsLZd.js";
3
3
  var vt = function(a) {
4
4
  return a && a.Math === Math && a;
5
5
  }, _ = (
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as s, a as o, b as t, D as r, N as i, O as n, d as l, P as c, e as d, f as u, h as S, U as h, i as A, j as T, k, l as C, m as _, n as O, o as U, p as g, q as N, r as P, s as m, t as E, u as F, v as p, w as f, x as I, y as R, z as x, B as v, C as y, E as L, F as b, G as B, H as D, I as M, J as H, K as V, L as W, M as q, Q as K, R as w, S as z, T as G, V as Q, W as X, X as Y, Y as j, Z as J, _ as Z, $, a0 as aa, a1 as ea, a2 as sa, a3 as oa, a4 as ta, a5 as ra, a6 as ia, a7 as na, a8 as la, a9 as ca, aa as da, ab as ua, ac as Sa, ad as ha, ae as Aa, af as Ta, ag as ka, ah as Ca, ai as _a } from "./index-BI2MxWot.js";
1
+ import { m as s, a9 as o, A as t, Y as r, R as i, O as n, l, F as c, G as d, E as u, P as S, a3 as h, a2 as A, a1 as T, a0 as k, af as C, K as _, H as O, I as U, J as g, n as N, ah as P, ag as m, Q as E, i as F, D as p, f, y as I, S as R, j as x, V as v, a8 as y, o as L, h as b, L as B, M as D, T as M, W as H, C as V, e as W, z as q, a7 as K, a5 as w, a6 as z, v as G, aa as Q, ab as X, ac as Y, ad as j, k as J, U as Z, w as $, a4 as aa, Z as ea, _ as sa, p as oa, a as ta, N as ra, q as ia, r as na, $ as la, t as ca, ae as da, s as ua, B as Sa, x as ha, b as Aa, u as Ta, ai as ka, X as Ca, d as _a } from "./index-C_114Ysm.js";
2
2
  export {
3
3
  s as AUTH7_SCOPES,
4
4
  o as AppShellLayout,
@@ -8506,7 +8506,7 @@ function(n) {
8506
8506
  });
8507
8507
  }
8508
8508
  function t() {
8509
- return (Kt.DOMPurify ? Promise.resolve(Kt.DOMPurify) : import("./purify.es-Cm3utOpm.js")).catch(function(l) {
8509
+ return (Kt.DOMPurify ? Promise.resolve(Kt.DOMPurify) : import("./purify.es-CiEWEeUM.js")).catch(function(l) {
8510
8510
  return Promise.reject(new Error("Could not load dompurify: " + l));
8511
8511
  }).then(function(l) {
8512
8512
  return l.default ? l.default : l;
@@ -9216,7 +9216,7 @@ function(n) {
9216
9216
  var d = h.getContext("2d");
9217
9217
  d.fillStyle = "#fff", d.fillRect(0, 0, h.width, h.height);
9218
9218
  var m = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, _ = this;
9219
- return (Kt.canvg ? Promise.resolve(Kt.canvg) : import("./index.es-D-PR3JkH.js")).catch(function(k) {
9219
+ return (Kt.canvg ? Promise.resolve(Kt.canvg) : import("./index.es-B-MluT1E.js")).catch(function(k) {
9220
9220
  return Promise.reject(new Error("Could not load canvg: " + k));
9221
9221
  }).then(function(k) {
9222
9222
  return k.default ? k.default : k;
@@ -256,8 +256,8 @@ function ot(e, t, r, i, n) {
256
256
  isNaN(p) || (a.fontSize = p / s);
257
257
  var y = st(i);
258
258
  y && (a.fontStyle = y);
259
- var x = (i.fontFamily || "").toLowerCase();
260
- return e.indexOf(x) !== -1 && (a.font = x), a;
259
+ var C = (i.fontFamily || "").toLowerCase();
260
+ return e.indexOf(C) !== -1 && (a.font = C), a;
261
261
  }
262
262
  function st(e) {
263
263
  var t = "";
@@ -398,10 +398,10 @@ function dt(e, t) {
398
398
  t.showFoot === !0 ? p = "everyPage" : t.showFoot === !1 ? p = "never" : p = (i = t.showFoot) !== null && i !== void 0 ? i : "everyPage";
399
399
  var y;
400
400
  t.showHead === !0 ? y = "everyPage" : t.showHead === !1 ? y = "never" : y = (n = t.showHead) !== null && n !== void 0 ? n : "everyPage";
401
- var x = (a = t.useCss) !== null && a !== void 0 ? a : !1, c = t.theme || (x ? "plain" : "striped"), C = !!t.horizontalPageBreak, rt = (s = t.horizontalPageBreakRepeat) !== null && s !== void 0 ? s : null;
401
+ var C = (a = t.useCss) !== null && a !== void 0 ? a : !1, c = t.theme || (C ? "plain" : "striped"), x = !!t.horizontalPageBreak, rt = (s = t.horizontalPageBreakRepeat) !== null && s !== void 0 ? s : null;
402
402
  return {
403
403
  includeHiddenHtml: (h = t.includeHiddenHtml) !== null && h !== void 0 ? h : !1,
404
- useCss: x,
404
+ useCss: C,
405
405
  theme: c,
406
406
  startY: m,
407
407
  margin: d,
@@ -412,7 +412,7 @@ function dt(e, t) {
412
412
  showFoot: p,
413
413
  tableLineWidth: (g = t.tableLineWidth) !== null && g !== void 0 ? g : 0,
414
414
  tableLineColor: (u = t.tableLineColor) !== null && u !== void 0 ? u : 200,
415
- horizontalPageBreak: C,
415
+ horizontalPageBreak: x,
416
416
  horizontalPageBreakRepeat: rt,
417
417
  horizontalPageBreakBehaviour: (v = t.horizontalPageBreakBehaviour) !== null && v !== void 0 ? v : "afterAllRows"
418
418
  };
@@ -604,8 +604,8 @@ var A = (
604
604
  }, e;
605
605
  }()
606
606
  );
607
- function xt(e, t) {
608
- Ct(e, t);
607
+ function Ct(e, t) {
608
+ xt(e, t);
609
609
  var r = [], i = 0;
610
610
  t.columns.forEach(function(a) {
611
611
  var s = a.getMaxCustomCellWidth(t);
@@ -618,7 +618,7 @@ function xt(e, t) {
618
618
  return a.minWidth;
619
619
  })), n = Math.abs(n), !t.settings.horizontalPageBreak && n > 0.1 / e.scaleFactor() && (n = n < 1 ? n : Math.round(n), console.log("Of the table content, ".concat(n, " units width could not fit page"))), Ht(t), Dt(t, e), Pt(t);
620
620
  }
621
- function Ct(e, t) {
621
+ function xt(e, t) {
622
622
  var r = e.scaleFactor(), i = t.settings.horizontalPageBreak, n = U(e, t);
623
623
  t.allRows().forEach(function(a) {
624
624
  for (var s = 0, h = t.columns; s < h.length; s++) {
@@ -747,7 +747,7 @@ function Wt(e, t, r, i, n) {
747
747
  }
748
748
  function V(e, t) {
749
749
  var r = new P(e), i = Ft(t, r.scaleFactor()), n = new wt(t, i);
750
- return xt(r, n), r.applyStyles(r.userStyles), n;
750
+ return Ct(r, n), r.applyStyles(r.userStyles), n;
751
751
  }
752
752
  function Ft(e, t) {
753
753
  var r = e.content, i = kt(r.columns);
@@ -775,11 +775,11 @@ function k(e, t, r, i, n, a) {
775
775
  if (v === 0) {
776
776
  var y = void 0;
777
777
  Array.isArray(f) ? y = f[p.index - u - l] : y = f[p.dataKey];
778
- var x = {};
779
- typeof y == "object" && !Array.isArray(y) && (x = (y == null ? void 0 : y.styles) || {});
780
- var c = Rt(e, p, o, n, i, a, x), C = new Z(y, c, e);
781
- g[p.dataKey] = C, g[p.index] = C, v = C.colSpan - 1, s[p.index] = {
782
- left: C.rowSpan - 1,
778
+ var C = {};
779
+ typeof y == "object" && !Array.isArray(y) && (C = (y == null ? void 0 : y.styles) || {});
780
+ var c = Rt(e, p, o, n, i, a, C), x = new Z(y, c, e);
781
+ g[p.dataKey] = x, g[p.index] = x, v = x.colSpan - 1, s[p.index] = {
782
+ left: x.rowSpan - 1,
783
783
  times: v
784
784
  };
785
785
  } else
@@ -908,11 +908,14 @@ function jt(e, t, r, i, n) {
908
908
  }
909
909
  function N(e, t, r, i, n, a) {
910
910
  e.applyStyles(e.userStyles), a = a ?? t.body.length;
911
- var s = Math.min(r + a, t.body.length), h = -1;
912
- return t.body.slice(r, s).forEach(function(f, o) {
913
- var l = r + o === t.body.length - 1, g = et(e, t, l, i);
914
- f.canEntireRowFit(g, n) && (S(e, t, f, i, n), h = r + o);
915
- }), h;
911
+ for (var s = Math.min(r + a, t.body.length), h = -1, f = t.body.slice(r, s), o = 0; o < f.length; o++) {
912
+ var l = f[o], g = r + o === t.body.length - 1, u = et(e, t, g, i);
913
+ if (l.canEntireRowFit(u, n))
914
+ S(e, t, l, i, n), h = r + o;
915
+ else
916
+ break;
917
+ }
918
+ return h;
916
919
  }
917
920
  function R(e, t, r, i) {
918
921
  var n = t.settings;