@webitel/ui-sdk 26.8.32 → 26.8.34
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/{clients-DYgSupBB.js → clients-BwMBivjN.js} +104 -104
- package/dist/{components-BDKAbff7.js → components-MVLdxZ5u.js} +17 -16
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +620 -620
- package/dist/{useValidation-C_F39G5j.js → useValidation-D6P-wRwq.js} +12 -7
- package/dist/{wt-chat-emoji-BDckjRW9.js → wt-chat-emoji-B-Sol73Z.js} +1 -1
- package/dist/{wt-datepicker-BwjMwR9-.js → wt-datepicker-C5LuZK-R.js} +1 -1
- package/dist/{wt-display-chip-items-BxQrYGag.js → wt-display-chip-items-DgLG0ozO.js} +1 -1
- package/dist/{wt-search-bar-DaBSWvlP.js → wt-search-bar-Dnjkgro3.js} +10 -8
- package/dist/{wt-send-message-popup-BQmQ764a.js → wt-send-message-popup-DzDfWlvV.js} +2 -2
- package/dist/{wt-timepicker-CS5S9HHJ.js → wt-timepicker-CAkO0jFY.js} +1 -1
- package/dist/{wt-type-extension-value-input-BPhqY-_e.js → wt-type-extension-value-input-BFm1OPEE.js} +2 -2
- package/dist/{wt-vidstack-player-Byw50ZoQ.js → wt-vidstack-player-jTPSvIQM.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-input-text/wt-input-text.vue +10 -4
- package/src/components/wt-search-bar/wt-search-bar.vue +7 -0
- package/src/composables/useCard/useCardTabs.js +2 -3
- package/src/mixins/validationMixin/regle/useRegleValidation.ts +17 -1
- package/types/.tsbuildinfo +1 -1
- package/types/components/wt-input-text/wt-input-text.vue.d.ts +4 -2
- package/types/components/wt-search-bar/wt-search-bar.vue.d.ts +4 -2
- package/types/composables/useCard/useCardTabs.d.ts +1 -1
|
@@ -2,10 +2,15 @@ import { i as e } from "./enums-De8CDKZ1.js";
|
|
|
2
2
|
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
|
-
var o = (
|
|
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);
|
|
9
|
+
}
|
|
10
|
+
}, s = ({ field: e }) => ({
|
|
6
11
|
invalid: n(() => e?.value?.$error ?? null),
|
|
7
|
-
validationText: n(() => e?.value?.$errors
|
|
8
|
-
}),
|
|
12
|
+
validationText: n(() => o(e?.value?.$errors))
|
|
13
|
+
}), c = ({ field: e, customValidators: o }) => {
|
|
9
14
|
let { t: s } = t(), c = e, l = o;
|
|
10
15
|
r(e) && (c = n(() => a(e)), l = n(() => a(o)));
|
|
11
16
|
let u = n(() => !!c && !!c.value && !!Object.keys(c.value).length), d = n(() => u.value && !!c?.value?.$error);
|
|
@@ -23,11 +28,11 @@ var o = ({ field: e }) => ({
|
|
|
23
28
|
return e;
|
|
24
29
|
})
|
|
25
30
|
};
|
|
26
|
-
},
|
|
27
|
-
let { isValidation: a, invalid:
|
|
31
|
+
}, l = ({ v: t, customValidators: r, regleValidation: i }) => {
|
|
32
|
+
let { isValidation: a, invalid: o, validationText: l } = c({
|
|
28
33
|
field: t,
|
|
29
34
|
customValidators: r
|
|
30
|
-
}), { invalid: u, validationText: d } =
|
|
35
|
+
}), { invalid: u, validationText: d } = s({ field: i }), f = n(() => !!i?.value), p = n(() => f.value || a.value), m = n(() => f.value ? u.value : o.value);
|
|
31
36
|
return {
|
|
32
37
|
isValidation: p,
|
|
33
38
|
invalid: m,
|
|
@@ -36,4 +41,4 @@ var o = ({ field: e }) => ({
|
|
|
36
41
|
};
|
|
37
42
|
};
|
|
38
43
|
//#endregion
|
|
39
|
-
export {
|
|
44
|
+
export { l as t };
|
|
@@ -2,7 +2,7 @@ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
|
2
2
|
import { d as t, f as n, l as r, r as i } from "./enums-De8CDKZ1.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-
|
|
5
|
+
import { t as d } from "./useValidation-D6P-wRwq.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 ee, vShow as te, withCtx as P, withDirectives as F } from "vue";
|
|
7
7
|
import I 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-
|
|
1
|
+
import { C as e, i as t } from "./components-MVLdxZ5u.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-
|
|
3
|
+
import { t as n } from "./useValidation-D6P-wRwq.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({
|
|
@@ -35,7 +35,8 @@ var x = { class: "wt-search-bar__icon-controls" }, S = /*#__PURE__*/ e(/* @__PUR
|
|
|
35
35
|
"search",
|
|
36
36
|
"enter",
|
|
37
37
|
"update:search-mode",
|
|
38
|
-
"change:search-mode"
|
|
38
|
+
"change:search-mode",
|
|
39
|
+
"focus"
|
|
39
40
|
],
|
|
40
41
|
setup(e, { emit: u }) {
|
|
41
42
|
let S = e, C = u, { v: w, customValidators: T } = _(S), { invalid: E } = n({
|
|
@@ -54,8 +55,8 @@ var x = { class: "wt-search-bar__icon-controls" }, S = /*#__PURE__*/ e(/* @__PUR
|
|
|
54
55
|
C("update:search-mode", e), C("change:search-mode", e);
|
|
55
56
|
}
|
|
56
57
|
return (t, n) => {
|
|
57
|
-
let r = m("wt-icon"), u = m("wt-icon-btn"), _ = m("wt-hint"), S = m("wt-radio"),
|
|
58
|
-
return f(), i(
|
|
58
|
+
let r = m("wt-icon"), u = m("wt-icon-btn"), _ = m("wt-hint"), S = m("wt-radio"), k = m("wt-context-menu"), N = m("wt-input-text"), P = h("tooltip");
|
|
59
|
+
return f(), i(N, {
|
|
59
60
|
"model-value": e.value,
|
|
60
61
|
placeholder: e.placeholder || t.$t("webitelUI.searchBar.placeholder"),
|
|
61
62
|
invalid: v(E),
|
|
@@ -64,7 +65,8 @@ var x = { class: "wt-search-bar__icon-controls" }, S = /*#__PURE__*/ e(/* @__PUR
|
|
|
64
65
|
v: v(w),
|
|
65
66
|
"custom-validators": v(T),
|
|
66
67
|
"onUpdate:modelValue": A,
|
|
67
|
-
onKeyup: j
|
|
68
|
+
onKeyup: j,
|
|
69
|
+
onFocus: n[1] ||= (e) => C("focus", e)
|
|
68
70
|
}, s({
|
|
69
71
|
prefix: y(() => [l(r, {
|
|
70
72
|
color: D.value,
|
|
@@ -88,7 +90,7 @@ var x = { class: "wt-search-bar__icon-controls" }, S = /*#__PURE__*/ e(/* @__PUR
|
|
|
88
90
|
default: y(() => [c(g(e.hint), 1)], void 0, !0),
|
|
89
91
|
_: 1
|
|
90
92
|
}, 8, ["icon-color"])) : a("", !0),
|
|
91
|
-
e.searchMode ? (f(), i(
|
|
93
|
+
e.searchMode ? (f(), i(k, {
|
|
92
94
|
key: 2,
|
|
93
95
|
options: e.searchModeOptions,
|
|
94
96
|
onClick: M
|
|
@@ -97,7 +99,7 @@ var x = { class: "wt-search-bar__icon-controls" }, S = /*#__PURE__*/ e(/* @__PUR
|
|
|
97
99
|
color: v(E) ? "error" : "default",
|
|
98
100
|
icon: "filter",
|
|
99
101
|
onClick: e
|
|
100
|
-
}, null, 8, ["color", "onClick"]), [[
|
|
102
|
+
}, null, 8, ["color", "onClick"]), [[P, t.$t("webitelUI.searchBar.settingsHint")]])]),
|
|
101
103
|
option: y(({ value: t, text: n }) => [l(S, {
|
|
102
104
|
label: n,
|
|
103
105
|
selected: (typeof e.searchMode == "string" ? e.searchMode : e.searchMode.value) === t,
|
|
@@ -118,6 +120,6 @@ var x = { class: "wt-search-bar__icon-controls" }, S = /*#__PURE__*/ e(/* @__PUR
|
|
|
118
120
|
]);
|
|
119
121
|
};
|
|
120
122
|
}
|
|
121
|
-
}), [["__scopeId", "data-v-
|
|
123
|
+
}), [["__scopeId", "data-v-33881702"]]);
|
|
122
124
|
//#endregion
|
|
123
125
|
export { S as default };
|
|
@@ -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-
|
|
3
|
-
import { T as r, n as i, w as a } from "./components-
|
|
2
|
+
import { n as t, r as n } from "./clients-BwMBivjN.js";
|
|
3
|
+
import { T as r, n as i, w as a } from "./components-MVLdxZ5u.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-De8CDKZ1.js";
|
|
3
3
|
import { t as r } from "./vue-i18n-Db_oYfO8.js";
|
|
4
|
-
import { t as i } from "./useValidation-
|
|
4
|
+
import { t as i } from "./useValidation-D6P-wRwq.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({
|
package/dist/{wt-type-extension-value-input-BPhqY-_e.js → wt-type-extension-value-input-BFm1OPEE.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./clients-
|
|
2
|
-
import { a as t, o as n, r, s as i } from "./components-
|
|
1
|
+
import { t as e } from "./clients-BwMBivjN.js";
|
|
2
|
+
import { a as t, o as n, r, s as i } from "./components-MVLdxZ5u.js";
|
|
3
3
|
import { t as a } from "./enums-De8CDKZ1.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";
|
package/package.json
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
v-bind="$attrs"
|
|
37
37
|
@update:model-value="inputHandler"
|
|
38
38
|
@keyup="handleKeyup"
|
|
39
|
+
@focus="emit('focus', $event)"
|
|
39
40
|
/>
|
|
40
41
|
<p-input-group-addon
|
|
41
42
|
v-if="hideInputValue || $slots.suffix"
|
|
@@ -120,9 +121,14 @@ const inputText = useTemplateRef('inputText');
|
|
|
120
121
|
|
|
121
122
|
const inputId = `input-text-${Math.random().toString(36).slice(2, 11)}`;
|
|
122
123
|
|
|
123
|
-
const emit = defineEmits
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
const emit = defineEmits<{
|
|
125
|
+
/**
|
|
126
|
+
* @param event - native focus event from the underlying input
|
|
127
|
+
*/
|
|
128
|
+
focus: [
|
|
129
|
+
FocusEvent,
|
|
130
|
+
];
|
|
131
|
+
}>();
|
|
126
132
|
|
|
127
133
|
const slots = useSlots();
|
|
128
134
|
|
|
@@ -148,7 +154,7 @@ const requiredLabel = computed(() => {
|
|
|
148
154
|
|
|
149
155
|
const inputHandler = (value: string) => {
|
|
150
156
|
const handledValue = props.preventTrim ? value : value.trim();
|
|
151
|
-
|
|
157
|
+
model.value = handledValue;
|
|
152
158
|
};
|
|
153
159
|
|
|
154
160
|
const isValueHidden = ref(props.hideInputValue);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
:custom-validators="customValidators"
|
|
10
10
|
@update:model-value="handleInput"
|
|
11
11
|
@keyup="handleKeyup"
|
|
12
|
+
@focus="emit('focus', $event)"
|
|
12
13
|
>
|
|
13
14
|
<template #prefix>
|
|
14
15
|
<wt-icon
|
|
@@ -158,6 +159,12 @@ const emit = defineEmits<{
|
|
|
158
159
|
'change:search-mode': [
|
|
159
160
|
string | object,
|
|
160
161
|
];
|
|
162
|
+
/**
|
|
163
|
+
* @param event - native focus event from the underlying input
|
|
164
|
+
*/
|
|
165
|
+
focus: [
|
|
166
|
+
FocusEvent,
|
|
167
|
+
];
|
|
161
168
|
}>();
|
|
162
169
|
|
|
163
170
|
const { v, customValidators } = toRefs(props);
|
|
@@ -10,6 +10,22 @@ export type UseFieldValidationReturn = {
|
|
|
10
10
|
validationText?: ComputedRef<string | undefined>;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
const getFirstRegleError = (errors: unknown): string | undefined => {
|
|
14
|
+
if (Array.isArray(errors)) {
|
|
15
|
+
return errors.at(0);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (errors && typeof errors === 'object') {
|
|
19
|
+
for (const value of Object.values(errors)) {
|
|
20
|
+
if (Array.isArray(value) && value.length) {
|
|
21
|
+
return value.at(0);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
13
29
|
export const useFieldValidation = ({
|
|
14
30
|
field: fieldRef,
|
|
15
31
|
}: UseFieldValidationParams): UseFieldValidationReturn => {
|
|
@@ -18,7 +34,7 @@ export const useFieldValidation = ({
|
|
|
18
34
|
});
|
|
19
35
|
|
|
20
36
|
const validationText = computed(() => {
|
|
21
|
-
return fieldRef?.value?.$errors
|
|
37
|
+
return getFirstRegleError(fieldRef?.value?.$errors);
|
|
22
38
|
});
|
|
23
39
|
|
|
24
40
|
return {
|