@oliasoft-open-source/react-ui-library 9.2.0-beta-6 → 9.2.0-beta-8
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/index.js
CHANGED
|
@@ -2566,21 +2566,21 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
|
|
|
2566
2566
|
]
|
|
2567
2567
|
}) : null });
|
|
2568
2568
|
}, Ks = {
|
|
2569
|
-
inputInTable: "
|
|
2570
|
-
inputHover: "
|
|
2571
|
-
inputFocus: "
|
|
2572
|
-
controlFocusVisible: "
|
|
2573
|
-
inputError: "
|
|
2574
|
-
inputWarning: "
|
|
2575
|
-
inputDisabled: "
|
|
2576
|
-
hideScrollbars: "
|
|
2577
|
-
wrapper: "
|
|
2578
|
-
bordered: "
|
|
2579
|
-
scroll: "
|
|
2580
|
-
virtualScroll: "
|
|
2581
|
-
table: "
|
|
2582
|
-
dragOverlay: "
|
|
2583
|
-
striped: "
|
|
2569
|
+
inputInTable: "_inputInTable_mq0ls_1",
|
|
2570
|
+
inputHover: "_inputHover_mq0ls_13",
|
|
2571
|
+
inputFocus: "_inputFocus_mq0ls_18",
|
|
2572
|
+
controlFocusVisible: "_controlFocusVisible_mq0ls_25",
|
|
2573
|
+
inputError: "_inputError_mq0ls_29",
|
|
2574
|
+
inputWarning: "_inputWarning_mq0ls_30",
|
|
2575
|
+
inputDisabled: "_inputDisabled_mq0ls_65",
|
|
2576
|
+
hideScrollbars: "_hideScrollbars_mq0ls_71",
|
|
2577
|
+
wrapper: "_wrapper_mq0ls_89",
|
|
2578
|
+
bordered: "_bordered_mq0ls_97",
|
|
2579
|
+
scroll: "_scroll_mq0ls_102",
|
|
2580
|
+
virtualScroll: "_virtualScroll_mq0ls_113",
|
|
2581
|
+
table: "_table_mq0ls_116",
|
|
2582
|
+
dragOverlay: "_dragOverlay_mq0ls_152",
|
|
2583
|
+
striped: "_striped_mq0ls_207"
|
|
2584
2584
|
}, qs = { title: "_title_zn5s7_1" }, Js = ({ name: e = null, actions: t = null, actionsRight: n = !1, testId: r }) => {
|
|
2585
2585
|
let i = e !== null, a = t !== null;
|
|
2586
2586
|
return !i && !a ? null : /* @__PURE__ */ C("div", {
|
|
@@ -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