urfu-ui-kit-react 2.1.7-next.4 → 2.1.7-next.5
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/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +16 -15
- package/dist/components/BreadCrumbs/BreadCrumbs.d.ts.map +1 -1
- package/dist/components/BreadCrumbs/BreadCrumbs.js +23 -22
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +51 -50
- package/dist/components/Button/ButtonRefreshIcon.d.ts.map +1 -1
- package/dist/components/Button/ButtonRefreshIcon.js +9 -8
- package/dist/components/Calendar/Calendar.js +232 -232
- package/dist/components/Calendar/CalendarSelect.d.ts.map +1 -1
- package/dist/components/Calendar/CalendarSelect.js +41 -40
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +59 -58
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +20 -19
- package/dist/components/ColumnSettings/ColumnSettings.d.ts.map +1 -1
- package/dist/components/ColumnSettings/ColumnSettings.js +112 -111
- package/dist/components/ConfirmModal/ConfirmModal.d.ts.map +1 -1
- package/dist/components/ConfirmModal/ConfirmModal.js +30 -29
- package/dist/components/Drawer/Drawer.js +57 -57
- package/dist/components/ErrorScreen/ErrorScreen.d.ts.map +1 -1
- package/dist/components/ErrorScreen/ErrorScreen.js +151 -150
- package/dist/components/ErrorScreen/ErrorScreenIllustration.d.ts.map +1 -1
- package/dist/components/ErrorScreen/ErrorScreenIllustration.js +35 -34
- package/dist/components/FormField/FormField.d.ts.map +1 -1
- package/dist/components/FormField/FormField.js +30 -29
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/Icon.js +17 -16
- package/dist/components/InfiniteScroll/InfiniteScroll.d.ts.map +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.js +23 -22
- package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts.map +1 -1
- package/dist/components/InputExpandTextarea/InputExpandTextarea.js +88 -87
- package/dist/components/InputFile/InputFile.d.ts.map +1 -1
- package/dist/components/InputFile/InputFile.js +99 -98
- package/dist/components/InputNumber/InputNumber.d.ts.map +1 -1
- package/dist/components/InputNumber/InputNumber.js +112 -111
- package/dist/components/InputText/InputAffix.d.ts.map +1 -1
- package/dist/components/InputText/InputAffix.js +69 -68
- package/dist/components/InputText/InputText.d.ts.map +1 -1
- package/dist/components/InputText/InputText.js +108 -107
- package/dist/components/InputTime/InputTime.d.ts.map +1 -1
- package/dist/components/InputTime/InputTime.js +202 -201
- package/dist/components/InputTime/InputTimeDropdown.d.ts.map +1 -1
- package/dist/components/InputTime/InputTimeDropdown.js +21 -20
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/Menu.js +58 -57
- package/dist/components/Message/Message.d.ts.map +1 -1
- package/dist/components/Message/Message.js +19 -18
- package/dist/components/Modal/Modal.js +66 -66
- package/dist/components/Modal/useModalTitleClearance.d.ts.map +1 -1
- package/dist/components/Modal/useModalTitleClearance.js +34 -33
- package/dist/components/Multiselect/Multiselect.js +222 -222
- package/dist/components/Notification/Notification.js +90 -90
- package/dist/components/OfflineBanner/OfflineBanner.d.ts.map +1 -1
- package/dist/components/OfflineBanner/OfflineBanner.js +40 -37
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +59 -58
- package/dist/components/Preloader/Preloader.d.ts.map +1 -1
- package/dist/components/Preloader/Preloader.js +28 -27
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Radio/Radio.js +21 -20
- package/dist/components/Search/Search.d.ts.map +1 -1
- package/dist/components/Search/Search.js +33 -32
- package/dist/components/SearchSelect/SearchSelect.js +178 -178
- package/dist/components/SearchSelect/SearchSelectOption.d.ts.map +1 -1
- package/dist/components/SearchSelect/SearchSelectOption.js +21 -20
- package/dist/components/Select/MobileOptionSheet.d.ts.map +1 -1
- package/dist/components/Select/MobileOptionSheet.js +65 -64
- package/dist/components/Select/Select.js +184 -184
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -25
- package/dist/components/Status/Status.d.ts.map +1 -1
- package/dist/components/Status/Status.js +36 -35
- package/dist/components/StickyActionBar/StickyActionBar.d.ts.map +1 -1
- package/dist/components/StickyActionBar/StickyActionBar.js +36 -35
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +19 -18
- package/dist/components/Table/Filter/DefaultInput.d.ts.map +1 -1
- package/dist/components/Table/Filter/DefaultInput.js +12 -11
- package/dist/components/Table/Filter/Filter.d.ts.map +1 -1
- package/dist/components/Table/Filter/Filter.js +99 -98
- package/dist/components/Table/Filter/FilterBooleanBox.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterBooleanBox.js +7 -6
- package/dist/components/Table/Filter/FilterBoxShell.js +48 -48
- package/dist/components/Table/Filter/FilterDateBox.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterDateBox.js +65 -64
- package/dist/components/Table/Filter/FilterSortIndicator.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterSortIndicator.js +8 -7
- package/dist/components/Table/Filter/SelectFilter.js +53 -53
- package/dist/components/Table/Filter/TableFilterOptions.d.ts.map +1 -1
- package/dist/components/Table/Filter/TableFilterOptions.js +141 -140
- package/dist/components/Table/Filter/TableFilterSortButton.d.ts.map +1 -1
- package/dist/components/Table/Filter/TableFilterSortButton.js +10 -9
- package/dist/components/Table/Filter/useVirtualOptionWindow.d.ts.map +1 -1
- package/dist/components/Table/Filter/useVirtualOptionWindow.js +9 -8
- package/dist/components/Table/Skeleton/createSkeletonColumns.d.ts.map +1 -1
- package/dist/components/Table/Skeleton/createSkeletonColumns.js +9 -8
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.helpers.d.ts.map +1 -1
- package/dist/components/Table/Table.helpers.js +31 -30
- package/dist/components/Table/Table.js +253 -252
- package/dist/components/Table/TableHead.d.ts.map +1 -1
- package/dist/components/Table/TableHead.js +92 -91
- package/dist/components/Table/TableMobileCard.d.ts.map +1 -1
- package/dist/components/Table/TableMobileCard.js +121 -120
- package/dist/components/Table/TableMobileFilters.d.ts.map +1 -1
- package/dist/components/Table/TableMobileFilters.js +28 -27
- package/dist/components/Table/TableMobileView.d.ts.map +1 -1
- package/dist/components/Table/TableMobileView.js +178 -177
- package/dist/components/Table/TableRow.d.ts.map +1 -1
- package/dist/components/Table/TableRow.js +59 -58
- package/dist/components/Table/useTableColumnPinning.d.ts +2 -917
- package/dist/components/Table/useTableColumnPinning.d.ts.map +1 -1
- package/dist/components/Table/useTableColumnPinning.js +21 -20
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +102 -101
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.js +70 -69
- package/dist/components/Tooltip/Tooltip.js +106 -106
- package/dist/components/TreeView/TreeView.js +183 -183
- package/dist/components/VirtualList/VirtualList.d.ts.map +1 -1
- package/dist/components/VirtualList/VirtualList.js +42 -41
- package/dist/dev/index.js +1 -1
- package/dist/hooks/useAutoId.d.ts.map +1 -1
- package/dist/hooks/useAutoId.js +7 -6
- package/dist/hooks/useSelectEngine.d.ts.map +1 -1
- package/dist/hooks/useSelectEngine.js +31 -30
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/responsive/uiKitResponsive.d.ts +6 -0
- package/dist/responsive/uiKitResponsive.d.ts.map +1 -1
- package/dist/responsive/uiKitResponsive.js +27 -26
- package/dist/shared/kitCopy.js +1 -1
- package/dist/shared/optionStateColors.d.ts +3 -2
- package/dist/shared/optionStateColors.d.ts.map +1 -1
- package/dist/shared/optionStateColors.js +9 -4
- package/dist/shared/popupTransition.d.ts.map +1 -1
- package/dist/shared/popupTransition.js +7 -6
- package/dist/shared/sheetTitle.d.ts +2 -1
- package/dist/shared/sheetTitle.d.ts.map +1 -1
- package/dist/shared/size.d.ts.map +1 -1
- package/dist/shared/size.js +3 -2
- package/dist/shared/uiKitDefaults.d.ts +21 -0
- package/dist/shared/uiKitDefaults.d.ts.map +1 -1
- package/dist/shared/uiKitDefaults.js +32 -18
- package/dist/style.shell.lk.css +53 -0
- package/dist/urfu-ui-kit-react.js +27 -26
- package/dist/vanilla/core/describeError.js +1 -1
- package/dist/vanilla/core/sheetTitle.js +7 -7
- package/package.json +3 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Tooltip$u as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { Tooltip$u as a } from "../../Tooltip/Tooltip.js";
|
|
3
|
+
import { getUiKitPrefix$u as r } from "../../../shared/uiKitDefaults.js";
|
|
4
|
+
function p({ sort: t, onSort: o, unavailableReason: n }) {
|
|
5
|
+
const e = o ? t === "asc" ? "По возрастанию; переключить на убывание" : t === "desc" ? "По убыванию; сбросить сортировку" : "Сортировать по возрастанию" : n;
|
|
6
|
+
return /* @__PURE__ */ i(a, { tooltipText: e, isActive: !!e, position: "top", portalOn: !0, children: /* @__PURE__ */ i(
|
|
6
7
|
"button",
|
|
7
8
|
{
|
|
8
9
|
type: "button",
|
|
9
|
-
className:
|
|
10
|
-
onClick:
|
|
11
|
-
disabled: !
|
|
10
|
+
className: `button-sort ${r()}-table-filter-options__sort`,
|
|
11
|
+
onClick: o,
|
|
12
|
+
disabled: !o,
|
|
12
13
|
"aria-label": "Сортировка",
|
|
13
|
-
children: /* @__PURE__ */ i("i", { "aria-hidden": "true", className:
|
|
14
|
+
children: /* @__PURE__ */ i("i", { "aria-hidden": "true", className: `${r()}-icon ` + (t === "asc" ? "icon-up-arrow" : t === "desc" ? "icon-down-arrow" : "icon-sorting") })
|
|
14
15
|
}
|
|
15
16
|
) });
|
|
16
17
|
}
|
|
17
|
-
export {
|
|
18
|
+
export { p as TableFilterSortButton$u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVirtualOptionWindow.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/Filter/useVirtualOptionWindow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useVirtualOptionWindow.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/Filter/useVirtualOptionWindow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,kGAAkG;AAClG,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,gBAAgB,CAAC;;;;;;2BAmGpF,MAAM;yBAiBX,MAAM,GAAG,IAAI;oBAClB,MAAM,QAAQ,aAAa,GAAG,IAAI;EAEzD"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { useRef as w, useState as C, useLayoutEffect as g, useMemo as
|
|
2
|
-
|
|
1
|
+
import { useRef as w, useState as C, useLayoutEffect as g, useMemo as F, useCallback as B } from "react";
|
|
2
|
+
import { getUiKitPrefix$u as W } from "../../../shared/uiKitDefaults.js";
|
|
3
|
+
function z(r, i, l) {
|
|
3
4
|
const h = w(/* @__PURE__ */ new Map()), f = w(/* @__PURE__ */ new Map()), [S, b] = C(0), [n, I] = C({ top: 0, height: 170, prefix: 0, estimate: 40 }), [v, T] = C(null), m = w(null), O = w();
|
|
4
5
|
g(() => {
|
|
5
6
|
const t = new Set(r);
|
|
6
7
|
for (const e of h.current.keys()) t.has(e) || h.current.delete(e);
|
|
7
8
|
for (const e of f.current.keys()) t.has(e) || f.current.delete(e);
|
|
8
9
|
}, [r]);
|
|
9
|
-
const u =
|
|
10
|
+
const u = F(() => {
|
|
10
11
|
const t = [0];
|
|
11
12
|
for (const e of r) t.push(t[t.length - 1] + (h.current.get(e) ?? n.estimate));
|
|
12
13
|
return t;
|
|
@@ -30,8 +31,8 @@ function _(r, i, l) {
|
|
|
30
31
|
var c;
|
|
31
32
|
const t = l.current;
|
|
32
33
|
if (!t) return;
|
|
33
|
-
const e = ((c = t.querySelector(
|
|
34
|
-
I((a) => Object.entries(s).every(([M,
|
|
34
|
+
const e = ((c = t.querySelector(`.${W()}-table-filter-options__bulk`)) == null ? void 0 : c.getBoundingClientRect().height) ?? 0, o = Number.parseFloat(getComputedStyle(t).getPropertyValue("--u-unit")) || 1, s = { top: t.scrollTop, height: t.clientHeight || 170, prefix: e, estimate: 40 * o };
|
|
35
|
+
I((a) => Object.entries(s).every(([M, P]) => a[M] === P) ? a : s);
|
|
35
36
|
}, [l]);
|
|
36
37
|
g(() => {
|
|
37
38
|
if (!i || (p(), !l.current)) return;
|
|
@@ -56,7 +57,7 @@ function _(r, i, l) {
|
|
|
56
57
|
const t = (e = f.current.get(v)) == null ? void 0 : e.querySelector("input");
|
|
57
58
|
t && (t.focus({ preventScroll: !0 }), T(null));
|
|
58
59
|
}, [v, d, x]);
|
|
59
|
-
const
|
|
60
|
+
const K = (t) => {
|
|
60
61
|
const e = l.current;
|
|
61
62
|
if (!e || t < 0 || t >= r.length) return;
|
|
62
63
|
const o = n.prefix + u[t], s = n.prefix + u[t + 1];
|
|
@@ -68,7 +69,7 @@ function _(r, i, l) {
|
|
|
68
69
|
topPadding: i ? u[d] : 0,
|
|
69
70
|
bottomPadding: i ? Math.max(0, u[r.length] - u[x]) : 0,
|
|
70
71
|
readViewport: p,
|
|
71
|
-
scrollToIndex:
|
|
72
|
+
scrollToIndex: K,
|
|
72
73
|
rememberFocus: (t) => {
|
|
73
74
|
m.current = t;
|
|
74
75
|
},
|
|
@@ -77,4 +78,4 @@ function _(r, i, l) {
|
|
|
77
78
|
}
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
|
-
export {
|
|
81
|
+
export { z as useVirtualOptionWindow$u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSkeletonColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/Skeleton/createSkeletonColumns.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"createSkeletonColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/Skeleton/createSkeletonColumns.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGxD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,KAAG,sBAAsB,EAa1G,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { getUiKitPrefix$u as t } from "../../../shared/uiKitDefaults.js";
|
|
3
|
+
const m = (e) => e === void 0 ? [] : (typeof e == "number" ? Array.from({ length: Math.max(0, Math.floor(e)) }, () => {
|
|
4
|
+
}) : e).map((r, o) => ({
|
|
5
|
+
key: `${t()}-skeleton-${o}`,
|
|
6
|
+
field: `${t()}-skeleton-${o}`,
|
|
7
|
+
title: r ?? "",
|
|
8
|
+
...r === void 0 ? { renderHeader: () => /* @__PURE__ */ l("span", { className: `skeleton-cell ${t()}-table-skeleton-head`, "aria-hidden": "true" }) } : {}
|
|
8
9
|
}));
|
|
9
|
-
export {
|
|
10
|
+
export { m as createSkeletonColumns$u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAEA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,cAAc,CAAC;AACtB,OAAO,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAEA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,cAAc,CAAC;AACtB,OAAO,2DAA2D,CAAC;AA+BnE,eAAO,MAAM,KAAK,GAAI,GAAG,EAAG,oxCA8EzB,eAAe,CAAC,GAAG,CAAC,4CAqatB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.helpers.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Table.helpers.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAK/E,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,WAElC,CAAC;AAuCF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,KAChD,aAAa,GAAG,SAgBlB,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,mBAAmB,GAC9B,QAAQ;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,EAC/D,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,SAAS,OAAO,EAChB,oBAAe;;;CAUhB,CAAC;AAGF,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,YACa,CAAC;AAE/D,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAQxE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE;IAC1G,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE;QAAE,WAAW,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,sEAAsE;IACtE,aAAa,CAAC,EAAE,SAAS;QAAE,KAAK,EAAE,gBAAgB,CAAA;KAAE,EAAE,CAAC;IACvD,gEAAgE;IAChE,WAAW,CAAC,EAAE;QAAE,GAAG,EAAE,SAAS,OAAO,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,SAAS,OAAO,EAAE,CAAA;KAAE,CAAC;CAC3E,GAAG,MAAM,GAAG,SAAS,CAerB;AAED,wBAAgB,2BAA2B,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAE1F;AAED,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,MAAM,EAAE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CAClG,GAAG,OAAO,CAYV;AAED,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3F;AAED,+DAA+D;AAC/D,MAAM,WAAW,YAAY;IAAG,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;AAEtE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAQ7G"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { filterExpressionSummary$u as a } from "./Filter/filterExpression.js";
|
|
2
|
-
|
|
2
|
+
import { getUiKitPrefix$u as c } from "../../shared/uiKitDefaults.js";
|
|
3
|
+
const x = (e) => `${e}px`, h = (e) => {
|
|
3
4
|
if (typeof e == "number")
|
|
4
5
|
return `calc(${e} * var(--u-unit, 1px))`;
|
|
5
6
|
if (typeof e == "string") {
|
|
@@ -8,65 +9,65 @@ const l = (e) => `${e}px`, c = (e) => {
|
|
|
8
9
|
return `calc(${n[1]} * var(--u-unit, 1px))`;
|
|
9
10
|
}
|
|
10
11
|
return e;
|
|
11
|
-
},
|
|
12
|
+
}, p = /* @__PURE__ */ new Set([10, 11, 12, 13, 14, 16, 18, 20, 24, 40, 52]), d = (e) => {
|
|
12
13
|
if (typeof e == "number") return e;
|
|
13
14
|
if (typeof e != "string") return null;
|
|
14
15
|
const t = e.trim().match(/^(-?\d+(?:\.\d+)?)px$/);
|
|
15
16
|
return t ? Number(t[1]) : null;
|
|
16
|
-
},
|
|
17
|
+
}, g = (e) => {
|
|
17
18
|
const t = d(e);
|
|
18
19
|
if (t === null) return e;
|
|
19
20
|
const n = `calc(${t} * var(--u-unit, 1px))`;
|
|
20
|
-
return
|
|
21
|
-
},
|
|
21
|
+
return p.has(t) ? `var(--${c()}-font-size-${t}, ${n})` : `max(${n}, ${Math.min(t, 12)}px)`;
|
|
22
|
+
}, y = (e) => {
|
|
22
23
|
if (!e) return e;
|
|
23
|
-
const t = { ...e }, n = d(t.fontSize),
|
|
24
|
-
return "fontSize" in t && (t.fontSize =
|
|
25
|
-
},
|
|
26
|
-
const
|
|
24
|
+
const t = { ...e }, n = d(t.fontSize), i = typeof t.lineHeight == "string" ? d(t.lineHeight) : null;
|
|
25
|
+
return "fontSize" in t && (t.fontSize = g(t.fontSize)), "lineHeight" in t && (t.lineHeight = n && i !== null ? Math.round(i / n * 1e4) / 1e4 : h(t.lineHeight)), t;
|
|
26
|
+
}, v = (e, t, n, i = 0) => {
|
|
27
|
+
const r = t[e.field], u = n && !e.resizeOff;
|
|
27
28
|
return {
|
|
28
|
-
width:
|
|
29
|
-
minWidth:
|
|
29
|
+
width: u ? Math.max(r || e.width || 0, e.width || 0) + i || "auto" : void 0,
|
|
30
|
+
minWidth: u && e.width ? e.width : void 0
|
|
30
31
|
};
|
|
31
|
-
},
|
|
32
|
-
function
|
|
32
|
+
}, z = (e) => typeof e == "string" && /^\S{1,8}$/u.test(e.trim());
|
|
33
|
+
function $(e) {
|
|
33
34
|
var n;
|
|
34
35
|
if (!e) return !1;
|
|
35
36
|
if (e.type === "date") return e.date != null || e.endDate != null;
|
|
36
37
|
const t = (n = e.paged) == null ? void 0 : n.expression;
|
|
37
38
|
return t ? !t.defaultSelected || t.rules.length > 0 || t.include.length > 0 || t.exclude.length > 0 : e.selection.mode === "include" || e.selection.values.length > 0;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function b({ filter: e, explicitCount: t, pagedSummary: n, loadedOptions: i, localValues: r }) {
|
|
40
41
|
if ((e == null ? void 0 : e.type) === "values" && e.paged) {
|
|
41
42
|
const s = n ?? a(e.paged.expression, [], !1);
|
|
42
43
|
return s.allSelected ? void 0 : s.count;
|
|
43
44
|
}
|
|
44
45
|
if (t !== void 0) return t;
|
|
45
46
|
if ((e == null ? void 0 : e.type) === "values") {
|
|
46
|
-
const { mode: s, values:
|
|
47
|
-
return s === "include" ? new Set(
|
|
47
|
+
const { mode: s, values: o } = e.selection;
|
|
48
|
+
return s === "include" ? new Set(o).size : o.length ? i == null ? void 0 : i.filter((f) => !o.includes(f.value)).length : void 0;
|
|
48
49
|
}
|
|
49
|
-
if (e || !(
|
|
50
|
-
const
|
|
51
|
-
var
|
|
52
|
-
return !((
|
|
50
|
+
if (e || !(r != null && r.all.length)) return;
|
|
51
|
+
const u = r.all.filter((s) => {
|
|
52
|
+
var o;
|
|
53
|
+
return !((o = r.unchecked) != null && o.includes(s));
|
|
53
54
|
}).length;
|
|
54
|
-
return
|
|
55
|
+
return u === r.all.length ? void 0 : u;
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function H(e) {
|
|
57
58
|
var t, n;
|
|
58
59
|
return (e == null ? void 0 : e.type) === "values" ? JSON.stringify([(t = e.paged) == null ? void 0 : t.contextKey, ((n = e.paged) == null ? void 0 : n.expression) ?? e.selection]) : void 0;
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function m(e, t) {
|
|
61
62
|
if (typeof t.filterHasValues == "boolean") return t.filterHasValues;
|
|
62
63
|
if (!e.length) return !1;
|
|
63
|
-
const n = (
|
|
64
|
-
return t.filterValue ? e.some((
|
|
64
|
+
const n = (i) => i != null && i !== "" && (!Array.isArray(i) || i.some(n));
|
|
65
|
+
return t.filterValue ? e.some((i) => n(t.filterValue(i))) : t.field && e.some((i) => Object.prototype.hasOwnProperty.call(i, t.field)) ? e.some((i) => n(i[t.field])) : !!t.render;
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
-
return e.slice(0, t).reduce((n,
|
|
67
|
+
function A(e, t) {
|
|
68
|
+
return e.slice(0, t).reduce((n, i) => n + (i.width || 0), 0);
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
-
return t ? (e.offset === void 0 && (e.offset = e.tableWidth === void 0 ? 0 : n - e.tableWidth), n - e.offset <=
|
|
70
|
+
function M(e, t, n, i) {
|
|
71
|
+
return t ? (e.offset === void 0 && (e.offset = e.tableWidth === void 0 ? 0 : n - e.tableWidth), n - e.offset <= i) : (e.tableWidth = n, e.offset = void 0, n <= i);
|
|
71
72
|
}
|
|
72
|
-
export {
|
|
73
|
+
export { y as adaptTypographyStyle$u, b as getFilterSelectedCount$u, v as getHeaderCellSizing$u, H as getServerFilterSelectionKey$u, A as getStickyLeft$u, m as hasColumnValues$u, $ as isServerFilterActive$u, z as isShortTableHeader$u, M as nextCardMode$u, x as pxAdd$u };
|