@beda.software/web-item-controls 0.1.19 → 0.1.20
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/controls/GroupTable/hooks.js +22 -22
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -37,11 +37,11 @@ function ve() {
|
|
|
37
37
|
const m = p.key.toString(), E = a[m];
|
|
38
38
|
if (!E)
|
|
39
39
|
return p;
|
|
40
|
-
const h = Xe(E), C = F[m],
|
|
40
|
+
const h = Xe(E), C = F[m], D = h ? (R) => /* @__PURE__ */ b(qe, { ...R, filter: h, onChange: (W, O) => d(W, O, h) }) : void 0, V = !!((w = F[m]) != null && w.value);
|
|
41
41
|
return {
|
|
42
42
|
...p,
|
|
43
|
-
filterDropdown:
|
|
44
|
-
filtered:
|
|
43
|
+
filterDropdown: D,
|
|
44
|
+
filtered: V,
|
|
45
45
|
filteredValue: C ? [m] : [],
|
|
46
46
|
onFilter: (R, W) => {
|
|
47
47
|
if (!s.isString(R))
|
|
@@ -114,7 +114,7 @@ function Je(F) {
|
|
|
114
114
|
t.disconnect(), l.current = null;
|
|
115
115
|
};
|
|
116
116
|
}, [u]);
|
|
117
|
-
const
|
|
117
|
+
const D = g((t) => (e) => {
|
|
118
118
|
const r = l.current, o = f.current[t];
|
|
119
119
|
o && o !== e && r && (r.unobserve(o), i.current.delete(o)), e ? (f.current[t] = e, i.current.set(e, t), r == null || r.observe(e)) : (o && i.current.delete(o), delete f.current[t]);
|
|
120
120
|
}, []);
|
|
@@ -132,7 +132,7 @@ function Je(F) {
|
|
|
132
132
|
return r.length === e.length ? e : r;
|
|
133
133
|
});
|
|
134
134
|
}, [d]);
|
|
135
|
-
const
|
|
135
|
+
const V = g(() => {
|
|
136
136
|
const t = a.current + u, e = {};
|
|
137
137
|
Object.entries(f.current).forEach(([r, o]) => {
|
|
138
138
|
o && (e[r] = o.clientHeight > t);
|
|
@@ -143,19 +143,19 @@ function Je(F) {
|
|
|
143
143
|
}, [u]);
|
|
144
144
|
z(() => {
|
|
145
145
|
const t = () => {
|
|
146
|
-
|
|
146
|
+
V();
|
|
147
147
|
};
|
|
148
148
|
return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
149
|
-
}, [
|
|
149
|
+
}, [V]);
|
|
150
150
|
const M = g((t) => {
|
|
151
151
|
var o;
|
|
152
152
|
const e = p[t];
|
|
153
153
|
return e !== void 0 ? e : (((o = f.current[t]) == null ? void 0 : o.clientHeight) ?? 0) > y + u;
|
|
154
154
|
}, [u, y, p]), I = g(() => {
|
|
155
155
|
requestAnimationFrame(() => {
|
|
156
|
-
requestAnimationFrame(
|
|
156
|
+
requestAnimationFrame(V);
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
158
|
+
}, [V]), N = g((t, e) => {
|
|
159
159
|
h((r) => t ? r.includes(e) ? r : [...r, e] : r.includes(e) ? r.filter((o) => o !== e) : r);
|
|
160
160
|
}, []), w = g(() => {
|
|
161
161
|
const t = d.map((e) => e.key).filter((e) => M(e));
|
|
@@ -164,7 +164,7 @@ function Je(F) {
|
|
|
164
164
|
h((t) => t.length === 0 ? t : []);
|
|
165
165
|
}, []), W = S(() => d.map((t) => t.key).filter((t) => M(t)), [d, M]), O = W.length > 0, _ = S(() => new Set(E.map(String)), [E]), B = O && W.every((t) => _.has(t)), Z = E.length > 0;
|
|
166
166
|
return {
|
|
167
|
-
observeRow:
|
|
167
|
+
observeRow: D,
|
|
168
168
|
rowHeightExceedsMaxHeight: M,
|
|
169
169
|
handleRowHeightRecompute: I,
|
|
170
170
|
handleRowExpand: N,
|
|
@@ -189,13 +189,13 @@ function ut(F) {
|
|
|
189
189
|
text: a,
|
|
190
190
|
hidden: p,
|
|
191
191
|
item: m
|
|
192
|
-
} = d, E = a || l, h = S(() => [...y, l], [y, l]), C = (ue = d.enableChart) == null ? void 0 : ue.linkIdX,
|
|
192
|
+
} = d, E = a || l, h = S(() => [...y, l], [y, l]), C = (ue = d.enableChart) == null ? void 0 : ue.linkIdX, D = (pe = d.enableChart) == null ? void 0 : pe.linkIdY, V = Be(d), M = d.chartHighlight, {
|
|
193
193
|
onChange: I
|
|
194
194
|
} = _e(h, d), {
|
|
195
195
|
control: N,
|
|
196
196
|
getValues: w,
|
|
197
197
|
reset: R
|
|
198
|
-
} = Ge(), [W, O] = P(!C && !
|
|
198
|
+
} = Ge(), [W, O] = P(!C && !D), [_, B] = P(!1), [Z, t] = P(void 0), [e, r] = P(null), [o, k] = P(null), {
|
|
199
199
|
populateColumnWithFilters: H
|
|
200
200
|
} = ve(), {
|
|
201
201
|
populateColumnWithSorters: X
|
|
@@ -223,9 +223,9 @@ function ut(F) {
|
|
|
223
223
|
const n = s.cloneDeep(w());
|
|
224
224
|
s.set(n, h, s.cloneDeep(e)), R(n, {
|
|
225
225
|
keepDirty: !0
|
|
226
|
-
}), I({
|
|
226
|
+
}), I(s.cloneDeep({
|
|
227
227
|
items: e ?? void 0
|
|
228
|
-
}), r(null), k(null), t(void 0), B(!1);
|
|
228
|
+
})), r(null), k(null), t(void 0), B(!1);
|
|
229
229
|
}, [h, w, I, R, e]), Ce = g(() => {
|
|
230
230
|
r(null), k(null);
|
|
231
231
|
const n = w();
|
|
@@ -282,7 +282,7 @@ function ut(F) {
|
|
|
282
282
|
};
|
|
283
283
|
}), x = X(n, d);
|
|
284
284
|
return H(x, d);
|
|
285
|
-
})(),
|
|
285
|
+
})(), De = S(() => {
|
|
286
286
|
const n = q == null ? void 0 : q.find((c) => c.type === "text"), x = n == null ? void 0 : n.linkId;
|
|
287
287
|
if (x)
|
|
288
288
|
return {
|
|
@@ -322,20 +322,20 @@ function ut(F) {
|
|
|
322
322
|
}
|
|
323
323
|
) }) })
|
|
324
324
|
] })
|
|
325
|
-
}), [Y, L, $]),
|
|
326
|
-
if (!(!C || !
|
|
325
|
+
}), [Y, L, $]), Ve = S(() => [...ce, de], [de, ce]), Me = S(() => {
|
|
326
|
+
if (!(!C || !D))
|
|
327
327
|
return (n) => {
|
|
328
328
|
O(n);
|
|
329
329
|
};
|
|
330
|
-
}, [C,
|
|
330
|
+
}, [C, D]);
|
|
331
331
|
return {
|
|
332
332
|
repeats: i,
|
|
333
333
|
hidden: p,
|
|
334
334
|
title: E,
|
|
335
335
|
handleAdd: He,
|
|
336
336
|
dataSource: G,
|
|
337
|
-
columns:
|
|
338
|
-
expandable:
|
|
337
|
+
columns: Ve,
|
|
338
|
+
expandable: De,
|
|
339
339
|
isModalVisible: _,
|
|
340
340
|
editIndex: Z,
|
|
341
341
|
handleCancel: ke,
|
|
@@ -349,8 +349,8 @@ function ut(F) {
|
|
|
349
349
|
isAllExpandableRowsExpanded: Se,
|
|
350
350
|
hasExpandedRows: Fe,
|
|
351
351
|
chartLinkIdX: C,
|
|
352
|
-
chartLinkIdY:
|
|
353
|
-
chartYRange:
|
|
352
|
+
chartLinkIdY: D,
|
|
353
|
+
chartYRange: V,
|
|
354
354
|
chartHighlightAreas: M
|
|
355
355
|
};
|
|
356
356
|
}
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._row_dy31e_1{display:flex}._inputWrapper_dy31e_5{flex:auto}._splitterWrapper_dy31e_9{display:flex;flex-direction:column;justify-content:flex-end}._splitter_dy31e_9{position:relative;bottom:22px;margin:0 8px;font-weight:400;font-size:20px;line-height:22px}._group_1ndd9_1{display:flex;flex-direction:column;gap:16px;width:100%}._groupTitle_1ndd9_8{font-weight:700;font-size:16px;line-height:24px}._row_1ndd9_14{display:flex;flex-direction:row;justify-content:space-between;gap:16px;width:100%}._col_1ndd9_22{display:flex;flex-direction:column;gap:16px}._form_1v4sy_1 .ant-form-item-label{font-weight:700}._form_1v4sy_1 .ant-form-item-row{flex:1;flex-direction:column;justify-content:space-between;gap:12px}._form_1v4sy_1 .ant-form-item-label{text-align:start;white-space:normal}._form_1v4sy_1 .ant-form-item-label label{display:flex;height:auto}._form_1v4sy_1 .ant-form-item-label label:after{display:none}._form_1v4sy_1 .ant-form-item-control{flex-grow:0}._content_1v4sy_25{display:flex;flex-direction:column;gap:24px}._field_1v4sy_31{width:100%;margin-bottom:0;display:flex}._field_1v4sy_31.__hidden_1v4sy_36{display:none}._inputContainer_gs0vq_1{display:flex;flex-direction:column}._inputHeader_gs0vq_6{display:flex;margin-bottom:12px;align-items:center;justify-content:space-between}._label_gs0vq_13{font-weight:700;font-size:14px;line-height:22px}._column_14bfg_1{display:flex;flex-direction:column}._row_14bfg_6{display:flex;flex-direction:row;justify-content:space-between;align-items:center}._questionText_14bfg_13{font-weight:700;margin:0}._answer_14bfg_18{display:block;min-width:40%;max-width:40%}.ant-dropdown .ant-table-filter-dropdown{border:0;background:none;box-shadow:none;position:relative;overflow:visible}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beda.software/web-item-controls",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@babel/preset-typescript": "^7.26.0",
|
|
73
|
-
"@beda.software/fhir-questionnaire": "^0.1.0-alpha.
|
|
73
|
+
"@beda.software/fhir-questionnaire": "^0.1.0-alpha.10",
|
|
74
74
|
"@beda.software/fhir-react": "^1.11.1",
|
|
75
75
|
"@beda.software/vite-plugin-dts": "4.0.0-beta.1",
|
|
76
76
|
"@chromatic-com/storybook": "^3.2.2",
|