urfu-ui-kit-react 2.1.7-next.0 → 2.1.7-next.2
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/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +232 -194
- package/dist/components/Calendar/Calendar.types.d.ts +21 -0
- package/dist/components/Calendar/Calendar.types.d.ts.map +1 -1
- package/dist/components/Calendar/CalendarSelect.js +38 -38
- package/dist/components/Calendar/MaskedDateInput.d.ts +2 -0
- package/dist/components/Calendar/MaskedDateInput.d.ts.map +1 -1
- package/dist/components/Calendar/MaskedDateInput.js +120 -113
- package/dist/components/ColumnSettings/ColumnSettings.d.ts.map +1 -1
- package/dist/components/ColumnSettings/ColumnSettings.js +22 -21
- package/dist/components/ConfirmModal/ConfirmModal.d.ts +0 -1
- package/dist/components/ConfirmModal/ConfirmModal.d.ts.map +1 -1
- package/dist/components/ConfirmModal/ConfirmModal.js +11 -12
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.js +23 -22
- package/dist/components/ErrorScreen/ErrorScreenIllustration.js +28 -28
- package/dist/components/InputExpandTextarea/InputExpandTextarea.js +1 -1
- package/dist/components/InputTime/InputTime.js +12 -12
- package/dist/components/Menu/Menu.js +11 -11
- package/dist/components/Modal/Modal.js +33 -33
- package/dist/components/Pagination/Pagination.js +22 -22
- package/dist/components/Preloader/Preloader.d.ts.map +1 -1
- package/dist/components/Preloader/Preloader.js +13 -13
- package/dist/components/Search/Search.d.ts.map +1 -1
- package/dist/components/Search/Search.js +28 -23
- package/dist/components/Select/Select.d.ts +2 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +21 -19
- package/dist/components/StickyActionBar/StickyActionBar.d.ts.map +1 -1
- package/dist/components/StickyActionBar/StickyActionBar.js +45 -58
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +8 -8
- package/dist/components/Table/Filter/FilterStringBox.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterStringBox.js +45 -40
- package/dist/components/Table/Filter/SelectFilter.d.ts.map +1 -1
- package/dist/components/Table/Filter/SelectFilter.js +24 -22
- package/dist/components/Table/Filter/filterLoading.d.ts +4 -1
- package/dist/components/Table/Filter/filterLoading.d.ts.map +1 -1
- package/dist/components/Table/Filter/filterLoading.js +6 -2
- package/dist/components/Table/Filter/useServerFilterOptions.d.ts +4 -1
- package/dist/components/Table/Filter/useServerFilterOptions.d.ts.map +1 -1
- package/dist/components/Table/Filter/useServerFilterOptions.js +28 -25
- package/dist/components/Table/Table.filterTypes.d.ts +5 -0
- package/dist/components/Table/Table.filterTypes.d.ts.map +1 -1
- package/dist/components/Table/TableHead.js +6 -6
- package/dist/components/Table/TableMobileCard.d.ts.map +1 -1
- package/dist/components/Table/TableMobileCard.js +27 -26
- package/dist/components/Table/TableMobileView.js +46 -46
- package/dist/components/Table/TableRow.js +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +25 -24
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +37 -36
- package/dist/dev/index.js +18 -19
- package/dist/dev/types/vanilla/src/dev/panelStyles.d.ts +1 -1
- package/dist/hooks/useAutoId.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/kitCopy.js +1 -1
- package/dist/shared/kitRegistry.d.ts +2 -2
- package/dist/shared/optionStateColors.d.ts +2 -2
- package/dist/shared/optionStateColors.js +4 -4
- package/dist/style-no-fonts.css +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layer.css +2 -2
- package/dist/style.shell.css +3 -3
- package/dist/utils/inputMode.d.ts +5 -0
- package/dist/utils/inputMode.d.ts.map +1 -1
- package/dist/vanilla/core/dateMask.js +1 -1
- package/dist/vanilla/core/describeError.js +10 -10
- package/dist/vanilla/core/inputMode.js +18 -11
- package/package.json +1 -1
- package/dist/shared/devLauncherOffset.d.ts +0 -8
- package/dist/shared/devLauncherOffset.d.ts.map +0 -1
- package/dist/vanilla/core/devLauncherOffset.js +0 -20
|
@@ -14,5 +14,10 @@
|
|
|
14
14
|
* Слушатели пассивные, на `document`, вешаются один раз за загрузку страницы — на все
|
|
15
15
|
* копии кита сразу (оболочка ЛК и сервисы): ставит их первая копия, см. `claimKitOnce`.
|
|
16
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* Включает ли нажатие режим клавиатуры. В текстовом поле — только Tab: иначе пробел
|
|
19
|
+
* в поиске, кликнутом мышью, подсвечивал бы поле посреди набора.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isKeyboardNavigation(e: Pick<KeyboardEvent, "key" | "target">): boolean;
|
|
17
22
|
export declare function installInputModeTracking(): void;
|
|
18
23
|
//# sourceMappingURL=inputMode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputMode.d.ts","sourceRoot":"","sources":["../../src/utils/inputMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"inputMode.d.ts","sourceRoot":"","sources":["../../src/utils/inputMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAuBH;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,OAAO,CAGtF;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAsB/C"}
|
|
@@ -22,7 +22,7 @@ const h = (t) => {
|
|
|
22
22
|
let r = Number(t);
|
|
23
23
|
return r < 1 && (r = 1), r > n && (r = n), String(r).padStart(2, "0");
|
|
24
24
|
}, y = (t) => {
|
|
25
|
-
const n = t.
|
|
25
|
+
const n = t.replaceAll(/\D/g, "").slice(0, 8), r = d(n.slice(0, 2), 31), e = d(n.slice(2, 4), 12), c = n.slice(4, 8), o = [];
|
|
26
26
|
return n.length >= 1 && o.push(r), n.length > 2 && o.push(e), n.length > 4 && o.push(c), o.filter(Boolean).join(".");
|
|
27
27
|
};
|
|
28
28
|
export { f as getSegmentAtCaret$u, p as getSegmentRange$u, m as incrementDateSegment$u, y as maskDateValue$u, h as parseDateString$u };
|
|
@@ -55,7 +55,7 @@ function D(t) {
|
|
|
55
55
|
if (typeof e == "string" && e) return e;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function T(t) {
|
|
59
59
|
return !t || t.length > 300 || /\n\s+at |<\/?[a-z][\s\S]*>|Exception|Error:|ОШИБКА:|SQLSTATE|^[A-Z_]+$/.test(t) ? !1 : /[А-Яа-яЁё]/.test(t);
|
|
60
60
|
}
|
|
61
61
|
function O(t) {
|
|
@@ -95,7 +95,7 @@ function w(t, n = {}) {
|
|
|
95
95
|
};
|
|
96
96
|
if (o === "aborted")
|
|
97
97
|
return { group: o, code: null, variant: "serverError", title: "", text: "", action: "none", actionLabel: "", message: "", details: r };
|
|
98
|
-
const i = p[o], a = n.operation ? `Не удалось ${n.operation}` : n.subject ? `Не удалось загрузить ${n.subject}` : void 0, c = (a && (o === "server" || o === "parsing") ? a : void 0) ?? i.title, d =
|
|
98
|
+
const i = p[o], a = n.operation ? `Не удалось ${n.operation}` : n.subject ? `Не удалось загрузить ${n.subject}` : void 0, c = (a && (o === "server" || o === "parsing") ? a : void 0) ?? i.title, d = T(e.message) ? e.message : void 0, v = a && (o === "network" || o === "timeout") ? `${a}. ${i.text}` : void 0, y = d ?? v ?? i.text, E = d ? `${c}. ${d}` : c;
|
|
99
99
|
return { group: o, code: e.code, variant: P(o), title: c, text: y, action: i.action, actionLabel: i.actionLabel, message: E, details: r };
|
|
100
100
|
}
|
|
101
101
|
const U = ["field", "property", "path", "name", "key"], W = ["message", "msg", "detail", "error"];
|
|
@@ -151,7 +151,7 @@ function ot(t, n = {}) {
|
|
|
151
151
|
if (!y.length) return { fields: v, message: w(t, o).message };
|
|
152
152
|
if (!d)
|
|
153
153
|
return { fields: v, firstField: y[0], message: w(t, o).message };
|
|
154
|
-
const E = g.filter(
|
|
154
|
+
const E = g.filter(T), I = E.length ? E.join("; ") : g.length ? w(t, o).title : "";
|
|
155
155
|
return { fields: v, firstField: y[0], message: I };
|
|
156
156
|
}
|
|
157
157
|
const Y = "support@urfu.ru", rt = "Написать в техподдержку";
|
|
@@ -173,7 +173,7 @@ function S() {
|
|
|
173
173
|
if (s.service) return s.service;
|
|
174
174
|
if (typeof document > "u") return;
|
|
175
175
|
const t = document.querySelector(`[id^="${x}"]`);
|
|
176
|
-
return t ? t.id.slice(x.length).replace(/_+$/, "").
|
|
176
|
+
return t ? t.id.slice(x.length).replace(/_+$/, "").replaceAll("_", "-") : typeof location > "u" ? void 0 : location.host;
|
|
177
177
|
}
|
|
178
178
|
function X(t) {
|
|
179
179
|
const n = [
|
|
@@ -197,7 +197,7 @@ function H(t) {
|
|
|
197
197
|
const n = t.match(/Android ([\d.]+)/);
|
|
198
198
|
if (n) return `Android ${n[1]}`;
|
|
199
199
|
const e = t.match(/(?:iPhone|iPad).*OS ([\d_]+)/);
|
|
200
|
-
return e ? `iOS ${e[1].
|
|
200
|
+
return e ? `iOS ${e[1].replaceAll("_", ".")}` : /Mac OS X/.test(t) ? "macOS" : /Linux/.test(t) ? "Linux" : "не определена";
|
|
201
201
|
}
|
|
202
202
|
function Q(t) {
|
|
203
203
|
const n = new Date(t);
|
|
@@ -224,8 +224,8 @@ function G() {
|
|
|
224
224
|
const e = window.innerWidth;
|
|
225
225
|
return `${e <= 576 ? "mobile" : e <= 900 ? "tablet" : "desktop"} (по ширине окна, шкала urfu не включена)`;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
return "2.1.7-next.
|
|
227
|
+
function A() {
|
|
228
|
+
return "2.1.7-next.2";
|
|
229
229
|
}
|
|
230
230
|
function z(t) {
|
|
231
231
|
if (!(!s.roles && !t))
|
|
@@ -249,12 +249,12 @@ function J() {
|
|
|
249
249
|
function tt(t, n) {
|
|
250
250
|
const e = G(), o = z(n == null ? void 0 : n.roles);
|
|
251
251
|
if (!t)
|
|
252
|
-
return ["Дополнительные сведения: " + [`кит ${
|
|
252
|
+
return ["Дополнительные сведения: " + [`кит ${A()}`, e && `брейкпоинт ${e.split(" ")[0]}`, o && o.charAt(0).toLowerCase() + o.slice(1)].filter(Boolean).join("; ")];
|
|
253
253
|
const r = n ? n.requests : k();
|
|
254
254
|
return [
|
|
255
255
|
"",
|
|
256
256
|
"Дополнительные сведения:",
|
|
257
|
-
`Версия кита: ${
|
|
257
|
+
`Версия кита: ${A()}`,
|
|
258
258
|
e ? `Брейкпоинт: ${e}` : void 0,
|
|
259
259
|
o,
|
|
260
260
|
...r.length ? ["Последние запросы (время по Екатеринбургу):", ...r.map(Z)] : ["Последние запросы: нет"]
|
|
@@ -297,4 +297,4 @@ function at(t, n = Y) {
|
|
|
297
297
|
`);
|
|
298
298
|
return `mailto:${n}?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(i)}`;
|
|
299
299
|
}
|
|
300
|
-
export { N as DEFAULT_ERROR_TEXTS$u, Y as DEFAULT_SUPPORT_EMAIL$u, rt as DEFAULT_SUPPORT_LABEL$u, it as configureErrorReport$u, nt as configureErrorTexts$u, w as describeError$u, ot as describeFieldErrors$u, ut as formatErrorDetails$u, st as getErrorReportConfig$u,
|
|
300
|
+
export { N as DEFAULT_ERROR_TEXTS$u, Y as DEFAULT_SUPPORT_EMAIL$u, rt as DEFAULT_SUPPORT_LABEL$u, it as configureErrorReport$u, nt as configureErrorTexts$u, w as describeError$u, ot as describeFieldErrors$u, ut as formatErrorDetails$u, st as getErrorReportConfig$u, T as isHumanMessage$u, at as supportMailto$u };
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import { claimKitOnce$u as
|
|
2
|
-
const
|
|
3
|
-
let
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { claimKitOnce$u as r } from "./kitRegistry.js";
|
|
2
|
+
const o = "data-input-mode";
|
|
3
|
+
let t = !1;
|
|
4
|
+
const i = /* @__PURE__ */ new Set(["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End", "Enter", " "]), u = /* @__PURE__ */ new Set(["checkbox", "radio", "range", "button", "submit", "reset", "image", "file", "color"]);
|
|
5
|
+
function a(e) {
|
|
6
|
+
return e instanceof HTMLElement ? e instanceof HTMLTextAreaElement ? !e.readOnly : e instanceof HTMLInputElement ? !e.readOnly && !u.has(e.type) : e.isContentEditable : !1;
|
|
7
|
+
}
|
|
8
|
+
function s(e) {
|
|
9
|
+
return i.has(e.key) ? e.key === "Tab" || !a(e.target) : !1;
|
|
10
|
+
}
|
|
11
|
+
function c() {
|
|
12
|
+
if (t || typeof document > "u" || (t = !0, !r("input-mode"))) return;
|
|
13
|
+
const e = (n) => {
|
|
14
|
+
document.documentElement.setAttribute(o, n);
|
|
15
|
+
};
|
|
9
16
|
document.addEventListener(
|
|
10
17
|
"keydown",
|
|
11
|
-
(
|
|
12
|
-
|
|
18
|
+
(n) => {
|
|
19
|
+
s(n) && e("keyboard");
|
|
13
20
|
},
|
|
14
21
|
{ capture: !0, passive: !0 }
|
|
15
22
|
), document.addEventListener("pointerdown", () => e("pointer"), { capture: !0, passive: !0 }), e("pointer");
|
|
16
23
|
}
|
|
17
|
-
export {
|
|
24
|
+
export { c as installInputModeTracking$u, s as isKeyboardNavigation$u };
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Высота, которую занимает у нижнего края панель `owner`; `null` — панель не у края. */
|
|
2
|
-
export declare function setDevLauncherOffset(owner: object, px: number | null): void;
|
|
3
|
-
/**
|
|
4
|
-
* Сколько занимает элемент от нижнего края окна до своего верха; `null` — элемент не виден
|
|
5
|
-
* (`display: none` и т. п.): у него `top` 0, и кнопка dev улетела бы к верху экрана.
|
|
6
|
-
*/
|
|
7
|
-
export declare const occupiedFromBottom: (node: Element) => number | null;
|
|
8
|
-
//# sourceMappingURL=devLauncherOffset.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devLauncherOffset.d.ts","sourceRoot":"","sources":["../../src/shared/devLauncherOffset.ts"],"names":[],"mappings":"AAwBA,yFAAyF;AACzF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAI3E;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,OAAO,KAAG,MAAM,GAAG,IAI3D,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const o = "--u-dev-launcher-bottom";
|
|
2
|
-
const n = /* @__PURE__ */ new Map();
|
|
3
|
-
function r() {
|
|
4
|
-
if (typeof document > "u") return;
|
|
5
|
-
const t = document.documentElement;
|
|
6
|
-
if (n.size === 0) {
|
|
7
|
-
t.style.removeProperty(o);
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
const e = `calc(${Math.round(Math.max(...n.values()))}px + 12px)`;
|
|
11
|
-
t.style.getPropertyValue(o) !== e && t.style.setProperty(o, e);
|
|
12
|
-
}
|
|
13
|
-
function u(t, e) {
|
|
14
|
-
e === null ? n.delete(t) : n.set(t, Math.max(0, e)), r();
|
|
15
|
-
}
|
|
16
|
-
const c = (t) => {
|
|
17
|
-
const e = t.getBoundingClientRect();
|
|
18
|
-
return e.width === 0 && e.height === 0 ? null : window.innerHeight - e.top;
|
|
19
|
-
};
|
|
20
|
-
export { c as occupiedFromBottom$u, u as setDevLauncherOffset$u };
|