@webitel/ui-sdk 26.8.57 → 26.8.59

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.
@@ -3,9 +3,17 @@ import { t } from "./vue-i18n-Db_oYfO8.js";
3
3
  import { computed as n, isReactive as r, isRef as i, unref as a } from "vue";
4
4
  //#region src/mixins/validationMixin/regle/useRegleValidation.ts
5
5
  var o = (e) => {
6
- if (Array.isArray(e)) return e.at(0);
7
- if (e && typeof e == "object") {
8
- for (let t of Object.values(e)) if (Array.isArray(t) && t.length) return t.at(0);
6
+ if (typeof e == "string") return e;
7
+ if (Array.isArray(e)) {
8
+ for (let t of e) {
9
+ let e = o(t);
10
+ if (e) return e;
11
+ }
12
+ return;
13
+ }
14
+ if (e && typeof e == "object") for (let t of Object.values(e)) {
15
+ let e = o(t);
16
+ if (e) return e;
9
17
  }
10
18
  }, s = ({ field: e }) => ({
11
19
  invalid: n(() => e?.value?.$error ?? null),
@@ -1,4 +1,4 @@
1
- import "./components-BWyW5EEY.js";
1
+ import "./components-CMn8lHCB.js";
2
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as t } from "./enums-DY3jIXFF.js";
4
4
  import { t as n } from "./wt-button-2_aOV7LX.js";
@@ -2,7 +2,7 @@ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { g as t, h as n, l as r, r as i } from "./enums-DY3jIXFF.js";
3
3
  import { a, i as o, n as s, r as c, t as l } from "./toZonedTime-B8L5kbse.js";
4
4
  import { t as u } from "./vue-i18n-Db_oYfO8.js";
5
- import { t as d } from "./useValidation-BD4S-sEW.js";
5
+ import { t as d } from "./useValidation-Bvastl-C.js";
6
6
  import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, guardReactiveProps as b, mergeModels as x, mergeProps as S, nextTick as C, normalizeProps as w, onMounted as T, onUnmounted as E, openBlock as D, renderSlot as O, resolveComponent as k, toDisplayString as A, toRefs as j, unref as M, useModel as N, useTemplateRef as P, vShow as F, withCtx as I, withDirectives as ee } from "vue";
7
7
  import te from "primevue/datepicker";
8
8
  //#region node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js
@@ -1,4 +1,4 @@
1
- import { C as e, i as t } from "./components-BWyW5EEY.js";
1
+ import { C as e, i as t } from "./components-CMn8lHCB.js";
2
2
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { t as r } from "./displayText-CtaxzaBz.js";
4
4
  import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { t } from "./debounce-Bp3jy7S5.js";
3
- import { t as n } from "./useValidation-BD4S-sEW.js";
3
+ import { t as n } from "./useValidation-Bvastl-C.js";
4
4
  import { computed as r, createBlock as i, createCommentVNode as a, createElementVNode as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, renderSlot as p, resolveComponent as m, resolveDirective as h, toDisplayString as g, toRefs as _, unref as v, withCtx as y, withDirectives as b } from "vue";
5
5
  //#region src/components/wt-search-bar/wt-search-bar.vue?vue&type=script&setup=true&lang.ts
6
6
  var x = { class: "wt-search-bar__icon-controls" }, S = /*#__PURE__*/ e(/* @__PURE__ */ u({
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./rolldown-runtime-BEcgMyyN.js";
2
- import { n as t, r as n } from "./clients-B8MJJx6E.js";
3
- import { T as r, n as i, w as a } from "./components-BWyW5EEY.js";
2
+ import { n as t, r as n } from "./clients-CSZMaR5D.js";
3
+ import { T as r, n as i, w as a } from "./components-CMn8lHCB.js";
4
4
  import { t as o } from "./vue-i18n-Db_oYfO8.js";
5
5
  import { n as s } from "./useEventBus-B-ZeklLu.js";
6
6
  import { createBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeProps as f, onMounted as p, openBlock as m, ref as h, resolveComponent as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { l as t, r as n } from "./enums-DY3jIXFF.js";
3
3
  import { t as r } from "./vue-i18n-Db_oYfO8.js";
4
- import { t as i } from "./useValidation-BD4S-sEW.js";
4
+ import { t as i } from "./useValidation-Bvastl-C.js";
5
5
  import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, defineComponent as d, guardReactiveProps as f, mergeProps as p, nextTick as m, normalizeClass as h, normalizeProps as g, openBlock as _, renderSlot as v, resolveComponent as y, toDisplayString as b, toRefs as x, unref as S, withCtx as C } from "vue";
6
6
  //#region src/components/wt-timepicker/wt-timepicker.vue?vue&type=script&setup=true&lang.ts
7
7
  var w = { class: "wt-timepicker__wrapper" }, T = 3600, E = 60, D = /*#__PURE__*/ e(/* @__PURE__ */ d({
@@ -218,6 +218,6 @@ var O = { class: "wt-tree-table-td__content" }, k = {
218
218
  ]))), 128))])])]);
219
219
  };
220
220
  }
221
- }), [["__scopeId", "data-v-cf6adafa"]]);
221
+ }), [["__scopeId", "data-v-e4cadb95"]]);
222
222
  //#endregion
223
223
  export { H as default };
@@ -1,5 +1,5 @@
1
- import { t as e } from "./clients-B8MJJx6E.js";
2
- import { a as t, o as n, r, s as i } from "./components-BWyW5EEY.js";
1
+ import { t as e } from "./clients-CSZMaR5D.js";
2
+ import { a as t, o as n, r, s as i } from "./components-CMn8lHCB.js";
3
3
  import { t as a } from "./enums-DY3jIXFF.js";
4
4
  import { t as o } from "./vue-i18n-Db_oYfO8.js";
5
5
  import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
@@ -1,4 +1,4 @@
1
- import { D as e } from "./components-BWyW5EEY.js";
1
+ import { D as e } from "./components-CMn8lHCB.js";
2
2
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as n } from "./enums-DY3jIXFF.js";
4
4
  import "./wt-button-2_aOV7LX.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.57",
3
+ "version": "26.8.59",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -286,6 +286,9 @@ const handleSelection = (row: WtTreeNode, select: boolean) => {
286
286
  }
287
287
 
288
288
  .wt-tree-table-head {
289
+ position: sticky;
290
+ top: 0;
291
+ z-index: 1;
289
292
  border: var(--wt-tree-table-head-border);
290
293
  border-color: var(--wt-tree-table-head-border-color);
291
294
  border-radius: var(--border-radius);
@@ -11,15 +11,25 @@ export type UseFieldValidationReturn = {
11
11
  };
12
12
 
13
13
  const getFirstRegleError = (errors: unknown): string | undefined => {
14
+ if (typeof errors === 'string') {
15
+ return errors;
16
+ }
17
+
14
18
  if (Array.isArray(errors)) {
15
- return errors.at(0);
19
+ for (const entry of errors) {
20
+ const found = getFirstRegleError(entry);
21
+ if (found) return found;
22
+ }
23
+ return undefined;
16
24
  }
17
25
 
26
+ // array-type fields nest their own rule errors under `$self` and
27
+ // per-item errors under `$each`, an array of per-item error shapes —
28
+ // recurse instead of assuming array entries are already messages
18
29
  if (errors && typeof errors === 'object') {
19
30
  for (const value of Object.values(errors)) {
20
- if (Array.isArray(value) && value.length) {
21
- return value.at(0);
22
- }
31
+ const found = getFirstRegleError(value);
32
+ if (found) return found;
23
33
  }
24
34
  }
25
35