@oliasoft-open-source/react-ui-library 9.2.0-beta-6 → 9.2.0-beta-7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/row/row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/row/row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAKtD,OAAO,EAAgC,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAQjH,UAAU,mBAAmB;IAC3B,IAAI,GAAG,CAAC;IACR,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAOD,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;IAC9E,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,GAAG;QACtD,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,eAAe,CAAC,EAAE;QAChB,OAAO,EAAE,SAAS,CAAC;QACnB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,QAAQ,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC;IAC/C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,CAAC;CACzD;AAgDD,eAAO,MAAM,GAAG,GAAI,oLAejB,cAAc,4CA+IhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-virtual-scroll-wrapper.d.ts","sourceRoot":"","sources":["../../../src/components/table/table-virtual-scroll-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAU,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAkB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE;QAChB,WAAW,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACnD,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAClC,KAAK,SAAS,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"table-virtual-scroll-wrapper.d.ts","sourceRoot":"","sources":["../../../src/components/table/table-virtual-scroll-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAU,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAkB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE;QAChB,WAAW,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACnD,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAClC,KAAK,SAAS,CAAC;CACjB;AAQD,eAAO,MAAM,yBAAyB,GAAI,qBAAqB,+BAA+B,4CAwD7F,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4170,8 +4170,8 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4170
4170
|
}));
|
|
4171
4171
|
}
|
|
4172
4172
|
};
|
|
4173
|
-
}, Jl = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths:
|
|
4174
|
-
let
|
|
4173
|
+
}, Jl = ({ row: e, rowIndex: t, isHeader: n = !1, columnCount: r, colSpan: i, columnHeaderAlignments: a = [], columnAlignment: o = [], hasRowActions: s, draggableTable: c = !1, columnWidths: u, dropDisabled: d = !1, height: f, testId: p, measureRef: m }) => {
|
|
4174
|
+
let h = _l(a, n, t), { onRowClick: g, onRowFocus: _, onRowMouseEnter: v, onRowMouseLeave: y, expandedContent: w, error: T, warning: E, active: D } = e, O = e.cells.map((e, r) => {
|
|
4175
4175
|
let i = `${+!n}_${t}_${r}`, a = n ? e : ql({
|
|
4176
4176
|
cell: e,
|
|
4177
4177
|
rowIndex: t,
|
|
@@ -4181,74 +4181,78 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4181
4181
|
cell: a,
|
|
4182
4182
|
isHeader: n,
|
|
4183
4183
|
columnAlignment: o[r],
|
|
4184
|
-
columnHeaderAlignment:
|
|
4185
|
-
width:
|
|
4184
|
+
columnHeaderAlignment: h[r],
|
|
4185
|
+
width: u ? u[r] : void 0,
|
|
4186
4186
|
testId: e.testId
|
|
4187
4187
|
}, i);
|
|
4188
|
-
}),
|
|
4188
|
+
}), k = s && /* @__PURE__ */ S(Wl, {
|
|
4189
4189
|
cell: {
|
|
4190
4190
|
type: Ul.ACTIONS,
|
|
4191
4191
|
actions: e.actions
|
|
4192
4192
|
},
|
|
4193
4193
|
isHeader: n
|
|
4194
|
-
}, r), { attributes:
|
|
4194
|
+
}, r), { attributes: A, listeners: j, setNodeRef: M, transform: N, transition: P, isDragging: F } = Nr({
|
|
4195
4195
|
id: t.toString(),
|
|
4196
4196
|
animateLayoutChanges: () => !1
|
|
4197
|
-
}),
|
|
4198
|
-
e.noDrag ||
|
|
4199
|
-
},
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4197
|
+
}), I = l((t) => {
|
|
4198
|
+
e.noDrag || M(t), m == null || m(t);
|
|
4199
|
+
}, [
|
|
4200
|
+
e.noDrag,
|
|
4201
|
+
M,
|
|
4202
|
+
m
|
|
4203
|
+
]), L = m ? I : e.noDrag ? null : M, R = {
|
|
4204
|
+
transform: d ? void 0 : Fr.Translate.toString(N),
|
|
4205
|
+
height: f,
|
|
4206
|
+
transition: P,
|
|
4207
|
+
opacity: F ? 0 : void 0
|
|
4204
4208
|
};
|
|
4205
4209
|
return n ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("tr", {
|
|
4206
|
-
onClick:
|
|
4207
|
-
onMouseEnter:
|
|
4208
|
-
onMouseLeave:
|
|
4209
|
-
onFocus:
|
|
4210
|
-
"data-testid":
|
|
4211
|
-
className: b(
|
|
4210
|
+
onClick: g,
|
|
4211
|
+
onMouseEnter: v,
|
|
4212
|
+
onMouseLeave: y,
|
|
4213
|
+
onFocus: _,
|
|
4214
|
+
"data-testid": p,
|
|
4215
|
+
className: b(g ? ml.clickableRow : null, v ? ml.hoverableRow : null),
|
|
4212
4216
|
children: [
|
|
4213
4217
|
c ? /* @__PURE__ */ S("th", {}) : null,
|
|
4214
|
-
|
|
4215
|
-
|
|
4218
|
+
O,
|
|
4219
|
+
k
|
|
4216
4220
|
]
|
|
4217
|
-
}, t),
|
|
4221
|
+
}, t), w && w.content ? /* @__PURE__ */ S(hl, {
|
|
4218
4222
|
colSpan: i,
|
|
4219
|
-
flush:
|
|
4220
|
-
children:
|
|
4223
|
+
flush: w.flush === !0,
|
|
4224
|
+
children: w.content
|
|
4221
4225
|
}, `${t}_expanded_content`) : null] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("tr", {
|
|
4222
|
-
ref:
|
|
4223
|
-
onClick:
|
|
4224
|
-
onMouseEnter:
|
|
4225
|
-
onMouseLeave:
|
|
4226
|
-
onFocus:
|
|
4227
|
-
className: b(
|
|
4228
|
-
"data-active":
|
|
4229
|
-
"data-error":
|
|
4230
|
-
"data-warning":
|
|
4226
|
+
ref: L,
|
|
4227
|
+
onClick: g,
|
|
4228
|
+
onMouseEnter: v,
|
|
4229
|
+
onMouseLeave: y,
|
|
4230
|
+
onFocus: _,
|
|
4231
|
+
className: b(g && !g.noStyle ? ml.clickableRow : null, v && !v.noStyle ? ml.hoverableRow : null, D ? ml.rowActive : null),
|
|
4232
|
+
"data-active": D || null,
|
|
4233
|
+
"data-error": T || null,
|
|
4234
|
+
"data-warning": E || null,
|
|
4231
4235
|
"data-index": t,
|
|
4232
4236
|
"data-even": t % 2 == 0,
|
|
4233
|
-
"data-testid":
|
|
4234
|
-
style:
|
|
4237
|
+
"data-testid": p,
|
|
4238
|
+
style: R,
|
|
4235
4239
|
children: [
|
|
4236
4240
|
c ? e.noDrag ? /* @__PURE__ */ S("td", { "aria-labelledby": "unique-label-id" }) : /* @__PURE__ */ S("td", {
|
|
4237
4241
|
className: ml.dragIconCell,
|
|
4238
4242
|
children: /* @__PURE__ */ S("div", {
|
|
4239
|
-
className: b(ml.dragIcon,
|
|
4240
|
-
...k,
|
|
4243
|
+
className: b(ml.dragIcon, d ? ml.dragIconDisabled : ""),
|
|
4241
4244
|
...A,
|
|
4245
|
+
...j,
|
|
4242
4246
|
children: /* @__PURE__ */ S(G, { icon: U.DRAG })
|
|
4243
4247
|
})
|
|
4244
4248
|
}) : null,
|
|
4245
|
-
|
|
4246
|
-
|
|
4249
|
+
O,
|
|
4250
|
+
k
|
|
4247
4251
|
]
|
|
4248
|
-
}, t),
|
|
4252
|
+
}, t), w && w.content ? /* @__PURE__ */ S(hl, {
|
|
4249
4253
|
colSpan: i,
|
|
4250
|
-
flush:
|
|
4251
|
-
children:
|
|
4254
|
+
flush: w.flush === !0,
|
|
4255
|
+
children: w.content
|
|
4252
4256
|
}, `${t}_expanded_content`) : null] });
|
|
4253
4257
|
}, Yl = (e) => {
|
|
4254
4258
|
let { children: t, colSpan: n, columnAlignment: r, columnCount: i, draggable: a, onListReorder: o = () => {}, canListReorder: s = () => !0, rowActions: c, rows: l = [], tbodyRef: u } = e, [d, f] = v(null), [p, m] = v(!1), g = h(() => l.map((e, t) => t.toString()), [l]);
|
|
@@ -4307,27 +4311,27 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4307
4311
|
}) : t({});
|
|
4308
4312
|
}, Xl = 31, Zl = 2, Ql = ({ table: e, children: t }) => {
|
|
4309
4313
|
var n;
|
|
4310
|
-
let r = _(null), i = _(/* @__PURE__ */ new Map()), { estimateRowHeight: a, rowCount: o, rows: s } = e, c = (n = o == null ? s == null ? void 0 : s.length : o) == null ? 0 : n, l = (e) => {
|
|
4314
|
+
let r = _(null), i = _(/* @__PURE__ */ new Map()), { estimateRowHeight: a, rowCount: o, rows: s } = e, c = (n = o == null ? s == null ? void 0 : s.length : o) == null ? 0 : n, l = !!a, u = (e) => {
|
|
4311
4315
|
var t, n;
|
|
4312
4316
|
return (t = (n = i.current.get(e)) == null ? a == null ? void 0 : a(e) : n) == null ? Xl : t;
|
|
4313
|
-
},
|
|
4317
|
+
}, d = Jr({
|
|
4314
4318
|
count: c,
|
|
4315
4319
|
getScrollElement: () => r.current,
|
|
4316
|
-
estimateSize: l,
|
|
4317
|
-
measureElement: (e) => {
|
|
4318
|
-
let t = e.getAttribute("data-index"), n = t == null ? -1 : Number(t), r = Math.ceil(e.getBoundingClientRect().height), a = n >= 0 ?
|
|
4320
|
+
estimateSize: l ? u : () => Xl,
|
|
4321
|
+
...l ? { measureElement: (e) => {
|
|
4322
|
+
let t = e.getAttribute("data-index"), n = t == null ? -1 : Number(t), r = Math.ceil(e.getBoundingClientRect().height), a = n >= 0 ? u(n) : Xl, o = Math.abs(r - a) <= Zl ? a : r;
|
|
4319
4323
|
return n >= 0 && i.current.set(n, o), o;
|
|
4320
|
-
},
|
|
4324
|
+
} } : {},
|
|
4321
4325
|
overscan: 10
|
|
4322
4326
|
});
|
|
4323
|
-
return
|
|
4327
|
+
return l && (d.shouldAdjustScrollPositionOnItemSizeChange = () => !1), /* @__PURE__ */ S("div", {
|
|
4324
4328
|
id: "scrollWrapper",
|
|
4325
4329
|
className: b(Ks.scroll, Ks.virtualScroll),
|
|
4326
4330
|
ref: r,
|
|
4327
4331
|
children: t({
|
|
4328
|
-
virtualizer:
|
|
4332
|
+
virtualizer: d,
|
|
4329
4333
|
tableStyle: (() => {
|
|
4330
|
-
let e =
|
|
4334
|
+
let e = d.getVirtualItems(), t = e.length > 0 ? e[0].start : 0, n = e.length > 0 ? d.getTotalSize() - e[e.length - 1].end : 0;
|
|
4331
4335
|
return {
|
|
4332
4336
|
"--virtualPaddingTop": t + "px",
|
|
4333
4337
|
"--virtualPaddingBottom": n + "px"
|
|
@@ -4460,7 +4464,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
4460
4464
|
draggableTable: w,
|
|
4461
4465
|
height: n.size,
|
|
4462
4466
|
dropDisabled: e,
|
|
4463
|
-
measureRef: t.measureElement
|
|
4467
|
+
measureRef: l.estimateRowHeight ? t.measureElement : void 0
|
|
4464
4468
|
}, `1_${r}`);
|
|
4465
4469
|
}) : R.map((t, n) => {
|
|
4466
4470
|
let r = c ? c({
|
package/package.json
CHANGED