@ryuzaki13/react-foundation-ui 1.5.10 → 1.5.11
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/advanced-search/index.js +182 -148
- package/dist/advanced-search/index.js.map +1 -1
- package/dist/advanced-search/model/useAdvancedSearchSelection.d.ts +1 -1
- package/dist/advanced-search/model/useAdvancedSearchSelection.d.ts.map +1 -1
- package/dist/advanced-search/ui/AdvancedSearchModal.d.ts +12 -3
- package/dist/advanced-search/ui/AdvancedSearchModal.d.ts.map +1 -1
- package/dist/advanced-search/ui/AdvancedSearchModalSession.d.ts +15 -0
- package/dist/advanced-search/ui/AdvancedSearchModalSession.d.ts.map +1 -0
- package/dist/advanced-search/ui/AdvancedSearchSelect.d.ts.map +1 -1
- package/dist/badge/index.js +1 -1
- package/dist/base-table/index.js +1 -1
- package/dist/button/index.js +1 -1
- package/dist/check-box/index.js +1 -1
- package/dist/chunks/{CalendarView-BSshXZAX.js → CalendarView-DqA-PbAU.js} +42 -42
- package/dist/chunks/{CalendarView-BSshXZAX.js.map → CalendarView-DqA-PbAU.js.map} +1 -1
- package/dist/chunks/{ImageViewerRuntime-BMs3BBkV.js → ImageViewerRuntime-HGBWp9NM.js} +18 -18
- package/dist/chunks/{ImageViewerRuntime-BMs3BBkV.js.map → ImageViewerRuntime-HGBWp9NM.js.map} +1 -1
- package/dist/chunks/{TextEditorLexicalClient-CLjpATRu.js → TextEditorLexicalClient-B084kVzu.js} +322 -322
- package/dist/chunks/{TextEditorLexicalClient-CLjpATRu.js.map → TextEditorLexicalClient-B084kVzu.js.map} +1 -1
- package/dist/chunks/{badge-CaooZXYD.js → badge-DMM8cOHd.js} +16 -16
- package/dist/chunks/{badge-CaooZXYD.js.map → badge-DMM8cOHd.js.map} +1 -1
- package/dist/chunks/{base-table-fUJY__6M.js → base-table-CJdKCKhb.js} +125 -125
- package/dist/chunks/{base-table-fUJY__6M.js.map → base-table-CJdKCKhb.js.map} +1 -1
- package/dist/chunks/{button-C--u7uJj.js → button-CzUO5rzq.js} +17 -17
- package/dist/chunks/{button-C--u7uJj.js.map → button-CzUO5rzq.js.map} +1 -1
- package/dist/chunks/{check-box-BZiEBR9c.js → check-box-sfGjYczQ.js} +11 -11
- package/dist/chunks/{check-box-BZiEBR9c.js.map → check-box-sfGjYczQ.js.map} +1 -1
- package/dist/chunks/{context-menu-XZ-e0f6_.js → context-menu-6nJkPmKV.js} +83 -83
- package/dist/chunks/{context-menu-XZ-e0f6_.js.map → context-menu-6nJkPmKV.js.map} +1 -1
- package/dist/chunks/date-input-9T8AoG5U.js +341 -0
- package/dist/chunks/{date-input-Dr5QNVT6.js.map → date-input-9T8AoG5U.js.map} +1 -1
- package/dist/chunks/{input-BNszawm6.js → input-VC8jEoTa.js} +37 -37
- package/dist/chunks/{input-BNszawm6.js.map → input-VC8jEoTa.js.map} +1 -1
- package/dist/chunks/{input-files-DxLVr2PF.js → input-files-CoMjadk7.js} +22 -22
- package/dist/chunks/{input-files-DxLVr2PF.js.map → input-files-CoMjadk7.js.map} +1 -1
- package/dist/chunks/{input-search-C2OOhZlw.js → input-search-Bs_9SxT0.js} +2 -2
- package/dist/chunks/{input-search-C2OOhZlw.js.map → input-search-Bs_9SxT0.js.map} +1 -1
- package/dist/chunks/{misc-Cp_r022Z.js → misc-CkRRma5E.js} +55 -55
- package/dist/chunks/{misc-Cp_r022Z.js.map → misc-CkRRma5E.js.map} +1 -1
- package/dist/chunks/{modal-DK9M7lT5.js → modal-LHkNxBko.js} +38 -38
- package/dist/chunks/{modal-DK9M7lT5.js.map → modal-LHkNxBko.js.map} +1 -1
- package/dist/chunks/{multi-select-CFHaQPot.js → multi-select-BJ6Lst1E.js} +44 -44
- package/dist/chunks/{multi-select-CFHaQPot.js.map → multi-select-BJ6Lst1E.js.map} +1 -1
- package/dist/chunks/{picker-D3Fc15JH.js → picker-DLnfOgZj.js} +34 -34
- package/dist/chunks/{picker-D3Fc15JH.js.map → picker-DLnfOgZj.js.map} +1 -1
- package/dist/chunks/{popover-BTT7zSqx.js → popover-IExDrsF6.js} +67 -67
- package/dist/chunks/{popover-BTT7zSqx.js.map → popover-IExDrsF6.js.map} +1 -1
- package/dist/chunks/{select-BolFlcoY.js → select-CysiIrej.js} +5 -5
- package/dist/chunks/{select-BolFlcoY.js.map → select-CysiIrej.js.map} +1 -1
- package/dist/chunks/{sortable-DcTIAbjD.js → sortable-BKIwlqhI.js} +17 -17
- package/dist/chunks/{sortable-DcTIAbjD.js.map → sortable-BKIwlqhI.js.map} +1 -1
- package/dist/chunks/{table-BChs6bgR.js → table-CIWdAcPY.js} +2 -2
- package/dist/chunks/{table-BChs6bgR.js.map → table-CIWdAcPY.js.map} +1 -1
- package/dist/chunks/{types-CxXyru6U.js → types-D9Wj9wrg.js} +21 -21
- package/dist/chunks/{types-CxXyru6U.js.map → types-D9Wj9wrg.js.map} +1 -1
- package/dist/chunks/{useODataSelectBase-BhCMCzv_.js → useODataSelectBase-Bq36Wp1U.js} +8 -8
- package/dist/chunks/{useODataSelectBase-BhCMCzv_.js.map → useODataSelectBase-Bq36Wp1U.js.map} +1 -1
- package/dist/context-menu/index.js +1 -1
- package/dist/date-input/index.js +2 -2
- package/dist/date-time-input/index.js +32 -32
- package/dist/dialog/index.js +9 -9
- package/dist/disclosure/index.js +10 -10
- package/dist/drop-zone/index.js +8 -8
- package/dist/errors/index.js +8 -8
- package/dist/expandable-action-panel/index.js +16 -16
- package/dist/flex/useFlexClasses.d.ts +1 -1
- package/dist/fullscreen-portal/index.js +7 -7
- package/dist/image/index.js +27 -27
- package/dist/input/index.js +1 -1
- package/dist/input-date-time/index.js +1 -1
- package/dist/input-file/index.js +1 -1
- package/dist/input-files/index.js +1 -1
- package/dist/input-image/index.js +1 -1
- package/dist/input-search/index.js +1 -1
- package/dist/layout-picker/index.js +1 -1
- package/dist/list/index.js +25 -25
- package/dist/listbox/index.js +5 -5
- package/dist/misc/index.js +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/multi-select/index.js +1 -1
- package/dist/notifications/index.js +30 -30
- package/dist/picker/index.js +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/preset-range-date-input/index.js +1 -1
- package/dist/preset-select/index.js +1 -1
- package/dist/radio-button/index.js +10 -10
- package/dist/select/index.js +1 -1
- package/dist/simple-table/index.js +1 -1
- package/dist/slider/index.js +3 -3
- package/dist/sortable/index.js +1 -1
- package/dist/state-select/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/switch/index.js +11 -11
- package/dist/table/index.js +1 -1
- package/dist/table-sorting/index.js +13 -13
- package/dist/tabs/index.js +1 -1
- package/dist/tag-input/index.js +55 -55
- package/dist/tag-input/index.js.map +1 -1
- package/dist/text/index.js +1 -1
- package/dist/text-editor/index.js +3 -3
- package/dist/textarea/index.js +1 -1
- package/dist/tree-select/index.js +134 -134
- package/dist/tree-select/index.js.map +1 -1
- package/dist/tree-table/index.js +16 -16
- package/package.json +1 -1
- package/storybook-static/project.json +1 -1
- package/dist/chunks/date-input-Dr5QNVT6.js +0 -341
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as e } from "../chunks/ui.module-DHVTOqZ0.js";
|
|
2
|
-
import { o as t } from "../chunks/input-
|
|
3
|
-
import { t as n } from "../chunks/check-box-
|
|
4
|
-
import { c as r, d as i, f as a, i as o, l as s, n as c, p as l, r as u, t as d, u as f } from "../chunks/picker-
|
|
5
|
-
import { r as p } from "../chunks/useODataSelectBase-
|
|
6
|
-
import { o as m, s as h } from "../chunks/multi-select-
|
|
2
|
+
import { o as t } from "../chunks/input-VC8jEoTa.js";
|
|
3
|
+
import { t as n } from "../chunks/check-box-sfGjYczQ.js";
|
|
4
|
+
import { c as r, d as i, f as a, i as o, l as s, n as c, p as l, r as u, t as d, u as f } from "../chunks/picker-DLnfOgZj.js";
|
|
5
|
+
import { r as p } from "../chunks/useODataSelectBase-Bq36Wp1U.js";
|
|
6
|
+
import { o as m, s as h } from "../chunks/multi-select-BJ6Lst1E.js";
|
|
7
7
|
import { useCallback as g, useLayoutEffect as _, useMemo as v, useRef as y, useState as ee } from "react";
|
|
8
8
|
import { flattenODataDependentServices as b, sortODataDependentSegmentItemsByChains as x, useODataCollection as S, useODataCollectionChains as C, useODataCollectionModel as w } from "@ryuzaki13/react-foundation-api/odata";
|
|
9
9
|
import { cn as T } from "@ryuzaki13/react-foundation-lib/utils";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
11
|
+
import { CheckIcon as te, ChevronRightIcon as ne, MinusIcon as re, XIcon as ie } from "lucide-react";
|
|
12
12
|
import { compareStrings as k } from "@ryuzaki13/react-foundation-lib/string-comparison";
|
|
13
13
|
//#region src/tree-select/helpers.ts
|
|
14
14
|
function A(e) {
|
|
@@ -144,12 +144,12 @@ function P({ odata: e, segments: t, model: n }) {
|
|
|
144
144
|
}
|
|
145
145
|
//#endregion
|
|
146
146
|
//#region src/tree-select/model/treeUtils.ts
|
|
147
|
-
function
|
|
147
|
+
function F(e, t) {
|
|
148
148
|
return `${e}::${t}`;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function fe(e) {
|
|
151
151
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = 0, s = (e, c) => {
|
|
152
|
-
t.set(e.id, e), n.set(e.id, c), i.set(e.id, o++), a.set(
|
|
152
|
+
t.set(e.id, e), n.set(e.id, c), i.set(e.id, o++), a.set(F(e.codeKey, e.value), e.id);
|
|
153
153
|
let l = (e.children ?? []).map((e) => e.id);
|
|
154
154
|
r.set(e.id, l);
|
|
155
155
|
for (let t of e.children ?? []) s(t, e.id);
|
|
@@ -164,19 +164,19 @@ function pe(e) {
|
|
|
164
164
|
nodeIdByCodeValue: a
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
if (e) return t.nodeIdByCodeValue.get(
|
|
167
|
+
function pe(e, t) {
|
|
168
|
+
if (e) return t.nodeIdByCodeValue.get(F(e.codeKey, e.value));
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function I(e, t) {
|
|
171
171
|
let n = /* @__PURE__ */ new Set();
|
|
172
172
|
if (!e) return n;
|
|
173
173
|
for (let [r, i] of Object.entries(e)) for (let e of i) {
|
|
174
|
-
let i = t.nodeIdByCodeValue.get(
|
|
174
|
+
let i = t.nodeIdByCodeValue.get(F(r, e));
|
|
175
175
|
i && n.add(i);
|
|
176
176
|
}
|
|
177
|
-
return
|
|
177
|
+
return he(n, t);
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function L(e, t) {
|
|
180
180
|
let n = [...e].sort((e, n) => (t.preorderIndexById.get(e) ?? 2 ** 53 - 1) - (t.preorderIndexById.get(n) ?? 2 ** 53 - 1)), r = {};
|
|
181
181
|
for (let e of n) {
|
|
182
182
|
let n = t.nodeById.get(e);
|
|
@@ -184,12 +184,12 @@ function I(e, t) {
|
|
|
184
184
|
}
|
|
185
185
|
return r;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function R(e, t) {
|
|
188
188
|
let n = [], r = t.parentById.get(e);
|
|
189
189
|
for (; r;) n.push(r), r = t.parentById.get(r);
|
|
190
190
|
return n;
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function me(e, t, n) {
|
|
193
193
|
let r = n.parentById.get(e);
|
|
194
194
|
for (; r;) {
|
|
195
195
|
if (r === t) return !0;
|
|
@@ -197,41 +197,41 @@ function he(e, t, n) {
|
|
|
197
197
|
}
|
|
198
198
|
return !1;
|
|
199
199
|
}
|
|
200
|
-
function R(e, t, n) {
|
|
201
|
-
for (let r of [...e]) he(r, t, n) && e.delete(r);
|
|
202
|
-
}
|
|
203
200
|
function z(e, t, n) {
|
|
201
|
+
for (let r of [...e]) me(r, t, n) && e.delete(r);
|
|
202
|
+
}
|
|
203
|
+
function B(e, t, n) {
|
|
204
204
|
if (t.has(e)) return !0;
|
|
205
205
|
if (n.nodeById.get(e)?.disabled) return !1;
|
|
206
206
|
let r = n.childrenById.get(e) ?? [];
|
|
207
|
-
return r.length !== 0 && r.every((e) =>
|
|
207
|
+
return r.length !== 0 && r.every((e) => B(e, t, n));
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function he(e, t) {
|
|
210
210
|
let n = new Set(e);
|
|
211
|
-
for (let e of [...n])
|
|
211
|
+
for (let e of [...n]) R(e, t).some((e) => n.has(e)) && n.delete(e);
|
|
212
212
|
let r = [...t.nodeById.keys()].sort((e, n) => (t.preorderIndexById.get(n) ?? 0) - (t.preorderIndexById.get(e) ?? 0));
|
|
213
213
|
for (let e of r) {
|
|
214
214
|
let r = t.childrenById.get(e) ?? [];
|
|
215
|
-
r.length === 0 || n.has(e) || t.nodeById.get(e)?.disabled || r.every((e) =>
|
|
215
|
+
r.length === 0 || n.has(e) || t.nodeById.get(e)?.disabled || r.every((e) => B(e, n, t)) && (z(n, e, t), n.add(e));
|
|
216
216
|
}
|
|
217
217
|
return n;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function V(e, t, n) {
|
|
220
220
|
let r = n.parentById.get(t);
|
|
221
221
|
for (; r;) {
|
|
222
222
|
if (e.has(r)) {
|
|
223
223
|
e.delete(r);
|
|
224
|
-
for (let t of
|
|
224
|
+
for (let t of G(n, n.childrenById.get(r) ?? [])) e.add(t);
|
|
225
225
|
return !0;
|
|
226
226
|
}
|
|
227
227
|
r = n.parentById.get(r);
|
|
228
228
|
}
|
|
229
229
|
return !1;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
return t.has(e) ? !0 :
|
|
231
|
+
function H(e, t, n) {
|
|
232
|
+
return t.has(e) ? !0 : R(e, n).some((e) => t.has(e));
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function U(e, t, n, r) {
|
|
235
235
|
let i = n.childrenById.get(e) ?? [];
|
|
236
236
|
if (t.has(e)) return r.selectedIds.add(e), {
|
|
237
237
|
selected: !0,
|
|
@@ -241,7 +241,7 @@ function H(e, t, n, r) {
|
|
|
241
241
|
selected: !1,
|
|
242
242
|
partial: !1
|
|
243
243
|
};
|
|
244
|
-
let a = i.map((e) =>
|
|
244
|
+
let a = i.map((e) => U(e, t, n, r)), o = a.every((e) => e.selected && !e.partial), s = a.some((e) => e.selected || e.partial);
|
|
245
245
|
return o ? (r.selectedIds.add(e), {
|
|
246
246
|
selected: !0,
|
|
247
247
|
partial: !1
|
|
@@ -253,15 +253,15 @@ function H(e, t, n, r) {
|
|
|
253
253
|
partial: !1
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function W(e, t) {
|
|
257
257
|
let n = {
|
|
258
258
|
selectedIds: /* @__PURE__ */ new Set(),
|
|
259
259
|
partialIds: /* @__PURE__ */ new Set()
|
|
260
260
|
};
|
|
261
|
-
for (let r of t.rootIds)
|
|
261
|
+
for (let r of t.rootIds) U(r, e, t, n);
|
|
262
262
|
return n;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function G(e, t = e.rootIds) {
|
|
265
265
|
let n = (t) => {
|
|
266
266
|
let r = e.nodeById.get(t), i = (e.childrenById.get(t) ?? []).map(n), a = i.flatMap((e) => e.selectedIds), o = r?.disabled === !0 || i.some((e) => e.containsDisabled);
|
|
267
267
|
return !r || r.disabled || o ? {
|
|
@@ -274,34 +274,34 @@ function W(e, t = e.rootIds) {
|
|
|
274
274
|
};
|
|
275
275
|
return new Set(t.flatMap((e) => n(e).selectedIds));
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
let r =
|
|
279
|
-
if (
|
|
277
|
+
function ge(e, t, n) {
|
|
278
|
+
let r = I(e, n), i = (e) => {
|
|
279
|
+
if (H(e, r, n)) {
|
|
280
280
|
if (r.has(e)) {
|
|
281
281
|
r.delete(e);
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
|
|
284
|
+
V(r, e, n) && i(e);
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
|
-
|
|
288
|
-
}, a = [...
|
|
287
|
+
z(r, e, n), r.add(e);
|
|
288
|
+
}, a = [...G(n, [t])], o = a.length > 0 && a.every((e) => H(e, r, n));
|
|
289
289
|
for (let e of a) {
|
|
290
|
-
let t =
|
|
290
|
+
let t = H(e, r, n);
|
|
291
291
|
(o && t || !o && !t) && i(e);
|
|
292
292
|
}
|
|
293
|
-
return
|
|
293
|
+
return L(he(r, n), n);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function _e(e, t, n) {
|
|
296
296
|
let r = t.parentById.get(e);
|
|
297
297
|
for (; r;) n.add(r), r = t.parentById.get(r);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function ve(e, t) {
|
|
300
300
|
let n = /* @__PURE__ */ new Set();
|
|
301
|
-
for (let r of e)
|
|
301
|
+
for (let r of e) _e(r, t, n);
|
|
302
302
|
return n;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function ye(e, t, n) {
|
|
305
305
|
let r = /* @__PURE__ */ new Set();
|
|
306
306
|
for (let [i, a] of e.childrenById) {
|
|
307
307
|
if (a.length === 0) continue;
|
|
@@ -310,14 +310,14 @@ function be(e, t, n) {
|
|
|
310
310
|
}
|
|
311
311
|
return r;
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
let r = (e.children ?? []).map((e) =>
|
|
313
|
+
function K(e, t, n) {
|
|
314
|
+
let r = (e.children ?? []).map((e) => K(e, t, n)).filter((e) => !!e);
|
|
315
315
|
return !e.searchText.toLowerCase().includes(t) && r.length === 0 ? null : (r.length > 0 && n.add(e.id), r.length === 0 ? e : {
|
|
316
316
|
...e,
|
|
317
317
|
children: r
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function be(e, t) {
|
|
321
321
|
let n = t.trim().toLowerCase();
|
|
322
322
|
if (!n) return {
|
|
323
323
|
nodes: [...e],
|
|
@@ -325,11 +325,11 @@ function xe(e, t) {
|
|
|
325
325
|
};
|
|
326
326
|
let r = /* @__PURE__ */ new Set();
|
|
327
327
|
return {
|
|
328
|
-
nodes: e.map((e) =>
|
|
328
|
+
nodes: e.map((e) => K(e, n, r)).filter((e) => !!e),
|
|
329
329
|
expandedIds: r
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function xe(e, t) {
|
|
333
333
|
let n = [], r = (e, i, a) => {
|
|
334
334
|
let o = (e.children?.length ?? 0) > 0, s = o && t.has(e.id);
|
|
335
335
|
if (n.push({
|
|
@@ -346,7 +346,7 @@ function Se(e, t) {
|
|
|
346
346
|
}
|
|
347
347
|
//#endregion
|
|
348
348
|
//#region src/tree-select/model/buildTreeColumnsLayoutDescriptor.ts
|
|
349
|
-
function
|
|
349
|
+
function Se(e) {
|
|
350
350
|
let t = [], n = 0;
|
|
351
351
|
for (; n < e.length;) {
|
|
352
352
|
let r = n + 1;
|
|
@@ -365,7 +365,7 @@ function Ce(e) {
|
|
|
365
365
|
}
|
|
366
366
|
//#endregion
|
|
367
367
|
//#region src/tree-select/model/resolveBalancedTreeColumnsLayout.ts
|
|
368
|
-
var
|
|
368
|
+
var q = 16, Ce = 48, we = 224, Te = 10, J = 32, Ee = 6, De = 3;
|
|
369
369
|
function Y(e, t) {
|
|
370
370
|
return Number.isFinite(e) && e > 0 ? e : t;
|
|
371
371
|
}
|
|
@@ -390,7 +390,7 @@ function Z(e, t) {
|
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
392
|
function Oe({ descriptor: e, availableWidth: t, availableHeight: n, viewportWidth: r, viewportHeight: i, referenceWidth: a }) {
|
|
393
|
-
let o = Math.max(0, Math.floor(Number.isFinite(e.itemCount) ? e.itemCount : 0)), s = Y(t, 240), c = Y(n, 80), l = Y(r, s + 16), u = Y(i, c), d = Math.max(1, Math.min(s, Math.max(1, l - 16))), f = Math.max(1, Math.min(c, u - 16)), p = Math.max(1, Y(a, 1)), m = Math.min(d, p), h = Math.max(1, Math.floor((d -
|
|
393
|
+
let o = Math.max(0, Math.floor(Number.isFinite(e.itemCount) ? e.itemCount : 0)), s = Y(t, 240), c = Y(n, 80), l = Y(r, s + 16), u = Y(i, c), d = Math.max(1, Math.min(s, Math.max(1, l - 16))), f = Math.max(1, Math.min(c, u - 16)), p = Math.max(1, Y(a, 1)), m = Math.min(d, p), h = Math.max(1, Math.floor((d - q + Te) / 234)), g = Math.max(1, Math.min(Ee, h, o || 1)), _ = e.groups.reduce((e, t) => Math.max(e, X(t)), 1);
|
|
394
394
|
if (o === 0) return {
|
|
395
395
|
columnCount: 1,
|
|
396
396
|
rowCount: 1,
|
|
@@ -403,7 +403,7 @@ function Oe({ descriptor: e, availableWidth: t, availableHeight: n, viewportWidt
|
|
|
403
403
|
for (let t = 1; t <= g; t += 1) {
|
|
404
404
|
let n = Math.max(_, Math.ceil(o / t)), r = Z(e, n);
|
|
405
405
|
for (; r.usedColumnCount > t && n < o;) n += 1, r = Z(e, n);
|
|
406
|
-
let i = r.usedColumnCount, a = Math.max(m,
|
|
406
|
+
let i = r.usedColumnCount, a = Math.max(m, q + i * we + (i - 1) * Te), s = Ce + n * J, c = a / d, l = s / f, u = (i * n - o) / o, p = r.intentionalGapCount / o, h = Math.max(c, l) + .25 * Math.abs(c - l) + .01 * u + .02 * p + .04 * (i - 1);
|
|
407
407
|
h < y && (y = h, v = {
|
|
408
408
|
columnCount: i,
|
|
409
409
|
rowCount: n,
|
|
@@ -455,13 +455,13 @@ var Q = {
|
|
|
455
455
|
//#region src/tree-select/TreeNodeContent.tsx
|
|
456
456
|
function ke({ node: e, level: t, highlight: r, hasChildren: i, isExpanded: a, selected: o, partial: s, selectionMode: c, optionsLayout: l = "tree", onToggleExpand: u, onToggleSelection: d }) {
|
|
457
457
|
let f = l === "tree", m = l === "columns" && t === 0;
|
|
458
|
-
return /* @__PURE__ */
|
|
459
|
-
/* @__PURE__ */
|
|
458
|
+
return /* @__PURE__ */ O(E, { children: [
|
|
459
|
+
/* @__PURE__ */ D("span", {
|
|
460
460
|
className: Q.treeIndent,
|
|
461
461
|
style: { "--tree-level": t },
|
|
462
462
|
"aria-hidden": "true"
|
|
463
463
|
}),
|
|
464
|
-
f && i ? /* @__PURE__ */
|
|
464
|
+
f && i ? /* @__PURE__ */ D("button", {
|
|
465
465
|
type: "button",
|
|
466
466
|
className: Q.treeExpander,
|
|
467
467
|
onClick: (e) => {
|
|
@@ -470,30 +470,30 @@ function ke({ node: e, level: t, highlight: r, hasChildren: i, isExpanded: a, se
|
|
|
470
470
|
"aria-label": a ? "Свернуть ветку" : "Развернуть ветку",
|
|
471
471
|
"data-ui": "tree-select-expander",
|
|
472
472
|
"data-action": a ? "collapse-tree-select-node" : "expand-tree-select-node",
|
|
473
|
-
children: /* @__PURE__ */
|
|
474
|
-
}) : f ? /* @__PURE__ */
|
|
473
|
+
children: /* @__PURE__ */ D(ne, { className: T(Q.treeExpanderIcon, a && Q.treeExpanderIconExpanded) })
|
|
474
|
+
}) : f ? /* @__PURE__ */ D("span", {
|
|
475
475
|
className: Q.treeExpanderPlaceholder,
|
|
476
476
|
"aria-hidden": "true"
|
|
477
477
|
}) : null,
|
|
478
|
-
c === "multi" && l === "columns" ? /* @__PURE__ */
|
|
478
|
+
c === "multi" && l === "columns" ? /* @__PURE__ */ D("span", {
|
|
479
479
|
className: Q.treeColumnCheckBox,
|
|
480
480
|
onMouseDown: (e) => e.stopPropagation(),
|
|
481
481
|
onClick: (e) => e.stopPropagation(),
|
|
482
|
-
children: /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ D(n, {
|
|
483
483
|
value: o,
|
|
484
484
|
indeterminate: s,
|
|
485
485
|
disabled: e.disabled,
|
|
486
486
|
"aria-label": `Выбрать ${e.label}`,
|
|
487
487
|
onChange: () => d?.()
|
|
488
488
|
})
|
|
489
|
-
}) : c === "multi" ? /* @__PURE__ */
|
|
489
|
+
}) : c === "multi" ? /* @__PURE__ */ D("span", {
|
|
490
490
|
className: T(Q.treeSelection, o && Q.treeSelectionChecked, s && Q.treeSelectionPartial),
|
|
491
491
|
"aria-hidden": "true",
|
|
492
|
-
children: o ? /* @__PURE__ */
|
|
492
|
+
children: o ? /* @__PURE__ */ D(te, { className: Q.treeSelectionIcon }) : s ? /* @__PURE__ */ D(re, { className: Q.treeSelectionIcon }) : null
|
|
493
493
|
}) : null,
|
|
494
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ D("div", {
|
|
495
495
|
className: Q.treeNodeOptionContent,
|
|
496
|
-
children: /* @__PURE__ */
|
|
496
|
+
children: /* @__PURE__ */ D(p, {
|
|
497
497
|
label: e.label,
|
|
498
498
|
code: e.code,
|
|
499
499
|
highlight: r,
|
|
@@ -505,29 +505,29 @@ function ke({ node: e, level: t, highlight: r, hasChildren: i, isExpanded: a, se
|
|
|
505
505
|
}
|
|
506
506
|
//#endregion
|
|
507
507
|
//#region src/tree-select/TreePickerBase.tsx
|
|
508
|
-
function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, nodes: b, selectedIds: x, partialIds: S, selectionMode: C, optionsLayout: w = "tree", defaultExpandedCodeKeys:
|
|
509
|
-
let de = y(null), P = y(null), [
|
|
508
|
+
function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, nodes: b, selectedIds: x, partialIds: S, selectionMode: C, optionsLayout: w = "tree", defaultExpandedCodeKeys: te, open: ne, onOpenChange: re, bulkActions: k, triggerMode: A = "display", selectedSummary: j, selectedSummaryText: M, query: ae, defaultQuery: oe, onQuery: se, onNodeActivate: ce, onClearSelection: le, isLoading: N, error: ue }) {
|
|
509
|
+
let de = y(null), P = y(null), [F, pe] = ee(!1), I = ne !== void 0, L = I ? ne : F, [R, me] = ee(() => /* @__PURE__ */ new Map()), z = A === "search" ? C === "multi" ? "search-multi" : "search-single" : "display", B = v(() => fe(b), [b]), he = v(() => `${m} <${B.nodeById.size}>`, [m, B]), V = v(() => new Set(te), [te]), { query: U, setQuery: W, resetQueryOnClose: G } = u({
|
|
510
510
|
query: ae,
|
|
511
511
|
defaultQuery: oe,
|
|
512
512
|
onQuery: se,
|
|
513
|
-
triggerMode:
|
|
514
|
-
}),
|
|
515
|
-
|
|
516
|
-
}, { nodes:
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
]),
|
|
521
|
-
...
|
|
522
|
-
...
|
|
523
|
-
...
|
|
513
|
+
triggerMode: z
|
|
514
|
+
}), ge = (e) => {
|
|
515
|
+
L && !e && G && W(""), I || pe(e), re?.(e);
|
|
516
|
+
}, { nodes: _e, expandedIds: K } = v(() => be(b, U), [b, U]), q = v(() => ve(x, B), [x, B]), Ce = v(() => ye(B, V, R), [
|
|
517
|
+
V,
|
|
518
|
+
R,
|
|
519
|
+
B
|
|
520
|
+
]), we = v(() => new Set([...B.childrenById].filter(([, e]) => e.length > 0).map(([e]) => e)), [B]), Te = v(() => w === "columns" ? we : /* @__PURE__ */ new Set([
|
|
521
|
+
...Ce,
|
|
522
|
+
...K,
|
|
523
|
+
...q
|
|
524
524
|
]), [
|
|
525
|
-
Te,
|
|
526
525
|
we,
|
|
526
|
+
Ce,
|
|
527
527
|
w,
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
]), J = v(() =>
|
|
528
|
+
K,
|
|
529
|
+
q
|
|
530
|
+
]), J = v(() => xe(_e, Te), [_e, Te]), Ee = v(() => J.findIndex((e) => x.has(e.node.id)), [x, J]), De = v(() => Se(J), [J]), Y = g((e) => {
|
|
531
531
|
let t = Oe({
|
|
532
532
|
...e,
|
|
533
533
|
descriptor: De
|
|
@@ -546,36 +546,36 @@ function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, no
|
|
|
546
546
|
}, [De]), { activeIndex: X, context: Z, floatingStyles: Ae, getFloatingProps: je, setReference: Me, setFloating: Ne, setOptionRef: Pe, close: Fe, openList: Ie, toggleOpen: Le, selectOption: Re, handleReferenceKeyDown: ze, handleFloatingKeyDown: Be, getOptionId: Ve, getActiveOptionId: He } = o({
|
|
547
547
|
options: J,
|
|
548
548
|
selectedIndex: Ee,
|
|
549
|
-
open:
|
|
550
|
-
onOpenChange:
|
|
549
|
+
open: L,
|
|
550
|
+
onOpenChange: ge,
|
|
551
551
|
onSelect: (e) => ce(e.node),
|
|
552
552
|
getOptionDisabled: (e) => e.node.disabled === !0,
|
|
553
553
|
disabled: p || N,
|
|
554
554
|
closeOnSelect: C === "single",
|
|
555
555
|
allowOpenWithoutOptions: !0,
|
|
556
|
-
triggerMode:
|
|
556
|
+
triggerMode: z,
|
|
557
557
|
placementStrategy: w === "columns" ? "auto" : "flip",
|
|
558
558
|
resolveFloatingSize: w === "columns" ? Y : void 0
|
|
559
|
-
}), Ue = Z.update, We = x.size > 0, Ge = A === "search" && (
|
|
560
|
-
mode:
|
|
561
|
-
open:
|
|
562
|
-
currentQuery:
|
|
559
|
+
}), Ue = Z.update, We = x.size > 0, Ge = A === "search" && (L || U.length > 0), Ke = Ge ? U : M ?? "", qe = A === "display" && !!j, Je = z === "search-multi" && !!j, Ye = z === "search-multi" && !We || z === "search-single" && (!M || Ge) || z === "display" && !We, $ = d({
|
|
560
|
+
mode: z,
|
|
561
|
+
open: L,
|
|
562
|
+
currentQuery: U,
|
|
563
563
|
hasDisplayValue: !!M,
|
|
564
564
|
inputRef: de,
|
|
565
|
-
setQuery:
|
|
565
|
+
setQuery: W,
|
|
566
566
|
openList: Ie,
|
|
567
567
|
close: Fe,
|
|
568
568
|
toggleOpen: Le
|
|
569
|
-
}), Xe = w === "columns" && C === "multi" && k, Ze = A === "display", Qe = Xe || Ze ? /* @__PURE__ */
|
|
569
|
+
}), Xe = w === "columns" && C === "multi" && k, Ze = A === "display", Qe = Xe || Ze ? /* @__PURE__ */ O("div", {
|
|
570
570
|
className: Q.treePopupHeader,
|
|
571
|
-
children: [Xe ? /* @__PURE__ */
|
|
571
|
+
children: [Xe ? /* @__PURE__ */ D(i, {
|
|
572
572
|
onSelectAll: k.onSelectAll,
|
|
573
573
|
onDeselectAll: k.onDeselectAll,
|
|
574
574
|
selectAllButtonRef: P
|
|
575
|
-
}) : null, Ze ? /* @__PURE__ */
|
|
576
|
-
value:
|
|
577
|
-
onChange:
|
|
578
|
-
onClear: () =>
|
|
575
|
+
}) : null, Ze ? /* @__PURE__ */ D(t, {
|
|
576
|
+
value: U,
|
|
577
|
+
onChange: W,
|
|
578
|
+
onClear: () => W(""),
|
|
579
579
|
placeholder: "Поиск по дереву",
|
|
580
580
|
onKeyDown: (e) => {
|
|
581
581
|
e.key !== "Escape" && e.key !== "Tab" && e.stopPropagation();
|
|
@@ -586,31 +586,31 @@ function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, no
|
|
|
586
586
|
}) : null]
|
|
587
587
|
}) : void 0;
|
|
588
588
|
_(() => {
|
|
589
|
-
|
|
589
|
+
L && w === "columns" && Ue();
|
|
590
590
|
}, [
|
|
591
591
|
De.signature,
|
|
592
|
-
|
|
592
|
+
L,
|
|
593
593
|
w,
|
|
594
594
|
Ue
|
|
595
595
|
]);
|
|
596
596
|
let $e = (e) => {
|
|
597
597
|
de.current = e;
|
|
598
598
|
}, et = () => {
|
|
599
|
-
le?.(),
|
|
599
|
+
le?.(), W(""), C === "single" && Fe();
|
|
600
600
|
}, tt = (e) => {
|
|
601
|
-
e.hasChildren &&
|
|
602
|
-
let n = new Map(t), r = t.get(e.node.id) ??
|
|
601
|
+
e.hasChildren && me((t) => {
|
|
602
|
+
let n = new Map(t), r = t.get(e.node.id) ?? V.has(e.node.codeKey);
|
|
603
603
|
return n.set(e.node.id, !r), n;
|
|
604
604
|
});
|
|
605
605
|
};
|
|
606
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ D(l, {
|
|
607
607
|
label: n,
|
|
608
608
|
description: c,
|
|
609
609
|
disabled: p,
|
|
610
610
|
size: h,
|
|
611
611
|
children: ({ controlId: t, labelId: i, describedBy: o }) => {
|
|
612
612
|
let c = `${t}-listbox`, l = typeof n == "string" ? n : m;
|
|
613
|
-
return /* @__PURE__ */
|
|
613
|
+
return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(r, {
|
|
614
614
|
ref: $e,
|
|
615
615
|
rootRef: Me,
|
|
616
616
|
id: t,
|
|
@@ -620,26 +620,26 @@ function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, no
|
|
|
620
620
|
disabled: p || N,
|
|
621
621
|
readOnly: A !== "search",
|
|
622
622
|
value: A === "display" && qe ? "" : Ke,
|
|
623
|
-
placeholder: Ye ?
|
|
623
|
+
placeholder: Ye ? he : void 0,
|
|
624
624
|
"aria-labelledby": i,
|
|
625
625
|
"aria-label": i ? void 0 : m,
|
|
626
626
|
"aria-describedby": o,
|
|
627
627
|
"aria-haspopup": w === "columns" ? "dialog" : "listbox",
|
|
628
|
-
"aria-expanded":
|
|
629
|
-
"aria-controls":
|
|
628
|
+
"aria-expanded": L,
|
|
629
|
+
"aria-controls": L ? c : void 0,
|
|
630
630
|
"aria-autocomplete": w !== "columns" && A === "search" ? "list" : "none",
|
|
631
|
-
"aria-activedescendant": w !== "columns" &&
|
|
631
|
+
"aria-activedescendant": w !== "columns" && L && J.length > 0 ? He(c) : void 0,
|
|
632
632
|
inputClassName: T(We && Q.treeSummary, qe && Q.inputWithOverlay),
|
|
633
|
-
overlay: qe ? /* @__PURE__ */
|
|
633
|
+
overlay: qe ? /* @__PURE__ */ D("div", {
|
|
634
634
|
className: Q.valueOverlay,
|
|
635
635
|
children: j
|
|
636
636
|
}) : Je ? j : void 0,
|
|
637
|
-
endAdornment: /* @__PURE__ */
|
|
638
|
-
open:
|
|
637
|
+
endAdornment: /* @__PURE__ */ D(s, {
|
|
638
|
+
open: L,
|
|
639
639
|
disabled: p || N,
|
|
640
640
|
onToggleMouseDown: $.handleToggleMouseDown,
|
|
641
641
|
onToggleClick: $.handleToggleClick,
|
|
642
|
-
children: We && le ? /* @__PURE__ */
|
|
642
|
+
children: We && le ? /* @__PURE__ */ D("button", {
|
|
643
643
|
type: "button",
|
|
644
644
|
className: Q.treeClearButton,
|
|
645
645
|
onMouseDown: (e) => {
|
|
@@ -649,7 +649,7 @@ function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, no
|
|
|
649
649
|
e.preventDefault(), e.stopPropagation(), et();
|
|
650
650
|
},
|
|
651
651
|
"aria-label": "Очистить выбор",
|
|
652
|
-
children: /* @__PURE__ */
|
|
652
|
+
children: /* @__PURE__ */ D(ie, {})
|
|
653
653
|
}) : null
|
|
654
654
|
}),
|
|
655
655
|
onChange: (e) => {
|
|
@@ -660,7 +660,7 @@ function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, no
|
|
|
660
660
|
$.handleTriggerFocus(e.currentTarget);
|
|
661
661
|
},
|
|
662
662
|
onKeyDown: (e) => {
|
|
663
|
-
if (w === "columns" &&
|
|
663
|
+
if (w === "columns" && L && e.key === "Tab" && !e.shiftKey && P.current) {
|
|
664
664
|
e.preventDefault(), P.current.focus();
|
|
665
665
|
return;
|
|
666
666
|
}
|
|
@@ -673,8 +673,8 @@ function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, no
|
|
|
673
673
|
enableSpaceActivation: A === "display"
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
}), /* @__PURE__ */
|
|
677
|
-
open:
|
|
676
|
+
}), /* @__PURE__ */ D(a, {
|
|
677
|
+
open: L,
|
|
678
678
|
context: Z,
|
|
679
679
|
floatingStyles: Ae,
|
|
680
680
|
listId: c,
|
|
@@ -691,15 +691,15 @@ function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, no
|
|
|
691
691
|
layoutClassName: w === "columns" ? Q.treeColumnsPopupLayout : void 0,
|
|
692
692
|
bodyClassName: "scrollable",
|
|
693
693
|
header: Qe,
|
|
694
|
-
children: /* @__PURE__ */
|
|
694
|
+
children: /* @__PURE__ */ D("div", {
|
|
695
695
|
className: T(w === "columns" && Q.treeColumns),
|
|
696
|
-
children: J.length === 0 ? /* @__PURE__ */
|
|
696
|
+
children: J.length === 0 ? /* @__PURE__ */ D(f, {
|
|
697
697
|
errorState: ue,
|
|
698
698
|
loadingState: N ? "Загрузка..." : void 0,
|
|
699
699
|
emptyState: !ue && !N ? "Нет данных" : void 0
|
|
700
700
|
}) : J.map((e, t) => {
|
|
701
|
-
let n = C === "multi" ?
|
|
702
|
-
return /* @__PURE__ */
|
|
701
|
+
let n = C === "multi" ? H(e.node.id, x, B) : x.has(e.node.id), r = C === "multi" && !n && S.has(e.node.id), i = t === X, a = e.node.disabled === !0;
|
|
702
|
+
return /* @__PURE__ */ D("div", {
|
|
703
703
|
"data-ui": "tree-select-option",
|
|
704
704
|
id: Ve(c, t),
|
|
705
705
|
ref: (e) => Pe(t, e),
|
|
@@ -715,12 +715,12 @@ function Ae({ label: n, description: c, disabled: p, placeholder: m, size: h, no
|
|
|
715
715
|
e.preventDefault();
|
|
716
716
|
},
|
|
717
717
|
onClick: () => Re(e),
|
|
718
|
-
children: /* @__PURE__ */
|
|
718
|
+
children: /* @__PURE__ */ D("div", {
|
|
719
719
|
className: Q.treeNodeButton,
|
|
720
|
-
children: /* @__PURE__ */
|
|
720
|
+
children: /* @__PURE__ */ D(ke, {
|
|
721
721
|
node: e.node,
|
|
722
722
|
level: e.level,
|
|
723
|
-
highlight:
|
|
723
|
+
highlight: U,
|
|
724
724
|
hasChildren: e.hasChildren,
|
|
725
725
|
isExpanded: e.isExpanded,
|
|
726
726
|
selected: n,
|
|
@@ -750,17 +750,17 @@ function je(e, t) {
|
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
function Me(e, t, n) {
|
|
753
|
-
let r =
|
|
753
|
+
let r = I(e, n), i = I(t, n);
|
|
754
754
|
return r.size === i.size && [...r].every((e) => i.has(e));
|
|
755
755
|
}
|
|
756
756
|
function Ne({ label: e, description: t, disabled: n, placeholder: r = "Выберите значения", size: i, nodes: a, value: o, onChange: s, query: l, defaultQuery: u, onQuery: d, isLoading: f, error: p, optionsLayout: m = "tree", defaultExpandedCodeKeys: g }) {
|
|
757
|
-
let [_, y] = ee(!1), b = v(() =>
|
|
757
|
+
let [_, y] = ee(!1), b = v(() => fe(a), [a]), { draftValue: x, setDraftValue: S, prepareOpen: C } = c({
|
|
758
758
|
value: o,
|
|
759
759
|
open: _,
|
|
760
760
|
onCommit: s,
|
|
761
761
|
isEqual: (e, t) => Me(e, t, b)
|
|
762
|
-
}), w = _ ? x : o, T = v(() =>
|
|
763
|
-
return /* @__PURE__ */
|
|
762
|
+
}), w = _ ? x : o, T = v(() => I(w, b), [w, b]), E = v(() => W(T, b), [T, b]), O = v(() => je(T, b), [T, b]);
|
|
763
|
+
return /* @__PURE__ */ D(Ae, {
|
|
764
764
|
label: e,
|
|
765
765
|
description: t,
|
|
766
766
|
disabled: n,
|
|
@@ -778,17 +778,17 @@ function Ne({ label: e, description: t, disabled: n, placeholder: r = "Выбе
|
|
|
778
778
|
},
|
|
779
779
|
bulkActions: {
|
|
780
780
|
onSelectAll: () => {
|
|
781
|
-
S(
|
|
781
|
+
S(L(G(b), b));
|
|
782
782
|
},
|
|
783
783
|
onDeselectAll: () => S({})
|
|
784
784
|
},
|
|
785
785
|
triggerMode: "search",
|
|
786
|
-
selectedSummary:
|
|
786
|
+
selectedSummary: O ? /* @__PURE__ */ D(h, { value: O }) : void 0,
|
|
787
787
|
query: l,
|
|
788
788
|
defaultQuery: u,
|
|
789
789
|
onQuery: d,
|
|
790
790
|
onNodeActivate: (e) => {
|
|
791
|
-
S((t) =>
|
|
791
|
+
S((t) => ge(t, e.id, b));
|
|
792
792
|
},
|
|
793
793
|
onClearSelection: () => {
|
|
794
794
|
S({}), _ || s({});
|
|
@@ -805,7 +805,7 @@ function Pe({ label: e, description: t, disabled: n, size: r, placeholder: i, qu
|
|
|
805
805
|
segments: f,
|
|
806
806
|
model: p
|
|
807
807
|
});
|
|
808
|
-
return /* @__PURE__ */
|
|
808
|
+
return /* @__PURE__ */ D(Ne, {
|
|
809
809
|
label: e,
|
|
810
810
|
description: t,
|
|
811
811
|
disabled: n || h.isLoading,
|
|
@@ -829,8 +829,8 @@ function Fe(e) {
|
|
|
829
829
|
if (e) return e.code && e.code !== e.label ? `${e.label} · ${e.code}` : e.label;
|
|
830
830
|
}
|
|
831
831
|
function Ie({ label: e, description: t, disabled: n, placeholder: r = "Выберите значение", size: i, nodes: a, value: o, onChange: s, query: c, defaultQuery: l, onQuery: u, isLoading: d, error: f, clearable: p = !1, defaultExpandedCodeKeys: m }) {
|
|
832
|
-
let h = v(() =>
|
|
833
|
-
return /* @__PURE__ */
|
|
832
|
+
let h = v(() => fe(a), [a]), g = pe(o, h), _ = g ? h.nodeById.get(g) : void 0;
|
|
833
|
+
return /* @__PURE__ */ D(Ae, {
|
|
834
834
|
label: e,
|
|
835
835
|
description: t,
|
|
836
836
|
disabled: n,
|
|
@@ -863,7 +863,7 @@ function Le({ label: e, description: t, disabled: n, size: r, placeholder: i, qu
|
|
|
863
863
|
segments: d,
|
|
864
864
|
model: f
|
|
865
865
|
});
|
|
866
|
-
return /* @__PURE__ */
|
|
866
|
+
return /* @__PURE__ */ D(Ie, {
|
|
867
867
|
label: e,
|
|
868
868
|
description: t,
|
|
869
869
|
disabled: n || h.isLoading,
|