@isi-ui7/bos7-shared 0.3.11 → 0.4.1

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.
@@ -127,6 +127,11 @@ export type CrudListSchema = {
127
127
  * "(all)" removes the param. Mirrors `showInactiveToggle`'s additionalParams
128
128
  * wiring but for an arbitrary enum column (e.g. `vendor_type`). Additive +
129
129
  * backward-compatible: omit it and the toolbar renders exactly as before.
130
+ *
131
+ * @deprecated Use `filterFields` (a single `{ type: "select", ... }` entry
132
+ * covers this exact case). Kept working, unchanged, so existing callers
133
+ * never have to move — the two coexist because they write to different
134
+ * query params and share the same additionalParams merge.
130
135
  */
131
136
  filterSelect?: {
132
137
  /** Query param name the backend reads (e.g. "vendor_type"). */
@@ -140,6 +145,51 @@ export type CrudListSchema = {
140
145
  /** Label for the "no filter" option. Default "Semua". */
141
146
  allLabel?: string;
142
147
  };
148
+ /**
149
+ * Granular toolbar filters: N independent fields, each contributing one
150
+ * query param via the SAME additionalParams merge `filterSelect` and
151
+ * `showInactiveToggle` already use — `@isi-ui7/data-table` is untouched.
152
+ * Additive + backward-compatible: omit it and the toolbar renders exactly
153
+ * as before. Coexists with `filterSelect`/`showInactiveToggle` as long as
154
+ * `param` names don't collide (caller's responsibility, same as today).
155
+ *
156
+ * K-6 (user, 2026-08-26): prototype daftar nasabah wants filtering finer
157
+ * than one search bar + one dropdown. `filterSelect` proved the mechanism
158
+ * for exactly one enum column; this generalizes it to N fields of mixed
159
+ * type instead of duplicating that mechanism per field. The union is
160
+ * closed but extensible — a new variant (e.g. `dateRange`) is additive to
161
+ * this type, not a breaking change to it.
162
+ *
163
+ * ⚠️ This is FRONTEND capacity only. Each `param` still needs the target
164
+ * service's own query endpoint to read it and filter server-side — adding
165
+ * a field here does nothing until the backend honors that param.
166
+ */
167
+ filterFields?: CrudFilterFieldDef[];
168
+ };
169
+ /**
170
+ * One granular toolbar filter field (see `CrudListSchema.filterFields`).
171
+ * Closed union so a new widget type is additive here, not a breaking change
172
+ * to `CrudListSchema` itself.
173
+ */
174
+ export type CrudFilterFieldDef = {
175
+ type: "select";
176
+ /** Query param name the backend reads. */
177
+ param: string;
178
+ /** Toolbar label for the field. */
179
+ label: string;
180
+ options: Array<{
181
+ value: string;
182
+ label: string;
183
+ }>;
184
+ /** Label for the "no filter" option. Default "Semua". */
185
+ allLabel?: string;
186
+ } | {
187
+ type: "text";
188
+ /** Query param name the backend reads. */
189
+ param: string;
190
+ /** Toolbar label for the field. */
191
+ label: string;
192
+ placeholder?: string;
143
193
  };
144
194
  export type CrudDeleteSchema<TData extends Record<string, unknown>> = {
145
195
  /** Omit to use i18n default ("Konfirmasi Hapus"). */
@@ -31,4 +31,15 @@ export declare function getLayoutPageCount<TData extends Record<string, unknown>
31
31
  * sebagai titik waktu, dan di situlah pergeserannya lahir.
32
32
  */
33
33
  export declare function toLocalISODate(date: Date | undefined | null): string;
34
+ /**
35
+ * Kebalikan `toLocalISODate` — mem-parse "YYYY-MM-DD" jadi `Date` lokal
36
+ * (bukan `new Date(iso)` yang mem-parse sbg UTC dan bisa menggeser sehari,
37
+ * kelas bug yang sama dgn di atas, arah terbalik).
38
+ *
39
+ * Dipakai supaya prop `value` DatePicker Carbon menerima `Date`, BUKAN
40
+ * string ISO mentah — string ISO yang diberikan ke DatePicker dgn
41
+ * `dateFormat="d-m-Y"` di-parse ULANG flatpickr SEOLAH ia format d-m-Y,
42
+ * menghasilkan tanggal lain sama sekali (laporan DG-00, agent7 2026-08-31).
43
+ */
44
+ export declare function fromLocalISODate(iso: string | undefined | null): Date | undefined;
34
45
  export {};
@@ -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-C5VEsLZd.js").then((o) => o.j), { default: w } = await import("./jspdf.plugin.autotable-DcntYaes.js"), c = new x({ orientation: "landscape" });
27394
+ const { default: x } = await import("./jspdf.es.min-CCBzPHw4.js").then((o) => o.j), { default: w } = await import("./jspdf.plugin.autotable-DFaknRns.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))),
@@ -28698,77 +28698,77 @@ async function rl(M, L) {
28698
28698
  return o.columnTypes = { ...a, ...L.extraColumnTypes }, Dt.NextResponse.json(o, { status: c.status });
28699
28699
  }
28700
28700
  export {
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,
28701
+ Wi as $,
28702
+ vo as A,
28703
+ Lo as B,
28704
+ Vo as C,
28705
+ wi as D,
28706
+ io as E,
28707
+ Jr as F,
28708
+ Oo as G,
28709
+ Io as H,
28710
+ jo as I,
28711
+ Bo as J,
28712
+ uo as K,
28713
+ ho as L,
28714
+ dr as M,
28715
+ ga as N,
28716
28716
  go as O,
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,
28717
+ ko as P,
28718
+ qo as Q,
28719
+ xa as R,
28720
+ Sa as S,
28721
+ ao as T,
28722
+ Wo as U,
28723
+ Ko as V,
28724
+ Go as W,
28725
+ Yo as X,
28726
+ Zo as Y,
28727
+ xo as Z,
28728
+ Do as _,
28729
+ Xo as a,
28730
+ _a as a0,
28731
+ Uo as a1,
28732
+ wa as a2,
28733
+ Qa as a3,
28734
+ rl as a4,
28735
+ Po as a5,
28736
+ $i as a6,
28737
+ _o as a7,
28738
+ Ho as a8,
28739
+ so as a9,
28740
+ Jo as aa,
28741
+ wo as ab,
28742
+ lo as ac,
28743
+ qi as ad,
28744
+ Fi as ae,
28745
+ En as af,
28746
+ tl as ag,
28747
+ Fo as ah,
28748
+ fo as ai,
28749
+ Bi as b,
28750
28750
  Ze as c,
28751
- fo as d,
28752
- ho as e,
28753
- po as f,
28751
+ yo as d,
28752
+ To as e,
28753
+ Eo as f,
28754
28754
  Qi as g,
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
28755
+ So as h,
28756
+ Bt as i,
28757
+ $o as j,
28758
+ zo as k,
28759
+ Qo as l,
28760
+ Mo as m,
28761
+ Ao as n,
28762
+ Co as o,
28763
+ Ro as p,
28764
+ no as q,
28765
+ el as r,
28766
+ Za as s,
28767
+ No as t,
28768
+ mo as u,
28769
+ co as v,
28770
+ po as w,
28771
+ oo as x,
28772
+ ya as y,
28773
+ bo as z
28774
28774
  };
@@ -1,5 +1,5 @@
1
- import { c as Ke, g as Do } from "./index-C_114Ysm.js";
2
- import { _ as Xa } from "./jspdf.es.min-C5VEsLZd.js";
1
+ import { c as Ke, g as Do } from "./index-DqWPV29B.js";
2
+ import { _ as Xa } from "./jspdf.es.min-CCBzPHw4.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 { 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";
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-DqWPV29B.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-CiEWEeUM.js")).catch(function(l) {
8509
+ return (Kt.DOMPurify ? Promise.resolve(Kt.DOMPurify) : import("./purify.es-Cm3utOpm.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-B-MluT1E.js")).catch(function(k) {
9219
+ return (Kt.canvg ? Promise.resolve(Kt.canvg) : import("./index.es-9cvhYbjn.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 C = (i.fontFamily || "").toLowerCase();
260
- return e.indexOf(C) !== -1 && (a.font = C), a;
259
+ var x = (i.fontFamily || "").toLowerCase();
260
+ return e.indexOf(x) !== -1 && (a.font = x), 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 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;
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;
402
402
  return {
403
403
  includeHiddenHtml: (h = t.includeHiddenHtml) !== null && h !== void 0 ? h : !1,
404
- useCss: C,
404
+ useCss: x,
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: x,
415
+ horizontalPageBreak: C,
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 Ct(e, t) {
608
- xt(e, t);
607
+ function xt(e, t) {
608
+ Ct(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 Ct(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 xt(e, t) {
621
+ function Ct(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 Ct(r, n), r.applyStyles(r.userStyles), n;
750
+ return xt(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 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,
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,
783
783
  times: v
784
784
  };
785
785
  } else
@@ -908,14 +908,11 @@ 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
- 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;
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;
919
916
  }
920
917
  function R(e, t, r, i) {
921
918
  var n = t.settings;